Tuesday 15 September 2015

redirect - PHP - Reloading URL with a GET variable -


I would like to make sure that the $ _GET variable is set to the value of another variable in my URL, if not, then I I want to reload the page / url to show the set variable. This code is using im:

  session_start (); $ Openfile = $ _SESSION ['openfile']; // $ $ $ $ $ _ $ ['openfile'] & amp; Amp; Empty ($ _ session ['openfile']) If $ $ Get current for $$ current issuance of variable isset {// If not, then create new URL string $ hloc = basename ($ _ SERVER ['PHP_SELF']) . '? File = '. $ Openfile; // Change the location in the new URL string header ("location: $ hloc"); }   

I do not understand why this does not work. Any help would be great. Thank you.

Edit: The problem is that the URL does not display information on that top. This fixes properly if the page gets reloaded again, though, obviously what I want.

  if (isset ($ _ GET [file '])) {// its set Mean value is not equal to zero or false} Other {/ / it is not set, therefore}   



ruby on rails - Reusing same view for several emails method with actiomailer -


  वर्ग व्यवस्थापक मेलर & lt; ActionMailer :: बेस डीईएफ़ send_message_to_user (उपयोगकर्ता, विषय, शरीर, स्थान) @body = शरीर मेल (: = & gt; user.email,: विषय = & gt; अधीन) अंत डीईएफ़ send_message_to_all_users (उपयोगकर्ता, विषय, शरीर, स्थान) @ शरीर = शरीर मेल (: = & gt; user.email,: विषय = & gt; अधीन) अंत डीईएफ़ send_message_to_active_users (उपयोगकर्ता, विषय, शरीर, स्थान) @body = शरीर मेल (: = & gt; user.email,: विषय = & gt; अधीन) अंत डीईएफ़ send_message_to_suspended_users (उपयोगकर्ता, विषय, शरीर, स्थान) @body = शरीर मेल (: करने के लिए = & gt; user.email,: विषय = & gt; अधीन) अंत अंत   < p> मैं बजाय चाहते हैं 4 बार देखा गया  send_message_to_active_users.html.erb ,  send_message_to_all_users.html.erb ,  send_message_to_suspended_users.html.erb , <कोड का उपयोग > send_message_to_user.html.erb   प्रत्येक कार्य के लिए, मैं सभी कार्यों के लिए केवल 1 बार देखा गया फ़ाइल का उपयोग करना चाहते हैं।   

मैं यह कर सकता कैसे? < / Strong>

धन्यवाद!

कोई अन्य चुनने के लिए टेम्पलेट, आप एक विकल्प के रूप में : template_name पारित कर सकते हैं:

  मेल (: = & gt; User.email,: विषय = & gt; विषय,: template_name = & gt; "Another_template_name")   

ताकि आप कई विधियों के लिए एक टेम्पलेट का उपयोग कर सकते हैं।

iphone - Different callOut in annotationView -


I'm working on the map iOS6, and I found some troubles: annotation of the picture, current location and placemark below There is also a callout button in the form but I need to do the button differently, how can I do this? This means that in the current location, I need a callout button for this task and mark, callout buttons do other things in place.
Please visit this page to see the images

I do not have enough reputation for posting. Here image - I tried this code:

  - (zero) MapView: (MKMapView *) MapView annotationView: (MKAnnotationView *) Visual calloutAccessoryControlTapped: (UIControl *) control {if ( [(UIButton *) control buttonType] == UIButtonTypeDetailDisclosure {... locationSheet.cancelButtonIndex = locationSheet.numberOfButtons - 1; } Else if ([(UIButton *) Control buttonType] == UIButtonTypeInfoLight) {... locationSheet.cancelButtonIndex = locationSheet.numberOfButtons - 1; }}   

and

  - (zero) actionSheet: (UIActionSheet *) actionSheet didDismissWithButtonIndex: (NSInteger) buttonIndex {// if (buttonIndex = actionSheet .cancelButtonIndex) {if (buttonIndex == 0} {}}}   

How can I do different tasks between the two buttons in the ActionSheet? It is difficult to explain my situation, I hope all people will tell about the above version and appreciate you. Thanks for advance.

I can not go to your images - but if you have actual buttons (UIButton) and not Mk Annotation, why not specify a tag for your button (different tags for each, of course), point them to the same function, and then differentiate them by tag? Therefore (this can be used for any button not only for UIButtonTypeCustom and any UIView - all those support tags ): UIButton * firstButton = [UIButtonTypeCustom] with UIButton Button; UIButton * secondButton = [System with UIButton Button: UIButtonTypeCustom]; FirstButton.tag = 100; SecondButton.tag = 200; [First button addTarget: Self selector: @Selector (dooming :)); [Second button addTarget: Self selector: @Selector (dooming :)); - (zero) doSomething: (ID) sender {UIButton * pressed button = (UIButton *) sender; If (pressed button tag == 100) {// first button} and if (pressed button tag == 200) {// second button}

c# - How could the existence of pseudo debug strings cause a difference in functionality? -


यदि मेरे पास मेरे कोड में यह छिद्र है:

  MessageBox.Show ("एक देखें प्रारूप अपवाद अभी तक? # 1 "); // todo: remove   

(इनमें से 7 हैं, 1.7 से गिने गए, जिनमें से अधिकतर प्रदर्शन (1,2,5, 6,7))

मैं एक त्रुटि संदेश (" अपवाद: तालिका 0 स्थान: frmfunction.SetPlatypus ") नहीं मिल सकता है के साथ समाप्त होता है)

अगर मैं उन सभी को बाहर कीजिए, मैं एक अलग त्रुटि संदेश (" अपवाद: प्रारूपएक्सप्शन स्थान frmFunction.getDuckbillRecord ") के साथ समाप्त होता है)

यह कैसे हो सकता है? इस तरह की जानकारी का अस्तित्व / प्रदर्शन नहीं होना चाहिए msg का कोड जिस तरीके से लेता है / जिस रास्ते पर ले जाता है, उस पर कोई असर नहीं होता है आदि।

नोट: getDuckbillRecord () है, जहां सभी संदेशबॉक्स हैं

UPDATE

प्रेरणा के रूप में आरटी के सुझावों का उपयोग करके, मैं इस के साथ आया:

  सार्वजनिक स्थिर स्ट्रिंगबइल्डर LogMsgs = new StringBuilder (); सार्वजनिक स्थिर शून्य ExceptionHandler (अपवाद पूर्व, स्ट्रिंग स्थान) {try {LogMsgs.Append (string.Format ("{0} \ r \ n", ex.Message)); // TODO: तैनात करने से पहले टिप्पणी करें? दिनांक समय डीटी = दिनांक समय.अब; स्ट्रिंग टाइमएएसएसटीआर = स्ट्रिंग। फ़ॉर्मेट ("{0} _ {1} _ {2} _ {3} .txt", dt.Hour, dt.Minute, dt.Second, dt.Millisecond); (StreamWriter फ़ाइल = नया स्ट्रीमर (समयएएसएसटीआर)) का उपयोग करना {file.WriteLine (LogMsgs.ToString ()); } । । // समस्याग्रस्त कोड में, MessageBox.Show () कॉल की जगह: TTBT.LogMsgs.Append ("इसे frmOverFunction.GetDuckbillRecord () \ r \ n") में स्थान 1 में बनाया गया;   

... और यह मदद करता है - अपवाद 7 "कोड वेपॉइंट्स" के ठीक बाद में पहुंच गया है, इसलिए जाहिरा तौर पर डेनमार्क में कुछ ख़राब है। < एच 2> अपडेट 2

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

मैं दृढ़ता से प्रोत्साहित करता हूं नहीं का उपयोग करने के लिए MessageBox.Show (...) लॉग / ट्रेस / डीबग त्रुटियों के लिए, क्योंकि पॉपिंग-अप एक डायलॉग कर सकते हैं विशेष रूप से यदि आपका यूआई प्रवाह / राज्य महत्वपूर्ण है तो कई सूक्ष्म बगों और व्यवहार, फ़ोकस आदि में बदलाव लाएं।

इसके बजाय, ट्रैकिंग कोड लिखने के लिए System.Diagnostics.Trace का उपयोग करें (जिसे आप वैकल्पिक रूप से आपके उत्पादन / रिलीज कोड में संकलित कर सकते हैं) या System.Diagnostic S.Debug डीबग संदेशों को लिखने के लिए जो आपके रिहाई संस्करण को बनाते समय निकाले जाते हैं।

उदाहरण के लिए:

  सार्वजनिक शून्य DoSomething (int a, int b ) {Trace.TraceInformation ("कुछ करना शुरू करना: a = {0}, b = {1}", a, b); {Int c = a / b; } पकड़ (डिवाइडबिज़रीएक्सेप्शन ई) {डिबग। विरसलाइन ("ओ एच नो ... 'बी' वॉरो शून्य हो! रन एवे !!!! '); फेंक ई; } ट्रेसट्रेसइनेमेशन ("कुछ करना हो गया"); }   

ऊपर दिए गए उदाहरण में, डिबग आउटपुट डिबग बिल्ड में उपलब्ध होगा, लेकिन रिलीज़ बिल्ड में हटा दिया जाएगा। ट्रेस आउटपुट डीबग और खुदरा बगों में उपलब्ध होगा (जब तक कि आप ट्रैस बिल्ड पैरामीटर को बंद न करें), लेकिन जब तक आप किसी श्रोता को हुक-अप न करें और कताई डिस्क, टिकर-टेप प्रिंटर जैसे धीमी गति से ट्रेस आउटपुट लिखना शुरू करें , आदि;)

जब आप ट्रेस और / या डीबग के साथ कोड को विजुअल स्टूडियो में डीबग संदेशों के साथ चलाते हैं, तो संदेश आउटपुट फलक में लिखा जाता है ताकि आप देख सकें कि आपके एप के अंदर क्या हो रहा है रन।

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

आप उपकरण का उपयोग भी कर सकते हैं जैसे कि आप विभिन्न फाइल स्वरूपों, डाटाबेस आदि में लॉग / ट्रेस संदेशों को लिखने में सक्षम बनाता है।

Java class return windows command line information -


I am able to execute a command from the command line with the code given below. I pass the command to work the code So this process does and gives me the return value. What do I need to get a response from the command line when it does not process correctly, so if I pass a command at the prompt and execute it then I get a value I if I command a command But if I pass and fail, I do not get any value. Here is my code

  public string command line accesskey return (string location) {string return value = ""; String Out Value = Null; Try {procedure p = runtime.gettime (). Exec ("cmd.exe / c" + loc); BufferedReader = new BufferedReader (new InputStreamReader (p.getInputStream ()); String line = null; While ((line = in.readline ())! = Null (); ReturnValue = Line; }} Hold (IOException e) {string water SW = new stringwriter (); E.printStackTrace (new print WRITER (sw)); String Stacktrace = sw.toString (); ReturnValue = stacktrace; } Return return value; }    

error stream ( p.getErrorStream) ) - Note that two threads will be required to read from both the streams.

Alternatively, you can use it more easily and can call its redirectErrorStream (true) method.

Also see.

opencv - Search images from a webcam (Google Goggles style) -


I want to find images from the database using a webcam.

Specifically, I want to set a "price kiosk" where people can walk with one item, put it in front of the camera, and search for the database on the price. Cause reasons (most easily used in use) I do not want to use barcodes in products.

Items are relatively easy to scan (they, for practical purposes, 2D: they are comic books). I have all the scans already scanned So what I like is a way to take an image from the webcam and use it as a source of search. Of course the image will get distorted (angle, focus, resolution, light, rotation, etc.) Google Goggles There is no problem for), because I scanned the comic book has been included in many situations and it is capable of finding them.

Now, I am doing some research, I have done a very good job with OpenCVI, so I think it should not be too difficult to implement. Particularly considering my datasets is much smaller than Google (approximately 2000 different products).

What specifically am I seeing? Object detection, recognition, attributes ...? I'm confused and I do not even know where to start from.

read on SIFT: (Scale Irrevocable Facility Transform)

string - How to make PHP str_replace less lengthy -


मेरे पास कोड हैं।

  $ obj- & gt; प्रतीक = str_replace ('PR । ',' P ', $ obj- & gt; प्रतीक); $ Obj- & gt; प्रतीक = str_replace ('संयुक्त राष्ट्र।', 'यू', $ obj- & gt; प्रतीक); $ Obj- & gt; प्रतीक = str_replace ('आरटी।', 'आर', $ obj- & gt; प्रतीक); $ Obj- & gt; प्रतीक = str_replace ('WT।', 'W', $ obj- & gt; प्रतीक); $ Obj- & gt; प्रतीक = str_replace ('पीआर', 'पी', $ obj- & gt; प्रतीक); $ Obj- & gt; प्रतीक = str_replace ('संयुक्त राष्ट्र', 'यू', $ obj- & gt; प्रतीक); $ Obj- & gt; प्रतीक = str_replace ('आरटी', 'आर', $ obj- & gt; प्रतीक); $ Obj- & gt; प्रतीक = str_replace ('WT', 'w', $ obj- & gt; प्रतीक);   

जैसा कि आप देख सकते हैं, यह वाकई बदसूरत दिखता है। मैं इसे कम पंक्तियों में कैसे कम कर सकता हूं?

सबसे अधिक मैं सुझाऊंगा कि लाइनों को संघनक किया जाएगा समान प्रतिस्थापन:

  $ obj-> gtk = symbol = str_replace (सरणी ('पीआर', 'पीआर'), 'पी', $ obj- & gt; प्रतीक);   

कम से कम यह अब भी प्रबल और पठनीय है। यदि आप इसे दो बड़े सरणियों के साथ एक पंक्ति में जोड़ते हैं, तो आपको सरणी को key = & gt; के रूप में स्टोर करना चाहिए। मूल्य: प्रतिस्थापन मानचित्र, और इसके बजाय उपयोग करें:

  $ प्रतिस्थापन = सरणी ('पीआर' = & gt; 'पी', 'पीआर' = 'gt;' p '// आदि ); $ Obj- & gt; प्रतीक = त्रिभुज ($ obj- & gt; प्रतीक, $ प्रतिस्थापन);    

c# - Why can't I write to the console when the requestedExecutionLevel is requireAdministrator? -


I do not want to run a window console application with the requested execution level as "needAdministrator", but then it Not printing I write the statement specified in my code

Thanks in advance!

Thank you in advance!

  Fixed zero main (string [] args) {console. Write ("Hello World" + Environmental New Line); }   

And the code it's exposed contains this code ...

  & lt; The requested exclusion level level = "requireAdministrator" uiAccess = "false" />    

When you start the command prompt as an administrator, the console writes However, when you start the command prompt as a normal user, the app will use the UAC to make a request for administrator rights, and then the console does not write any output.

- & gt; Start command prompt as admin

Text with binary code -


The binary code for Hello is 0100100001000101010011000100110001001111 **, but I can not find a way to convert binary code to example A .

How can I change it and make a word like the world because I do not see the empty space in the binary code for Hello? , what is w , what is o , what is r .. ..

Should I add something between different codes (for example: if W 1010101, O - 000101, R - 1010111, L - 100001, D - 111111 Is it 1010101 000101 1010111 100001 111111 WORLD?)

The binary representation of the string is completely dependent on it. If you want to use simple case (a byte per character), then whatever you have to do, you need to see the hex code for that character, for example '0x41' from this point It is trivial to convert it into a binary sequence, it is important to keep in mind that things like playing with actual binary presentation.

For encoding such as UTF-8, Unicode, or Multi-byte encoding, the process is reduced directly and you will be better off using the Library function to get binary representation.

Rails > Devise password encryption -


I am trying to implement a method so that in some way the password is replaced by any other service. .

  # Change profile password def change_password (oldpass, newpass) pepper = nil cost = 10 # Encrypt plain text passwords encrypt_old = :: BCrypt :: Password.create ("# {oldpass} # {Pepper} ",: cost = & gt; cost) .to_s # Confirm old if self.encrypted_password == encrypt_old encrypt_new = :: BCrypt :: Password.create (" # {newpass} # {pepper} ", cost = & Gt; Cost) .to_s itself .encrypted_password = encrypt_new self.save else Logger.new ("wrong old password!") End of End   

It seems that I have password encryption wrong Is old code in oldpass, which is a plain text Sector should see whether it matches the current password, then allow to store the new password. However, what I am getting is the wrong password.

Re-work:

  def change_password (oldpass, newpass) if valid_password? (Oldpass) password = Last    

at the end of return Not required, if you are in the app or in the rail console.

Just update the user in the following ways and the device will take care of itself.

  user.password = new_password user.save   

The division will then encrypt the password and store it. You must ensure that user.password_confirmation is zero . If there is anything password_confirmation , then it will be matched against password .

Edit

You can test the current password like this: user.valid_password? (Old_password)

c# - Multiple Usercontrols with slight difference -


मैं तीन UserControls का उपयोग कर रहा हूं जो कि डेटाग्रिड है। UserControl's DataGrid में से एक को कॉलम केवल पढ़ने योग्य विशेषता को True पर सेट की आवश्यकता है।

ठीक है मैं यह कर रहा हूं आरंभ करने के बाद () :

  v_uc1.v_datagrid.Column [1] .IsReadOnly = true;   

क्या ऐसा करने के लिए कोई क्लीनर (एक्सएएमएल) है?

< P> आप उन गुणों के साथ सिर्फ एक UserControl कर सकते हैं जो उन दोनों के बीच के मतभेदों को उजागर करती हैं, जैसे
  सार्वजनिक वर्ग MyUserControl ... public bool IsColumn1ReadOnly {get v_uc1.v_datagrid.Column [1 ] .IsReadOnly;} सेट {वापसी v_uc1.v_datagrid.Columns [1] .IsReadOnly = value;}}   

फिर एक्सएएमएल में आप इस तरह से नियंत्रण को इन्स्तांत करेंगे: < प्री> & lt; my: MyUserControl IsColumn1ReadOnly = "True" / & gt; & Lt; my: MyUserControl IsColumn1ReadOnly = "False" / & gt;

javascript - Prototype Ajax.Updater evaluate string before the update -


यहाँ मेरा कोड है:

  नया Ajax.Updater ('container', url, { विधि: "प्राप्त", ऑनलोडिंग: फ़ंक्शन () {document.getElementById ('कंटेनर')। InnerHTML = "लोड हो रहा है ..."}, पर 200: फ़ंक्शन (प्रतिक्रिया) {यदि (response.responseText.match (/ WhatImLookingFor / )) {Window.location = "leNewURL";}}, परस्पर: फ़ंक्शन (प्रतिक्रिया) {// अन्य शांत सामान}});   

मैं क्या करने की कोशिश कर रहा हूं, इससे पहले कि कंटेनर अद्यतन हो जाता है और अगर प्रतिक्रिया में पाठ WhatImLookingFor से मेल खाता है, मैं उपयोगकर्ता को leNewURL पर पुनर्निर्देशित करना चाहता हूं। इससे ऊपर कोड हो रहा है, लेकिन अपडेट से पहले नहीं, इसलिए यह विचित्र लग रहा है क्या कोई वैसे भी है कि मैं अपडेट से पहले ठीक रोक सकता हूं या मुझे कंटेनर छिपाने जैसे अन्य हैक्स का सहारा लेना पड़ता है और इसे केवल तभी दिखा सकते हैं जब कोई मेल नहीं है?

यदि आप अपने अजाक्स कॉल के व्यवहार को कस्टमाइज़ करना चाहते हैं जैसे कि मैं बेस Ajax.Request ()

  नया अजाक्स। अनुरोध (url, {method: "get", onloading: function () {$ ('container')। अद्यतन ("लोड हो रहा है ...");}, onComplete : फ़ंक्शन (प्रतिक्रिया) {यदि (response.responseText.match (/ WhatImLookingFor /)) {window.location = "leNewURL";} else {// अन्य शांत सामान $ ('कंटेनर') हैं। अद्यतन (response.responseText) ;}}});   

मैंने document.getElementById () को $ () उपयोगिता विधि के साथ इसे कम करने के लिए और सभी को शामिल किया है प्रोटोटाइप जे एस के एलिमेंट विधियां

gdb - Inspecting the registers from a specific frame -


If you are inspecting a dump, you will see information to see the values ​​in the registers of gdb , but can you see the values ​​stored in the registers when the program is being implemented to know 0x76FD6908? For example, I want the values ​​of registers only when the PC is at a certain address

You have There are two options:

  1. Frame X , then information register . It gives you all the registers because they were in that stack frame warn that some registers can not be saved; in this situation, GDB will give you wrong value in that frame.
  2. Info Frame X This tells you the registers that were saved in that frame alone: ​​

      Stack frame at 0x7fff5f400150 : Rip = 0x100000eed in burst; 0x7fff5f400170 at 0x7fff5f400170, the 0x100000eed rip called framed by the frame, 0x7fff5f400130 at the applicant, at Argon: 0x7fff5f400148, the local, previous frame of SP 0x7fff5f400150 saved registers: 0x7fff5f400140 at Rbp, 0x7fff5f400148, rip on      

asp.net mvc - How do I add a where clause to a field that is not part of the return set for LINQ query -


I'm thinking how I would add a dynamic where my Linux query is on the clause where the field I'm filing returns set part

Q:

  (db.Person in c in c_join c in c_join.DefaultIfEmpty joining c db.Client P p.PersonId. having equals PersonId is () equals pt.PersonTypeId in pt_join of pt in pt_join.DefaultIfEmpty include pl in db.Plan on CkClientId (join pt in db.PersonType on p.PersonTypeId) pl In _join.DefaultIfEmpty equals pl.ClientId in pl_join from pl () plt_join.DefaultIfEmpty (in db.PlanType pl.PlanTypeId join Plt) in plt_join from Plt in orderby pt.PersonTypeDescription ascending, p.LastName ascending select equals plt.PlanTypeId new ExtendedPersonSearch {PersonId = p.PersonId, FirstName = p.FirstName, LastName = p.LastName, MiddleName = p.MiddleName, aka = p.Aka, sin = p.Sin, PersonTypeId = pt.PersonTypeId, PersonTypeDescription = pt.PersonTypeDescription, clientid = (Int32?) C.ClientId}) different () .;   

Related category:

  Public category Extended SparkSearch {Public Entity ID {Receipt; Set; } Public string first name {receives; Set; } Public String LastName {get; Set; } Public string middlename {get; Set; } Public String Aka {get; Set; } Public string sin {get; Set; } Receive Public Entity Insurance ID { Set; } Public string PersonTypeDescription {get; Set; } Public int? Address ID {Receive; Set; } Receive Public String Street 1; Set; } Public int? Get Client ID { Set; }   

However, I want to filter on pl.PlanId which is not part of the Extended Detector Search Class.

These are other types of dynamic where work for segment items inside the return set:

  if (fd.Contains ("txtSearchFirstName")) {var searchFirstName = Form [fd]; ViewData ["searchFirstName"] = searchFirstName; If (searchFirstName! = "") QryAllPerson = qryAllPerson.Where (sp = & gt; sp.FirstName.Contains (searchFirstName)); }   

To retrieve this query, rewrite the query based on whether or not a user entered a plan ID:

  qryAllPerson = (p being db.Person joining the c db.Client on p.PersonId equals c.PersonId in c_join c in c_join.DefaultIfEmpty () includes pt in db.PersonType on p.PersonTypeId in pt_join equals pt.PersonTypeId in pt_join from pt. to include default IfEmpty () pl in db.Plan on c.ClientId pl_join pl_join.DefaultIfEmpty (in pl_join in pl_join) in plt sh Get pl.PlanType pl.PlanTypeId in plt.PlanTypeIt plt_join plt_join in plt_join.DefaultIfEmpty in plt_join ()) orderby pt.PersonTypeDescription ascending, p.LastName ascending where pl.PlanId == searchPlanId New ExtendedPersonSearch {PersonId = p.PersonId , FirstName = p.FirstName, Select LastName = p.LastName, MiddleName = p.MiddleName, aka = P. Aka, sin = p.Sin, PersonTypeId = pt.PersonTypeId, PersonTypeDescription = pt.PersonTypeDescription, clientid = (Int32?) C.ClientId}) different () .;   

Is there no way that I can attack the scheme ID instead of completely replacing the whole query?

Other dynamic searches work because they have properties on your expanded search class.

When you run your query, you are returning the calculation of Extended PersonSearch objects. Once you take it back, you can filter it only on the basis of the properties on that object.

Just like real life, you have not been able to filter your pets with the number of CPU cores they have (it just can not understand.)

If you In a single query, you can modify the line

  where pl.PlanId == searchPlanId   

be

  Where (searchPlanId == tap || pl.planId == searchPlanId)   

In this way if no search plan has been entered, the first part of the conditional has been hit and it Short circuit and all records The power returns. If a search plan ID is entered, then the first segment is false, and therefore go to C # the second block and make sure that the search entered by pl.PlanId is equal to the search ID.

Or you can add plan IDs to filter it after you recover from the extended PersonSearch object and data source. But this is probably not the best idea, because you throw away a lot of data and only throw your best, when you take the results, which do not match the scheme ID.

geoserver - How can I show a custom map in Android? -


I am using maps on new Android, as a custom map, I mean Max created by my server Map (I am using WMS with GOserver) should I create a custom view or can I use Mapfragment? Or any library that I can use for this? (My custom maps are for indoor space)

You use to display your own map tile The implementation can look something like this:

  public zeros addTiledMaplayer () {last MapTileProviderBasic tileProvider = new MapTileProviderBasic (getApplicationContext ()); Last ITileSource tile Source = New XYTileSource (Layer name, blank, 15, 16, 256, ". PNG", "http: //url.with/tiles/"); TileProvider.setTileSource (tileSource); Last Tiles Overlay Tile Overlay = New Tile Overlay (Tile Provider, This.TetBase Contact); TilesOverlay.setLoadingBackgroundColor (Color.TRANSPARENT); Add map.getOverlays () (tilesOverlay) .; Map.invalidate (); }   

If you do not have a useful tile, you can remove them from your geosor using a program called Mobile Atlas Creator.

c# - How to get method name from Action in WinRT -


I'm trying to get the method name from a function in WinRT, where Action.Method is not available yet I have this:

  Public class test 2 {public stable action & lt; Int & gt; Get Deliverate Test; Set; } Private Static String GetMethodName (expression  int & gt; & gt; e) {debug.WriteLine ("e. Body node type {0}", e.b. body type); Method CallExpression MCE = E. Body as MethodCallExpression; If (mce! = Null) {return mce.Method.Name; } Return "error"; } Public static zero print (int x) {Debug.WriteLine ("int {0}", x); } Public static void TestGetMethodName () {TestDelegate = PrintInt; Debug.WriteLine ("PrintInt Method Name {0}", GetMethodName (x = & gt; PrintInt (x)); Debug.WriteLine ("TestDelegate Method Name {0}", GetMethodName (x => Test Delegate (x)); }}   

When I call TestGateMatham (), I get this output:

  e Body. Node type call is the name of the print method. PrintInt E. BODY nodeType Test Delegate is the name ERROR   

The goal is to get the name of the method assigned to test deliate. "GetMethodName (x = & gt; PrintInt (x))" The call is just to prove that I am doing it at least partially correct. How can I tell that "Test Delayed Method Name is a Print?"

itemprop = "text">

The answer is a lot as much as I was making it as easy as it is TestDelegate.GetMethodInfo () . Name. There is no need for my GetMethodName function. I was not using the "system. Reflection" and therefore the rep. Getmothinf was not visible in the Intelligence, and I somehow forgot it in the docs. Code

  public class test 2 {public static action & lt; Int & gt; Get Deliverate Test; Set; } Public static zero print (int x) {Debug.WriteLine ("int {0}", x); } Public static void TestGetMethodName () {TestDelegate = PrintInt; Debug. WrightLine ("TestDelegate Method Name {0}", TestDelegate.GetMethodInfo (.));); }}    

r - Boolean operators in if/ifelse loops -


इस तरह एक मैट्रिक्स के साथ

  r & lt; -20; ग & LT; -6; एम 1 और लेफ्टिनेंट; - राउंड (मैट्रिक्स (रनिफ (आर * सी), आर, सी)))   

मैं दो नए कॉलम बनाना चाहूंगा जो कि आखिरी तीन पर आधारित हैं I / अगरल और बूलियन ऑपरेटर्स।

मैंने निम्नलिखित की कोशिश की, लेकिन सफलता के बिना:

  के लिए (i में 1: मंद (एम 1) [1]) {if (sum ( एम 1 [i, 4: 6] == 0)) {एम 1 $ कोड 1 [i] & lt; -0; m1 $ code2 [i] & lt; -0} और अगर (राशि (एम 1 [i, 4: 6] =) = 3)) {एम 1 $ कोड 1 [i] & lt; -5; m1 $ code2 [i] & lt; -5} और अगर (एम 1 [i, 4] == 0 & amp; amp; एम 1 [, 5] == 1) {m1 $ code1 [i] & lt; -3} और नहीं अगर (एम 1 [i, 4] == 0 & amp; amp; एम 1 [, 6] == 1) {एम 1 $ कोड 2 [आई] & lt; -3 } और अगर (एम 1 [i, 4] == 1 & amp; amp; एम 1 [, 5] == 0) {एम 1 $ कोड 1 [i] & lt; -2} और अगर (एम 1 [i, 4] == 1 & Amp; amp; एम 1 [, 6] == 0) {एम 1 $ कोड 2 [आई] & lt; -2} और यदि (एम 1 [i, 4] == 1 & amp; एम 1 [, 5] == 1) {एम 1 $ कोड 1 [i] & lt; -4} और अगर (एम 1 [i, 4] == 1 & amp; एम 1 [, 6] == 1) {एम 1 $ कोड 2 [आई] & lt; -4}}   

मेरी समस्या यह है कि मैं & amp; amp; & amp; अगर खंड में, लेकिन किसी तरह यह काम नहीं कर रहा है कोई मुझे एक संकेत क्यों दे सकता है या बेहतर विकल्प के साथ आ सकता है?

पहले से धन्यवाद,

मैं आपके से पाश को छूटेगा जिसे आप पंक्ति 4 और पंक्ति 5 के संयोजन पर और पंक्ति 4 और 6 के संयोजन पर एक ही क्रिया करना चाहते हैं। मुझे लगता है कि आप सबसे अच्छे एक सामान्य फ़ंक्शन बना सकते हैं और इसे दोनों संयोजनों पर लागू कर सकते हैं। मैं आपकी समस्या का निम्न समाधान प्रस्तावित करता हूं

  get.code & lt; - फ़ंक्शन (x) {if (x [1] == 0 & amp; x [2] == 0) {0} और अगर (x [1] == 0 & amp; x [2] == 1) {3} और यदि (x [1] == 1 & amp; x [2] == 1) {4} और {2}} code1 & lt; - लागू करें ( M1 [, c (4,5)], 1, get.code) code2 & lt; - लागू करें (एम 1 [, सी (4,6)], 1, get.code) cbind (m1, code1, code2)    

android - Kivy ScrollView+Accordion Error -


I have this code. If I increase the number of items that are filled with a certain amount, then the app is continuous. Grid layout version (commented) works as expected. The attacker area is here and there. Kivy.uix.spinner import spinner, kivy.uix.accordion import from kivy.uix.boxlayout Import boxLayout from SpinnerOption from kivy.app Accordion from import app, kivy.core.window import window Kivy.uix.gridlayout from class MusicController (application) import gridLayout from kivy.uix.scrollview import scrollview from kivy.uix.button import button from kivy.uix.label import label from AccordionItem: def (self): b = box layout (orientation) = 'Vertical') top = spinner (text = '12', value = ["song", "artist", "playlist", "search"], background_color = (.3, .2, .5,1) Size_hint_y = 0.1) # & lt; Here & gt; # Items = accordion (orientation = 'vertical') for x in xrange (30): items = AccordionItem (title = 'title% d'% x) button = BoxLayout () buttons.add_widget (button (text = 'play' ) Buttons.add_widget (button (text = 'stop')) buttons.add_widget (button (text = 'pause')) item.add_widget (buttons) items.add_widget (item) # ~ items = GridLayout (column = # 1 For, spaces = 10, size = hint_a = none) # ~ items. Bind (minimum_hite = item.Setter ('height')) # (# 30) for # range: # ~ btn = button (text = str (i) # & lt; there & gt; [["previous", "play" "," Next_playing.add_widget (button = text = Widget)) b.add_widget (above) b.add_widget (sv) b.add_widget (now_playing) return b if __name__ == '__main__':: MusicController () run ()

As you suggest an error on the console

  [warning] [Accordion] There is not enough room for children to show [W ARNING] [Accordion] XXXX, XXXXpx found [Warning] [Accordion] layout was canceled.   

Just Accordian Increase the given space so that it can keep all children

changing the line of your code

  items = equine (orientation = 'vertical', size_hint_a = None, height = 50 * 30)   

should work.

In the grid layout, you do this by binding, the height of the gridlove's minimum_height (which is calculated by the height of children).

Accordian does not have any such feature, so you have to do it yourself.

To make it more dynamic, you can stay connected to children's property such as Accordion:

  item.bind (children = self.update_size)  < Then define update_size such as:  
  def Update_size (self, example, value): #Type # 50 for what you want the height of your AccordionItem Size = 50 * lane (example. Smallpox)    

php - onclick="$.post(this.href); return false;" not working right -


Javascript / jQuery Nobhere. I'm trying to post a href but without reloading the page

Reading around the Internet, I see should To be able to add a onclick = "$. Post (this.href); return false;" on Href, but it is not working for me and the page is reloading.

This looks like mourning in my PHP code:

echo "& lt; a href = '" $ url "Post = $ post_ID 'onclick = \" $ .post (this.href);

The reason for any suggestion is that the page is refreshing when clicking on that href

Lucky guess here, jquery is not loaded :)

On this Based on my best estimate that jQuery has not been loaded

Javascript not working in production: Nginx, Passenger, Rails on Ubuntu Server (Node.js?) -


Do I have to install / config Node.js to start javascript? Is this the simplest solution, seeing that my site actually has less traffic?

Javascript does not work for me, but with the site Nginx and passenger (this is ruby ​​on Rail app) for the site I'm running for output, setup on the latest version of Ubuntu Server This site runs brilliantly and fast over the past few months, but javascript (especially, things like Twitter Bootstrap Tooltip, etc.) does not run on this production server, although they can test me And work environment.

My idea is that Javascript is broken B / C do I need to install / configure Node.js? I have mentioned some deployment setup nodes in setup guides. JS has seen, but if it is necessary then detailed information can not be found.

My site has very little traffic (probably 3-5 users at any given time) The only reason for setting up my own web server was a small company website that allowed me to access some resources The company is required to run the app on the network.

By default your js / css are not compiled. You should precompile them.

You can run "bundle exec rake assets: precompile" on your computer and deploy the compiled code on the server. Instead node.js you can use the thermbreaker gem.

Read for more information

c++ - How come sqrt() with which uses a calculation of two pow()'s inside of is wrong in intellisense -


मेरे पास यह कोड है:

  int findY (int x, int r) {return Sqrt (पाउ (एक्स, 2) - पाउ (आर, 2)); };   

लेकिन किसी कारण से सुश्री अभिवादन इसे गलत वाक्यविन्यास के रूप में चिह्नित कर रहा है। मुझे यकीन है कि क्यों नहीं।

यह त्रुटि देता है:

  1 & gt; .. \ main.cpp (7): त्रुटि C2668: 'पाउ': ओवरलोडेड फ़ंक्शन 1 के लिए अस्पष्ट कॉल 1 & gt; सी: \ प्रोग्राम फ़ाइलें (x 86) \ Microsoft Visual Studio 10.0 \ VC \ include \ math.h (583): 'लंबी डबल पाउ (लंबी डबल, इंट)' 1 & gt; सी: \ प्रोग्राम फ़ाइलें (x 86) \ Microsoft Visual Studio 10.0 \ VC \ include \ math.h (535): या 'फ्लोट पॉव (फ्लोट, इंट)' 1 & gt; सी: \ प्रोग्राम फ़ाइलें (x 86) \ Microsoft Visual Studio 10.0 \ VC \ include \ math.h (497): या 'डबल पॉ (डबल, इंट)' 1 & gt; जबकि तर्क सूची '(इंट, इंट)' से मेल खाने की कोशिश कर रही है, मूलतः, यह अस्पष्ट अधिभार है। तो आपको इसे स्पष्ट करने के लिए डालना चाहिए:  
  वापसी sqrt (पाउ (डबल) x, 2) - पाउ ((डबल) आर, 2।));   

इतना ही नहीं, क्या वास्तव में आप वापसी प्रकार को एक int होने का इरादा रखते हैं?

mysql - Copy rows from one table onto another using INSERT query -


I have a table with 158 columns and 22,000 rows and I have another empty table, where I dynamically The SELECT query coming from WHERE user will look something like this:

SELECT * myfrist_tables WHERE suic_att & gt; = 5 and gender = 'm'

This gives me around 9,000 records (say) I want to put these records in another table (just this filtered data). Is this possible? Can anyone tell me what the INSERT query looks like, and I need to create another table with all those 158 clients, or dynamically create all 158 columns in the INSERT query? Also, can I use it in a scene or is it necessary to have a table? thank you in advanced!

It looks as if you want to run SELECT above the statement And the INSERT result does not exist in a new table that does not exist. If yes, then it should work: YourNewTable in MyCreate_tables WHERE suic_att & gt; = 5 and gender = 'M'

YourNewTable already exists, you will need to run INSERT:

  In its new selection Include * mygrist_tables from WHERE suic_att & gt; = 5 and gender = 'M'   

Alternatively, you may need to specify the column because they are not identical.

edit - Rereading comments and realizing DB is MySQL, to create a new table with a SQL statement, your Should use:

  select your new table * from mygrist_tables WHERE suic_att & gt; = 5 and gender = 'm';   



java - Failing a jenkins job -


I have one. Jar file that loads the data into the database, when it runs. I have determined to run this job through Jenkins when I execute a job in Jenkins. Jar runs successfully. However, if there is an empty indicator exception in the job and it has not been completed successfully, then Jenkins says that the job is "close" if there is a problem during the job execution, how can I fail in the job?

@Corry's solution is good. And if you do not want to write and support a Junket Test in Jenkins, then you can do whatever you explain: Hold blank-mark exception (in fact, there's just a top-level cache in your app), And call the API to exit the return code:

  try {myCode.call (); The catch (exception e) {System.out.println ("An exception was caught at the top level:" + E); System.exit (-1); }    

controller - How best to wrap the Dynatree tree widget inside an Angular Directive? -


I understand the basic features of angular controllers and instructions, but I'm struggling to see how I Use the Dynatree tree widget.

The issue is that Dianyree is usually the means of retrieving the data through AJAX and it populates itself - and generally you can call it the "appendage" method. To add to the data, the tree node - that is, all its operations.

I know that I can separate the call to Ajax method and keep it in my tree controller controlling the outcome of the AJAX call - then in my instructions, changes in that parabagism Look for and then manually update the Dynatree widget. But the tree whose data I am dealing with is bigger and complex and it seems that the controller should be unable to maintain its own tree structure when Dynasty already has the structure of its tree.

My feeling is that in the case I really do not need a controller and instead I can just keep the directory wrapped inside the instruction and essentially always the way I always used it. I continue to use it, but it does not seem to work - and this is probably the knowledge about the instructions so I have some questions:

1] Is it Is it considered bad practice to call any type of AJAX call?

2] If so, do I like this 3rd party control which likes to do certain things? Do I really need to maintain my duplicate tree structure in my admin

3] If this Ajax call is deemed OK, how can I ensure in the director that Ajax method goes into the director? (I'm assuming that this is the cause of my problem)

If there is any help, here we are AngularJS instructions are used to wrap jquery dynatree.

Here (its a typecript, but you should get this idea, mostly Javascript).

ajax - ajaxCRUD.com multiple relationships -


I'm not sure I'll get someone to help him out, but give it a try!

I am using CRUD script from ajaxCRUD.com and I want to create more than one relationship between my tables. But, when I try to do this, only the first connection is seen. Want to link my fruit table with the

I property table:

  $ tblDemo = new ajaxCRUD ("Fruit", "my_fruits", "id", "../"); $ TblDemo-> Define correlation ("id", "property", "id", "color"); $ TblDemo-> Define correlation ("id", "property", "id", "taste");   

If I want to get color and taste from the same "related" table, then only one of them will be shown.

There is no indication on how I

in my example

ex> $ tblFriend-> Define correlation ("idCliente", "clients", "idClientes", "nombreCliente"); $ TblFriend- & gt; Define correlation ("idCategoria", "categorias", "idCategoria", "nombreCategoria");

I see two relationships perfect. Any additional code or any

Enter image details here

c - strcpy corrupts char array (string value) -


The function below tries to order in ascending order on a linked list. When it gives a new list, it gets corrupted.

  Zero * command (zero * ptr) {struct wordlist * head; Head = (Straight word list *) PTR; StructureWorldList * first = (Straight wordlist) * Molec (Psychof (Straight Waldlist)); Structure terminology * second = (structure wordlist *) malloc (sarcasm (structure wordlist)); Struct wordlist * temp = (Structure word list *) malloc (form (word structure)); First = head; Int j = 1; While (first! = Null) {seconds = first-> next; While (second! = Null) {if (SRCMP (first-> word, seconds-> words)> {if (temp-> word == NULL) {temp-> Word = malloc (sizeof (first> terms)); } And {if (realloc (temp-> word, size (first- & gt; word)) = null) {strcpy (temp-> word, first-> word); }} If (realloc (first-> word, size (second-> word)) = tap) {strcpy (first-> words, second-> words); } If (realloc (second-> word, size (temp-> words)! = Null) {strcpy (second-> words, temp-> terms); } Free (temp); } Second = second->; next; } J ++; First = first->; next; For example, if input will be  
  piero ronaldo messi   

then the output looks <

given above The example code is not tried on the code, but it will give you a clue. I believe there is something with the allocation of memory but I could not find it. By the way, sometimes the words are also empty.

In addition, the word list is as follows:

  struct word list {char * word; Structure word list * next; };    

You do not temporarily copy the string for the first time.

  if (temp-> words == faucet) {temp-> Word = malloc (sizeof (first-> word)); // You forgot to copy !! } And {if (realloc (temp-> word, size (first- & gt; word)) = null) {strcpy (temp-> word, first-> word); }}   

See if temp-> The word is is NULL , which should be for the first time (note that you do not actually specify temp struct, So you will get an undefined behavior already), you will not copy it, after you malloc you have to make the quick code strcpy .

Your realloc calls are all incorrect You can not use the sizeof to get the size of the string. Use strlen for this, and do not forget to add an extra byte to string terminator.

In addition, you must first and second . They are fast for your data structure. The first thing that you do is discard your value so that you can leak your memory free with your temp structure as well as temp-> Do not forget the word later.

After you receive it, it is working, please stop all this malloc and strcpy business!

To move the stars around you, only the signals need to be transferred. Necessary rearrangement or copies will not simplify your code in a handful of lines.

Oh, and did you forget the return value from your work?

installer - Avoid to add components manually -


Do I have a folder with nearly 50 DLS? Is there any way to add them to each other as Vix code? Instead of writing 50 manually

heat.exe tool in the WiX toolet Scanning files in a given directory can generate a .wx file. The easiest way to get this started faster is to:

  summer diary path \ to \ directory \ files \ cc- YourComponentGroup -ag -o generated.wxs   

There is a bunch in it, other options are also available, that heat.exe -? will show you

Simple Android layout issue -


I want to do something very simple I want a layout that has a spinner at the top, then there is a list view, After that there is a linear layout below a lot that rolls up some buttons. I want to extend the list view to fill the space between the spinner and the button, no matter how big a window. I'm trying this with a linear layout wrapping all three elements and I say 300 dive to Layout_Height Wrap material and fill parent's each combination that I try but unless I can think of hard code list in layout Layout_Height The button is pushed, the screen is off I know that there should be an easy way to do this, but I'm at the end of my mind. Whatever I can think of, I have to try them all.

Here is the code that works with the link-coded height.

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; LinearLayout xmlns: android = "Http://schemaskandroidkcom/apk/res/android" Android: Layout_width = "Fill_parent" Android: Layout_height = "Fill_parent" android: orientation = "vertical" & gt; & Lt; Spinner Android: id = "@ + id / fileType" Android: layout_width = "fill_parent" android: layout_height = "wrap_content" /> & Lt; ListView Android: id = "@ + ID / Android: list" Android: layout_width = "fill_parent" Android: layout_height = "300dip" /> & Lt; LinearLayout Android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: layout_gravity = "bottom" android: gravity = "bottom" Android: orientation = "vertical" & gt; & Lt; LinearLayout Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" android: orientation = "horizontal" & gt; & Lt; Button android: id = "@ + id / ManageFiles_DeleteItem" Android: Layout_width = "Fill_parent" Android: layout_height = "40dip" Android: layout_margin = "5dip" Android: Layout_weight = "Delete 1" android: text = "before" / Gt; & Lt; Button android: id = "@ + id / ManageFiles_DeleteAll" Android: Layout_width = "Fill_parent" Android: layout_height = "40dip" Android: layout_margin = "5dip" Android: layout_weight = "1" android: text = "Delete All" / Gt; & Lt; Button android: id = "@ + id / ManageFiles_DisplayItem" Android: Layout_width = "Fill_parent" Android: layout_height = "40dip" Android: layout_margin = "5dip" Android: layout_weight = "1" android: text = "display items" / Gt; & Lt; / LinearLayout & gt; & Lt; LinearLayout Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" android: orientation = "horizontal" & gt; & Lt; Android: layout_margin = "10dip" Android: layout_weight = "1" Android: text = "OK" /> android: id = "@ + id / ManageFiles_OKcustom" Android: layout_width = "fill_parent" android: layout_height = "40dip" Gt; & Lt; Android: layout_margin = "10dip" Android: layout_weight = "1" Android: Text = "Cancel" / "Android" Gt; & Lt; / LinearLayout & gt; & Lt; / LinearLayout & gt;   

`

You can try something as simple <> pre & lt; RelativeLayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: orientation = "vertical" & gt; & Lt; Spinner Android: id = "@ + id / spinner1" Android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_alignParentTop = "true" android: layout_centerHorizontal = "true" /> & Lt; ListView android: id = "@ + id / listView1" Android: layout_width = "match_parent" Android: layout_height = "wrap_content" Android: layout_alignParentLeft = "true" Android: layout_below = "@ id / spinner1" Android: layout_above = "@ + ID / Button 1 "& gt; & Lt; / ListView & gt; & Lt; Button android: id = "@ id / Button1" Android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" Android: layout_alignParentBottom = "true" Android: layout_alignParentLeft = "true" android: text = "Button1" / & gt; & Lt; Button android: id = "@ id / Button1" Android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" Android: layout_alignParentBottom = "true" Android: layout_alignParentRight = "true" android: text = "Button2" / & gt;

The trick is to use LinearLayout instead of RelativeLayout.

php - want to insert $_post data in to temporary table -


यहाँ मेरा कोड है कोई वाक्यविन्यास त्रुटि, कृपया मुझे मार्गदर्शन करें

  $ degree = $ _POST [ 'edu']; $ बोर्ड = $ _POST ['ब']; $ परिणाम = $ _POST ['rdd']; $ अंक = $ _POST ['टीएम']; $ Maketemp = "अस्थायी तालिका बनाओ temp_table_1 (` डिग्री 'varchar (100), `बोर्ड' varchar (100),` परिणामस्वरूप `varchar (100), 'निशान' varchar (100),"; mysql_query ($ maketemp); $ Insertemp = "Temp_table_1 (डिग्री, बोर्ड, परिणामस्वरूप, अंक) मूल्यों में डालें ('$ डिग्री', '$ बोर्ड', '$ परिणामस्वरूप', '$ अंक',)"; mysql_query ($ insertemp); $ शो = mysql_query ("SELECT * FROM temp_table_1"); अगर ($ शो) {जबकि ($ पंक्ति = mysql_fetch_assoc ($ शो)) {गूंज $ पंक्ति ['डिग्री']; }    

अपनी दोनों क्वेरी में सिंटैक्स त्रुटि, बस इस के साथ अपनी दोनों क्वेरी की जगह .. ।

  $ maketemp = "अस्थायी तालिका बनाओ temp_table_1 (` डिग्री 'varchar (100), `बोर्ड' varchar (100),` परिणामस्वरूप `varchar (100),` अंक 'varchar (100 )) "; // पिछले अल्पविराम mysql_query ($ maketemp) हटा दिया; $ Insertemp = "Temp_table_1 (डिग्री, बोर्ड, परिणामस्वरूप, अंक) मूल्यों ('$ डिग्री', '$ बोर्ड', '$ परिणामस्वरूप', '$ अंक')" INSERT "; // अंतिम अल्पविराम     हटा दिया गया

php - get users geo location and echo out mysql results based on location? -


Hello, what city am I trying to find from my IP address, which is able to display the list of users Be my database in your area / near them

I have been seeing this API.

And I have registered and got an API key, but I'm not sure where to go from here. Here is the example code used to get the user code Is:

  & lt ;? Php included ('ip2locationlite.class.php'); // Load the class $ ipLite = new ip2location_lite; $ IpLite- & gt; ('& Lt; api key & gt;') of the set; // Get Errors and Locations $ places = $ ipLite- & gt; GetCity ($ _ server ['REMOTE_ADDR']); $ Errors = $ ipLite- & gt; GetError (); // get results "& lt; p & gt; \ n"; Echo "& lt; strong & gt; first result & lt; / strong & gt; & lt; br / & gt; \ n"; If (! Empty ($ places) & amp; amp; is_array ($ location)) {foreach ($ fields as $ field = & gt; $ val) {echo $ field ':' $ Val "
" \ n "; }} Echo "& lt; / p & gt; \ n"; // Show echo errors "& lt; p & gt; \ n"; & Quot; Strong & gt; All Errors Dump & lt; / Strong> & Lt; Br / & gt; \ N "; if (empty! ($ Errors) and is_array ($ errors)) {foreach ($ error $ as error) {echo var_dump ($ error)" & lt; Br / & gt; & Lt; Br / & gt; \ N ";}} and {echo" No Errors "" & lt; Br / & gt; \ N ";} echo" & lt; / P & gt; \ N ";? & Gt;

But how do I now query a mysql if the user is in London and users then display these to the user in the database listed in London Has been said that will be set?

I would really appreciate one push in the right direction here if someone can help. Thank you.

Here is an example (its database structure and non-test foreach ($ $ area = & quot;) without any knowing knowledge;); foreach in this insert ($ places as the area = Places => $ Val) Gt; places like; $ val) {$ field echo. ':'. $ Val "& lt; Br / & gt; \ N "; $ Mysqli = new mysqli (' Ready ('Select & lt; other_users & gt; , ... & lt; your table & gt; where & lt; USER_LOCATION & gt; by order & lt; whatever & gt; ')) {$ stmt_evt - & gt; Bind_prim (' s', $ val $ Stmt_evt -> executed (); $ Stmt_evt - & gt; Bind_stilt ($ , $ ...); while ($ stmt_evt-> fetch)} {echo ' Other users in your area Customer: '. $ & Lt; other_user & gt ;;}} Else {echo' error: unable to prepare event statement. ';}}} Click

C# Update Multiple textbox for one column? -


I got 5 text boxes and a button on my windowform, and it displays data from my Access database file.

updating

  as cmd = new oledbcommand ( "I"), I enter all data keys 1, textbox 2, text box 3 and etc. I'm using an update statement for  Updated Table 2 Set Balance =? "+" Where ID =? "Con); Cmd.parameters.addwithvalue (" BALANCE ", textbox5.text); Cmd.parameters.addwithvalue (" BALANCE ", textbox6.text); Cmd.parameters.addwithvalue (" BALANCE ", textbox7.text); Kandkparamitrskaddvitvlua ( "Balance", Tekstboks8ktekst); Kandkparamitrskaddvitvlua ( "Balance", Tekstboks9ktekst);   

Kandkparamitrskaddvitvlua ( "id" , Textbox10.text)

but it failed with some error.

So I did the second attempt

  cmd.parameters.addwithvalue ("Balance", text box 05. text + text box 6. text + text box 7. text + text box 8. text + text box 9. text);   

and all the values ​​I have to go to input textbox5.

Edit

  

I have a CMD = new Olebkandend ( "trying to update table 2 ST Balance =?", con) of; Cmd.parameters.addwithvalue ( "BALANCE", textbox5.text); Cmd.parameters.addwithvalue ( "BALANCE", textbox6.text); Cmd .parameters.addwithvalue ("BALANCE", textbox7.text); Cmd.parameters.addwithvalue ("BALANCE", textbox8.text); Cmd.parameters.addwithvalue ("BALANCE", textbox9.text);

I have entered different numbers in different text boxes, after that I preview the data, all data values ​​are the same ...

  cmd.parameters.addwithvalue ("BALANCE", textbox5.text + "," + textbox6.text + ", "+ Textbox7.text +", "+ Textbox8.text +", "+ textbox9.text);   

And when you want to divide them by ,

android - How to mix / overlay two mp3 audio file into one mp3 file (not concatenate) -


I want to merge two MP3 files into one mp3 file. For example if 1 file is 1min and the second file is 30 seconds the output should be one minute that should play both files in one minute.

First of all, In order to manipulate two raw presentations, you need two audio files Join ; Since An MP3 file is compressed , you do not have direct access to the raw representation of the signal. You need to decode the compressed MP3 stream to "understand" the waveform form of your audio signal and then you will be able to blend them.

In this way, two compressed audio files need a single compressed audio file, the following steps:

  1. To get raw data, use a decoder to compress the file Decode ( No Public System APIs Available This is what you need to do manually! ).
  2. mix two raw uncompressed data stream ( audio clipping if necessary) For this, you need to get raw data format into your compressed MP3 file with raw emixed data with your decoder ()
  3. encoded (As decoder copy, you need to manually use it encoder )

    More information can get aboud MP3 decoder.

opennlp - I want to get nodes of parseTree -


This is the part of my code:

 string sentence = "User requirement to identify the system Not to find books according to certain criteria and to check the availability of a particular book. However, for checking books, checking your book loan status, and already on loan To put on books, use the users For themselves will recognize the system. "; Parse toppars [] = parsertool.from line (sentence, parser, / * numbers = * / 3); For (Pars Presttry: Toppers) {parseTree.show ();  

How can I get verbs in speech? please!

I mean, how can I get tree nodes?

If only you need to get the verb from sentences, then POSTagger in OpenNLP is sufficient. You only have to use the Oppenken Tokenizer to get the token in an array and feed it at POSTaggerME. This will give you the related POS tag. Then you can filter by tags for verb like VB, VBZ etc.

java - What is the meaning of the return value of com.allanbank.mongodb.MongoCollection.insert(Durability arg0, DocumentAssignable... arg1) -


com.allanbank.mongodb.MongoCollection.insert के रिक्त मूल्य (स्थायित्व arg0, दस्तावेज़असिसनीय ... arg1) int है वह इंट वैल्यू क्या दर्शाता है? जब मैंने रिटर्न वैल्यू प्रिंट करने की कोशिश की और मुझे जो प्राप्त हुआ था 0 हालांकि यह मान ठीक से डाला गया था।

यह वही है जो

दस्तावेज़ों की संख्या सम्मिलित की गई। यदि स्थायित्व नहीं है तो यह मान -1 होगा।

तो वापसी मान 0 का अर्थ है, जो दस्तावेजों को डाला गया था वह 0 (कोई नहीं)।

objective c - Is there any way to prevent the ios from killing my app? -


My app is jailbroken and I do not have to deposit it in the app store. The problem is that iOS kills my app after 2 or 3 hours. I have used static analyzer from the xcode and removed all memory leaks. I have also installed a memory monitor. At least 300 MB of free memory is available while killing iOS app. IOS kill iOS

Run a silent audio file in a loop using AVAudioPlayer Try .

See:

Also SE:

Android Dialog dismiss using handler -


I get a stranger question when I read the Android Global Action source code, I think it starts a dialogue Will, but add a justice that will judge whether this dialogue has been shown, if it was shown earlier, it will be rejected and then show it. Strangers thing is that to dismiss the dialogue, again, I do not understand why it is necessary to send a handler message, I think it just dismisses the dialogue. Then call is called a function, this is not a problem. The comment said: "Look at the delay, so that the last dialogue is completed by rejecting", but I also can not understand the meaning, please help me to help someone please, thank you very much.

  if (mDialog! = Null) {mDialog.dismiss (); MDialog = null; // appear delayed, so that mHandler.sendEmptyMessage is completed by rejecting the previous dialog (MESSAGE_SHOW); } Many Android UI functions apply themselves using messages, and therefore Are not immediately completed. When you call  Dialog.dismiss () , then Android gives a message that actually damages. The author of this code wants to ensure that the dialogue is actually dismissed before showing it, and so he posts his message, which will not run until after the Android has posted.   

Need a RegEx that will match a name="value" -


Even what I have so far, I'm not a Reggae expert in any way .... < I need to be able to match the globally (/ g)

  total-match = \ "([^ \"] *) \ "total-match =" 1618 "total-match =" 1618 "total-match =" 1618 "total-match =" 1618 "total-match = '1618' total-match = '1618' total-match = '1618' total-match = '1618 '   

  total-matched \ s * = \ s * ( ["']) (. *?) \ 1   
  • Overall - Truly matched
  • \ s * -
  • = - literal
  • \ s * - After the optional code =
  • ([''] ) - Match any type of quote, and remember it as \ 1
  • (. *?)
  • \ 1 - The non-greedy match for any lesson, which we matched earlier matches the same type of bid

c# - SQLite with RELEASE build of MonoTouch - Can't get PK? -


I am working with Monochoch and I am using debug build for the entire project. I recently changed it to release it to release and it crashed on startup. Turning on debugging symbols, I found out that the problem is throwing the exception of SQLite (bogus?): "RealConfigdata can not update, there is no PK in it!"

  Public class RealConfigData {[AutoIncrement, PrimaryKey] Public Ent ID (Received); Set; } // other fields} Public Square Game Data {[AutoIncrement, PrimaryKey] Public Ent ID {get; Set; } Public int seeds {get; Set;} // .. other fields}   

I get an error when I try. () Find out the database for the first time that RealConfigData is not PK! Even then, it does.

And with the other, I'm getting "method not found for seed"

WTF, it seems that when compiled release, metadata is not there, or more accurate, Not believable ... It seems PK is okay for another class but it was not for the first .. And then it did not get the field for the recipient ... this is crazy.

And this code works fine when debugging.

What could possibly be wrong on the earth?

I'm ready to leave my iPhone app, except that SQLite is going down to me in the last minute. help!

==== It was a misunderstanding:

Update: No subclass works correctly in my second category! So there is something like this with the parent / child relationship.

This is not true, the exception was being eaten for that class.

explained this ...

It was found:

Actually, you turn off all assembly links in the iOS build settings if you want to work on the reflection for properties (otherwise, it removes all the sets)

This gives me age Can I understand whether I have not stumbled over it ...: - (

image - tiff() resolution and compression are not reliably set in OSX -


Resolve and compression options are ignored in tiff () on my system (see information ) bottom). It appears in the same problem; I am posting a question here so that I can be more specific about my system.

For example the following code,

  x   

Generates a .tiff file that looks superficial, but when I use Photoshop to view the photo size, I see it

Enter image details here

It is compatible with tiff () , Make a file with the correct number of a pixel, but the wrong size of the inch (This inconsistency takes me into trouble when I want to control both size of the font size and the size of the image, for example publishers require a specific physical image size).

Note that the file is 2.5 MB, which looks very big for 3 "-by-5" black and white lzw-compressed tiff. I suspect that the compression option is also being ignored.

I get the same result with ggsave (which can be dependent under the hood at tiff () ?) And With png () , this is a common problem with R and OSX deal with image files.

I am using R Studio 0.97.449, as described below at OSX 10.8 with R 3.0.0.

  & gt; SessionInfo () R Version 3.0.0 (2013-04-03) Platform: x86_64- Apple's darwin10.8.0 (64-bit) location: [1] en_US.UTF-8 / en_US.UTF-8 / en_US.UTF- 8 / c / en_US.UTF-8 / en_US.UTF-8 Enclosed Base Packages: [1] Statistics Graphics GrDevices utils Dataset methods are loaded (and not attached) through a single name space: [1] tools_3.0.0 < / Code>   

When I run my image using ImageMagick and then say, I see The following (modified) in my console:

  $ -verbose /Users/schaunw/Desktop/example.tiff Identity image: /Users/schaunw/Desktop/example.tiff Format: TIFF Image File Format) Category: DirectClass Geometry: 1000x600 + 0 + 0 Units: PixelsPerInch Type: GrayscaleAlpha Endianess: MSB Colorspace: Gray Depth: 8-bit Page Geometry: 1000x600 + 0 + 0 Settlement: Undefined Repetition: 0 Compression: None Orientation: TopLeft fILESIZE: 2.402MB Number Pixels: 600K   

File size, as you say, if large enough to be considered an image that is small, and it Showing the lack of compression the answer to that problem itself appeared when I tried to convert the type argument to tiff function: OS X told me that it is now X11 Does not support, and I'll need it if I use it If you want to run, install it manually.

So I have installed it, and it has run its example code again, but this time the "code" type is "Cairo".

  $ identity -verbose /Users/schaunw/Desktop/example.tiff image :: /Users/schaunw/Desktop/example.tiff format: TIFF (This is what I got from ImageMagick Square Image: Format: DirectClass Geometry: 1000x600 + 0 + 0 Solution: 200x200 Print Size: 5x3 Units: PixelsPerInch Type: Grayscale Endianess: MSB Colorspace: Gray Depth: 8-bit Page Geometry: 1000x600 + 0 + 0 Settlement: Undefined Recurrence: 0 Compression: LZW Orientation: TopLeft fILESIZE: 19.8KB Number Pixels: 600K   

Information Properly small file sizes and And LZW compression, but also note that ImageMagick has clearly stated that the print size is 5x3 that has not been done earlier.

So it seems like your problem is that OS X is no longer what to do with shipping with X11. Installing X11 should fix your problem

Android Studio Failed to load platform rendering library -


I have a project started from scratch on Android studio, the layout editor was working fine. After adding Google Play services library, now when I open my layout XML file, I get the following error in the Design tab: "Rendering Problems: Failed to Load Platform Rendering Library"

Text Tab In, for all my TextView components there is a warning in the feature "Unknown feature Android: [...]" where the [...] feature is being declared.

How is anyone to fix this problem?

Just wanted to add an answer that worked for me: Version 23 of N Has changed, like this:

lua - Scale image to display.contentWidth,display.contentHeight -


How do I scale the image to the size of the screen?

Whatever I have tried:

  Image: Scale (display contentWidth, display.contentHeight)    

You can use it to fit the image on your screen

  local screen_setting = 1 local Background = display NYImage ("Objects / BG Page", correct) background.xScale = (Screen_adjustment * background.contentWidth) /background.contentWidth background.yScale = background.xScale Background X = display.contentWidth / 2 background.y = display.contentHeight / 2   

Just change the value of Screen_adjustment to fit your screen

javascript - using Ajax Minfy To minify and compress files -


I was just checking the AJAX Myneni tool and used it to create a minified js file. And then the file content was gipped, but I just wanted to make sure that the file is actually gypsy .. how can I test this and what happens if we enable in IIS but the file is already gripped IIS bus zipping Without referencing the file it again or something else. Use your favorite debugging tool for webbrowser (like firebug) and check it out. HTTP request If the file was actually transmitted as a gimp file, you would see a content-encoding: gzip header. It can also say deflate , which is more or less the same thing.

uml - How can I create a component into node for diagram deployment -


I started with models for the design of computer systems on my problem deployment diagram, I am creating my node diagram . But I'm blocked here

For example, I have a node "Server Application" I would like to say that Tomcat is a component for this node. But I can not. What do I know that I mention here as an information object can be used here in the node server application. You all enter image details here

Hope this helps ...

RB

R ddply and weighted mean -


I tried to calculate an aggregation with the weighted mean (average viewing time per views) on a table called DFA_CMO I'm doing DFA_CMO has 5 dimensions, and the site from them.

Here's the code:

  ddply (DFA_CMO ,. (on site), short, wm = weighted.mean (DFA_CMO $ average viewing time, DFA_CMO $ scene ,, NA.rm = TRUE))   

but the result shows the same price for a disappointing, because each field:

  site wm 1 Advideum 21.17633 2 Bibisikcom 21.17633 3 Borsorama 21.17633 4 canal Plus 21.17633 5 CNN network 21.17633 6 Euronews FR 21.17633 7 Amntritimdooka 8 21.17633 21.17633 Elfdifdis 9 take Monde 21.17633 10 Les Echoes 1 11 21.17633 21.17633 Lopiniankf 12 TF 1 Ipim 2lkl7633 14 Waisje UK - IBM PE 21.17633   

It seems that everything that happens on average shown here, it should be different at each site. Any idea how to get the correct value

Do not DFA_CMO $ & lt; Var_name & gt; To call ddply simply pass the variable names themselves.

  ddply (DFA_CMO ,. (on site), short or, wm = weighted.mean (average visible time, visual ,, na.rm = TRUE))   

The reason for this is that by giving the name of the data frame, you are effectively taking the defined vectors into weighted mean function, that is, the value of all rows in your data frame. If you pass only the column names, then ddply will evaluate them in relation to those line subsets related to each group.

database - SQL Server 2005 Small Business vs SQL Server Express 2012 -


Our office server is running a SQL Server 2005 small business that does nothing more than being inactive Putting the database - Overall one million or two rows.

Does SBM Server 2012 Express have any benefits for this size DB by using existing software? The hardware-decent Dell Xeon, is only a few years old.

The site shows the differences between SQL Server 2005 and 2008, and the site 2008 and 2012.

It all depends on what you are doing to use SQL Server, but if it has only a backup database, then you probably do not need it renewal.

Why linq to xml fails to select child nodes without explicit cardinality constraint? -


निम्नलिखित संरचना के साथ एक xml फाइल है

  .... & lt; workDomain & gt ; ... & lt; घटना & gt; कुछ मान & lt; / event & gt; ..... & lt; घटना & gt; & Lt; कोड कोडसंवादक = "सीसीवील 1" कोड = "4567" & gt; ... & lt; कोड & gt; & Lt; / घटना & gt; & Lt; / workDomain & gt;   

मुझे कोड बच्चों के साथ इस घटना में कोई दिलचस्पी है, कोई भी संहिता बच्चों के बिना साधारण घटना नहीं।

हालांकि, अगर मैं निम्नलिखित linq क्वेरी का उपयोग करता हूं: <पूर्व> var res = xDoc.Descendants (nsohr + "workDomain") में नोड से। एकल ()। Descendants (nsohr + "event") जहां नोड। Descendants (nsohr + "code")। एकल ( ) .विशेषता ("कोडसंवाद")। मान। एक्लॉल्स् ("सीसीवील 1") & amp; amp; नोड। डिसेन्डेंट्स (एनएसओआर + "कोड")। एकल ()। विशेषता ("कोड")। मान। एक्लॉल्स् ("4567") चयन नोड;

कुछ नहीं देता मुझे ये मिल रहा है: "अनुक्रम में कोई तत्व नहीं है" अपवाद अगर मैं पूर्वार्द्ध के साथ रास्तों को पुनरावृति करने का प्रयास करता हूं।

अगर मैं घटनाओं के बच्चों के अस्तित्व को एक स्पष्ट बाधा जैसे नीचे के रूप में लागू करता हूं:

  var res = xDoc.Descendants (nsohr + "workDomain") में नोड से। एकल ()। Descendants (nsohr + "event") जहां नोड। डिसेन्डेंट्स (एनएसओआर + "कोड")। () & Gt; 0 और amp; amp; नोड। डिसेन्डेंट्स (एनएसओआर + "कोड")। एकल ()। विशेषता ("कोडकंटेनर")। मान। एक्लॉल्स् ("सीसीवील 1") और amp; नोड। डिसेन्डेंट्स (एनएसओआर + "कोड")। एकल ()। विशेषता ("कोड")। मान। एक्लॉल्स् ("4567") चयन नोड;   

तब सब कुछ अपेक्षित रूप से काम करता है पृथ्वी पर मुझे क्यों जोड़ना पड़ता है

नोड। डिसेन्डेंट्स (एनएसओआर + "कोड")। गणना () & gt; 0 ? वंश पर बाधाओं को उनके अस्तित्व का मतलब होना चाहिए, या इसलिए मुझे लगता है यह मेरे लिए बहुत अप्राकृतिक लगता है मैं यहाँ क्या लापता हूं?

अपडेट: जॉन के उदाहरण से मुझे मेरी गलतफहमी देखने में मदद मिली जिस तरह से linq को xml काम करता है मैं किसी भी तरह इस धारणा के तहत था कि नोड्स पर दिए गए मापदंड नोड्स का निर्धारण करेगा जो कि गलत तरीके से चुने जाते हैं (डीबी क्वेरी) जैसे काम करते हैं: डीबी पार्सिंग एसक्यूएल और डाटा आदि का चयन ... मैं बस कॉलिंग उन तरीकों को कॉल करने के लिए गलत ऑब्जेक्ट्स के तरीके जॉन की स्निपेट एक छोटी सी फिक्स के साथ (यह मानते हुए कि मैं कुछ नहीं भूले हूं), उम्मीद के अनुसार काम करता है:

  var res = xDoc.Descendants (nsohr + "workDomain") .उपचारकर्ता (nsohr + इवेंट ")। जहां (एक्स = & gt; x.Elements (" code ")। कोई भी (y = & gt; (स्ट्रिंग) y.Attribute (" codeContainer ") ==" CCVal1 "& amp; amp; और (स्ट्रिंग) y विशेषता ("कोड") == "4567"));    

"कुछ नहीं लौटाता है" और "मुझे कोई अपवाद मिलता है" बहुत < / Em> अलग है।

समस्या यहां है:

  जहां नोड। डिसेन्डेंट्स (एनएसओआर + "कोड")। सिंगल ()। विशेषता ("कोडकंटेनर")। मान। एक्लॉल्स् ("सीसीवील 1")   

आप सिंगल () उपयोग कर रहे हैं, जो एक अपवाद फेंकना है, यदि कोई एक तत्व बिल्कुल नहीं है और यकीन है कि पर्याप्त है, आपको यह अपवाद मिलता है।

आपकी क्वेरी बहुत सरल हो सकती है:

  var res = xDoc.Descendants (nsohr + "workDomain") (एक्सचेंज + "इवेंट" ; (स्ट्रिंग) x। विशेषता ("कोड") == "4567"));   

(यह मानते हुए कि कोड हमेशा event का एक प्रत्यक्ष बच्चा है, यदि ऐसा नहीं है, तो आप descendants < / Code> के बजाय तत्वों ।)

दूसरे शब्दों में, घटना वांछित workDomain तत्वों, जहां कम से कम एक बच्चे कोड बच्चे तत्व में प्रासंगिक विशेषताएं हैं।

sql - Complex left outer join query -


I have a rail app with a complex query that I can not solve. I have 2 tables, clubs and select tableclubs like this:

  id, name1, a2, b3, c4, d   < P> Selected table includes selected clubs by all users:  
  id, club_id, user_id 1,1,1 2,1,2 3,2,3 4,3,1 5,3,3   

Now I want a select box with all the items of the table club without the elements already selected by the existing users (it should not be selected twice for the same club can). Therefore, in the case of User 1, only Club B and D should be shown, because it has already selected A and C.

So I created it as a scope in the model:

  scope: selection, -> (Current_USUG) {Gets ('Selected options in the selection: .club_id = clubs.id') where ('selections.id is tap or selection. User_id! =?', Current_user.id). The group ('clubs.id')}   

This works fine only when only one user is selecting, but if more users choose the same club as the current user If selected, these clubs are still shown. What can I improve to show the right club?

I found a solution that seems to work, but I do not know it's the most beautiful :

  scope: selection, -> & gt; (Current_useor) {(Select the additional options selected in the selection .club_id = clubs.id '). Where ('selections.id is tap or selection. User_id! =?', Current_user.id). Where ('clubs.id (?)', Current_user.clubs). Group ('clubs.id')}    

javascript - JQuery Week Calendar: CSS to control header -


I can not find a CSS in the jquery.weekcalendar.css file that controls the size of the text in the header, that is, 17 June 2013 - 21 June 2013.

I have to squeeze my calendar in a small space and so I want to change the font size of this code (and remove the 2013)

Thanks for any helpful tips!

JSFiddle: (To get jquery week calendar css / js files as cdn)

This is my calendar ingot code:

 < Code> $ ('# week-calendar'). Week calendar ({first day: 1, day: show off: 5, use shortDayName: true, showheader: true, timeslotoutHouse: 4, scrollHorldMillions: 0, business: {start: 8, end 18, display border: wrong }, Height: function (data) {return $ (window). Light () - $ ('h1'). External height (true);}, data: event data, eventRender: function (event, $ event) {if (CalEvent.end.getTime ()) & lt; New Date (). GetTime ()) {$ event.css ("backgroundcolor", "#aaa"); $ Event.css ("font-size", "1"); $ Event.find ("time"). Css ({"backgroundcolor": "# 999", "border": "1px solid # 888"};}}, eventclick: function (calendar, $ event) {window.location.href = 'lobby? Meeting ID = '+ CLETAd;};});    

found:

  .wc-title < / Code>  

This is in jquery-weekcalendar.css and no font-size set.

"stack around the variable is corrupted" during c++ to c# callback -


I declare such a C ++ structure:

  straight order (long time) Replica signed); // I 8 has signed a long time; // i8 long long replica signed; // i8 signed long long id_ord; // I8 standalone status signed; // i4 signed four functions; // sign signed i1; isin_id; Four days signed i4; // i1 four values ​​[11]; // D16.5 signed amount; // i4 signed int amount_rest; // i4 signed long long id_ord1; // i8 signed in int init_amount; // i4};   

and similar C # structure:

  public structure command {public long replID; // I8 public long replica; // I8 public long replica; // I8 public long id_ord; // i8 public fulfillment status; // i4 public characters work; // i1 public int isin_id; // i4 public characters; // i1 [Marshall AS (unmanaged type., BevalArere, size console = 11)] public four [] value; // D16.5 public ent amount; // i4 public int amount_st; // i4 public long id_ord1; // i8 public int init_amount; // I4}   

I passed the composition from C ++:

  __diglex (zero) Order testing; Test.init_amount = 123; OrdersCallbackFunction (& amp; test); }   

To # c:

  OrdersCallback ordersCallback = Representative (reference command value) {Console.WriteLine ("C # command received call =" + "Init_amount =" + Value.init_amount); }; InitializeCallbacks (ordersCallback); I can read the console "init_amount = 123" which I think proves that the call works as expected and the structure is properly aligned. While debugging though I received this error:  "Run time check failure # 2 - variable  test  is corrupted around the stack."   

If I comment this line order callback function (& amp; test); Then the error has ended What's wrong with my code?

Update I forgot to mention that I have #pragma pack (push, 4) <+ / code> on the C + Div>

This possibility is not doing its packing of structs is in parity (to be able to see it in the debugger by making each of you Check the structures and allocated size)

, for "#pragma pack" C ++ and check if your struct is packed something like the following for your C # struct [StructLayout (LayoutKind.Sequential, Pack = 1)] Public Order Order {...}

In addition, as Nathan explains Your assumptions on all are closed, you want to use C ++ four or unsigned char and have maps for C ++ sbyte or byte.

I would also recommend clearly changing the structure of their struct for alignment as it thinks that you have control of both C ++ and C # side:

  Structured order {long long replication was signed; // I 8 has signed a long time; // i8 long long replica signed; // i8 signed long long id_ord; // i8 signed long long id_ord1; // I8 standalone status signed; // sign signed i4; int isin_id; // i4 signed amount; // i4 signed int amount_rest; // i4 signed int init_amount; // i4 signed four functions; // i1 signed four days; // i1 four values ​​[11]; // d16.5   

};

Can't get data from xml file in C# (Windows phone 8) -


I have the following code: How do I get the values ​​of clouds from an XML file? Just a little while, the list is full of the correct number of elements, but they are empty.

  XDocument xdoc = XDocument.Parse (e.Result, LoadOptions.None); & Lt; String & gt; List = new list & lt; String & gt; (); Leading (Excl. Elements ("prediction") elements ("time")) {list.Add (string) element. Attribute ("time")); }   

XML file:

  & lt; WeatherData & gt; & Lt; Location & gt; & Lt; Name & gt; Dronten & lt; / Name & gt; & Lt; Type / & gt; & Lt; Country & gt; NL & lt; / Country & gt; & Lt; Time zone / & gt; & Lt; Location height = "0" latitude = "52.525002" longitude = "5.71806" geobase = "geonames" geobaseid = "0" /> & Lt; / Location & gt; & Lt; Credit /> & Lt; Meta & gt; & Lt; LASTUPDATE & gt; 2013-06-20T17: 30: 39 & lt; / LASTUPDATE & gt; & Lt; Calctime & gt; 0.0547 & lt; / Calctime & gt; & Lt; Nextupdate & gt; 2013-06-20T20: 30: 39 & lt; / Nextupdate & gt; & Lt; / Meta & gt; & Lt; Sun rise = "2013-06-20T03: 13: 40" set = "2013-06-20T20: 04: 01" /> & Lt; Forecast & gt; & Lt; Time = "2013-06-20T15: 00: 00" to = "2013-06-20T18: 00: 00" & gt; & Lt; Symbol number = "801" name = "some cloud" var = "02d" /> & Lt; Rain /> & Lt; Windderection degree = "43.5014" code = "NE" name = "NorthEast" /> & Lt; Windspeed MPS = "6.9" name = "medium air" /> & Lt; Temperature unit = "celsius" value = "19.71" m = "19.71" max = "26.517" /> & Lt; Pressure unit = "hpa" value = "1022.12" /> & Lt; Humidity value = "62" unit = "%" /> & Lt; Cloud value = "some clouds" all = "24" unit = "%" /> & Lt; / Time & gt; & Lt; Time = "2013-06-20T18: 00: 00" to = "2013-06-20T21: 00: 00" & gt; & Lt; Symbol number = "501" name = "moderate rainfall" var = "10d" /> & Lt; Rainfall value = "10.5" unit = "3h" type = "rain" /> & Lt; Winding degree = "18.0018" code = "nn" name = "north-northeast" /> & Lt; Wind speed MPS = "3.72" name = "gentle breeze" /> & Lt; Temperature unit = "celsius" value = "13.24" min = "13.24" max = "19.706" /> & Lt; Pressure unit = "hpa" value = "1021.71" /> & Lt; Humidity value = "100" unit = "%" / & gt; & Lt; Cloud price = "overcast clouds" all = "92" unit = "%" /> & Lt; / Time & gt; & Lt; / Predictions & gt; & Lt; / Weatherdata>    

You must call the value property.

Additionally, the names of attributes in your time nodes are "to" and by "; I do not see any of them with the name "time" .

Change your add statement to:

  list.Add (element.Attribute ("from") value.);    

encryption - Unsigned asymmetric changing private keys and security -


There is some logic about me and my partner and I want to stackoverflow it to solve for us.

Basically, we are using both records (end-to-end chat encryption), but it constantly is your asymmetric public & amp; private key. I am telling them that saying that their keys are not compromised under this condition, because they are losing security in encryption because someone can easily mediate their conversations because of this fact, once again, Seeing their contacts 'unverified' as their fingerprint, which is taken from the private key, has changed and thus is unknown for contact.

Am I right or am I wrong? If I am wrong then I will eat my hat, but, I think that we are wrong in our life for some time.

You are right, your friends give you beer, assume that their keys are not compromised There is no reason to remove He is doing all this for someone to impersonate him, or to interfere with him, to make a man run and to make it easy to chat with that person.

The power of encryption is only private key Being unknown, it is actually impossible (more accurate, computational incompatible) to obtain a private key from the public key (handle key length Is not really low, absolutely), otherwise the SSL / TLS / HTTPS will be broken.

vba - Shape unknown member: invalid request. To select a shape, its view must be active -


I have a PowerPoint macro that takes pictures and adds them to an open slideshow. When I try to run the macro after clicking on the bottom of the list on the left side of the screen (which causes a solid blinking horizontal strip under the previous slide), I get an error:

  Runtime error '-2147188160 (80042240)': Unknown member size: To select a size invalid request, its view must be active   

I thought This was because I got a valid o I did not have the object, so I added the defined debug statement for selection:

  if ActiveWindow.Selection.Type = 0 then the MsgBox "0" end if if ActiveWindow.Selection.Type = 1 then the MsgBox "1 "End if ActiveWindow.Selection.Type = 2 then MsgBox" 2 "end if if active window. Selection. Type = 3 then the MSBbox "3" end if   

causes 1 to display the first picture to be added and the picture is properly added but Then shows the error and prevents the macro. Annoying, when I try to run it in debug mode, it works every time. I can only assume that I am manually fixing the problem in the accident when I debug it.

The statement that causes this problem:

  ActiveWindow.Selection.SlideRange.Shapes.AddPicture (// file information //). Select the line after ActiveWindow. Selection.ShapeRange.ZOrder msoSendToBack    

I think I know what's happening here Used to be. If you / the user click on the slide thumbnail in the thumbnail panel, then the active choice may be the slide instead of the added image.

You can round it by doing something like this:

  Om oSh = active window as a shape set. Selection. Slide rays Shape. Add image (// file information / /) OSh.ZOrder msoSendToBack   

Instead of working with one selection, one of the reasons for using object references (OAS in this case) ; -)

PHP: Undefined offset 1 error -


I am trying to format the number with the K, M, B, T format after 1000, but I Getting this message: / P>

Notice: Undefined Offset: 1

I do not understand what is wrong and how to fix the problem.

  $ X = round ($ num); $ X_number_format = number_format ($ x); $ X_array = Explosion (',', $ x_number_format); $ X_parts = array ('k', 'm', 'b', 't'); $ X_count_parts = Count ($ x_array) - 1; $ X_display = $ x; $ X_display = $ x_array [0] ((int) $ x_array [1] [0]! == 0? '. $ X_array [1] [0]:' '); $ X_display = $ X_parts [$ x_count_parts - 1]; Return $ x_display;   

After the explosion var_dump () result $ x_array; is

  array (1) {[0] => The string (1) "1"}   

This is the right after your first line: < Pre> returns $ x if ($ x <1000);

Edit (simple approach; complete function):

  If ($ x <1000) return round ( $ X)); Otherwise ($ x & lt; 1000000) return goal ($ x / 1000) 'K'; Second round back ($ x / 1000000). 'M';    

Urls indexed in Google with index.php, Laravel configured to not use it in paths -


I recently created a small website created with the latest Laravel. All is well, URL reconstruction is included.

But I noticed that Google has indexed some URLs from path to index.php . As you know, this could cause a duplicate content problem.

I checked triple, and when you browse the website there is no way to access a URL with index.php . So I wonder how to stop the framework to load the URL with index.php , or at least one URL to the correct URL in the index.php Redirect without. / P>

In the original htaccess, I only added it to force www in the URL:

  RewityCand% {HTTP_HOST} ^ domain \ .com [nc] rewritable ^ ( . *) $ Http://www.domain.com/ [L, R = 301]   

I do not think this is the cause of this problem, but I mention it, Bus .

Thank you.

This is what works for me, to help me from Laravel URL Index.php :

  rewrite% {THE_REQUEST} ^ GET. * Index .php [NC] rewrite (. *?) Index \ .php /*(.*) / $ 1 $ 2 [R = 301, NE, L]    < / Html>

java - Parse.com get value with query -


I'm looking for an example on how to use parse.com queries, it's really unclear I guess That should start with:

  Parsev queries = ParseQuery.getQuery (& lt; Class (aka table name)>);   

But then, I have not figured out.

In that situation I have got 'value' back if it is present then you can do something like

  query.whereEqualsTo (& lt; Collumn> What I am trying to do is that I got a table with column ID and name, I know what the id is, it's 0. So now I want to know what name is id = 0. But what question should I use, I do not know ...    
  ParseQuery and Lieutenant 

; ParseObject & Gt; Query = ParseQuery.getQuery ("YourClassName"); Query.whereEqualTo ("id", "someID"); Query.getFirstInBackground (New GetCallback & lt; ParseObject & gt; () {Public Canceled (Pars object Object, ParseException e) {If (object == empty) {Log D. ("score", "GetFirst request unsuccessful.");} Else {Log D. ("score", "Object recovered." );}}});

javascript - Server not available -


If I have a code that calls a php file from a remote, then how and where "server is not available" Add message? Server but PHP file is missing? Here's my code:

  & lt; Html & gt; & Lt; Top & gt; & Lt; Script language = "javascript" & gt; View functions () {if (window.XMLHttpRequest) {// code for IE7 +, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest (); } Else {// code for IE6, IE5 xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP"); } Xmlhttp.onreadystatechange = function () {if (xmlhttp.readyState == 4 & xmlhttp.status == 200} {document.getElementById ("Detorible"). InnerHTML = xmlhttp.responseText; } Xmlhttp.open ("post", "http: //someremoteserver/somephpfile.php", true); Xmlhttp.setRequestHeader ("content-type", "app / x-www-form-urxed"); Xmlhttp.send (); } & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body onload = "see ();" & Gt; & Lt; Div id = "datatable" align = "center" & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;    

You can find out individually and do something on the basis of feedback . Or if you do not have a position 200 then you can apply a normal handler:

  if (xmlhttp.readyState == 4) {if (xmlhttp.status == 200) {document.getElementById ("Datatable") innerHTML = xmlhttp.responseText. } And if (xmlhttp.status == 503) {// Special Error Code Warning ('Sorry, this server is unavailable'); } Else {// General Error Handler Alert ('There was an error with your request'); }}    

c# - Send image data to server in IE 8, IE9 -


In FF and Chrome we can send image data to the server via this code:

 < Code> canvas .toDataURL ("image / png");   

And then this base is 64 string decoded and extracted on the server. I have problems in IE Right now I have the image in the "img" control like:

     

I do not want to send this image data (SRC) to the server in IE 8,9. Can you help me do that? Any hints to get it?

As you know it is hard to do without canvas (not supported in IE8 / IE9 ). Which version of ASP.NET is your server? I think it wants to solve by writing a controller action that can take an image to a source URL and download the action image and change it to base 64, then where to send it May be.

400 bad request when access ASP.net web api via computer name on IISExpress -


I am getting a 400 bad request error message when an ASP.NET Web API is used through the URL Uses computer name. It works fine when I use a local host. I am using iisExpress for Visual Studio 2012

Any help is appreciated! thank you in advanced!

I got an answer from another post about it. I had to update my IISExpress' applicationhost.config file and add a bond with my computer name to it

Here is a link to another post:

newline - How do I force git to checkout the master branch and remove carriage returns after I've normalized files using the "text" attribute? -


OK, so I've added the file .gitattributes with lines like this

  * .css text * .js text etc ...   

Then I followed the instructions

  $ rm Remove git / index # git to reset git to $ git # Scan the working directory $ git position # Show files as normal that add $ git add -u $ git .gitattributes $ git commit -m " Introduce End-of-Line Normalization "  

but now mer The working copy is still carriage returns! I have unsettled those files which I would like to keep with normalized files, how do I get a git check again in the master branch?

I know that the files are normal in the repository, because when I do a repo clone, I have all the files without the carriage return.

Ah! Check the previous commute, then check the master.

  git checkout head ^ git checkout -f master