I use the Yummly database by using HTML queries for recipes in my Android app:
Http://api.yummly.com/v1/api/recipes?_app_id=MY-APP-ID_app_key=MY-APP-KEY&q=KEYWORD even if Their documents show that the GET requests come back in UTF-8 format, I get some strange characters in the code, such as: utensils de cream one L & RCO; Orange . The problem is not limited to my Android app, but it is shown in Chrome browser. Curiously, when I tried to open it in Internet Explorer, it looked fine: cream of pottery is an orange , but crÄ? I'm fraÄ®®C , which is sometimes used in Chrome as CR & amp; Agrev; Me fry and icirc; C appears in the form of and sometimes correctly Crème Fraîche . What is the difference between browsers that analyze them in different ways? And, more importantly, what can be done to eliminate this issue in Android / Java? Do you have an idea?
On Android I use HttpGet to fetch data from the server and then pass it on to some JSONObject.
I work for Jemli, the way we handle these things, there was inconsistency in it, But now it should be decided.
Through explanations, & amp; Syntaxs are SGML / XML / HTML entities that are used to avoid some characters. For example, for users of most browsers, see Document & amp; Or & amp; Amp; It does not matter and so we were not completely enough to normalize them. But for the app like you, obviously it makes a difference and we have added a more thorough generalization
For reference, there is an easy Java utility for this type of thing
Describing shipping service on a paypal shopping cart? -
I am passing along a paypal shopping cart (using the API and PayPal payment standard) with the variable Can I cross the shipping cost, but how, or is it possible to describe the shipping method on the PayPal form?
Example, my widget ... $ 1 shipping and handling .... $ 12
What I'm doing My Widgets .... $ 1 Shipping and Handling .... $ 12 (UPS Ground) Thanks for any input Not entirely sure it is possible to pass a PayPal to the shipping provider. You can pass it as a different variable or some type of custom variable. If you have only one shipping provider, you can do the following:
c++ - What does âIn instantiation of ⦠required from hereâ mean? -
मुझे निम्नलिखित कंपाइलर संदेश प्राप्त होता है
main.cpp: एक के प्रारंभ में ?? शून्य fkt (Foo) [Foo = int] एक साथ: main.cpp: 5: 7: यहां से आवश्यक द्विआधारी वैसे भी बनाई गई है, इसलिए यह नहीं है एक त्रुटि। लेकिन यह भी एक चेतावनी के रूप में चिह्नित नहीं है यह संदेश क्या है और मुझे इसे क्यों मिलता है?
मैंने निम्न उदाहरण पर कोड घटा दिया
टेम्पलेट & lt; typename Foo & gt; शून्य fkt (Foo f) {} int main () {fkt (1); वापसी 0; } ¹ gcc 4.7.2 संपादित करें: यहां पुन: उत्पन्न करने के लिए चरण: % cat main.cpp टेम्पलेट & lt; typename Foo & gt; शून्य fkt (Foo f) {} int main () {fkt (1); वापसी 0; }% G ++ -Wall -Wextra main.cpp मुख्य सीपीपी: एक '' शून्य fkt (Foo) [Foo = int] [के साथ] के प्रारंभ में: main.cpp: 5: 7: यहां से आवश्यक Main.cpp: 2: 6: चेतावनी: अप्रयुक्त पैरामीटर "एफ" [-विवादित पैरामीटर]
<पूर्व> main.cpp: एक के प्रारंभ में ??? void fkt (Foo) [फू = इंट के साथ] एक ????: main.cpp: 5: 7: यहां से आवश्यक है main.cpp: 2: 6: चेतावनी: अप्रयुक्त पैरामीटर â ???? एफ ???? [-वाहनयुक्त पैरामीटर] यह सब एक चेतावनी है आप एक अप्रयुक्त पैरामीटर के बारे में 3 लाइन चेतावनी प्राप्त कर रहे हैं। पहली दो पंक्तियाँ कम्पाइलर हैं जो आपको चेतावनी के कारण की पहचान करने में मदद करने का प्रयास कर रहे हैं। यहां एक अंग्रेज़ी अनुवाद है:
टेम्पलेट तर्क Foo के रूप में int जैसा fkt के तत्काल में आवश्यक था लाइन 5 कॉलम 7 द्वारा आपके पास f नामक एक अप्रयुक्त पैरामीटर है। fkt एक फ़ंक्शन टेम्पलेट है। टेम्पलेट को दिए गए टेम्पलेट तर्कों के साथ तत्काल होना चाहिए। उदाहरण के लिए, यदि आप fkt & lt; int & gt; का उपयोग करते हैं, तो fkt फ़ंक्शन टेम्पलेट Foo के रूप में int के साथ तत्काल होता है। यदि आप fkt & lt; float & gt; का उपयोग करते हैं, तो fkt फ़ंक्शन टेम्प्लेट को Foo के रूप में float के रूप में शुरू किया जाता है। > विशेष रूप से, इस संदेश की यह पहली पंक्ति आपको बता रही है कि चेतावनी के अंदर fkt होता है जो कि Foo के रूप में int के साथ तत्काल किया गया था । चेतावनी की दूसरी पंक्ति आपको बताती है कि तात्कालिकता 5 लाइन पर हुई। इस रेखा से मेल खाती है: fkt (1); यह fkt के साथ Foo के रूप में int को तत्काल कर रहा है क्योंकि टेम्पलेट तर्क Foo उस तर्क के प्रकार से अनुमान लगाया जा रहा है जो आप दे रहे हैं। चूंकि आप 1 , Foo से गुजर रहे हैं int होने का अनुमान लगाया गया है।
How to work with multiple levels of abstractions with Entity Framework and code first? -
I have several models whose intermediate classes are abstract, the model looks fine, but I get an error when trying to create a database :
Problems in mapping pieces starting with line 13: Two entities with different keys are mapped to the same line. Ensure these two mapping pieces do not place institutions in the same group with two different keys in the same group of rows.
Here's the easiest code I can write to reproduce the error. If I make
pet solid, the problem gets resolved What can I do to allow many abstract classes in my hierarchy? Public intangibles (public; id; get; set;}} public abstract class pet: animal {public string name {get; set;}} public squared fish: stomach {public bolt
Public square dog: pet {public bool isiuddard {received; set;}} public class person: animal {public stomach MyPet {get; set;}} public class personaltext: DBConttex {public dbset & Lt; person & gt; people {received; set;}} [testfictions] public class animal tests {[test] public zero; CanCreateDatabase (Database.SetInitializer (new drop credits database always & lt; PersonContext & gt; ()); (Using the Var context = new PersonContext ()). (Assert.AreEqual (0, context.People.Count ()); // fails here}}}Update Here is a KDiff snap of the difference in the .edmx file generated. The file on the left is my original code which fails and occurs on the right when I have a
DbSet
in my DbContext.
You need to add pets in your context:
// Table-per-class (TPC) public subject subjective reference: DBcinTex {Public Personality} () {} Public DBSet & lt; Person & gt; People {receive; Set; } Public DbSet & lt; Pet & gt; Pets {receive; Set; }}
Edit: I have just seen your comment, where you said that you wanted the table by the hierarchy inheritance. Your problem, then, is that your DBAet is not typed correctly - you want a single dBset using the base type:
// Table-per-hierarchy (TPH) public class Subjective references: DBcinTex {Public Public Planning () {} Public DbSet & lt; Animals & gt; Animals {receive; Set; }}
objective c - iOS : Shell script from an iOS App -
I believe we can run shell scripts from the iOS app. Can anyone tell me what is the default shell in iOS and how to call shell script from iOS app?
(Please note that I run the script in the background.) I have a variable in the return value of the script. (The following line is not the exact code). Pseudo-Zsh Shell is the default - I think.) MyVar = You can not do this in iOS. If you have been jailbreaker, you may be able to, but otherwise the app is not allowed for administrator. Apple's guide to which you can give more information to your app's life. In your May 2012 document, "": Your question is not in the question What are you trying to eliminate? What have you tried? Do you intend to develop for a jailbroken device or app store? Please either edit your original question or create a new, more complete one. MyiOSAppBundle \ Script.zsh ))
By listening to ports limited and reducing unnecessary network utilities like Telnet, shells, or a web server, gets a low attack surface , So this firewall software is not required.
configuration - Apache error 324 when try download large files -
I have installed xampp on win server 2003.
I change php.ini in this way: <30>
But when anyone tries to download more than 30 MB I see this error: Pre> Before trying to download this we try to download this error. I got the same question but I could not find any answer. How can I solve this problem? I got the problem. I got VPS RAM 512 MB, when I got the Ram Ram 1024MB problem solved. Error 324 (Pure: ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
iterator - Iterating through entity framework models from another related project -
I have just started working with .net and I have an affiliate for an entity framework model and password reset functionality The reference is made to a website and I have made it in the class library called MASAT. Reset. With data 3 sections (email, mapping, link)
I have now applied a windows form to MYSITE.Reset but I'm having trouble running through my model from the Program.cs file, I am not sure about the structure of the syntax and I have tried the following attempts unsuccessful:
foreach (MYSITE.Reset.Data.Maps mp)
Try it out:
var maps = in meters by reference. Choose mappers; Foreach (a different map in the map) {// do stuff}
c# - Can Static Members that Accept Variables Become Corrupt? -
I'm having trouble creating this question, so I'll tell it some ways so that it does not end in steady ways Repeating the general discussion. This can be more of an architecture question.
If you have a stable member on the static class who accepts the variable passed, then there is a danger of data confrontation / corruption if the operation is running high and is running long? IE: The Data Access Class is accepting the object graph type for firmness in a database.
For example:
Namespace MyApp.DAL.People {Public Stable Class Person {Public Static Void Insert (Inst. People, People P) {// ADO Try .net code, hold etc., execute db, call other personal method ... helper (p); } Private Static Zero Helper (Inst. People. Pisser P) {// Work ...}}} If user starts "A" a person. Insert (myNewPerson) completes the call operation that the user completes the complete process before using the "B" method to save the stable class and database to its "person object". Is Operation Serial and Asynchronous Essentially Blocked for the Use of Static Class?
Is this just a problem if the application (a developer) was trying to use multiple threads in an application space?
Is everything going on until you spin clearly the other thread for an application?
As a side note, this is my first post - so thank everyone who took the time to post questions / answers - your time is appreciated!
If two different threads call person.entert same In time, both of them will be executed at the same time. As long as the method is not explicitly blocked. The data entered in thread a by p parameter will not be accessible from . Let's say that two threads pass the context of completely different object instances. Calls are completely secure, as long as the insert method does not access anything on the external circuit. For example, all methods will vary for local variables, two threads. This happens when the method (or calls to the methods) starts to reach data on external problems, when you start the problems.
c# - LINQ to XML finding elements that occur if later element is present -
यहां एक्सएमएल है जिसके साथ मैं काम कर रहा हूं:
और मेरा कोड अभी तक है:
XDocument doc = XDocument.Load ( @ "C: \ Users \ morganjo \ डेस्कटॉप \ bb-tasks.xml"); Var q = doc.Descendants में ("गुण") का चयन करें (स्ट्रिंग) val.Attribute ("value"); फोरेच (स्ट्रिंग स्ट्र क्यू) {Console.WriteLine (str); } यह मुझे तत्व मान में सभी संख्याओं के मूल्यों को प्राप्त करेगा I मुझे जो समस्या हो रही है, मुझे केवल मूल्य की ज़रूरत है अगर तत्व 'नाम' 'अवधि' या 'देरी' के बराबर है। चूंकि ये मूल्य के बाद होते हैं, मुझे यकीन नहीं है कि कैसे प्राप्त करें इस बारे में।
विशेषता क्रम कोई फर्क नहीं पड़ता। आप इसका मान और फिल्टर तत्वों का उपयोग कर सकते हैं:
var q = doc.Descendants में "val" से ("गुण") जहां (स्ट्रिंग) val.Attribute ("name") == " देरी "|| (स्ट्रिंग) val.Attribute ("name") == "अवधि" चुनें (स्ट्रिंग) val.Attribute ("value"); या चलो कीवर्ड का उपयोग एट्रिब्यूट वैल्यू और उसके बाद दो बार करें: var q = doc से val में Descendants ("गुण") नाम दें = (स्ट्रिंग) val.Attribute ("name") जहां नाम == "देरी" || मान == "अवधि" चुनें (स्ट्रिंग) val.Attribute ("value");
jquery - How do I add a class to inner HTML of a div using Javascript? -
I'm trying to work around an impossible optimization for Wordpress. Let me give a class to all So far, I have discovered ways to provide additional classes with existing IDs or classes. Thanks, in advance, for your help! Using jQuery: & lt ;? Php, the_category () ;? & Gt; prints:
& lt; Ul class = "post-categories" & gt; & Lt; Li & gt; & Lt; A rel = "category-tag" title = "..." href = "..." & gt; Category A & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; e.t.c. & Lt; / Li & gt; & Lt; / Ul & gt;
& lt; A & gt; is required to show, like this:
& lt; Ul class = "post categories" & gt; & Lt; Li & gt; & Lt; One class = "btn" rel = "category-tag" title = "..." href = "..." & gt; Category A & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; e.t.c. & Lt; / Li & gt; & Lt; / Ul & gt;
$ ("Post Categories a"). AddClass ("BTN");
javascript - Blocking custom ad dialog in webbrowser -
I have checked the other thread but I am not working for them, after that I have implemented so far Is:
Private Zero Injection Alertblocker () {HTMLElement head = webBrowser4.Document.GetElementsByTagName ("head") [0]; HTMLElement Script AL = WebBoarder 4 Document Crate Element ("script"); IHTMLScriptElement element = (IHTMLScriptElement) scriptEl.DomElement; String alertbalker = "window.showModalDialog = function () {};"; AlertBlocker + = "window.alert = function () {};"; AlertBlocker + = "getUrlParam (strParamName) {};"; AlertBlocker + = "getSpecialUrlsParam (strParamName) {};"; AlertBlocker + = "closeButton ();"; Element.text = warning blocker; Head.AppendChild (scriptEl); } InjectAlertBlocker () is said to be navigated and completed event.
In addition, I have also tried:
Private Zero webbrowser_newwindow (Object Sender, CancelEventErguesE) {Web browser wb = Sender as Webbrozer; If (wb! = Null) Adytax Diablob ("Anwsodo quoso abrar un popup:" + wb.Url); E.Cancel = true; } The site URL I want to cancel is like: Warning scam-like link
I have created a patch / fix solution in two steps ... bit hackney ...
To check the URL, and if it is redirected, then the next URL What we get for the Edible String on ()
Then on navigating (just to be sure) and before navigating, in such cases, I Trim like RL:
Private string noAdBooth (string) Lnk) {if (lnk.Contains ("& amp; url =") & amp; amp; ; Amp; lnk.Contains ("adbooth")) (A adressex debug ("adbooth omitted"); // add txt debug lnk = lnk.Substring (lnk.IndexOf ("& amp; url =") + 5); } Return LNK; }
c# - Test whether calling a function locks current thread -
I am writing an application that sends some commands to the serial port and gives some answers. At some point when some order port calling thread is sent, it will be locked until some answer is received. So I tried to write a failed test for this.
The problem is that it will not end at any time to pass the exam !!!!!
So what is the solution:
Edit: I can make another thread in my test and for two seconds after waiting for the test, check that the thread is not finished It breaks the rules of simplicity and tests on time.
Try to get a lock for the period of time that you think its unfair, whose After you stop trying to get the lock and fail it?
Use something like
android - Using a single intent to retrieve multiple records vs a separate intent for each record -
I am trying to assess the benefits and costs of using a long intent which is up to five different intentions. is using.
Users of my app download records from the web, which are parsed in the database, the user can download records for between 1 and 5 people at any time.
I have an app like this:
Private onclicklists mySubmitOnClick = New OnClickListener () {@Override Click Public Zero (see V) {ArrayList & Lt; String & gt; IdsOfRecordsArray = getIdsOfRecordsToDownload (); Intentional Intentionate = New Intent (getActivity (), RetrieveData.class); Messenger Messenger = new Messenger (handler); IntentToRetrieve.putExtra ("Messenger", Messenger); Intentato-Retrog .putstringirerextextra ("IDList", iiDOfreaksEre Array); . V.getContext () startService (intentToRetrieve); ShowDialog ("Some Messages"); }} This works but due to the time required to parse the data, I sometimes get a timeout error.
I changed it to:
Private Onclick Lester MySmittanceClick = New OnclickListener () {@ Override Public Wide OnClick Click (see V) {ArrayList & lt; String & gt; IdsOfRecordsArray = getIdsOfRecordsToDownload (); While (iCount & lt; idsOfRecordsArray.size ()) {ArrayList & lt; String & gt; CurrentID = New Arrestist & lt; String & gt; (); CurrentAthleteID.add (athleteIdArray.get (iCountAthletes)); Intentional Intentionate = New Intent (getActivity (), RetrieveData.class); Messenger Messenger = new Messenger (handler); IntentToRetrieve.putExtra ("Messenger", Messenger); Ententto-Retrieve.Tutstring Arrest Extra ("IDList", current ID); . V.getContext () startService (intentToRetrieve); ShowDialog ("Some Messages"); ICount ++; }} So now I can take five to five (5) intervals at the same time. It seems stable, though, progress is a bit of a nuisance to handle conversations. is. If I open only 1 dialogue box, then this process closes before it completes.
Any idea which has a better attitude? Or maybe I should leave both for some other method?
Work in the background, using an IntentService. You can stop as much as you want, but IntentService will do the same procedure at a time. In the meantime, you will not be out of time and users can continue to work. I think users will accept that the results do not come immediately, as long as they are waiting, they can do anything else
See an Android training class as an example.
php - Check if array elements are in a different array -
I am trying to create a function to correct if all items in $ array1 are in $ array2, if incorrect Does not return.
What am I trying to do:
$ array1 = ['1', '3', '9', '17']; $ Array2 = ['1', '2', '3', '4', '9', '11', '12', '17']; Function check returned ($ arr, $ arr2) {if all elements of $ arr are returned in $ arr2 returns, then return true) if (checker ($ array1, $ array2) {// function returned true} Other {/ / Function returned incorrectly} I can not think of how to do it! Very much appreciated.
Solution:
Function Checker ($ Needle, $ Harestack) {$ x = array_diff ($ needles, $ hansstack); if (count ($ x)> 1) {return false;} other {return;}} // false False because more needles The heap of grass taken from the check array ([1,2,3,4,5], [1,2,3]) returns the // returns because all the needles are stacked with grass stacks ([1,2, 3], [1, 2,3,4,5]);
< Code> function checker ($ Arr, $ arr2) {return! Count (array_diff ($ arr, $ arr2))}} array_diff : all entries $ arr that are not present in $ arr2 .
parameters - Segmentation fault after invoking free() method but only with certain values -
I found this little program in C, I am posting its code:
< Code> # include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; #include & lt; String.h & gt; Int main (int argc, char * argv []) {char * char_ptr; Int * int_ptr; Int mem_size; If (argc & lt; 2) {mem_size = 50; } And {mem_size = atoi (argv [1]); } Printf ("\ t [+] allocation of% d bytes on the stack to bunk; \ n", mem_size); Char_ptr = (four *) malloc (mem_size); If (char_ptr == NULL) {fprintf (stderr, "Error: Could not allocate HAP memory. \ N"); Exit (-1); } Strcpy (char_ptr, "This storage is in pile segment"); Printf ("char_ptr (% p) - & gt; '% s' \ n", char_ptr, char_ptr); Printf ("\ t [+] allocated 12 bytes of memory on the heap for int_ptr \ n"); Int_ptr = (int *) molk (12); If (int_ptr == NULL) {fprintf (stderr, "Error: Could not allocate HAP memory. \ N"); Exit (-1); } * Int_ptr = 31337; Printf ("int_ptr (% p) ->% d \ n", int_ptr, * int_ptr); Printf ("\ t [-] frees Four-IPTR's heap memory ... \ n"); Free (char_ptr); Printf ("\ t [+] all 17 bytes for char_ptr \ n"); Char_ptr = (four *) molk (17); If (char_ptr == NULL) {fprintf (stderr, "Error: Could not allocate HAP memory. \ N"); Exit (-1); } Strcpy (char_ptr, "new memory"); Printf ("char_ptr (% p) - & gt; '% s' \ n", char_ptr, char_ptr); Printf ("\ t [-] HIP Memory of Free int_ptr. \ N"); Free (int_ptr); Printf ("\ t [-] Remain four-IPTR memory \ n"); Free (char_ptr); Printf ("Program is going \ n"); Return 0; }
When I run it with large or equal 29, it's all right. But if I take 28 or less space then Partitioning goes to the fault. I was thinking about the problem of an address between the stack and the stack, the problem is () int_ptr is on the call Can someone help me?
Thank you so many people is a good day
The first string that you have four- Copy in the APTR memory (
"This is in Memory heap segment" ), which is 35 bytes long, including the elimination of the NUL byte, for your all the parameters of less than 35 Will corrupt.
Just by chance it works below you for 29, probably does not rely on data overwrite.
css3 - Map a movie within a HTML5 video tag to modal -
I have a movie that I'm playing on a site that I would like to map (like an image) So that I click on a certain area of the movie tag to speak to the people. I basically did it how I used to back the image map in 2005, but it is not panning out. Has anyone tried to do all this?
& lt; Div usemap = "# mymap" & gt; & Lt; Width of video = "895" height = "495" control & gt; & Lt; Source src = "someMovie.webm" type = "video / webm" loop = "loop" & gt; & Lt; / Video & gt; & Lt; Map name = "mimeampam" & gt; & Lt; Area size = "rect" cows = "some coordinates here" href = "myAddress" & gt; & Lt; / Aread & gt; & Lt; / Map & gt; My button just told me that the map tag has been deprecated ... so does anyone know how to do this now?
I am far away from a specialist in this area, but you can call it div Should be able to complete it by wrapping it in & lt; Video & gt; The tag has the original foot and & lt; A & gt; tag and & lt; Video & gt; Status css with element ". Example:
Chaining an unknown number of promises in AngularJS -
OK, suppose I have n an array of XHR requests: How can I be sure to call Thank you for your help! From angle to docs: $ http API $ q Based on service deferred / wired API. So it is possible to use the method that takes an array of promises and: combines many promises in the same promise, all the promises Solution is resolved The implementation code is:
var promises = []; Var AllResults = []; $ Scope.requests = [["Yuri": "http: // foo / bar / action1", "name": "action1"}, {"yuri": "http: // bar / foo / action2" "Name": "action2"}, {...}, {...}, {...}]; Var ParseMyResultsArray = function () {console.log (AllResults); // ...}; Angular.forEach ($ scope.requests, function (request) {var promise = $ http.get (request.uri); promises.push (promise);}); Angular.forEach (Promise, Work (Promise) {Promise. Then (Work (Results) {AllResults.push (Results);}}}}; // Then, when all the promises are resolved ... ParseMyResultsArray ();
ParseMyResultsArray () when my promises to know the size of my
requests Is it sorted without a > array?
$ q.all (promises). Then (work () (/ * all promises are solved * /});
jQuery datePicker icon won't show on the xhtml page -
itemprop = "text">
I am using primface in my xhtml i Decided to use the picture. The code for Datepicker is:
& lt; H: Panel grid id = "search grid" column = "3" style class = "grid" column classes = "one, two, three" & gt; & Lt; P: column & gt; & Lt; H: output = for label = "date" value = "date" /> & Lt; / P: column & gt; & Lt; P: column & gt; & Lt; Script type = "text / javascript" & gt; $ (Function () ($ ("(date #") {date_date} {date_name} Yy ", showOn:" button ", button image:" /style/images/calendar.png ", button image only: true}) ;}); & Lt; / script & gt; & lt; p: input text id = "date" value = "# {indexBean.searchCriteria.date}" label = "date" validator = "# {indexBean.validateDate} "& Gt; & lt; p: Watermark value =" Example: 01/01/2013 "for" Date "/> < P> However, the DatePicker button (icon) will not appear on the page. Is anything missing ?? Thanks in advance
It seems that your The SAS jQuery UI is not imported Make sure that there is something like this in the head of your page:
In addition, I will get my javascript under the datepicker input element:
& lt; H: panelGrid id = "searchGrid" column = "3" style class = "grid" column classes = "one, two, three" & gt; & Lt; P: column & gt; & Lt; H: output = for label = "date" value = "date" /> & Lt; / P: column & gt; & Lt; P: column & gt; & Lt; P: Input Text id = "Date" value = "# {indexBean.searchCriteria.date}" label = "Date" Validator = "# {indexBean.validateDate}" & gt; & Lt; P: watermark value = "example: 01/01/2013" for = "date" /> & Lt; / P: inputText> & Lt; Script type = "text / javascript" & gt; $ (Function () ($ ("(date #") {date_date} {date_name} Yy ", showOn:" button ", button image:" /style/images/calendar.png ", button image only: true}) ;}); & Lt; / script & gt;
javascript - How do I get a created element (a button) to run a function? -
This is the code I used to make code:
var dfom = document CreateElement ('div'); Dfom.setAttribute ("id", "options"); Dfom.innerHTML = "& lt; input type = \" button \ "value = \" hi hi \ "onclick = \ get () \ />"; Dfom.style.padding = '10px'; Document.body.insertBefore (dfom, document.body.firstChild); The button has been made fine; To display it correctly, I did this:
get the function () {alert ("HI"); } However, when I click on the button, nothing happens. Any help, please? Thanks!
\ should be \ " get () , but there are more ideas: i.e. the get function actually needs to be defined out of onload or after any other callback Need to be available globally.You will need a setup like this:
... which is to to to < / Code> Callback, which makes it available for onclick . In addition, onclic Use standard event binding instead of k : dfom.innerHTML = "& lt; Input type = \ "button \" value = \ "hi hi \" & gt; "; dfom.firstChild.addEventListener ('click', get);
datejs - jquery: iterate through tables comparing hardcoded date against Date.today() then dropping dates<today -
Thanks to everyone for considering my new issue I used jQuery to iterate through a table I am capturing and capturing all hardcod dates in an array. I compare date to those dates date (); If using the .isAfter () function, if the date of the hardcoded is in the past, then its Get CSS ("Display", "None");
& lt; Table & gt; & Lt; Html & gt; & Lt; Table & gt; & Lt; Tr class = "gig" & gt; & Lt; Td square = "gigDate" & gt; 27 March 2013 & lt; / Td> & Lt; Td> Salon & lt; / Td> & Lt; Td> Atlanta, GA & lt; / Td> & Lt; Td> $ 20 (2 pass) & lt; / Td> & Lt; Td> Button tix & lt; Td> & Lt; / TR & gt; & Lt; Tr class = "gig" & gt; & Lt; Td square = "gigDate" & gt; ... date2 .. & lt; / Td> & Lt; / Tr & gt; & Lt; Tr class = "gig" & gt; & Lt; Td square = "gigDate" & gt; ... Date 3 .. & lt; / Td> & Lt; / Tr & gt; & Lt; Tr class = "gig" & gt; & Lt; Td square = "gigDate" & gt; ... date4 ect .. & lt; / Td> & Lt; / Tr & gt; & Lt; / Table & gt; & Lt; Script type = "text / javascript" & gt; Create $ ("document") (function () {ARR to hold {var stringDate = []; // elements now = dateToday (); // create current date $ ('.gigDate'). (I, e) {// array string data is added to date ($ (e) .text ());}); (var y = 0; y & lt; stringDate.length; y ++) {var SingleDet = Date. PRSE (StringDit [Y]); // compare to purse to milliseconds er = now. Enter the same date (// date) if compare (compare) {$ ('.gig '). CSS ("display", "none"); // hide & lt; tr class = "gig"> if in past}}}); & Lt; / Script & gt; The loop logic seems to work properly, but if (statement) that adds to the performance of the style: no one is odd, any help would be welcomed.
When you try to hide a line, you can hide all of them - $ ('.gig') selects all the rows, not that you think so.
Take your logic inside the loop where you test the date. In roughly this way (I am changing my code as much as possible, it is still not working, it has not checked):
var now = date.today (); // Create current date $ ('.gigDate') Every (function (i, e) {// adds a hardcode date to turn on the circled var current = ($ (e) .text ()); var singleDate = Date.parse current); // pars for mseconsages = compare now = now Later (single date); // Compare today's date if (compare) {// We want to hide TD's guardian, TD: $ (e) No (). CSS ("Display", "None"); // Hide & lt; Tr class = "gig" & gt; // if first}});
android - How to enable scrolling? -
I have the following layout when Texways change through the code, they expand and which was down now It is intended to be cut but I can not scroll, my finger is moved from the bottom, can not change the scene, even if "scrollbarAlwaysDrawVerticalTrack =" true "" is enabled. How to enable scrolling?
Edit: Work Solution:
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; ScrollView xmlns: p1 = "http://schemas.android.com/apk/res/android" p1: minWidth = "25px" page 1: minHeight = "25px" p1: layout_method = "fill" "p1: layout_height =" Fill_parent "p1: id =" @ + id / scrollView1 "> LinearLayout p1: orientation =" vertical "p1: minWidth =" 25px "p1: minHeight =" 25px "p1: layout_width =" fill_parent "p1: Layout_height = "fill_parent" p1: id = "@ + id / linearLayout1" p1: background = "# 005c2e" page 1: scrollbar unrecognized vertical trak = "true" page 1: scrollbar = "vertical" page 1: scrollbar style = "inside Overlay "& gt; TextView p1: text =" text "p1: layout_width =" fill_parent "p1: layout_height =" wrap_content "p1: id =" @ + id / text View1 "p1: textSize =" 22sp "p1: textcolor =" # 00005C "/> TextView p1: text =" text "p1: layout_width =" fill_parent "p1: layout_height =" wrap_content "p1: textSize = "22sp" p1: textcolor = "# 5C0000" p1: id = "@ + id / textView2" />> TextView p1: textSize = "22sp" p1: text = "text" p1: layout_width = "fill_parent "P1: layout_height =" wrap_content "p1: textcolor =" # 00005C "p1: id =" @ + id / textView3 "/> & Lt; TextView p1: textSize = "22sp" p1: text = "text" p1: layout_width = "fill_parent" p1: textcolor = "# 5C0000" p1: layout_height = "wrap_content" p1: id = "@ + id / textView4" / & Gt; & Lt; TextView p1: textSize = "22sp" p1: text = "text" p1: layout_width = "fill_parent" p1: layout_height = "wrap_content" p1: textcolor = "# 00005C" p1: id = "@ + id / textView5" / & Gt; & Lt; TextView p1: textSize = "text" p1: textColor = "# 5C0000" page 1: layout_wind = "fill_parse" page 1: layout_height = "wrap-content" page 1: id = "@ + id / TextView6 "/> & Lt; / LinearLayout & gt; & Lt; / Scrollview & gt;
Host your linerlight inside one.
The doctor says:
Layout container for a visible hierarchy which can be scrolled by the user, so that it is larger than physical performance. A ScrollView is a FrameLayout, which means that you should have a child in it to scroll the entire contents; This child may also be a layout manager with a complex hierarchy of objects. Often used child has a linear layout in a vertical orientation, which features a vertical array of upper-level items that the user can scroll.
How do you handle headers that include headers with a makefile in C? -
मान लीजिए आपके पास file.c फ़ाइल नाम है।
-
file.c इसमें
header1.h
header1.h शामिल है
header2.h
यहाँ मेकफ़ाइल के लिए मेरे पास है:
file.x: file.o -gcc file.o -o file.x file.o: file.c header1.h header2 .h -gcc file.c header1.h header2.h
मैं हेडर 2 एच में हैडर 1.h को शामिल करने के तरीके के बारे में उलझन में हूं।
क्या यह लाइन बेमानी है? या निर्भरता दिखाने के लिए क्या यह अच्छी शैली है?
file.c header1.h header2.h
अपडेट: मैं माफी चाहता हूं भ्रम के लिए मैंने इस सवाल पर किए गए संपादन में बदलाव किया है वर्तमान मेसोफाइल एक है जिसे मैंने मूल प्रश्न में पोस्ट किया है जोनाथन का उत्तर संदर्भित करता है।
मूल संस्करण प्रश्न का निम्न कोड
makefile में होता है:
file.o: file.c header1.h header2.h -gcc file.c header1.h header2 .h
मेरा जवाब प्रश्न के मूल संस्करण को संबोधित करता है, इसे तय करने से पहले।
ध्यान दें कि संकलन लाइन निष्पादन योग्य
A.out जब तक हेडर फाइल संकलित करने के लिए कंपाइलर ऑब्जेक्ट न हो आपको कमांड लाइन में
-c होना चाहिए।
कुछ समस्याएं:
-
इन में एक
मेसेफाइल , जब ऑब्जेक्ट फ़ाइल को पुनर्निर्माण की आवश्यकता होती है?
उत्तरः जब सोर्स फाइल या हेडर में से एक में बदलाव शामिल हैं।
सहायक प्रश्न: इस निर्भरता रेखा का क्या मतलब है:
file.o: file.c header1.h header2.h
सहायक ए:
file.o
यदि आप निर्धारित करते हैं:
header1.h पर निर्भर करता है कोड> हैडर 2.h ,
header1.h को होने वाला क्या है जब आप
header2.h बदलते हैं?
उत्तर: कुछ भी नहीं। आप
header1.h प्रति से संकलित नहीं करते हैं। यह ऑब्जेक्ट फाइल है जो बदल जाती है।
यदि आप
file.c को निर्धारित करते हैं तो
header1.h पर निर्भर करता है < कोड> हैडर 2.h या दोनों, जब आप किसी एक हेडर को बदलते हैं, तो
file.c को क्या होने वाला है?
उत्तर: फिर से कुछ नहीं। आप
file.c को बदल नहीं सकते; आप ऑब्जेक्ट फ़ाइल फिर से कंपाइल कर सकते हैं।
इसलिए, अपने ऑब्जेक्ट फ़ाइल नियम का निर्भरता भाग ठीक है (स्वचालित निर्भरता पीढ़ी से संबंधित सीमाओं के भीतर) नियम में कोई बात नहीं है जो कहती है कि स्रोत फ़ाइल हेडर पर निर्भर करती है; वास्तव में, स्रोत फ़ाइल सीधे हेडर पर निर्भर नहीं करती है (यह अप्रत्यक्ष रूप से उन पर निर्भर करता है, यदि शीर्ष लेख सामग्री बदल जाती है ताकि वैध कोड क्या मान्य हो, अब तक कोई मान्य कोड नहीं होगा, स्रोत तय होने तक कुछ भी संकलित नहीं होगा।) लेकिन यह विषय से थोड़ी दूर है।)
हार्ड-कोडिंग निर्भरता समस्याग्रस्त है; वह बदल गए। दूसरी ओर, निर्भरता स्वचालित रूप से उत्पन्न करने के लिए fiddly है जीसीसी विकल्प हैं (जैसे
-M ,
-MM ,
-MF ,
-MG ,
- MP ,
-MQ ,
-MD ,
-MMD ,
-MT ,
- एच â â â? ) अगर वे नहीं करते हैं ये मदद कर सकते हैं स्वत: निर्भरता पीढ़ी को अनदेखा करने के लिए
मैकडॉन्ड ,
mkdep और उससे संबंधित कमांड देखें।
स्वत: निर्भरता पीढ़ी की उपेक्षा करना, आपका मेकअप फ़ाइल शायद पढ़ा: < / P>
FILES.o = file.o file.x: $ {FILES.o} $ {CC} -o $ @ $ {CFLAGS} $ {FILES.o} file.o: फ़ाइल। C header1.h header2.h
बना को
file.c में
file.o < / Code>।
जब आपका प्रोग्राम भी
अन्य.ओ का उपयोग करने के लिए बढ़ता है, तो आप बस
अन्य.ओ को मैक्रो
फ़ाइलें जोड़ सकते हैं। ओ (यही कारण है कि यह एक बहुवचन नाम है)। आप निर्भरता की जानकारी भी जोड़ सकते हैं यदि आपको पुस्तकालयों की भी ज़रूरत है, तो आप लिंक लाइन में विकल्प जोड़ सकते हैं:
एलडीएफएएलजीएस = -एल / यूएसआर / लोकल / लिब एलडीआईएलबीएस = -लोकल फाइलें.ओ = फाइल। अन्य 1.ओ Other2.o file.x: $ {FILES.o} $ {CC} -o $ @ $ {CFLAGS} $ {FILES.o} $ {एलडीएफएएलजीएस} $ {एलडीआईएलबीएस} file.o: file.c header1.h header2 .h
ध्यान दें कि ऑब्जेक्ट फ़ाइलों के बाद पुस्तकालयों को जाना चाहिए। ऑब्जेक्ट फाइलों से पहले पुस्तकालयों को सूचीबद्ध करना अन्य प्लेटफार्मों पर लिंक-टाइम असफलताओं का नेतृत्व करने के लिए उपयुक्त है, जो आपके सॉफ़्टवेयर के निर्माण की कोशिश कर रहे हैं।
php - Prestashop Contact-Form Subject -
मेरी पीआरशॉप संपर्क फ़ॉर्म में इस कोड में मौजूद है
जो इस क्वेरी को बनाते हैं और यह सामान्य परिणाम प्रदर्शित करता है मैंने समाधान खोजने के लिए कुछ दिन बिताए हैं और समस्या और परिणाम < P> SELECT * FROM ' _DB_PREFIX _। 'संपर्क सी LEFT JOIN' ._DB_PREFIX _। 'Contact_lang cl पर c.id_contact = cl.id_contact WHERE cl.id_lang =' (int) ($ id_lang)। ' आदेश द्वारा नाम एएससी
SELECT * से ava_contact c LEFT JOIN ava_contact_lang cl पर c.id_contact = cl.id_contact WHERE cl.id_lang = 6 आदेश द्वारा नाम एएससी की सीमा 1, 30
getContacts विधि (.. \ shop \ classes) में कुछ सफेद रिक्त स्थान को हटाने के साथ हल की है
c++ - "Open Implementation" in Eclipse CDT -
From eclipse CDT (Juno), how can I quickly navigate the implementation of the Function / Method Declaration (S) Can i ?
I use F3 when text is turned on function, announcement and implementation Alternate between ctrl-click The keyboard shortcut allows me to announce (in a
.cxx file) from the implementation (
H file). I want to do the opposite behavior.
java - Random erronous highlighted resulted in JTextPane (Arabic) -
I am trying to search and highlight words in my JTextPane. It works wonderfully with words that do not have many results so far, but when I try to search for a word in which there are so many examples, sometimes Highlighter shows the path to the result, As it remembers with many letters Anyway, here's the code that I used at the end.
int index = 0; String text = null; {Int length = textPane.getDocument (). Try it. GetLength (); Text = textPane.getDocument (). GetText (0, Length); } Catch (Bad leonation expansion E1) {// To-O auto-generated catch block e1.printStackTrace (); } Try {while (index = text.indexOf (myWord, index)) gt; = 0) {DefaultHighlighter.DefaultHighlightPainter highlightPainter = new DefaultHighlighter.DefaultHighlightPainter (Color.YELLOW); TextPane.getHighlighter () AddHighlight (index, index + myWord.length (), highlight pane); Index + = myWord.length (); }} Grip (Badlocon exception e) {// Todo auto-generated catch block e.printStackTrace (); }} Here is a screenshot that describes the problem red circle = false result, green circle = right result
Thank you in advance for your help.
I do not know whether Highlighter is supported to use or not. What I can tell, Highlighter is only used by javax.swing.text.View and its related sections.
I will do it this way:
StyledDocument Document = textPane.getStyledDocument (); Style Highlight = document.addStyle ("Highlight", tap); StyleConstants.setBackground (Highlight, Color. YELLOW); String text = document.getText (0, document.getLength ()); While ((index = text.indexoff (myword, index))> gt; = 0} {document.setCharacterAttributes (index, myWord.length (), highlight, false); Index + = myWord.length (); }
python - Comparing list items and tuples -
In Python 3, I am trying to create a program that inputs the user as a 3-digit code And converts them into one of the items in a list, then compares these items to Tuepale with the first (3 digit code) in the list of Tuipelle and prints Full Tupal. Can i see I am using dual which is given the list of shares which are called exchanges MDATA which has been fixed in such a way: will be an ideal input: The related output will be: I am just stuck on and / or for the statement which I think I need. Your point is here: This does not understand Python. In Can be worth in, subscribe to a set Checking for a large amount of data is much more efficient. Your syntax appears to be a mashup for different methods. You may mean: However, because it is directly equivalent to portfolio_list
import shares portfolio_str = input ("please give portfolio list") portfolio_state = portfolio_trale ('', '') Portfolio_State = Portfolio_Strap. (Portfolios_list = Portfoliostratus (',') Print (Portfolio_list) Print () Print (Data 'for data (name, code, name, share_value) = share. EXCHANGE_DATA: & Lt; 6} {: & 8;} Format ('code', 'name', 'value')) Portfolio_list in Code == i: print ('{:: & lt; 6} {: & lt; 20} {: & gt; 8.2f} '. Format (code, name, share_value)) Other: Print ("Failure")
EXCHANGE_DATA = [('(' AIA ',' Okayer '', '1.5', 'AIR', 'Airs', 5.60), ('AMP', 'Emp', 3.22), ('ANZ', 'Engbank Group', 26.25), ('ARG', 'Argogee' 12.22), ('CN' ',' Contact ', 11.22), (' CNU ',' Chorus', 3.01), ('DIL', 'Dilje NT', 5.3), ('dnz', 'dnj property' 2.33), ('EBO', 'Eboss', 1.1),
AIA, AA P, ANZ
Code Name Value AIAACEAR 1.50 AMP AMP 3.22 ANZ UNBANGGROP 26.25
if in code == i Portfolio_list:
, checks that if a given value is included in the list, it checks that if
i has
portfolio_list , checks That is equal to
code
true or
incorrect (which also returns
i portfolio_list what do you want If:
portfolio_list can be long, then make it a set:
if the code in portfolio_lit:
if any (For code == i in portfolio_list):
code in code, but more verbatim and inefficient, it is a Not a good solution.
java - Struts2 Iterator OGNL index not working -
मेरे पास यह इटरेटर है।
& lt; s: iterator value = "myQuestions" स्थिति = "कुंजी" & gt; & Lt; s: संपत्ति मान = "% {# key.index}" / & gt; & Lt; h1 & gt; & lt; s: संपत्ति मूल्य = "मेरे प्रश्न [% {# कुंजी.इंडेक्स}]। प्रश्न" / & gt; & lt; / h1 & gt; & Lt; / s: iterator & gt; जब इटरेटर इस पर पुनरावृत्त करता है
& lt; s: संपत्ति मान = "% {# key.index}" /> यह उचित सूचकांक दिखाता है लेकिन जब मैं % {# key.index} इस यह उस तत्व को प्रदर्शित नहीं करता है जो उस विशिष्ट इंडिक पर है।
तो हम कहते हैं कि वर्तमान सूचकांक 0 पर है।
जब मैं यह & lt; s करता हूं: संपत्ति मान = "मेरे प्रश्न [% {# key.index}]। प्रश्न" / & gt; यह कुछ भी प्रदर्शित नहीं करता है लेकिन जब मैं मुश्किल कोड इसे। <पूर्व> & lt; s: गुण मूल्य = "मेरा प्रश्न [0]। प्रश्न" / & gt; यह उचित आइटम प्रदर्शित करता है मैं क्या खो रहा हूँ?
आप मूल्यांकन तोड़ रहे हैं यह इसके करीब होना चाहिए:
% {myQuestions [# key.index]। प्रश्न) यह बहुत बेमानी है, हालांकि, जब से आप इसे पुनरावृति कर रहे हैं , और संग्रह में प्रत्येक ऑब्जेक्ट को स्टैक पर धकेल दिया जाएगा, इसलिए आपको केवल प्रश्न को संदर्भित करना होगा। आप var विशेषता यदि आपको प्रत्येक ऑब्जेक्ट को नाम देने की आवश्यकता है इटरेटर टैग डॉक्स की जांच करने पर विचार करें।
What is the meaning of the asterisk (*) when referring to Android XML resources? -
What does this Android code mean?
Android_ics / packages / apps / Android such as: id / timeDisplayForeground "Android: layout_width =" wrap_content "Android: layout_height =" wrap_content "Android: singleLine =" set up / ridge / layout * Allows you to use personal resources. Private resources are private for one reason because they can change their name in the future as part of the firmware or skin update It is not a good idea to use these resources unless you have such an environment In which you know that these resources will not change your app in the future and will not break. For example, personal resources are being referred by a system app, where you will see the most referenced references. * is the difference between ,
+ and empty:
@ * android: id
Another how do I use LINQ to Enumerate Dictionaries -
Thanks for all those who answered and contributed to my previous question. I went to another interesting incarnation of a LINQ question ... so as before ...
I have the following
const string A_CONVERSATION = "AD channel "; Const String NOT_REPUTABLE = "Advertising Solutions"; Const string DO_NOT_KNOW = "Capture input"; Private Enum Properties {MyHo, Ditches, It} list & lt; String & gt; MyList = new list & lt; String & gt; {A_CONVERSATION, NOT_REPUTABLE, DO_NOT_KNOW} Personal dictionary & lt; Properties, String & gt; PropertyToString; Private dictionary & lt; String, Prozios & gt; StringToProperty; How can I use LINQ to populate each dictionary so that I can use the following? Is there a line LINQ statement that will populate each one?
Properties MyResult1 = Strontopropy [A_CONVERSATION]; String MySResult2 = PropertyToString [properties.It]; I would like to use the property specifically in the second case.
to provide what you want ...
In two statements (Some mergers may seem to me through some sort of search - but I do not think it was relevant - everything should not be in a line :)
var properties = ((Properties []) Enum.GetValues (typeof (attribute))). ToList (); Var propertyToString = properties.Zip (MyList, (p, s) => new {prop = p, text = s}). ToDictionary (x => x.Prop, x => x.Text); Var stringToProperty = properties.Zip (MyList, (p, s) = & gt; new {prop = p, text = s}). ToDictionary (x => x.Text, x => x.Prop); I have intentionally isolated the structure of the enum list - for clarity - if you wish, you can move it in one line.
wshttpbinding - WCF error The client certificate is not provided. Specify a client certificate in ClientCredentials -
I am trying to call a WCF service. I have created a self-signed certificate and installed in my local machine \ person's certificate, and also I said that in my section But it did not understand why this error was.
This is my web. Config
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Configuration & gt; & Lt; System.serviceModel & gt; & Lt; Binding & gt; & Lt; WsHttpBinding & gt; & Lt; Bond name = "wsHttpEndpoint" & gt; & Lt; Safety Mode = "Transportation" & gt; & Lt; Transport customer credential type = "certificate" /> & Lt; / Safety & gt; & Lt; / Binding & gt; & Lt; / WsHttpBinding & gt; & Lt; / Binding & gt; & Lt; Customers & gt; & Lt; Endpoint address = "https://abcdxyz.abc.syntax.com/TestCCService.svc" binding = "wsHttpBinding" binding configuration = "wsHttpEndpoint" contract = "TestCCService.ITestCCService" name = "wsHttpEndpoint" /> & Lt; / Customer & gt; & Lt; Behavior & gt; & Lt; Endpoint beehaviors & gt; & Lt; Behavior name = "custom carrier" & gt; & Lt; ClientCredentials & gt; & Lt; Client authentication search value = "abc.mymachine.name.com" x509FindType = "FindBySubjectName" storeLocation = "Local Mackin" storeName = "My" /> & Lt; / ClientCredentials & gt; & Lt; / Behavior & gt; & Lt; / EndpointBehaviors & gt; & Lt; / Behavior & gt; & Lt; /system.serviceModel> & Lt; / Configuration & gt; But when I try to call my throwing errors in my service system "Client certificate has not been provided. Specify client certificates in client authentication."
Resolve this error to appreciate your suggestions?
I added the configuration to include the configuration = "customvichier"
< Code> & lt; Endpoint address = "https://abcdxyz.abc.syntax.com/TestCCService.svc" binding = "wsHttpBinding" binding configuration = "wsHttpEndpoint" contract = "testcc service.itestcc service" name = "wsHttpEndpoint" ** behaviorConfiguration = " Custom Bravery "** /> And now its working.
Thanks for the help
python - django for loop over list -
I have a list made by All elements are queries that are dynamic I The image is as follows: There may be multiple images Now I want to show the item on that template and to repeat that Thanks for the help If the zip
List = zip (rating, image, comment)
class image (request): location_id = models.IntegerField () bild = models.ImageField (upload_to = ".", Default = '')
list I'm grounded. Say, there are 2 images in one place. My problem is:
{rate for%, image,% in list} How do I show both pictures of one place here? <{Image.bild.name}} gives me the first image {% endfor%}
location should be a field or property of the class, which gives you relevant ratings / comments / images. You can then pass a list of
location on your template.
location is a Django model, then the rating / comments / images should be in each
ForeignKey in the
location Indicates. In that case, Django will create properties on the code / location / which points to that rating / comments / images. Use
related_name to choose the name of that property, otherwise the name of Django will be invented.
elasticsearch - Set the index field to be not_analyzed and then do wildcard query, does it appear low performance? -
Determine the index field to be non_allowed and then do wildcard queries, does this show less performance? ...... Does any issue show less performance ??
Yes. Wildcard queries are not very efficient
Inverted index works very well because it has an entry for each term that you want to search for. However, your wildcard queries are not using the inverted index because this is the purpose.
For example, if you search on If you know that you want to search wildcards, then you should analyze your data. To analyze your area, use an NGram or Edge-NGRM Tokiizer for a partial match index. This will allow the inverted indicator to work. "foo *" , then it must find all the words inverted index that starts with
"foo" , Then find it all at a very slow and memory intensive.
c# - Setting The Window Position -
some background
I am writing an application that transfers a lot of windows to the screen The real time constraint that I demand I normally set window terms by using the following formats:
this.Left = position.x; this. Top = position. Y; question
I would like to know that this is the fastest or most effective way to do this. Is there an event closed to refresh the left parties, or does he wait for an overdue event?
Second, why there is no function to completely set the position? Or is it also necessary? I know that in the Windows API, there is SetWindowPos , but I prefer to stay away from unmanaged code. Can this function be used fast?
I'm not sure that this is the most efficient but it may have several calls to perform bar performance issues. The reason for this is because the left and top dependency properties are set to the PropertyChangedCallback example OnPositioningChanged method. From this call call link: There are frequent calls for invalidation, or significant display results for particular update layouts.
I know this is a clear answer, but the best way to benchmark both methods and see what works for you. Even if you go on an unmanaged route or stick to your current method, I think that the same rendering call must be done at some point (happy to be corrected on it).
PHP Href Handling/Rewriting -
I have .htaccess settings that will rewrite anything in index.php to create a fixed url. For example:
rewrite ^ (. *) $ Index.php? / $ 1 [L]
url: www.domain.com $ _ SERVER ['REQUEST_URI'] There is no problem with and I can handle the url. However, I have a problem in my links, for example:
doubly linked list in alloy -
I was trying to reverse a double link list in alloy, I made a signature for it. This sign is
sig node {} / / defines each region as a separate subset of node sign first node {} sig last extended node {} sig element extended node {} Sig doublylinkedlist {head: First of all, // define a head pointer tap: one last, // define a null pointer object: set element, elements of linked links link: ele- & gt; Ele, // path between the elements of a link list headpoint: head-> An ele, // head link indicates an element of the list nullpoint: ele- & gt; Null // link to an element of the list of links to zero} {a link & amp; IDE // A self-clarification indicates a nullpoint // only one element for zero links = links + can be used to link / element elements / all elements E: ele | E. (^ (Link)) = ele // element all are connected e: elephants | A R: head, N: empty. (R-> E) in headpoint = & gt; (E-> N) can not be pointed by the head in the answerpoint / element. All E: Eel can not be pointed out. # (E. (links)) and (3) link (A link). & Lt; 3/3 elements can not draw more than 3 drawings and more than 3 audiogies all. A R: Head | (R-> E) in headpoint = & gt; # (Link). E) = 1 & amp; Amp; # (E. (Links) = 1/1 The element is pointed out by the head, involuntary and unbiased 1 All E: elephants | An N: Empty | (E-> N) in nullpoint = & gt; # (Link). E) = 1 & amp; Amp; # (E. (links) = 1 // is inductive and pointless to pointing to the principle 1} Reverse the reverse for {1} double linklist, actually 4 elements, exactly 1 before, exactly 1 last, fine 0 node The problem is that when I actually run for 8 elemnts, returns the desired result. After that it shows examples where there is more than 3 indecisive and 3 titles in one element.
My first impression is that this problem is very complex for this problem, and I want to debug it Instead, I suggest writing again.
There are some unrelated comments about your model here
-
Instead of using exactly 1 in a particular statement, you -
In a definitive description , you can use the abstract sig in the same SIG declaration (for example, abstract sig node Absolutely 0 nodes -
I actually use "first", "last", and "element" to separate a The type of nodes that do not look good cause; I will use a node signature instead; -
both head: one first And headquarters: head -> one ele seems unnecessary. If the same head node is intended, then you should only head: one node ; -
Similarly, using one r: head in one of your attached FAs, CTS is also unnecessary, because you know that the head Absolutely a node (which is your mother Always that is going to be a nuclear first ) to point to, so r is always going to be that node. I do not know that there is a strong reason to model your list in this way. My first approach will be something more in object-oriented style, e.g.,
sig node {next: alone node, ex: alone node} sig DLinkedList {head: lone node} ... If you want your nodes to exist independently from the list of double links (i.e., define all the necessary relationships in DLinkedList sig, which is exactly BTW Is okay), I still do not use special before and last sub-messages Reggae maybe something like sig node {} sig DLinkedList {head: single node, tail: single node, nxt: node - & gt; Single node, prv: node - & gt; Single node, nodes: set node} {nodes = head * Nxt = some nodes = & gt; Not a tail ^ nxt & amp; Iden // no cycles nxt = ~ prv // symetric no prv [head] // head has no prv no nxt [tail] // tail has no nxt near. ^ Nxt = Node. ^ All nodes in nxt // nxt are accessible from head} predecessor [DL, DL ']: DLinkedList] {dl'.head = dl.tail dl'.tail = dl.head dl'.nxt = dl.prv} { Some DL, DL 'play DLinkedList} reverse [DL, DL] / / / any other lists or nodes #DLinkedList = 2 nodes = DLinkedList.nodes} Do not make
.last and .each in rails -
I create a new sub-comment when trying to get the last record in a scene ... my code is The following ...
& lt;% @ subcomment = @ comment.subcomments.order ("created_at"). Last% & gt; & Lt;% @ subcomment.each do | Comment | & Gt%; It worked! & Lt;% end% & gt; I know that the last record for the Subbuant is ... (i.e. when I use it. Insist, this shows the object), but for some reasons, .each gives the following error is .. .
I need to use it.
Undefined method 'each' for noMethodError (# & lt; subcomment: 0x007fb14c0e5510 & gt;). See thanks for showing all sub-comments in general.
Finally ... I want something like this:
<% if defined? Showlist% & gt; & Lt;% @ subcomments = @ comment.subcomments.order ("created_at"). Last% & gt; & Lt;% [@subcomments] .each do | Subcomment | & Gt%; & Lt; Div id = "subcomments" & gt; & Lt;% else% & gt; & Lt; Div id = "subcomments" & gt; & Lt;% @ subcomments.each do | Subcomment | & Gt%; & Lt; & Lt; Here @ sagments & gt; & Gt; There is a long templates for what to do with i.e. I want the template to be repeated multiple times and should work for the last item if a parameter is sent to the showstol
Last usage will only bring you a choice, you can not run on the same thing again.
java - Using "List" to retrieve queryResult of BigQuery only got 512 records -
queryResult has detected that it has 13224 rows, then I
list & lt ; TableRow & gt; Line = queryzialt.getra (); Then this list shows that there are only 512 rows in "Rows".
Any help?
If the rows are large or there are a lot of them, then you can not get all the rows back By making a call, you can get to the remaining rows. Gatequality () or tabledata.List () with related offset.
From:
- Call jobs.query with your query string. This method takes an optional period of time; If 0 is set to or not specified, the method will default to 10 seconds. If the query returns within the specified time-period duration, the method will return the first page of the result. For additional results, call jobs. If the query timeout expires, before the query ends, the method will return the job = false, and you should call the jobs. Query job continues even after the timeout period until it is over, either successfully or the error has occurred. [If required] Call jobs [if required]. To get results from results via page results via more results, to check the results of a query that has exceeded their time limit, or until the temporary table is destroyed. This method lets you specify a starting line, and also takes a timeout that works like jobs. The task has not yet been completed to allow the waiting.
objective c - Why does NSString copy returns the same string -
इस सवाल का पहले से ही एक उत्तर है: < / P>
- 4 जवाब
पीओ स्वयं URL.copy $ 1 = 0x1fc3ced0 http://maps.googleapis.com/maps/api/staticmap?&zoom=16&size=160x160&maptype=roadmap&sensor=true¢er=-6.2032,106.7696&markers= आकार: छोटा सा% 7Ccolor: नीला% 7C-6.2032,106.7696 $ 2 = 0x1fc3ced0 http://maps.googleapis.com/maps/api/staticmap?&zoom=16&size=160x160&maptype=roadmap&sensor=true& केंद्र = -6.2032,106.7696 & amp; मार्करों = का आकार: छोटा सा% 7Ccolor: नीला% 7C-6.2032,106.7696 $ 3 = 0x1fc3ced0 http://maps.googleapis.com/maps/api/staticmap?&zoom=16&size= 160x160 & amp; maptype = रोडमैप & amp; सेंसर = सच में & amp; केंद्र = -6.2032,106.7696 & amp; मार्करों = का आकार: छोटा सा% 7Ccolor: नीला% 7C-6.2032,106.7696 (lldb) पो self.URL $ 4 = 0x1fc3ced0 http: //maps.googleapis .com / नक्शे / API / staticmap? और कर रहा हूँ पी; ज़ूम = 16 & amp; आकार = 160x160 & amp; maptype = रोडमैप & amp; सेंसर = सच में & amp; केंद्र = -6.2032,106.7696 & amp; मार्करों = का आकार: छोटा सा% 7Ccolor: नीला% 7C-6.2032,106.7696 < p> मैंने सोचा था कि प्रति कुछ ही लेकिन एक अलग पते पर लौट जाना चाहिए?
NSString < / कोड> अपरिवर्तनीय है, इसलिए वास्तव में इसे प्रतिलिपि बनाने के लिए बहुत कम कारण है। इसके बजाय यह केवल संदर्भ संख्या को आंतरिक रूप से बढ़ा सकता है अधिक जानकारी के लिए जांचें।
sql server - Error connecting to MSSQL with SQLSrv and PHP 5.4.7 -
I am trying to connect to PHP from an MSSQL database and a very disappointing while trying to connect I'm experiencing an error. This message loads for one minute before printing the following message:
Fatal error: 'Exception' with message 'SQLSTATE [08001]' PDOException ': [Microsoft] [SQL Server Native] Client 11.0] Named Pipes Provider: Connection to SQL Server can not be opened [53]. Here is my connection string:
DB :: configuration ("sqlsrv: server = {$ dbHost}; database = {$ dbName}", $ DbUser, $ dbPass); and in my DB class:
public static function configuration ($ dsn, $ user, $ pass) {self :: $ _ pdo = @ New pdo ($ DSN, $ user, $ pass); ... // Deliberately left out I am very surprised I have the following modules configured in the php.ini file: extension = php_pdo_sqlsrv_54_ts.dll. Although I think I have installed it correctly and I have not received an error message about which the driver is not working, this bit of PHP does not print anything:
If (function_exists ('sqlsrv_connect')) O "; And as you can see from my error message above SQL Server Native Client 11, that works. On the platform, I tried to take no advantage of the firewall I do not have much information about SQL Server or I will share it here.
This is my first posting on the stack, so I apologize if I am leaving important part of the information or I In any way, I am not following the proper etiquette, but any help is definitely appreciated.
In addition, I should add that I already googling too much Do it Or, I have not had any success.
My installation process really works, but Connection was really invalid. I should have used the IP address as the host name, which I was not. I was using a colon instead of a comma before the port number. In the end, no space allowed in the connection string, which I thought would be automatically snatched. So, for you, there is a valid connection string for those who can find themselves in the same situation: "connectionString =" sqlsrv: server = 123.123.12.1,9864; database = MssqldatabaseWootWoot "; In addition, in response to my previous observation about that function sqlsrv_connect, I did not enable the required driver for that function. It is located in php_sqlsrv_54_ts.dll, after enabling, the function is reported as current. Anyone who puts a time in solving this, thanks.
php - PayPal Rest API for Payments returns NULL in the sandbox -
I have a sandbox account with PayPal, I use the curl on PPL to retrieve the token through the API However, the process of a test card only taps. Anyone have any problems with code? Is this a known issue with PayPal sandbox? The snippet clients are given below, however, as mentioned earlier, using my actual credentials, I can successfully call for the token again.
To create a request:
& lt ;? Php class psPayPal {Private $ Tokens = 'https://api.sandbox.paypal.com/v1/OAuth2/Token'; Private $ payment url = 'https://api.sandbox.paypal.com/v1/payments/payment'; Private $ client = 'dlgzdfkja; Scandfucks djfkjddfjjjjjjfkjkjkdfjfjdjffjjf; J '; Private $ secret = 'klj; Akjdfjeieiadfaldkjfelkajsdfkjaejeiejisadif; Alkdsfj; Kjjie '; Private $ Tokens; Private $ TokensHandle; Private $ PaymentHandle; Public function __ composition () {$ this- & gt; Tokenshadele = curl_init ($ this-> tokenurl); $ This- & gt; BuildTokenRequest (); } Public function buildTokenRequest () {$ header = array ('Accept: Application / Jason', 'Accept-language: en_US'); $ User = $ this- & gt; Client ':' $ This- & gt; secret; $ Data = 'grant_type = client_credentials'; Curl_setopt ($ this-> TokenHandle, CURLOPT_HTTPHEADER, $ header); Curl_setopt ($ this-> TokenHandle, CURLOPT_USERPWD, $ user); Curl_setopt ($ this-> TokenHandle, CURLOPT_POSTFIELDS, $ data); Curl_setopt ($ this-> TokenHandle, CURLOPT_RETURNTRANSFER, true); $ This- & gt; CommitTokenRequest (); } Public function cumTTTM () {$ response = json_decode (curl_exec ($ this-> tokenhandle)); $ This- & gt; Token = $ response- & gt; Access_token; Curl_close ($ this-> tokenHandle); } Public Functions Construction Payment Request ($ cost = '', $ description = '') {$ this- & gt; Payment Handle = curl_init ($ this-> Payment URL); $ Header = array ('Accept: App / Jason', 'Approved-language: en_US', 'Authority: Bearer'. $ This- & gt; Token); $ Data = array ('intent' = & gt; 'sale', 'donor' => array ('payment_maston' = & gt; 'credit card', 'funding_instriggers' =' gt; array (array 'credit_card' = & Gt; array ('number' = & gt; '550000555555', 'type' = & gt; mastercard ',' expired_ur = '>' 2018 ',' cvv2 '=> 111; 'Array' ('first_name' = & gt; 'joe', 'last_name' = & gt; 'shoppers'))), 'transaction' = & gt; array (array ('zodiac' = & gt; array ('total' > '39 .54 ',' currency '=>' US Dollar '),' Description '= & gt;' This is descrription for my hat '))); $ D = json_encode ($ data); Curl_setopt ($ this-> Payment Handle, CURLOPT_HTTPHEADER, $ header); Curl_setopt ($ this-> Payment Handle, CURLOPT_POSTFIELDS, $ d); Curl_setopt ($ this-> Payment Handle, CURLOPT_RETURNTRANSFER, true); $ This- & gt; CommitPaymentRequest (); } Public function commitPaymentRequest () {$ response = json_decode (curl_exec ($ this- & gt; Payment Handle)); Var_dump ($ response); Curl_close ($ this-> PaymentHandle); }}? & Gt; I have tried with many options, although I believe the code above is to be completed. I have also certified JSON which I am sending with JSON lint. JSON is as follows: ["{{" intent ":" sale "," donor ": {" payment_method ":" credit_card "," funding_instruments ": [{" credit_card ": {" number ":" "" "" "" "" "" "" "," Type ":" mastercard "," expired_yure ":" 2018 "," cvv2 ":" 111 "," first_name ":" joe "," lastname ":" shopper "}} ] "," Transaction ": [" total ":" 39.54 "," currency ":" USD "}," description ":" this is descrription for my hat "}] < P>}
Any suggestions would be greatly appreciated!
Header, Content Type: Application / Jason H For some reason, PHP had guessed the right material-type in the token request (possibly due to the acceptance header), but when passed, the JSON-array changed the content type to app / XML Now all good!
iphone - Hpple-All Nodes was nil -
I'm very new in Objective-C, but with regular C is good and I'm looking into iPhone development. Right now all my nodes in the school's grading system are zero I know that they are in perfect xpath because attempt to remove the // table [@ class = 'grid'] / tbody / tr [4] / td [16] Show in the Firefox Express Checker plugin correctly I know that the NSDT obtained from the web page is correct because I did it NSODog. But for some reason I still end up with zero nodes.
Course 2 * Fillows (Entry Line) {NSDRL * CURL = [NSD URL URL String: @ "My School Site Is Here"]; NSData * CHtmlData = [NSData dataWithContentsOfURL: CUrl]; TFHpple * StuffParser = [TFHpple hppleWithHTMLData: CHtmlData]; NSString * XpathQ = @ "// table [@ class = 'grid'] / Toby / Tr [5] / TD [16] / a"; NSArray * Tutorial nodes = [StaffPersearchWithxpathQp: ExhaustQue]; / * (TFHppleElement * String Tutorial Nodes) {NSLog (@ "% @", [element content]); } * / NSString * XpathQ2 = @ "// table [@ class = 'grid'] / Toby / Tr [5] / TD [16] / a"; NSArray * Tutorial nodes 2 = [[StuffPerser SearchWithexpathQuality: ExhaustQ 2]; Course 2 * Core * [[Course 2 Alok] Init]; // NSMutableArray * newTutorials = [[NSMutableArray alloc] initWithCapacity: 0]; (TFHppleElement * element in tutorial nodes) {COUR.grade = [element content]; COUR.teacherPage = [NSURL URLWithString: [element objectForKey: @ "href"]]; } (TFHppleElement * Tutorial nodes in element2 2) {COUR.Class = [[element2 firstchild] content]; } Return Koor; }
tab from your XPath query Do Ie, it looks like
// table [@ class = 'grid'] / tr [4] / td [16] . I had a similar problem with HPPL and give me all the
tags s. Had to overcome
unity3d - how to properly use getComponants to get a audio array? -
OK, so I got this code that I shrink in a line:
GameObject GetComponents (AudioSource) [0] .audio.Play (); This row gives me this error:
Invalid cast exception: Can not insert destination type from source type. Start scripting + $ $ 4 $$. MoveNext () (at Assets / scriptexplosion.js: 7) My question is how do I change the array of components in an array of Oreosors?
gameObject.GetComponents & lt; Audio processing & gt; ();
iphone - Nested UIScrollView - Scroll Direction -
Hi, guys!
I have a question about the nested scroll view.
A scroll view with nested scroll view. I just external-scrolling view and internal Scroldrishy will call the external scrollview horizontal scrollview, and inner scrollviews Vrtikl- scrollview Basically, if only one scroll view will be scrolled at the same time. If I scroll to left or top or down , internal scroll view will scroll, and, if I does diagonally scroll to speak, one scroll both Will be done . It depends on the direction of scrolling. if angle 0 ~ 45 Degree, the internal scroll view will be scrolled if the angle is 45 ~ 90 degrees, the outer-scroll view will be scrolled. Is it possible to change ANGLE ? For example, although the angle is 30 degrees, I want to scroll horizontally. Thank you! would appreciate any help :) You nested scrollview action If you want an easy way to get this way, you can try to disable horizontal scroll just for the sake of disabling vertical scrolling for internal view and external view. However, if he does not give you the result you are looking for, you will need to do a lot of custom coding. First of all, you have to start your sub-class of the UIC scroll view. Start by overwriting these tasks: and
- (zero) viewDidLoad {[Super ViewDidLoad] // Setup an additional after loading the view, usually from a nibb. _outerScrollView = [[UIScrollView alloc] initWithFrame: self.view.bounds]; _outerScrollView.pagingEnabled = YES; _oterskrollviavkkantentsize = Kgsizemake (_oterskrollviavkfremksaijkvidth * 3, _oterskrollviavkfremksaijkhait); [Self.view addSubview: _outerScrollView]; For (int i = 0; i & LT; 3; i ++) {UIScrollView * innerScrollView = [[UIScrollView alloc] initWithFrame: CGRectMake (i _outerScrollView.frame.size.width, 0, _outerScrollView.frame.size.width , _outerScrollView.frame * .size.height)]; [Add _outerScrollViewSubview: Interscrollview]; Uiviav * Kantentviav = [[Uiviav light] Initvitःfrme: Kgrektmke (0, 0, Inrskrollviavkfremksaijkvidth, Inrskrollviavkfremksaijkhait * 2.0)]; ContentView.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed: @ "imagefile"]]; [InnerScrollView adsview: contentView]; InnerScrollView.contentSize = contentView.frame.size; }}
touchesBegan: touchesMoved: touchesEnded: touchesCancelled:
touchesShouldBegin From there, you have to calculate your own to determine the angle of the drag and accordingly send a message to scrollview, possibly on a
super Calling or more than the above mentioned tasks, you can consider writing your own scrollwheel only with scroll, As a Updrishy of Rg can only be one UIView.
join - SQL-ex.ru #26 Selecing average from two tables -
I had a question about a SQL query on the website. The query asks:
Define the average price of PCs and laptops manufactured by A manufacturer.
The database schema is as follows:
I wrote my query in this form:
select average (vaccine) Add Avg_Price (SELECT AVG (A.Price) as a PC from PC (A Model = Bimodel) Where Bmc = 'A' Union Select All All Laptops C As AVG (CPIC) On the product D (C model = D. model) where D. Maker = 'A') T
The problem is that it does not return the correct answer, the average is higher than expected. Is the calculation of the average inaccurate? How do I change the query so that it gives the expected answer?
You are average in PC prices and laptops are priced differently, then on average, the average average. Your query was good, despite this you should not be an average of prices in sub queries. Just return prices to the top level at the sub-questions and average level:
Choose from Avg_Price from Avg_Price (Select PC in PC.module where prod.Maker = 'A') Association (Select All from Laptop. Join Prod Group on PC. Model = Prod model where prod.maker = 'A')) q
javascript - Custom Google Search Ajax call -
I am using Custom Google Search to get Google content of my searched query.
Displaying some errors in my developer device This error is not affecting the result, the result is visible in my UI but some error is showing.
There are errors
-
Invalid 'X-frame-options' header to face when loading '' ???? 330 and DT = 1364365747827 and U_WA = 1366 and U_H = 768 and BS = 1366333 and PS = 1366,0 and FRM = 0 # Master-1 ':' Grant 'is not a recognized instruction. The title will be ignored
-
About insecure JavaScript Try to reach the frame with the URL: Clear the frame with the URL ?? | 330 and DT = 1364365747827 and U_V = 1366 and U_H = 768 & amp; Bs = 1366.333 & amp; Ps = 1366,0 & amp; Frm = 0 # guru-1 Domains, protocols and ports must match.
-
Invalid 'x-frames-option' header when facing 'loading'? | Search.aspx% 3Fquery% 3Dweb% 2520storage% 2520in% 2520html5% 26type% 3D2 # slave-1-1 ':' Allow 'is not a recognized instruction header will be ignored
These three errors are visible in my developer tool.
My code in ASPX page
& lt; Script src = "https://www.google.com/jsapi" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script & gt; Google.load ('Search', '1'); // Get a custom search control & amp; Place it in cseControl / note /: Place your own custom search id number here; var cseControl = new google.search.CustomSearchControl ('009827885688477640989: igzwimalyta'); // open page with the click of search results on the same page cseControl.setLinkTarget (google.search.Search.LINK_TARGET_SELF); // When there are no matches, tell CCE Control. Set Nosersstress ("Sorry, there is no page in this web site that matches all search terms."); // search field in the div with 'cseDiv' cseControl.draw ('divGoogleResult'); CseControl.execute (userInput); & Lt; / Script & gt;
Why is this error showing? How to remove these errors?
Why is this error showing?
- Because Google's code makes some non-standard
- Because Google's code tries to do things that are not allowed.
- This is similar to 1
How to remove these errors?
Google's code (or a service on Google) that service!), You can not
How do I aggregate this in SQL -
मेरे पास इन फ़ील्ड के साथ तालिका है:
UserLogonAuditID, उपयोगकर्ता नाम, LogonDate FROM Dbo.UserLogonAudit इस से पूछताछ:
का चयन उपयोगकर्ता नाम, DATEPART (वर्ष, लॉगऑनडेट) [वर्ष], DATENAME (MONTH, LogonDate) [महीना] , (1) [लॉगिनकॉउंट], कास्ट (DATEPART (वर्ष, लॉगऑनडेट) के रूप में VARCHAR (4)) + कास्ट (DATEPART (महीना, लॉगोनडेट) के रूप में वीएआरएआरएआर (2)) के रूप में [ईयरमॉन], कास्ट (CAST (DATEPART , LogonDate) के रूप में VARCHAR (4)) + '-' + CAST (DATEPART (महीना, लॉगऑनडेट) के रूप में VARCHAR (2)) + '-1' एएस डेटटाइम) [महीनास्टार्ट] यूजर लोगोनऑडिट ग्रुप द्वारा DATEPART (वर्ष, लॉगऑनडेट) , DATENAME (महीना, लॉगऑनडेट), DATEPART (महीना, लॉगऑनडेट), उपयोगकर्ता नाम में होस्टिंग उपयोगकर्ता नाम = 'demo@mybusiness.com' इसका परिणाम:
& gt; उपयोगकर्ता नाम वर्ष महीना लॉगिन कैट वर्ष महीना महीनास्टार्ट & gt; Demo@mybusiness.com 2010 फरवरी 1, 20102, 2010-02-01 00: 00: 00.000 & gt; Demo@mybusiness.com 2010 जून 1 20106 2010-06-01 00: 00: 00.000 & gt; Demo@mybusiness.com 2011 नवंबर 1 201111 2011-11-01 00: 00: 00.000 & gt; Demo@mybusiness.com 2012 अप्रैल 115 20124 2012-04-01 00: 00: 00.000 & gt; Demo@mybusiness.com 2012 1 जनवरी 2012 2012-01-01 00: 00: 00.000 मुझे यह परिणाम प्राप्त करना है
& gt; उपयोगकर्ता नाम वर्ष महीना लॉगिन कैट वर्ष महीना महीनास्टार्ट & gt; Demo@mybusiness.com 2010 फरवरी 1, 20102, 2010-02-01 00: 00: 00.000 & gt; Demo@mybusiness.com 2010 जून 1 20106 2010-06-01 00: 00: 00.000 & gt; Demo@mybusiness.com 2011 नवंबर 1 201111 2011-11-01 00: 00: 00.000 & gt; Demo@mybusiness.com 2012 अप्रैल 115 20124 2012-04-01 00: 00: 00.000 & gt; Demo@mybusiness.com 2012 1 जनवरी 2012 2012-01-01 00: 00: 00.000 & gt; & Gt; User@mybusiness.com 2010 फरवरी 3 20102 2010-02-01 00: 00: 00.000 & gt; User@mybusiness.com 2010 जून 2 20106 2010-06-01 00: 00: 00.000 & gt; User@mybusiness.com 2011 नवंबर 201111 2011-11-01 00: 00: 00.000 & gt; User@mybusiness.com 2012 अप्रैल 190 20124 2012-04-01 00: 00: 00.000 & gt; User@mybusiness.com 2012 जनवरी 6 20121 2012-01-01 00: 00: 00.000 तो, सभी उपयोगकर्ताओं के लिए।
मैं उपयोगकर्ता नामों के माध्यम से पाश कर सकता हूँ, लेकिन ऐसा लगता है कि यह सबसे अच्छा तरीका नहीं है।
को हटाने का प्रयास करें उपयोगकर्ता नाम = 'डेमो @ Mybusiness.com ' आपके एसक्यूएल से खंड
mysql - No foreign key constraints in database.! -
My organization works on Spring MVC with Hibernate We always specify foreign key constraints in the mapping file, such as a person This mapping will create multiple relationships between However, now the organization has decided not to mention any kind of relationship in the mapping file, in this case In such a case, if we want to get the person's contact list, then we will have to ask two questions so that for a person's contact list, suppose that we want to receive the person's list. Contact list will then have to do When I ask why not specify a relationship then the senior said, If the foreign key is in DB, then we do not divide the pieces and divide Can. When we set fire to join the query DB takes much time to execute it. Which can slow down the DB server. But, my question is - If I type This type of looping can be slowed or What if I The person wants to bring its list, list address, merit list, with the issue of n + 1 due to this? Whether or not to specify a mapping, this situation is more beneficial. OK, I divide one of the early days into Microsoft SQL (MS) The states doing this have shown a query, which is selected from a partition table, which contains the population data in many parties, and its indexes and statistics are not used to reach those divisions, which have no relevant data was not. Of course if you do not have the FK stable then it can not use the index and the data so that you know about FK. I am pretty sure that this will be covered by Cullen Delanye in his book (for the relevant edition of MSSQL). The key is that the data will include the necessary information to prevent unnecessary efforts. Demo actually used a union to display the effect Person.hbm.xml
& lt; Set name = "ContactList" & gt; & Lt; Major column = "PersonId" foreign-key = "Fk_Peson_Contact" /> & Lt; One-to-many classes = "sample.model.contact" / & gt; & Lt; / Set & gt;
person and
contacts , and
PersonID < In the form of a foreign key column in the Code> Contacts table.
person near the map
contact Instead of mapping, there will be no one-to-many mappings of any type
personID to capture columns Create this scenario table In
person and
contact will look the same but the difference is that their Coz no mapping is specified, there is no connection between
person and
contact .
for loop for the person's list and will bring its contact list which will reduce the number of questions.
for looping I do it, is it possible that many questions will be asked to bring the contacts?
How to Print Highchart section in IE browser? -
I have translated the hypertext within the iframe to my page. Highlight provided button to print chart section When I try to print Highchurch, it prints the whole page instead of printing the High Chart section.
I'm having trouble on IE only, how can I do it?
Please consider the example:
Should be printed correctly in IE8.
c# - Is there anyway to determine how much more ram my prog can allocate till OutOfMemoryException? -
I need to decide if I can fully load the file in the file. Readablebates (fast) or file with process file FileStream, by reading out the amount of bytes close to OutOfMemoryException, but enough to avoid it.
I do this to reduce the HDD load. I think it is better to read 1GB at a time, like chakra likes to read: Read 4 bytes - & gt; Process them - & gt; Read 4 bytes again - & gt; Process them - & gt; ...
Memory allocation depends on how much load they currently have. You can not choose a number and hope that you will always be able to allocate that space. You should choose a safe number that is less chance of failure. Currents typically use 1-8MB buffers.
When reading 1 GB and reading 4 times in 256 MB pieces, HDD load will be more or less. Finally: You are reading 1 GB.
iframe - Different behavior of Bootstrap in different browsers -
Check the following link in different browsers:
Click on the first option (top left) in the left Make the table. (It opens an iframe)
-
In Chrome, a row of thumbnails appears below (this is what is expected of it) and you see the original size
-
But this shows different behavior in Firefox and IE and the pictures are shown in their original sizes.
I solve this problem? Thank you very much for your help.
I can definitely see your problem. I tried with IE 8 and 9 - Both images show full-size images rather than thumbnails in contrast to Chrome.
One solution would be to add a class to your
img tag and size there images when I tried it with IE 8 and 9 so it appears to do the trick.
CSS (either
script tag in the file after bootstrap css on your top):
.myThumbnail {width: 224px; Height: 147px; }
Then modify your HTML that contains the
myThumbnail category in each of your
img tags.
I know this is not the ideal solution, but it works.
javascript - escaping double quotes in text field -
I have a JSP page which is populated with some textures and the submit button that makes an AJAX GET request. Users can type in any text. I am having problems when the user enters the string with double quoted string or backslash. I am currently using encoded RIMPonent and JSON.stringify so that the request URL parameters can be prepared. Is this the proper way? The backend code is getting an improper Jason object. Here is a sample
User type: js code: However, my server receives the message I am currently using encodeuric components and JSON.stringify < / Blockquote> This is your problem. Since you do not want to add values to any URL, you should not call If you include Jasonson in the URL, you will need to call In summary You need to avoid right at the right time. Test "cases" good in txtArea0
var txtData0 = Encoderic Silence ($ ('# txtArea0'). Val ()); Var txtData1 = encodeurIComponent ($ ('# txtArea1'). Val ()); Var msg = JSON.stringify ([{"id": 0, "txtData": txtData0}, ...]);
"[{id": 0, "txtData": msg "msg" receives "" good "}, ... ] " I do not completely know why this is happening.
You can actually survive only when you are actually making strings in that format. encodercontact .
EncoderIconconverter , but no one else.
Escape methods are not a magic sauce that your code works.
php - What are the benefits of caching instances of a class? -
I have an application in which I repeatedly use the same (uppercase) class. Since I use AJAX for that app, I'll always have to create a new object of this class. Someone advised me to cache an example of this class and use it (in a php environment using APC)
What are its benefits? Is it really saving some time?
$ this-> Ticket_parris = unsolicited (@pc_fet ("ticket")); If (! $ This-> ticket_parris) {$ this-> Ticket_preissance = new ticket_group (); // long time apc_store ("ticket", serialize ($ this-> ticket_preview)); }
The benefits are actually realized only if you work with a class If there are things that take a lot of time, memory or other resources in the manufacturer of the class (for example: to read an XML sitemap and build a complex data structure to create your navigation.) You can caching Raise it by dashing it.
It is also worth noting that resources (such as database links and such) can not be cached and uncertainty should be restored without the object (Here is where __ sleep and __ wakeup comes in the magic method).
google chrome - CSS Doubts - Border bottom over border left -
I am developing an interface css, and I have come to the following problem: when I set the size of the border to the left I'm bigger than others, it does not overlap at the bottom edge ... I took a good shot, but I did not see anything like this ... can anyone help me? JSField in this file
In this case, the bottom edge of the edge overlaps the left green color!
#contactList & gt; Lee (font-weight: bold; Color: #fff; Box-Shadow: Inset 0 1 Px RGBA (255, 255, 255, 0.4); Background-image: -webkit-linear-shield (#ededed, # eff0f2); Background image: -Mo-linear-shield (#ededed, # eff0f2); Background-image: -mms-linear-shield (#ededed, # eff0f2); Background-image: linear-shield (#ededed, # eff0f2); Border bottom: 1px solid # 999999; Border-left: 10px solid green; Border-right: 1px solid # 999999; Height: 55px; Curious to get help.
And not on the Li element;)
#contactList {margin: 0; Padding: 0; List-style-type: none; Border-left: 10px solid green; -Widk-border-bottom-left-radius: 5px; -Widk-border-bottom-right-radius: 5px; -mobile-radius-downwards: 5px; -image-radius-sword: 5px; Border-bottom-left-radius: 5px; Border bottom right-radius: 5px; }