Posts

Showing posts from March, 2012

Extract a tar.xz in C/C++ -

I am writing a program that downloads tar.xz files to a server and removes them to a certain location. I'm struggling to find a way to remove the tar.xz file at a certain location. I am using QT so that the more Q-way to do this will be useful, but I do not really have any problems. There is no support for archives in QT. You can either monitor the KDE Library which is virtual File system provides support or you can call QProcess directly to call tar . To specify the directory, -C & lt; Dir> Use (uppercase case). [edit] This is also (BSD license).

asp.net - get data from database in aspx -

I am using VS 2010 to develop a site that receives some data from the database. But I just keep going to this error. 'No value has been given for one or more essential standards.' This is my code public function getSessionDetails (by as Wall Room ID string) ArrayList Dim sql As String sql = "SELECT * Table1 WHERE RoomId =?" The dbComm dim new OleDbCommand (SQL, dbConn) 'dbComm.Connection.Open () dbComm.CommandText = SQL dbComm.Parameters.Add ( "RoomId", System.Data.OleDb.OleDbType.BSTR) .Value = roomId dbConn.Open as () 'DbComm.ExecuteNonQuery () dim dbRead as OleDbDataReader = dbComm.ExecuteReader ()' System.Data.CommandBehavior.CloseConnection) try new ArrayList as dim arr dbRead.Read () arr.Add (new session Description (dbRead.GetValue (2) .ToString, dbRead.GetValue (3) .ToString, dbRead.GetValue (4) .ToString, dbRead.GetValue (6) .ToString, _ dbRead.GetValue (5) .ToString, dbRead .GetValue (7) .ToString, dbRead.GetValue (8) .ToSt...

java - Jboss As 5 and activemq -

Does anybody know about configuring Activemq on Jboss 5.1? If that happened then could he give me an example? Many thanks for any answers! Agata The instructions on this tutorial should help you

asp.net - how to convert list to datatable -

संभव डुप्लिकेट: नमस्ते, मैं डेटाटाइप को डेटाटाइप में परिवर्तित करना चाहता हूं। मैंने फ़ंक्शन लिखा स्थिर डेटाटैबल सूचीटोडडेटाबल & lt; T & gt; (IEnumerable & lt; T & gt; सूची) {var dt = new DataTable (); विदेशी मुद्रा (प्रकार की जानकारी में टाइपफ (टी) .GetProperties ()) {dt.Columns.Add (नया DataColumn (info.Name, info.PropertyType)); } Foreach (सूची में var t) {var row = dt.NewRow (); विदेशी मुद्रा (प्रकार की जानकारी में टाइपफ (टी)। गेटप्रॉपर्टीज ()) {पंक्ति [info.Name] = info.GetValue (t, null); } Dt.Rows.Add (पंक्ति); } वापसी डीटी; } लेकिन यह अपवाद फेंक रहा है "डेटासेट सिस्टम का समर्थन नहीं करता है।" Lll;> "हम इसे कैसे हल कर सकते हैं या कोई अन्य समाधान है इसे एक प्रयास करें ... // तालिका का निर्माण करते समय प्रकार pt = info.PropertyType; अगर (pt.IsGenericType & amp; amp; pt.GetGenericTypeDefinition () == टाइपफ (Nullable & lt; & gt;)) pt = Nullable.GetUnderlyingType (pt); } Dt.Columns.Add (नया DataColumn (info.Name, ...

coding style: use if/elif/else if each branch returns? -

Which coding style do you prefer, and why? If case1: return res1 if Case2: return res2 returns res3 or: if case1: return res1 Elif case2: return res2 else: return res3 or: res = none if case1: res = res1 elif case2: res = res2 and: Res = res3 Return Reason: I have a code that looks like this, and I'm wondering what is the obvious way to express it. Personally, I can not decide between 1 and 2, and I will not consider the third thing. I was about to make this language unknown, but I realized that in functional languages ​​this is not the issue, as it is in the case of default 2 = p. If each of them is a complete function, then it probably does not matter. For more complex tasks, I like the third because the code can not be easy to read after a few months. On a similar note, if I want to take something like the third answer for some post processing, then they can remember it to avoid the first time. There are happy fun debugging times that the condition...

.htaccess - Htaccess rewrite if address is subfolder? -

मेरे पास निम्न URL हैं: www.mydomain.com/client www.mydomain.com/client/index.php www.mydomain.com/client/index.php?a=b www.mydomain.com/ Client / index.php? A = b & b = c निम्न दो htaccess फ़ाइलों में मौजूद हैं: www.mydomain.com/.htaccess www.mydomain.com/client/.htaccess मैं "www.mydomain.com/client/.htaccess" को संपादित करना चाहता हूं ताकि आप www पर जा सकें .mydomain.com / क्लाइंट, यह उपयोगकर्ता को mydomain.com/client/clientarea.php पर रीडायरेक्ट करता है दूसरे शब्दों में, 1 और 2 को mydomain.com/client/clientarea.php पर रीडायरेक्ट करना होगा, लेकिन 3 और 4 को नहीं करना चाहिए। मैं यह कैसे करूँ? इसे आज़माएं: रीवरइटबेस / रीइरेट नियम ^ क्लाइंट $ / क्लाइंटरेया.एफ़पीपी [एल] रीव्रैटेरियल ^ क्लाइंट /index.php$ /clientarea.php [एल]

web services - jquery get statement -

मैं jquery get स्टेटमेंट का उपयोग करने की कोशिश कर रहा हूं: $। Get (urlAddress + " .asmx ", {प्रश्न: खोज}, फ़ंक्शन (डेटा) {चेतावनी (" डेटा लोड किया हुआ: "+ डेटा);}); मुझे नहीं पता कि विधि कैसे निर्दिष्ट करें और कैसे डेटा प्राप्त करें HTTP शीर्षलेख 200 संदेश दे रहे हैं (ठीक है), लेकिन मुझे नहीं मिल रहा है आप का उपयोग करना होगा अगर कोई क्रॉस-डोमेन अनुरोध है, या JSON का उपयोग करता है तो यूआरएल को खींचने के लिए एक स्थानीय प्रॉक्सी पृष्ठ। उदाहरण के लिए, अगर मैं google.com में खींचना चाहता हूं तो मैं इसे भेजूंगा एक स्थानीय /proxy?uri=http://google.com और जो सामग्री को पकड़ लेता है, उसे मेरे पास वापस लाता है।

Create Excel XML files from Python -

I need to create excel XML files from Python. Excel XML format is quite simple. I looked at a sample XML file saved from Excel 2003 and it is quite simple. I am looking for a graphical, prepared library that can be created such that instead of changing any one, is something that I Can use: book = Expy.Workbook () s1 = book.add_sheet () s1 [0, 2] = "A3" s1 [0, 0] = 12 s1 [ 0, 9] = Expy.Formula ("= Sum (A1: A3)") book.write ("excelfile.xml") Anyone know anything? xlwt looks old, supports only python 2.x, and writes xls file, not xml give a try

c# - What kind of, does there exist a, data framework like this? -

What do I do: Load values ​​for the program from a file. Read / Add / Change those values Save those values ​​back to the file I would like to be able to file a database I want as much data as possible to stay in memory , So I'm not stopping the file. I would like to ask to use linux or a standard query language I think the data will return the objects as arrays I think something like this can happen Such support Iai but C # and arrange for local applications. I am looking for names such as data interactions and projects, preferably free with non-infectious and crushing licensing, understanding my help and use of concept. Looking at your needs, I see this meets all your query / update requirements. , And works with many databases. For a file database that works with EF, you may want to consider it. Version 4 is currently in Beta, and handles your single file, mostly in memory etc. Well the requirements The only thing is that, by using LINQ with EF, ...

php - Retrieving RSS feed with tag <content:encoded> -

मेरे पास कोड का निम्न स्निपेट है: फ़ंक्शन getFeed ($ feed_url) {$ Content = file_get_contents ($ feed_url); $ X = नया सरल एक्सएमएल एलेमेंट ($ सामग्री); गूंज "& lt; ul & gt;"; Foreach ($ x- & gt; चैनल- & gt; आइटम $ एंट्री के रूप में) {गूंजना gt; & lt; a href = '$ entry- & gt; link' title = '$ entry- & gt; शीर्षक' & gt; । $ एंट्री- gt; शीर्षक "& Lt; / a & gt; & lt; / li & gt;"; गूंज "& lt; li & gt; $ एंट्री- & gt; सामग्री & lt; / li & gt;"; गूंज "& lt; / ul & gt;"; } यह $ entry- & gt; सामग्री को छोड़कर काम करता है वह भाग पंजीकृत नहीं है वास्तविक फ़ीड में टैग को & lt; सामग्री: एन्कोडेड & gt; के रूप में सूचीबद्ध किया गया है, लेकिन मुझे इसे फ़ीड करने के लिए नहीं मिल सकता है। कोई भी सुझाव? में & lt; सामग्री: एन्कोडेड & gt; , सामग्री है और एन्कोडेड टैग नाम है। आपको उपयोग करना होगा। var_dump ($ प्रविष्टि-> बच...

c# - Get the RadioButton Value on click using jquery and disabling, enabling text boxes accordingly, Asp.net mvc -

मेरे पास दो रेडियो बटन हैं इनपुट प्रकार = रेडियो नाम = "स्तर" मान = "पी" इनपुट प्रकार = रेडियो नाम = "स्तर" मान = "एस" मेरे पास दो टेक्स्ट बॉक्स हैं: इनपुट प्रकार = "टेक्स्ट" नाम = "इनप्यू 11 "अक्षम" = "अक्षम" इनपुट प्रकार = "टेक्स्ट" नाम = "inpu12" अक्षम = "अक्षम" मेरा प्रश्न है, मैं कैसे कर सकता हूं मुझे किस बटन का चयन किया गया है? मैं चयनित रेडियो आईडी कैसे प्राप्त करूं? मुझे पहले टेक्स्टबॉक्स सक्षम करने की आवश्यकता है यदि चयनित मान "पी" है और यदि 'एस' अक्षम है तो आपने 3 प्रश्न पूछे मैं पहले तीसरे सवाल का जवाब दूँगा। आप इसे जावास्क्रिप्ट / जेकॉओ के साथ काफी आसानी से कर सकते हैं। देखें। एस्पैक्स: & lt; फ़ॉर्म एक्शन = '/ मायकंट्रोलर / मायएक्शन' विधि = 'पोस्ट' & gt; & Lt; div & gt; & Lt; इनपुट प्रकार = 'रेडियो' नाम = 'चयन करेंरेडियो' मान = 'पी' / & gt; & Lt; input type =...

SQL Server performance deterioration -

I am currently working with the performance / memory consumption optimization of our applications. One of the executable tasks is to replace all the blobs in a table that corresponds to the zero values ​​for the empty array; This will reduce the DB size, memory consumption and speed up the load. The definition of the table is: Make Table [DBO]. [Sanpltebl] ([id] [Binint] not, tap [creation time] [day and time] NULL, [Bainreedeta] [image] with a tap (Piadi_aiandiaks = off, Stetsiks_anoarisiompiuti = off, Aijianoaraidiupi_kea = off, ALLOW_ROW_LOCKS = ON , ALLOW_PAGE_LOCKS =) [Avenue] [bit] nULL, [last savate Time] [Dettai] taps, Constrakt [PK-Simenttebl] primary cluster ([ID] ASC) [primary]) [primary] on I updated the table and the image field values ​​(bines Eedeta) updated with NULL values, where appropriate (data related to array empty app). Now, let me look at the performance poorly, when selecting * from the same selection. * Originally those fields were updated which wa...

Show an Anchor tag in an ASP.Net page with JQuery -

I have an asp.net page in which I have an HTML anchor tag and I see the visual property false. I want to make it visible with JQuery, but it can not seem to work. I have tried to select the selector for anchor tag, and a class selector, but there is no effect. Here's the markup for anchor tags: & lt; A runat = "server" class = "reg" visible = "false" id = "RegisterSoftwareTab" href = "../ RegisterSoftware ASPX" & gt; Register Software & lt; / A & gt; And here is the JQuery code: & lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('a'). Attr ("visible", "true"); $ ('a'). Show (); $ ('.reg'). Attr " Visible "," true "); $ ('.reg'). Show ();}); & Lt; / Script & gt; visible is not the right attribute to use ; It is not defined by the HTML standard; You can use the visible ...

c - How can I access an interrupt vector located at the machine's location 0? -

How can I access a barrier vector located at the machine location 0? If I set a pointer to 0, then the compiler can translate it into some noiorio internal null pointer value. You are right that depending on your implementation, the internal tap pointer can not be 0. But usually it is. If you want to be very safe, you can type the price or use memset () . uintptr_t zerobits = 0; Zero * Pointer 1 = (Zero *) zerobits; Or: Zero * Pointer 2; Memset (and pointer 2, 0, size pointer 2);

Ruby class question -

संभव डुप्लिकेट: मेरे पास एक त्वरित रूबी प्रश्न है मैं एक जावा / सी पृष्ठभूमि से आया हूं, इसलिए मैं रूबी "स्व" में समझता हूं जब एक उदाहरण पद्धति के अंदर संदर्भित किया जाता है जैसे "यह"। और "स्वयं।" विधि के लिए उपसर्ग इसे एक क्लास विधि के रूप में परिभाषित करता है। लेकिन इसका यहां क्या अर्थ है ?? class & lt; & lt; Self def some_method समाप्ति अंत यहाँ क्या हो रहा है कि हम एक ऑब्जेक्ट के वर्ग को फिर से खोल रहे हैं अपने भीतर से और उस पर एक नई उदाहरण विधि को परिभाषित करते हुए यह एक तरीका है जिसे आप रूबी में तथाकथित "बंदर-पैचिंग" कर सकते हैं। यह विधि केवल कक्षा के सभी ऑब्जेक्ट्स के बजाय मौजूदा ऑब्जेक्ट को ही जोड़ती है। यह ऐसा करने के बराबर है: my_obj = MyClass.new class & lt; & lt ; My_obj def some_method अंत # या ... def my_obj.some_method समाप्ति यहाँ एक अच्छा लेख है जो इसे कवर करता है:।

Prolog List Processing -

I would like to define a list (bank customer list) and process the list using some rules. For example, I have an explanation of this customer Customer (Peter, Bank (MacCon), Customist (Individual), Citizen (Malaysia), Age (62 ), Credit (50000), income (4500), property (car), bank employee (no)). Customer (Mary, Bank, Customstrip (VIP), Citizen (other), Age (45), Credit (20000), Income (5000), Property (home), Bank employee (Yes)). I want to add them to a list in the program inside the source code. Then, I would like to evaluate the list that the element in the list fulfills a particular rule Example: Whether the items accept the loan, even if the second item (customer) has less interest (name, Guarantor, Loan type, Loan amount, Loan set): - Customer (name, bank), Type of custom (_), Citizen (CI), Age (age), Credit (name, guarantee, loan type) C), Income I), Property (_), Bank Worker (_), CI == 'Malaysian, Age & gt; = 18, C & gt; 500, i & gt; (Loan amounts ...

sed + remove "#" and empty lines with one sed command -

How to remove lines (# hair bla) and empty lines (without line line) with a comment With command? THX Lydia If you are concerned about starting two In line, you probably should not be, it is not not disabled. However, if you want to do a single process, you can use multiple -e arguments, something like this: sed -e's /#.*$// '-e' / ^ $ / d 'input file why In response to your comment, you want to use a single process, sed -i for in-place editing, you can also do the following transcript: pax> 'Line # echo' with a comment & gt; Qq pax & gt; Echo & gt; & Gt; Cuk pax & gt; Repeat '# Line' with only one comment & gt; & Gt; Qq pax & gt; Cat qq line # with a comment #include only a comment pax & gt; Sed -i -e's /#.*$// '-e' / ^ $ / d 'qq pax & gt; Cat qq line pax & gt; _ Note that how the file has been changed to two, along with two -e options. You can see that t...

reference - How to "return an object" in C++? -

I know that title seems familiar because there are many similar questions, but I'm asking for a different aspect of the problem (I know the difference between things on the heap and putting them on a heap). In Java, I can always reference the reference to "local" objects calculating public talk () {thing thing = new thing}; // calculate and modify the thing to be brought back; } In C ++, I have 2 options for doing something (1) whenever I need to "back" something Even then, I can use references calculating zero thing (thing and thing) {// calculate and modify the thing} Then use it like this Talk; CalculateThing (thing); (2) Or else I can return a pointer on a dynamically allocated object thing * calculateThing () {Thing * thing New Thing ()); // calculate and modify the thing to be brought back; } Then use it like this thing * object = counting (); Delete thing; In order to use the first approach, I do not have to free the mem...

data modeling - How to design the relations between USER and FAVORITE(or LIKE) models in DB -

मेरे पास ये मॉडल (टेबल) हैं: USER , फोटो , पुस्तक , प्रश्न आदि। और अब मैं साइट पर पसंदीदा या जैसे सुविधा जोड़ना चाहता हूं, वह उपयोगकर्ता है कुछ फ़ोटो या पुस्तकों या प्रश्नों की तरह 'कर सकते हैं' और निश्चित रूप से एक तस्वीर कई उपयोगकर्ताओं द्वारा पसंद की जा सकती है। इसलिए मैं आपसे यह पूछना चाहता हूं कि इस तरह की चीज को कैसे कार्यान्वित करें। पुस्तकें, फोटो, क्विसिटन्स इत्यादि दिखाने के लिए एक पेज जो कि वर्तमान लॉगिन उपयोगकर्ता द्वारा पसंद किया गया है; ए तालिका: book_id user_id तालिका: photos_users photo_id user_id तालिका: प्रश्नवापकर्ता प्रश्न_आईडी उपयोगकर्ता_id बी तालिका: users_likes object_id user_id type कॉलम 'प्रकार' को 'पुस्तक', 'फ़ोटो' इन्फोस रखने के लिए सेट किया गया है। ए या बी ? क्या वास्तव में मुझे परेशान करता है ओओपी में है, हम उन वस्तुओं के बीच एक विरासत संबंध बनाने का प्रयास कर रहे हैं जो एक समान हैं। लेकिन संबंधपरक डेटाबेस में, चीजों को एक मेज (योजना बी) में रखना अच्छा लगता है, या उन्हे...

Functional Reactive F# - Storing States in Games -

I am currently learning about functional reactive patterns using F # This is a fundamental new approach to me. I have learned about creating a simple ping-pong game by using this paradigm. I still believe this idea: We believe in the form of time work. On its purest form, it is stateless, however, I have to remember the position of the ball (or state). That's why I always pass the current position of the ball as the parameter of the global function. If we talk about a bit more complicated games, like Space Invaders, we have many states (aliens, aliens' current hp, number of remaining bombs etc.) Is there any great / best way to deal with this problem? Do we always store the states at the top level? Should all existing states be given in addition to the global function in the form of input logic? Can someone use simple samples on F #? Thanks a lot. There are more than one way to FRP, and it is an active field of research. How much things work with each other, a lot ...

php - Create a string version of an array -

I do not know that with the title it tells very well, so I am trying to get it. With this script, people can change the value of the configuration variable that flies like this: Config :: write ('General.load', array '(' plugin1 ',' Plugin2 '), is true); In that example, it changes the General.load config variable in an array, and sets 3 to the right, which means that it can be saved. / P> The one I am trying to include is a way to save the part when a user makes a call, then Config :: save () is any of these configuration variables Is hidden by means which was written and the 3 parameters that were set to true were set to true. This works perfect for boolean, strings, inters, floats, etc. But when it comes to the array, by default, by default, this file contains the "array" array ('plugin1', 'plugin2') ". " So I started to develop a small script that converts the array into a string based array. Th...

algorithm - Array remove duplicate elements -

I have an unreserved array, if present, what is the best way to remove all duplicates of an element? Example: one [1,5,2,6,8,9,1,1,10,3,2,4,1,3,11 , 3] So the array should look after that operation one [1,5,2,6,8,9,10,3 , 4,11] Check each element against each other element The simple solution is to check each element against every other element. It is useless and produces o (n 2 ) solution, even if you only "Forward". Sort again delete the duplicate The best solution is to sort the array and then check each element next to it to find duplicates. Select an efficient type and it's O (n log n). There is no insecurity order with a sort-based solution. An additional step can take care of this. Place all entries (in unique sorted array) in the hashtable, which has O (1) access. Then iterate over the original array. For each element, check whether it is in the hash table. If so, add it to the result and remove it from the hash table. You will end wi...

Android: How to download a .png file using Async and set it to ImageView? -

Let me know one. The URL of the PNG image is found, which needs to be downloaded and set as the source of an image view. I am making a beginning so far, so there are some things that I do not understand: 1) Where should I store the file? 2) How do I set up ImageView in Java code? 3) How can correctly override asyncTask methods? Thank you in advance, would appreciate any help. I'm not sure that you can create a png from the explanation download However, here I download the images First time, you download the image: protected static byte [] imageByter (reference CTX, string Strurl) {try {url = url = new URL (urlContactIcon + strurl); InputStream = (InputStream) url.getContent (); Byte [] buffer = new byte [8192]; Int bytes read; Bytereon OutputStream Output = New Bytereanputstream (); While ((Bytes Reid = Reid (buffer))! = -1) {Output. Written (buffer, 0, bytes read); } Return output. To Batere (); } Catch (malmarmdureleuxation E) {e.printStackTrace (); Return tap; } Ho...

visual c++ - Run a process as a synchronous operation from a Win32 application -

I have an existing utility application, let's call it use.exe, it's a command line tool that inputs from the command line And creates a file on disk, let's say an image file I want to use it by using use.exe in another application. Although it should be synchronous so that the file is present when processing is turned on. For example (psudeo) bool CreateImageFile (params) {// ret is used. Exe program exit code int rate = runprocess ("util.exe", params); Returns == 0; } Is there a single Win32 API call that will run the process and wait until it is finished? I looked at CreateProcess, but as soon as it tries to start it comes back, I saw the shellexecute but it also looks a bit ugly was synchronous There is no single API, but this is actually a more interesting general question for Win32 apps. You can use CreateProcess or ShellExecuteEx and WaitForSingleObject to handle the process. GetExitCodeProcess will give you exit code of the program at t...

sql - Join performace -

मेरी स्थिति है: तालिका सदस्य आईडी पहला नाम अंतिम नाम कंपनी पता डेटा (5 फ़ील्ड) संपर्क डेटा (2 फ़ील्ड) आदि टेबल सदस्य_प्रोफाइल member_id html (& lt; h2 & gt; प्रथम नाम के अंतिम नाम & lt; / h2 & gt; & lt; h3 & gt; कंपनी & lt; / h3 & gt; & lt; span & gt; तिथि_ पंजीयन & lt; / span & gt;) Br /> date_activity chat_status तालिका समाचार आईडी member_id (member_profile में सदस्य_आईडी में फ़ंक) शीर्षक ... यह विचार यह है कि सदस्य डेटाबेस का पूरा प्रोफ़ाइल सदस्य डेटाबेस से प्राप्त किया जाता है, उदाहरण के लिए एक समाचार ओवरव्यू, छोटी तालिका, जिसके लिए आधार प्रदर्शन जानकारी रखती है एक सदस्य शामिल हो गया है। हालांकि, मुझे सदस्यों की जानकारी के लिए और अधिक बार उपयोग की आवश्यकता मिली है जो कि सदस्य_प्रोफाइल तालिका में संग्रहीत नहीं है, उदा। प्रथम नाम, अंतिम नाम और लिंग, जब किसी ने एक समाचार आइटम पोस्ट किया है (प्रथम नाम ने शीर्षक शीर्षक वाली समाचार पोस्ट किया है। क्या करना बेहतर होगा? सदस्य तालिका में सदस्य_प्रोफाइल ...

By design, why does the C# compiler allows any float or double values to be divided by zero? -

From design, why does the C # compiler allow a float or double value to divide by zero? Program of class {static zero main (string [] args) {double x = 0.0 / 0; Float y = 1f / 0; }} Because the IEEE 754 floating-point values ​​deal with special non-numeric values With it: PS Home: \ & gt; 1.0 / 0 Infinity PS Home: \ & gt; 0.0 / 0 NaN While dividing an integer from zero, there is always an exception ( 1 in C #), so you can throw directly the exception directly . There is also an exception to distributing Floating-Point numbers with zero, but at a completely different level and many programming languages ​​remove this sort of essence. Does.

msbuild projects build order -

I am creating a solution in Visual Studio 2005, it's working fine but when I made it with MSBield Lets do not get some files, start projects copied to bin folder. Please tell me how to solve this problem. You must add a reference to the required projects, but not copied VS contexts in the bin folder. If you are more generous then MSBuild is if you have 3 projects A, B and C, then reference B and B are reference C, then you should add references for both B and C in Project A.

Android: is it possible to configure ListView of ListActivity via xml -

The question in the real topic ... How to configure ListView of ListActivity via XML, for example padding, dividethheart etc. ... I have found an inappropriate solution for me, the only thing that I want is the ListView component To declare the list = "id =" @ android: id: list "in the root layout. After that I am uble to customize the ListView component which is the XML gateway for list activation Is used in the normal way.

drawing on iphone -

I am trying to develop an iPhone application for children who are able to touch the characters on the screen and I want to know how to match the character created with the good character of the alphabet. How do I compare two sizes (drawing and existing) any thoughts ?? Some code? You can create a list and it will calculate a metric between an input point "alphabet" You predefined it. The GL gestorer is an objective-implementation of a $ 1 unistocrat identifier, a simple gesture recognition algorithm (see credit below). It is available here as an iPhone application project. It was implemented by Adam Prabal during an afternoon afternoon in late April 2009. A demo iPhone project (gesture. Xcodeproj) has been provided; A UIView subclass receives touch events and sends them to the GLGestureRecognizer class, while drawing the hiding path in white, after the gesture is complete, the Risalpal gesture is shown in green, its center at the red dot, the best match With the...

delphi - Check if connection is Closed ! -

I wrote a Delphi (200 9) app with Indi (TCPser / Client) and I have a problem at TCPAser level : It detects the client's PC after reboot (only after rebooting the PC), when the client tries to reconnect to the server once I have executed my app step, and the client head Tries to reconnect (after reboot), pick up server Receives (one up, I think) exception: Connection reset by peer This exception is too late. (I do not think the Thread Lister is immediately released) What do you think? This is a low-level description of the TCP protocol. By default, it does not transmit consecutive packets, because this is the garbage bandwidth, so it will only be realized that the connection has decreased when something happens which indicates the connection to check. (I'm not sure why the connection is triggered by the same customer again.) You can send different packets to TCP regularly, who first search for disconnects. In windows, this server can be activated by the applicati...

static analysis - Measuring the complexity of SQL statements -

अधिकांश प्रोग्रामिंग भाषाओं में तरीकों की जटिलता को स्थिर स्रोत कोड विश्लेषक के साथ साइक्लाइमेटिक जटिलता में मापा जा सकता है। क्या एक एसक्यूएल क्वेरी की जटिलता को मापने के लिए समान मीट्रिक है? इसे वापस करने के लिए एक क्वेरी लेते समय को मापने के लिए काफी आसान है, लेकिन क्या होगा अगर मैं यह जानना चाहता हूं कि जटिल कैसे प्रश्न है? [संपादित करें / नोट] निष्पादन योजना प्राप्त करते समय उपयोगी होता है, जो इस मामले में पहचानने की कोशिश नहीं कर रहा है। मुझे पता नहीं है कि क्वेरी के निष्पादित करने के लिए सर्वर के लिए कितना मुश्किल है, मैं एक मीट्रिक की खोज कर रहा हूं जो बताता है कि डेवलपर के लिए क्वेरी लिखना कितना मुश्किल था, और यह दोष कैसे शामिल है। [संपादित करें / नोट 2] बेशक, ऐसे समय होते हैं जब जटिलता को मापना उपयोगी नहीं होता है, लेकिन ऐसा समय भी होता है जब यह होता है। उस विषय पर एक और चर्चा के लिए, देखें। सॉफ्टवेयर जटिलता के आम उपायों में शामिल हैं (कैसे का एक उपाय नियंत्रण प्रवाह जटिल है) और (जटिल गणित का एक उपाय है)। एक एसक्यूएल क्वेरी में "नियंत्रण प्रवाह" क्व...

c# - Image Browser (Open Dialog) using asp.net? -

Do I want to browse for an image? How can I browse for an image using asp.net, how did I get it? It sounds like 'file manager / folder explorer looking for a type if it is the case , So you have a lot of options: A great example of building your own with Matt Berceth - Download Open Source Control - There is a great (but not free) file explorer control for sale in Telekr - I'm afraid that Matt Berre Eth you provide will be the best option. It's easy to implement and gives you great control.

.net - ssh is insisting on reading the password from the console rather than stdin -

यह वही है जो मैं कर रहा हूं: ssh_ = नई प्रक्रिया (); Ssh_.StartInfo.FileName = SshProvider; Ssh_.StartInfo.Arguments = "-t -t" + पर्यावरण। उपयोगकर्ता नाम + "@" + सर्वरनाम_; Ssh_.StartInfo.UseShellExecute = false; Ssh_.StartInfo.RedirectStandardInput = सच; Ssh_.StartInfo.RedirectStandardOutput = सच; Ssh_.StartInfo.RedirectStandardError = true; Ssh_.StartInfo.CreateNoWindow = सच; ssh_.Start (); नया थ्रेड (नया थ्रेडस्टार्ट (रीडएस्टाओट))। प्रारंभ (); नया थ्रेड (नया थ्रेडस्टार्ट (रीडएस्टेएटर एआरआर))। प्रारंभ (); मैं stdout (या stderr) से पासवर्ड प्रॉम्प्ट पढ़ना चाहता हूं और पासवर्ड को stdin में लिखना चाहता हूं, लेकिन ssh कंसोल से लिख रहा है और पढ़ रहा है, जिस पर मैंने अपना मोनो ऐप लगाया था। मुझे समझ में नहीं आता कि ऐसा क्यों है, क्योंकि मैंने ऊपर दिए गए कोड में उन धाराओं को पुनः निर्देशित किया है। ssh Stdin से नहीं पढ़ता है यह विशेष रूप से लिपियों या अन्य कार्यक्रमों से पासवर्ड पास करने की कोशिश करने से लोगों को रोकने के लिए विशेष रूप से डिजाइन किए जाने वा...

sql - Are these two queries the same - GROUP BY vs. DISTINCT? -

These two questions return the same results. Is it a coincidence or is they really the same? 1. Select t.ItemNumber, (where the details of the selected Top 1 item from the transaction is ItemNumber = t.ItemNumber ORDER BY DateCreated DESC), as per T-Group by the details of the goods. Item Number 2. Choose DISTINCT (t.ItemNumber), (Choose Top 1 Item Dictionary from Transaction) as long as ItemNumber = t.ItemNumber ORDER dated DESC) A little detail: For each item I'm trying to get a separate list of items from a table filled with transactions, I have ItemNumber (identifying fields) and most recent I'm looking for item diction of itself. Your example # 2 had started scratched me for a while - I thought to myself : "You can not do a column , what does that mean?" - Until I did not realize what was happening. When you select the difference (t.ItemNumber) you not Despite the appearances, actually asking for different values ​​ of t.ItemNum...

Silverlight scaletransform adjust scrollbars -

I have the following UI element hierarchy: UserControl> ScrollViewer> Canvas I'm portraying a lot of things on the canvas and it The user becomes larger than the control on which the scrollwizard shows the scrollbar. So far, so good. Now I apply a scale transform form to the canvas (say, 2.0, make everything bigger twice) However, to not adjust my scrollbar, so I can now just scroll halfway through my big canvas I am How do I get to adjust my ScrollViewer scrollbar when I apply a skeleton to Canvas appearing within ScrollViewer? "post-text" itemprop = "text"> Your problem is that ScaleTransform is a RenderTransform and any LayoutTransform is not the size of ScrollViewer's size, even if it is the scale. I have used it in the past that there is a canvas walk in the canvas nest in another canvas. You can then display the actual dimension of the inner canvas to change the size of the outer canvas in the code. ScrollViewer will then upd...

inheritance - Disallow fields in descended class C++ -

With a friend, we recently followed the problem was a base class: class A {public: A:) foo (10) {} getFoo Virtual Inc () const {return foo; } Conserved: int foo; }; A friend has implemented one class from one class given above. class B: public A {public: uninterrupted process () {foo = 666; } Preserved: // int foo; }; Unfortunately, he added the field foo to the avatar class (comment line). Then the following code. #include & lt; Iostream & gt; Int main () {A * aaa = NULL; If (1) {B * BBB = new B; BBB- & gt; process (); Aaa = bbb; } Std :: cout & lt; & Lt; Aaa-> GetFoo () & lt; & Lt; Std :: endl; Return 0; } Print 10 . This is not a problem, because it will be completely changed, and nothing will happen in the future. I was just thinking, do you know any portable tricks or patterns of language ( besides clear gates / sets; btw, they were actually there, Foo TIA! / div> No - you are not concerned about the imp...

silverlight - MVVMLight Multiple Listbox Selection -

I have an item control for a country model - that looks like this. Country ID String name - List County There is a list box in the datatyme of items - which is bound to county property. So what I want, only one item can be selected in listboxes at any one time. For example: I have selected an item in the first list box and I click on one item in the second list box, there should not be any selected items in the first list box. Any ideas ?? Add a selected total asset to your country object. After that you can tie the selected item on your property to your ListBox . Then manually set the code to zero to all others in the code. Something like this country. OnPropertyChanged + = (s, e) = & gt; {If (e.PropertyName == "SelectedCounty") {foreach (MyCountries in country country) if (Country! = Sender) country. Selected county = null; }}

Running a Silverlight Application -

I have a Silverlight Application (3.0) that changed the visual studio and I can fix the application. What are the steps for getting applications to run through my question through IIS? For my app, the Visual Studio project folder is called Silverlight Applications and within that folder there is another folder called Silverlight Applications folder and Silverlight Applications. I believe that I copy C: \ Inetpub \ wwwroot from these. Any additional steps? Thank you very much The first step is to register the MIME type, if not registered If so already. The following link contains that information: The second step is to copy the clientaccesspolicy.xml into wwwroot, if you have any this file is only required for cross domain calls, which Your case does not look. You can then deploy the app just like any other ASP.NET app.

asp.net - What should I know before converting content pages to nested master-content pages in .net? -

I have a main master page, called masterpages, and some folders that are in the folder with some pages An original page on that master page - Masterpiegain Now, I have one of the folders, which follows a certain pattern and due to the need to make any changes on some parts, they can actually use the nested page. Replace the pages that are really a pain. I have already added the nested master page, Nested Masters page - a child of Masterpiegerman I tried to change a page & lt;% @ nested masterpages Page Directional, Immediate, There were many errors, besides, besides, I did not know where the contents of children of the nested masterpages would go. What should I know to do this successfully? Thank you! PS: I did not do this initially because I only had 2 pages, and I did not need that time because the project grew, now I think I should have changed it earlier. In addition, nested master page changes content pages to content pages, so you may have to Point to conte...

linq to sql - Can't load a DropDownList with values -

I am following the NerdDinner tutorial when creating my own application. Tutorials: Edit Public Functionality (Ent ID) {Dinner Dinner = Dinner Reptile. Gate dinner (ID); See data ["country"] = new selection list (Phone Validate. All countries, dinner parties); See refresh (dinner); } My code is like this: edit public functioning (int id) {area area = area area JefeRepository jefe = new JefeRepository (); SeeData ["Jefes"] = new selection list (jefe.FindAllJefes (), field. Jefe.Nombre); Return view (area); } FindAllJefes () returns an IQueryable collection just when I load the dropdown with two items in the app: SeguimientoDocente.Jefe and SeguimientoDocente.Jefe. It seems that this type is loading and does not want the actual value. Thanks for the help! Edit: I realized that this is not a bug, this code is doing what I am saying properly. What would be the most effective way to retrieve Jeff's name? Use another constructor for sele...

language agnostic - What free web design software would you recommend? -

After leaving the home site for code / programm HTML / CSS / Javascript / PHP etc, I have decided a hard time Can also offer people for recommendation! For larger projects and for individual files or ordinary front SVN / Git integration Both have syntax highlighting and inline API reference ("code autocompletion"), whereas Eclipse has more project-oriented tools: Change project-wide search + (regex supported) Tools (lets you define custom system commands so they are one click away A.) Showing outline panel, classes / methods / Nemspeses / Overview of uses file

php - Regex Unclosed Quote -

I am trying to find a way to read a CSV with the return in PHP. The problem occurs when you read the file like this: if (($ handle = fopen ($ file, "r")) == incorrect {while (($ data = Fgetcsv ($ handle, 1000, ",")) == incorrect) {line data ...}} If you have a retired CSV, then it does not work It just sees returns as a new line I thought there should be a regex to check without any quotation marks, but I do not know anything like that any thoughts? Since it seems that the built-in fgetcsv does not handle the CSV standard correctly, Suggestions for - Here's one of them: From The handling of PHP's CSV is non-standard and is contrasted with RFC4180, thus fgetcsv () handling properly With the file like this example ... There is a quick and dirty RFC analog sensation of CSV creation and parsing: D> & lt; Php function array_to_csvstring ($ item, $ CSV_SEPARATOR = ';', $ CSV_ENCLOSURE = '"', $ CSV_LINEBREAK =...

c - unistd.h and c99 on Linux -

यह सरल। सी फ़ाइल: #include & lt; unistd.h & gt; शून्य परीक्षण () {चार स्ट्रिंग [40]; gethostname (स्ट्रिंग, 40); } ... सामान्य रूप से संकलित होने पर, ठीक काम करता है: $ cc -Wall -c -o tmp.o tmp.c $ ... परन्तु C99 मोड में संकलित होने पर, एक चेतावनी दी जाती है: $ cc -Wall -std = c99 -c -o tmp.o tmp.c Tmp.c: फ़ंक्शन `टेस्ट ': tmp.c: 5: चेतावनी: फ़ंक्शन` gethostname' $ के परिणामस्वरूप घोषणा। परिणामी। ओ फ़ाइल ठीक है, और लिंक जोड़ना है मैं सिर्फ चेतावनी से छुटकारा चाहूंगा मैं इसे अपने ही .h फाइल में घोषणाओं के जरिए इसे प्राप्त कर सकता हूं। सीएम 99 के बारे में क्या है जिसका मतलब है कि unistd.h में घोषणाएं शामिल नहीं हुई हैं? सीएएम के निकोलस को छोड़ने के बाद क्या यह दूर किया जा सकता है? मुझे अन्य मानक लिब्स के लिए एक ही समस्या दिखाई देती है। gethostname () से आदमी gethostname : फ़ीचर टेस्ट मैक्रो के लिए आवश्यकताएँ glibc (देखें feature_test_macros (7)): gethostname (): _BSD_SOURCE || _XOPEN_SOURCE & gt; = 500 sethostname (): _BS...

Order of operations question in Ruby -

I am starting an example of a class that tests the similarities of two formulas. The calculation value of the formula is actually the same: RubyKeyem :: Chemical.N.NEW ("SOOS"). Fw = & gt; 96.0 RubyChem :: Chemical.new ("OSSO"). FW = 96.0 When I created a new square to test the similarities of these two instances, I was surprised at the results: x = RubyKeym :: BalanceCam.New ("SOOS", "OSSO") x.balanced = & gt; False y = RubyKeym :: BalanceCam.New ("SOOS", "SOOS") Y.balanced = & gt; True RubyKeym :: BalanceJam Initialisation method is here: Def start (Formula 1, Formula 2) @balanced = RubyChem :: Chemical.Nn ( Formula1) .fw == RubyKeyem :: Chemical.N.N (Formula2) .fw & Why not Ruby assumes FW for Formula 1 and Formula 2 and similarity of those values Checks? What is the order of operations in Ruby and what is Ruby doing? I can see that I lack the understanding of this issue. How can I ma...

Upgrading to Spring 3.0.3.RELEASE - Where can I find a history of the jars? -

I'm trying to upgrade an application that uses the latest version 2.5.6 (3.0.3 .RELEASE) version and I'm using Spring repositories to find the latest version of the jar which I want to do: I'm on version 2.0.8 for Spring-Fake. I have found the documentation that the spring-shock went into the spring test with 2.5.x but according to the repository spring-testing it is no longer present in 3.0.3. RELEASE. I am having trouble with what has happened with Vasant-Tx and Spring-WebMVC-Struts 2.5.6. Any of you know what happened to these jars (i.e., moved, demoted) and where can I get the documents? I have all the jars which mention the jar in a project at present. I've just used Maven, the easiest way to find Jar: & lt; Properties & gt; & Lt; Org.springframework.version & gt; 3.0.3.RELEASE & LT; /org.springframework.version> & Lt; / Properties & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.springframework &...

dependency injection - Using Autofac for DI into WCF service hosted in ASP.NET application -

I'm having trouble rendering service dependencies to my WCF service using Autofac 1.4.5. I have read and followed, but my debugging shows me that my WCF service is created by System.ServiceModel.Dispatcher.InstanceBehavior.GetInstance () method and not by AutofacWebServiceHostFactory . What am i doing wrong I have set the ajax.svc file to be used as an example to use with WebHttpBinding : & lt;% @ ServiceHost language = "c #" debug = "true" service = "generic.frontend.Web.Ajax, Generic.Frontend.Web" factory = "Autofac.Integration.Wcf .AutofacWebServiceHostFactory, Autofac.Integration.Wcf "%> My WCF service class Ajax is defined as: name space Generic.Frontend.Web {[ServiceContract ] [AspNetCompatibilityRequirements (RequirementsMod = ASPNnetSecurity Plan Mode.Allowed)] Public Square Ajax {Public MapWebService MapWebService {get; Set;} Public Ajax () {// This constructor is called PublicWorld (MapWebService mapWeb...

iphone - Convert NSDate to NSString -

मेरे पास निम्न है: NSDateFormatter * df = [[NSDateFormatter alloc] init] ; [Df setDateFormat: @ "yyyy-MM-dd'THH: मिमी: एसएसज़"]; NSDate * date = [df dateFromString: [sDate stringByReplacingOccurrencesOfString: @ "Z" के साथ स्ट्रिंग: @ "- 0000"]]; [डीएफ जारी]; मुझे आउटपुट स्ट्रिंग "9/20/10" होना चाहिए मैं यह कैसे कर सकता हूं? आप इसे ऐसा कर सकते हैं: NSDateFormatter * formatter = [[NSDateFormatter alloc] init]; [फॉर्मेटर सेटफार्मरी बीविवियर: एनएसडीएटफ़ॉर्मेटरविहार 10_4]; [फॉर्मेटर setDateStyle: NSDateFormatterShortStyle]; [फॉर्मेटर सेटटाइमस्टाइल: एनएसडीएटीफ़ॉर्ममोर नॉट स्टाइल]; NSString * परिणाम = [फॉर्मेटर स्ट्रिंगफ़ॉर्मडेट: [एनएसडीट की तारीख]]; यह इसे यूज़र सेटिंग्स में प्रदर्शित करेगा (लेकिन इसी तरह), इसलिए मेरे लिए परिणाम 7/28/10 होगा

file - Server not able to properly read/open a filename sent by client in C -

I am interacting with client / server in Seek. What I'm trying to do, the client request is to read the file on the server, the server returns a buffer of the file content, and the client prints the file. However I was able to send file buffer to client for the server & amp; To successfully print the client, I think the server can not get the file name sent successfully by the client. Here's what I mean: /// This is the composition of the message that sends the forward and forward text message {int code; // readfile or writefile indicates just 1 or 2 for the int size; Four buffer [256]; // This file will be named when the customer sends the readfile request}; Works: four * filename = "test.c"; Infile = Open (file name, O_RDONLY); // file and send everything back to the customer does not work: while (read (sockfd, & Amp; msg, sizeof (int) * 2)> 0) {if (msg.code == 1) {// a read operation FFFA file, filesystem, rr; Integer length; F...

Arbitrary command line arguments in python -

I want to allow arbitrarily command line arguments. If the user provides me with a command line that looks like this myscript.py --a valueofa --b mnphob posarg1 posarg2 I was passing valueofb with a manfafe , b and I have these last two positional logic Are there. I have always used the opt-in, for which you actually see the arguments. But I want the user to be able to define "macros" arbitrage from the command line. Definitely there is a Python module which is much more beautiful than anything written by it. What is it? Unfortunately, if you have to support it, you have to write your own option parse = (.

Jquery method runs but doesn't alter the case of the textbox text -

I have written a small jquery method that the text box content on a keypress event of a text box should be changed to upper case. The method shows fire and fast alerts, but the case of the text never changes in the upper case. Here is a jquery method $ ("# testtext"). Bind ('keyboard', function (e) {var mytext = $ ("# testtext"). Val (); $ (mytext) .text ($ (mytext) .text (). ToUpperCase ();; Alert (MyText ); $ ("#texttext"). Val () = $ (mytext);}); Can someone help me and tell me what is wrong ?? To reference an element that gets the event, you can type the this Use. What you were doing was taking the lesson, and it was $ () as you were selecting an element. Then you were using an inappropriate use of .val () = $ (mytext) . / Em> value. $ ("# testtext"). Set the value of the bind ('key', function (e) {// value mytext = $ (this) .val (); // input $ (this) .val (mytext.toUpperCase ()); }...

java - com.sun:tools:jar:1.4.2 missing when running "perform eclipse" in roo -

When I run "execution" in Rs, I get: Roo & gt; Scanning Eclipse [INFO] for projects ... [INFO] ----------------------------------- - ------------------------------------ [INFO] Building Bugzter [INFO] Work-Segment: [ Eclipse: clear, eclipse: eclipse] [INFO] --------------------------------------- - -------------------------------- [INFO] [Eclipse: clean {execution: default-CLI}] [INFO ] Removed file: .project [info] Removing file: .classpath [info] Removing file: .wtpmodules [info] Removing file: .component [info] Removing file : Org.eclipse.wst. Common.component [INFO] DELETE FILE: org.eclipse.wst.common.project.facet.core.xml [INFO] Removing file: org.eclipse.jdt.core.prefs [INFO] Removing File: org.eclipse.ajdt.ui.prefs [INFO] Preparation Eclipse: Eclipse [INFO] -------------------------- ------------------- --------------------------- [Error] Build Error [INFO] ----------------------------------------------- ------------------- ------- [INFO] Failed to solve ar...

android - Extract the color of a pixel of screen please -

मुझे स्क्रीन के एक पिक्सेल का रंग प्राप्त करना है क्षमा करें, आप ऐसा नहीं कर सकते। स्क्रीन अनुप्रयोगों द्वारा बिल्कुल भी पठनीय नहीं है।

Looping through files with perl -

OK I have 2 files, a file is a data that updates every 10 minutes while the other data is used first I went. What I am trying to do is take a line from the new file and loop through each line of the second file and see whether it matches one or not. If I do not want to use it, but if someone does not want to add to the string, then I want to add it to the string. I have done so far that it seems that there is no match at any time in the inquiry, even if there is one. Here is a sample of what I have and the data I am using with both files CHECKHAIL and USEDHAIL are two files while (my $ toBeChecked = & lt; CHECKHAIL & gt;) {My $ = 0 found; Try useless, 0, 0 or die "$ 0: Explore: $!"; While (my $ hailCheck = & lt; USEDHAIL & gt;) {if ($ toBeChecked == $ hailCheck) {$ found + = 1; }} Printed USEDHAIL $ toBeChecked; If ($ mil == 0) {$ toEmail = $ toBeChecked; }} Print $ toEmail; Return; } CHECKHAIL sample data 2226 175 2 NE Lawrence DEADWOOD SD 44.4-1...

.net - Property/Method Descriptions for COM Libraries -

If you create a COMClass, then I found that the value of the XML summary tag does not appear in the object VB6 / VBA When you reference the resulting TLB file. Is there any way to show these values? No, 12 years of IntelliSense development prevents this from working. XML documentation comments generate an .xml file that can raise IntelliSense in VB6 / A, with the helptype feature in the documentation type library. For example: [odl, uuid (2334D2B1-713E-11CF-8AE5-00AA00C00905), hidden, double, dislikes, oleotation] interface IVBDataObject: IDispatch {[id (0x00000001), HelpString ("Databases clears all the data and formats in the object."), HelpConnect (0x00033693) HRESULT Clear (); // e.t.c... }; It is necessary to get the same from your [Commv class] class library [description] attribute. Attention to make a bid about the way things work for the properties.

Delphi signature in exe files -

Text after "div class =" itemprop = "text"> type TDelphiSignature = record signature: array [0..3] LongWord's; Edition: string; End; Constant DelphiSignature: [0..2] TDelphiSignature = ((Signature: ($ 384F3D26, $ B83782C2, $ 034224F3, $ 833A9B17); Version: 'Delphi Entreprise'), (Signature: ($ 235D7823, $ 19F3A5B6, $ 0240 F343, $ C711D126); Version: 'Delphi Persian'), (Signature: ($ 98DF8CA2, $ 793A3C7B, $ 093F7126, $ 17252A0F; version: 'Delphi Pro') // ...); The above version signatures are found in the DVCLAL resource compiled in Delphi, the EXE files are compiled in other signatures such as people for architect versions , Looking for, and more importantly, for the version number (6, 7, 8 ...) that are visible in the resource data The signature generated by RAD Studio 2010 architect is similar to your enterprise. DVCLL resources will only give you Delphi / BCB. Tells the use of special edition. Personal Delphi / BCB compiler ...

Syntax error with template in c++ -

मेरे पास निम्न कोड है: #include & lt; iostream & gt; नेमस्पेस एसटीडी का उपयोग करना; टेम्पलेट & lt; कक्षा T & gt; टी अधिकतम (टी * डेटा, इंट लेन) {int i; टी मैक्स = डेटा [0]; (इंट आई = 1; आई & lt; len; i ++) के लिए (यदि (डेटा [i] & gt; अधिकतम) {अधिकतम = डेटा [i]; }} वापसी अधिकतम; } इंट माई () {इंट आई [] = {12,34,10,9,56,78,30}; इंट लेन = साइकोफ (आई) / आकार (आई [0]); अदालत के & lt; & lt; अधिकतम (i, लेन) के & lt; & lt; "\ n"; वापसी 0; } लेकिन जब मैं इसे संकलित करता हूं, तो मुझे निम्न त्रुटियां मिलती हैं: generic_max, कॉन्फ़िगरेशन: डीबग Win32 ------ 1 & gt; 7/2 9/2010 1:03:25 पूर्वाह्न 1 & gt; आरंभ करेंबिलीटेड स्थिरता: 1 & gt; "डीबग करें \ generic_max.unsuccessfulbuild" स्पर्श करना 1 & gt; क्लकंपाइल: 1 & gt; जेनरिक_मैक्स सीपीपी 1 & gt; c: \ users \ david \ documents \ विज़ुअल स्टूडियो 2010 \ प्रोजेक्ट्स \ generic_max \ generic_max \ generic_max.cpp (10): त्रुटि C2563: औपचारिक पैरामीटर सूची 1 में...

c# - Passing Func as an attribute parameter to secure MVC routes -

I am trying to protect my MVC routes from the set of users who get a set of criteria. Since the use of MVC features is doing a lot and Steven Sanderson has used one for security extension in his supportive MVC book, I have started moving towards this path, but on the basis of which I implement it But contextually I want to define the rule. Some actions are for employees only, nothing is there. Some actions are only for company 1, nothing is there. So I was thinking like this ... [DisableAccess (BlockUsersWhere = u = & gt; u.Company! = "Acme")] Public Action Proceedings AcmeOnlyAction () {...} [DisableAccess (BlockUsersWhere = U = & Gt; u.Isemployee == Wrong)] Public Initiative Employee Employee Recently Action () {...} Looks very clean for me and is really very easy to implement, but I get the compiler error: 'blockwise' is not a valid naming feature argument Nki It is a valid attribute parameter type is not apparently you can not use it a...

.net - How can I restrict the file type in the file browse menu of an AsyncFileUpload in the ASP.NET AJAX Control Toolkit -

I want to restrict what I see in the file upload dialog, which is set to "all files" by default I understand how they agree that they only uploaded a certain file type, which is not a question here. How would I just define the file type in the file selection dialog? Is there any way to convert it to "only PNG" or "* .png"? This is using asyncfileUpload in the ASP.NET AJAX Control Toolkit. The current version of AJAX control Toolkit does not have this option. But the good new one is that you can get it and add it.

css - XUL tabbox tab label height -

I've created a tabbox using the following code (a screenshot is attached). How do I set the tab size bigger so that the padding around the label is done? & lt; Tabboxes & gt; & Lt; Tab & gt; & Lt; Tab label = "a label" & gt; & Lt; / Tab & gt; & Lt; / Tab & gt; & Lt; Tabpanels & gt; & Lt; Button & gt; & Lt; / Tabpanels & gt; & Lt; / Tabbox & gt; I have tried the following CSS: tab, tab, tab box {height: 2em; Line-height: 20px; Padding: 10px; Margins: 10px; } Although nothing has changed, I have also tried to replace the label attribute with a label label element and a child's description element, though it also proves to be futile . Suggestions? Edit for search: unable to change styles in XUL elements on Mac OS X This is an OSX thing, which you can override something like this: & lt; Tabbox & gt; & Lt; Tab & gt; & Lt; Tab style = "- mosaise-p...

jQuery Slider - Update Span on Slide -

This is probably something simple to solve, however, I have some difficulties finding the right answer. Basically, I have a jQuery slider that I am using. Each time the slider is changed, I & lt; Select & gt; Based on changing box & lt; Span & gt; In order to see the code in action, please see As you will see, with each slide exactly & lt ; Select & gt; updates the box, but & lt; Span & gt; only updates once every time i & lt; Select & gt; I would like to update as , because eventually, I & lt; Select & gt; The box will hide, any help on this will be greatly appreciated. You are only bringing a time text here: Var hour_value = $ ("# hours: selected"). Text (); To set more text, use that variable: $ (".time_viewer"). Text (hour_view); Instead, you need to bring the option every time, because the change in options (and the original variable will not be updated), such as $ (...

image - Where do I put picture in my ASP.Net MVC2 application? -

मैं अपने हल के भीतर छवियों को कहाँ रखूं? मैं आम तौर पर छवियां फ़ोल्डर को अंदर सामग्री फ़ोल्डर बना देता हूं। सबसे तीसरी पार्टी के घटक जो। सीएसएस फ़ाइलों का उपयोग करते हैं छवियाँ डिफ़ॉल्ट रूप से उनकी छवियों के लिए उपनिर्देशिका।

python - A forgiving dictionary -

How do I create a forgiving dictionary (one that gives a default value if one KeyError is raised) I'll get a KeyError in the following code example; For example a = {'one': 1, 'two': 2} print [[three]] to get in order Not one would be me 1. The exception is to catch or use. I would not like to do this with my dictionary ... archive a = collections.defaultdict (lambda: 3) a.update ({'one': 1, 'two': 2}) print one ['three'] Emits as 3 as you are required you can also create subclass and override __ unavailable , but When this defaultdict behavior is being watched (ignoring the exact missing key), you are so well Suit ... Edit ... Unless , you are concerned about a every Once you have to look for an absentee key (which is part of the words of defaultdict ), and gradually get the behavior, but save some memory. For example, in the context of memory ...: & gt; & Gt; & Gt; Import systems and gt; ...