Friday, 15 August 2014

xsd - Add an XML schema to Visual Studio -


I want to support Intellisense while writing the XML configuration file for the APPink section or NIBNET component Log4net, or Unity

(Suppose we have a schema file.)

Yes, it is possible that you need to associate the schema with the document and the XML editor will then provide intellisense.


  • .net - Mocking a Static Class -


    I have a static class that wraps some of the basic methods by winspool:

      Public static class WinSpool {[DllImport ("winspool.drv")] Public static extern int OpenPrinter (string pPrinterName, Outside IntPtr phPrinter, IntPtr pDefault); ... // some other methods here}  

    I want to duplicate them for unit testing, but could not find a pattern for it. (Do all have to save static classes?)

    Yes, stable class usually happens at AAAIK Open Source Mocking framework (like) supports stable class jokes

    If you want to duplicate the static class absolutely and positively, then I am afraid you should go, which is not free is.


    The server could not load DCOM error -


    मेरे पास एक स्थानीय SQL 2000 डेटाबेस है मेरा विनफ़ॉर्म ऐप अचानक मृत्यु हो गई जब सभी एक संग्रहीत प्रक्रिया की कोशिश कर रही थी जो कि परिवर्तित नहीं हुई है। यहां पर तेज़ त्रुटि संदेश है:

    सर्वर: संदेश 7404, स्तर 16, राज्य 2, प्रक्रिया रिकॉर्डअनुक्रम 2, पंक्ति 45 सर्वर DCOM लोड नहीं कर सका।

    तब मैंने देखा कि जब मैं कोशिश करता हूं क्वेरी एनालाइज़र का उपयोग कर सपा को बदलने के लिए, मुझे एक ही त्रुटि मिलती है जब मैंने ALTER आज्ञा को निष्पादित करने की कोशिश की। मैं संग्रहीत प्रक्रिया कांट छांट, कोर कोड कि त्रुटि जब निष्पादित का कारण बनता है छोड़ने:

      GO सेट पर सेट QUOTED_IDENTIFIER पर GO ALTER प्रक्रिया dbo.RecordCurrentUser2 ANSI_NULLS (@xmlUser varchar (8000)) के रूप में शुरू घोषित @Now datetime घोषणा @ChangedRecordCount पूर्णांक --Normally इस पर टिप्पणी की है, लेकिन परीक्षण के लिए, हम कड़ी मेहनत का कोई पैरामीटर मान कोड होगी: सेट @xmlUser = '& lt; उपयोगकर्ता & gt; & LT; उपयोगकर्ता & gt; & LT; EmailId & gt; chad.smith@effedupcompany.com< / EmailId & gt; & LT; अंतिम नाम & gt; चाड & lt; / अंतिम नाम & gt; & LT; FirstName & gt; स्मिथ & lt; / प्रथम नाम & gt; & Lt; आरंभिक / & gt; के & lt DOMAINNAME के ​​& gt; एनए & lt; / DomainName & gt; & LT; खाता & gt; स्मिथ & lt; / खाता & gt; & LT; TelephoneNumber & gt; 179-1458 & lt; / TelephoneNumber & gt; & LT; PeoplesoftId & gt; 031X45 & lt; / PeoplesoftId & gt; & Lt; विभाग & gt; इकट्ठा करने के लिए द्विपक्षीय रिपोर्टिंग & lt; / Department & gt; & Lt; StreetAddress & gt; 58 हिल रोड & lt; / StreetAddress & gt; & LT; PostalCode & gt; 06333 & lt; / PostalCode & gt; & LT; स्थान & gt; मुख्य & lt; / स्थान & gt; & LT; राज्य & gt; एके & lt; / राज्य & gt; & Lt; देश & gt; संयुक्त राज्य अमेरिका & lt; / देश & gt; & Lt; / उपयोगकर्ता & gt; & Lt; / उपयोगकर्ता & gt; ' DECLARE @DocHandle int SET @NOW = GETUTCDATE () - XML ​​दस्तावेज़ का एक आंतरिक प्रतिनिधित्व बनाएँ। EXEC @DocHandle आउटपुट, @xmlUser --Put एक अस्थायी तालिका में एक्सएमएल स्ट्रिंग की सामग्री चुनने EmailId, अंतिम नाम, प्रथम नाम, प्रथमाक्षर के रूप में प्रथमाक्षर, DomainName, खाता, TelephoneNumber, PeoplesoftId, विभाग, StreetAddress, PostalCode, स्थान, राज्य sp_xml_preparedocument, देश, OPENXML से #TempItems जांच OtherTelephone, NonUnisysDomainName, NonUnisysAccount (@DocHandle, '/ प्रयोक्ता / उपयोगकर्ता', 2) के साथ (EmailId nvarchar (80), अंतिम नाम nvarchar (50), प्रथम nvarchar (50), प्रथमाक्षर nvarchar (30) , डोमेन नाम नर्वचर (10), खाता nvarchar (10), TelephoneNumber nvarchar (50), PeoplesoftId nvarchar (50), विभाग nvarchar (50), StreetAddress nvarchar (50), PostalCode nvarchar (50), स्थान nvarchar (80), राज्य चार (2), देश nvarchar (30), OtherTelephone nvarchar (50), NonUnisysDomainName nvarchar (10), NonUnisysAccount nvarchar (10)) अंत  

    निम्न सेवा, मेरी मशीन में चल रहे हैं, हालांकि वे प्रासंगिक नहीं हो सकता है: वितरित लेनदेन समन्वयक (एक स्थानीय डीबी नोट-चल रहा है) COM ++

    मैं हाल ही में कुछ भी जानबूझकर स्थापित नहीं किया था, हालांकि मुझे याद है कि एमएस पैच को देखने से कंपनी नीति द्वारा स्वचालित रूप से लागू किया जाता है, निश्चित नहीं कि यह कैसा था या कैसे पता करें।

    मैं इस त्रुटि को कैसे सुलझा सकता हूं?

    मेमोरी लीक को रोकने के लिए आपका कॉल कहां है?

    एक पर्सेड दस्तावेज़ SQL सर्वर के आंतरिक कैश में संग्रहीत है MSXML पार्सर (Msxmlsql.dll) एक आठवें SQL सर्वर के लिए उपलब्ध कुल स्मृति का उपयोग करता है।

    संपादित करें: SQL Server 2000 से 2008 तक कम से कम


    regex - Javascript - replacing a word using regexp only if there's a space around it -


    A small version of my code type looks like this:

      string = "test test Test Test Test Test "; Replacer = "test"; String = string.releast (new regxp ('+ +', 'gi'), "replaced");  

    Now, I want to change one word only when it is around, this code really works well, but I am thinking that in my case a bottom RegExp ('\ s' + replacer + '\ s', 'gi')

    Why do not you run it:

      RegExp ('\\ s' + replacer + '\\ s', 'gi')  

    opengl - Simulated time in a game loop using c++ -


    I am making a 3D game as a hobby of OpenLL and SDL from scratch in the CD and about this area To learn more about programming.

    Thinking about the best way to simulate time while running the game. Obviously I have a loop that looks like this:

      void main_loop () {while (! Quit) {handle_events (); DrawScene (); ... SDL_Delay (time_left ()); }}  

    I am using SDL Della and Time_th () to maintain the framerate of approximately 33 FPS.

    I thought I needed some global variables

      int current_hour = 0; Int current_min = 0; Int num_days = 0; Uint32 prev_ticks = 0;  

    Then like a function:

      zero handle_time () {Uint32 current_ticks; Uint32 dticks; Current_ticks = SDL_GetTicks (); Dticks = current_ticks - prev_ticks; // Get the difference from the last time // If the difference is more than 30000 (half minute) the pay scale game is minutes (dticks> = 30000) {prev_ticks = current_ticks; Current_mins ++; If (current_mins = 60) {current_mins = 0; Current_hour ++; } If (current_hour> 23) {current_hour = 0; NUM_DAYS ++; }}}  

    and then call the handle_time () function in the main loop.

    It compiles and runs (moment to write time in the console using printf) but I am thinking that this is the best way to do this. What are the easy ways or more efficient ways?

    I mentioned this before in other game related threads, like always, with the suggestions of Glenn Fidelell Follow

    What you want to do is use continuous timestep which you get by depositing the delta of time. If you want 33 updates per second 33, then your constant timestep should be 1/33. You can also call it update frequency by presenting you should reduce the game logic as they are not together. You want the machine to be able to use the short updates frequency as fast as possible while rendering. Here are some sample codes:

      running = true; Unsigned int t_accum = 0, lt = 0, ct = 0; While (running) {while (SDL_PollEvent (and event)) {switch (event.type) {...}} ct = SDL_GetTicks (); T_accum + = ct - lt; Lieutenant = CT; While (t_accum> = timestep) {t + = timestep; / * This is our real time, in millisecond * / T_accum - = timestep; (Std :: vector & gt; unit & gt; :: for iterator en = entities.begin (); en! = Entities.end (); ++ en) {integrated (n, (float) t * 0.001f, Timestep); }} / * This should actually be in a separate thread, a mute x * / std :: vector & lt; Unit & gt; TmpEntities (entities.size ()); For (int i = 0; i & lt; entities.size (+) i) {float alpha = (float) t_accum / (float) timestep; TMPNTI [I] = InterpolateState (Institutions [I] .ST, Alpha, Institutions [IRA] .CRRT, 1.0F - alpha); } Render (tmpEntities); }  

    This controls undersmappeling as well as overspelling. If you use integer arithmetic here, then your game physics must be close to 100% deterministic, even if the machine is slow or Be sharp This is the benefit of increasing time in fixed time intervals. The state used for rendering is making a distinction between previous and present states, where the remaining value of time is used in the accumulation process as the interpolation factor. This ensures that rendering is smooth, no matter how big the timestamp is.


    animation - constraining drag move along a path in iphone -


    I am making an app in which the balls are rolled onto the tracks.
    When we touch and drag the balls around the screen, they should proceed with the tracks if the drag is too far from the track, then it should be closed. Tracks can be any size what is the best appraoch ..?

    It depends on how the track is defined in the program, but it is a CGPath Found that can show it, or create one, the experiment can use CGPathContainsPoint in the touch method and if it is outside the path, then refuse to update the position of the ball.


    user interface - Porting X/Motif GUI application to Windows using wxWidgets -


    Is an Expert built on X / ATP GUI on the Solaris platform possibly possible to use Windows WX-Weddets? If so, is it easier to port wxWidgets than other GUI builders like QT or Visual Studio?

    It is definitely possible to port WxWidgets to a shape application, but you can retain too many code Will not be able to keep In other words, this would be a non-trivial undertaking - but it would be true whether you use wx, Qt or some other (but using a portable framework looks like a better idea if you have unix background but its Required to work under Windows)


    html - Javascript rowIndex method is not working -


    I am using line index property of TR but it is not working. Please tell me that I am doing something wrong here.

      function myMethod () {warning (this.parent.rowIndex); // parentNode is also used}  

    HTML

      & lt; Table range = "1" & gt; & Lt; TR & gt; & Lt; Td onclick = "myMethod ();" & Gt; 1.1 & lt; / Td> & Lt; TD & gt; 1.2 & lt; / TD & gt; & Lt; TD & gt; 1.3 & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td onclick = "myMethod ();" & Gt; 2.1 & lt; / Td> & Lt; TD & gt; 2.2 & lt; / TD & gt; & Lt; TD & gt; 2.3 & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td onclick = "myMethod ();" & Gt; 3.1 & lt; / Td> & Lt; TD & gt; 3.2 & lt; / TD & gt; & Lt; TD & gt; 3.3 & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td onclick = "myMethod ();" & Gt; 4.1 & lt; / Td> & Lt; TD & gt; 4.2 & lt; / TD & gt; & Lt; TD & gt; 4.3 & lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt;  

    This "window" in "parent.rowIndex" does not try the TD element

      & lt; Td onclick = "myMethod (this);" & Gt; 1.1 & lt; / Td> Function Mymouth (OBJ) {Warning (obj.parentNode.rowIndex);}  

    java - Why does my thread stop when I try to access a synchronized list? -


    किसी कारण से, इसका उत्पादन:

      सार्वजनिक शून्य msgNeedParts () {/ / Blabla ... System.out.println (नाम + ": 'कार्यों को प्रिंट करने का प्रयास करें ...'); सिंक्रनाइज़ (कार्य) {System.out.println (नाम + ": कार्य -" + कार्य); System.out.println (नाम + ": क्या मैंने इसे प्रिंट करने का प्रबंधन किया?"); Tasks.add (नया BinToDump (फीडर, बिननम)); } राज्य बदले गए (); }  

    बस "गैन्ट्री एजंट प्रिंट करता है: कार्य को प्रिंट करने का प्रयास करें ..." लेकिन निम्न संदेशों में से कोई भी नहीं। सिंक्रनाइज़ किए गए सूची 'कार्यों' तक पहुंचने की कोशिश करते समय मैं धागा अनुमान लगाता हूं, किसी तरह 'फंस जाता है', लेकिन मुझे नहीं पता कि यह क्यों हो रहा है।

    'कार्य' की घोषणा की गई थी और इस तरह शुरू किया गया था:

    <पूर्व> निजी सूची & lt; BinToDump & gt; कार्यों = संग्रह। सिंक्रनाइज़ किए गए सूची (नया अर्रेलिस्ट & lt; BinToDump & gt; ());

    क्या कोई मुझे बताता है कि मुझे क्या याद आ रहा है?

    आह! मुझे संदेह है कि मेरे पास एक अपराधी हो सकता है:

      / * यदि कुछ नहीं छोड़ा गया है, तो मूल स्थिति पर लौटें। * / सिंक्रनाइज़ (कार्य) {यदि (tasks.isEmpty ()) {doReturnToOriginalPos (); }}  

    मेरे अनुसूचक में (यह एक एजेंट डिजाइन है), मैं यह देखने के लिए जांचता हूं कि 'कार्य' खाली है, फिर मैं doReturnToOriginalPos () को कॉल करता हूं। हो सकता है कि यह अभी और इतनी तेज़ी से हो रहा है कि अन्य विधियों को इसे संशोधित करने का मौका नहीं मिलता?

    यही वास्तव में समस्या थी! यह मेरे अनुसूचक में इतनी तेज़ी से बुला रहा था कि कुछ भी 'कार्य' का उपयोग नहीं कर सके मदद के लिए धन्यवाद!

    कुछ कार्यों पर एक लॉक है यह किस प्रकार के आवेदन के आधार पर, आपको सिस्टम का एक पूर्ण स्टैक डंप प्राप्त करने में सक्षम होना चाहिए, लेकिन विधि भिन्न होती है। उदाहरण के लिए, मुझे लगता है कि ज्यादातर विंडोज़ आधारित एपसेरर्स पर सीटीआरएल ब्रेक ऐसा करेंगे, और मुझे लगता है कि लिनक्स पर एक SIGQUIT भेजने से ऐसा ही होगा।

    एक बार जब आप एक स्टैक डंप लेते हैं, तो आप इसे देख सकते हैं

    आप एक ही अंत लक्ष्य के लिए एक स्टैक डंप प्राप्त करने के लिए भी उपयोग कर सकते हैं:

    आप कर सकते हैं एक स्थानीय अनुप्रयोग चल रहा है, जबकि एक धागा डंप (स्टैक ट्रेस) लेने के लिए जावा VisualVM का उपयोग करें। एक धागे डंप लेना आवेदन बंद नहीं करता है। जब आप थ्रेड डंप प्रिंट करते हैं, तो आपको थ्रेड स्टैक का एक प्रिंटआउट मिलता है जिसमें जावा थ्रेड्स के लिए थ्रेड स्टेट शामिल है।

    जब आप जावा विज़ुअल विज़ुअल में एक थ्रेड डंप को प्रिंट करते हैं, तो उपकरण सक्रिय धागे का एक स्टैक ट्रेस प्रिंट करता है आवेदन की एक थ्रेड डंप लेने के लिए जावा विज़ुअल विज़िम का उपयोग करना उन मामलों में बहुत सुविधाजनक हो सकता है जहां आपके पास एप्लिकेशन के लिए कमांड लाइन कंसोल नहीं है। आप एक स्टैक ट्रेस का उपयोग कर सकते हैं ताकि डेडलॉक या एप्लिकेशन लटकाए जाने वाले कई मुद्दों का निदान कर सकें।


    objective c - Mac OSX Overlay -


    How do I go about a hood type overlay programming in OSX? I want to be able to get an application that will display text at a certain point on a separate application window.

    And thus if (other application) window moves to the HUD part then the coordinates will be in the same way as the other windows.

    For window, a borderline with its own custom view to attract your closed elements , Use transparent windows (many examples).

    "There is no other application 'Window' section, a public API that lets you do this easily. You use Universal Access and its Window Location / Navigation API, but for your users Needs to turn on "enable accessibility for collaborative devices" (I think it can not be programmed yet). I do not believe that when a window runs, "your friend "But if I do, it's probably a one-shot" Here's where I am, "so your overlays probably will not hold up. I do not even think that This gives you a "window level" so that you can get permission to ensure that you are "up" above any window / sheet / palette.

    Only other options (other app 'windows) System-wide, invasive hack, a new application It is easy to go wrong and to destabilize the user's system (hence the dispute).


    SilverLight - MVVM binding viewmodel property to datagrid column -


    itemprop = "text">

    In my Silverlight application, I have a view model called 'vmProperty' and there is a list called 'dgSource'.

    I bind my dgSource to the datagrid as itemgrowth, on which each datagrid row's datacentest varies in each item dgSource. One of the columns, called a checkbox column, is required to bind to vmProperty, but when the viewload is no longer the datacontext of the row, I can not use this property.

    How do I get this problem? If the question is not clear, please tell me and I will post a sample. Thanks in advance.

    Assuming your ViewModel is assigned as LayoutRoot's DataContext, this function IsChecked = "{Binding DataContext.vmProperty, ElementName = LayoutRoot}"

    Of course this does not work, eventually a template is repeated and therefore the "layout" is not present in the no-nonsense where the binding is actually used.

    This is an easy model, which is to change the model. Expose the expected value on the objects available in DGSource or expose a parent property which goes back to ViewModel


    asp.net - JavaScriptSerializer Error Message - Duplicate type, how do I resolve? -


    I am trying to sort some stars and come back through an AJAX call and I see a strange error giving. Any help would be greatly appreciated:

      Compiler error message: & lt; / B & gt; CS0433: 'System.Web.Script.Serialization.JavaScriptSerializer' type exists in both 'c: \ WINDOWS \ assembly \ GAC_MSIL \ System.Web.Extensions \ 1.0.61025.0__31bf3856ad364e35 \ System.Web.Extensions.dll' and 'c : \ WINDOWS \ Assembly \ GAC_MSIL \ System.Web.Extensions \ 3.5.0.0__31bf3856ad364e35 \ System.Web. Extension to DL ' 

    I found the resolution: Using code for a JavascriptSerializer One Placing exceptions when used within the webform, place a class call in a web service and it worked perfectly. Maybe there are some restrictions on the class?!


    iphone - Xib view scrolling? -


    I have a Xib view file ... if I want to include more than altitude (420) labels ... How can I do this .. How can I get scroll feature when I am enabled with Visual Controller?

    Add an UIScrollView to your view, set this content size to the appropriate value and your label Add that scroll to subvision as weave.

    Instead of using UITableView, consider


    c# - Silverlight 3 - How to "refresh" a DataGrid content? -


    मेरे पास निम्न दृश्यावली है:

      1 सिस्टम का उपयोग कर; 2 प्रणाली का उपयोग कर। 3 प्रणाली का उपयोग करते हुए। विन्डोज। नियंत्रण; 4 प्रणाली का उपयोग कर। विन्डोज़। दस्तावेज; 5 प्रणाली का उपयोग कर। Windows.Ink; 6 प्रणाली का उपयोग कर। विन्डोज़। इनपुट; 7 प्रणाली का उपयोग कर। विन्डोज़। मीडिया; 8 प्रणाली का प्रयोग कर.विंडोज.मीडिया.एनिमेशन; 9 प्रणाली का उपयोग कर.विंडो। आकार; 10 प्रणाली का उपयोग कर। Collections.Generic; 11 12 नाम स्थान रिफ्रेश 13 {14 सार्वजनिक आंशिक कक्षा मुख्य पृष्ठ: उपयोगकर्ता नियंत्रण 15 {16 17 सूची सी = नई सूची (); 18 19 सार्वजनिक मेनपेज () 20 {21 // चर को प्रारंभ करने के लिए आवश्यक 22 प्रारंभिक घटक (); 23 सी। जोड़ें (नया ग्राहक {_nome = "जोसीमारी", _idade = "29"}); 24 सी। जोड़ें (नया ग्राहक {_nome = "वेस्ले", _idade = "26"}); 25 सी। जोड़ें (नया ग्राहक {_nome = "Renato", _ idade = "31"}); 26 27 this.dtGrid.ItemsSource = c; 28} 29 30 निजी शून्य Button_Click (ऑब्जेक्ट प्रेषक, System.Windows.RoutedEventArgs ई) 31 {32 सी। जोड़ें (नया ग्राहक {_nome = "Maiara", _ idade = "18"}); 33} 34 35} 36 37 सार्वजनिक कक्षा ग्राहक 38 {39 सार्वजनिक स्ट्रिंग _nome {get; सेट;} 40 सार्वजनिक स्ट्रिंग _idade {get; सेट करें;} 41} 42}  

    कहां है, dtGrid मेरा डेटाग्रिड नियंत्रण है ...

    सवाल है: एक और रजिस्टर जोड़ने के बाद यूआई अपडेट कैसे किया जाए मेरी सूची में।

    मुझे यह डेटाग्रिड के मद स्रोत को सेट करने और उसके बाद ग्राहक ऑब्जेक्ट की सूची को फिर से सेट करना हल करना है, जैसे:

      1 निजी शून्य Button_Click (ऑब्जेक्ट प्रेषक, System.Windows.RoutedEventArgs ई) 2 3 {4 5 सी। जोड़ें (नया ग्राहक {_nome = "Maiara", _ idade = "18"}); 6 7 this.dtGrid.ItemsSource = ""; 8 9 this.dtGrid.ItemsSource = c; 10 11} 12  

    क्या यूआई अद्यतन या डीटग्रिड के आइटम्स को प्राप्त करने का कोई तरीका है? स्रोत से अद्यतन, फेरबदल या एक आइटम को हटाने के बाद स्वचालित रूप से पुनर्संचित स्रोत?

    धन्यवाद,

    जोशीमारी Martarelli

    मैं बाध्यकारी, INotifyPropertyChanged, DataContexts और अवलोकनकॉल्क्शन।

    1. अपनी सूची को एक ObsavableCollection में बदलें। अकेले ही आपकी समस्याओं में से कुछ को हल कर देगा ... एक ObsavableCollection के रूप में एक सरल सूची

    2. < P> लेकिन, अगर आप इस तरह से और अधिक समस्याओं को हल करना चाहते हैं, तो आप अपने DataGrid को अपने ऑब्जेक्ट की सूची में Xaml और lt; DataGrid के माध्यम से बाध्य करने के लिए देखेंगे ... ItemsSource = "{बाध्यकारी MyList } "

    3. अपने DataGrid को अपने सूची में बाँटने के लिए, आपको दृश्य के DataContext सेट करें यह आपके कन्स्ट्रक्टर में रखने के रूप में एक सरल हो सकता है: this.DataContext = this; अपने DataContext को सेट करने से पता चलता है कि डेटा देखने के लिए कहां है बाइंडिंग < / Code> बयान

    4. उसके बाद, आपके पास एक जैसी समस्याएं हल करने के लिए (कुछ बदलना दृश्य को ताज़ा नहीं करता), आप INotifyPropertyChanged आपकी कक्षा में इंटरफ़ेस।

    यह सी # कोड है जो इसे कार्यान्वित करेगा:

      सार्वजनिक आंशिक कक्षा मुख्य पृष्ठ: उपयोगकर्ता नियंत्रण, INotifyPropertyChanged {निजी पर्यवेक्षण कलेक्शन & lt; ग्राहक & gt; _MyList = नया निरीक्षणीय चयन & lt; ग्राहक & gt; (); सार्वजनिक पर्यवेक्षण योग्यता & lt; ग्राहक & gt; मिलिस्ट {प्राप्त करें (वापसी _ मैललिस्ट; }} सार्वजनिक मेनपेज () {InitializeComponent (); यह। DataContext = यह; MyList.Add (नया ग्राहक {_nome = "जोसीमारी", _idade = "29"}); MyList.Add (नया ग्राहक {_nome = "वेस्ले", _idade = "26"}); MyList.Add (नया ग्राहक {_nome = "Renato", _ idade = "31"}); OnPropertyChanged ( "MyList"); // यदि आप बाइंडिंग का उपयोग करते हैं तो यह केवल तभी काम करता है } निजी शून्य Button_Click (ऑब्जेक्ट प्रेषक, System.Windows.RoutedEventArgs ई) {MyList.Add (नया ग्राहक {_nome = "Maiara", _ idade = "18"}); OnPropertyChanged ( "MyList"); // यदि आप बाइंडिंग का उपयोग करते हैं तो यह केवल तभी काम करता है } सार्वजनिक इवेंट PropertyChangedEventHandler PropertyChanged; संरक्षित शून्य OnPropertyChanged (स्ट्रिंग propertyName) {यदि (PropertyChanged! = नल) {PropertyChanged (यह, नई PropertyChangedEventArgs (propertyName)); }}}  
    पर क्लिक करें

    shopping cart - disable repeated call using getmethod() in php when page is refreshed -


    I'm new to PHP and I'm working on language learning and e-commerce website. With shopping cart, etc. I have items in this site, when an item is clicked, the item's ID is sent to the shopping cart page via the GET method. Using this ID, I add the item to the shopping cart (DB in the table) and it works fine.

      & lt; A href = "do_shoppingcart.php? Id = & lt; php echo" $ Itm_id ";? & Gt;" & Gt;  

    The issue is; If the user clicks the Refresh button, the item is added to the shopping cart again. Do you think it is a good option to disable the Fresh button or F5 button? What should I do to prevent the item from being added to the shopping cart when the page is fresh? In the forms I found that "(isset ($ _ POST ['submit']) {}" is useful, but it does not work according to the GET method.

    Your help is appreciated.

    The safest way (even useful to stop CSRF attacks) is to hide your token field Add the form to the form. Then, in the processing script, only add items to the database if that token is not present yet ...

    To Something like this can be made:

      $ token = sha1 (unicode));  

    is linked to your link:

      echo & lt; a href = "process.php? Id = '. $ Id.' & Token = '. $ Token;  

    After that, After processing, you inquire your database for that line with that token.

      from the table SELECT 1 where token = ABC .... ' 

    If this returns the query, do not take action on anything else ...


    svn - How to add file to a previously committed changeset in Subversion? -


    After migrating from TFS to Subversion, we have found that one of the changes files (one branch operation) Is missing The branches have been implemented in the form of removal of the tool we have implemented and the operation to be added separately and in this case, it missed the file.

    After hundreds of modifications we searched for the problem and found the latest version of the file.

    However, I would like to add that file to the previous changes (broken changes). Is it possible to do this subversion?

    (Note: I know that it is a swan, but this amendment should also be consistent as it was also a release. Currently I can check only that file with previous amendments and the rest The files that I can check are the only possible solutions.)

    OK, the easiest The way to check out (or) that branch / tag, add the file, and make a new modification.

    To change it as before ... This is probably possible, but generally it is a bad idea.


    ms access - VBA Code Stops Working -


    The following code is said every time that the form has been opened. It works great till the 5th opening and then tries to remove any one from the control. Does anyone know why this is?

      for each CB in the form (frmName). Control type = acCheckBox then if left (cb.Name, 3) = "clr" then DeleteControl frmName, Cb.Name termination if other CB Control Type = Axlebel then delete the Left (cb name, 3) = "CLR" control control FRMName, cb.Name end then if the end is  

    When you delete an item from a collection in Access, the next item moves to the place of those objects. Thus when it comes to removing items from a collection, you should start at the end of the collection and go back to the last time.

    Then

      replace for each CB (frmName) form.  

      for counter = form (frmName) Controlled Calculation - 1 to 0 step -1 set CB = form (frmName). Control. ITEM (COUNTER)  

    However my next question is your overall purpose?

    It is unusual to manipulate the controls in this design scene

    asp.net - Get a specific number of results from an XmlDocument XPath query -


    I am inquiring with a Twitter RSS feed and sending the result to the repeater for display. I would only like to get the first 5 results of the XPath query Is there a way to do this in XPath syntax or do I have to loop on the result XmlNodeList to remove the first 5?

      XmlDocument doc = new XmlDocument (); XmlTextReader Reader = New XmlTextReader (rssPath); Doc.Load (reader); XmlNodeList item = doc.SelectNodes ("/ RSS / Channel / Items"); RptTwitter.ItemDataBound + = New Repeater Item Event Handler (RPTTVwitter_itam.databound); RptTwitter.DataSource = Items; RptTwitter.DataBind (); Try this XPath query instead:  
     

    Code> (/ RSS / channel / items) [status () & lt; = 5]

    This only returns the first five matching items, because the brackets are important, because without them [position () part item is applied to the position of the element, not its results set in the node.


    iphone - Why doesn't delegate/datasource show in IB? -


    I have a declared UIVICI controller like this:

      @interface RootViewController : UIViewController & lt; UITableViewDelegate, UITableViewDataSource & gt;  

    I have pulled a tableview on the view of the root converter. When I click on the owner of the file, I see that the table is the view where the delegate and the data source are Should be connected to work for?

    Assign items to the data source and the IB when you select your UITableView Do not click on the file's owner, click on the table view.


    Install git-core +svn fails with MacPort -


    I tried several groups, cleaned all, and no luck. any suggestion?

      Install Sudo Port git-core + svn + doc --- & gt; Git-core --- & gt; Computing reliance Building db46 error: Target returned org.macports.build: shell command "cd" /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_db46/work/db-4.6.21/build_unix "& amp ; & Amp; / usr / Bin / make -j2 All "returned error 2 command output: / bin / sh ./libtool --mode = compile /usr/bin/gcc-4.2 -c -O2-arch x86_64 -i / Dist / .. -i / opt / local / included- I / system / library / framework / JavaWheckwork / version / current / headers ../dist/../db_dump185/db_dump185.c / bin / sh. / Libtool --mode = compiled / usr / bin / gcc-4.2 -ci -i./dist/..-i/opt local / include -i / system / lib Rary / frameworks / JavaVM.framework / editions / current / headers-o2-arch x86_64../dist/../common/Util_sig.c /usr/bin/gcc-4.2 -c -O2 -arch x86_64 -i / Dist / .. -i / opt / local / include -i / system / library / frameworks / JavaVM.framework / version / current / headers ../dist/../db_dump185/db_dump185.c -fno-common - DPIC -o .libs / db_dump185.o /usr/bin/gcc-4.2-cI-i./dist/..-i/optip/local-en/customter/library/findworks/JavaVM.framework/variants / current / headers-O 2-arch x86_64 ../dist/../common/ util_sig.c -fno- common -DPIC -o .libs / util_sig.o ../dist/../db_dump185/db_dump185.c : 'Main' at the ceremony: ../dist/../db_dump185/db_dump185.c: 211: Warning: work a cast ../dist/../db_dump185/db_dump185.c:213 : Warns: The work creates a cast ../dist/../db_dump185/db_dump185 without any integer. C: 228: Error: No member of 'DB' is 'CEC' .. ../dist/ ../db_dump185/db_dump185.c:228: error: 'Ar_anaksti' undeclared (first use in this function) ../dist /../db_dump185/db_dump185.c:228: error: (reportedly each undeclared identifier only Once ../dist/../db_dump185/db_dump185.c:228: Error:. For each task it appears in) .. /dist/../db_dump185/db_dump185.c:233: Error: In the function 'db_hash': 'db' member no 'seq' ../dist/../ ../dist called db_dump185 / db_dump185.c /../db_dump185/db_dump185.c:261: error: 'dB' I do not have named Amber 'internal' Kk/dist/kk/db_dumpl85/db_dumpl85kc: 263: error: 'dB, a member of the' internal '.. / dist /../ db_dump185 / db_dump185.c: function' Db_btree ': ../dist/../db_dump185/db_dump185.c888: error : 'DB' is not a member of the name 'internal': *** [db_dump185.lo] 1 error: Waiting for 1 Incomplete Jobs .... /usr/bin/gcc-4.2-c-i-i./dist/..-i/optip/local-sy-i/system/library/workworks/JavaVM.framework/Version / Current / Headers-O2-arch x86_64 ../dist/../common/ util_sig.c -o use_sig.o & gt; / Dev / null 2 ​​& gt; & Amp; 1 Error: failed to produce the following dependency: P 5-svn- simple Todfod- perlbindings April util db46 CYRUS sasl2 suffered during gettext neon serf sabotage P5 period -readkey Rsync Popt error: Case 1 processing.  

    This is suggested (as and) which is / usr / local and then running The ports are clean db46 and then installing them will fix things.

    This did not work for me, however, it did:

      using the sudo mv / usr / local / usr/local.hold # -f reliance ignore To do this, because we are about to install it again sudo port -f uninstall db46 sudo port clean db46 # See the note below, you really want to install a slightly different # (such as your GIT-core installation) sudo port install Db46 sudo mv /usr/local.hold/usr/ local  

    I do not really know that in my case / usr / local steps were relevant - I have no doubt, because I have DB 46 is not installed. I think this was just because a previous version of DB 46 was causing the problem.

    This kills me as a bug in db46 and / or its port definition or configures script or something, so that it refers to a header that is installed on the system , Instead of the version of the same header file from the build tree in it. I have not dug to find it, though.

    Also note: I was actually making it for another port, and wanted it + universal type (not sure why, but whatever) - then my port installation step It was a bit useless at the time, because when I installed the port installed on another port, he did it again; universal, and the same problem was again ! Ahh. However, sudo port -f uninstall db46 and sudo port is clean db46 and then everything my main setup is working.


    reporting services - SSRS Tablix Sorting w/Row & Column Group -


    मेरे मैट्रिक्स में पंक्ति समूह (प्रश्न पाठ) और एक कॉलम ग्रुप (उत्तर टेक्स्ट) है।

    ऐसा लगता है इस तरह से:

     [answertext] [प्रश्नक्षेत्र] [उत्तरकाउंट] 

    मेरा डेटा इस तरह दिखता है:

     प्रश्नोत्तरी उत्तर उत्तर पाठ उत्तर प्रश्न 1 हाँ 2 प्रश्न 1 नहीं 1 प्रश्न 2 हां 3 प्रश्न 2 नहीं 4 

    जो निम्न रूप में प्रस्तुत करता है:

     हां नहीं प्रश्न 1 2 1 प्रश्न 2 3 4 

    मुझे क्या करना है ऐसा करने के लिए हां या नंबर के अनुसार सॉर्ट करना है कृपया ध्यान दें कि दोनों प्रश्न और उत्तर केवल उदाहरण हैं, वे उत्तर ध्वज रंग और amp; लाल, सफेद, नीली ...

    क्या यह संभव है? मैंने किसी को "यह मुश्किल है" कहते हुए देखा है मैं कड़ी मेहनत कर रहा हूं, मुझे यह जानने की जरूरत है कि कैसे

    क्या आपने अपने ऑर्डर में सिर्फ एक ऑर्डर जोड़ने की कोशिश की थी sql? तो आप प्रश्नोत्तर के बाद उत्तर पाठ्य से आदेश देंगे।


    php - How can I determine a first-time hit in Wordpress? -


    For analytics purposes, I need to determine that a user is the first visitor and some outputs to javascript .

    Preferably I can do it with the theme editor, I do not want to edit the code, but if this is the best way to get it, then it is fine.

    I was thinking something with the session, but it seems that I have to hack some code to use Wordpress session.

    Any thoughts? Thanks!

    I think a plug-in is present which you are looking for if I ask your question I think okay.


    Excel 2007 UDF .Net Params -


    I have a class that im used for user-defined tasks in Excel. Classroom is installed and available as an automation object.

    I have no problem creating a function with one or more parameters. And none of the problems are as a result of returning arrays and 2 dimensional arrays.

    Although I'm trying to set up a function that can take variable parameters, but the result always returns back to Excel as #VALUE.

    > Public Object Test Function (Parameters Double [] Value) {Return Value. Long; }

    Is the parameter really possible to work in Excel called?


    linux - Java: Master Gain not supported exception -


    This code does not work in Linux: I've added two rows

      // added two lines of DataLine.Info information = New DataLine.Info (SourceDataLine.class, audioFormat); SourceDataLineDocumentline = (SourceDataLine) AudioSystemGateline (notification); // Adjust the volume on the output line if (dataLine.isControlSupported (FloatControl.Type.MASTER_GAIN)) {// If inside this, Master_Gain should be supported. Yes? Float Control Volume = (Float Control) DataLine .getControl (Float Control .MASTER_GAIN); // This line throws an exception "Master_Gain is not supported" volume.setValue (100.0F); }  

    Is this normal? What do I have to do to solve this?
    This works in the window.

    Thanks, Martijn.

    class = "post-text" itemprop = "text">

    Before you try to use this control, open () line? Something like this:

      // Add two rows DataLine.Info information = New DataLine.Info (SourceDataLine.class, audioFormat); SourceDataLineDocumentline = (SourceDataLine) AudioSystemGateline (notification); DataLine.open (); // Adjust the volume on the output line if (dataLine.isControlSupported (FloatControl.Type.MASTER_GAIN)) {// If inside this, Master_Gain should be supported. Yes? Float Control Volume = (Float Control) DataLine .getControl (Float Control .MASTER_GAIN); // This line throws an exception "Master_Gain is not supported" volume.setValue (100.0F); }  

    internet explorer - Javascript window.open returns null in 32-bit IE8 on Win7 x64 -


    I have read related questions on this subject, but so far the issue has not been resolved. I have a simple JavaScript function That's what the window calls. When a link is clicked:

      var newwindow; Function pop (url) {newwindow = window.open (url, '', 'height = 500, width = 532'); If (window.focus) {newwindow.focus ();}}  

    This works fine on Chrome, Firefox, and even works in 64-bit IE 8 is. However, when I try this 32-bit IE 8 I get an error that 'New Window' is not empty or an object

    Any idea why only 32- Bit in IE 8?

    My hump was that it was related to UAC in Windows 7 (I'm running Win 7x64), but I get an error even after locking protected mode and running on compatibility view.

    I also wonder how Windows 7 comes with 32-bit and 64-bit versions of IE8, and why the 32-bit version was pinned to my taskbar ... < /p>

    If the URL is outside of your current domain, then Internet Explorer is coming back empty. You can first open an empty page and work around it, then navigate the window to the real url:

      var newwindow; Function pop (url) {newwindow = window.open ('', '', 'height = 500, width = 532'); Newwindow.location = url; If (window.focus) {newwindow.focus ();}}  

    c# - Using multiple platforms in a single project -


    I want to use C #, Java and PHP in the upcoming project. What potential damage should I look out for? Are there benefits to using multiple platforms for a project? The target development team is the people on different backgrounds working on this project on the Internet.

    Edit: Please be specific and tell me what kind of potential problem I can face ... please do not be too normal with your answers that it is not good It comes with problems, etc. Please be specific.

    I have to use 2 methods to integrate

    1).

    2. MySQL database (commonly accessible by PHP, .Net and Java)

    An ERP + CRM project for my project enterprises Where developers, who want to integrate and develop those platforms / plugins, can have the freedom of code.

    However for each case, the best reasoning can be argued, with such a system The problem is duplication of every data The structure must be duplicated in the database, at the end of the back, on the GUI and in PHP.In addition, the integration test and debugging problem has been made more complex.

    A better way would be to create three To decode messages in languages, it will be difficult to change the protocol, and everything needs to be boiled to transfer data between things. The main functionality of the product (your code) in one platform should be complete. Then provide integration points in the form of buffer tables in web services and MySQL, which allows communication on the path defined with your application, and want to write to developers who want to write plugins, in the language of those preferences Use those integration. Regarding integration with the database, the tables defined for this purpose can be a proper approach, as well as stored routines that are written to map these tables to their internal data structures. This will give you better encapsulation by writing the module directly on your data model.


    java - JAX-RS get entity as JAXB object and as String -


    I have a JX-RS web service (using jersey) which requests a JAXB object as the request institution Does. When we get an error, we want to log the original XML string that was sent to us. Currently, I'm just martializing the JACAB object, but since we have many Java anomes in those classes, the value values ​​that are not spelled correctly in the original XML string are lost, which are for our purposes. Not acceptable.

    Does anyone know any way to get the request unit as both string and JABX object? I do not like to write a custom message debitter and I probably do not like to try and get messesby reader for JACB. You are free to use Jersey-specific classes too, we are using version 1.0.x.

    gets out, it is not hard to do this JX-RS API here I have done :

      @ path ("/ transaction") public class testResource & lt; X & gt; {Private Sector & lt; X & gt; JaxbClass; @POST @ Path ( "/ {transactions id}") @ Kansom ( "application / xml") public reaction post (@ Kntekt provider, @ Conteks HTTP headers http Hdiyron, @ Pathprm ( "transaction-id") final Long transaction ID, last string xmlString) throws WebApplicationException, IOException {MessageBodyReader & lt; X & gt; Reader = providers .getMessageBodyReader (jaxbClass, blank, blank, MediaType.APPLICATION_XML_TYPE); InputStream entityStream = new bytereinputstream (xmlString.getBytes ()); Last X xmlObject = reader.readFrom (jaxbClass, null, null, MediaType.APPLICATION_XML_TYPE, httpHeaders.getRequestHeaders (), antistream); // Insert logic here Returns Response.ok (). Build (); }}  

    This will give you XML as a string and in some lines of code as a JAXB object.


    Capturing the first match with regex (C#) -


    This is my first experience, part of my limited experience with C # and regular expressions and I have trouble capturing the first event Coming in a special expression of a match I believe that in the following example, words need to be clarified which words I want to do.

      Mail Extractor = (New Reggae (@ ". * \ D (? & Lt; name & gt; *) \ D. *")). Match ("It is expected that 1Bob9error1 will take 1 as a name"); Console.WriteLine (extractor.Groups ["name"]);  

    I would like this expression to print "Bob" instead of "Error".

    I have a hunch with which to do something? In front of Milan group, but I'm not sure what operation would you do? An explanation with some help in performing this particular case would be amazing.

    Thank you guys, you do not know how much this site helps to start program like me.

    Your problem is greed that reggax grows. your. * It initially grabs all this "It is expected that 1 Bob will pick up" instead of trying this reggae:

      \ d (?  

    sqlite - rapid application developement tools for very basic GUI apps -


    I know that there are many RAD platforms, in fact, there are so many people that I find it hard to find out who I find the best fit, what I need is a RAD tool that will allow me to define a database data model (DB tables) and then create (see and edit) forms for different tables. Data input, updates and various questions should be easy and the GUI should automatically generate. I would like to add some extra functionality via coding (like various complex calculations on data).

    I am a programmer, so I have a more complete, fully-developed RAD solution if you can talk to me (Netbeans and RubyOnreles are two such frameworks which I would probably be more on the list). I am currently doing the Windows Form Logistics application in .NET. I have actually developed a very raw and basic version that I want, but I know that there are solutions that are very good and I would benefit from knowing how to use them.

    At least, the basic requirements:

      * Database based data collection (if possible, SQLite) * Very automatic GUI creation * Desktop based (as if a web Not the app) * Increased by coding * is used to create simple data entry, view & amp; Query app  

    So basically something like Oracle Form or Dotnet Mashroom Rapid Application Developer. But if possible, for .NET and SQLite.

    I recommend that you continue with WinForms based applications. You can drag and drop and databasing You can do a lot with (as you probably know).

    You can view 3-party based products like Devo Express.

    Good luck


    How do I merge multiple .net assemblies into a single assembly? -


    I have a pure application with about 10 assemblies. I would like to meet them together as an assembly. How do i do it

    I feel like a jar file for some Java applications. Try


    ASP.NET MVC: putting custom attributes into option tag in select list -


    I am using asp.net mvc, and try to submit a selected list with the HtmlHelper.DropDownListFor method I'm doing this:

      & lt;% = Html.DropDownListFor (x = & gt; x.AllTopics, SelectListHelper.GetSelectListItems (Model.AllTopics), "Choose a topic", new {id = "Allotics", @ class = "topic-dropdown"})%>  

    Where selectListHelper is just a IList & lt; SelectListItem & gt; gives us whatever we are going through. It works fine for simple things, but I want to be able to add a title attribute to each option tag ( no select list) But DropDownListFor only one IEnumerable & lt; SelectListItem & gt; , and there is no place in the SelectListItem that I can add to the title attribute.

    Is there any way to do this by putting the DropDownListFor method in the foregoing and selected list and handwriting each element?

    Dropdown list and derivative don 'Do not support the functionality you are looking for. But you can only process the string returned by the dropdown list.

      & lt;% = html.DropDownListFor (x = & gt; x.AllTopics, SelectListHelper.GetSelectListItems (Model.AllTopics), "Select a topic (" option "," & Lt; option attr = \ "value \" "%)" and "% 1"  

    java - Best idiom for a decrementing loop -


    What is the best / favorite idioms for the loop sink, and why?

     for  (int idx = (len-1); idx> = 0; idx--) {...}  

    or

     for  (int idx = (lane -1); idx> 1; idx--) {...}  

    or (For the use of sylvarking answers, but to interrupt the index scope)

     for  (int idx = len; idx -> 0;) {...} < / Code> 

    What is the possibility of traveling one or another another developer?

    I give the following suggestions because the comparison against zero is optimized at the byte code level.

     for  (int idx = (len-1); idx> = 0; idx--) {...}  

    this Jack is a suggestion by Shirke


    jquery select siblings 'until' -


    मेरे पास एक DOM है

      & lt; input class = "parent" & gt; & lt; / div & gt; & Lt; इनपुट वर्ग = "बाल" & gt; & lt; / div & gt; & Lt; इनपुट वर्ग = "बाल" & gt; & lt; / div & gt; & Lt; इनपुट वर्ग = "माता पिता" & gt; & lt; / div & gt; & Lt; इनपुट वर्ग = "बाल" & gt; & lt; / div & gt; ...  

    जो मुझे पता है वह सही नहीं है और ऐसा करने का सही तरीका HTML को सुधारना होगा, लेकिन कहने पर संभव है कि यह संभव नहीं है।

    कैसे मैं एक माता-पिता के सभी बच्चों को चुनने के लिए jquery कैसे प्राप्त कर सकता हूं (जो सभी का चयन होता है। बच्चे तक)।

    jQuery 1.4 में अब .nextUntil (selector) फ़ंक्शन है:

      $ ('div.parent')। टॉगल (फ़ंक्शन () {$ (this) .nextUntil ('div.parent')। Hide ();}, फ़ंक्शन () {$ (this) .nextUntil ('div.parent')। शो ();});  

    algorithm - PHP Calculate Balanced Arrays -


    OK, I'm not sure this title is effective, but the best I can come up with.

    Actually this is the scenario.

    I have 11 categories in each category, I have items, but one category can have 1 item, 1 in 20.

    Now I want to separate 11 categories into 5 stacks or columns.

    I

    So the following data were given:

      category | Item ------------------------- Cat 1 | 10 cat 2 | 3 cat 3 7 cat 4 | 11 cat 5 | 5 cat 6 13 cat 7 | 19 cat 8 | 5 cat 9 3 cat 10 | 9 cat 10 | 15 total = 100 items  

    So I want to spread objects equally between stacks.

    There are 5 stacks so that the same thing is 20 stacks per item. But the problem is, items with over 1 stack can not overflow. So how do I calculate the data to do some output like this:

      Stack 1 | Stack 2 | Stack 3 | Stack 4 | Stack 5 ------- | ----- - | ------- | ------- | ------- Cat 10 | Cat 1 | Cat 11 | Cat 6 Cat 7 cat 4 | Cat 3 Cat 8 Cat 9 | Cat 2 | Cat 5 | 20 20 20 21 19  

    It does not matter which category it is in the stack, as long as items spread evenly between the heap.

    Now the results of this stack calculation will be cached, because I do not need to count too many times, if the solution is too heavy CPU, then post it.

    thanks :)

    This is a loose problem Many resources are you Google napsi The problem is

    A simple way is to try all possible combinations. Each combination that you compute will also calculate standard deviation, use standard deviation to save the best fitting combination.


    msbuild - How do you determine what files are associated with a label in TFS? -


    I'm sure if I have a bug or my sense of labeling in TFS is wrong, I have a situation where I have a file that has given me a special label.

    I have 2 projects, main project and third party project, I apply a label for both of them.

    When I find a specific version of a file in a third party project using label search, the label is displayed. If I use labels, I get an error that it can not get a label.

    Always work for the main project using labels.

    In addition, I have not applied labels to files in label projects ...

    At this time, I am trying to determine which file Why and try to figure out why the label is present in search for everything ...

    Have you tried to open source control explorer, file -> source control -> labels -> find labels

    Then just click on the label you want to see.


    perl - Is there any way I can use Moose::Exporter from within a Moose object? -


    I'm looking for a way to set some helpful methods from within a parent class instead of a standalone utility class. If this is possible, then there will be a more transparent method of adding the shape of the module to the module, as it does not explicitly require any supporting modules (as extends through the declaration of everything Will come).

    Based on this, it is almost exactly what I am doing:

      package guardian; Use mousse; Moose :: Exporter- gt; Setup_import_methods (with_meta = & gt; [has_rw '], as_is = & gt; [' talk '], also = & gt;' mousse ',); Sub has_rw {my ($ meta, $ name,% option) = @_; $ Meta- & gt; Add_person ($ name, is => 'rw',% option,); } # Later ... package child; Use mousse; Expansion of 'parent'; 'Name' is; Has_rw 'size'; Cheese;  

    Although this does not work:

      perl-i-mm-hill-weight '$ obj = hair-> New (size => 1); Printed $ obj- & gt; The size ' 
     string found that the operator who has the "has_rw' size '' on the Child.pm line 10 (Do you need the prerequisite of HDRC?) Syntax error Child PM The "BayerWorld" thing is not allowed near the line 10, "HdRR size", while "public PM line" requires "strict SOS" in use. BEGIN Failure - compilation was aborted. 
    < P> PS I export magic to role (with roll < / Code> instead of growing parent; ), but the same errors occur.

    This is not supported, and this is a good reason why a class or role is not similar to the same kind of sugar, and at different levels, different things should be different. If your problem is using the "Moose + A Custom Shoe Package", then you can resolve that your custom Chinese package With Iryat mousse, steals your Example:

      using package MySugar; strict use; Mujh :: exporter; Moose :: Exporter- gt; Setup_import_methods (with_meta = & gt; [has_rw '], as_is = & gt; [' talk '], also = & gt;' mousse ',); Sub has_rw {my ($ meta, $ name,% option) = @_; $ Meta- & gt; Add_person ($ name, is => 'rw',% option,); }  

    Then you just say:

      package MyApp; Use MySage; # Moose + has_rw everything from import and extends talk (parent); Has_rw 'name'; 'Size' is; Cheese;  

    How does MooseX :: POE work , as well as many other packages I will debate for anyone having extensible As you are suggesting here because there is not a bundle of class Chinese works, and both should never be confused.

    Update: To bring both of them in a clean way, parents have to work again as a role that applies to the Moose :: object.

      Package Measureer :: Methods; Use 5.10.0; Use Moose: Role;  

    Then we just change the music :: Exporter to call in MySugar

      Moose :: Exporter- & Gt; Setup_import_methods (apply_base_class_roles = & gt; 'Parents :: methods', with _meta = & gt; ['has_rw'], as_is = & gt; ['talk'], also => ​​'mousse');  

    Now you can just say

      package MyApp; Use MySage; Has_rw 'name'; 'Size' is; Cheese; Package head; MyApp-> New- & gt; Something_special; #print sparkles  

    I believe the final details you wanted.


    php - Dynamic content in Joomla Articles -


    I have some Joomla articles that updated some values ​​of that article by data obtained through soap calls on another site should go. Is there a plug-in available for Joomla by which I can add articles to custom php ?? How can i do this ??

    For me, the ideal way to create a traditional component is to get all the data this component has specified article The ID contains these values. These articles work as "data containers".

    Why create a traditional component? Because you are going to use libraries, error correction and such a component solution can be more strong IMHO, it is a good idea to avoid PHP logic in your editor panel.

    Then, in the articles that are shown to users, you can see the data shown in your component in the {include_content_item 123} ID of 123 Calling {} calls the output to the article that is ID "123".


    How to load CSS on SSL pages? -


    I am using relative paths in my CSS document, but documents will not be loaded on SSL pages. Navigating back to non-SSL pages brings back SSL. There is nothing wrong with using relative paths with SSL pages.

    Did you consider any other argument, an additional redirect with a different URL, or could it be anything due to it?

    PS If you are using, press the view source and Ctrl-click on the CSS path.

    This is going to point you

    user interface - Need guidance towards evaluative boolean logic tree -


    I can not find an indicator in the right direction, I'm also not sure what I should do. But countless hours of googling sparkles in circles, so it is expected that the collective hive of stack overflow intelligence can help.

    The problem is, I want a method of filtering data, only one mixed logic can call the tree. Currently, this system implements a simple and filtering system. For example, suppose we have Dataset of people is you add a bunch of filters that show to all people (gender = female) and (age> 23) and (age <30) and (position = single). Enough easy, through each item again, add a valid item to the collection, if every condition is correct

    The problem I am experiencing is that I am able to insert the user with complex questions How can I do it and what is it? I am thinking like a tree where every node represents and the expression that treats her children as right or wrong will be a simple example - ((sex == male and age == 25) or (sex == female and Position == single)) and IQ> 120. Sorry I can not think of a better example at the moment. But how can you go about representing this type of expression tree, and evaluate the objects in the collection of these filters. What are some references that will help? Hell, what are Google looking for something that can move in a positive direction ?!

    Anyone can help with any help.

    Here is an example of a compound query in the tree

    • Question - Show me all the people where sex is male and the eyes are green or the gender is female, the eyes are blue Are or single status. As a parent (gender == men & eyes == green) || (Sex == woman & amp; (eyes == blue || condition == single))

    Then think of tree as a

      o - Root node - and - sex = male - and - eyes = blue - or - gender = female - and eyes = blue - or position = single  

    I believe the solution is to each Representing is a data structure such as node

      node {OpType - AND or OR ExpressionField - ExpressionOp - = ,! =, & Gt;, & gt; =, & Lt;, & lt; = Field expression value to evaluate - value to compare value of field against function evaluation () - Returns a boole  

    Therefore for a given node, chilren's Assess, if you are a node, then return true if the results of your expression are true and you and the children are correct or evaluated for any or the child's evaluation and then recurse up again.

    It seems to satisfy every ideological situation I can throw it, but once we implement it, I'll post the actual code later when its work and photos are better describing this problem for others.

    Your parsing expression ((sex == male and female == 25) or (sex == Woman and status == single)) and IQ> 120 looks odd I will parse it as:

      * and * or * and * == * gender * male * = * eyes * blue * and * == * gender * woman * == * Status * Single * & gt; The type of tree will be:  
      node {ball evaluation ()} and node: node {Evaluate the right hair of the node node () {return left.evaluate () & amp; Amp; Right.evaluate ()}} // OrNode is equal to: node {field field value values ​​BULL evaluation () {return field.value () == value}} // Similar <, & gt;, etc < / Code>> 

    sql - How to count same Id in a column in a table and based on count perform concatenation -


    I have a table in the format

    The name of the name is 1 Amit 2 Mohit 2 Nahar.

    >

    I confirm that this table will be updated in the format

    the name of the name is 1 Amit 2 Mohit or Nahar.

    Is there any question in SQL which solves this Can the purpose?

    try it

      DECLARE @Table TABLE (id INT, name Include VARCHAR (Max), @Table (ID, [NAME]) SELECT 1, to enter 'Amit' (ID, [NAME]) SELECT 2, 'Mohit' INSERT INT @Table (ID, [NAME] ]] 2, select 'ID' to enter 'Nahar' (ID, [name]), enter 'C' (ID, [name]) SELECT 3, 'D' INSERT @ NAME]) Select SELECT 3, 'E'  

    query (for first query)

      ID, REPLACE (accessories ( ('' By name '+' + name + '' @ in table B. where BID = AI Enable a group by merge data @ from the xml path ('')), 1,1, '', '', ',' OR ' 

    output

    query (change request)

      ID merge data 1 Amit 2 Mohit or Nahar  P> 
      Select one ID, case when inserted (x.cnt, 0) & lt; = 2 then substitute (accessories (select ',' + '+ name +' from @tables where b.id = path for xml path '')), 1,1, '', ',', 'OR') when x.cnt> 2 Then change (accessories ('select', 'to +' '+ name +' '' table 'B where b.id = xm path for a.id (' ')), 1,' ',', ' , 'And'), leaving an interesting data from @ an adid = x.id on the x (id)> id, select the id from the @Table group, / code>  

    Output:

      id merge 1 amit 2 captcha or naver 3c and d & e  

    What Eclipse source code analyzer plugins are there for C/C++ projects? -


    The installed metrics plug-in () only works on the Java project, what is an Eclipse source for C / C ++ Code Analyzer Plugin Is Projects?

    Thank you, Kenneth

    I know (but I have not checked < / P>


    class - Java Templates: array of Template Type in Template -


    I would like to apply a template that has an array of template types. Do I have a way of doing something that I have mentioned in my sample code? The problem is in the line where this.foo is assigned to a new array of template types.

      class classname & lt; T & gt; {T [] Foo Class Name () {this.foo = New T [128]; }}  

    This does not work, and this is the reason why, however, An array list, spoken by, is a good replacement because it basically wraps the array into a list item.

    Edit

    Your Problem


    How to retrieve the querystring in a Silverlight class library? -


    I'm buying a Silverlight 3 class library whose query string needs to be captured. Now I know that in a SilverLight app, you can hold it through the HtmlPage class, it does not work for the Silverlight class library. In the class library used in ASP.NET, you can refer to the current reference as HTTCPONTEX. Current can hold through . Is there such a thing in Silverlight 3?

    How to obtain a query string in the Silverlight class library?

    I can not see any reason that the HtmlPage class will not work in the Silverlight class library.

    You definitely have to add the context to System.Windows.Browser. Dll to use it if you have not already done so.


    casting - C++: Safe way to cast an integer to a pointer -


    I need to change an integral type that contains an address for the actual pointer type. I can use reinterpret_cast as follows:

      MyClass * mc1 = reinterpret_cast & lt; MyClass * & gt; (The_integer);  

    However, to see if a MyClass object is actually in fact, no run-time checks. I want to know whether there is any benefit in using a zero * (reinterpret_cast) first and using dynamic_cast on the result. Like this:

      zero * p = reinterpret_cast & lt; Zero * & gt; (The_integer); MyClass * mc1 = dynamic_cast & lt; MyClass * & gt; (P); Emphasis (MC1! = Null);  

    Is there any use in using another method?

    Checking on dynamic_cast in different ways ++ has been implemented in the implementation; If you want an answer for your specific implementation, then you should mention what implementation you are using. In general, the only way to answer the question is to refer to the ISO standard C ++.

    Calling dynamic_cast is invalid on your reading of a standard;

    If T is an indicator type, then a V A rvalue of the indicator will be "<< Pre> dynamic_cast < T & gt; (V)

    / P>

    (from ISO C ++ standard 5.2.7.2) zero is not a full class type, so the expression is invalid.

    The interesting thing is that any object being inserted is allowed to be zero indicator, i.e.

      zero * foo = dynamic_cast & Lt; Zero * & gt; (Some_pointer);  

    In this situation, dynamic_code is always successful, and the resulting value is an indicator for the most derived object v .


    c# - Retrieving image from sql table using a file path, code error -


    A good word called Darin gave me some code to get an image through my code path.

    However, when I try to execute the code, I get a "tap reference exception"; the user is dismissed by the code; Use the 'new' keyword to create an object instance on the first virtual line.

    The code can be found below:

      var connectionString = Configuration Manager. Connection strings ["SomeCN"]. ConnectionString; (Var cnd = cn.CreateCommand ()) (cn.Open ()) (var cn = new SqlConnection ("Data Source = STRSQL04; Initial Catalog = PDC; Integrated Security = True" Cmd.CommandText = "Template Select imageID from where the member ID = FM00012 "; cmd.Parameters.AddWithValue (" FM00012 ", 5); {if reader.Read ()) {var reader = Root ()) {var filepath = Reader.GetString (0); Image1.ImageUrl = filepath;}}} Can anyone explain the error on my behalf?   

    itemprop = "text">

    In your app config, you have a connection type called "SomeCN" (Or whatever you are using for real), so when you try to access the ConnectionString.ConnectionString parameter, this is a nullifier.

    Can you post content of your app.config , or at least connection to element, we can see?

    • (When you try it, you will see one type of settings in the Settings Editor dropdown "ConnectionString").

    c# - How do I get the scroll position from Microsoft Word -


    I want to make the position of an image on the page I am looking at the user, although how can I get the currently visible page I can scroll in / pixel.

    Does anyone know what object and property can give me?

    "post-text" itemprop = "text">

    Are you trying to control Word from Word or is it an integrated control?

    I think you want: object omegle = doctor. Paragraphs [1] .ange;

    This code is below for an inline snap, size is not an object size object is for text-wrapping.

    Code:

      Using the system; Using System.Collections.Generic; Using System.ComponentModel; Using System.Data; Using System.Drawing; Using System.Linq; Using System.Text; Using System.Windows.Forms; Using Word = Microsoft.Office.Interop.Word; Namespace WordAddIn3 {Public Partial Class} Form 1: Form {Public Form 1 () {Initial Group (); } Private Zero Button 1_Click (Object Sender, EventArgs e) {Word.Application wdApp = Globals.ThisAddIn.Application; Word.Document Doc = wdApp.ActiveDocument; String filename = "c: \\ testimage.jpg"; // Image file to be included Omiss = Doctor. Paragraphs [1] .ange; // condition which you want to insert the object oLinkToFile = false; // default object oSaveWithDocument = true; // Default Dock. InlineSpace.Edpictor (filename, referee olfactory, referee OSWeith document, riff oimized); *}  

    Microsoft:

    Similarly, you might want to see this question on - which I realized was by you ..


    drupal - Hide link to a Views' view if the view is empty -


    I have a Drupal 6.14 site with visual modules. I have a view and on the primary link I place a link for the scene.

    There is a way to hide links in the primary menu, if the view is empty?

    You may either preprocess_page (THEMENAME_preprocess_page (& amp; $ vars)) or MODULENAME_preprocess_page ( & Amp; $ vars), but the above Mac is right that those scenes are not empty or not, as long as they do not move, so a performance hit will occur. Within the

    function, you should have access to the structured primary link array, so you can run this view:

      $ view = views_get_view ('view_name'); // Swap 'default' for a different display as is necessary, besides $ args logic, and if not applicable then it can be left. $ Output = $ view- & gt; Preview ('Default', $ Args); If there is no result of {// view (empty ($ view- & gt; result)), change the primary link here to remove the link in question}  
    < / Html>

    page break - LaTeX: How to create left aligned paragraphs and right aligned authors of paragraphs -


    Please help me create a latex document with the following structure

      text author text writer  

    Where text is a block alliance of 2-10 lines and the author is a line on the right side, and I should see these text + author blocks always on the same page. >

    >
  • Use \ raggedright for the left alignment, preventing the effect of { and } macros To empty the line before \ raggedright and }
  • Use \ hfill to authorize the author.

  •   {\ raggedright Please help me create a latex document with the following structure, where there is a section of Lesson 2 - 10 rows have been aligned and the author Alliance is on the right side of a line, and I want this text + Author blocks are always visible on the same page. } \ Nobreak \ hfill \ _pavel {\ raggedright Please help me create a latex document with the following structure, where there is a block of text 2 - 10 rows have been aligned and the author is aligning a line on the right , And I want this text + the author blocks always appear on the same page. } \ Nobreak \ hfill to \ _pavel  

    osx - Boost: MacOSX binaries for Boost -


    Is there a macodex universal binaries (at least i386 / ppc> = macosx10.3) for Boost?

    You can install Boost on Mac using.

    Universal

    You can either ask to make MacPorts for you by issuing them:

      $ port pkg Pstree  

    or

      $ port dmg pstree  

    PKG or DMG files / opt / local

    Edit: Nowadays you

      $ flavored boo will be placed in subfolder of / var / macports / build  

    T install

    can see it

      make $ alcohol information Boost  

    .net - Impersonation using ASP.NET Membership Provider -


    Because of the nature of a custom subscription / role provider, the project will require administrators to enter it as users , While assisted with inquiries from them.

    Now, it is easy to re-enter the administrator with the selected membership account, though this means that the administrator will be effectively logged out. I allow the administrator to impersonate a user in a way, yet I can easily switch back to my account at any time.

    Any suggestions?

    This should be something you want to do

    The domain account you want You can call the ImpersonateValidUser method with the username and password. And then reverse it at logout.

    You should be able to bend it to work with your custom subscription provider.

      // Cloning Personal Windows Impression Contains Constraints for Impersonation Consultants; Public entrant LOGON32_LOGON_INTERACTIVE = 2; Public ent LOGON32_PROVIDER_DEFAULT = 0; /// & lt; Summary & gt; /// Changes the account that we are running /// & lt; / Summary & gt; /// & lt; Param name = "user name" & gt; The username of the local administrator account & lt; / Param & gt; /// & lt; Param name = "domain" & gt; The user name domain & lt; / Param & gt; /// & lt; Param name = "password" & gt; Password for a local administrator account & lt; / Param & gt; /// & lt; Returns & gt; & Lt; / Returns & gt; Private Boole ImpersonateValidUser (String Username, String Domain, String Password) {WindowsIdentity tempWindowsIdentity; IntPtr Tokens = IntPtr.Zero; IntPtr Token Duplicate = IntPtr.Zero; If (RevertToSelf ()) {if LogonUserA (username, domain, password, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, ref Token)! = 0) {if (DuplicateToken (token, 2, refreshken to duplicate)! = 0) {tempWindowsIdentity = New WindowsIdentity (TokenDuplicate); CloningContents = tempWindowsIdentity.Impersonate (); If (Impersonation! = Null) {CloseHandle (token); CloseHandle (tokenDuplicate); Back true; }}}} If (token! = IntPtr.Zero) CloseHandle (token); If (token duplicate! = IntPtr.Zero) CloseHandle (token duplicate); return false; } /// & lt; Summary & gt; /// Cancel cloning and revent /// default account thread. Generally the domain \ NETWORK_SERVICE or similar. /// & lt; / Summary & gt; Private Zero UndoImpersonation () {impersonationContext.Undo (); }  

    date - How do I format an amount of milliseconds into minutes:seconds:milliseconds in PHP? -


    itemprop = "text">

    I have a total of milliseconds (i.e. 70370) and I want to display it in minutes: seconds: millisecond i.e. 00 : 00: 0000.

    How can I do PHP?

    don 'fall into the trap of using date tasks for this! You have a time interval here, not the date.

      Date ("h: i: su", $ mytime / 1000)  

    but for the dates of the use of the date function (gasp!) It does not operate in the way you want it in this situation - it takes timezone and daylight savings while formatting date / time.

    Instead, you probably want to make a few simple maths:

      $ input = 70135; $ USec = $ input% 1000; $ Input = floor ($ input / 1000); $ Sec = $ input% 60; $ Input = floor ($ input / 60); $ Min = $ input% 60; $ Input = floor ($ input / 60); // and so on, as long as you need  

    android - How exactly the R.string.* constants are generated? -


    I r in a db I want to store the generated string of constants.

    Does the constellation generate (semi) randomly and between versions such as? Or they have been created like hashcode , so their values ​​are XML-file & lt; String / & gt; Elements will not remain touched?

    You should not store R.java constants in the database, because Their values ​​can change when the application has been compiled again.

    Instead of any type of map & lt; Integer, String & gt; constant, each string is a unique < Code> R.string matches the values ​​and their prices never change, you can store them in the database instead.


    JavaScript Promise then() ordering -


    I'm still learning javascript promise s, and I came in a behavior that I Does not

      var o = $ (" # output "); Var w = function (s) {o.append (s + ""); } Var p = Promise.resolve (). Then (function () {w (0);}). Then (function () {w (1);}); P.then (function () {w (2); New promise back (function (r) {w (3); r ();}). Then (function () {w (4);})}}) .then (function () {w (5);}); P.then (function () {w (6);});  
      & lt; Script src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> & Lt; Div id = "output" & gt; & Lt; / Div & gt;       

    I expect these statements to run in sequence - that is, this will be output

      0 1 2 3 4 5 6  

    Instead, the output is

      0 1 2 3 6 4 5  
    < P> Even remove the promise , what I think, the opposite of the result 1 is before 2 , but there is 5 output before 6 .

    Anyone explain this to me?

    What I have seen is that reassigning p every time we expect that I will get the order.

    You can see that the initial reason for 6 is that you have a series No, you are in the branch

    when you call p.then (). Then (). Then () , you have found a series of promises that the right sequence executed in should
    However, if you call p.then (). Again (); P.then () , you have 2 promises related to p - essentially make a branch, and the second branch will be executed with the first.

    You can make sure that you meet them together p = p.then (). Again (); Pythen ();

    FYI, you almost never want to branch, unless you bring them back together (like Promise.all ), or deliberately a "fire And forgetting "Creating Branch"


    ios - How to add a two nib UITableViewCell in one Uitableview -


    I'm new to iOS development, if in a week you can add two different niche cells, any example Thnx in advance.

    You must register 2 nibs

      tableView .registerNib (UINib (NibName: "CELLl", Bundle: zero), forCellReuseIdentifier: "CELL1") tableView.registerNib (UINib (nibName: "CELL2", Bundle: zero), forCellReuseIdentifier: "CELL2")  
    < p> and the data source you choose them indexPath

      function tableView (tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) - & gt; UITableViewCell {give cellname = (indexPath.row% 2 == 0)? "CELL1": "CELL2" Come Sail = tableView.dequeueReusableCellWithIdentifier (cellName, forIndexPath: indexPath) UITableViewCell return as cell}  


    What if I want to add more than two new files ...

     code <> i 1 ... 3 {to CellID = "sales" + string (i) tableView.registerNib (UINib (nibName: CellID, bundle: nil), forCellReuseIdentifier: CellID )} in  

    and

      function tableView (tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) - & gt; UITableViewCell {go cellID = (indexPath.row% 3) + 1 cellName = "cell" + String (cellID) cell = tableView.dequeueReusableCellWithIdentifier (cellName, forIndexPath: indexPath) Go UITableViewCell as return cell}  < / Pre> 

    Enter image details here


    html - XML and XSL format linking -


    Hi, I'm having trouble connecting my XML and XSLT, my XML is long but a quote, The problem is that I do not have XSLT formatting it, I am trying to display my XML with one title below each other, I'm sorry but English is not my first language

    XML: < / P>

      & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt ;? Xml-stylesheet type = "text / xsl" href = "product_list.xsl"? & Gt; & Lt; ProductCatalogue & gt; & Lt; Beverage & gt; & Lt; Products & gt; & Lt; Name Product_Code = "D001" & gt; Limbons & lt; / Name & gt; & Lt; Price & gt; 6.50 & lt; / Pricing & gt; & Lt; Amount & gt; 20 & lt; / Zodiac & gt; & Lt; Supplier & gt; Coca Cola & lt; / Supplier & gt; & Lt; / Products & gt; & Lt; / Drink & gt; & Lt; / ProductCatalogue & gt;  

    XSLT

      & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Xsl: stylesheet version = "1.0" xmlns: xsl = "http://www.w3.org/1999/XSL/transform" & gt; & Lt; Xsl: template match = "/" & gt; & Lt; Html & gt; & Lt; Body & gt; & Lt; H3 & gt; Product List & lt; / H3 & gt; & Lt; XSL: implemented-templates / & gt; & Lt; / Body & gt; & Lt; / Html & gt; & Lt; / XSL: Templates & gt; & Lt; Xsl: Template Match = "Drink" & gt; & Lt; Div style = "color: # 0000ff" & gt; & Lt; H3 & gt; & Lt; Xsl: Select the value = "name" /> & Lt; / H3 & gt; & Lt; / Div & gt; & Lt; Div & gt; & Lt; Xsl: Select Value = "Name @ ProductCode" /> & Lt; / Div & gt; & Lt; P & gt; Price: & lt; Xsl: Select Value = "Price" /> & Lt; / P & gt; & Lt; P & gt; Supplier: & lt; Xsl: Select Value = "Supplier" /> & Lt; / P & gt; & Lt; P & gt; Amount: & lt; Xsl: Select the value = "zodiac" /> & Lt; / P & gt; & Lt; / XSL: Templates & gt; & Lt; / XSL: stylesheet & gt;  

    I believe this is a problem with my templates But I'm not sure how this fixed

    Yes, there really is a problem with your template. Basically

      & lt; Xsl: template match = "drinks" & gt; The easiest way to produce your conversion is to change the second template match.  

    to

      & lt; Xsl: template match = "product" & gt;  

    Within this template, you are selecting elements such as name and value , which are the product Children have elements>, not drinks .

    In addition,

      & lt; Xsl: Select value = "name @ product code" />  

    to

      & lt; Xsl: Select Value = "Name / @ ProductCode" />  

    XML and its related technologies are case-sensitive - Product_code are not equal Product_Code .

    Then, the output will be

      & lt; Html & gt; & Lt; Body & gt; & Lt; H3 & gt; Product List & lt; / H3 & gt; & Lt; Div style = "color: # 0000ff" & gt; & Lt; H3 & gt; Lemonade & lt; / H3 & gt; & Lt; / Div & gt; & Lt; Div & gt; D001 & lt; / Div & gt; & Lt; P & gt; Price: 6.50 & lt; / P & gt; & Lt; P & gt; Supplier: Coca-Cola & lt; / P & gt; & Lt; P & gt; Amount: 20 & lt; / P & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

    ios - Converting JSON string into object -


    I am trying to convert a JSON string into object c in Object C:

     < Code> NSString * jsonString = (NSString *) responseObject; NSDTA * JSNDTU = [JasonString Data Wrapping Encoding: NSUFF 8 String Encoding]; Id jsan = [nsjsnasialisation JSONObjectWithData: jsonData option: 0 error: zero];  

    jsonString value

    "[[\" date \ ": \" 12-01-2015 \ ", \ "Time \": \ "7:00 pm \", \ "title \": \ "first car service \", \ "description \": \ "this was the first car service \"]

    But the value of JSN is always zero How do I convert jsonString to an NSArray?

    My (third) condition: Your Jason string is not correct if it includes leading and following quotation Changed to \ " with " .

    Better: Send the correct JSON to the server or other JSON source.


    c++ - How to hide/skip/prevent instantiation contexts in compiler output when static_assert fails? -


    When a static_assert appears to fire, the compiler tries to be helpful, error messages usually But this looks like example: / foo.hh: 35: 77: Required from '...' example / foo.hh: 27: 54: '...' example / foo.hh: 42: 25 : '...' Required from example / foo.hh: 84: 94: Required '...' from ... example / foo.hh: 27: 54: '...' Example / foo.hh: 92 : 14 Required: Here are examples / foo.hh: 12: 36: Error: Fixed claim failure: My error message

    The problem is that my In the case, everything except the first and the last message is not much and prevents the error message from being really helpful. In practice, immediate reference information can be very long (both references and number of references).

    Is there a way to stop the compiler from removing all the immediate references (tricks, even hacks) for a specific static_assert ? I am mostly interested in GCC and clang output.


    Fast create configurable product in magento -


    I was trying to add a configurable product to the Magento backend. I spent 30 minutes to create a product with 5 sub-products. How can I add products fastest? I advise which extension I can use?

    I think you are new to all of these. So I try to go in first.

    1. First you create a configuration product, I think you do not have problems creating it. Unless you can add affiliate products.
    2. To save the first product, Save and Continue
    3. Now to the left, which you click on the tab under the name Affiliate Products By clicking on that you click on a form Quick Simple Product Creation . Here you can do weight, position, quantity etc. and click the Quick Create button.

    This is a simple product from you soon. In this way you can create others Below is a screenshot related to the details given below. Enter image details here


    asp.net - MVC5 Google+ Authentication works on Local IIS Express but not on my Server -


    I am using Google+ to control the login on my MVC5 app. I have my startup and have been properly configured and using local IIS Express everything is great. I get a Google+ button on the page of my account, and clicking takes me directly to the Google sign in page and I'm back after the challenge is passed.

    When I place my site on my site by 2012, IIS8 with the server, something different! The button is present, but clicking on it does not get anything. I can see that the page is trying to load something, but until I feel that this time does not come out. I never get into Google login

    I have tested that anonymous authentication is enabled in IIS and no other authentication methods are implemented.

    In the form of a secondary bonus point, "An error occurred in processing your request" with MVC5 message error page instead of hard page error message I do not have to disable this for my life Can get the idea of ​​some type of what I have failed!


    python - Very simple; beginner class -


    New and currently learning about classes and OOP in Python I try to get the following simple part of the code to run I am doing but I can not understand why I am getting an error Please see the code given below:

      class animal (object): für = true dff real_animal (self) : If fur: print "real animals" and: print "fake animal" class dog (animal): für = true def __init __ (self, not ): Self.name = name Rover = dog ( "Rover") Rover .real_animal ()  

    I get an error stating fur. By my understanding, classes can inherit classes. Therefore, since there is a rover - an example of class dog, which is a class animal. Should not I be able to run the functions of Base Class Angel on the rover? I basically want to fur dogs and therefore are real animals.

    Thanks for helping a newbie.

    You have at least two mistakes:

    • You need to refer to the variable variable as self.fur , as it is not a local variable, but a variable on the example / square

    • In the dog category, you call the variable is_furf , but in the original class it is just called für .


    ios - Tips for how to code a very complicated custom UITableViewCell -


    छवि दर्ज करें यहाँ विवरण

    कृपया मेरी नकली ऊपर चित्रित देखें। मैं यह कैसे कोड के रूप में हैरान हूँ मुझे लगता है कि मैं एक UITableView का उपयोग करेगा और एक सेल पर सभी अनुकूलन होगा। कोई अन्य विचार? मुझे यकीन नहीं था कि इसके बजाय एक नियंत्रक या इसके बजाय कुछ पर एक से अधिक टेबलव्यूव्स होना बेहतर होगा।

    सबसे पहले, यह डिज़ाइन वास्तव में आईपैड को छोड़कर काम नहीं करेगा। आईफोन स्क्रीन पर रौंदने की कोशिश करना बहुत ज़रूरी है।

    संग्रह दृश्य तालिका व्यू के अधिक लचीली रूप की तरह हैं आप पंक्तियों, स्तंभों, पंक्तियों और स्तंभों, मंडलियों, या जो भी आप चाहते हैं, में संग्रह दृश्यों को व्यवस्थित कर सकते हैं।

    आप एक संग्रह दृश्य को सारणी दृश्य की तरह बना सकते हैं, लेकिन यह अधिक काम है, और थोड़ा अधिक भ्रामक है

    यदि आपका यूआई कोशिकाओं की एक ऊर्ध्वाधर सूची है, तो एक तालिका दृश्य अभी भी बेहतर फिट हो सकता है, क्योंकि यह आप जो कर रहे हैं उससे मेल खाता है।

    इस एप को मानना ​​केवल आईपैड है:

    UITableViewCell का एक कस्टम उप-वर्ग बनाएँ, इसकी अपनी XIB फ़ाइल है वांछित सामग्री को परिभाषित करें टेबल व्यू सेल में प्रत्येक "टाइल" (प्रत्येक कक्ष में दिखाए गए 5 बक्से) बनाना एक अलग कस्टम उप-वर्ग का अर्थ हो सकता है, या यह संभव नहीं है कि आप उन्हें कैसे उपयोग करने की अपेक्षा करते हैं। यदि वे हमेशा एक ही क्रम में होते हैं, और कभी भी कहीं और इस तालिका दृश्य में उपयोग नहीं करते हैं, तो नहीं। बस घटकों से सेल बनाओ यदि आप कभी भी सोचते हैं कि आप इनमें से किसी भी टाइल को कहीं और का उपयोग कर सकते हैं, या यदि आप उन्हें किसी भिन्न क्रम में प्रदर्शित कर सकते हैं, तो हाँ, प्रत्येक टाइल को एक अलग कस्टम UIView उप-वर्ग बनाएं, और अपने सेल के निर्माण में उन कस्टम दृश्यों का उपयोग करें।


    c++ - security check when serializing in stream char* -


    I have a logging macro that accepts a message and logic, say:

     < Code> int i = 5 LOG1 ("message", i);  

    It will be logged in:

      message, i = 5  

    To do this I get std :: Section and operator & lt; & Lt ;.

    Now if I

      char * a = "foo"; LOG1 ("Message", A);  

    The result is going to:

      message, a = foo  

    The question is, what is a function Check the value of four * This stream operator & lt; & Lt; is safe to use, or potentially the attacks should be clearly checked ... a long string is occurring.


    parse.com - Javascript doesn't seem to return Parse objects properly -


    I have a function called makeNewNode () , which should take a pars geopoint object and a custom) Pod object node in which there is a GeoPoint object with the key "location" and the pointer for the second custom pars object with the key "stop". What this function should do is essentially "snap" for a node if any of the SNAP_RADIUS is its GeoPoint if not, then a tap "stop" pointer and parameter geoPoint . Return a new node with a "place" of

    I have some problems with this code.

    The first is that it seems that she always fails to return anything. Parse query always gives success, which is good. However, it only gives some useful when it is "snaps". Otherwise it returns only an undefined result variable.

    The second (and the main) is that without rectification or not, the function never returns anything similar to the node object, 'I hope it is me wide of console.log Through the use goes to believe that the node is never changed by the verbs within the success function of the query.

    In relation to the third, in the previous general sense, every time I tried to return an object from a function in JavaScript, I did not work according to the way I expected it. Every time I try to change a variable from within the success function of a query, there really is no change, I'm slightly new to javascript in this deeper because my previous experience is a little more light.

    This is a troublesome code.

      function makeNewNode (geoPoint) {var node = {}; Var node = Parse.Object.extend ("nodes"); Var query = new parsing. Configuration (node); Query.withinMiles ("location", geoPoint, SNAP_RADIUS); Query.first ({Success: Work) {console.log (results); console.log (results + ""); if (result == undefined) {node = new node (); node.set ("location ", GeoPoint); node.set (" stop ", null); node.save (); console.log (node.id);} else {node = results;}}, error: function (error) {console log ("Failed to create a node. Error:" + Error. Message + ".");}}); Return node; }  

    And here's where I call it.

      var geoPoint = new parse. Geopoint (location.lat (), location.lng ()); Var newnode = makeNewNode (geoPoint);  

    Any thoughts or suggestions about my code or none of the three questions are highly appreciated.

    Using a clean way to make promises, so that without the newly created object can be saved Additional callback can be of parameter and without the intense and intense nests of success tasks. Apart from this, the collar might want to make some constellation as part of some large part of the ascope.

    A promise version looks like this:

      // Promises that, upon completion, creates a new node with // on the geo-point, Or, if a node exists in SNAP_RADIUS, then it returns the node function mannote node (geopoint) {var node = pars.office. Extensions ("nodes"); Var query = new parsing. Configuration (node); Query.withinMiles ("location", geoPoint, SNAP_RADIUS); Return Query.First () Then (function (node) {if (node) {node = new node (); node .set ("location", geographic); node .set ("stop", empty);} return (node.is new ))? Node.save (): Pars promo.se (node);}); }  

    The caller can now add it to other promises.

    Edit - Here's how you say it, we say that we get Bhupoint in the second asynchronous call, then ...

    < Pre> var geoPoint = new parse. Geopoint (location.lat), location.lng ()); MakeNewNode (geoPoint). Then (function (new node) {console.log ("new node id" + newNode.id);}, function (error) {console.log ("error" + error message);});

    What is happening with all returns? A promise is a placeholder for the result, it returns the returning collar and the object in which they can attach to the completion function (using the then () method) This complete callback can return a promise (this is also an internal return ), So that they can be chained arbitrarily. Again there is an optional callback to handle the second parameter () failure.


    c++ - Return error code as double -


    I wonder if I get error code in two ways C:

      double getValue () {Double rate = 0; If (error 1) {return -1; } If (error 2) {return -2; } Return ret = ....; } Int main (zero) {double val = getValue (); If (-1 == val) {printf ("getValue: error1 \ n") return -1; } And if (-2 == wal) {printf ("getValue: error2 \ n"); Return -2; } ...... return 0; }  

    So when the return value is> = 0 then this is the correct value that can be used for calculation. When the value is less than zero error, will i get a floating-point-comparison problem when comparing the return value with 1 or -2? Flag value is a bad idea, the flagging point flagging point is double the flaping point, even though twice Be accurate.

    If you are using IEEE double precision floating point value, then value -1 and -2 exactly double S, and the comparison is well defined if you only copy double or read only the value, then there will be no "magic error" slip. In fact, traditional 2s On a system with 32 bit int s, each int is an IEEE double Teak can be displayed as a floating point value.

    Now, you think that the change will not be the same as x / 3 * 3. will ruin the identity, therefore the code is very fragile : both fragile because flag values ​​are fragile, and because floating point equivalence is often delicate in behavior.

    In C ++, there are several ways to do this, which are less delicate.

      Anang errorgroup {a, b, c}; Promotion: version & lt; Double, errorGode & gt; GetValue ();  

    is a tag association that can hold a double or error_code . A std :: is expected is the proposal that you can see that there is a tag association with "bias" for the first value which is only valid ( std :: experimental :: optional < / Code> and boost :: variant ).

    In both of these results, a type is being returned safely, where there is an error different type of the value compared to the non-error return type.

    Optional solutions include including the error code separately (back in the form of value or as a parameter-to-error-code as a parameter (I call the ICU style) Double can be set to some unharmed value in that case (e.g., NaN ) instead of unpublished.

      double getValue (error_code * E);  

    or

      will get error; value (double * out);  

    Where Enum error_code {a = -1, b = -2} errors The code is an enumeration.


    android - Animation onresume activity -


    There is a sliding animation between the two activities in the onCreate method, I am using it:

      Override pending transition (R.anim.slide_in, R.anim.slide_out);  

    and onResume method:

      @override secure zero over regeneration () {this.overridePendingTransition (R.anim.slide_out , R.anim.slide_in); Super.onResume (); }  

    slide_in.xml

      & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Translate xmlns: Android = "http://schemas.android.com/apk/res/android" Android: Period = "@ Android: Integer / Config_Long Anim Time" Android: fromXDelta = "100% p" Android: toXDelta = " 0% p "& gt;  

    slide_out.xml

      & lt ;? Xml version = "1.0" encoding = "utf-8" & gt; & Lt; Translate xmlns: Android = "http://schemas.android.com/apk/res/android" Android: Period = "@ Android: Integer / Config_Long Anim Time" Android: fromXDelta = "0% p" Android: toXDelta = " -100% P "& gt; & Lt; / Translation tax & gt;  

    The problem is: When I return to activity, it shows the same animation (right to left). I want to reverse it, what am I doing wrong here?

    add two more animation files

    slide_in_back:

      & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Translate xmlns: Android = "http://schemas.android.com/apk/res/android" Android: Period = "@ Android: Integer / Config_Long Anime Time" Android: fromXDelta = "- 100% p" Android: toXDelta = "0% p" & gt; & Lt; / Translation tax & gt;  

    slide_out_back:

      & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Translate xmlns: Android = "http://schemas.android.com/apk/res/android" Android: Period = "@ Android: Integer / Config_Long Anim Time" Android: fromXDelta = "0% p" Android: toXDelta = " 100% P "& gt; & Lt; / Translation tax & gt;  

    Call when starting the activity:

      Override pending transition (R.anim.slide_in, R.anim.slide_out); Call  

    Backdrop () method or call () when finished in any activity:

      Override pending transition (R.anim.slide_in_back , R.anim.slide_out_back);  

    Here's a tutorial to see:

    Hope it's helpful!