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