Posts

Showing posts from February, 2014

Upper or Lower Case Issue using get_file_contents php -

I am using a PHP GET method to get a filename that is placed in the get_file_contents command. If this is possible, then I want to ignore the letter case so that my URL is cleaner. For example, example.com/file.php?n=File-Name will work, but example.com/file.php?n=file-name does not work using the code given below Will do I think it should be easy, but I'm dry. any idea? $ file = $ _GET ['n']; $ File_content = file_get_contents ($ file); shorten all your file names and use: file_get_contents (strtolower ($ file)); (I hope you know about some people involved in using this.)

loops - How do i remove NULL input in C? -

My teacher told me address me "idiot proof of abuse of any kind", so I have a program that Here is the United Kingdom's foolproofed code # include & lt; Stdio.h & gt; # Include & lt; Conio.h & gt; Int main () {four lessons [16]; Printf ("type something:"); Fgets (text, 16, stdin); Printf ("You typed:% s", text); getch (); } I made some simple adjustments to make sure there is no error, however, if I can not get the filter to work properly, because it's still zero Allows input #include & lt; Stdio.h & gt; # Include & lt; Conio.h & gt; Int main () {four lessons [16]; Int loop; Do {printf ("Type something:"); Fgets (text, 16, stdin); If (text [0] == '\ 0') {printf ("try again"); System ("cls"); Loop = 1; } Else {loop = -1; }} While (loop> 0); Printf ("You typed:% s", text); getch (); } I have tried Google and I can not find a solid answer, it is probab

java - How to override the defaults provided by SPRING BOOT Autoconfiguration -

After I have some knowledge of Spring 2.5 development and Java, but I know more about boot and data including modern spring. I'm trying to I am looking at the project: I have been working on this example on my machine, but I want to override some aspects of the example. For example, I want to specify my own Mongo database server and name to use in the project. It seems that the thing to do is to specify a new bean Mongo data source to make, but I'm not sure how to do this in this case import com.mongodb.Mongo Import com.mongodb.MongoClient; Import example.person.Person; Import example.person.PersonRepository; Import example.treasure.Treasure; Import example.treasure.TreasureRepository; Import org.slf4j.Logger; Import org.slf4j.LoggerFactory; Import organization Source: Import org.springframework.boot.SpringApplication; Import org.springframework.boot.autoconfigure.EnableAutoConfiguration; Import org.springframework.boot.context.properties.ConfigurationProperties; Imp

search - Elasticsearch term suggester return stemmed results -

Why are elasticsearch term advisory results stemmed? When I do this query: curl -XPOST 'localhost: 9200 / post / _suggest' -d '{"my-suggestion": {"text": "manager", "word" The expected result should be "manager", but I get "manag" back: <"field": "body"}}} ' Code: {"" "": "," successful ": 5," failed ": 0}," mine-suggestion -1 ": [{" text ":" mang "," offset ": 0," 0.75 , "Freq": 180}, {"text": "money", "score": 0.75, "freq": [6] "options": [{"text": "manag", "score": 6} ]}}}} edit I found a solution to my problem: I Added a standard analyzer to the query. "Maler", "word": {"analyzer": curl -XPOST 'localhost: 9200 / post / _ notice' -d '{"my -s

xcode6 - IPhone 6 plus simulator scaling -

Image
Even after scaling the iPhone 6 Plus Simulator up to 50% (there is no option to scale this less than this), Size is still bigger, how can I reduce it to 25% or less to work with it? writes the default ~ / library / p / You can have "0.4" different for your choice. Then, in the simulator, hardware-> Tools & gt; IPhone 6 Plus

python - Inputting textfile into list of class objects, then output the list contents -

As part of my existing project, I am trying to load the content of the text object into the list of objects Then the produce of the goods on a cursory look, my instructor said that my code looks ok, but there is no output. I press enter, and ... nothing. This "not loaded" code is also not printing. It only indicates a new input like I did not enter any direction, I do not know that the objects are being loaded properly in the list, and I am thinking that they are not. I am using only the Windows console to run it, so debugging is limited and slower. I'm new to Python, but this is not Python course, this is algorithm. But it is necessary that our projects will be written in Python, so I am learning that I will go. I have learned the code I have learned in C, C ++, or Java, usually from here and my instructor has given me some useful tutorials. I have searched here, but I think I have a lot of code. is. So, I ask you very clever people ... What am I missing here? Di

css - double for loop in stylus preprocessor -

I'm new to the stylus and I want to iterate for two ends using the stylus preprocessor. This is what I have tried, but definitely not working. .mask: nth-child (1) :: after {top: 0; Left: 0; Height: 20; Width: 20; } .Masque: nth-child (2) :: After {Top: 20; Left: 20; Height: 20; Width: 20; } .Masque: nth-child (3) :: After {Top: 40; Left: 40; Height: 20; Width: 20; } .Masque: nth-child (4) :: After {Top: 60; Left: 60; Height: 20; Width: 20; } .Masque: nth-child (5) :: After {Top: 80; Left: 80; Height: 20; Width: 20; } .Masque: nth-child (6) :: After {Top: 20; Left: 0; Height: 20; Width: 20; } and the code continues till 25. The idea is that the grid was displayed (5 x 5 divis), 25 five squares for full in the mask position (0..24) .mask: nth-child ({ I}): For J. (0..4) Top 20 * j 20 * j height 20 * j width 20 * j How can I get it? If the above code is a way to get you, then there is a way to get it: / P> . Mascase status: i for absolute, j (1 .25) & amp;

sql - SELECT .. FROM (SELECT .. FROM ..). How can I improve this query? -

Image
इस सवाल का पहले से ही एक उत्तर है: < / p> 26 उत्तरों मैं एसक्यूएल सीख रहा हूँ और GalaXQL ऐप के अध्यायों के माध्यम से जा रहे हैं। मैंने "क्वार्टर के स्टार (या स्टार)" के उत्तर में निम्नलिखित प्रश्न लिखा है, जिसमें ग्रह को आकाशगंगा में सर्वोच्च कक्षा की दूरी है प्रारंभ से पहले पुरानी भयावहता को साफ करने के लिए याद रखें। " यह क्वेरी परिणाम starid देता है: 23334, जब hilight तालिका में डाला, मुझे प्रगति के लिए अनुमति देता है हालांकि, इस परिणाम को मेरे सामने वापस सौंपने से पहले प्रोग्राम लांग, लंबे समय तक लटका हुआ है, इसलिए मुझे संदेह है कि यह जानकारी डेटाबेस से खींचने के लिए एक बहुत अधिक कुशल तरीका है। यह क्वेरी काम करती है, लेकिन प्रक्रिया करने में अधिक समय लगता है, मैं इस प्रश्न को कैसे बेहतर कर सकता / सकती हूं? हिलेक्ट का चयन करें चयन एसआईटीएस में ग्रहों से तारों से पी, सितारों के रूप में एस, चंद्रमा के रूप में एम एस एस एस स्टारडाइज = (ग्रहों से तारों का चयन करें जहां कक्षा की कक्षाएं) () (कक्षा से चयन करें MAX (ऑर्बिटडिस्टेंस)); इस क्वेरी

cakephp - Different routing behaviour according to debug level -

I have a cake php site that lives in a subdirectory on my site which is called safe, therefore https://example.com/secure When the debug level is 1 or 2 then it works fine, but if I get the debug level to 0 Change ( Configure :: Type ('debug', 0); ) and I get this error by visiting that address: Error: The requested address' / Safe / index.php / secure / 'was not found on this server. I have the following two routes in the route. Php router :: connect ('/', array ('controller' => gtk; 'page', 'action' => 'display', 'home')); Router :: Connect ('/ safe', array ('Controller' => gtk; 'page', 'verb' = & gt; 'display', 'home')); How can I work with 0 to work with debug? I can transfer the whole site to example.com, but I should have this last resort. Routing is not being affected by debug level. Your problem is that you are pointing to th

file upload - form enctype="multipart/form-data" returning contentType null in JSP RAD environment -

I am following an example to fileUpload on the JSP page on this link: It looks very straightforward and I am able to call uploadedFile.jsp to upload the upload, except that the request.getContentType () is returning to the tap. Looks like the content type is not being set correctly, like myspace = "multipart / form-data" or encoding = "multipart / form-data". My JSP: & Lt; H3 & gt; File uploads: & lt; / H3 & gt; Choose a file to upload: & lt; Br / & gt; & Lt; form name = "uploadform" method = "post" encoding = "multipart / form-data" enctype = "multipart / form-data" & gt; & Lt; Input type = "file" name = "file" size = "50" /> gt; & Lt; Br / & gt; & Lt; Input type = "button" class = "button1" value = "upload file" onClick = "submit file upload ();" / & Gt; & Lt; / Form & gt; And here is

How can I create two http security configurations with java based config? -

XML विन्यास में मैं निम्नलिखित बना सकता हूं: & lt; सुरक्षा: http पैटर्न = "/ api / **" create-session = "कभी नहीं" उपयोग-अभिव्यक्ति = "सत्य" & gt; & Lt; सुरक्षा: http-basic प्रविष्टि-बिंदु-रिफ = "xBasicAuthenticationEntryPoint" / & gt; & Lt; सुरक्षा: सत्र प्रबंधन / & gt; & Lt; सुरक्षा: अवरोधन- url पैटर्न = "/ परीक्षण / **" access = "isAuthenticated ()" / & gt; & Lt; सुरक्षा: अवरोधन- url पैटर्न = "/ api / **" access = "isAuthenticated ()" / & gt; & Lt; / सुरक्षा: http & gt; & Lt; सुरक्षा: http auto-config = "true" उपयोग-अभिव्यक्ति = "सच" realm = "ACME" & gt; & Lt; सुरक्षा: अवरोधन- url पैटर्न = "/ favicon.ico" access = "permitAll" / & gt; & Lt; सुरक्षा: अवरोधन- url पैटर्न = "/ स्थिर / **" access = "permitAll" / & gt; & Lt; सुरक्षा: अवरोधन- url पैटर्न = "

php - How Do I Match Square Bracket As A Literal Character Expression? -

मेरे पास निम्न कोड है: & lt;? Php // $ content = सामग्री के बहुत सारे यहाँ preg_match ('/ टोकन: \' (। *?) \ '/', $ सामग्री, $ टोकन); print_r ($ टोकन); // एक जादू की तरह काम करता है। Preg_match_all ("/ पैरामीटर \ ['एयू' + 'थकी'] = (। *?); /", $ सामग्री, $ मैच 2); print_r ($ match2); // रिक्त सरणी लौटाता है सब कुछ जाँचने के बाद, मैं समाधान के लिए आया था कि बचने में कुछ समस्या है। क्या कोई मेरी मदद कर सकता हैं? मुझे लगता है कि इसके कुछ वर्ग ब्रैकेट्स हैं? पुनश्च: regex के मूल पाठ परम ['Au' + 'thKey'] = TEXTHERE; समस्या + के साथ है आपको इसे बचने के लिए एक शाब्दिक + जैसा \ + होना चाहिए या अन्यथा यह पिछले वर्ण को एक या दो बार दोहराएगा। पैराम्स \ ['एयू' \ + 'थाके' \] = (। *?); कोड: preg_match_all ("~ params \ ['Au' \ + 'thKey' \] = (। *?); ~ ", $ सामग्री, $ match2);

php - Scale images using CSS -

I am creating a "Recent Blog Post" module where you can see the user submitted posts with images. My point is that I do not want the height of the images to exceed 400 pixels. How can I scale the image and focus it? & lt; Div class = "feed" & gt; & Lt; Div class = "feed-image" & gt; & Lt ;? Php preg_match ('/ & lt; img. + Src = [\' "] (? P & lt; src & gt;) [\ '"]. * & Gt; / i', $ line ["content" ], $ Image); Echo '& lt; Img src = "'. $ Image [' src ']." "& Gt; '? & Gt; & lt; / div & gt; & lt; / div & gt; You can simply set the maximum-height element to the image 400px CSS .feed-image img {max-height: 400px; width: auto; margin: 0 auto;} The maximum-height element allows flexibility in image size, while margin: 0 automatically focuses images p>

sql server - Compare varchar to int in ASP.NET -

I am trying to find all the entries that have SALARIO more than 10,000 The SQL Server table has SALARIO column varchar and the query I am trying to write is like this E DB In SALRIDODS, where InPeter (E. Salyio) & gt; Select 10000; But I do not get a supported exception. How should I manage this situation? to DB Where in SASLRIADOS convert: OINT 32 (E. cellario) & gt; Select 10000;

ios - Strange SQLite behavior. Different results; same query -

मेरे पास एक क्वेरी है: SELECT id, name, province, ग्राहकों से सक्षम WHERE सक्षम = 1 और ("% से%" जैसे नाम या प्रांत "% से%"); मैक या आईपीएडी पर एक ही डाटाबेस का उपयोग मुझे अलग-अलग परिणाम देता है। मैक पर यह अपेक्षित काम करता है और 11 रिकॉर्ड देता है, लेकिन एक आईपैड पर 55 अभिलेख रिटर्न करता है ¿? (और आश्चर्यजनक रूप से उनमें से कुछ फ़ील्ड सक्षम है = 0) वास्तव में अजीब आईपैड ऐप Xcode6 के साथ उद्देश्य सी में किया जाता है मुझे लगता है कि sqlite3 दोनों डिवाइसों पर बिल्कुल वही नहीं है, और उसी तरह की कोष्ठक प्राथमिकता में व्याख्या नहीं करता है। मुझे संदेह है कि आईओएस गायन की समस्या एसक्यूएल में है, शायद कोष्ठकों को लापता है I / P> उदाहरण के लिए, निम्न एसक्यूएल में परिणाम हो सकते हैं जहां सक्षम 1 के बराबर नहीं है: SELECT id, name, province, सक्षम ग्राहकों से सक्षम कहां सक्षम = 1 और नाम "% से%" जैसे प्रांत या "% से%" जैसे प्रांत; मूल प्रश्न में दिखाए अनुसार कोष्ठक को शामिल करना सुनिश्चित करें।

javascript - Prevent file corruption on exiting node in middle of fs.writeFile -

I am reading / typing a few txt / json files in Node.js which is 25 MB in file size . If a process file in the process is interrupted halfway through the file then I get an empty file. So basically, I'm thinking that anybody knows in an accelerated way to stop the file that after writing the process ends up being corrupted. There is a way to wait until the exit is captured and called fs.writeFile callback? A common approach is to write a different file first (for example, permanent-file Instead of overwriting .txt , type temporary-file.txt ), and then from the fs.writeFile in the callback, to replace the permanent code Use fs.rename (e.g., fs.rename ('temporary-file.txt', 'permanent-file.txt'); ).

sql - Returning a Table from an Oracle function, defined within an anonymous block -

मेरे पास इस तरह एक स्पष्ट ब्लॉक है DECLARE TYPE वर्डलाइस्ट VARCHAR2 का तालिका है (50); फ़ंक्शंस जाओ वर्ल्ड लिस्ट रिटर्न वर्ड लिस्ट आईएसएस शब्द WordList: = वर्डलिस्ट (); BEGIN शब्द। EXTEND; शब्द (1): = 'आर्डवार्क'; रिटर्न शब्द; समाप्त; शुरू से चुनें टैब (getWordList); समाप्त; जब मैं इसे sqlplus से चलाने की कोशिश करता हूं तो मुझे यह मिलता है ... त्रुटि 15 पंक्ति पर: ओआरए -0650: लाइन 15, कॉलम 23 : PLS-00231: एसक्यूएल ओआरए -0650: फ़ंक्शन 'गेटवॉर्स्टिस्ट' का उपयोग नहीं किया जा सकता है: पंक्ति 15, कॉलम 23: पीएल / एसक्यूएल: ओआरए -02 9 4: "गेटोल्डलिस्ट": अमान्य पहचानकर्ता ओआरए -0650: लाइन 15, कॉलम 3: पीएल / एसक्यूएल: एसक्यूएल वक्तव्य की उपेक्षा ऐसा लगता है कि यदि मैं अनाम ब्लॉक के बाहर फ़ंक्शन को परिभाषित करता था तो यह ठीक काम करेगा, लेकिन मैं इसे से बचने की कोशिश कर रहा हूं क्योंकि मैं चलाना चाहता हूं लाइव डेटाबेस के विरुद्ध कुछ फ़ंक्शन, और मैं स्क्रिप्ट चलाने के रूप में लाइव पर फ़ंक्शंस बनाने और छोड़ने को नहीं पसंद करता। अगर मैं केवल अनाम कार्यों में

Running selenium test multiple times in testng -

I have a suite that has a test with many classes. I need to run this suit several times (not in parallel). In other words, "firefoxestes" tests run 300 times or 1000 times, etc. I know how it uses junit to work, but I do not use testng which has been converted into my script now. Here is my XML file: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt ;! DOCTYPE Suite System "http://testng.org/testng-1.0.dtd"> & Lt; Suite name = "Suitendoind" parallel = "wrong" verbose = "10" thread-count = "2" & gt; & Lt; Listeners & gt; & Lt; Audience category-name = "com.bpms.tests.MySuiteListener" /> & Lt; / Listeners & gt; & Lt; test name = "FirefoxTests" & gt; & Lt; Parameter name = "browser" value = "firefox" /> & Lt; Classes & gt; & Lt; Class name = "com.bpms.tests.InitiateBuyPlan"

mysql - How this query should be? -

I have a problem with this question: SELECT * by post where the title ' % 'Samsung%' or title '% 42%' and 'gtc:' = '100' and the price & lt; = '1000000' and shipping = '1' and sales_type = '1' LIMIT 0,50 The problem is that when I get 2 or more titles '%%' , then only send me the title of '% samsung%' and 'price' gt; only the title '% LIKE' %% '' SELECT *. = '100' and the price & lt; = '1000000' and shipping = '1' and sales_type = '1' LIMIT 0,50 Ignoring other options I hope someone hands me You can try this way: WHERE Title REGEXP 'Samsung | 42 '[/ code> More info here:

perl - exit a switch case from within a subroutine -

I wonder how to leave the switch matter from a substrate like this: #! Use the / usr / bin / perl switch; Switch ($ command) {case 'create_vmr' {... do something ... callbank ($ bubla); ... do something else ...} case 'delete_vmr' {... do something ... callbank ($ bubla); ... do something else ...}} ... last code ... exit (0); Sub-callbo ... ... Check something ... last $ $ condition; } I thought, 'the last' in the callb () comes out of the case which was told to it, so that the code can proceed after the switch element. But it does not work So, how can I leave the element switch from a sub? Edit: And I do not want to use 'Geto';) I will not try to break through the obscurity of my program. Instead, if it succeeds, and the sub-routines return a true value by breaking the calling code block. In this example, I should show a Dispatchable Table Switch module: Use strict; Use warnings; My% send = (create_vmr = & gt; sub {# ... s

unix - print the line after matching specific string using grep command -

I want to print the entire line after matching a string For example, This is an input: - www.google.com/images www.google.com/images/12 www.yahoo.com/images/12 www.bing.com/images/34 Www.google.com / Images / 12 www.google.com/images/imagescols and I want this output: - com / images com / Images / 12 com / You can. cut -d -f3 file OR awk -F '{print $ NF}' file < / Code> OR grep -oE '[^.] * $' File Example: < / Strong> $ cut-d -f3 file com / image com / image / 12 com / image / 12 com / image / 34 com / image / 12 com / image / images / Code>

css - How to change the color of header? -

बिल्कुल, मैं यह कैसे कर सकता हूँ? कोशिश की गई: & lt; f: facet id = "form" name = "header" class = "customHeader" & gt; & lt; h: आउटपुटटेक्स्ट मान = "हैलो!" / & gt; & Lt; / च: पहलू & gt; और मेरी सीएसएस: । CustomHeader th {background-color: activeborder; पृष्ठभूमि-छवि: कोई नहीं; } मुझे JSF पृष्ठ में सीएसएस फ़ाइल शामिल करने के लिए याद किया गया है: & lt; link type = "text / css" ref = "stylesheet" href = " ./newcss.css"/> लेकिन कोई परिणाम नहीं, मैं हेडर रंग बदल सकता हूं, मुझे कोई बदलाव नहीं दिखाई देता। कोई भी मदद? उत्पन्न HTML कोड है: & lt; html xmlns = "http://www.w3.org/1999 / एक्सएचटीएमएल "& gt; & lt; head id = "j_idt2" & gt; & lt; शीर्षक & gt; चेहरा शीर्षक & lt; / title & gt; & lt; लिंक प्रकार = "टेक्स्ट / सीएसएस" रिफ = "स्टाइलशीट" href = "। / newcss.css" / & gt; & L

node.js - Using Polymer's vulcanize tool without an index.html file -

Background: I am using polymer web components in my app, but I would like to reduce the number of HTML imports because It is affecting performance now I am using Z templates in Sails.js. Sails.js does not generate index.html to build on my app but instead generates HTML from my Jade Template and works on request. According to the documentation, all HTML imports will be added to a build HTML file in a source HTML file. Q: Is it possible to vulcan the HTML generated before serving the client? Sails.js Express uses so I think it will involve adding some express middleware (like?). You can try this library which will allow you to express a group of web components to express a file Wants to add in

c# - Access implemented class method -

I want to ask a question about a legacy. I have two classes which were implemented from Absodod Public category A: Absodod {some method (public void) {}} Public class B: Absodod {Public Zero Certain method () { }} And apply a square public class abodod {public zero dot () {}; Public Zero DoDiff () {}; } When I need to reach class A or B methods then I am getting the error, how can I use AbsDoc temp = null; If (i.e. =) "a) {temp = new A ();} and {temp = new B ();} temp.SomeMethodA (); // when i < P> temp as you defined it is a AbsDoc . SomeMethodA is not , so you will get a compiler error, it is expected. For example, look at your code again: AbsDoc temp = null; if (absolute == "A") {temp = new A ();} else {temp = new B ();} temp.SomeMethodA (); // when I if ultimate! = "A" ? Will be your temp , then instead of B one a and this You can not call SomeMethodA if you want to call SomeMethodA , then you will need to enter tem

windows - List sub-folders and their files using Command-line in different Drives -

मेरे विंडोज कंप्यूटर पर मेरे पास कुछ ड्राइवर्स हैं: ई: \ folder1 F: \ folder2 \ folder3 G: \ folder4 H: \ folder5 H: \ folder6 \ folder7 \ folder8 ... जैसा कि आप ऊपर देखते हैं, फ़ोल्डर्स के समान माता-पिता नहीं हैं (मैं एक पाठ फ़ाइल में फ़ोल्डर nmaes ऊपर रख रहा हूँ।) मैं उप फ़ोल्डर्स और उपरोक्त फ़ोल्डर की फाइलों को सूचीबद्ध करना चाहता हूँ। इसे इसे करना चाहिए: @echo off / f के लिए "usebackq delims =" %% a in ("textfile.txt") करो (dir / b / s "%% a" & gt; & gt; "% userprofile% \ desktop \ results.txt") रोकें < / प्री>

Sorting Javascript array with strings and numbers -

I have a list of elements in JavaScript, as follows: myArray = ["Datastore a free space 34.23GB", "Datastore two free space 56.23 GB", ...] and so on. I would like to sort the array on freepace, so in the example above the datastore, the first element in the two array will be. The array is always created with "free space xx.xxGB", but in some cases the spaces can be 5 digits, so for example xxx.xxGB. Can anyone provide a sort of sorting array please? I think I use something like "* - free space \ [1-9] [0-9] * GB" It should be myArray.sort ("* - spaces \ s [1-9] [0-9] * GB")? Is this correct or how do I do it? Many thanks in advance. Drag and drop numeric parts in a custom sort function: myArray = [" Datastore a free space 34.23GB "," Datastore two free space 56.23GB "," Datastore three free space 6.23GB "]; var re = / ([0-9 .. ++) GB /; // get regex GR values ​​to get my

vala - How to include resources file in anjuta project -

I am trying to update a graphic project in the valve, take a lot of code lines into a UI file I am here. I want to use the template (available with glib-2.38 and GTK + 3.8, something like that). My project is managed with Anjuta and AutoConf. in src dir application.ui: resources.xml: & lt ;? Xml version = "1.0" charset = "UTF-8"? & Gt; & Lt; Gresources & gt; & Lt; Gresource prefix = "/ org / app / spi" & gt; & Lt; File compressed = "true" preprocess = "xml-stripblanks" & gt; Application.ui & lt; / file & gt; & Lt; / Gresource & gt; & Lt; / Gresources & gt; In the src / Makefile.am, I - gresources resources.xml spi_VALAFLAGS And filanlly I declared Gtk.ApplicationWindow like this [GtkTemplate (ui = "/org/app/spi/application.ui")] internal square SpiWindow: Gtk.ApplicationWindow { // Constructor Public Window (Gtk.Application Application) {O

c++ - Converting C++11 into equivalent C++98 code -

I want to use C1111, but unfortunately, to ensure binary compatibility with some proprietary libraries , Make sure that the code can be made with compilers, which only supports C ++ 98, do some C ++ 11 constructions (at least for those who do not require standard library support), their C + Is there a way to convert + 98 into equivalents? For example: std :: vector & lt; Integer & gt; V = ...; (Auto & amp; i: v) std :: cout & lt; & Lt; I & lt; & Lt; ''; changed std :: vector & lt; Int & gt; V = ...; (Std :: vector & lt; int & gt; :: iterator = v.begin (), end = v.end (); it! = End; ++ it) {int & i = * it; Std :: cout & lt; & Lt; I & lt; & Lt; ''; } Or something like that. It would be possible that this conversion automatically and properly (for example, your parser in Pearl To create a source-to-source compiler using the part of the clang project (especially to write high-level tools)

python - How to get unparsed XML from a suds response, and best django model field to use for storage -

I am using suds to request data from a third party using a wsdl. I am saving only some data for now, but I am paying for the data that I get, so I want to keep it all. I have decided that the best way to save this data is to capture the raw XML response in a database area, for both future use, I should decide that I want to start using different parts of the data And in the case of anomaly, I want to start as a paper mark. . So I have two questions: Is there an easy way to output raw XML received from suds.client object? In my quest for its answer, I have learned that it can be done through logging, but I was hoping that the information back to the database should not be put in the database area. I have also seen in the MessagePlugin.recieved () hook, but it can not really detect how this information can be reached after parsing, only that I can override that function and it Can get access to raw XML because it is being parsed (which is before I have decided whether it is actua

architecture - SAAS uniquely identifiable Url -

Companies such as BeadsKeyte have provided their Participating Agencies a unique subdomain to access their account with Bidcsach. From a site structure perspective, how are they doing this? They are not physically a separate site for each account? Any information will be great! You are right that they can not have a physical site for each account p> Typically, you want to identify 'tenant' from some part of the URL - a part of the subdomain / hostname or URL segment after the host name. The request is done through the same site (in a cluster) - either by the DNS or before the web cluster, which pulls the tenant ID from the URL segment, writes it in the cookie / request header and routes it only Site In the request of the web server, at the beginning of the pipeline, the argument in the request pipeline can select the information of the tenant, possibly in an application / framework context. Which is available during the lifetime of the request and process accord

setup cron that when a flash drive is mounted a file(sql) is written into it -

I am using cron to create my database backup file. I am thinking that I can do this in a manner that is setup when a flash drive (if it thinks that the drive should have a specific name in it) is mounted, then the SQL file Will be written in it automatically The rugged cron can not be set up to do this. This means that the croneme is strictly for time-based events. There are other ways to do this. You can use udev for example. For details of how to see it:.

ruby - SSL Connect Error -

My company recently provided me with OS X 10.9.5 running the modern MacBook Pro. We have a Ruby application that makes SOAP requests for external service to authenticate users since upgrading to a new machine, when I try to make a SOAP request, SSL connect error Meets. I am using the Ruby Savan client to make SOAP calls, although we have been configured to use the pre-1.0 version Savon client to use the correct certificate, proof_key_file, certificate_key_password, and ca_cert_file . I have an old MacBook Pro running OS X 10.8.4 I have set 10.8 machine similar to 10.9 machine. When 10.8 machines make exact SOAP calls, there are no SSL errors. I'm at a complete loss due to error. I'm assuming that this should be some system library, but this is my guess. This is a problem on some platforms / configurations that you can solve with the following steps: < / p> Download this file and keep it accessible anywhere: Set an environment variable called SSL_CERT_F

C - returning string -

इस सवाल का पहले से ही एक उत्तर है: < / P> 3 जवाब क्या आप लोग मुझे समझ सकते हैं क्यों मेरा फ़ंक्शन मुझे स्ट्रिंग वापस करने की अनुमति नहीं देता है मैंने इस साइट पर कुछ कोड की समीक्षा की है, और मैं इसे काम करने के लिए प्रतीत नहीं कर सकता अन्य प्रश्नों के उत्तर ने सुझाव दिया है कि लोग फ़ंक्शन को परिभाषित करते हैं: const char * stringToRetrun () {/ * कुछ कार्य * / वापसी स्ट्रिंग; } लेकिन जब मैं कोशिश करता हूं और उसी प्रारूप का पालन करता हूं, तो मेरे कंपाइलर ने अमान्य प्रकार त्रुटियों / चेतावनी के एक पूरे समूह को बाहर कर दिया। मैंने अपना प्रश्न नीचे पोस्ट किया है: char * printMenu () {char message [100] = "नीचे से एक विकल्प चुनें: \ n"; Strcat (संदेश, "(1) सर्वर पर सभी फाइलों की सूची दें \ n"); Strcat (संदेश, "(2) सर्वर से फ़ाइल पुनर्प्राप्त करें \ n"); strcat (संदेश, "(3) सर्वर से सभी फ़ाइलों को पुनर्प्राप्त करें \ n"); घुमटा (संदेश, "(4) कनेक्शन बंद करें \ n"); घुमंतू (संदेश, "अपना चयन दर्ज करें: \ n"

c# - Jquery add item in @Model that I got from HTML inputfield -

मेरे पास निम्न Jquery फ़ंक्शन हैं: $ (document) .ready (function ( ) {$ ("। UrlButton") क्लिक करें (फ़ंक्शन () {चेतावनी ('बटन क्लिक'); var आइटम = $ ("। UrlField")। Val (); @ मॉडल.उर्ल्स.एड (आइटम);} );}); निम्न बटन & lt; इनपुट प्रकार = "टेक्स्ट" वर्ग = "यूआरएलफिल्ड" / & gt; & Lt; बटन प्रकार = "बटन" वर्ग = "यूआरएलबटन" & gt; + & lt; / बटन & gt; मैं एक मॉडल @ मॉडल को जोड़ने का प्रयास कर रहा हूं। युल, जो सिर्फ एक स्ट्रिंग है लेकिन उपर्युक्त उदाहरण के साथ मैं आइटम जोड़ नहीं सकते क्योंकि 'यह वर्तमान संदर्भ में श्रेष्ठ नहीं है।' मैं अपने मॉडल के लिए जेक्जरी का इस्तेमाल करके और आइटम एक HTML-inputfield से? धन्यवाद! आप ऐसा नहीं कर सकते मॉडल जावास्क्रिप्ट पर्यावरण की तुलना में एक अलग समय पर मौजूद है क्योंकि वे http पाइपलाइन के विभिन्न भागों में हैं एमवीसी के लिए HTTP पाइपलाइन मूल रूप से निम्नानुसार है वैश्विक एएसएक्स को एक अनुरोध प्राप्त होता है वैश्विक एएसएक्स मा

amazon web services - Custom Domain for S3 Files -

It should be easy because there is no shortage of pages on custom domain and S3 but for some reason I do not think so According to the work, get it. I have the full S3 bucket of the video. For example, the S3 bucket is called "video.fu.com". I bought the domain "videos.foo.com" and it was "video.fu.com" in cloudflare with "video.fu.com site- web site- east-1.mazonose." . I can see the file in my bucket by going to the full URL like "youtube.fu.com.sa3 -webs- east-east -1.majonaws / maivideo.mpg" / P> My problem is that I can not see them by going to "videos.foo.com/myvideo.mpg" I tried to redirect "all requests to another hostname" and entering "Videos.foo.com", but that was not working, to note I I will not host just one file on "videos.foo.com". Service of files All files have all the permissions: Open / Download If anything tells me the error in my way tell me in the mean time

matlab - vectorized block assign with overlopping values -

इसलिए मैं आज इस बग में गया A_TEST (dest,:) = A_TEST ( स्रोत,:) + A_TEST (गंतव्य, :); A_TEST (:, गंतव्य) = A_TEST (:, स्रोत) + A_TEST (:, गंतव्य); अगर असल अनन्य है, यह विफल हो जाता है (जो समझ में आता है)। इसलिए मेरा त्वरित तय है कि dest (कश्मीर = 1: numel (dest)) के लिए dest पर लूप करने के लिए है (ए), () (ए) () () ,:) = (स्रोत (कश्मीर) :) + A (गंतव्य (के), :); ए (:, गंतव्य (के)) = एक (:, स्रोत (के)) + A (:, गंतव्य (के)); अंत और लूप के लिए ऐसी मैटलब खराब है कैसे एक इस कॉल vectorize होगा निम्नलिखित के साथ, मैं यह दिखाता हूँ कि पंक्तियों के साथ इसे कैसे करें। इसे कॉलम के साथ करने के लिए, यह एक समान दृष्टिकोण है लेकिन अलग कोड है, मैं क्यों समझाता हूं। संक्षेप में, आपके पास एक मैट्रिक्स ए है, जिसमें n पंक्तियां और पी स्तंभ हैं I आपके पास [1, n] , src , और dst के लिए आईडी में श्रेणी के पूर्णांक की एक सूची है। मैं मान रहा हूँ कि दोनों एक ही आकार के होते हैं, और इसमें n तत्वों से अधिक होते हैं (ताकि दोनों संभावित रूप से दोहराव हो)। src s < कोड> डीएसटी एस, य

makefile - an error produce while i MAKE in the installation of freeradius server -

यह मुझे एक त्रुटि है, जब मैं कमांड बनाने < / Em> जबकि freeradius सर्वर की स्थापना, अगर किसी को इस तरह की त्रुटि के बारे में पता होगा कृपया मुझे इस त्रुटि से बाहर निकलने के लिए कुछ हाथ दें !!!। amsys @ amsys-thinkpad-r61: ~ / डाउनलोड / त्रिज्या डीपी सी / freeradius-server-2.2.5 $ make बनाने [1]: निर्देशिका `/ home / amsys / downloads / radius dp c / freeradius-server-2.2.5 'में प्रवेश करना सभी को libltdl में बनाना ... बनाओ [2]: डायरेक्टरी` / home / amsys / downloads / radius दर्ज करना डीपी सी / freeradius-server-2.2.5 / libltdl '/ usr / bin / make all-am करा [3]: डायरेक्टरी `/ home / amsys / Downloads / radius dp c / freeradius-server- 2.2.5 / libltdl दर्ज करना 'बनाने [3]: डायरेक्टरी `/ होम / एमीएस / डाउनलोड / त्रिज्या डीपी सी / फ्रीडियस-सर्वर-2.2.5 / बीबीएलडीएल' बनाने पर [2]: निर्देशिका /` घर / एमएमएस / डाउनलोड / त्रिज्या डीपी सी / फ्रीडियस को छोड़कर -server-2.2.5 / libltdl 'सभी स्रोत बनाने ... बनाने [2]: डायरेक्टरी `/ home / amsys / downloads / ra

linux - should my program lock /etc/.pwd.lock when reading /etc/passwd? -

I am writing some programs that read / etc / {passwd, group}. I have learned that before writing the above files, you should lock /etc/.pwd.lock by calling lckpwdf () so that they write that the collision can be avoided. I think the reading operation also needs this lock so that the program can not read incompatible data. But I found that I can not lock while reading / etc / passwd non-root, because /etc/.pwd.lock is owned by root: root and mode is 0600. Am I wrong? Do not read the requirement of this lock? On Linux, lckpwdf () & lt; Shadow.h & gt; Has been declared in and should be used when accessing shadow password database ( / etc / shadow ). No need to call it after reading / etc / passwd or / etc / group . Since this is a non-standard task, it is not necessary in the case of other Unix.

php - sql update using joins -

मेरे पास निम्न तालियां हैं: चेक - भुगतान_आईडी - send_time भुगतान - आईडी - समय प्रत्येक चेक में भुगतान आईडी है (payments.id)। मैं प्रत्येक चेक के लिए भुगतान ऑब्जेक्ट को चेक के भेजने के समय के साथ अद्यतन करना चाहता हूं उदाहरण के लिए, अगर चेक 1 में ए और एक भुगतान आईडी 3 है, तो मैं भुगतान वस्तु आईडी 3 को समय के साथ अपडेट करना चाहता हूं = एक मैं एक एसक्यूएल क्वेरी का उपयोग कर कैसे करूं? जुड़ने के साथ क्वेरी अपडेट करें? धन्यवाद मान लें कि मैं सही ढंग से अपने प्रश्न को समझ रहा हूं, यह काम करना चाहिए:

xerces c - xercesc NodeType not declared -

I use XML files to use C ++ on Netbeans 8.0.1 using Axis-C-3.1.1 I am developing an application for. I have a dynamic definition, type DOMNode * as domode * attribute = attributes-> object (aidx); When I expand the attribute in the debugger, it displays a function, getNodeType (), which returns a type of variable. However, when I add the code node type value = attribute-> getNodeType (); I get an error message error: a ???? Nodeetype ???? This scope has not been declared in You xercesc :: DOMNode:: Instead of typing node type , node type .

jquery - Regular Expression To Replace Double Slashes with Javascript -

I would like to remove any forward slash in the URL more than once in the sequence: < Code> var temp = "/path//to/middle//nowhre/avator2.jpg"; Temp.replace (/ \ / \ //, '/'); It works for slashes only twice and does only once, but I think it removes any slash in a number of times, and any URL Also does this for the type. I also tried temp.replace (/ * [/ +] * /, '/'); But it does not work. Thanks very much for any help All the scenes of two or more / have a single / : temp.replace (/ \ / {2,} / g, '/' );

c# - Linq Non-static Methord Requires A Target -

Not sure why, but this line is causing me problems: public zero AddToCart (Product Products) {var cartItem = storeDB.Carts.SingleOrDefault ((c.productID) == product.ProductID); } I'm telling this to a controller. Public Functional AddToCart (int productID) {var added product = store DB.products.fund (Product ID); Var cart = ShoppingCart.GetCart (this.HttpContent); Cart.AddToCart (addedProduct); Return Redirect Action ("Index"); } I am feeling that your first query, storeDB.Products < / Code>, returning a zero value (because the entity you are trying to find did not get it). After this, added product is zero, and you try to refer to it in other LINQ statements, which throws a null reference exception. Obviously, a null reference exception is being used with your storeDB reference in the inside expression, "A goal is required for the method" exception Appears in appearance. null before using it in the AddToCart method and using

android - How to get more zoom from mupdf -

I have implemented mupdf for my Android application. This is working fine, but I need to zoom more. I tried to override the double-tape method, but it did not work. How to implement more zoom feature? I'am not sure, but I think the field "mScale = 1.0f" ReaderView. In java there is a key for quick testing, increase it slightly and see what happens, e.g. To 1.2f

c++ - How to create a working makefile for a .cpp file -

Image
I am trying to figure out how to work Messief for my CPP file Here is the code for Main.cpp: #include & lt; Iostream & gt; using namespace std; Int main () {cout & lt; & Lt; "Hello world!" & Lt; & Lt; Endl; Return 0; } Here is my code for creating the file: all: main.exe main.exe: main.og ++ -o main.exe Main .o main.o: main.cpp g ++ -c main.cpp When I enter the "make" command I get this: But when I run main.exe, I get this Is: And if I'm the main.exe as an administrator I get it when I run: Your makefile looks ok though, That you are compiling the linux machine on the linux machine. If this is true, then your problem is. Running Linux on G ++ will target Linux. Just adding .exe to your file name it will not be compatible with Windows. There are tutorials for compiling Linux on Windows, or you can install the proper compiler on your Windows machine, or just run the compiled program inside the Linux environ

javascript - parseInt changes the integer -

I am trying to draw a number (721576481415319 78 ), which is 21 characters Begins with the title of such a page: parseInt (document.title.substring (21), 10); This string gives the integer as 721576481415319 80 . I can not seem to know why this is changing the last two numbers. Any help would be appreciated. According to the maximum value of an integer is 9007199254740992. I tried your calculation and I can confirm your problem. It looks like parsing beyond this maximum value and it is rounding the previous 2 figures.

algorithm - Giving a simple function so that sum S(n) is O(f(n))? -

Stuck on for some time Consider the amount S (n) = one? ?? Logs (i). Give a simple task f (n) so that zeros are s (n) o (f (n)). Explain (Sigma starts with = 1 and ends at n) How can I do this? Please explain step by step. Just because log is monotonic: sum [i = 1..n] log (i) then it o (n * log (n)) and to confirm that We can not improve this compulsion: amount [i = 1..n] log (i) & gt; = Yoga [i = n / 2..n] log (i) & gt; = Sum [i = n / 2..n] log (n / 2) = (n / 2) * log (n / 2) then it is omega * Log (n))

ios - getting BAD_ACCESS Error Calling C++ from Objective-C++. All files are .mm but still this issue -

I know that a lot has been said and I have made it here by seeing it here and there. I have all the Objective-C files .mm. is as. In addition, I can see in the output console that "this = (a *) NULL" is used to call the object b (int x) function is zero. This is my position, I'm starting a c ++ class from the objective c ++ (.mm) class. But I'm getting BAD_ACCESS "a.cpp" #include "a.h" zero: :: b (int x) {cout < & Lt; "Hi"; C.push_back (x); // EXC_BAD_ACCESS error is here & lt; & Lt; c.size (); } Other files are as follows. "a.h" #ifndef __Cigiments__File__ #define __Cperiments__File__ #include & lt; Iostream & gt; #include & lt; Vector & gt; using namespace std; Class A {Public: Vector & lt; Int & gt; C; Zero (int x) b; }; #endif / * Defined (__Cperiments__File__) * / AppDelegate.h #import & lt; UIKit / UIKit.h & gt; #import "ViewController.h"

javascript - Nested ng-Repeat not working angularJS -

मेरा कोड ऐसा है & lt; table ng-app = 'myApp' & gt ; & LT; thead & gt; & Lt; / thead & gt; & Lt; tbody ng-controller = "MainCtrl" & gt; & Lt; tr ng-repeat = "पीएलडी एलेमेंट इन पैलेट एलेमेंट" & gt; & LT; टीडी & gt; {{prdElement.name}} & lt; / टीडी & gt; & Lt; tr ng-repeat = "डेटा में prdElement.data" & gt; & LT; टीडी & gt; {{Data.itemId}} & lt; / td & gt; & LT; टीडी & gt; {{Data.shipmentId}} & lt; / td & gt; & LT; टीडी & gt; {{Data.itemCode}} & lt; td & gt; {{Data.description}} & lt; / td & gt; & LT; टीडी & gt; {{Data.handlingUnit}} & lt; / td & gt; & LT; टीडी & gt; {{Data.weight}} & lt; / td & gt; & LT; टीडी & gt; {{Data.class}} & lt; / td & gt; & LT; टीडी & gt; {{Data.lenght}} & lt; / td & gt; & LT; टीडी & gt; {{Data.width}} & lt; / td & gt; &am

python - Comparing membership of a list with True operator -

मान लें कि हमारे पास a = [1, 2] < कोड> सच सच है लेकिन नीचे दिए गए कोड मुझे या किसी भी अजगर-विशेषज्ञ मित्रों को समझ में नहीं आता है ई में एक == सही प्रिंट झूठी झूठी क्या कोई यह समझा सकता है? यदि हम भ्रामक अभिव्यक्ति नीचे उबाल लें, तो यह है: 1 में = = सत्य यह झूठा देता है (हम उम्मीद करते हैं कि true ) तो इसका इस्तेमाल करने के लिए हम ast मॉड्यूल का उपयोग करते हैं: > gt; & gt; आयात ऐस्ट एंड जी; & gt; & gt; प्रिंट ast.dump ( 'एक == में 1 यह सच है' ast.parse ()) मॉड्यूल (शरीर = [Expr (मूल्य = तुलना करें (बाएं = अंक (n = 1), ऑप्स = [में (), समीकरण ()] तुलना करें = [नाम (आईडी = 'ए', सीटीएक्स = लोड), नाम (आईडी = 'ट्रू', सीटीएक्स = लोड ())])))) तुलना करें जोड़े कोष्ठक के साथ एक संस्करण के साथ जो आप जिस तरह से संभवतः काम करता है काम करता है: & gt; & gt; & gt; प्रिंट ast.dump (ast.parse ('(1 में) == सच')) मॉड्यूल (शरीर = [एक्सप्र। (मूल्य = तुलना करें (बाएं = तुलना करें (बाएं = सं

Javascript - display incrementing number every second -

I'm trying to do something where I display different numbers in every second, but I set Interwolle can not be found right. What I have here function counters () {var i = 0; While (i & lt; 100) {// this block will be executed 100 times SetInterval (console.log ('currently' + i), 1000); I ++; // increment i}} // and but what I get is console.log firing 100 times, then repeats. Thanks for all help Mike when Once you create a set interval, it will call the function automatically (the first argument) each 1000 milliseconds (second argument). So you do not have to do this inside, just increase the i inside the function. (The first argument). function counter () {var i = 0; // This block will be executed 100 times. SetInterval (function () {if (i == 100) clear interval (this); other console.log ('currently' + (i ++));}, 1000); } // End Update 1 function counter () {var i = 0; Var funcNameHere = function () {if (i == 100) clear interv

javascript - Angular Image Conditions -

Actually what I am currently doing is calling a jsonp array, which has an image URL for the icon Works well and displays what I want to do except for the icons. I have replaced the icons with my own but the problem is that they are dynamic as a weather API, so when the icon changes, the icon link Will change on different icons. What can I get from JSN to the weather conditions like partly cloudy and use it to call a specific IMG? How would I go about this in angle angle? var app = angular Module ('app'); App.controller ('MainCtrl', function ($ radius, $ http) {$ http.jsonp ('http://api.wunderground.com/api/5ad0204df4bdbeff/conditions/q/Australia/Melbourne.json?callback=JSON_CALLBACK ') .vivet (data) {$ scope.currentMelbourne = data;}); $ http.jsonp (' http://api.wunderground.com/api/5ad0204df4bdbeff/conditions/q/Australia/Sydney.json? Callback = JSON_CALLBACK '). Success (Tasks (data) {$ scope.currentSydney = data;}); $ http.jsonp (' http://ap

twitter bootstrap - "glyphicon glyphicon-search" button is not attached to text field -

I have a navbar-right search field with a button though, below the button search field is. How is it possible to attach a button to the search field? & lt; Div class = "navbar navbar-default navbar-fixed-top" role = "navigation" & gt; & Lt; Div class = "container" & gt; & Lt; Div class = "navbar-header" & gt; & Lt; Button type = "button" class = "navbar-toggle" data-toggle = "collapse" data-target = ". Navbar-collapse" & gt; & Lt; span class = "sr-only" & gt; Toggle Navigation & lt; / Span & gt; & Lt; Span class = "icon-bar" & gt; & Lt; / Span & gt; & Lt; Span class = "icon-bar" & gt; & Lt; / Span & gt; & Lt; Span class = "icon-bar" & gt; & Lt; / Span & gt; & Lt; / Button & gt; & Lt; A class = "navbar-brand" href = "{{url_for ('home&#

RestApi testing using Rest-Assured -

I'm new to the REST-Api test. I'm starting with a relaxing-API test for comfort-assurance. There is a problem in my first test case. The code is as follows: public zero testGetSingleUser () {hopefully ()) statusCode (200). Equal ("Tim"), "last name", equal ("testarm"), "id", equal ("1") ("email", par ("test@hascode.com"), "first name" ("/ Service / single user");} In this code "Expect" ("Tim.") Command is not working I need to immediately fix this problem and move forward. Your request can not compile Because you forgot () and you have to use equals () instead of equals (). Try this request: given. (Hope). StatusCode (200) body ("email", equivalent ("test@hascode.com")) Body ("first name", equal ("tim"). Body ("last name", equal ("testarm"). Body ("id", equal ("1")) whe

sql - count by on window function -

I created it that executes this query: select " E-mail". * ("Sender_contact_id" command over "sender_contact_id" by "email" .id, sender_contact_id, sender_user_id, rank () by DESC "sent_at"), like "contact_rnk", more than rank (by "sender_user_id" order Partition "sent_at" by DESC) from "email" to "user_rnk" ("folder" = 'inbox')) "e" inner join "email" ("email". "Id" = "e". " Id ") Where (DESC sent by contact_rnk = 1 or user_rnk = 1 and folder = 'inbox') order; The point of the query is to return only 1 row for each contact or user, who has sent an email. What's missing from the query that is the number of emails sent for each partition user or contact. I can do it with many questions and can be involved in the end, eg. In the form of main (as select blbah, etc.) , as cnt_users (sele