Posts

Showing posts from March, 2015

controller - RESTful Rails & encapsulating behaviour -

Background - I have a model, say a door, in which there is open or closed position. I explain the behavior of opening the door (and I also have a # level equivalent). But what is the best way to disclose it in a fast way? Things, Gordon Div class = "post-text" itemprop = "text"> Anyone Not the best way that everyone will agree. Some people will add two custom actions open and close for your controllers, which are related to the door model Will call the methods. Other people use the door to change the update controller method, which also uses to store their open / closed state such as a boolean field off . They can also argue that in addition to open and off methods with the off attribute, and whatever with the assumptions and callbacks Should be implemented open / shutdown is used to encapsulate. My recommendation is not to worry too much about unconsciousness and always chooses the most practical method.

xslt to add an attribute -

I have to add a namespace, and to add one attribute to some nodes. With this input: & lt; Root & gt; & Lt; Node1 & gt; Trial & lt; / Node1 & gt; & Lt; Dated / & gt; & Lt; / Root & gt; I want this output: & lt; My: root xmlns: my = "http://schemas.microsoft.com/office/infopath/ 2003 / myXSD / 2010-07-28T07: 33: 11" & gt; & Lt; Mary: node1 & gt; Trial & lt; / Mary: node1 & gt; & Lt; My: DateTo xsi: nil = "true" /> & Lt; / My: root & gt; The Detro Node requires this attribute set. I successfully added the namespace with this transform, but the attribute can not be added. & lt; Xsl: stylesheet xmlns: xsl = 'http: //www.w3.org/1999/XSL/Transform' version = '1.0' & gt; & Lt; Xsl: template match = '*' & gt; & Lt; Xsl: element name = 'my: {local name ()}' name space = 'http: //schemas.microsoft.com/office/infopath/2003/m...

c# 3.0 - Translate one language to another in c# using google translator api -

See my code (see below) is to translate from one language to another, but it -1 in response ( Which is the default). Must show something in the first half, which looks like: { "responseData": { "translated text": "¿Cómo estás?"}, "Feedback Description": null, "response status": 200} The second half format should be formatted and the items should be saved in a file. public string translate (string original Angtekst, string Stringtutronslet, string Selaynej string to language) {/ have the string is not empty or void if (! String.IsNullOrOmptE (stringToTranslate)) {// per Google's terms, we can only translate the string of 5000 characters If (stringToTranslate.Length & lt; = 5000) {Const int bufSizeMax = 65536; Const int bufSizeMin = 8192; Try {// default, format? Is there a text, so no format is required to send? Key string Anuroduarai = "Http://ajaxkgoogleapiskcom/ajax/services/language/translate?v=lk0&q=...

c# - How to throw HTTP errors? -

I am using a response. Redirect to redirect the user to a new page, but I want the page to be shown only when a specific parameter in the query string otherwise, I should be shown an HTTP 401 authentication error page. Can it be done? if so, how? If not, then why not? From your page, you have IHttpHandler for your authentication error page Will output the content and set the HTTP status code to 401. Public Zero Process Request (HttpContext Reference) {context.Response.ContentType = "text / plain"; Context.Response.Write ("Authentication Error"); Context.Response.StatusCode = 401; } Some of the links that can help you understand what an HTTP helper is and how you can implement one is the most important people:

jquery - JavaScript execution order - run this(), then that() when this() has finished? -

For example, I have to do something simple like jQuery: $ (" div ") fadein ('sharp'). $ ( "Div") HTML ('Foo'); He fades into the div, and while still setting his html in "foo" it still fades, FadeIn ('fast', function () {$ ("div"). Html ('foo');}); "Foo" will be set to html only after it vanishes in the divas. Does this type of thing work normally javascript? Some other var var = fooBar (); Will it start doing something else, while it is still doing something, or will it patiently wait for something to finish before doing something? Javascript in general does not works like this, you are seeing the result of jQuery animations and callback. If you run the current thread Everybody is kicking afterwards (animation is). Another function that you have (or a function) near callback , is done when it is done. Although outside of the interval and timer, your script will take place in o...

objective c - How to make a connect 4 iphone game? -

I want to take the next step and make games, I was 4/4 connected to 4 in a row. How would I go about this, I have made a pong game from a tutorial and now I want to make myself something. Anyone got any good advice or some sample codes or instructions? Thank you guys for all people David H Is heard? Its a framework for creating 2D games for the iPhone. The community is very useful, I think it can help you to 'take the next step' in your goal

Rails 3.0, want to match 'UK' == 'United Kingdom' in ActiveRecord model -

I have a problem, I have a country model where DB entry is: {: name = & gt; 'United Kingdom'} I have data UK instead of United Kingdom . In other models where I have searched for it: But I have to do all this and the application Just bad. So the question: How can I do a search in the country model, which only searches for. When it does a query, I do not want {: name = & gt; 'Uk'} . e.g. If I search for UK and should exclude the result {: name = & gt; 'United Kingdom'} not {: name = & gt; 'Uk'} . The solution is okay if I can just put a few stupid hacks: name = "United Kingdom" if searchstring == "UK you have your country The model can add a customer finder method: class country & lt; ActiveRecord :: base def self.by_name (name) name == 'UK'? Search_by_name ('United Kingdom'): find_by_name (name) end end then you country.by_name ('...') whenever you need ...

osx - How can I create Script file on Mac OS 10.4.8 to run example.exe file through mono? -

I can open a terminal and write mono example.exe, but I want to double click on any file, And run it to Example.exe.How can I do this? If you script file associations Ask and ask to open * .exe files using this mono and file name as argument. EDIT: I think what you have done and

Computing column access statistics in MySQL and / or Oracle -

We currently have your company's data model (database programs), which wildly and distributedly have increased over the past few years And now they are suffering from redundancy and lack of clarity. Developed by different teams for various databanks (Oracle and MySQL), are asked by different tools for different purposes (billing, reporting, business, etc.). different tools to get a clearer picture of the data dependency, ie which requires tool t pieces of accurate information, in a way that will identify them directly from SQL queries that implement each database . Alternatively, this databank will be more interesting to gather in these statistics. Such data will provide the How often table column TC can be accessed There are many T1 time table T2 joined together Anyone know how to do this with MySQL or Oracle or both? Oracle has a SYS.col_usage $ table statistics on how different where different columns referenced in section . Unfortunately, there is no record...

PHP - How to return the Server Validation Message back to Client side? -

The structure of the implementation of server-side verification can be adopted by the following two methods. Method One: The PHP script performs the same verification that provides the user with the input form. Say Form_client_server.php: Method One: PHP script verifies that provides with a user's input form. Say form_client.php (i.e. print the form for the user) and form_server.php (i.e., the action will be submitted by clicking on the user submit button). Here's the question: In both cases, how can a message return a message (for example, error message) on the page displaying the converted script page? If possible, I would like to see a tutorial / example / book chapter which gives some detailed information about this topic. Thank you You enter the output into HTML.

internationalization - HowTo: customize & internationalize error codes/messages in Symfony? -

Is there an easy way to modify / customize error messages generated by Symphony Mathematical? e.g. When using a string accredited, if the field is empty, then the "expected" message is displayed by default with the field. It definitely comes from your class, but is there a way to change the message for string validity globally, so that it applies to all instances? Thanks in advance. > PS: A solution that will require a change in the symphony base code I suppose it has been automatically translated for such messages. Just place a message in your translation file and the symphony will render based on the selected location

c# - Mocking Func property of a class -

One of my repository classes (called person Rippo) has a representative, as its property is something like this Private Readonly Func & lt; INameRepo & gt; _nameRepo; And apart from this it is inherited by a class which expects itself to be another object (the session says). Thus, when I put my intentions in my test such as something var funcNameRepo = automock.mock & lt; Funk & lt; INameRepo & gt; & Gt; (); _personRepo = new person repo (session, funka name ripper. Object); But when I run this test, I get the following error: Unable to remove type object 'System.Func1' [ Repositories.Interfaces. INameRepo] to type 'Moq.IMocked `1 [System.Func`1 [Repositories.Interfaces.IEMRepo]]'. Do you think I am doing wrong here, please help me? Why Func & lt; INameRepo & gt; Duplicate? If you want to duplicate INameRepo , then make a duplicate for INameRepo and pass it through your PersonRepo one lambda (which That...

HTML5 video tag on iPhone OS 3 is appearing outside a layer that has overflow: hidden; -

I have a HTML5 video tag in a layer that is 'overflow: hidden;' Set to it, but the video appears outside the overflow area, it is essentially an enemy control, so the layer will be locked in the video by default, and then when it is activated it opens with slightly slide below the animation Will go Unfortunately, because the video overflow is not respecting the property, the play button is always visible, and actually sits above other controls on the site. Does anyone know a way around this? I have tried adjusting the Z-index for the video tag, but without success Note: This is only an issue with iPhone OS (or iOS) 3 and below, as the new iOS 4 does not have this same problem. It is quite possible that it has not been implemented in the old version. Showing a few video results in additional processing (especially if the video decoding hardware is accelerated), if either does not work by putting a perfectly positioned element at the top of the video, then I would say ...

html - Why did they deprecate the width attribute for preformatted text? -

चौड़ाई विशेषता के लिए pre & gt; , जो अधिकतम वर्ण प्रति पंक्ति, को HTML 4.01 में पदावनत किया गया था, और अब मैं इसे HTML5 के वर्तमान मसौदे में नहीं देख रहा हूँ। मुझे इसके पीछे कारण W3C के WG के मेलिंग सूचियों में HTML के लिए कारण (शायद मैं गलत खोजा) का कारण नहीं मिला, हालांकि 4.01 के लिए चश्मा ने कहा कि यह सभी ग्राहकों में समर्थित नहीं था। एक संभव उत्तर: पूर्व स्वरूपित ग्रंथों को लपेटने में कोई मतलब नहीं है क्या यह सच है? अगर मैं अभी भी उदाहरण के 30 वर्णों के बाद इसे लपेटाना चाहता हूं स्क्रीप्टिंग के अलावा, मैं इसे कैसे प्राप्त करूं? कोई निर्णायक जवाब नहीं, लेकिन ऐसा लगता है जैसे कि इसे नापसंद किया गया था क्योंकि यह कभी भी सही ढंग से समर्थित नहीं था (और क्योंकि यह एक वर्तमान चिंता है, और इसलिए वास्तव में कुछ HTML नहीं होना चाहिए) .... इसका उल्लेख देखें, इसका उल्लेख है कि यह व्यापक रूप से नहीं है समर्थित है और इसका उपयोग "उपयुक्त फ़ॉन्ट आकार या इंडेंट को उचित रूप से" चुनने के लिए किया जाता है - जो "प्रति पंक्ति वर्णों की संख्या को परिभाषित करता है...

subprocess - python: simple approach to killing children or reporting their success? -

I In parallel to call shell commands (for example, 'sleep' below) Report on your personal start and finish and be able to kill them with 'kill-9 parent_process_pid'. There are already so many things written on this type of things but I think that I found a very beautiful Python solution which I am looking for. put subprocess.call in a wrapper function (unix_command ) Which reports the beginning and completion of the order. Call the wrapper function with multi-process. process. Track the appropriate piids, store them globally, and kill them in Signal_Handler. I was trying to avoid a solution that called processes from time to time but I'm not sure why. Is there a better way? Import subprocess, multi processing, signal import system, OS, time DEF signature handler (signal, frame): print 'you killed me!' For P in Pids: os.kill (p, 9) sys.exit (0) def sigint_handler (signal, frame): print 'you press Ctrl + C! Sys.exit (0) si...

c# - width of the dropdown arrow -

Then in the winforms, each dropdown combo box has this small arrow object on the right that tells the user that it is a dropdown Just like this: Now how can I find out the width in pixels? The reason for this is, I am using ControlDrawToBitmap, it does not properly draw text for the combo box, and I can undo the content again, I want to fix some arrows (which are properly prepared ) The first idea that comes to mind: Check to see if the width of the compose button is to increase the width of the scrollbar width. With Tracks. Use the GetSystemMetrics () API to get the width of different scrollbar pieces, which can be modified scrollbar width in user preferences. If you change the width of your system scrollbar and it does not affect the normal combo box size, then ignore it. The second idea: to use the reset formatting of the edit controls to see what the editing controls think about the display area (less combo box). However, it seems that this is the only solution to a...

version - Do Symbian OS v9 and Symbian^3 mean the same thing? -

I'm a bit confused about the notes. What does Symbian ^ 3 mean? Simultaneously, Symbian OS v9.y? How is Symbian related to? Symbian ^ x! = Symbian OS 9.y Symbian ^ x release Original Symbian OS 9.4 release Plus are built on the Nokia S60 layers. Since the base OS is evolving, however, it is not useful to think about it in the context of old 9 .x numbering - we have now moved ahead of them. However, what is the noticeable thing is that normal Symbian ^ x releases are backwards compatible with the Symbian OS 9.y release (although there are some brakes - see the release notes for details). Symbian ^ 1 Symbian OS 9.4 Plus is Nokia S60 5th Edition Layers Equal () Symbian ^ 2 Symbian ^ 1 Plus Some Very Small Features () Symbian ^ 3 is focusing on UI and architecture improvement ()

python - Having trouble with Tkinter transparency -

I'm having trouble fading a top-level widget in the checker. For some reason the widget is not faded, it will appear in the taskbar, but only after clicking on the button that runs this command twice (it should not be in the taskbar). Code responsible for these issues alpha = 0.0 w1.attributes ("- alpha", alpha) w1.wm_geometry ("+" + str (x) + "+" + Str (M) while 1.0 & gt; Alpha: alpha = alpha + 0.01 w1.attributes ("- alpha", alpha) sleep (0.005) This is Python 2.6 on Windows 7. The problem is that your code does not allow windows to underline itself again the sleep program Is prevented so that the event loop does not enter, and this is an event loop, so that the window can be drawn. Instead of sleeping, take advantage of the event loop and update the properties of each N millisecond unless you get the desired alpha transparency. Here's an example that works on Mac. I think it also works on windows too. Importe...

java - CDATA XML is truncated while parsing -

I use a suction parser (on android) to parse XML file from a webserver. CDATA is not shortened on some elements, e.g. Like the data in the XML-file & lt; Name & gt; & Lt ;! [CDATA [Gölser und Ginck GmbH]] & gt; & Lt; / Name & gt; SAXException {super.characters after parsing the xml file with and public zero characters (four [] ch, int start, int length) (Ch, start, length); String text = new string (ch, start, length); In this lesson, I only debug it with Eclipse and "Gulser and Jin" (the first 15 letters), and I think the "four [] f" logic of the whole string method I may have an error in your parsing. I have also had this problem This is that the character () method can be said multiple times on the same element. In your case, if you want to write it: public zero characters (four [] ch, int start, int length) SAXException {super.characters (ch, start, length); String text = new string (ch, start...

html - Strange problem while compiling CHM file -

I had to write some documents I wrote every page in MS Word and then save every * .docx as an HTM file. I am using "HTML Help Workshop" (from Microsoft) to compile a CM file. I can successfully create a CM file, but the problem is that not all images are displayed in the CM file. I tried decompressing the * .chm file to another folder and opened each .htm file in the web browser. All images are displayed correctly Then why not show them in the chm file. Strangely, some of them are not displayed. I checked that the image format is causing the problem, but all the images are of the same format. I checked that file naming is a problem, but all images have been named image [001-100] .jpg in their respective folders. Any thoughts about what is going wrong? HTML Help Workshop (HHW) has problems with HTML generated by Word (or better: Word has generated awesome HTML). Some versions have put VML coding around the IMG tags which can not handle HHW. Possible solutions: ...

Android installLocation does not work through market -

OK, I have updated my Android application with Android: installLocation = "Metapatin" in. If I install it on my N1 via USB cable, then it works and allows me to transfer the application to my SD card. However, I have a friend who has downloaded the application through the market, and the option becomes gray for it, though it is the same version of the APK. We uninstalled the market version and installed it via USB cable and had the option to move the app to the SD card. Any thoughts? Actually, after digging, I got this issue. I have the app "copy protected" which prevents it from moving to the SD card.

c - Can you capitalize a pasted token in a macro? -

In C macros, is it possible to capitalize a paste-in token? For example, I currently have the following macros: #define test (name, keyword) \ test_ ## name: test _ ## keyword ## _keyword I will do this as follows: exam (test1, test1) which will be as follows: test_test1: TEST_TEST1_KEYWORD Now, instead of typing the same name twice (with all lower case letters once and then with all upper case letters), there is no way That I do any of the following Is power, and either change the token in all uppercase letters or all lowercase letters? test (test1) or test (test1) thanks, Ryan Post-text "itemprop =" text "> As far as I know, it can be done on tokens only to make 'Sterefove' or copy in the only operation C preprocessor (at least ISO / ANSI standard). I am also unaware of any GCC or MSVC extension that will let you do what you want to do. However, people are coming up with magical (or awful) things in clever (or strange) macro...

java - Entity groups -

I am using a bit with Google App Engine and the defect of the outline of the transaction is missing. I'm implementing it as well as I can, but I'm killing the only exception: Can not work on multiple unit groups in a single transaction. Both the elements were found ... I have read the documentation (), but I can not find what they are saying. Actually what I am trying to do: I have a list of objects, I want to check if they are already in the database if they are, then I will check that If they are equal, if not, update the managed example. Otherwise I will continue the unit. In the loop of objects (objects have not been released yet), I use EntityMananger.find () to view the ID by ID, giving it an error around the second time. I used to work with a spring / hibernate (JPA) or EJB3 environment and I have never seen it before. Does anyone give me a simple explanation why I can not find the same type of organization in the same transaction? How to not search, but for ...

jQuery with css file -

Hello Can someone tell me the best way to use the drop down items in the combo box below to jquery code I can change it instead of the link shown here. Please open the css file 'business.css' and display in the text field thanks rifki a href = "css / business.css" class = "link" & gt; Business style & lt; Script & gt; $ (Function () ($ ('(link'). (Function () {$ .get (this.href, blank, function (css) {$ ('# css') .css (css); return False;});});}); If this was your HTML code ... & lt; Select ID = "stylesheet list" & gt; & lt; option value = "" & gt; please select & lt; / Option & gt; option value = "test.css"> test.css gt; & lt; option value = "other css file. Css" & gt; other css file.css & Lt; / option & gt; & lt; / select & gt; Textarea id = "stylesheet text"> You can then enter this with the event on ...

javascript - Detaching/appending select options with jquery -

I am trying to set up a form with several dropdown lists, allowing visitors to rank list items Will go. Sample Form: & lt; Form action = "" name = "ranks" & gt; & Lt; Select name = "rank1" id = "rank1" & gt; & Lt; Option value = "option1" & gt; Option 1 & lt; / Options & gt; & Lt; Option value = "option 2" & gt; Option 2 & lt; / Options & gt; & Lt; Option value = "option3" & gt; Option 3 & lt; / Options & gt; & Lt; Option value = "option4" & gt; Option 4 & lt; / Options & gt; & Lt; Option value = "option5" & gt; Option 5 & lt; / Options & gt; & Lt; / Select & gt; & Lt; Choose name = "rank 2" id = "rank 2" & gt; & Lt; Option value = "option1" & gt; Option 1 & lt; / Options & gt; & Lt; Option value = "option 2" & gt; Op...

sql server 2005 - How can I export data from my table to a sql file? -

I am using SQL Server 2005 and I export all records from my employee I want to have a .sql file but when I run the export data option, it only generates a script for the structure of the employee table, it does not record in it What I want to do is generate a script in which one The INSERT statement will be from the employee table Knowledge will include (like PHP Admin). What is possible in SQL Server 2005? Please help me how to do this .. Thank you .... There is no tool in SQL Server 2005 which will export your data as a SQL statement, which I think means ".sql file". The best way to export data using SQL Server tools is probably BCP, which can copy the bulk of data in a file. File contains only data, no SQL command, BCP command and bulk INSERT SQL command can be used to insert data into employee table. If you want to create your own SQL INSERTs, then you can create a statement like this: + cast (varchar as employee) + ',' '' + LastName...

ruby on rails - Facebooker with Authlogic is Not Redirecting to the Dashboard After Authorization -

एक चीज़ को छोड़कर Authlogic (authlogic_facebook_connect प्लगइन का उपयोग करके) के साथ Facebooker के कार्यान्वयन के साथ सब कुछ ठीक काम कर रहा है। आवेदन के प्रारंभिक प्राधिकरण के बाद (फेसबुक पॉप-अप पर ठीक क्लिक करके) मैं अब भी लॉगिन पृष्ठ पर रहता हूं। कोई पुनर्निर्देशन नहीं है हालांकि, एक बार जब मैं लॉगिन पृष्ठ को फिर से ताज़ा करता हूं और फिर फेसबुक बटन पर फिर से क्लिक करता हूं, तो कोई पॉपअप नहीं है क्योंकि यह पहले से ही फेसबुक द्वारा अधिकृत है, इसके बजाय यह / user_session (फेसबुक सत्र के माध्यम से प्रमाणीकरण के लिए) को पुनः निर्देशित करता है और तुरंत मुझे डैशबोर्ड पेज पर ले जाता है जैसा कि अपेक्षित है। अतिरिक्त जानकारी: किसी भी विचार क्यों यह फेसबुक पर अधिकृत होने के तुरंत बाद, पहली क्लिक पर रीडायरेक्ट नहीं करता है? प्राधिकृत यूआरएल http: /// user_session / के लिए सेट है और authlogic के लिए मार्ग ठीक से सेट हैं। मैंने प्रोटोटाइप और jQuery के साथ कोशिश की है, दोनों ही परिणाम देते हैं। आप इस ट्यूटोरियल वेबसाइट पर एक ही समस्या देख सकते हैं यदि आप फेसबुक के साथ प्रमाणित करने का...

.net - Creating Instances of IronPython Classes From C# -

I want to create an example of an IronPython class from C #, but failed in my current efforts. This is my current code: ConstructorInfo [] ci = type.GetConstructors (); Foreach (C from T, constructor Info T, where T. Gate parameter (.) Select length == 1) Python type pettype = dynamic hanger.gatepathon typeformat type (type); Object [] consparams = new object [1]; Consparams [0] = pipe; _biegex [type] = t. Invoke (Compass); Pytype .__ init __ (_ objects [type]); break; } I created the example of the object t. I'm able to call invoice (compromara), but the __ init __ method is not being asked, and so all the properties that are set up with my Python script do not use it . Even with the clear pytype.__init __ call, the construction object still does not seem to be initial. Using ScriptEngine.Operations.CreateInstance, I am using IronPython 2.6 with .NET 4.0 as .NET 4.0. Edit : Little explanation on how I intend to do this: In C #, I have a class: Public stati...

ruby on rails - Is it possible conditional sort in hash -

Is conditional conditional in hashes my hash such as {1 => "10", 2 => "20", 3 => "30", 4 => "40", 5 => "50", 6 => "60", 7 => "70", 8 => "80", 9 = > "80", 9 => "90", 1 => "10", 2 = "0"> Add condition to this code Previous> operation_hour_hash.sort {| Key, value | Key [1] & lt; = & Gt; Value [1]} Of course, you can do something like this: & gt; & Gt; {1 = & gt; "10", 2 = & gt; "20", 3 = & gt; "30", 4 = & gt; "40", 5 = & gt; "50", 6 = & gt; "60", 7 = & gt; "70", 8 = & gt; "80", 9 = & gt; "90"} {sort | P, N. (P [1] .to_i> = 70 & amp; amp; amp; amp; amp; amp; [1] .to_i = 70)? 1: p [1] .to_i & lt; = & Gt; N [1] .to_i} = & gt; [2, "20"], [3...

c# - Regex match take a very long time to execute -

I have written a regular expression that parses the file path in a different group (drive, dir, file, extension). ^ ((? > Drive> [A-ZA-ZED]): \\) * ((? & Lt; DIR & gt; [A-GA-Z0- 9 _] + (([A-zA-Z0-9_s_r_\\] * [one-zA-Z0-9_]) | ([one-zA-Z0-9 _]))) \\) * (. & Lt; file & gt; ([one-zA-Z0-9 _] (([a-zA-Z0-9_s _ \ - \.] * [One-zA-Z0-9 _] ) | ([A-zA-Z0-9_] +)). (? & Lt; EXTENSION & gt; [a-zA-Z0- 9] {1,6}) $)) I did an exam in C #. The path I want to test is correct. The result is very fast and this is what I wanted. string path = @ "C: \ documents and settings \ jr \ my document \ visual studio 2010 \ project \ file encryption \ dds .FileEncryptor \ Dds.FileEncryptor.csproj"; => OK But when I try to test with the path that I know does not match, then this way: path = @ "C: \ Documents and Settings \ jr \ My Documents \ Visual Studio 2010 \ Project \ File Encryption \ Dd .file Encryption \ Dd .file Encryption ?!";; =>...

using the & char in xml/xsl file -

मेरे एक्सएमएल फ़ाइल में & lt; tag & gt; मान & amp; value & lt; / टैग & gt; एक्सएसएल फ़ाइल शुरू करते समय त्रुटि होती है ... मैं भी & amp; amp और शीर्ष लेख & lt का उपयोग करता हूं ;? Xml संस्करण = "1.0" एन्कोडिंग = "आईएसओ -8859-1"? & Gt; लेकिन ठीक नहीं धन्यवाद! आपको XML और XSLT में और से & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; & lt; टैग & gt; मान & amp; ; मूल्य & lt; / टैग & gt;

Protect website against PHP Curl post method? -

OK, suppose we have a form that allows people to post their comments as you I know, "bad people" can easily spam me with the help of PHP curls. How can I protect my website with Captcha? Thank you. The easiest way to use some form of captcha protection (reCAPTCHA) or posting comments to users They log in before (this can not really stop spamming, but it makes it easy to take action against spammers by blocking their account). In addition to this you can take some simple preventive measures. Limit the number of comments that they can do within a set time frame - and will probably show only one captcha when they set the limits that they are human (like SO).

Repository info (SVN) integration with Excel -

I am new in things like Kenda is posting for programming for the first time, It was also necessary that he was successful in Google. thank you for your patience :). About my problem / goal: On our project, we have to take certain types of document management control. We have around 160 DOCX files (all files are already known), we will use SVN for version control. Those files will be saved in different folders (I will create the repository structure in the future), the folders will have one step work that we are currently in our project (we will have around 12 folders). When a step is done, then alias tag. Official release will be done. In each file, the MS Excel worksheet column will be in place such as: step, name, modification, tag, hyperlink .. What do I do: macro which will search the file on the repository, Got it, tag (latest) .. write it in excel sheet and make that file hyperlink in another column. Repository structure: Trunk System_Development System_Requireme...

sqlite: temporary table/view in a read-only db? -

It seems that sqlite will not allow me to create a temporary view in the read only DB. Am I forgetting something? If it is temporary, then I thought there should be no difference in the DB connection mode. I also specified "Pragam temp_store = MEMORY" - this does not help Is there any reasonable choice to use ideas? You can create a temporary view that references the data in the main DB. create the view id as temp.userview, choose the last name from the first name, main.usertbl; Then use such views ... SELECT * to temp.userview;

interop - Access to excel file in the server without installing excel -

I have created a library to get / receive data from / to Excel. In order to execute on my machine I modified access permissions in the COM + console. The thing is that my online server is interested in uploading this component, but I have installed Excel here Is there any way to register Excel without entering the SEC in Excel? Also the way? Thank you in advance. Best regards Jose Excel, because there will be nothing to register against, or it will be interop for that matter. Even if you use late binding in your code, so that it is compiled, you will experience sequence components if Excel components are not installed. " All existing versions of Microsoft Office were configured to run in the form of an end-user product design, trial, and client workstation, they consider an interactive desktop and user profile. Provide level Y or security is essential to meet the needs of server-side components, which are designed to run unreachable. "-

c# - Retrieve all keys in a hash table into a string -

Coding language is C # 3.0 - What is the most optimal method for recovering all the hashtable keys in a different string than the delimiter? Updates: The keys are already in the wire Regards, naveenj Do you really mean a non-generic Hashtable ? You can use LINQ, assuming that is available to you: string key = string .join (",", table.cause.lt; object & gt; (.) Select (x => x. Ostring ()) .oir ()); There may be fast approaches, but in this way I had to go for readability. Just microse-optimize when you have proved that this is an obstacle.

DsoFramer disables running Excel instances -

I am using the DsoFramer control to display excel documents within my application. Here's the problem: If I have been running as a standalone application before starting my application in Excel 2007, and then I launch and opens an Excel document within it, then the standalone Excel is not accessible (Which can not be alt + tabbed) My application excel document shows whether this can be avoided? Generally DSO framer connects your program to the ongoing excellence process, so you can access your COM interface If you have a review on the DSO Framer control source code, it seems that whenever it is in modal mode or the control can not do anything in the same way. Therefore, when your Excel object (through a DSO framer) is in a modal mode or so, other best examples running on your system can not do anything and they may be unavailable. In order to overcome this problem, try reducing the DSO Framer control mode mode (or the earlier mode you see on the DSO Framer source code) in ...

windows - .Net assembly issue -

मैं कंसोल अनुप्रयोग को विकसित करने के लिए Windows Server 2008 Enterprise + .NET 3.5+ VSTS 2008 + C # का उपयोग कर रहा हूं। मेरे डेवलपर डेस्कटॉप पर आवेदन ठीक चलता है I लेकिन जब मैं उसी मशीन को दूसरी मशीन पर चलाता हूं (विंडोज सर्वर 2008 एंटरप्राइज़ के रूप में भी, लेकिन कोई भी VSTS 2008 स्थापित नहीं है), तो असेंबली माइक्रोसॉफ्ट का कहना है। एक्सप्रेशन। एन्कोडर नहीं मिला है। सुरक्षा और नीति कारणों के लिए, मैं मशीन पर VSTS 2008 या SDK को डिबग करने के लिए उपकरण जैसे gacutil जैसे उपकरणों का उपयोग करने के लिए स्थापित नहीं कर सकता (ताकि यह पता लगा सके कि विधानसभा सही तरीके से स्थापित है या नहीं?)। मेरा सवाल यह है, माइक्रोसॉफ्ट को कहाँ होना चाहिए। एक्सपेरशन। एन्कोडर होना चाहिए? जीएसी में या कहीं और? मुझे यकीन नहीं है कि माइक्रोसॉफ्ट के लिए मेरा प्रोग्राम कैसे दिखता है। एक्सेशन। एन्कोडर। बीटीडब्लू: मेरा कंसोल एप्लीकेशन मजबूत नहीं है, और मुझे लगता है कि माइक्रोसॉफ्ट। एक्सप्रेशन। एन्कोडर को मजबूत हस्ताक्षर किया जाना चाहिए, सही है? यदि ऐसा है, तो माइक्रोसॉफ्ट को क्या चाहिए। एक्सपेरशन। एन्कोडर ...

JavaScript - Cancel Scroll event -

I want to disable scrolling in one of my pages. I do not want to write Scroll event in scroll (0,0) or scrollTo (0,0) which is a 'Bouncing' nature will cancel the event event.preventDefault () I have nothing like that? document.body.style.overflow = 'hidden';

c# - How to override Wsdl generation in Web Services .Net -

I would like to create a WebService that exposes many webmoles on the net Let me introduce a webserver version Requirements per new implementation (new property in webmooth or business object) such as: [webserver (namespace = "http://tempuri.org/")] [WebSiteBuzz (Confofo to = WSIIPROPLES BasicProfile1_1)] Public Service: System. Web. Services. Web service [Webmissions] [WebServiceVersion ("1.0")] Public string hello () {return "Hello world"; } [WebMethod] [WebServerSversion ("1.1")] Public String Newmapinists 1_1 () {Return "Hello World"; }} With UrlRewriting or HttpHandler: HelloWelld Webmoth only: HelloWald WebMath and NMathineWebs 1_1: How can I generate the WSDL dynamically for the specific version used by the customer? Resolution: Create a directory for each web service version : / 1 /; / 2 /; / 3 / ... Each version of the Web service comes from the previous version: / 2 / service: _1.Service; / 3 / serv...

asp.net - Removing default onclick or onItemClick color animation -

When I click on a button or I click on an element in the grid or list view, the default orange Color appears. I do not want the color when I click on it Please tell me how I can do it and whenever I click on the item in the button or grid or list view, then some other custom colors It is also possible to change the orange color by Here's an example of how to set it up:

javascript - Trigger a function only after the completion of multiple AJAX requests -

I have found a special function that I have to run once, and only after completing many AJAX requests. My current solution looks like this: function doWork () {// This is a task to run once after all requests} // Some tracking / Count variable var ajaxDoneCounter = 0; Var numOfAjaxRequests = 5; Var workDone = false; Function doWorkTrigger () {ajaxDoneCounter ++; If (! Done & amp; AJAX Door Quarter> = numOfAjaxRequests!) {WorkDone = true; do your work(); }} // .. // and many Ajax requests (something hidden in the function, etc.) / they look something like this: $ .ajax ({url: "http://www.example.com" , Data type: "Jason", success: function (data) {// variables in data to load, doWorkTrigger ();}}); One of the obvious drawbacks above is that any AJAX call that is not successful, AJAXDoneCount and therefore doWork () might not increase Never call me error any $ I can get around Ajax using callback, so I do not have much anxiety. What do I n...

scripting - downloading file using curl -

I have a very simple task: I need to download a file from a web page. In the browser, it is done by pressing the submit button. Just simple button, press it and you see a pop-up window where to save the file and similarly. I tried posting with curl: curl-d "foo = bar" and ..... "[url] but it returns the request page No file, and I am quite confused about the file, because I do not know that it is on the server and the only way to get it is to press this anger button. Please If you use OS system like Unix, you can use simple "HTT P "or some other software, eg TCPDump. If you are under MS Window, Fiddler 2 is a great tool. Previously, using such tools was Tracef Get accurate information about. Then analyze Http requests, especially monetary cookies header. Finally, request your own self through the curl. FU = Bar & amp; ..... Request. You can also look at the header of the request. Interpretation You can post your URL so that othe...

asp.net mvc 2 - events doesnt show start to end -

For some reasons I leave except for the first instance to start and end my events which shows during recurrence. Does anyone have any idea why this is? I have an example working which tells me what I'm talking about. How to make a 5-day time each day here. while (meeting & lt; = end) {var d = new date (); D.setDate (meeting.getDate () + 4); Events.push ({id: 2, title: "Monday meeting", start: new date (meeting.value ()), end, all day: wrong}); // Grow from a week's meeting .setDate (meeting.getDate () + 7); }

.net - How to filter on a constantly updated collection displayed in grid? -

Assume that I have a WPF application that shows "Questions", there are different statuses of questions, such as " Open ", and" answer "questions are stored in an inspection collection and appear on a DataGrid I have a toggle button Which has to switch between "open" and "answer" questions. When a user clicks on the "open" button, the grid should only show open question, and when a user clicks on the "Answered" button, then he should show only the answered question. These objects are constantly being updated Second thread (every second) Additionally, their status can be replaced by another thread, and the grid will need to be updated. What's a good way to filter this collection? Right now I am using ICollectionView and Calling Refresh () when any question situation changes, but due to refresh the "AddItem / EditItem" transaction I get errors. Thank you. I would recommend that you only lo...

Is it wise to defer unit-testing until integration tests pass in scenarios where behavior of a 3rd-party API is largely unknown? -

I do not mean suspend all unit-testing until the integration test is passed. Unit testing I am referring to the things that verify that the SUT contacts correctly with the third-party secret API. The reasoning for defining these unit tests is that they verify something that is unknown. If I do not know how the third party's secret API works, how can I also write a unit test to ensure that the SUT uses the third party API correctly? Only once a few minimum integration tests are passed, I really know what kind of behavior is to be verified. Of course, all other unit tests have been written in a normal way (red, green, refractor). Under the assumption that this is an external API, I argue that your test may be in this form Will not be a unit test anyway. They will be integration tests. To test your code about writing a fake and then when you can use 3rd party API, about writing proper integration test? In addition, if you are testing the entity's third party content...

Using Django Flatpages in production: how to archive changes for recovery purposes -

I am using Django Flatpages in a production site. The best way to ensure this is to make sure that an administrator makes a mistake in editing the file, then the old version of the page can be retrieved. We have backups and so on, but to recover it again A bit more complex (i.e. sysadmin is included, not website editor). First of all, is this a package? If not, I have come up with two options: Where all live changes are taking place then load it on the output Some external scripts that track the DB, and see the changes in the Flatpages content However, save a copy of the latest content in another table such as FlatpagesHistory. Then website editor can use only Admin service to recover old copies of pages from FlatpagesHistory Thanks. post-text" itemprop = "text"> try deJengo-reversion

Stop browser scripts caching in GWT App -

I have a GWT app deployed on our client's machines as well as ongoing development, Revised versions have to be released periodically. Every time we issue a new version, we often run into problems where the client's browser has cached the old script scripts and behaves this awkwardly for a while because the data is trying to work on it He is not quite compatible with him. What is the best way to overcome this problem? At present, I have to tell users to clear their browser's cache for a new release, but it would be good if they do not have to do this. By default, the bulk of your app should be cached by the browser unless its new version is Be Generated by Your Build Process The GWT can help to understand the bootstrapping model to understand how it works. Your client request is not cached, your-app-name .nocache.js , and it does nothing except the browser's user agent and capabilities, and related apps The second request for the JS At this point, the scr...

c# - GetOracleDecimal Memory Leak -

@ GilSlit posted T: "Well, we come to the disbelief (ODP (.net 2.0) for more than a year after fighting with a memory leak in GetOracleDecimal (in the code we supplied to a customer) ... Good luck! "- GilShalit August 27, 2009 12:44 am We are a service that asks the Oracle database every few minutes which is not being released Remember; After using some WinDbg check It turns out that this type is being stored in the queue in the final form: Oracle.DataAccess.Types.OpoDecCtx. This is the line I think is the problem: decimal volume = (decimal) OracleDecimal.SetPrecision (reader.GetOracleDecimal (5), 28); I commented on this and the memory leak disappeared. Any ideas will be appreciated - thanks! This is an old problem with ODP.NET (see here :). OracleDecimal type holds a reference OpoDecCtx implements OpoDecCtx for an example of an inner class IDisposable (because it is self-referencing unmanaged memory), but when it does not apply Oracl...

dll - C# Compiler says function is not defined, when it is -

I need another pair of eyes ... I do not think anything wrong with the following. In fact, I swear I was not something like that already, and it worked. In my collection. Dll: Namespace archive {public class CSuperAutoPool {public static CSuperAutoPoolActiveByType (type typeTransfer, Paramos object [] Active agglutination) {// ...}}} In the second DLL, I have referenced the archive DLL project, and use it in this function: Namespace organization {public class CBaseEntity: CSuperAutoPool {create protected static CBaseEntity () / ... CBaseEntity created = (CBaseEntity) CSuperAutoPool.ActivateByType (callingType); // Here error There is no definition for 'Type Activate' I have typed the activation type, inside CSuperAutoPool, in a different function, and there are no errors in it, the collection is not the same DLL compiled without errors In where the organization namespace exists, in other ways, other aspects of the CSAPperOptool class have been used, without compile...

Where are reference to DirectX assemblies in Visual Studio 2010 -

I have installed the new Visual Studio 2010. I want to create a C # Winform DirectX application, but I can not find the following assembly. When adding net reference list: Microsoft.DirectX Microsoft.DirectX.Direct3D Microsoft.DirectX.Direct3DX How do I use DirectX with Visual Studio 2010? DirectX is now obsolete, there are no DirectX assemblies. Use instead

c# - Cannot find System.Xaml? -

I have a VS2010 project which is the system. I search for reference, search for .NET references and not there. :? I also examined the GAC, and there was no such luck. I just can not understand why it is not on the machine for my life. This machine has .NET 3.5 SP1 and .NET 4.0 installed. I instead take a simple explanation for this problem and I do not want to resort to restoring the structure. T-T Any ideas? much appreciated. Your project may be target 3.5, in which it is not DLL. Set framework version in the project properties.

.net - Why can't you do multiple inheritance in c#? -

संभव डुप्लिकेट: क्यों नहीं सी # एकाधिक विरासत का समर्थन करता है? सार्वजनिक आंशिक कक्षा बच्चे: माता-पिता 1 {शून्य MakeParent1Mad (); } सार्वजनिक आंशिक कक्षा बाल: माता पिता 2 {शून्य मेकेंट 2 मैड (); } .NET था कई भाषाओं का समर्थन करने के लिए डिज़ाइन किया गया है, लेकिन सभी भाषाओं प्रभावी रूप से एकाधिक विरासत का समर्थन नहीं कर सकते हैं। या तकनीकी रूप से वे कर सकते हैं, लेकिन भाषा शब्दार्थियों में जोड़े जाने वाली जटिलताओं में से कुछ उन भाषाओं को अधिक कठिन बनाना होगा (और उनकी जड़ों की समान ही, जैसे वीबी, और पिछड़े संगतता के कारणों के लिए) और सक्षम होने के व्यापार के योग्य नहीं कई विरासत के तरीके में पुन: उपयोग कोड यह भी आज की तुलना में क्रॉस-लैंग्वेज लाइब्रेरी इंटरएपरेबिलिटी (सीएलएस अनुपालन के माध्यम से) एक वास्तविकता से कम है, जो कि .NET की सबसे आकर्षक सुविधाओं में से एक है। वर्तमान में 70 से अधिक कार्यान्वयन में 50 से अधिक भाषाओं का समर्थन किया गया है। भाषा दृश्यता जटिलता सबसे अधिक दिखाई देने वाली कारक है। सी ++ में हमें स्पष्ट भाषा विशेषताओं को जोड़ने की जरूरत थ...

mysql - How to determine connection state of Perl DBI database handler -

पर्ल डीबीआई डाटाबेस हेन्डलर (कनेक्शन opend) की कनेक्शन स्थिति निर्धारित करने के लिए कैसे? जैसे कुछ। NET SqlConnection.State == ओपन हो सकता है कि परिभाषित ($ dbh-> ("कुछ nop sql") करें) लेकिन ऐसा कुछ हो सकता है, जिसमें sql nop कथन नहीं मिल सकता है का उपयोग करें। आपसे यह पूछ सकते हैं कि डेटाबेस कॉल करने से जुड़ा हुआ है $ dbh- & gt; पिंग (); कुछ डीबी ड्राइवर पिंग को लागू नहीं करते हैं, लेकिन डीबीडी :: माइस्केल करता है वैकल्पिक रूप से, MySQL के लिए एक खाली चयन जैसे select 1 को चलाने के लिए है मैं MySQL मान रहा हूँ क्योंकि इससे आपके प्रश्न को टैग किया गया है। अन्य डेटाबेस में थोड़ा अलग जवाब होगा।

Python 2.5 Windows Binaries? -

I need to test a problem that comes with Python 2.5 on Windows, but linked to binary for 2.5 is not. Can I get a copy anywhere? It is still on their FTP server, this is the link that has gone: You would like an MSI files based on your Windows version (32-bit or 64-bit).

visual studio 2005 - VS2005 Options Generate Method Stub not working -

OK I had installed the linq preview (May 2006) and I think I have been screwed now VS One of the most important features in 2005 is no longer working (Option Generated Math Stub (Shift + Alt + F10)) I get this message every time I start a project ("This is an unsupported version of Microsoft Visual C # 3.0 / Microsoft Visual Basic 9.0. For this, many features can not work with hope. ) "I uninstalled it and this feature is still not working, but the error message is now gone. If you do not know what I'm talking about, if you write this simple code in the Visual Studio Code Editor: "string myString = GetString ();" Without the announcement of gatestring (), you will get a smart tag under GetString () and when you select it, you get a drop down that asks if you automatically generate this method stub. How to enable it again? Why do not you install this ancient version, but have you set up DotNet 2 properly? You may have to re-establish by hand.

apache - Display files from another directory with mod_rewrite -

I have transferred all the files from a project that is a single public directory Should be accessible from outside - so that those directories which are hidden instead of blacklisting, I can be accessible to them. However, I can not force Apache to rewrite such URLs: www.example Lt; Document root & gt; Strong strong> /images/flower.jpg only rational The solution came with some of those lines: Rewind Condens Public \ /% {REQUEST_FILENAME} -f # If a file exists in public DIR, then ... RewriteRule * Public / $ 0 [L] #display it It works surprisingly, I'm totally in disadvantage, do any help Can do? On the one hand, how do you debug .htaccess configuration? I can not fix this problem if I do not know what it is and where it is. If you want to test for an existing file with -f , You need to provide a full file system path like this: RewriteCond% {DOCUMENT_ROOT} / public% {REQUEST_URI} -f rewrite rules! ^ To access public / public% {RE...

iphone - How do you save CoreData with UIPickerView and then load CoreData with UITableView? -

I have a multiviz application using a tab bar to switch the view. One is a pickwickov, while the other two have a view with a table view and 4 text fields (and another table with instructions on how to use the app). I want to use the main data to save the selected rows in the Picker view and also save the wire entered in the text field view. The table view will clearly show all these saved results. So how do I add all of these together? Can I create an abstract class for core data methods (including fetchedResultsController), so each view controller can subclass and access the managed classes and methods? Or is there a better way to do this? What will I do & lt; UITabBarDelegate & gt; Since working as a center for data in the square tab, they are all working on the same data set. When a tab is selected, then it should keep NSMNeted Objects for display (in the case of the History tab, this will be the main array of objects ...) You need hand around repetition and core c...

java - Set ListView Adapter with composite PRIMARY KEY in SQLite table -

मैंने एक लिखित दृश्य में SQLite डेटाबेस तालिका से डेटा को एक SimpleCursorAdapter का उपयोग कर लिया है। यह तब अच्छी तरह से काम करता है जब मैं _id INTEGER प्राथमिक कुंजी एटॉइंकर्रम का उपयोग कर रहा हूँ जैसा कि मेरी टेबल की प्राथमिक कुंजी है हालांकि, मैं निम्नलिखित के रूप में एक समग्र प्राथमिक कुंजी का उपयोग करने की कोशिश कर रहा हूं: बनाओ टेबल तालिका (स्तंभ 1, स्तंभ 2, स्तंभ 3, प्राथमिक कुंजी (स्तंभ 1, स्तंभ 2)); मैं क्या इकट्ठा कर सकता हूं, SimpleCursorAdapter कन्स्ट्रक्टर को काम करने के लिए _id कॉलम की आवश्यकता होती है। मैं कम्प्यूटिट प्राथमिक कुंजी के साथ SimpleCursorAdapter बनाने का कोई तरीका नहीं ढूंढ सकता। बस अपनी कच्ची क्वेरी में उन्हें _ID चुनें column1 चुनें। '_' || तालिका 2 से _ID, स्तंभ 1, स्तंभ 2, स्तंभ 3 तालिका से

tsql - In SQL can a sequenced range selection be done more efficiently than my algorithm (see code) that uses a cursor? -

I have to collapse several categories of sequential numbers (1 or more) in sets of minimum and maximum values. I do not have a unique integer (a duplicate) in the table column. To solve this problem, clearly (me) is using a cursor (below) See my algorithm) and run it again through every integer. However, it seems to be incomplete for me, so I'm wondering if there is a more efficient algorithm perhaps a method of using normal table expression with recursive though I have more than 32767 integers, so any solution to the Options (MAXRECURSION 0) which sets unlimited recursions. A simplified test case for my existing algorithm is a cursor for each sequence of sequential numbers (such as 1-3, 9-11, 13-13, 15-16) To produce the minimum and maximum. I am using MS SQL Server 2008. Please leave a comment with two dashes (-). declared @minInt int, @maxInt int declare @nextInt int, @prevInt int declared a temporary table to store a range of @ RangeTable table (minInt int, m...

wpf - Populating ListBoxItem Background according to a Bool Member Object -

I have a boolean member class and I want to populate a Wpf ListBox with my class collection. If my Boolean property is false, then I want the background of catalogs in a different color. Is it possible with xml? What is the best way to do this? class MI {public bull mybool {get; Set;}} ... list & lt; MI & gt; Mycollection; // datacontax Here is a general general converter for booolans that allows you to type false for any kind of properties And specify some different values. Conversion (type of (bull), typef (object)) Public class boolean value conveyor: Ivail Convert {public object FalseValue {get; Set; } Public Object TrueValue {get; Set; } #region IValueConverter Member Convert Public Commodities (Object Value, Type TargetType, Object Parameter, CultureInfo Culture) {Return (bool) Value? this. Rabbit: this. Flowers; } Public Object Convertback (type object type, type target type, object parameter, cultureinfo culture) {return object.Equals (this.TrueValue, value...

android - How can I dismiss the dialog? -

अलर्टडायलोग। बिल्डर fpdialog = new AlertDialog.Builder (संदर्भ); सूची दृश्य fpathlist = नया सूची दृश्य (संदर्भ); ArrayAdapter & LT; स्ट्रिंग & gt; एडेप्टर = नया अर्रे एडाप्टर & lt; स्ट्रिंग & gt; (संदर्भ, android.R.layout.simple_expandable_list_item_1, fpathdata ()); OnItemClickListener श्रोता = नई OnItemClickListener () {सार्वजनिक void onItemClick (एडाप्टर दृश्य & lt;? & Gt; माता पिता, दृश्य देखें, अंतिम पूर्णांक स्थिति, लंबे arg3) {// TODO के लिए स्वत: उत्पन्न विधि ठूंठ (int i = 0; i & lt; = स्थिति; I ++) {यदि (मैं == स्थिति) {श्रेष्ाता [] पथ-स्ट्रिंग = {"在 地图 显示", "发 短信", "共享", "删除"}; अंतिम AlertDialog.Builder pathlist = नया AlertDialog.Builder (संदर्भ); pathlist.setTitle ( "路线 收藏"); Pathlist.setItems (पथ स्ट्रिंग, नया DialogInterface.OnClickListener () {सार्वजनिक शून्य पर क्लिक करें (DialogInterface संवाद, int जो) {// यहाँ मैं fpdialog खारिज करना चाहते हैं}}); pathlist.show (); }}}}; fpathlist.setOnI...

c# - XML Serialization of the default values of optional attributes -

I have classes using xsd.exe, and I'm trying to sort them. However, one attribute is not being included in the resulting XML, here's a part of the schema where the problem is. & lt; Xsd: element name = "widget" & gt; & Lt; XSD: complexType & gt; / * Sequence for brevity * / & lt; Xsd: use attribute name = "version" type = "version" = "optional" default = "1.1" /> & Lt; / XSD: complexType & gt; & Lt; / XSD: element & gt; & Lt; Xsd: Simple Type Name = "Version" & gt; & Lt; Xsd: ban base = "xsd: string" & gt; & Lt; Xsd: calculation value = "1.0" /> & Lt; Xsd: calculation value = "1.1" /> & Lt; / XSD: Ban & gt; & Lt; / XSD: simpleType & gt; XSD.XE has created a property called "version" on a "widget" class and has created another property named "Version Spissuit", but it do...

What happens when i throw an exception in c++ destructor? -

संभव डुप्लिकेट: सी ++ में हमें कभी नाशक में एक अपवाद नहीं फेंकना चाहिए क्या यह कोड काम करता है? struct a {~ a () {}}; Struct b: सार्वजनिक एक {~ बी () {1 फेंक; }; }; बूल c () {a * d = new b; {Delete d को आज़माएं; } पकड़ (int ई) {वापसी ई; } विवरण झूठा है; } क्या यह कोड उद्देश्य से काम करता है? क्या आप इसे स्वयं चलाने की कोशिश करते हैं? इसके बारे में भी देखें - इसके अनुसार, हां, यह आपके साधारण मामले में काम करेगा, लेकिन सामान्य तौर पर, आपको ऐसा नहीं करना चाहिए। फिर, यह इस बात पर निर्भर करता है कि आप "काम के उद्देश्य से" कैसे परिभाषित करते हैं - कार्यक्रम बिना किसी त्रुटि के चलेंगे, लेकिन आप संभवतः स्मृति को रिसाव करेंगे क्योंकि वस्तु मुक्त नहीं थी।

java - Parsing big XML files using SAX parser (skip some lines/tags) -

I am currently developing an app that receives data from the Internet using SAX. I used it to parse XML files like normal weather. However, I'm interested in parsing those websites to the next level. The page is too big and looks dirty. I need to retrieve some specific lines; The rest is not useful for me. Is it possible to leave those useless lines / tags or will I have to step by step? I like Commons-digester, this allows you to specify rules against special tags. The rule is executed only when the tag has to be faced. The digester is built on the sacox and therefore requires all the sax features and attributes that are necessary to choose specific tags. It also uses a stack that is pushed with new elements and when the related tag is encountered and pops when the elements end. I use it to parse all my configuration files on Digester

optimization - Creating temporary variables to enhance readability -

I would like to know if there is a significant loss to make a floating variable for a price, Example: filep-> Route [rp- & gt; Leg [j]]. ID or (* (filep- & gt; route + filep-> nroutes - 1)) - & gt; Numbers are a recent example of the project where I was able to improve my skills with Sea Points (it was painful) to avoid virtually any simplification for variable references. Done Although the habit seemed to stick, I feel as much as I try to implement the variable to simplify my code (readability and typing volume), it becomes more confusing, it remembers every new variable references To be cured. I have just reviewed my code in an educational setting, and I would like to know what else is easy to digest and where the business of display is (if any). When a value is specified that many arithmetic functions are needed to calculate memory address, due to the performance reasons, its own variable is beginning? Does this make a difference, which is done o...