Posts

Showing posts from May, 2011

SQL check XML node exists via a variable, add & delete -

I'm exploring a way to check whether NODE exists in an XML data type using any MODQL 2012 I want to see the varchar in a stored procedure as node, I have tried something like the bottom, but it does not appear to work, what I want to do is "null" Var2 (SP) As passed in varchar), and if it exists, So if it does not exist, then insert it into the root of all the nodes found in all the examples are hardcodes, which works. Code as a variable with node: declared @node varchar (255) declared @ x xml set @ annode = 'var2' set @ x = ' & Lt; Root & gt; & Lt; Var1 & gt; 0 & lt; / Var1 & gt; & Lt; Var2 & gt; 123 & lt; / Var2 & gt; & Lt; var3 & gt; 1000 & lt; / Var3 & gt; & Lt; var4 & gt; 989 & lt; / var4 & gt; & Lt; / Root & gt; 'Code with hardcod node: @ x.exist (' //. [Node (=) (select "variable: variable (" node ")] '' - always gives false returns

datetime - Windows 1 second precise time sync -

I have the database and application server of my web application running on various Windows systems. I want these two server clocks Should be in sync on 1 second Threshold At first I thought about using windows w32time but later I found out that it does not guarantee accuracy. What is the best way to achieve this? I've found that domain time II () on synchronizing windows clocks can be very effective. This may be overflowing for its need - as the other said that any basic NTP synchronization should be able to achieve 1S consolidation - and Domain Time II aims to improve it better than that. Though normal Windows device is a bit difficult to setup and monitor - while DTII takes care of everything for you and keeps good equipment for monitoring / warning.

vb.net - Cant run app from win7 64bit to xp sp2 32bit (VS2010) -

I create a window application from VS2010 under Win7 64bit and its work fine ... then I build the app and I An app for another machine that works under Win XP SP2 32bit. When I try to fix my work app and when I try to connect to mysql database, I get an error like this: < Error [IM002] [Microsoft] [ODBC Driver Manager] The name of the data source is not found and the default driver is not specified. This is my connection string: Slow MysqlCon New MySqlConnection Dim OdbcCon as New OdbcConnection Dim ConnString as String = ("Dsn = SqlConn ; Server = 192.168.10.1; UID = USERID; pwd = PASSWORD; database = database; port = 3306 ") OdbcCon Some people say that I have to change my connection string, but no one can tell me the correct connection string. . How can I solve this problem? On Windows XP Open Control Panel - Administrative Tools - Click "Add" under Data Source (ODBC) "User DSN" In my case I select "MySQL ODBC 5.2 Uni

php - HTML tidy - remove spaces between tags? how to reverse "tidying"? -

Then I use the trimmed to properly format html: $ html = 'one row with html many tags'; $ config = array ('indent' = & gt; true; 'indent-spaces' = & gt; 2, 'show-body-only' => true, 'rap' => gt; $ Clean = new \ systematic; $ Clean-> Parse string ($ html, $ config, 'utf8'); $ Tidy-> cleanRepair (); / / This output is cleaned with the echo of the string; Then this tidied version is thrown in the ACE editor where the user manages things and saves that HTML section. So when I save it - & gt; I want it to be "United Nations", which means that line breaks or tag indentation should not be included. How to achieve this I have no reason to use the library? \ r or \ n or both Use a pregg to match and nothing changes him. preg_replace ("/ \ r | \ N /", "", $ ACE); As far as removing indentation is concerned, it is just white space, which is the function of PHP trim T

How can I prevent the OTA update for Google Glass? -

The XE16 update has been brought to Google Glass with bad surprises (such as the removal of video calls or applications that I have Has been removed), I am wondering if there is a way to stop OTA updates? I do not want to root the unit (and void my warranty) and I know that I was fully charged on the WiFi connection battery ... but it is very risky and not very efficient At least I would say "no longer, please do not" or something like that. :) Thank you The only way to get your bootloader and / or your device Roots and you will no longer receive OTA updates!

php - how to display content in else part? -

I am using this code to print my post category. If there is a post in WordPress, it means that it displays the rank of the category otherwise it does not display your post here. I did not get the other part properly, it shows that the dark screen is coming. I want to display the other part correctly on my display. & lt ;? php if (have_posts ()):? & Gt; & Lt ;? Php rewind_posts (); ? & Gt; & Lt ;? Php while (is_pause ()): the_post (); ? & Gt; & Lt; div id = "post-& lt ;? php the_ID ();? & gt; & Lt ;? Php post_class (); ? & Gt; & Gt; & Lt ;? php get_template_part ('content', get_post_format ()); ? & Gt; & Lt; Div class = "clear" & gt; & Lt; / Div & gt; & Lt ;? Php timeline; ? & Gt; Help me solve this problem. Thank you .. You use the following code to handle the else statement Can: & lt ;? Php if (have_posts ()):? & Gt; & Lt ;? Php rewind_posts (); ? &

How to get methods info on console in java -

मैं ऑनलाइन जब जावा का दस्तावेज़ीकरण का अनुसरण करता हूं, लेकिन जब मैं ऑफ़लाइन हूं तो यह संभव है कंसोल या किसी अन्य तरीके से विशेष वर्ग के तरीकों को देखने के लिए। हाँ आप इसे लिखकर कंसोल के तरीकों को देख सकते हैं: - javap java.io.bufferedReader इसके बजाय java.io बफ़र किए गए रीडर आप एक ही वाक्यविन्यास द्वारा किसी भी क्लास विधियों को देख सकते हैं। दूसरा रास्ता: - प्रत्येक जेडीके बंडल में एसआरसीजीज़ / एसआरसीआरआरआर है, जो आप इसे निकाल सकते हैं और जावा कोड को javadoc यह स्वतः ही जावा फ़ाइल को एचटीएमएल फ़ाइल में बना देगा, जो ओरेकल दस्तावेज के समान है, इसका मतलब है कि आप इसे ऑफ़लाइन भी एक्सेस कर सकते हैं।। समय-समय पर करें: - javadoc * .java यह फ़ोल्डर में सभी जावा फाइलों को ले जाने के लिए एचटीएमएल फाइलें आरटीआर बना लेंगी कि जावा फाइल।

html - How to change width and height of an absolute positioned image placed in a div by css :before -

इस सवाल का पहले से ही एक उत्तर है: < / p> 8 जवाब मैं जगह की कोशिश कर रहा हूँ सीएसएस का उपयोग कर एक div में एक छवि: स्थिति से पहले: पूर्ण; उस डिवेल में पहले से एक छवि है मैं उस संपूर्ण स्थिति वाली छवि की ऊंचाई या चौड़ाई को क्यों नियंत्रित नहीं कर सकता? सीएसएस: div: {content: url ('buble.png') से पहले; स्थिति: पूर्ण; बाएं: 0; शीर्ष: 0; चौड़ाई: 100%; ऊंचाई: ऑटो; z- सूचकांक: 200; } html & lt; div & gt; & lt; img src = "profile_pic.png" alt = "" / & gt; & lt; / div & gt; स्पष्टीकरण: आप यदि आप इसे : से पहले छद्म तत्व की सामग्री में डालते हैं तो छवि में सीएसएस गुण अर्जित करने में सक्षम नहीं होंगे। चौड़ाई / ऊंचाई आप केवल छद्म तत्व पर लागू करते हैं और इसकी सामग्री पर नहीं। समाधान: सेट करें की पृष्ठभूमि की छवि: छद्म तत्व से पहले तब आप पृष्ठभूमि-आकार संपत्ति का इस्तेमाल छवि को इच्छित आकार के रूप में कर सकते हैं। जैसा कि ऐनक में बताया गया है, आप छवि के आकार में प्रतिशत या प्रतिशत जैसे कव

asp.net mvc 4 - How to redirect user to login page if session expire in MVC 4 Razor syntax -

On _LoginPartial.cshtml, I have entered the following code that displays the user name for the user session: < pre> & lt; P & gt; Hello, & lt; Span & gt; @ Session ["username"] & lt; / Span & gt; & Lt; / P & gt; But here I want to add another condition that the user who ends the session has to redirect to the login page and leave the session. How to get it. Thank you View this as: < code> @ {If (session ["user name"] = null) {& lt; P & gt; Hello, & lt; Span & gt; @ Session ["username"] & lt; / Span & gt; & Lt; / P & gt; } And {session}. Ebony (); Response.Redirect ("~ / ControllerName / ActionName"); }}

Java RandomAccessFile , Only finds the first entry -

When my program reads from a random file, it will only get the first file or file with the following account number (this A banking program) after that I got an error reading the IO exception with the private RandomAccessFile input; // Random Aecess file input stream private record data; Public Stable JFrame Frame = New JFrame (); Public CredRead () // Constructor CredRead created {// Try File /} // output stream object declare and associate it to file / file.dat input = new RandomAccessFile ("UnionDB.dat", "rw") Do; } Hold (IOException E) {// If an error displays a message on the screen System.err.println ("The file did not open correctly \ n" + e.toString ()); // Program system ends due to error. exit (1); } Data = new record (); Setpriffer Size (new dimension (650, 400)); frame.setSize (getPreferredSize ()); // frame size frame.Setlinersillettau (empty); Frame.setLayout (new grid layout (7, 2)); // Grid layout set / * GUI component * / frame.ed (

Emptying array inside loop while using push in PERL -

I am writing a subtitle that prints an array of non-redundant elements from another array. This code is inside my suburban area. (code) $ {$ _ $}; } Print "@NewTable" "\ N"; Then I call my work in a loop inside my main program, it is fine to run first and in my new table there is an event of my old table but its The latter keeps @new_table elements from previous iteration and the print result is false. I tried to clear @new_table inside my suburban area like this @new_table = (); Foreign currency (@old_table) {push (@ new_betable, $ _) unless that ($ $ {$ $} $ $ $ has been seen); } Print "@NewTable" "\ N"; But then my @new_table becomes empty in all iterations except the first one. What is the problem with this and how can I fix it? Due to incorrect scrolling, you saw @new_table and % Make these loops before the past. my @new_table; My% looked; Foreign currency (@old_table) {push (@ new_betable, $ _) unless t

c++ - Using boost.pool instead of 'new' for container of objects -

I am working in that code base, currently this is the code that often does this: < Pre> // In the header: class labels {public: zero parascript (); Private: Letter * M_AramAire; }; // in CPP: Passive Parsext () {Delete} M_IERRE; M_myArray = new letter [string_length]; Basically every time the string changes into a label, we delete the old letters and delete them again. These letter objects are somewhat lightweight, but this is often the case since I std :: vector & lt; Letter & gt; because each push_back () will be the result of a copy I also want to avoid copying. Should use Bulb Pool Support here? I can imagine doing this (this is a pseudocode, because I'm not sure how to use the pool yet): // In the header: class Label {public : void ParseText (); Private: std :: vector & lt; Letter *> M_myArray; Promotion :: object_pool m_pool; }; // CPP: parseText () {// loop through each element in the loop m_myArray and call pool :: free m_myArray.clear ()

C++ function putting garbage into array -

There is a problem with this function, until the sum works all right, instead of the new inset, the memory address in the array Includes: Bull reserve seat (string name [], int reservation [] [2], int and notepaper) {Bull reserve = Falls; String searchname; Int row, seat, lawful, valid seat; Cout & lt; & Lt; "Please enter the reservation name:"; Gateline (pin, search name); Cout & lt; & Lt; "Please enter a line #:"; Cin & gt; & Gt; Line; Cout & lt; & Lt; "Please enter a seat #:"; Cin & gt; & Gt; Seat; cin.ignore (80, '\ n'); Valid Rau = Valid Curt (line, '10'); Validate = valid; seat (seat, '3'); (Int CTR = 0; CTR & lt; nopassengers; ctr ++) {if (seat == reservation [CTR] [1] & amp; RO == reservation [CTR] [0]) {break; } And {reserved = true; NoPassengers ++; Name [noPassengers] = searchName; Reservation [noPassengers] [0] = Row; Reservation [noPassengers] [1] = seat; }} Returns

php - is there any way i can extract first n comments from this piece of code? -

$ facebook = नया फेसबुक (सरणी ('appId' = & gt; '', 'secret' = & gt; '')); $ पोस्ट = "10152390205162139"; $ comments = array (); $ done = false; $ विकल्प = सरणी (); $ पथ = "/".$post.'/comments '; जबकि (! $ किया गया) {{$ data = $ facebook- & gt; एपीआई ($ पथ, 'GET', $ विकल्प) का प्रयास करें; } पकड़ (FacebookApiException $ e) {गूंज $ e- & gt; getMessage (); $ डेटा = शून्य; $ किया = सच; } यदि (! है_अन्य ($ डेटा)) {$ comments = array_merge ($ टिप्पणियां, $ डेटा ['डेटा']); अगर (isset ($ डेटा ['पेजिंग'] ['अगला']) और रिक्त ($ डेटा [पेजिंग '] [' अगला ']) {$ parts = parse_url ($ data [' paging ' ]['आगामी']); $ पथ = $ भागों ['पथ']; parse_str ($ भागों ['क्वेरी'], $ विकल्प); } और {$ done = true; }}} मैं क्या करने की कोशिश कर रहा हूं, एक पृष्ठ द्वारा की गई विशेष पोस्ट से टिप्पणियों की सूची निकालने के लिए, अब मैं 100 या 200 जैसे टिप्पणियों की स

nlp - About subject,predicate and object in RDF -

This is a little off-topic !!! But please answer this question. I have studied a lot of articles and materials on the Net about RDF but I can not understand a thing that how programmatic topics, ingredients and objects are divided into a natural English line. Ex: Scott Directed Runner / P> If I give this above line, then how the line above is divided into topics, predictions and objects in relation to the programmical. answer please. Thx ... topic , like That you have mentioned, to define the aspects of sentences in some languages, the use of predicate in NALP, and object is used in this context to conflate with your use Do not do RDF, they are the names of three specific attributes of a triple / statement . Read and note that one major danger is that a statement is formally defined as 3-Tupal: Subject : = node the statement statement / for side : suffix < / Code>: = A meaningful label start code> object : = node < / Code> t

c# - Converting TimeStamp to HH:MM:SS format -

Hi, I am working on the Oracle stored procedure in which I am deducting two dates and returning the timepane as + 00h: mm: ss.ff format Now I want to use only in HH: MM: SS format stored in proc or asp.net application. When I try to return again and again, it is the result which I get after deduction, I can not find any way to read it because this date is not the time. I want to give time to time Spain with data base side or front end side in HH: MM: SS format. I tried to use the following methods. TODATE (TO (TO (MAX (COMPLETED_DATE-REQUEST_DATE) * 24), 'YYYY-MON-DD HH24: MI: SS'), 'YYYY-MON -DD ​​HH24: MI: SS ') so that later I can remove hh: mm: ss, but throwing this error 2) TO_CHAR (((MAX (S.ComplettADTT) -MX (SRECEREXADT)) * 24)) This time is coming back in +00Hh: mm: ss .f.f. Format and I can not be removed from HH: MM: difference two dates a date time is not, but a timspain . Max (s.comPLATATE) - You should be able to return : The max

android - Gradient border of LinearLayout bottom and top not working as wanted -

मैंने यह कोड लिखा है: & lt;? xml संस्करण = "1.0" एन्कोडिंग = "UTF-8" & gt; & lt; परत-सूची xmlns: android = "http://schemas.android.com/apk/res/android" & gt; & Lt;! - बाहरी रीक्ट - & gt; & LT; आइटम & gt; & Lt; आकार एंड्रॉइड: आकृति = "आयत" & gt; & Lt; gradient android: angle = "90" एंड्रॉइड: centerColor = "# 00000000" एंड्रॉइड: endColor = "# 88000000" एंड्रॉइड: gradientRadius = "0" एंड्रॉइड: startColor = "# 88000000" / & gt; & Lt; / आकार & gt; & Lt; / मद & gt; & lt;! - आंतरिक रीक्ट - & gt; & Lt; आइटम एंड्रॉइड: नीचे = "7dp" एंड्रॉइड: बाएं = "0dp" एंड्रॉइड: सही = "0dp" एंड्रॉइड: शीर्ष = "7dp" & gt; & Lt; आकार एंड्रॉइड: आकृति = "आयत" & gt; & Lt; ठोस एंड्रॉइड: रंग = "# एफएफएफ" / & gt; & Lt; / आकार & gt; & Lt; / मद & gt; &

sleep at the main thread by using pthread C/C++ -

Hello, I'm trying to check this program. This program is working very well, but one thing is this sleep in the main thread? If I change this to less than sleep (2) or puts more work on this * thread. Thread finish before completing all tasks Is there any better way to wait until the work is finished? sleep () Suspend the main thread, so work threads are a time After waking up the main thread, this work disables the queue, so in the wq.control.active the threadfunc () is false, the worker ends the thread But it does not matter that threads end their work.

failed when install laravel and start artisan server -

When I try (before I get an error installing Laurel, but I forgot what the error was I get this error requires the Mcrypt PHP extension P> I'm really sure that I have installed php5-mcrypt, and some people recommend putting mcrypt.ini in / etc / php5 / mods-available < Code> sudo ln -s / etc / php5 / conf.d / mcrypt.ini / etc / php5 / mods-available sudo php5enmod mcrypt sudo service apache2 restart But I have found that in the folder I can not find mcrypt.ini < P> Just check the folder / etc / php5 / mods- - Available mcrypt.ini.dpkg-new file, you need to rename or copy this file to the current directory with the name mcrypt.ini, and the server Start or Laverne

asteriskami - How to add and build app_meetme to make Conference Calls (MeetMe) in asterisk -

There are three extensions with my extension 2000,2001,2002. Of course I am able to call from one extension to another but now I want to add the three to the conference call. I googled and found out that MeetMe we can get it. So I have written that Dialplan is getting error for conferencing from 2001 to 2000. Warning [5317] [c 0000000a]: pbx.c: 4872 pbx_extension_helper: no application for extension 'Metat' (My Phone, 2000, 1) Then I came to know that adding and creating app_meetme will solve this problem, but I do I'm not able to. So my question is how to add app_matemade to create conference call in asterisk and create it. Please help me. Thank you in thank you. in the asterisk source directory ./configure menuconfigure # Note that you have chan_dihari in your channel and making memetti in applications- 3 is installed Note: Antecedent has been installed (with headers etc.) When you are configuring menus, All the retrospective shown.

Oracle: How to incorporate NVL to this FULL Join? -

I can how to use Anviel to replace the zero values ​​with zero output of this code? I use these two columns zero so I can perform, plus the horse_wins + jockey_wins He is always null One of the values ​​is zero, I have read that NVL can help in such situations, but it is difficult to implement. a on select race_id, horse_id, horse_wins, jockey_id, jockey_wins, horse_wins + proj_entry combination based on a full jockey_wins tot_h_wins b A.horse_id = b.horse tot_j_wins completely Join c .jockey_id = c.jockey where race_id = 1 and where nvl (jockey_wins, 0); select race_id, horse_id, horse_wins, jockey_id, jockey_wins, NVL ( horse_wins, 0) + NVL (jockey_wins, 0) proj_entry wins a full tot_h_wins b contains join a.horse_id = b.horse full tourist tot_j_wins a.jockey_id = c.jockey where race_id = 1 You do not use NVL in your where section when you want to display the value. where is to filter the rows back, if you want to display it, then change it, use it in the

gitlab - error: git-upload-pack died of signal 13 -

I have GitLab Server (6.7.2) in Mac OS X 10.9.2, with git 1.9.2. Two treasures are one that can successfully be cloned, but the other fails as the $ git clone http: //*/gamil/gamil.git cloning in 'gamil'. .. Remote: Count of objects: 426, done. Remote: Compressing objects: 100% (375/375), done. Fatal: Unexpectedly fatal hanging at the end of the remote: Early EOF fatal: Index-pack failed and I did not have to go to unicorn.stderr.log in GitLab Found and found I, [2014-04-21T23: 03: 58.761225 # 4929] Info -: Master Process Preparation I, [2014-04-21T23: 03: 58.764556 # 4940] Information -: Worker = 0 ready I, [2014-04-21T23: 03: 58.766098 # 4941] Info -: Worker = 1 Ready Error: GIT-Upload-Packet Signal died 13 < p> What happens when this error occurs Land? how to fix it? thank you in advanced! Edit 1 : I have checked the repository: $ git fsck checking the object directory It has been: 100% (256/256), checked the items: 100% (426/426), done. It l

java - show jtable in text area -

"text" itemprop = "text"> im working on a project and jtable is another need to display another form made from the resultset in the text field. I can display it as an example in this option dialog: (for example with 20 votes) but I must be in my form. The question is, this is the way to do this by using a text field as well as label / panel etc. thank you To answer your straight question: No, you do not display JTable inside JTextArea Without fully JTextArea and its functionality, I'm not sure why you want to do so since such a thing, a JTextArea displays, since the text, and you want to do it Inside a component can not display, not completely messing up your functionality. That is, unless I am not telling the wrong meaning of your question, and if so, please clarify it. What are you trying to display in JTextArea? JTable Data ? If so, this is a completely different thing if it is a case, it can be done so that it can be done: JTextArea f

c# - How to grab Client System IP Address? -

I want to capture / track the customer's IP address (machine or user's computer's request). The server is not the machine. I am working that the customer has inserted the following code to capture / track the IP address of the machine. Requests. ServerVariables.Get ("REMOTE_HOST"); But it is working on the system in which the Internet modem is directly connected to the PC and I should work on that system in which the Internet modem connect directly Not with PC (connected via router). You can not get the client's internal address This is what is for that and I know that This is a disappointing answer, but whatever you are asking is not possible in most contexts. The only exception is, if you control both the client machine and the server For example, in a corporate environment, you can write some tools that will provide that information to the server, of course, random people Asking to go to your website to install your device on your machi

Copy Bitmap from file to another Bitmap region in C# Console Application -

Source file) need to create a bitmap file (target file). I have a method like the following: Zero copy (bitmap target file, bitmap sourcefile, int position_x, int page_i) {// copy source file in targetfile (position_x, position_y) } I searched but there was no luck. Any ideas on how to do it? You can use the graphics class in System Drawing . using System.Drawing; // Again, public static zero transcript in its class (bitmap target, bitmap source, int x, int y) {graphics g = graphics.frimimage (target); G.DrawImage (source, X, Y); } Public static zero main (string [] args) {bitmap target = (bitmap) bitmapfof file ("bg. Jpg"); Bitmap source = (bitmap) bitmapfof file ("fg.png"); Copy (target, source, 100,50); Copy (target, source, 200,300); Copy (target, source, 500,450); Target.Save ("newBG.jpg"); }

php - Wamp syncing issue -

I have 3 pcs in which they are all installed WAMP servers. I wanted to synchronize them, so when I develop a website, I want all the files to be updated on 3 pcs. After Googling, I came across the famous Dropbox and Google Drive. I succeeded in syncing my PC 3 by pointing the sync folder, etc. to my local host. However, when I copied the "Data" folder to mysql folder, I saw that there are 3 files, Ibdata, ib_logfile0 and ib_logfile2 are big in size (almost every 50 MB) and whenever I use the database, then these files increase in size continuously. I So I will not keep these 3 files in sync, because more than 100 MB data will be downloaded and enhanced. Google Drive and Dropbox will not let me select which files do not synchronize in their selective sync options What will be the best solution? Firstly a solution is necessary? I understand that Dropbox uses a high compression during sending files, so if your sending is 50 MB files can be 1 Mb files or less.

interface - Why are default methods not allowed in annotation types in Java 8? -

Today I saw a glimpse of the wonderful world of annotations, so I applied my code, but I do not want to compile it: / p> public @interface some annotations {say public string 1 (default) "Hello World"; The default public string is called Halo 2 () {Return "Hello World"; }} What do you see in sayHello1 , how to specify the default logic for annotations. What do I think, so, is not allowed to say hello 2 , which is available after Java 8. Is providing similar functionality to me, or am I missing something here? By default, java 5 can have access to the default method bodies (albeit very simple ones), while the interface had to wait until Java 8? this say public string "halo 1" (default) "hello world"; The default value of annotation element is providing this, if you have not given it in annotation, then it will be of that value, which will be. There can be law announcements in the body of an annotation type, each o

sql calling columns of the same name from two different tables -

I'm trying to solve it "Show details for cage number 144. Cage Include the name of each animal in the cage with the animal cage in the cage, the animals behind the cage, and the cage with the names of the keepers who care for each animal. The data from the oldest to the lowest of each animal is " Here's my query: SELECT a.cageno, c.name AS "Animal Name", a .keeperID, b.surname as "cage guarding", c care id, b. As the name of "Animal Keeper", DN.N. As a "species name" cage, one by one, protector B, animal c, coin de WHERE a.cageNo = 144 and c.keeperID = b.keeperID by order c. DOB DESC The problem here is that I want to get the Animal Keeper's name from the protector table but it has also been used for the name of the cage keeper and originally I received I am trying to do a different set of cage-keepers as well as a different set of names of animals who care for me. If I understand your question well, then

string - Read a text file line by line and retrieve the content of each line in C -

कहें कि एक टेक्स्ट फाइल होगी: 1, 2345, 7788, 463, एबीसी 2, 387, 1100, 321, सीसीसी 2, 2222, 22222, 22, डीएसए तो इस पाठ फ़ाइल में 3 लाइनें हैं, और मेरे प्रोजेक्ट की हमें एक समारोह का एहसास करने की आवश्यकता है इस पाठ फ़ाइल लाइन को लाइन से पढ़ें, और प्रत्येक पंक्ति की सामग्री को पुनः प्राप्त करें जब एक विशिष्ट पंक्ति पढ़ी जाती है, और उसके बाद इस रेखा की सामग्री का परीक्षण करें। उदाहरण के लिए, मैं इस फ़ाइल को पहली पंक्ति से पढ़ना शुरू करूँगा । तो जब यह पहली पंक्ति (1, 2345, 7788, 463, एबीसी) पढ़ी जाती है, तो मुझे सबसे पहले इस पंक्ति को स्ट्रिंग में रखने की आवश्यकता होगी (कहें कि यह चार [] str) है, और फिर मुझे इस स्ट्रिंग को 5 टुकड़ों में तोड़ने की ज़रूरत है , और प्रत्येक टुकड़ा में उन पांच अलग फार्मा-सामग्री को अल्पविराम से विभाजित किया गया है, p1, p2, p3, p4 और p5 कहते हैं। फिर मुझे जांचना होगा कि क्या पी 3 "1100" है। यदि यह है, तो इस फाइल को बंद करें और कार्यक्रम को जारी रखें, और यदि ऐसा नहीं है, तो मुझे दूसरी पंक्ति को पढ़ना जारी रखना होगा और ऐसा करना होगा, और जाहिरा

asp.net - HTTP verb used to access this page is not allowed Web Api IIS 7 -

Image
I should disclose that my experience with IIS is very limited. I am trying to install a web API service on IIS 7.5 on the Azure server running Windows Server 2008 R2 DataCenter. Whenever I post to the service using the postman, I'm not allowed "HTTP verb used to access this page" error. "Allow: Get, Head, Choice, Trace" Looking at the feedback header through Fiddler, I see the following line under the different category. I have deployed this application using a WebDeploy package and therefore it will be a virtual directory under the default Web site it is configured. My current IIS configuration follows: made me try a few things included are: verification is not established is that WebDAV be edit the default web site and sink project the following handler mapping to allow all actions: ExtensionlessUrlHandler- integrated -4.0, ExtensionlessUrlHandler-ISAPI-4.0_32bit, ExtensionlessUrlHandler-ISAPI-4.0_64bit, and ISAPI-dll default Eb site and s

javascript - Using Jquery with Radio buttons -

I'm putting a simple order lookup form until I've added a radio button, it worked well-old JS In, I used the simple function to capture the radio button value and drop it into the string. Jquery is a different way I think I'm close to doing this: Whatever I've done so far: var e = $ ("input: ordernum: checked") .val (function (index, value) {return value + "+ + this.className; var groupname = e. option [e.c.edited index] .value;}); Xmlhttp.open ("GET", "orderearch.php OrderID =?" + ORDERNUM + "& q =" + str, true); Xmlhttp.send (); Previously, with the drop down, it was used: var e = document.getElementById ("groupnum "); - & gt; Var groupname = e.options [e.selectedIndex] .value; }); This is probably a simple fix. Do I need to name the ideabid or getElementby in this example? var e = $ ("Input: Ordernum: checked") .val (function Index, value) { I do not know about th

php - If I have the an id how to know in which page number? -

डेटाबेस में तालिका आईडी 1 2 4 30 31 ... पृष्ठ पर अंक लगाना प्रति पृष्ठ 2 पंक्ति है, desc अगर मेरे पास id = 30 पता है कि किस पृष्ठ संख्या में पता है? किसी भी सुझाव की सराहना की जाएगी पहले उसका आदेश प्राप्त करें: select तालिका (_) से गिनती (*) जहां आईडी & lt; = 30 आदेश द्वारा col_name; फिर आंकड़ा पृष्ठ संख्या: int आदेश = 27; // पिछले क्वेरी से परिणाम, पृष्ठ int = 10; इंट पेजनम = ऑर्डर / पेजसिझ + + (ऑर्डर% pageSize == 0? 0: 1); // यहाँ पृष्ठ नंबर 1 से शुरू, नहीं 0,

java - HttpClient 4.3.x, fixing deprecated code to use current HttpClient implementations -

I had the following code, which is still compiled, but they all dislike: SSLSocketFactory sslSocketFactory = New SSLSocketFactory (Reference, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); ClientConconditionManitorConnectConcertManager = base.getConnectionManager (); Schemersystems Scheméragriti = ClientConcationManager.GetSymeMyArigesty (); schemeRegistry.register (new plan ("https", 443, sslSocketFactory)); Return the new DefaultHttpClient (clientConnectionManager, base.getParams ()); I tried my best to replace it with this part of the code: http clientbuilder builder = http clientbuilder.credit (); SSLConnectionSocketFactory sslConnectionFactory = New SSLConnectionSocketFactory (Reference, SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); Builder.setConnectionManager (new BasicHttpClientConnectionManager ()); Builder.setSSLSocketFactory (sslConnectionFactory); Return maker Build (); As you can see, there are some lines of code from the top post, whic

f# - Passing user name and password parameters to the type provider -

I have created a service provider that requires authentication via user name and password. Something like this: Let's tbl = new demotable All this works well, only one problem is that I want to display this code, so I want the username and password coming from another source - A configuration file, second F # module (a good approach while using scripting) etc. What are my options for passing these standards so that they appear during the performance? There is a simple way of liters in a file that you do not show: Module MyInfo = [[[lt; literal & gt;] user = "user name is here" [[litrable & gt;] pwd = "password here" and then in the file that you show: let tbl = new demotable ()

executequery - PDOException thrown in PHP -

I get "SQLSTATE [HY093] error: invalid parameter number: the number of bound variables does not match the number of tokens "When I try to run the function below: public function find_products ($ string = '', $ fields = array), $ sort_by = '', $ sort_dir = 'ASC' ) {$ fields = empty ($ field)? '*': (''. Implode (',', $ fields) '?'); $ Binding = array ('%'. $ String. '%', '%'. $ String. '%', '%'. $ String. '%'); $ and_where_checks = array ('series', 'content'); $ And = ''; // Loop through POST variable to see what is safe to play with permission; = (array); Foreign currency ($ and_ where_a such as $ AACC) if (! $ _ POST [$ AAC])) $ $ Permission = $ AACC; If (! Empty ($ permission)) {$ tmp = array (); Forex currency ($ $ V as allowed) $ tmp = '' $ V. 'IN' ('str_pad (' ', count ($ v) * 2 - 1,'?, ').') ';

Javascript not redirecting page -

मेरे पास निम्न HTML कोड है: & lt; html & gt; & Lt; शीर्ष & gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" src = "बटनक्लाइट.जेएस" & gt; & lt; / स्क्रिप्ट & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; form id = "confirmChangeId" नाम = "selectionForm" method = "POST" & gt; & Lt; इनपुट आईडी = "बीटीएन चेंज" प्रकार = "सबमिट करें" मान = "बदलें" & gt; & Lt; / प्रपत्र & gt; & Lt; / body & gt; & Lt; / html & gt; निम्न जावास्क्रिप्ट का उपयोग कर: window.onload = function () {initFunc (); } Var initFunc = फ़ंक्शन () {var change = document.getElementById ("btnChange"); Change.onclick = function () {window.location.href = 'http: //stackoverflow.com'; // चेतावनी ("परिवर्तन बटन क्लिक"); // यदि यह पंक्ति अनुपयुक्त है, तो पृष्ठ पुनः दिशा हो सकती है}} फ़ायरफ़ॉक्स का उपयोग करते समय, जब जे

mysql - PHP - Remove Apostrophe from POST varible -

इस सवाल का पहले से ही एक उत्तर है: < / p> 28 जवाब मैंने एक फ़ॉर्म बनाया है PHP और MySQL डेटा जमा करने के बाद, यह MySQL तालिका में सहेजा जाता है। लेकिन मुझे एक समस्या मिल गई है: यदि फ़ॉर्म में कोई एपॉस्ट्रॉफी है, तो डेटा डालने के दौरान एक त्रुटि होगी, तो मैं पोस्ट चर से एपॉस्ट्रॉफी कैसे निकाल सकता हूं? $ description = $ _POST [ 'विवरण']; आपको अपने एसक्यूएल स्टेटमेंट को तोड़ने से रोकने के लिए, वर्णों से बचने की आवश्यकता है। मैं सुझाव है कि आप एसक्यूएल इंजेक्शन पर पढ़ें। मुझे लगता है कि यह MySQLi एक्सटेंशन में स्वचालित रूप से ध्यान रखा जाता है, जिसे आप उपयोग करना चाहिए क्योंकि इस पद्धति का आजकल घिस रहा है। $ descrtion = mysql_real_escape_string ($ _ POST ['वर्णन']);

php - A way to display Google Analytics data for the currently logged-in Wordpress user's website? -

Little story short, I run a web development company, and when my clients log on to our Wordpress site I want to We meet mainly for small businesses and GA platform completely submerges them, some websites may be able to provide some basic, high-level analytics ( Set up a site and analytics for us S). . We already pay, manage hosting subscriptions, one off shopping, etc. Anyway on our site via Woocommerce, so what I would like to do, some personal modules such as analytics, new newsletter signups, social media likes, etc. in the My Account section. A stop-shop of a kind if you do this, ideally to do this, ideally, I need a dynamic plug-in that tailors the data currently displayed for logging in. User can manually set user account on GA profile on backend. I am sure how to display it. But it starts with analytics so I was curious that anybody knows about any plug-in or device that will implement something like this in less painful way. You use the plugin to display a GA wi

c - How does this code find the number of trailing zeros from any base number factorial? -

Image
The code below works perfectly, but I will explain to anyone some math behind it. Actually, how does it work? #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; (int, arg arg, char * argv []) {const int base = (x, y)) ((x ()) and (y)) (x): (y)) (x): (y) 16 ; Int n, i, j, p, c, noz, k; N = 7; / * 7! = Decimal 5040 or 0x13 b - zero behind zero = / noz = n; J = base; / * Why do we start from 2 * / i (i = 2; i & lt; = base; i ++) {if (j% i == 0) {p = 0; What is p / * / While (j% i == 0) {p ++; J / = i; } C = 0; K = n; / * What is math behind this loop? * / While (k / i & gt; 0) {c + = k / i; k / = i; } Nose = Min (Nose, C / P); }} Printf ("% d!% D trailing zeros \ n", n, noz); Return 0; } Note that the problem is equivalent to finding the highest power of the base Which n! . If the base was dominant (let's call it p ), then we can use it to compute the highest p the power n! : Let us remove the part of our code that is

spring - 400 Bad request with Hibernate @Valid -

When I validate my form, I have a strange behavior. As soon as I have a valid comment on Hibernate, Tomcat shares my request as "poor", if the posted data is not valid. . Data valid, no worries I use: Tomcat 7.0.52 Javax validation API 1.1.0.Final Hibernate Verifier 5.1.0.Final Spring 4.0.3.RELEASE At the moment, I do a very simple verification: Public class RemoveCacheElementForm {@NotBlank (message = "Please select a cache name.") Private string name; @notbank (message = "Please select the cash entry key.") Private string key; Spring controller: / ** * Handler to remove a cached element from the specified cache. * * @ Return Back * / @RequestMapping (value = CACHE_REMOVE, method = RequestMethod.POST) Public string removalCachedElement (Model map model, @Valid @ModelAttribute (FORM_NAME) RemoveCacheElementForm form) {model.addAttribute ("removeElementResult", CacheUtils. removeCachedElement (form.getName (), form.get

java - Editing XML Style Sheets Changes Buttons in Android -

I am working on an Android app and have decided that I want to change the color in the whole app, XML Style Sheet This has changed my color, but it did not change my editing text, textview and button colors, so I had to create a different style sheet for each element and then call those sheets from within the main color sheet. Which I was using. However, once I did this, the color worked properly for three widgets, but the boxes were shrinking and disrupted our entire layout. We believe that because we override the default styles for those people, but I thought that the way it was written, we were only overriding the color options. I want to know that EditText, TextView and Button, but do not change their formatting. Styles.xml: for our project & lt; Resources xmlns: android = "http: // schemas.android.com/apk/res/android"> & Lt; color name = "oldblue" & gt; # 33b5e5 & lt; / Color & gt; & Lt; color name = "gungrey" &

python - pickle.loads does not return the same data dumped -

पॉलिसी मॉड्यूल मेरे द्वारा बनाई गई एक क्लास है decomposed_module [स्विच] [बंदरगाह] module.install () मॉड्यूल [new.name] = मॉड्यूल प्रिंट 'डंप के लिए नीति' प्रिंट मॉड्यूल [new.name] .isInstalled () प्रिंट मॉड्यूल [new.name] .name प्रिंट मॉड्यूल [ new.name] .डोमेन प्रिंट मॉड्यूल [new.name] .अनुप्रयोग प्रिंट मॉड्यूल [new.name]। पॉलिसी प्रिंट '\ n' msg = पिकेल डंप्स (मॉड्यूल [नया। नाम], - 1) एक्स = पिकेल.लोड (msg) प्रिंट 'पॉलिसी लोड' प्रिंट एक्स। इंस्टॉल किया गया () प्रिंट x.name प्रिंट x.domain print x.action प्रिंट x.policy प्रिंट '\ n' यह वही है मुद्रित: ट्रॉफी टू डंप ट्रू रूटिंग मैच: ('dstip', 10.0.0.1) समानांतर: क्रमिक: मैच: ('स्विच', 2) ('dstip', 10.0.0.2) fwd 1 अनुक्रमिक: मैच: ('स्विच', 2) ('dstip', 10.0.0.3) fwd 2 अनुक्रमिक: मैच: ('dstip', 10.0.0.1) समानांतर: क्रमिक: मैच: ('स्विच', 2) ('dstip', 10.0.0.2) एफडब्ल्यूडी 1 अनुक्रमिक: मैच: ('स्विच', 2) ('dstip'

mysql - SELECT specific rows when using GROUP BY -

I have the following SQL table that tracks the user's score at a specific time. The user can have several digits per day. + ------- + ------------ + ------- + - ---- + | User | Date | Score | ... | + ------- + ------------ + ------- + ----- + | Bob | 2014-04-19 | 100 | ... | | Mary | | 2014-04-19 | 100 | ... | | Alice | 2014-04-20 | 100 | ... | | Bob | 2014-04-20 | 110 | ... | | Bob | 2014-04-20 | 125 | ... | | Mary | 2014-04-20 | 105 | ... | | Bob | 2014-04-21 | 115 | ... | + ------- + ------------ + ------- + ----- + A special form Users given (say bob ), how do I prepare a report for each user's score, but should I use the highest rated score per day? (Getting the specific line with the highest score is also important with the highest score) SELECT * FROM from `user_score` to WHERE 'user` =' bob 'by group' Date` The base query that I am closing turns the result into the following result set: + ------- + ------------ + ------- + - --- + |

vba - Current contact email template -

I have the code to open the Outlook 2010 template. When I have a contact record open from my public exchange folder I want to populate the To: field with the e-mail address from the current contact record. Here is the code. Sub Sender (set) Set Message =. Application = CreateItemFromTemplate ("\\ locationofagreementtemplate \ Agreement.oft Send") message. Display end sub Assume that the contact is selected in explorer. If it is actually opened in an inspector, then change the fist line to Set contact = application. ActiveInxXactor Set contact = application. Active Explorer Selection (1) If Contact.Type = olContact then message. Receipts Add contacts. Email1Address End if

c++ - GLSL : uniform buffer object example -

I have an array of variable size GLubyte. I want to pass it to the piece shader. I have seen and therefore I decided to use "Uniform Buffer Objects" but being a newbie in GLSL, I do not know: 1 - If I add it to a piece shader, then I How do I exceed my size? Should i make a straight Layout (std140) Uniforme Murera {GLubyte myDataArray [size]; // I do not understand GLSL GLubyte;); 2- How and how does the C ++ code associate this buffer object? 3 - How to deal with GLubyte casting to float? 1 - If I add it to a piece shader, how do I cross the shape? Can i make a straight Using Uniform Buffer (UB), you can not do this Size should be stable and known when you link your GLSL program means that it should be done with hard work in real shaders. A feature is used in modern ways with GL4 (SSB). The SSB can have variable lengths (the last field can be declared as an unsized array, such as myDataArray [] ) and they have more data than UB Can archive.

validation - AngularJS ng-required allowing only whitespace -

मेरे पास एक ng- के साथ मेरे फॉर्म पर एक इनपुट [प्रकार = पाठ] है आवश्यक = "true" । मेरे पास एक बटन क्लिक ईवेंट है जो मॉडल को अपडेट करता है जो इनपुट के लिए बाध्य है। यदि अद्यतन मान रिक्त है, तो फॉर्म अमान्य हो जाता है। लेकिन अगर अद्यतन मान पूरी तरह से सफेद स्थान है, तो फॉर्म वैध है। यदि आप सफेद स्थान को हटाते हैं और इसे पढ़ते हैं, तो फ़ॉर्म फिर से अमान्य हो जाता है। यह jsfiddle दर्शाता है: क्या इस मुद्दे पर कोई उपाय है? अभी के लिए मैं अपने सभी बैक-एंड डेटा को ट्रिम कर सकता हूं। समस्या के कारण जिस तरह से < कोड> एनजी-मॉडल काम करता है। डिफ़ॉल्ट रूप से एनजी-मॉडल इनपुट मूल्यों को ट्रिम करता है यदि आप इसे मूल्य के चारों ओर कोट्स के साथ देखते हैं तो आप देख सकते हैं कि उपयोगकर्ता इनपुट किए गए रिक्त स्थान को खाली स्ट्रिंग के रूप में दिखाया गया है। हालांकि यदि आप मॉडल को रिक्त स्थान होने पर मजबूर करते हैं तो ट्रिमिंग लागू नहीं होता है और इसके लिए मॉडल तकनीकी तौर पर मान्य है। आप ng- मॉडल के साथ ng-trim = "false" । तब आपको अधिक उम्मीदवार व्यव

c++ cli - How do you set the version of a C++/CLI project in Visual Studio? -

I am working with a C ++ / CLI project which wraps the C ++ native library in Visual Studio 2012 is. In my C ++ / CLI project there is an assembly, InfocPPP. I set up all the areas there, which includes "assembly version optimization", however, when I made my project and examined properties in its explorer, then the version information is empty. This is my first C ++ / CLI project, I'm going to all the options in Project Properties, but I can not find anybody working to set the version. How do you set versions for the C ++ / CLI project? Update I will add information to my assembly I just filled the fields that were present, when I created the project it was automatically generated. using namespace system; Using the namespace system: Reflection; Namespace System :: Runtime :: Using Compiler Services; Namespace System :: Runtime: Using Interop Services; Namespace System :: Security :: Using Permissions; [Assembly: AssemblyTitleAttribute ("MyTitle

perl - Referenced array dropped in size to one element -

Dear partner perl programmer, I wanted to access this array my @vsrvAttribs = qw (code description vsrv_id vsrv_name vsrv_vcpu_no vsrv_vmem_size vsrv_vdspace_alloc vsrv_mgmt_ip vsrv_os vsrv_virt_platf vsrv_owner vsrv_contact vsrv_state); via a variable made of variable and a string suffix, which certainly leads to error messages like this not using the string ("@vsrvAttribs") as an ARRE ref, while "hard riff" in use on cmdbuild.pl line 262. So I decided to get the reference of the array through a hash my% attribs = (vsrv = & gt; @vsrv attribus) ; And this is the code where I need to get the contents of the above array foreach my $ classTypeKey (key% classTypes) {my @attribs = $ Properties {$ classTypeKey}; Print dumper (\ @ atribus); } It seems that I can get the reference of array @vsrvAttribs, but when I check the contents of the array with the dump, the array has only got one element < / p> $ VAR1 = ['code']; Do yo

ember.js - Assertion Failed, ember routes with dynamic id -

I try to prepare a web app with amber, I use a routing model: post_id but that Does not work: works and displays a list, but the link to # post / 11330 is not working, error: prohibition failed? What am I doing? your router map App.Router.map (function () Change to {this.route ("Page"); this.route ("Menu");) Resources ('Post', Function) (This Resource ('Post', {path: '/: post_id'});}}; This.route ("index", {path: "/"}); This.route ("cat"); This.route ("photo");});

javascript - Get scroll position and direction with vanilla JS -

I'm trying to complete a project without using jQuery. Looks good yet, but there is something I can not manage: scroll position and direction What I basically want to do is to add an element to an element, when we reach a point, there is only one point, but going up. I have a JSFiddle recently it helps you to do this Could. You need to include it to find out from scrolling, you can do this by handling the last scrollbar position and comparing it to one current.

javascript - Ideal handle location for insertion of a new point in a bezier curve with Paper.js -

I have created a tool in paper.js that allows to insert new control points, which works great , Problem I is going on, it is that I should also calculate the handle position for each new control point (unless I am missing something, it seems that this paper does not do it for you), and This is proven to be a lot of work. The code below, which I am currently working with, handles the point successfully, though it distorts the curve. I handle this way that the curve is not distorted. gEditor.MoveTool.onMouseDown = function (event) {gEditor.HitResult = paper.project.hitTest (event.point, gEditor.HitOptions); Var location = gEditor.HitResult.location; Var newPoint = gEditor.HitResult.item.insert (location.index + 1, Event Page); Various Prections, Next Division; If (location.index - 1> = 0) {prevSegment = gEditor.HitResult.item.segments [location.index - 1]; } If (location.index + 2 Yes, paper.js already has this function: curve.divide () . After completing your hit test:

regex - Powershell Move file from directory to subdirectory based on filename -

I would like to use all 8k + files once because the left 5 characters of the file correspond to the correct 5 sub -To transfer the directory. This one works one by one: move-item-path X: \ "property files \" \ 05165 * .pdf -destination X: \ " Property Files "\" * - 05165 "; Move-item-path X: \ "asset files \" \ 05164 * .pdf -destination X: \ "asset files" \ "* - 05164"; Thanks in advance for any help. One-liner, as one, already exists, assuming the destination folder: Go-ChildItem "X: \ Property Files * .pdf" | Unit {step-path $ _ - dynamics ($ _ directory name + "\ * -" + $ _. Name.substring (0,5))} Use only filename Do it, you just remove the first five letters ( substring (0,5) ), then use it as the end of the folder to match. $ _ directory name Accept the destination folder is a subfolder of the source path.

c# - Calling Asynchronous method after certain time has passed -

I have the following code in .Net C #, which calls, and then evaluates the response. If the response is pending, I want to wait 2 seconds, and I want to call again. I do not know how to "wait 2 seconds", or how to use the timer working with synchronous method. I am limited by the constraints of any PCL project. Private async Tasks & lt; Feedback & gt; ExecuteTask (request request) {var response = wait GetResponse (); Switch (Response status) {Case ResponseStatus.Pending: // wait 2 seconds response = ExecuteTask (request) awaiting; } Return response; } Will the following code be cured? System. threading. Timer timer; Private async work & lt; Feedback & gt; ExecuteTask (request request) {var response = wait GetResponse (); Switch (response.Status) {case ResponseStatus.Pending: Timer = New System. threading. Timer (async obj = & gt; {response = ExecuteTask (request);}, blank, 1000, system. Threading, timeout, infinite); } Return response; }

Random row from matrix with row number Matlab -

Matlab How to choose a random line from the matrix, and the selected number of rows? The designated matrix ICO M is 4x3 as follows: -21.8318 19.2251 -16.0000 -6.2788 8.6988 -10.0000 1.5553 -0.8041 - 2.0000 17.6843 - 13.0848 0.3000 Choosing a random line from the matrix M is my question simple (which is, in fact, no big deal) with its line number? 1 randi use and M , and then use it in the index in M : ind = randi (size (m, 1)); % // line number row = m (ind, :); % // related line