Wednesday, 15 July 2015

logging - Log User Activity on ASP.NET MVC Application -


Is ASP a good strategy to log user activity on the MVC app? (ActionFilters / HTTP modules).

Some more pages and controllers were also used like the end user activity (like "Skake overflow" was seen 23 minutes ago), and pushing forward what buttons or links were clicked

I have ELMAH installed but as far as I know its error logging.

PD: Google Analytics is not an option.

You can try to use an aspect to logging for yourself, this multi- Cast functionality can be useful for something like this, if this is not an option, then a module might be the easiest to implement (assuming you can get the necessary user information at that time in the pipeline) .


Load XML into C++ MSXML from byte array -


I am getting XML on a network socket. I want to take that XML and take further action in DOM Need to load. MSXMM requires input strings that are in UCS-2 or UTF-16 and ignore the XML header with the encoding type completely while loading the string. It allows to load pieces of XML, so it makes some sense.

I look at two possible ways to handle this problem:

1) Write the file to disk and load it in MSXML via the file path. Additional disk I / O makes this approach far from favorites.

2) To manually identify the encoding, to convert the peak into XML header and then to convert to UTF-16, call MultibiteTorDaCaire and specify the code page based on the encoding. This approach works fine, but I want to try to find out the encoding on MSXML.

Does anyone have any other ideas to accomplish this?

I have not seen other XML parsers, but I would be interested in how non-MSX Dome Parser accomplishes this.

Thank you, Paul

A simple way passes a secure array to the load function eg .

 const char * xml = "& lt; root />"; SAFEARRAYBOUND REGASBOUND [1]; RigaSound [0] .lLbound = 0; RigaSound [0]. CElements = strlen (xml); SAFEARRAY * psa = SafeArrayCreate (VT_UI1, 1, rgsabound); Mempie (PSA-> PVDTTA, XML, Stellen (XML)); Various V; VariantInit (and v); V_VT (V) = VT_ARRAY | VT_UI1; V_ARRAY (& v) = PAA; VARIANT_BOOL fSuccess; PXMLDock-> Weight (V, and FSUF); If (fSuccess == VARIANT_TRUE) {/ * do something * /} 

There is no error checking on running or exiting resources explicitly

or CreateStreamOnHGlobal Use to make and pass it in the load.


JavaScript Classes and Variable Scope -


I am relatively new to JS and I have issues imitating OOP principles properly I

< P> I think I have two questions, the first question is that there are several ways to declare variables.

I have a class:

  function clas (a) {this.b = 2; Var c = 3; This.prototype.d = 4; // or clazz.prototype.d = 4? } Var myClazz = new clause (1);  

Am I correct in the following assessments:

A is a personal variable which is a specific example (i.e. in different instances of clause there will be unique and independent variables 'a' ). It can be accessed from within the claza: 'A'.

b is a public variable, which is special for example, it can be accessed in the form of 'this.b' and 'cleage' from within the clazes as 'macaseb.b'.

c is a personal variable that is stable, or class-specific (i.e., different examples of clauses are part of the same 'C' variable). From any instance of the claage can be entered as 'C' and changes in the example of clause are reflected in all the examples of the clause.

d is a public variable that is static / can be accessed from anywhere through 'claz.propotype D' or 'myclage.prototype D'.

I have a total issue with my understanding of the variable scheme that a personal variable that is not static (i.e., a unique version for each instance of the class).

The second question is in relation to different types of class declarations.

I have been using:

  var MySingleton = new function () {...};  

Is it right to create aggregation? I am also unsure of the effect of "new" keywords in this situation, along with the effect of the aping () function at the end of the declaration:

  var MySingleton = new function () {... } ();  

I am using this method to declare a class and then instantiate the examples of that class:

  function myClass () {...}; Var class A = new myClass (); Var classB = new myClass ();  

Is this the proper way?

You are right one and b :

A is an argument, which is only available within the scope.

b is a public example variable, which is available on all instances created with the constructor function.

c is a private variable, which is only accessible within the constructor function.

d declaration is invalid, because the prototype object is used only for use, such as Clazz.prototype D = 3; , if you do this, the variable will be shared, but you can specify a value at a particular frequency, and the default value shading (via prototype series).

You can use the c form for the "private variable", for example:

  function Clazz () {var c = 3; // Private variable this.privilegedMethod = function () {warning (C); }; }  

The privileged methods are public, but they can use the declared "private" variable inside the constructor function.

To create aggregation, the easiest way to possibly use an object verbatim, such as:

  var myInstance = {method1: function ()} {//. ..}, method2: function () {// ...}};  

And if you want a personal member on your singleton instance, you can do the following:

  var myInstance = (function () {var privateavar = ''; Function PrivateMethod () {// ...} return {// public interface publicMethod1: function () {// all private members are available here}, publicMethod2: function () {}};}) ;  

This is called module pattern, it basically allows you to use private members on any one object.

More information:

  • Edit: About the syntax you posted:

      var mySingleton = new (function () {// ...}) (); By using the   

    new operator, you declare and use one step in an " anonymous constructor function ", Which will generate a new object instance, it is valid, but I personally like the" module "pattern approach, to avoid my own object insensible (and new ) for).

    Additionally, reading new function () {} , I think it is not really spontaneous and can cause confusion, if you do not understand well It has been that the new operator works.

    Regarding brackets, they are optional, if the new operator will call the function constructor without the parameter if you do not add them ( see, 11.2.2 < / Em>).


    Can anyone please help me with this SQL Query (works in SQLite DB Browser, but not in Rails) -


    Rails are spitting on me:

      SQLite3 :: SQLException: near " Select ": Syntax Error: Select questions.id, questions.text, questions.question_type_id, questions.meta, questions.max_answer_length, COUNT (form_questions.id) as expr1, (5) as expr2, Cast (in the form of COUNT (form_questions.id)) / cast ((5) as real) question, form_questions expr3 where form_questions.question_id = questions.id questions.id, questions.text, questions.question_type_id, questions .meta, questions.max_answer_length being expr3 by Group & Gt; = COUNT command (form_questions.id) DESC;  

    The query executes the SQLite database correctly with no problems in the browser, but for some reason the railways will speak on it.

    The code is:

      select self.find_by_commonality Question.find_by_sql (% & questions.id, questions.text, questions.question_type_id, questions.meta , Questions.max_answer_length, COUNT (form_questions.id) as expr1, expr2, cast (COUNT as real (form_questions.id) as real (5)) / cast ((5) in the form of real) In expr3 question, where form_questions.question_id = questions.id from group form_questions questions.id, questions.text, questions.question_type_id, questions.meta, questions.max_answer_length having expr3> = 0.75 order by COUNT (form_questions.id) DESC; & amp;% []) End  

    WTF is complaining about it

    There is a dot in front of the selection statement, is that it must be definitely ?


    Build a form dynamically with Ajax, jQuery -


    मैं PHP / mySQL / CodeIgniter / jQuery के साथ एक बहुत ही छोटे वेब ईआरपी अनुप्रयोग का निर्माण कर रहा हूं / विधेयक / चालान

      वर्तमान दिनांक क्लाइंट डेटा आदि  

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

    मैं प्रत्येक उत्पाद "पंक्ति" को अजाक्स / jQuery का उपयोग करना चाहूंगा।

    • मैं उत्पादों को गतिशील रूप से कैसे बनाऊं? मेरा मतलब है, उपयोगकर्ताओं को एक नई उत्पाद पंक्ति जोड़ने की अनुमति है, या चालान से उत्पाद पंक्तियां निकालने के लिए, अजाक्स का उपयोग कर रहा है?
    • इनवॉइस कुल प्राप्त करने के लिए, फॉर्म में सभी गतिशील रूप से जोड़े गए "पंक्तियों" को कैसे जोड़ना है?
    • और मुझे सभी डाक डेटा कैसे प्राप्त करना चाहिए और उसका इलाज करना चाहिए ताकि मैं उचित चालान तालिका में इनवॉइस रिकॉर्ड और उत्पादों के रिकॉर्ड को products_invoices तालिका में डालें?

    संपादित करें: यहां आप मुझे क्या करना चाहते हैं इसका एक उदाहरण देखें:

    EDIT2: यह jQuery प्लगइन मुझे लगता है कि मैं क्या चाहता था

    असल में आपको फ़ॉर्म तत्वों को गतिशील रूप से जोड़ना होगा क्योंकि उपयोगकर्ता नए डेटा की पंक्तियों को जोड़ता रहता है। मेरा मानना ​​है कि jquery DOM नोड्स को अभिगमन / संशोधित करने के लिए मानक एपीआई का उपयोग करने में बहुत मदद मिलेगी।

    आंकड़ों के संक्षेप के लिए, आपको & lt; span id जैसे विशेष हुक के साथ संख्यात्मक फ़ील्ड लपेट करनी है = "Value_x" & gt; 34 & lt; / span & gt; जहां x एक काउंटर है इस तरह के नए डेटा के प्रत्येक जोड़ के बाद, ऐसे span तत्वों के माध्यम से फिर से चलाना और मानों का योग करें और उन्हें $ ("# sumtotal") जैसे फ़ील्ड में प्रदर्शित करें। InnerHTML = sum;

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


    php - Magento - Custom Payment Module -


    This is a very common question, but goes here: I am trying to create a custom payment module in Magento . I have created a 'regular' module that hooks into the magenta event / observer model. But how will I tell Magenta to treat a module in the form of a payment module, so is this administrator visible on the backend and on the checkout page?

    My normal answer would be to try the Majenta PayPal module in Magenta Corps and reverse engineer. Then you can create a module that will be similar to your desired functionality.

    and

    and


    objective c - Is it wrong to use int in Cocoa and CocoaTouch? -


    How to use something like NSInteger instead of

    int In the code? I see it in many instances, including Apple's official code sample.

    There is a similar question here. Com: I use the NSInteger I like it because it is a future-proof, Apple now uses it on int , and this is the recommended method of working.

    is not "incorrect" to use int .


    sql - Calculating percentage within a group -


    A table is given for the following command:

      Select gender, Count (*) by sex from my_table group; Sex, employed, count (*) by sex, employed by my_table group;  

    returns:

      sex | Count ------- + ------ Male | 1960 women 1801  

    and:

      sex | Employed | Calculation --------- + ---------- + ------- Male | F | 1523 Men | T | 437 Women | F | 1491 Women | T | 310  

    I am having difficulty writing a question which will calculate the planned percentage within each sex group. The output should look like this:

      Sex | Employed | Counting | Percent --------- + ---------- + -------- + ----------- Male | F | 1523 | 77.7% (1523/1960) Men | T | 437 | 22.3% (437/1960) Women | F | 1491 82.8% (14 9 1/1801) Women | T | 310 | 17.2% (310/1801)  

    You can do this with a sub-selection Join and join one:

      select t1.sex, employed, count (*) as 'count', count (*) / t2. *) Has been sexually assaulted by my_Table Group) on T2 on T1. TeX = T 2.X Group by T.SEX, planned;  

    I can not think of other approaches from the top of my head.


    sql - INSERT INTO a table from another table, but with the correct user ID for each comment a user adds -


    I have two tables - one 'user' and 'comments'. Both of them have 'IDUsers' column when a user adds a comment, I want them to come from their User ID 'User' table and go to 'IDUs' column from the 'idusers' column in the 'Comment' table.

    However, a comment is being added to the user at the same time - so I am using INSERT I for new information. I'm also using coldfusion - if it makes a lot of difference.

    Hope everyone understands what I am saying ... and thanks for the help.

    What is the problem really? When a user is posting a comment, you know his user ID, then use the urid to insert it in the comments table.

    If you are creating user objects on the fly - as a part of the same transaction (make sure it is a transaction! It is important - the sync issue !!!) - like some mysql_insert_id () After inserting the equal user table in ColdFusion (), get the ID of the recorded record; Use that ID as a foreign key in the comment record.


    stl - Iterating over all pairs of elements in std-containers (C++) -


    एसडीडी कंटेनर जैसे std :: list तत्वों के सभी जोड़ों पर पुनरावृत्त करने का सबसे अच्छा तरीका क्या है , std :: सेट , std :: vector , आदि?

    असल में इस के बराबर करने के लिए, लेकिन iterators के साथ:

      के लिए (int i = 0; i & lt; ए्सize () - 1; i ++) के लिए (int j = i + 1; j & lt; एसिज़ (); j ++) cout & lt; & LT; ए [i] & lt; & lt; ए [जे] & lt; & lt; endl;  

    सबसे आसान तरीका सिर्फ शब्द को शाब्दिक रूप से दोबारा लिख ​​रहा है:

      के लिए (ऑटो i = foo.begin (); i! = Foo.end (); ++ i) {for (ऑटो जे = i; ++ j! = Foo.end (); / ** / ) {Std :: cout & lt; & lt; * I & lt; & lt; * जे एंड एलटी; & lt; std :: endl; }}  

    C ++ 98/03 के लिए const_iterator के साथ स्वतः बदलें। या इसे अपने फ़ंक्शन में डाल दिया है:

      टेम्पलेट & lt; typename it & gt; Void for_each_pair (यह शुरू, यह अंत) {for (यह i = start; i! = End; ++ i) {for (यह j = i; ++ j! = End; / ** /) {std :: Cout & lt; & lt; * I & lt; & lt; * जे एंड एलटी; & lt; std :: endl; }}}  
    पर क्लिक करें

    asp.net - Dyamically Change DefaultButton present inside UpdatePanel -


    How to dynamically change the form's default banner property from UserControl in one page. The page has been loaded into a master page, in which the updated panel.

    When trying to change the default button in UserControl's Load event, it is not changing.

      if (the last page) {this.Page.Form.DefaultButton = btnSave.UniqueID; } And {this.page.form.edit button = btnx.nic.in; }  

    Excerpt from MSDN:

    Scenarios are not supported during Asynchronous Postback to set the default Postback Button on the page:

      Changing the default batten program back during an asynchronous post.  

    Can not you bring back the status of the form and then find out which button was clicked on, this What is the process instead of passing information?


    c# - Rewrite this foreach yield to a linq yield? -


    Say I have the following code (context narrow to keep the detail of the question narrow)

      

    code > Public stable IEnumerable & lt; Color & gt; GetThemColors () {var ID = GetThePrimaryIds (); Foreign Currency ID (ID) {yield yield GetColorById (ID); } ID = GetTheOtherIds (); Foreign exchange (iid in iid) {yield yields return on callersbid ID; }}

    I would like to rewrite them to do something (which does not compile the offer)

      public static IEnumerable & lt; Color & GetTheMColors () {GetThePrimaryIds () Select (ID => yield returns GetColorById (ID)); GetTheOtherIds (). (ID => yield returns GetOtherColorsById (ID));}  < / Pre> 

    The key point is that in my first snippet I have two foreach enumerators, which I do not know how to do in linq without losing my lazy-loading features.

    you want concat :

      return GetThePrimaryIds ( ) Select (ID => GetColorById (ID)> GetTheOtherIds. (ID = & gt; GetOtherColorsById (ID));  

    Also keep in mind that you < Code> yield returns is not required.


    Should I learn Perl as a web developer? -


    संभावित डुप्लिकेट:

    पृष्ठभूमि

    मैं वर्तमान में एक वेब डेवलपर के रूप में काम कर रहा हूं और एचटीएमएल, सीएसएस, पीएचपी, माइस् SQL, जावास्क्रिप्ट (मुख्य रूप से) के बारे में और ज्ञान है।

    फ्लैश और एक्शन स्क्रिप्ट की दुनिया में और कुछ पर्ल के पास आया, जो एक पाठ फ़ाइल को संपादित करके स्कोरबोर्ड सिस्टम को नियंत्रित कर रहा था।

    मेरे सहयोगी ने पर्ल को हर दिन हमारे MySQL डाटाबेस बैकअप करने के लिए एक स्क्रिप्ट लिखने के लिए भी उपयोग किया है उन्हें ऑनलाइन स्टोर करें वह आगे बढ़ गया है और मुझे स्क्रिप्ट को बनाए रखने का काम सौंपा गया है। जैसे, मुझे पर्ल सीखने की आवश्यकता होगी।

    प्रश्न

    उपरोक्त भाषाओं और तकनीकों का उपयोग करते हुए, वेब डेवलपर के रूप में, पर्ल मेरे लाक्षणिक टूलबॉक्स को उपयोगी होगा, या वहाँ एक और अधिक उपयुक्त भाषा सीखना है कि और अधिक फायदेमंद होगा?

    यदि पर्ल मेरे लिए है, तो आप क्या सुझाव देंगे कि अच्छे संसाधन हैं, मैं आमतौर पर ऑनलाइन संसाधनों को जानने के लिए उपयोग करता हूं, लेकिन क्या कोई विशेष रूप से लाभकारी किताबें हैं?

    < Div वर्ग = "पोस्ट-पाठ" itemprop = "text">

    पर्ल का मूल्य सीखना है यह नवीनतम बज़ शब्दों के साथ जारी रखे हुए है, इस तथ्य के अलावा कि वे पर्ल समुदाय के बाहर बहुत प्रचार नहीं कर रहे हैं उदाहरण के लिए, उपलब्ध अन्य वेब ढांचे के बीच अपनी गति को बनाए रखना है इसके अतिरिक्त पर्ल मॉड्यूल का इस्तेमाल किया जा सकता है। निजी तौर पर, मैं थोड़ी देर के लिए उत्प्रेरक का उपयोग कर रहा हूं, और मुझे यह बहुत पसंद है।

    पर्ल सीखने के लिए, बहुत सारे ऑनलाइन संसाधन हैं यहां कुछ हैं:

    शुरू करने के लिए एक अच्छी किताब है।


    dns - know the domain of the action called in rails -


    I have 2 domains: domain1.com and domain2.com

    How do I know that What is the domain that is used to make an action call?

    Like

    domain1.com/controller/action

    I want to get domain1.com from action

    Is it possible?

    Thanks

    Use the method if you need a port Use host_with_port .


    java - How to test with easymock Capture -


    मेरे पास निम्न कोड है

      रिकॉर्ड rd = registerNewRecord (); & Lt; कुछ प्रसंस्करण & gt; rd.setFinished (सही); updateRecord (आरडी);  

    RegisterNewRecord विधि रिकॉर्डडाओ डालने पद्धति को कॉल करती है, और अद्यतनरेड एक ही डीएओ पर अपडेट विधि को कॉल करती है।

    मेरे पास निम्न आसानफ़ॉर्म कोड है:

    < > <कोड> कब्जा है & lt पूर्व; रिकार्ड & gt; InsertRc = नया कैप्चर & lt; रिकॉर्ड & gt; (); RecordDao.insert (कब्जा (insertRc)); कैद से & lt; रिकार्ड & gt; UpdateRc = नया कैप्चर & lt; रिकॉर्ड & gt; (); RecordDao.update (कब्जा (updateRc));

    समस्या आरडी के बाद से है, जो डाली गई रिकार्ड के एक ही उदाहरण को अद्यतन किया जा रहा है, insertRC कैप्चर ऑब्जेक्ट भी अपडेट किया जा रहा है। इसलिए मैं यह नहीं कह सकता कि सम्मिलित समय को सम्मिलित झंडा गलत पर सेट किया गया है।

    मैं क्या कर रहा हूं?

    यदि insertRC और updateRC के भीतर संदर्भ दोनों एक ही ऑब्जेक्ट rd को संदर्भित करते हैं और यह < कोड> अपडेट विधि, आप हमेशा देखेंगे कि रिकॉर्ड वस्तु समाप्त हो गई है। हालांकि, आप update कॉल किए जाने से पहले पहली कैप्चर किए गए ऑब्जेक्ट का परीक्षण कर सकते हैं।

      कैप्चर & lt; रिकॉर्ड & gt; InsertRc = नया कैप्चर & lt; रिकॉर्ड & gt; (); RecordDao.insert (कब्जा (insertRc)); रिकॉर्ड सम्मिलित रेकार्ड = insertRC.getValue (); org.junit.Assert.assertFalse (insertedRecord.isFinished ()); कैद से & lt; रिकार्ड & gt; UpdateRc = नया कैप्चर & lt; रिकॉर्ड & gt; (); RecordDao.update (कब्जा (updateRc)); रिकॉर्ड किए गए अद्यतन रिकार्ड = updateRC.getValue (); org.junit.Assert.assertTrue (updatedRecord.isFinished ());  

    c# - Design level problem: multiple enums or looping the enum in UI code in order to make visibility decision? -


    We have a debate about a best practice, which is a view of a .NET architecture design view:

    Action: How to manage role-based visibility in UI with Enum? For example: I want to show all Team Type [A, B, C, D, E] to the Administrator but only for Team Type [A, B, C] normal user.

    Pre>

    I use it like this:

      if (IsAdminitrator ()) comboboxTeamtypes.Items.AddRange (Enum.GetNames (typeof (TeamType));  

    Now I should decide how to apply the second segment. Because enums can not be inherited, I have two alternative approaches:

    1) Should I apply another role to specific anum:

      public anac TeamType can be found in other {a, b, c}  

    and then I will have:

      other comboboxTeamtypes.Items.AddRange (Enum.GetNames (typeof (TeamTypeOthers ))); 2) Or I should not forget to create any role specific and other teamtip and eliminate the original TeamType Enim values ​​in the UI-code:  
      else {Foreach () TeamTip Team type in Enum.GetValues ​​(typeof (TeamType)) {if (asdf == TeamType.a) comboboxTeamtypes.Items.Add (teamtype); Else if (asdf == TeamType.b) comboboxTeamtypes.Items.Add (Team Type); If (asdf == TeamType.c) ComboboxType Items.ed (team type); }}  

    I think the first solution is good and clean (though the repetition which is not very good). But now I also make a decision about the use of intensive architecture compared to solution 2 in depth architecture which is probably poor and helps in using the solution 2. The solution for me is 2 ugly and dirty because I'm around the code Do not like the cultivation of loop.

    I will change some things and use simple bitmasking for permissions:

      Public team teamtype {a = 1, // or 00001b = 2, // or 00010c = 4, // or 00100d = 8, // or 01000E = 16 // or 10000}  

    Then each user type sets its permission level (each available permission is added together):

      int administratorLevel = 32; // 11111 int user level = 7; // 00111  

    And then when you populate your dropdown in the UI, bitmasking comes in:

      ComboboxTem TypeEight. Choose (V => myLevel & amp; v == v). Select (v => Enum.GetName (typeof (TeamType), v)) ;  

    compilation - ASP.NET precompile fails to merge a single user control -


    I have a large third party ASP.NET website project, which I used to prefill using the MSBuild and Microsoft Web Deployment target And merge. I do not precompile .aspx and .ascx files, only codefiles.

    During the precompilation phase, user control has been compiled in an assembly that is not merged with the final WebSite.dll assembly. The final output includes:

    • WebSite.dll
    • App_Web_selectsinglepath.ascx.73690ebc.dll

    Compile all other user controls Assemblies with names such as App_Web_abcdefgh.dll and these assemblies were merged into WebSIte.dll, just it was not a control.

    What could be the reason for this behavior?

    I had a similar problem for which aspnet_compile from the command line and < Code> aspnet_merge was used to replace the web app project App_Web_ [hex] .dll two controls always used to name the assemblies, then load after the merge Failed in

    In my case, I aspnet_compile as the code App_Web_ [control_name] [hex] .dll generates all the control libraries. Flag> Flag-fictionname for code, which has created them all, appears to aspnet_merge , which removes the assembly loading error.

    I still can not understand that these controls are different file name patterns (names in a duplicate page or control hierarchy), but there is no HHH.


    php - Issue when using phpflickr -


    I use phpFlickr (last fixed version) on Windows Vista and WAMP2.0:

    And I have these:

      Strict standards: Assigning returns to new values ​​by reference ... / 91 strict criteria on the phpFlickr.php line: Return value of new by reference Assigned ..... phpFlickr.php 330 strict standards on line: The reference value of the new is being specified by reference ... 399 strict criteria on the phpFlickr.php line : Specifying the return value of the new by reference is deprecated in phpFlickr, PHP strict criterion on line 468: Specifying the return value of the new by reference is HTTP / Request.php is excluded on line 344. Assigning return value of new by reference 656 is deprecated on hard line /Request.php. Standard: Assigning the return value of the new by reference ... line 672 strict criteria in quest.php: Assigning the return value of the new reference is requested in .......... / request. 717 strict criteria on the Php line: Assigning return value of the new by reference ... 569 strict standards on the PRAPP line: Assign the return value of the new sow in the reference .......... Is deprecated in FTP  

    As I am using Symphony; I do not want to show this warning message to GUI and I want to define my request to a page, I have defined. Method warning message is shown after the method sync_upload.

    This is my code:

      require_once ("../ Flickr /phpFlickr.php"); // authentication $ f = new phpFlickr ("key", "secret"); If ($ F! = Null) resonates "Connection Recife ; $ F & gt; SetToken ("token"); $ F- & gt; Enable Cache ("FS", "../Flickr/cache"); $ MyPerms = $ f- & gt; Auth ("write"); Echo "Permit Fine" $ MyPerms "& Lt; / br & gt;"; // upload $ tag = "test1, test2"; $ Upload_photo_id = $ F & gt; Sync_upload ($ filePhotoName, "www.koutchoumi.com", null, $ tag); Echo $ upload_photo_id "_ Test"; $ Photo = $ F & gt; Photos_getInfo ($ upload_photo_id); Print_r ($ photo); $ Url = $ F & gt; BuildPhotoURL ($ photo); Echo "& lt; / br & gt; $ Url "& Lt; / br & gt;" ;  

    It seems that you are using PHP 5.3

    < P> Just change your error_reporting settings so that typed errors E_DEPRECATED are not displayed.


    vim command line completion when opening files -


    How to make VIM always auto complete filename in command mode? For example, when I type "CD / YW [tab]", I work fine, but if I want to open a file then ": o / ww [tab]", instead of doing it "^ I "Contains the character. / P>

    Try:

     : e / ww [tab]  

    extension methods - C# non-vowel words -


    I need an extension method that needs to be returned to non-vowel words. I

      Public stable IEnumerable & lt; T & gt; Misquotation & lt; T & gt; (This IEnumerable & lt; T & gt; Term) {Return word. Any (w = & gt; w.Contains ("aeou")); }  

    I got an error in the form of "T", in which the extanesion method is not "included".

    If you always deal with strings, then you do not need to use a common method.

      Public stable IEnumerable & lt; String & gt; Non-Wound Words (This IEnumerable & lt; string & gt; word) {char [] Vowel = {'A', 'E', 'I', 'O', 'U'}; Return word Where (w = & gt; w.IndexOfAny (vowel) == -1); }  

    PHP - Simpletest - Comparing numeric strings -


    I'm trying to use simpler to compare two numerical strings, one array and to an object property. .

    I have printed the values ​​and they are equal, however, the test always makes false. Can anyone help?

    Here's the code:

      $ this-> Asserting Equal (Strawwall ($-> built-in forum [$ random platform]), (Structure ($ forum- & gt; getTitle)); Print_r ($ this-> builtforums [$ randomforum]); Print_r ('& lt; br / & gt;'); Print_r ($ forum- & gt; getTitle ());  

    The values ​​to be printed are:

    1250833961 1250833961

    Any advice appreciated. Thank you.

    You were removed from the closed bracket from the GETITITAL. Should be ...

      $ this-> Assign Aval (Stral ($ this-> Built-in Forum [$ Random Halax]), (Stable ($ Forum-> GetTitle ()));  

    unit testing - How to Generate a WSDL in c# without making a http request -


    Text after "

    Hello, I'm sure to write a unit test to create that the last known published WSDL from our web services is not Want to have revenge version The reason for this is that any change in an object in WSDL will help the customers who use Apache axis to fail. Even if you do all, then add a non-property, then if you get a developer notice after a change, because product management so that they can re-compile their stubs when the new WSDL is published. Needed to be able to communicate to customers about changes that will be needed.

    So I was hoping to do something like this:

      [test] Public Zero TheWSDLHasNotChanged () {XmlDocument currentWSDL = SomeMysteryServiceIDontKnowAbout.GetWSDLForWebServiceClass (typeof (UserService) ); XmlDocument Existing WSDL = New XmlDocument (). Load ("ExistingWsdl.wsdl"); (Current WSDL, I.A.Q.L.) (current WSDL); }  

    For obvious reasons I do not want to make a request for a web server (even if the unit is running in trial run which may or may not be ).

    to generate from the WSDL assemblies:
    Use WCF for SvcUtil.exe. See it.
    Use for ASP.NETSuspiciousReply See this guide:.

    Sorry, I misunderstood my code snippet in my first reply


    transactions - NHibernate extract DBTransaction from Session -


    I have a legacy DB where some stored proc calculates the line ID for all tables. Now I overwrite the IID attribute generator I want to do as I have been prompted on this page to avoid the ID (X => X.ID). So far, I can save some objects, of course, an ENHIRBNAT transaction, named Appendix Hierarchy, as soon as it comes to ATKIdGenerator. Generate and this command starts. Execute Nano () I need the command to get some ExecuteNonQuery exception when a command is assigned to the command in the pending local transaction. The transaction property of the command has not been started.

    How can I attach it to the order to remove the DB transaction from the Nhibernate session object?

    I am using Fluentmapping for Poké

      Public addendum hierarchmap () {Table ("Appendix Hierarchy"); ID (x = & x; x.id). GeneratedBy.Custom (ATKIdGenerator), a = & gt; a.AddParam ("TableName", "Appendix Hierarchy")); .....  

    And here is the ID generator

      Public category ATKIdGenerator: IIdentifierGenerator, IConfigurable {private string TableName {get; Set; } #region IIdentifierGenerator Member Public Object Generation (NHibernate.Engine.ISessionImplementer session, object obj) {IDbCommand Order = New SqlCommand (); order. Connection = session. Connection; //transaction.Enlist(command); Type the command. Type command = command type Stored procedure; Command. Comma.txt = "dbo.ups_GetNewId"; // Set input parameter var parm = new SqlParameter ("@ tableName", SqlDbType.VarChar); Parm.Value = TableName; Command.Parameters.Add (parm); // set output parameter var outputParameter = new SqlParameter ("@ id", SqlDbType.Int); OutputParameter.Direction = Parameter Direction.optput; Command.Parameters.Add (outputParameter); // Set a return value var return parameter = new SQLParameter ("@RTRN_URAN", SQLDB type.ins); Return Parameter.Direction = Parameter Direction. Return value; Command.Parameters.Add (returnParameter); // execute the stored procedure command.ExecuteNonQuery (); Return (int) ((aclpamer) command. Parameter ["@ id"]). Values; } #interval # Regional Organizer Eligible Member Public Configure Zero (NHibernate.Type.IType Type, IDictionary & lt; String, String & gt; Params, NHibernate.Dialect.Dialect d) {TableName = params ["TableName"]; } I think that you need to open another connection to generate a method, use one on the session. . 


    Changing ONET.XML set properties after provisioning in Sharepoint/MOSS 2007? -


    I have a custom moss publishing site collection site / site, which has provisioned with the following site definition properties within ONET.XML has gone. / P>

      & lt; Properties xmlns = "http://schemas.microsoft.com/sharepoint/" & gt; & Lt; Property key = "plain publishing" value = "wrong" /> ... & lt; Property key = "Versioning Document" value = "Head" /> & Lt; / Properties & gt;  

    Is it possible to access / update these properties via API, for example, there are large / minor versions in all newly created document libraries?

    Do something like this:

      Publishing Web Properties ["Versioning Document"] = Variant Settings. Major Endimran;  

    = "post-text" Itemprop = "text">

    attribute you type in & lt; Property key = "Edition on document" value = "major" /> Look at the , the provisioning engine at the time of site creation.

    The only way to change them is by editing onet.xml and you are refusing to do so if this box came out with On SharePoint installation onet.

    You can take it in such a way to resolve your requirement

    1. Make a copy of the custom site definition and edit the new custom onet.xml Site Definition .
    2. Create a feature handler that will change the version's settings and staple the feature for site definition.

    javascript - test1 alert appears, test2 alert doesn't - invalid regex between them? -


      चेतावनी ('test1'); Var re = नया RegExp ("(http: // (?: [A-Za-z0-9-] + \\।) [A-Za-z0-9-] + \\। [A-Za- Z0-9 -] + /?) "," सी "); चेतावनी ( 'test2');  

    ऐसा क्यों हो रहा है? इस समस्या को कैसे हल करें?

    "s" समस्या है, यह जावास्क्रिप्ट के लिए एक मान्य संशोधक नहीं है नियमित अभिव्यक्ति। केवल वैध संशोधक / जी (वैश्विक) / i (केस-असंवेदनशील) और / मी (बहु-रेखा) हैं।


    c# - How to configure a WCF endpoint for a generic service with a specified type? -


    मेरे पास निम्न WCF सेवा होस्ट कंसोल अनुप्रयोग है:

      स्थिर शून्य मुख्य (स्ट्रिंग [ ] आर्ग्स) {ServiceHost serviceHost = नया सेवाहोस्ट (प्रकार (MyServiceName & lt; int & gt;)); serviceHost.Open (); Console.ReadLine (); }  

    मैंने इसके लिए एक समापन बिंदु कॉन्फ़िगर करने की कोशिश की:

      & lt; सेवाओं & gt; & Lt; सेवा का नाम = "MyNamespace.MyServiceName & amp; amp; एफ़ & gt;" & gt; & Lt; endpoint address = "net.tcp: // localhost: 8002 / MyServiceName" बाइंडिंग = "नेट टीसीपीबाइंडिंग" अनुबंध = "MyNamespace.IMyServiceName & amp; amp; एलटी; इंट & amp; gt;" / & gt; & Lt; / सेवा & gt; & Lt; / सेवाओं & gt;  

    लेकिन यह काम नहीं करता है & amp; lt; और & amp; gt समस्या है?

    आपका अनुबंध एक कंक्रीट प्रकार होना चाहिए - आप उसमें जेनेरिक का उपयोग नहीं कर सकते, माफ करना।

    डब्ल्यूसीएफ सीधे-अप से बहुत अलग जानवर है। नेट - और कई सारी चीज़ें जो एक्सएमएल स्कीमा अभिव्यक्त कर सकता है, उसे कम करने की आवश्यकता है, आप इंटरफेस (अधिकांश भाग के लिए) और जेनेरिक का उपयोग नहीं कर सकते हैं।

    आपको कंक्रीट इंटरफेस बनाना होगा और उनसे सेवा अनुबंध के रूप में उपयोग करना होगा।


    asp.net - repeater or listview vs concatenated html -


    After spending a very small amount of time changing a page using contatted HTML such as

      string output = ""; Output + = " ul & gt;"; Forex Currency (in MyClass Item Mites) {Output + = "and Lt; Li> + Item Name + "-" + item Some Properties Toaster () + ""; } Output + = "& lt; / ul & gt;"; LiteralPlaceHolder.Text = output;  

    To use the ListView control, I have just discovered that the original developer went back and changed the page to use a concerted HTML Gave. My personal impression is that list-review and repeater lend themselves to cleaner, more informative markup, which can be edited by someone with less experience with C #, and that they are faster and less memory At the very least the page should use stringbilders rather than string. Does anyone have a good argument for this? I am feeling that when I bring it up, then this is a big struggle.

    First of all, I think it is not very cooperative for any other developer, just this There is no discussion about changing your code in the way. If you want to be dominant in this one, you definitely have to make a good case for your situation.

    I believe standard ASP.NET control is easy to deal with with less-experienced developers, if this is a matter of concern in your situation.

    I am not sure that I agree about stringbilders, which has often been the source of debates and elsewhere. If your list is not long, there will not be enough justification for stringbuilder here.

    One aspect is that an experienced developer can appreciate about this particular approach that it is easy to take this step and seeing that each object is getting populated, it is not easy with a ListView - You have to add an event to add the item, and then it will put a breakpoint in it.

    And in the end, I encourage you to choose your fight carefully this particular example is not a major design issue. If you look at the big differences of other differences in the future opinion, then you can decide to start here with a small issue to establish a way to resolve these kinds of conflicts with your fellow developer. Alternatively, you can consider that there is not a great deal to fight about it, and waiting for the key importance (and I suspect you have to wait long) how do you go ahead Choose, it depends on the individuals involved.


    artificial intelligence - Random Decision Algorithm -


    I am creating a simple AI and I am really new in this area. I need an algorithm to make decisions based on certain criteria; But with a little bit of randomness. What I'm doing so far is generating a random number and based on the different values ​​I found; Take different performance paths I somehow think that there is a better way to talk like this, can you give me some hints?

    I do not think there are "better way" than you, because the problem The description of is quite unclear, and whether it is actually an artificial intelligence problem or the simulation problem is not clear.

    For the part of the decision, a simple approximation system based on its underlying understanding of behavior based on the model based on) that is the sequence of conditional statements, possibly with some random factors, You can have a weighted average system to differentiate, which chooses many options, ranks them according to perceived quality, then being favoritism to better values. Chooses an option on Drichchik. (It is called roulette wheel selection or in genetic algorithm circles, but also very useful outside of GAs.)

    For the simulation part, you usually want to model this process and then more subtle Want to present the randomness for the model? Parts of the process, it clearly means defining your input (backhand power, ball direction, ...) and your output (ball travel vector?) And How they are related to each other means that you give some output of known values, and then you can modify them with your random number generator. If you are trying to model a person's choice rather than just a physical simulation, then things get more complicated, because often takes priority over all other inputs.

    A simple example I might start is that the player raises AI where he wants to hit the ball. I calculate the desired direction of the ball in the form of a vector which sends the ball exactly where the plan is made. The system then calculates a difficulty score of 0% to 100% on the basis of the direction of the ball, the speed, the ability of the player, etc. I generate an 'inaccuracy' launcher which generates a random number between 0% and difficulty%, which means that a perfectly easy shot will be completely accurate, while a half-hard shot 0% and 50% accurate Will be different between being. Then I calculate a random normal unit-length 3D vector, which adds to the impurity value, and in the desired direction. This means that more difficult shots will attempt to fly ahead of the goal.


    Editing table/adding records manually to sql server 2005 -


    Whether there is an option in SQL Server 2005 management studio to change the columns in a table and changes tables by the SQL commands Or put in.

    If so, can someone please show some instructions?

    Definitely you can.

    If you want to rename the column then you will need to use sp_rename to check out this link:

    However, a large The warning is: If you use this column from any stored procedures, functions, views, etc., then they are all going to break I am the Red Gate Software (Disclaimer: Yes, I work for Red Gate) Using a tool like SQL Refactor Advice convey that will change the name of the column with all other methods of your schema. You can get more information and download SQL Reporter:

    (This tool comes with a fully functional free trial of 14-day, if you You want to give it a revolution.)

    If you want to perform other actions, like adding or removing columns, you must use the ALTER TABLE statement (many examples at the bottom of this page) :

    If you want to change the data in a column You will need to use the UPDATE statement:

    Hope this helps, but if I misunderstood, please tell me.


    database design - SQL Join without multiple LEFT -


    मेरे पास एक एसक्यूएल डीबी

    वाहन, मरम्मत चार्ज, टो चार्ज,

    वाहन के लिए केवल 1 रिकॉर्ड ही होगा, लेकिन अन्य तालिकाओं के लिए कई रिकॉर्ड मेरी वर्तमान बायां OUTER काम में शामिल हो जाती है, लेकिन अगर इसमें शामिल सारणी में कई प्रविष्टियां हैं तो इसकी वापसी कई पंक्तियों में होनी चाहिए।

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

    संपादित करें: जवाब से, मुझे एहसास हुआ जैसे मैंने मूल रूप से सोचा, यह संभव नहीं होगा डिज़ाइन। इसी परिदृश्य को देखते हुए, आप इस से कैसे संपर्क करेंगे?

    अंतिम परिणाम प्रत्येक वाहन के लिए 1 लाइन दिखा रहा है और उसी लाइन में पहले रस्सा और मरम्मत प्रभार दिखाएगा, तो अगर अधिक रस्सा या मरम्मत शुल्क होते हैं, तो प्रत्येक के लिए एक नई लाइन दिखाएं इनमें से वाहन जानकारी को दोहराए बिना।

    नहीं , जब तक आप उपयोग नहीं करते एक AGGREGATE फ़ंक्शन, 1 से MANY में शामिल है MANY के लिए डिजाइन वापसी 1 के रूप में होगा।

    क्या आप विशिष्ट हैं, जैसे कि केवल latets, या सबसे महंगी वापसी।

    क्वेरी, और निर्दिष्ट करें कि आप में से कितने की आवश्यकता होती है।


    multithreading - Sharing a db connection between threads in a C# application? -


    I have received very little information on this subject, hoping that someone should give me some information and potential sample code But connection threads are not secure (SQL connections, MySQL connections and Oracle connections specifically mention that they do not securely thread.

    ).

    Do not share a connection between threads.


    asp.net - file upload control -


    ASP.NET file provides upload control ... Now if I want to upload files to my server What do I need to manage the file transfer protocol?

    no It does everything for you.


    c# - creating a custom attribute to control rounding behavior -


    I have a class with many decimal properties which is used for financial calculation, there are rules that complete each number How many decimal places are used to use when doing so. There is no global rule - some are two decimal places, some 0, some 8, etc.

    I am trying to find the easiest way to reach this. I want to spread the spherical logic all over my code. I know that I can write a custom setter for each property which rounds the value when specifying it.

    It looks like I can do with a custom attribute. However, I have not written a custom attribute before, and I can not find a good example that I want to do just as I do, so I can bark the wrong tree.

    Is this possible? If so, how is it a good example to approach?

    If not, should any other methods consider me other than custom setter?

    You can do this or with some other .NET-based AOP framework.

      [serialable] public class golgling: attribute: onmathboundary aspect {public override eventArgs} {base.OnExit (eventArgs); EventArgs.ReturnValue = Math.Round ((dual) eventArgs.ReturnValue, 2); }} Class MyClass {public double notarized {get; Set; } Public Double Round ({rounding}); Set; }} Class program {static zero main (string [] args) {var c = new MyClass {round = 1.99999, notarited = 1.99 99}; Console.lightline ("round = {0}", c.ounded); // writes 2 console.light line ("not rounded = {0}", c.NotRounded); // writing 1.99999}}  

    objective c - What is the reason behind giving Underscore in private header files of apple -


    I have several apples. H (Private API) has seen. Most variables / structures / beliefs / classes are in the form of prefix _.

      #import & lt; Foundation / NSVLH & gt; #important & lt; Foundation / NSBJCRTM H & gt; @ Class NSString; Typedef structure _NSRange {NSUInteger location; Length of NSUINTER; } NSRange;  

    My question is,

    what is the reason behind giving an underscore & amp; Re-type with the proper one?

    Objective-is globally open name space It is important that all names are unique, given first In addition to the reasons, Apple keeps all underscores for itself. This will help prevent accidental name collision.


    MDX Replace Range With Filter -


    Seeing the following answer I wanted to change the border with a filter.

    MDX: With member [remedy]

      is. [Kuluj] as zodiac ({[Date]. [Yakm]. [200 9 501]: [date]. [Yqm] & amp; ... [20090907]}, [remedy] [used]) on columns] All] .MEMBERS} on rows, {[remedy] [total used]}, {[color] [color [... [Cube]  

    I'm trying to change the date range with a filter like this:

      with member [remedy]. [TotalUsed] as Yoga ([Date]. [Yakm], [Date]. [Yakm] and lieutenant [Date]. [Yakm]. [[2009090]), [Measures]. [Used]) Select {[Tips]. [All] on lines [[cube] .MEMBERS}  

    What is the conditional statement to compare prices?

    A filter statement needs a SET and then filter An expression for You can leave this right inside your SUM function. The expression part of the filter can be almost anything, but it has to prove true / false for each cell in the SET.

    - Filter (Set, Experiment)

    It does not know how difficult your data is, but your statement will probably end like the following, your timer For those filing lines with 'Younus' less than 50, and then summarize them as an example. Members with [Measure] [TotalUsed] Yoga (Filter ([Date] [YQM] .members, [Measures] [unused] & gt;

    `

     From [cube] to [cube] to  
    from [all] .MEMBERS} [RUB]

    how to remove file name from VIM dictionary menu? -


    I have established a footnichnial dictionary in vyim so that I can get a list of dragon commands, when I press tabs partially Everything is working fine after typing command, every time the menu appears, there is a file name in addition to each command in the list. How do I remove that filename from the menu?

    plz, take a look at the picture: (copy and paste link when you click on the job)

    thanks

    I have not managed to solve it very beautifully, but by writing a custom completion function, there is an alternative solution that simply dictionary files for Grips matches:

      function! MyCompleteFunction (Search, Base) if: Give the lookup line = 'getline' ('.') Start = call ('.') - 1 while start> 0 and amp; Amp; Start the line [Start - 1] = ~ [[AZA-Z_] '- [1] - = 1 Finally start the return and give a call to the callgrap (a: base,' path \ to \ dictionary \ file ') [ =]  

    Note that I have defined a function DictGrep () which actually displays vimgrep. That's because I can say silently and can not be disturbed by error messages:

      function! Try DictGrep (leader, file) exe "vimgrep / ^" a leader. Define: "./JA" A: File Hold /.*/ Reverb "No Matches" Endry And Function  

    Then Full Set:

     Use the  setlocal fullfunc = MyCompleteFunction ()  

    and then to complete the insert-mode (which can be mapped to replace your current dictionary full binding).

    vimgrep may be slow to moderate, but I have not seen any problems, unless the dictionary file has hundreds of matches.

    Hope this will be helpful.


    java - How can I apply multithreading to the backpropagation neural network training? -


    For my university project, I am building a neural network that can classify the possibility of credit card transactions or not being fraud. I train with backpopigation. I am writing this in Java I would like to apply multithreading because my computer is a quad-core i7. It bugs me to spend hours training and see most of my core waste.

    But how would I apply multithreading to backpropagation? Backprop works by adjusting errors through the network. One layer should be done before continuing to the other. Is there a way to modify my program to backtrack me multicore?

    Firstly do not use backspace, there are many other options, I try RPR (flexible promotion) I am here. This will not be big of modification in your backpropagation algorithm. You do not need to specify the rate of learning or speed, in fact it's almost the same that you have a personal, variable, learning rate for each connection in the neural network.

    To make the much anticipated application for backspace, I have written an article on this subject.

    In fact, I prepare many threads and divide the training data so that there is a near equal amount of each thread. I am computing gradients in each thread and they have been summarized in the shortest stage. How the grading for the load applies depends on the promotional training algorithm, but the weight update is done in the important section.

    When you have a lot of training samples in your weight, the time spent in the code is important Important multi-threaded gradient calculation with section load updates

    I have some performance on the above link Provide results. It really gives speed to things!


    Using Spring.Net to inject dependencies into ASP.NET MVC ActionFilters -


    मैं अपने Spring.Net ASP.Net MVC नियंत्रक निर्भरता इंजेक्शन के लिए MvcContrib का उपयोग कर रहा हूँ। मेरी निर्भरताएं मेरे कस्टमअेट्रिटी एक्शन फ़िल्टर में इंजेक्ट नहीं की जा रही हैं

    कहें कि आपके पास एक एक्शनफ़िल्टर है जो ऐसा दिखता है:

      सार्वजनिक वर्ग कस्टम विशेषता: एक्शनफ़िल्टर ऐट्रिब्यूट, आईस्कस्टअट्रिबेट {निजी आईएवम्सस् सर्विस भयानक सेवा; सार्वजनिक CustomAttribute () {} सार्वजनिक CustomAttribute (IAwesomeService भयानक सेवा) {this.awesomeService = awesomeService; } सार्वजनिक ओवरराइड शून्य OnActionExecuting (ActionExecutingContext FilterContext) {// कुछ काम करें}}  

    एक Spring.Net विन्यास अनुभाग के साथ जो ऐसा दिखता है:

      & Lt; वस्तु आईडी = "कस्टम गुण" प्रकार = "Assembly.CustomAttribute, विधानसभा" एकलटन = "झूठी" & gt; & Lt; constructor-arg रेफरी = "AwesomeService" / & gt; & Lt; / वस्तु & gt;  

    और आप इस तरह की विशेषता का उपयोग करते हैं:

      [कस्टम] सार्वजनिक FooController: नियंत्रक {// कुछ कार्य करें}  
    "post-text" itemprop = "text">

    यहाँ कठिन हिस्सा यह है कि एक्शनफिल्टर प्रत्येक अनुरोध के साथ और एक संदर्भ में नया हो सकता है जो कि बाहर है स्प्रिंग जागरूक है मैंने अपने एक्शनफिल्टर कन्स्ट्रक्टर में स्प्रिंग "कंटिक्टेक्स्ट्रिस्ट्री" क्लास का इस्तेमाल करते हुए उसी परिस्थितियों को संभाला। दुर्भाग्यवश यह आपके कोड में स्प्रिंग विशिष्ट एपीआई उपयोग को पेश करता है, जो संभव हो, से बचने के लिए एक अच्छा अभ्यास है।

    यहां मेरा कन्स्ट्रक्टर कैसा दिखता है:

      सार्वजनिक MyAttribute () {CustomHelper = ContextRegistry.GetContext ()। GetObject ("कस्टमहेलर") IConfigHelper के रूप में; }  

    ध्यान रखें कि यदि आप एकाधिक स्प्रिंग संदर्भ लोड कर रहे हैं, तो आपको निर्दिष्ट करना होगा कि आप GetContext (...) विधि में किस संदर्भ को चाहते हैं।


    http - How to submit a form with more than 1 submit button. Sending a POST to a website. (Python) -


    I am using a script that can log on to a website and submit a form. However, there are 3 submit buttons (preview, post, and cancel) in this form. I'm only using one button ...

    This form is:

      & lt; TextControl (subject =) is it good for the holidays? New technology?) & Gt; & Lt; IgnoreControl (thread = & lt; no & gt;) & gt; & Lt; TextareaControl (Message = New to Technology shares.) & Gt; & Lt; SelectControl (identity = [* annamae41g]) & gt; & Lt; Radiocontrol (E = [5, 4, * 3, 2, 1, 0]) & gt; & Lt; SubmitControl (Submit Preview = Preview Message) (Read Only) & gt; & Lt; SubmitControl (Submit Submit = Post Message) (Read Only) & gt; & Lt; SubmitControl (SubmitCancel = Cancel) (Read Only) & gt; & Lt; Hidden Controls (Action_btn =) (Read Only) & gt; & Lt; Hidden controls (_charset_ =) (read only) & gt; & Lt; Hidden Controls (.crumb = 4DxnFEwMIGG) (Read Only) & gt; & Lt; Hidden controls (R = / stock_ (A_to_Z) / stocks_g) (Read Only) & gt; & Lt; Hidden Controls (BN = 25263) (Read Only) & gt; & Lt; Hidden Controls (& lt; None; = annamae41g) (Read Only) & gt; & Gt;  

    And this is my code:

      br.open (newtopic_url) br.select_form (name = "postmsg") br.form ['subject' ] = "Is it good for the holidays? Anyone knows about new technology?" Br.form ['message'] = "IM technology is new in stock." Br.form ['e'] = ['3'] br.form ['identity]] = [' annamae41g '] print br.form br.submit ()  

    if i Run this script ... it will not work. Nothing happened. I'm assuming because there are 3 submit buttons in it? Or is it another issue?

    I had problems similar to yours.

    First, Mechanize was using only the first button, could see me using the answer to the server

     . Feedback = Browser.Submit () Print feedback. Reid ()  

    To submit the mechanic function, enter the submit button name as the parameter, and it worked!

      response = browser.submit ("submit")  

    Test it, it should work for you too!


    Not able to access IIS deployed asp.net application from remote systems -


    I have deployed an ASP.NET (2.0) application in IIS. I am able to use the link for application from my system.

    Can anyone tell me what the problem might be?

    Thanks

    Did you check your OS to make sure Is there no firewall on it?

    To add an opening for port 80 in the Window firewall on your machine, run the following from the elevated command window.

      Netset firewall portoping protocol = TCP port = 80 name = HTTP  

    If you are running a third party firewall, Want to consult documenation, do the same thing. Just open port 80 for your machine, do not disable the entire firewall.


    How do I set up a non .war based app in Tomcat? -


    I want to run something outside the rootkit of Tomcat, I used to do it in Tomcat 4, but present it The version is not understood.

    I am pretty sure that this is to create a folder which is a brother for the root and this is a web.xml file that is going to identify the web path ... but I can not get the correct syntax .

    Is anyone easy to do this?

    Very forceful if you do so.

    look

    In short - you get a & lt; Context & gt; Specify the element in your configuration, and specify a docBase point to your desired directory.


    objective c - not preparing insert query -


    यदि (insert_statement == शून्य) {

      स्थिर char * query = "INSERT Iteminfo (आइटम का नाम, दोस्ती) मूल्य (?,?) जहां itemid =? "; यदि (sqlite3_prepare_v2 (डेटाबेस, क्वेरी, -1, & amp; insert_statement, NULL)! = SQLITE_OK) {NSAssert1 (0, @ "त्रुटि: संदेश '% s' के साथ वक्तव्य तैयार करने में विफल रहा।), Sqlite3_errmsg (डेटाबेस)); }  

    मैं उद्देश्य सी प्रोग्रामिंग के लिए नया हूँ ....

    मैं इस कोड की कोशिश कर रहा हूं, जहां पर शर्त के आधार पर डेटाबेस में कुछ मान डालें, लेकिन निडर स्टेटमेंट तैयार करने में अपवाद जो मुझे मिल रहा है वह है "अपवाद अपवाद के कारण ऐप रद्द करना 'NSInternalInconsistencyException', कारण: 'त्रुटि: संदेश के साथ वक्तव्य तैयार करने में विफल' 'WHERE' 'के पास: वाक्यविन्यास त्रुटि'। '< / Strong> "कृपया मुझे इस से बाहर ... मुद्दा ..

    आप उपयोग नहीं कर सकते एक WHERE क्लॉज के साथ INSERT - INSERT एक नई पंक्ति जोड़ती है, मौजूदा किसी को अपडेट नहीं करता है शायद आप को अपडेट करना चाहिए?


    php - Can I post data without using submit button -


    I'm in a position using two submit buttons on the same page. What is the option to post data without using the submit button?

    If you do not want a submit button, you can also use the link.

      & lt; A href = "#" onclick = "submit_form (); Return Back;" & Gt; Submit & lt; / A & gt; & Lt; Script & gt; Function submit_form () {document.form_name_here.submit (); } & Lt; / Script & gt;  

    css - How to middle vertical align a radio button against an image in html? -


    मेरे पास 100x100 की एकाधिक छवि है।

    यह कोड है:

      & lt; div & gt; & Lt; इनपुट प्रकार = "रेडियो" नाम = "तस्वीर" मान = "1" /> gt; & lt; img src = "pic01.jpg" / & gt; & lt; br / & gt; & Lt; इनपुट प्रकार = "रेडियो" नाम = "तस्वीर" मान = "2" /> gt; & lt; img src = "pic02.jpg" / & gt; & lt; br / & gt; ....  

    और इतने पर ... लेकिन समस्या यह है कि रेडियो बटन लाइन के निचले भाग में रेंडर करता है और मैं इसे छवि के ऊर्ध्वाधर बीच में आना चाहता हूं । style = "vertical-align: middle" और यह काम नहीं करता है।

    कोई भी विचार?

    इनलाइन तत्वों पर लागू होने पर, निर्दिष्ट करता है कि मूल तत्व के एक निश्चित हिस्से को माता-पिता के लाइन बॉक्स के संबंधित हिस्से में कहाँ संरेखित करें। उदाहरण के लिए, "मध्यम" लगभग प्रत्येक के मध्य भागों को संरेखित करता है यदि आप दो भाई-बहनों को संरेखित करना चाहते हैं, तो आपको दोनों के लिए एक ही ऊर्ध्वाधर संरेखण को लागू करना होगा, अन्यथा तत्व मूल आधार रेखा से संरेखित होगा।

      & lt; शैली प्रकार = "पाठ / सीएसएस "& gt; इनपुट [प्रकार = "रेडियो"], इनपुट [प्रकार = "रेडियो"] + लेबल img {vertical-align: middle; } & Lt; / style & gt; & LT; ul & gt; & Lt; li & gt; & Lt; input type = "radio" name = "pic" id = "pic1" मान = "1" / & gt; & Lt; label for = "pic1" & gt; & lt; img src = "pic1.jpg" alt = "pic 1" / & gt; & lt; / लेबल & gt; & Lt; / li & gt; & Lt; li & gt; & Lt; input type = "radio" name = "pic" id = "pic2" मान = "2" / & gt; & Lt; label for = "pic2" & gt; & lt; img src = "pic2.jpg" alt = "pic 2" /> gt; & lt; / लेबल & gt; & Lt; / li & gt; & Lt; / ul & gt;  

    Filemaker to SQL Server via SSIS -


    I am using SSIS and trying to import data from Filelmaker into SQL Server. In Solution Explorer, I right click on "SSIS packages" and select the SQL Server Import and Export Wizard. "During the process, I use my DSN as a source, use SQL Server as destination, file macer, and mapping.

    Every time I run a package I get the following message, then I get the following message: "Output column" is not the length length in "Lastname" (12) "The length should be between 0 and 4000.

    Do not understand, but document for ODBC In h: (p. 47) It says:

    "The maximum column length of the text is one hundred thousand letters, unless you specify a small maximum number of characters for the text field in file macer. FileMaker returns empty strings to empty space. "

    I think the data type is too big when trying to convert it to varchar. But even after using a query of SUBSTR (LastNameFirst, 1, 2000), I still get the same error

    Any suggestions?

    I had this problem, and the reason Do not know, but these are the steps from which I get an outrageous row:

    - The filemaker, export the data to CSV - Open the CSV in Excel - the latest name Double click on the Est column to maximize its width - As long as you see '#########' Columns', the scroll shows below that the data displayed is huge.

    I'm sure it's better that way, and I'd love to hear it!


    Selenium use a Tree class for expanding/clicking a node in a tree made with RichFaces -


    Selenium R.C. I need to expand / click one node in the tree with RichFaces. I have done a TreeUtil class, but at this point I am not sure how to click / expand on a node (which I will do with this xpath Receives: "// div [@ id = 'foo: classTree'] / div / div / table [" + node + level + "] / TDI / TR / TD / DIV / A") is used only for one node And a nodelevel

    Anyone have any ideas?

    Your question is not very clear to me: they are not working with click commands (with aappath) Because those results are in the "element not found" errors or because the click is not just expected of your behavior?

    If this is an element, found point, I recommend that you use the $ x function of firebug in the console to refine your XPath. You can run this function call in the firebug function to see what XPath is actually evaluating:

      $ x ("// div [@id = \" foo: This is the best way to understand XPath accurately where XXX is some index; classTree \ "] / Div / div / table [XXX] / tbody / tr / td / a")  

    If the problem is that the clicks are not actually to change the tree map, then click () to fire ("/ / Xpath", "click") and see if It helps.


    php - 18 digit timestamp? -


    I am working on a system related to TV recording.

    I am parsing the following XML from one system (to which I have no documents):

       

    My question is, does anyone know the timestamp format of startup and stoptime? I generally thought the timestamps for the second was 10 points, so where are the other 8 coming from? My guess is something like the time zone and millisecond accuracy.

    I'm using php in a specific manner, but nothing is good so php would be good to change it to a datetime.

    itemprop = "text">

    It looks like the date time of C #:

    this line:

      console Virline (new date time (633 9 836042047633656));  

    Print:

    2009/11/12 06:30:04

    You have to convert Unix time, those 621355968000000000 L, which is the unix era expressed in ticks , those numbers needed.


    java - Is it possible to create an "uber" jar containing the project classes and the project dependencies as jars with a custom manifest file? -


    I am trying to create an executable jar (using Maven) which contains the project class and this is the manifest file Dependency is the entry for the main class and class path entry which indicates the dependency packaged in the root of the jar; Something like this:

    Manifest file:

     .... Main category: com.acme.MainClass class-path: dependecy1.jar dependecy2.jar ..... 

    Jar:

     Jar-Route | - .... | - com / acme /../*. Class | - Dependency 1 .jar `- Dependency .2.jor 

    Maven-Shade-plugin but dependencies have been unpacked for creating a manifest file and creating" Uber "Jar and using my Jar Classes have been added in the form of

    Actually, I did not check that maven-shade-plugin is absolutely (Or any other plug-in) because everything has been built to make megazar or uberjar in Maven 2. You just have to use maven-assembly-plugin with predefined jar-of-dependency descriptors.

    To customize the manifest: just add this snippet to your pom.xml

      & lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven-assembly-plug-in & lt; / ArtifactId> & Lt; Configuration & gt; & Lt; Collections & gt; & Lt; Appearance & gt; & Lt; MainClass & gt; My.package.to.my.MainClass & lt; / MainClass & gt; & Lt; / Reveal & gt; & Lt; / Collection & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt;  

    and the following command will generate your uberjar:

      mvn assembly: assembly-ddescriptorId = jar-of-dependence  

    But, again, this is to open the default behavior dependency of the descriptor (e.g. Maven Shade-Plugin). To be honest, I do not find why this is a problem, but if you really do not want it, you can use your own custom assembly descriptor. To do this, first, create your assembly statement, let's assume that src / assembly / uberjar.xml , with the following content:

      & lt; Assembly & gt; & Lt; ID & gt; Uberjar & lt; / Id & gt; & Lt; Formats & gt; & Lt; Format & gt; Jar & lt; / Format & gt; & Lt; / Formats & gt; & Lt; IncludeBaseDirectory & gt; False & lt; / IncludeBaseDirectory & gt; & Lt; DependencySets & gt; & Lt; DependencySet & gt; & Lt; Open & gt; False & lt; / Shell> & Lt; Scope & gt; Sequence & lt; / Scope & gt; & Lt; UseProjectArtifact & gt; False & lt; / UseProjectArtifact & gt; & Lt; / DependencySet & gt; & Lt; / DependencySets & gt; & Lt; Fileset & gt; & Lt; Fileset & gt; & Lt; Directory & gt; $ {Project.build.outputDirectory} & lt; / Directory & gt; & Lt; OutputDirectory & gt; / & Lt; / OutputDirectory & gt; & Lt; / Fileset & gt; & Lt; / Fileset & gt; & Lt; / Assembly & gt; After that, configure the maven-assembly-plugin to use this scanner and add the dependency to the entry of the  class-path  manifest: 

      & lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven-assembly-plug-in & lt; / ArtifactId> & Lt; Configuration & gt; & Lt; Descriptor & gt; & Lt; Descriptor & gt; Src / assembly / uberjar.xml & lt; / Narrator & gt; & Lt; / Narrator & gt; & Lt; Collections & gt; & Lt; Appearance & gt; & Lt; MainClass & gt; My.package.to.my.MainClass & lt; / MainClass & gt; & Lt; AddClasspath & gt; True & lt; / AddClasspath & gt; & Lt; / Reveal & gt; & Lt; / Collection & gt; & Lt; / Configuration & gt; & Lt ;! - & lt; Executions & gt; & Lt; Execution & gt; & Lt; Step & gt; Package & lt; / Step & gt; & Lt; Goals & gt; & Lt; Goal & gt; A & lt; / Target & gt; & Lt; / Targets & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; - & gt; & Lt; / Plugin & gt;  

    Finally create your uberjar to run mvn assembly: assembly

    Alternatively, package to cancel the executions element (and the assembly has been produced as part of normal construction).


    c# - Create Master/Detail with Combobox and DataGridView -


    I have a combo box, in which an escalator is the elements loaded from the table (group). I have a datagrid view, which is linked to another table (users).

    When I load the form, the combo is filled with the group, and the datagrid is filled with Visible Users (all users)

    1) I want to be able to select a group from the combo box (dropdownlists), and then to refresh the datagrid view with users of that selected group ...

    2) and how do I get an insertion link in DataGridView Can I eat Suppose I want to show the name of the group in the last column of each user ...

    PS:

    I have an xsd dataset In my VS2008 project, its corresponding Table Adapters (GroupTable Adapter, UserTable Adapter) and some SQL-methods were added to each adapter.

    1) Set a binding source for both tables.

      Binding source bsGroup = new binding source (); Binding source bsUser = new binding resource (); BsGroup.DataSource = MyDataSet.Tables ["Groups"]; BsUser.DataSource = MyDataSet.Tables ["User"];  

    2) Set up your combo and grid data source.

      MyCombo.DataSource = bsGroup; MyCombo.DisplayMember = "GroupName"; // whatever your column is MyCombo.ValueMember = "GroupID"; MyGrid.DataSource = bsUser;  

    3) Set up a chosen index change event for the combo and use it to change the filter on the BSUSIR binding pool.

      MyCombo Selected index - + new system .EventHandler (MyCombo_SelectedIndexChanged); Private Zero MyCombo_SelectedIndexChanged (Object Sender, System.EventArgs E) {// This will depend on your column names, clearly string filter = string.Format ("GroupID = {0}", MyCombo.SelectedValue); BsUser.Filter = Filter; }  

    This work has been taken from OK ....

    (Yes, I also posted it on MSDN because I was in haste)


    linq - C# Grouping numbers another way -


    संख्याओं को समूह करते समय, मैं

      स्ट्रिंग [] संख्याओं = {"123", का उपयोग करता हूं। "34555", "91882", "100", "7823", "1111", "76551"}; Var query = अंकों में अंकों से अंक अंक अंकों के आधार पर। ByDigit में लम्बाई नई {अंक = बाईडिगिट, लंबाई = बाईडिग। के} का चयन करें;  

    जब मुझे लगता है कि

    var query = numbers.GroupBy () ( मुझे इसका नाम कैसे पता है, इसका उपयोग करना है यह विस्तार करने वाली चेनिंग है?)

    यह करने का तरीका क्या है?

    I 'मैं यह सोच रहा हूं कि आप जानना चाहते हैं कि एक ही बात करने के लिए विस्तार विधियों का उपयोग कैसे करें। इस मामले में यह

      var query = numbers.GroupBy (n = & gt; n.Length) होगा। चयन करें (n = & gt; नया {अंक = n, लंबाई = n.Key} );  

    java - JUnit: pause for user input -


    I'm learning JUnit Since my app contains graphical output, Examinations or exams fail on the basis of what I see. It should wait for a while, if unsuccessful, will fail.

    Is there a way to do this within a junit (or its extension), or should I just throw a dialog box and say output? It seems that this can be a common problem with an existing solution.

    Edit : What should I do if I should not use JUnit for this? I want to manually verify the build manually every so often and want to do the unit testing automatically, and if it gets two test frames it would be great.

    Manually accept / reject a test defeats the purpose of using an automated testing framework No such thing is made for the goods unless you find a way to create and injection of the mockup of the object that represents your output device, you should consider the option (actually no one is sorry ).

    Once I have a video decoding component. I referred the decoded data as a file using another decoder, and then using the pair of images compared to the output of my decoder, it is not 100% self contained (resources as external Files required), but at least automatic, and worked fine for me.


    .net - Testing whether item is visible in virtual ListView -


    I am using a ListView control in virtual and master mode to display a number of items. Is there a way to test whether a certain object (within the customer's area of ​​control) attracts, triggers without a drag event or a retrieval event event?

    The problem is, I have a background thread that connects periodically to more items in the list view but for some reason, every time I add more items (VirtualLSIs Virtual), this past Turns on a recovery virtual item for the item, even if it's not anywhere near the view threshold. And, of course, I only want to attract items that are actually visible.

    Any thoughts?

    On virtual lists, Windows runs the retrieveVirtualItem program in many codes - and They are different between XP, Vista and Win 7.

    If your goal is to reduce the number of Recover Virtualization , then you are out of luck.

    If your goal is to reduce the number of redraws required for your owner draws rows, then you can better and more precisely optimize the reconstruction. For example, you can capture the rectangle of the damaged area in the WM_PAINT event, and then use it to determine whether the subtitle was damaged.

    Or you can use - an open source casing around an NIT WinForms ListView - which is already dealt with this problem if you are allowing horizontal scrolling and rearranging columns You want to use > ObjectListView - Reason for reasons.


    math - how to "mix" two numbers into one hex-string -


    How is a code generated in two numbers, when you know this code and one of the numbers Can it be lowered? For example, you have two numbers: 983 and 2303 and you "mix" it in "hex string": 4b17a190bce4ea32236b98dd . When you know the first number and this hex string you can be lowered to the second number. But when you know the second number and hex-string, you can not get to the first number. How to do this

    One of the easiest and really unsafe meditations) The method of doing this:

    < Pre> int number 1; Int number 2; Int key; // Convert words (we know number 1 and number 2 and we want to know the key) number 1 = 983; Number 2 = 2303; Key = number 1 ^ number 2; // decode (we know number 1 and key and we want to know number 2) number 1 = 983; Number 2 = key ^ number 1;

    Again (to avoid downvouts) this method breaks for some by seconds, it works for unknown users (like there is no math or programming background ).


    database - DB Architecture : Linking to intersection or to main tables? -


    I am creating a fantasy football system on my website, but I am very confused about how to give me some table I should add

    Tables

    The main table is pool , which contains all information about the decision of the fantasy drafting.

    A standard table user , which contains general content. Paste table named

    pools_users in which id, pool_id, user_id because one user can be in more than one pool, and more than 1 in a pool There are users.

    Problem

    Table Selection => This is the table that is causing the problem. It is a choice that the user To choose. It is related to player but is not relevant to this problem.

    Should I link this table to Pool Pool_UJs or I should link it to the main table pool and user. In this table, id, pool_id, user_id, player_id, ...

    What is the best way to link my tables? When I want to recover my data, I usually want to divide information by users. "This user has those selections, those selections, etc.).

    What is a pool? This is a league, which is a group of teams competing against each other? The reason I ask, it seems that you have a unit, which has intelligence, Team ** (*) ** .

    To some extent this decision depends on the rules of the fashion football game you are running, but in my experience, most game users Allows the coworkers to take part in many leagues (? Pool?), But to manage only one team. For a relationship between the users and the teams. Once we see it in this way, it is clear It is possible that there should be an intersection table between the election teams (users) and the players.

    If a particular set of rules is set to a user, then you should merge two entities in a table. A - which I choose to call managers, because it fits better to the domain, but your decision is yours;).


    regex - Highlighting Palindromes using Javascript -


    I want to highlight all 6 letters palindromes displayed on a webpage. I got this Javascript function and I think I have it. Accordingly has been adapted accordingly.

      function highlight () {var query = new RegExp ("([ATCG]) ([ATCG]) ([ATCG]) (\\ 3) (\\ 2) (\\) 1) "," Jim "); Var E = document.getElementById ("Search Text"). InnerHTML; Var Envel = E. Location (/ (< | ) / igm, ""); Document.getElementById ("Search Text"). InnerHTML = enew; Var newe = enew.replace (query, ""); Document.getElementById ("Search Text"). InnerHTML = newe; }  

    When I run the function (clicking on the link) does not highlight any text. It works if there is just put a regular string, so I thought it was regular Expression is giving the problem but tested it online and found that it works.

    breakdown of another intuivite , which includes upper and lower case matches:

      Function Highlabel () {var e = document.getElementById ("Search Text"); E.innerHTML = e.innerHTML .replace (/ ( 

    try it below

      function highlabel () {var e = document.getElementById ("searchtext"); E.innerHTML = e.innerHTML .replace (/ ( 
      Duration {Background: #FF9; Color: # 555;} body {font family: aerial, helvetica, sans-serif; Padding: 0 1AM;} P {margin: .8 AM 0}}  
      & lt; Div id = "searchtext" & gt; & Lt; P & gt; Javascript is a programming language of the web, on the great CGTTGCAATTAAGGCCGG browser, desktop, game consoles, tablets, and smart phones- JavaScript Pulpap interpreters are included in the first class tasks by planning, using rules, using this book and learning to have JavaScript . & Lt; / P & gt; & Lt; P & gt; The name oooooooooooooooooo "javascript" is actually somewhat misleading rerrer & lt; Period & gt; Except for the & lt; / Span & gt; To become a strong and efficient general purpose language for a scripting-language fraction roots. & Lt; / P & gt; & Lt; / Div & gt;  


    regex - regular expression multiple matches -


    For reference, this is the regex tester I am using:

    I How to modify this regular expression: To get several sub-matches for the following test string: <^ >> [^;] +

     ; First; second; Third; Fourth; Fifth and sixth; Seventh;  

    I currently only get a sub-match:

      first  

    Actually, - I want to ; Consistent with the content between the characters, I am expecting a sub-match list like this:

      First Second Third Fourth Fifth and Sixth Seventh   

    However, this motivates me to solve my problem in a little different way. I came up with this regular expression that still gives only a match, but the number near the end works as the index for the desired match, for example:

      ( ?: ([^;] +)) {5}  

    My exam matches the string with this question:

      Fifth and sixth < / Code> 

    However this solution allows me to achieve what I want - though in a different way - the correct answer to my question is Found in Ha's comments more specifically to:

    I can how regular expressions modified to get all over-the-match?

    The answer is, you can not modify

    But I specifically targeted rsyslog regular expression system.


    c++ - Why does this not ask user for another input? -


    This part of a large project is now asking the user for a string, how many words are counted in it, print the # words Ask the user if they want to do it again, if they want, ask for the second string, and so on. But it works just fine for the first time, after this, it answers yes / no as a test / string. For example: I like coding I 3. Again? Yes no Yes. 1. Again? Yes / No ... Can anyone tell me how to fix this disturbance?

      #include & lt; Iostream & gt; #include & lt; String & gt; using namespace std; String origin [10] = {"hello", "sir", "madam", "officer", "stranger", "where", "is", "the", "mine", "yours"}; The translation of the string [10] = {"Ahoy", "mate", "proud beauty", "folg bloggart", "scurvy dog", "white", "b", "and" "," m "," yier "}; String input; string ans; boole pledge () {cout  yes / no:"; cin> "ans; if (ans.compare (" yes ") = = 0) {return true;} if (ans.compare ("no") == 0} {return false;}} int getNumOfWords (string input) {int numOfSpaces = 0; string current; for (int i = 0 ; I & lt; input.length (); i ++) {current = input.at (i); if (current.compare ("") == 0} {numOfSpaces ++;}} NumOfSpaces + 1;} Zero play (string input) {int numOfWord S = getNumOfWords (input); Cout & lt; NumOfWords & lt; endl;} zero start () {getline (cin, input); play input;} int main () {playing bulg ; Play {start (); play = playgain ();} while playing); return 0;}  

    When the input reads from cin.getline () , a new letter has been omitted in the input stream, so it does not read your C string. cin.ignore () Use boring calling getline ()

      zero start () {cin.ignore (); Gateline (pin, input); Play (input); }  

    javascript - EJS templating language internal logic fails somehow -


    I'm partially using EJS and I'm just getting a bug that I understand after wasting a few hours

    Title_popover: sentence.Nickname, content_tag: '#' + sentence.namename, icon_popover: 'http://placehold.it/64x64'})% & gt; & Lt;% - Partial (see__partypath ('tag_popover'), {title_popover: 'last modified', content_tag: '#' + sentence.sentenceId})%>

    Here is the tag_popower partial:

      & lt;% / ** * dynamic title, a standalone tag with content Creates and popover for additional content * * @ Ultimate class_tag css classes ['tag'] * @ ultimate content_tag tag content * @ ultimate icon_ popup icon icon. [No one] * @palm title_popover popup title will be displayed. * / Title_popover = typeof title_popover! = 'Undefined'? Title_popover: '' class_tag = typesof classes_tag! = 'Undefined'? Classes_tag: 'tags' icon_popover = Type icon_popover! = 'Undefined'? Icon_popover: wrong content_tag = type of content_tag = 'undefined'? Content_tag: ''%> & Lt; Li class = "& lt;% = classes_tag%>" Title = "& lt;% = title_popover%>" & Gt; & Lt; A href = "#" & gt; & Lt;% = content_tag% & gt; & Lt; / A & gt; & Lt;% - Partial (see ___ Pattern ('popover_revration_translation'), {icon_popover: icon_popover})%> & Lt; / Li & gt;  

    and finally popover_revision_translation partial:

      & lt;% / ** * dynamic title and body with a healthy Makes popover * * @imove icon_tag icon [none] * / icon_popover = icon_popover! = 'Undefined'? Icon_popover: ''%> & Lt;% console.log ('----------------------' + Type icon_popover)%> & Lt;% console.log (icon_popover? True: incorrect)%> & Lt; Div class = "custom-popover-content hiding" role = "see" and gt; & Lt;% if (icon_popover) {%> & Lt; Img src = '& lt;% = icon_popover% & gt; / & Gt; & Lt;%}% & gt; & Lt; Period & gt; The & lt; / Span & gt; & Lt; / Div & gt;  

    So basically, I set my tag_popover partially once, once icon_popover and once code_popover . But it shows the icon twice on the first element, but on the other, where I do not want anyone.

    So, I have some console.log to help me understand what's happening because I set the icon only Is done, and set to be set to false if set to undefined: icon_popover = typeof icon_popover! = 'Undefined'? Icon_popover: false .

    Here are the server logs:

      ------------------- ------- String truth -------------------------- Boolean False  

    So basically whether this string < / Code> or false , this is my if statement & lt;% if (icon_popover) {%> And I do not understand why that is why.

    I did more tests, like & lt;% if (icon_popover! == incorrect) {%> or & lt;% if (icon_popover === 'http://placehold.it/64x64') {%> And in both cases I get the same result.

    So I do not really get it and I think it may be related to some EJs internal issues or caching, but anyway it's really weird that the log looks something which seems logical But it does not ...

    There is no dark magic here :)


    android - How can I use both Realm.io and Dagger (or any multiple dependencies that need annotation processing)? -


    I'm trying to use both in my and my Android app, but I think that Meta-INF / Services / javax.annotation.processing.processor file

    I tried to add the following to my build.gradle file:

      packaging option {pickup 'Meta-INF / Services / JavaX. Annotation. Prositing. Processor '}  

    and also tried it with exclusion , but I get errors like this annotation processor to get any project Not being played in.

    The error I'm running in is standard class for module adapter can not be loaded.

    I think this is happening, because the two annotation processors are not being kept, one or the other package will not be processors, but I can be away from the way.

    Your interpretation processor should not be in your compilation dependency scope; Then is provided or, if you use it, then apt .

    It does not look like real-M separates its annotation processor as they should, so that one will need to live in its compilation class, but the dagger can move to provide the compiler.

    It looks like this:

      compile 'com.squareup. Dagger: Dagger: 1.2.2 'Provided' com.squareup.dagger: Dagger-compiler: 1.2.2 'Compile' io.realm: realm-android: 0.87.1 ' 

    The provided (or appropriate) scope makes dependencies available to your compiler, but they are not included in the final product, for which they are not necessary. The dispute you are running in is in the Dex process, but those These sections will never find classes in sections

    this will have your last APK An additional benefit of reducing the size too.


    javascript - Troubleshoot script to maintaining/updating Google Calendar with Google Spreadsheet including automatically changing colors -


    I am trying to write Google app scripts to complete the following:

    • Update a Google Calendar based on a few columns in a Google Spreadsheet that indicates:

    • a what event has a specified date (column "date"! = "")

    • b. Whether that event has already been posted to the calendar ("in column" "column" = "").
    • Once the event has been added to the calendar, then I want to add "Yes" to the column spreadsheet ("Columns" in the column).
    • If possible, the color of the event automatically changes based on the attributes in a particular column (i.e. if "state" = NM column, then the color of the event is blue, if "state "= MT, then the color of the event is purple, etc.)

    I have seen various postings (mainly and) on the web,

    I have the following script Has been hobbled with:

      var IN_CAL =" yes "; Function caltest () {var sheet = SpreadsheetApp.getActiveSheet (); Var startRow = 2; // the first line of the data process var data = sheet.getDataRange (). GetValues ​​(); // Process any rows with data cal = CalendarApp.getCalendarsByNa me ("Oil and Gas Test 3") [0]; (In data i) {var row = data [i]; Var state = line [2] // column 3, call state with desc desc = line [5]; // column 6 column, with strap description var date = row [4]; // 5 column, date with column var title = state + ":" + desc; Var inCalendar = line [1]; // The second column, indicating whether or not in the calendar, if ((inCalendar! = IN_CAL) & amp; amp; (date! = "")) {// prevents adding duplicates in calendar cal. All data events created (title, new date (date)) var v = parseInt (i) +1; Sheet.Getrenz (V, 2, 1) .setValue (IN_CAL); SpreadsheetApp.flush (); // Make sure that the cell is updated immediately when the script is interrupted}}}  

    If it helps, then the column My spreadsheet is in the following order:

    Project Number | In the calendar | State | Lease date Date | " State ", " Date ", and " Details " in my script

    It seems that most of the work is done that adds an event to the calendar, except that:

    1. For scripting "All these calendars" in the column "Yes "Whether or not the" Date "column has a date; And
    2. I have not even tried to adjust the colors.

    Do anyone in the "Calendar" and "Date" column decide when an event should be created and the "Calendar" column should be updated in "Yes" ? I know that an event probably will not be created without a date, but I do not want a date without the lines to read "yes" in the "calendar" column. I read the script in the entire "In Calendar" column Want, in which a predetermined There are no rows.

    Also, how can the colors of personal events change automatically?

    Please tell me if you need additional information.

    Add a breakpoint, by clicking on a line number, your code. You will get a red dot, see Line 12.

    breakpoint

    Then click the icon of a bug.

    b C

    You will see all the variable values ​​being displayed in a window at the bottom of the screen.

    debug breaks

    Click on the 'step in' icon :

    in phase

    if the date in your spreadsheet cell Formatted as a date, then the date value should be something like this:

    Thursday 12 March 2015 19:01:08 GMT -0400 (EDT)

    If the cell is formatted as a string, then the test should be like this:

      if (date! = "") {<>>  

    But, any In the situation, take the steps through the code, and see the data type and value of the date variable. (And inCalendar variable), depending on what exactly is being received, will determine what you need to do with the condition.

    I think:

    << code> = <">

    always True


    javascript - ngRoute not instantiated by karma -


    Do someone before me (using the module ()) and before each (injection ()) One way to find out the main description of my unit test ()?

    When I include both

      first (module ('NGRUT'));  

    and

      first each (injection (function () {}));  

    In my test file's main description (), I get this. However, if I delete the first (inject () {}) code first, then ngRoute is loaded properly by Karma.

    I have examined many other posts related to this issue. Like:

  • As per the above questions, make sure I have made That angular routes Js has been included in my index.html and I have also ensured that 'ngRoute' is the dependency of my app.

    Test file:

      Define (['ngmock', 'controllers / home / main-home-CTN'], function } {'Strict use'; only describe ('Controller: mainhouse controller', function) () (), (), (function (), before function () () (module ('ngRoute')) (Injection (function () {}); after each (function () {}); {});});});});  

    karma.config.js:

      files: [[Pattern: 'www / js / bootstrap.js', Includes: Incorrect}, {Pattern: 'www / js / lib / *. JS ', included: wrong}, {pattern:' www / js / controller / *. JS ', included: Incorrect}, {Pattern:' www /js/controllers/**/*.js ', includes: wrong}, {pattern:' www / js / instructions / *. JS ', Includes: Incorrect}, {Pattern:' www / js / directions / ** /*.js ', includes: Incorrect}, {Pattern:' www / js / factories / *. JS ', included: wrong}, {pattern:' www / js / factories / ** / *. JS ', included: wrong}, {pattern:' www / js / filter / *. JS ', included: wrong}, {pattern:' www / js / filter / ** / *. JS ', included: False}, {Pattern:' www / js / services / *. Js ', contains: wrong}, {pattern:' www / js / services / ** / *. Js ', included: wrong}, {pattern:' www-test / lib / * .js ', includes: wrong}, {pattern:' www-test / sp EC / ** / *. JS ', included: Incorrect}, {Pattern:' www-test / spec / ** / ** / *. Js', includes: wrong}, 'www-test / main-test Js',' www / js / lib / angular-route.js'],  

    angular-routes. Js is located at 'www / js / lib / angular-routes.js' and therefore the action should be included when the action runs my unit test.

    app.js:

      Define (['angular', 'angular', 'controller / index', 'direction / 'Index', 'factories / index', 'filter / index', 'service / index'], function (ng) {'strict experiment'; return ng.module ('ap', ['ngrut', 'ap. Controllers', 'AP DICIRX', 'App Factories',' App.filters', 'Apps Services']);});  

    Therefore, I found my rookie mistake to include an angular route in my production and dev code Is going but not in my test code because I only added the file to my output and dev folders.