Posts

Showing posts from May, 2015

sql server 2008 - How to count for records with empty values in 3 colums -

I'm not a SQL Server 2008 expert, but that's what I'm trying to do. Let's say I have this table: I have to calculate those records which do not have values ​​in col2, col3 , and col4 , Code> col1 = 1 , I've tried to do this: from the SELECT COUNT (col1) table where len (col2) & gt; 1 or LAN (col 3) & gt; 1 or lennon (col4)> 1 and col1 = '1' But I get thousands of records. If any of you can help me or point me in the right direction, then I appreciate it. Thank you. SELECT COUNT (col1) = "text"> operator preference Check it at 'and' before it is evaluated 'or' your example looks like: where to take from the SELECT COUNT (col1) table (col2) & gt; 1 or LAN (col 3) & gt; Such records should be counted that you do not have the value But if your code is counting the records that do the values, then you might want it: SELECT COUNT (col1) table. You can show data in which Va...

Excel linest formula for weighted polynomial fit -

एक्सेल सिलेस्ट भारित बहुपक्षीय फिट फार्मूला को कैसे निर्दिष्ट करें, जैसे LINEST (y * w ^ 0.5, IF ({ 1,0}, 1, x) * w ^ 0.5, गलत, सच), लेकिन यह रैखिक फिट के लिए है मैं दूसरे आदेश और तीसरे क्रम बहुपद प्रतिगमन फिट के लिए समान सूत्र की तलाश कर रहा हूं। एक दृष्टिकोण में अन्य पद पहले से ही भारित बहुपदों के लिए सुझाव दिया गया था। उदाहरण के लिए एक 4x1 रेंज में CTRL + SHIFT + ENTER के साथ क्यूबिक फिट के लिए प्रयास करें: = LINEST (y * w ^ 0.5, (x-1E-99) ^ {0,1, 2,3} * w ^ 0.5, FALSE) (- 1e-99 यह सुनिश्चित करता है कि 0 ^ 0 = 1)। आर ^ 2 के लिए रैखिक मामले की कोशिश करें: = INDEX (LINEST ((y-SUMPRODUCT (वाई, डब्ल्यू) / एसएम (डब्ल्यू)) * w ^ 0.5, (x-1E -99) ^ {0,1,2,3} * w ^ 0.5, FALSE, TRUE), 3,1) व्युत्पन्न मानक कम से कम वर्गों में हम वेक्टर b को कम से कम प्राप्त करते हैं: | y-Xb | एक² = (y-Xb) '(y-Xb)' (y-Xb) भारित मामले में b को इसके बजाय कम से कम करने के लिए चुना जाता है: | W (y-Xb) | एक² = (y-Xb) 'W'W (y-Xb) तो भारित प्रतिगमन Wy पर WX है,...

ruby on rails - Efficiently working with arrays and hashes? -

मेरे पास ये सरणियाँ हैं: @users = [[1, 'मार्क'] , [2, 'बिल'], [3, 'जॉन']] @ प्रोजेक्ट्स = [[1, 'बदलें द वर्ल्ड'], [2, 'बिल्ड एक कंप्यूटर'], [3, 'एक वृत्त में भागो' ]] @ प्वाइंट_ड्यू = [[1,1, "40"], [1,3, "80"], [2,1, "20"] मेरे पास एक कुछ समाधान लेकिन मैं इन सभी वस्तुओं को पुनरावृत्त करने के सबसे अधिक प्रदर्शन कुशल तरीके की तलाश कर रहा हूं जैसे कि मुझे ActiveRecord के माध्यम से परिणाम दिए गए थे मैं एक प्रोजेक्ट के साथ एक & lt; उल & gt; और एक & lt; LI & gt; उपयोगकर्ता के नाम और उसके कारण अंक प्रदर्शित करना चाहता हूं विशेष प्रयोक्ता मैं कुछ समाधानों से इंजेक्ट और नक्शा का उपयोग करते हुए हैशों में परिवर्तित करने के साथ आया था, हालांकि, मुझे लगता है कि ऐसा करने का एक बेहतर तरीका है। मैं ऐसा कुछ करना चाहूंगा: @ projects.each do | प्रोजेक्ट | & Lt;% = project.name% & gt; & LT; ul & gt; Project.each करो | उपयोगकर्ता | & Lt; li & gt; & lt;% = user.n...

iphone - NSFetchRequest for a specific Month and Year -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैं सेटअप करने की कोशिश कर रहा हूँ एक NSFetchRequest जो एक प्रविष्टि के लिए दिखता है जो दिए गए महीने और वर्ष से मेल खाता है। डेटा को NSDate के रूप में संग्रहीत किया जाता है मैं सोच रहा हूं कि मैं एक फेच अनुरोध के लिए इसके बाहर के घटकों को कैसे प्राप्त कर सकता हूं? के आधार पर मेरा अनुभव मैं इसे संभालने के लिए दो अलग-अलग विशेषताओं का निर्माण करता हूं। अपनी इकाई में माह और वर्ष टाइप करें और फिर उन लोगों की जांच करें। आपका विदूक सरल होगा और अनुरोध भी तेज होगा। आप अपनी तिथि से घटकों को लेने में उन्हें आबाद करेंगे। पीएस मैं अन्य संभावित समाधानों से अवगत नहीं है, इसलिए अन्य उत्तरों की प्रतीक्षा भी करें यह इसे प्राप्त करने के लिए मेरा व्यक्तिगत समाधान है। क्रेडिट @ मार्टिन आर को जाता है उनकी टिप्पणी बिल्कुल सही थी।

java - Contdown on Servlet Session -

When I expire the X minutes, I need a countdown on the topmost session to fire events ... So, one way to know how many seconds are left to end the session? You can calculate the remaining time (in seconds) using the API: httpSession.getMaxInactiveInterval () - ((System.currentTimeMillis () - httpSession.getLastAccessedTime ()) / 1000

javascript - Handling branches with Promises -

I have a problem with the promises of jQuery 1.9.1, where I need conditional logic, which is another deferred And I'm not sure how to handle it. It was my best effort, but as the comment indicates below, when I hit the other branch, I still make a second hit. Then () function, where I hope I can go back to the user. How to handle this kind of scenario? storage.provision (c) .then (function (rc) {if (rc === 0) {storage.write (c);} Else {return options.onSuccess (rc) ; // How the user came back for a callback / promise, but it takes me down then.}}} //storage.write also gives a promise, let me do another. So // like this? .then (function (rc) {// I was hoping that it will catch the storage. Written () case, and it does, but it also catches the option in the other option / again. OnSuccess (Rc);}) .file (function (e) {// handle error .reject ()}); It is easy to see that options.onSuccess (rc) is ; is executed in another .then () unconditionally but never before. If...

c++ - system lookup error undefined symbol SFML -

I'm running Linux Typ 12 on an i686. I am running a program that uses SFML. I compile it and run it like this: g ++ -c lineTest.cpp rasterizer.cpp simpleCanvas.cpp g ++ -o linestitist.o rasterizer O simpleCanvas.o -lsfml-graphics -lsfml-findows-lsfml-system/ When I try to run the program line, I get the following error: $ ./lineTest ./lineTest: Symbol Lookup Error: /usr/local/lib/libsfml-window.so.1.6: Undefined Icons: _ZN2sf7Unicode11UTF8OffsetsE I have any IDE I'm not using everything, just running everything from the command line, do anyone know what I can do to get rid of this error and run the program The Can for? I thought that I would say that you have / usr / lib and / usr / local / lib Decoding the name sfml is wrong in both: & gt; C ++ filt _ZN2sf7Unicode11UTF8OffsetsE sf :: Unicode :: UTF 8 offsets Therefore, for the libsfml-window.so sf :: Unicode :: UTF8 offset function Looks but can not find it.

jquery - How to work with multiple "instances" of the same form in a document -

What is the easiest way to work with multiple instances of duplicate form with duplicated controls? & lt; Div id = "divTest_Control1" & gt; & Lt; Form id = "frmBaseClass" & gt; & Lt; Div id = "divTest" & gt; & Lt; / Div & gt; & Lt; / Form & gt; & Lt; / Div & gt; & Lt; Div id = "divTest_Control2" & gt; & Lt; Form id = "frmBaseClass" & gt; & Lt; Div id = "divTest" & gt; & Lt; / Div & gt; & Lt; / Form & gt; & Lt; / Div & gt; Forms are being provided as partial control @ (using AjaxBeginForm () ... Only one DivTest_xxx will appear at one time because I'm showing the hidden / reloaded one. As part of the partially presented part I have some JS functions I $$ ("# divTest") DoSomething is not always planned as usual. In reality every source There are many elements on the r and the visibility of each is being h...

java - How to save and load an image on a Tomcat server -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैं एक जावा लिख ​​रहा हूँ ईई आवेदन, और मैं एक यूआरएल से एक छवि प्राप्त करने का प्रयास करता हूं तो इसे मेरे संसाधन फोल्डर में सहेजें (एक AJAX अनुरोध के माध्यम से)। मेरी समस्या यह है कि यदि मैं अपने सर्वर को रिबूट नहीं करता तो मैं इस छवि को प्रदर्शित नहीं कर पा रहा हूं क्योंकि यह मेरे सर्वर पर लोड नहीं है। मैं टोमकैट 7, स्प्रिंग, हाइबरनेट, प्राइफाफास का उपयोग कर रहा हूं। मेरी फ़ील्ड को बचाने के लिए मेरा वर्ग है सार्वजनिक वर्ग ImageSaver {अंतिम स्थिर इंट = 1024; सार्वजनिक स्थिर शून्य फ़ाइल यूआरएल (स्ट्रिंग एफएडडर, स्ट्रिंग लोकलफ़ाइलनाम, स्ट्रिंग गैलरीडिर) {आउटपुटस्ट्रीम आउटस्ट्रीम = रिक्त; यूआरएल कनेक्शन यूसीन = नल; InputStream = नल है; {URL url = नया URL (एफएड्रेस) आज़माएं; बाइट [] buf; Int byteRead; Int byteWritten = 0; आउटस्ट्रीम = नया BufferedOutputStream (नया FileOutputStream (destinationDir + "\\" + localFileName)); UCon = url.openConnection (); है = uCon.getInputStream (); Buf = नया बाइट [आकार]; जबकि ((बाइट री...

javascript - How to do things to an element based on where the cursor comes from -

I hope the question is quite clear, I want to "things" for one object, where the cursor will come For example, if the slide cursor comes from the left side, make the element slide on the right, if the cursor comes from the right, at the top if it is coming down from the bottom and if it comes from the top I have tried to do it on my own, it was not so good, so I I'm not expected to show myself anything, sorry. But I have an example for you: So, please tell me how to use jQuery and / or CSS3 You can get the entrance to block the direction of moving the mouse over that time. See examples: function getMoveDir () {var direction = ''; If ((dx & gt; = 0) & amp; amp; (disy & lt; = 0)) {if (disx & lt; disy) {direction = 'right from'; } And (direction = 'from above';}} if ((dxxt = 0) & amp; amp; (disy & gt; = 0)) {if (disy> disx) {direction = 'below From ';} and {direction =' from left to '}} retur...

php - JS AJAX sending multiple data array -

I am trying to send multiple data arrays to my AJAX function. I like each array individually like data: hardwarepoload and it will work. If I do {hardware: hardware load, service: servicepoload} then I get very weird JSON output. Which looks like: Hardware =% 5% B% 7% 22 Hardware Name% 22% 3A% 221% 22% 2C% 22 Hardware Volume 22% 3A% 22% 22% 2c% 22 hardware BIWOD% 22% 3A% 22% 22% 7D% 5D and service =% 5% b% 7% 22% Assurance% 22% 3A% 223% 22% 2C% 22Servicecentre I need two arrays to have a hardware and a service so that I can grab each one separately. My code looks like this .. self.save = function (form) {var hardware model = []; Var servicemodel = []; Ko.utils.arrayForEach (self.services (), function (service) {serviceModel.push (ko.toJS (service));}); Ko.utils.arrayForEach (self.hardwares (), function (hardware) {hardwareModel.push (ko.toJS (hardware));}); //allModel.push ({accountId: ct.js (account)}; Var HardwarePlayload = JSON. Strings (Hardware Model); Var servi...

Python is ignoring my if -

Can someone tell me why this loop ignores? (Edit: This is the complete code - the function which gives back a number.) time_en = time () number = np.loadtxt ("11.txt", unpack = true, Dtype = 'int64') lenx = len (number [0,:]) leny = len (number [, 0]) lennum = 4 #prods = np.zeros (lenx * leny * 4). Immature (Lynx, Lenny, 4) Maximum Enum = 0 meters (0, Lenny): N in range (0, lane): prods = lookaround (n, m) if prods & gt; Maxnum: maxnum = prods time_and = time (); Elapsed = time_end - time_now print (prods, elapsed) Maybe because prods is always less than or equal to maxname ? What value did you use to start the maximum name ? It should be set to a very small number before the loop, say maxnum = float ("- inf") Another possibility is that lookaround is returning an incorrect value, which is a unit test.

jQuery fancybox append image source to href -

I am using the fancybox plugin on my site. I want to use jQuery to locate the image source and keep it in href. My html looks like this: & lt; Div class = "item" & gt; & Lt; Img src = "img / sam_skirrow_the_moment_3.jpg" class = "item_img" /> & Lt; / Div & gt; And I'm using jquery to attach the fancybox code: $ ('& lt; class = "fancybox" href = " [Image Source] "& gt; & lt; / a & gt; ') appendTo (.' Items'). Do I need to capture IMG src and add it as source of href ?? Maybe something like that? $ ('& lt; img & gt;'). Attr ('src'). Attachment ('. Fancybox'); So my question is: How can I use jQuery to get an image source and add it to "href"? I.e. one href = "[IMAGE of SRC]" If you have more than one and Lieutenant is; and & Lt; / Div & gt; etc. Then you can use it as a .each () and .w...

Whats the most efficient way to update a partial after an AJAX form submit in Rails 3 -

मेरे पास कोड वाला पेज है, जैसा कि निम्न है: & lt; div & gt; & Lt;% = रेंडर 'फॉर्म'% & gt; & Lt; / div & gt; & Lt; div id = "item_container" & gt; & Lt;% = रेंडर @ आईटम% & gt; & Lt; / div & gt; जहां फार्म "@इतેમ" का एक रूप है और "रेंडर @ एटम" एक आंशिक रूप से प्रस्तुत करता है जो "@इटम" का प्रतिनिधित्व करता है। फार्म रिमोट का उपयोग करता है:: सच है और एजेएक्स का उपयोग करके सबमिट करता है। क्या फॉर्म सबमिट किया जाता है, पूरे @ एटम आंशिक को अद्यतन करने के लिए रेल 3 में सबसे सरल और सबसे प्रभावी तरीका क्या है अपने नियंत्रक कार्रवाई में आपको प्रत्युत्तर को ब्लॉक करने की आवश्यकता है Response_to do | format | Format.html format.js end और आप उस दृश्य को लिख सकते हैं जहां आप सीधे जावास्क्रिप्ट कोड लिखते हैं (आपकी एक्शन का नाम 'अपडेट' है) update.js.erb $ ('# item_container')। Html ('& lt;% = j रेंडर (@item)% & gt;'); जेएस प्रतिक्रिया के लिए भ...

iphone - When you create a New Version app on iTunes Connect, is it already associated with a binary file? -

I spent one day updating an app's meta data - new version 1.2 - (4 February created on iTunes Connect ), I have made changes to my code yesterday (March 19th) and I want to release them with those changes, whether it is possible to assign a new binary file to that new version 1.2 on iTunes Connect. When you create new version on the iTunes Connect app, is it already connected to a binary file? Or can I upload a new binary file at this level and use my meta data. Cheers. When you create a new version, it is not associated with a binary file. You will be in the 'Ready to Upload' state, which means that the system is waiting on your binary to complete the process. If you have already uploaded a binary file for the version, then you can manually reject that binary and then upload a new binary that the new binary will be linked to that version You will do this if you came to a bug in your code before reaching the app 'review status'.

parsing/spliting data in C++ -

I send 6 data from the sensor with headers and tails along with (,) $ data0, data1, data2, data3, data4, data5%. I want to pars / sort this data and I can: y0 = data0 y1 = data1 ... Can someone help me to give this idea how to do this? I use Visual Studio C ++ 2010. My program is: #include & lt; Iostream & gt; #include & lt; String & gt; # Include & lt; Sstream & gt; #include "stdafx.h" using namespace std; Int main () {string str = "$ data1, data2, data 3, data 4, data 5, data 6%"; String word; String Stream Stream (ARR); While (gateline (stream, word, ',')) cout & lt; & Lt; The word & lt; & Lt; "\ N"; } is the value $ data1 data2 data 3 data 4 data 5 data 6% header and tail How to delete data, and how to create data in buffer y1 = data 1 y2 = data2 ... This code shows how it can be done: #include & lt; Iostream & gt; # Include & lt; Sstream & gt; #in...

php - Prevent search abuse -

I'm unable to do something useful on this topic, so I appreciate the links to articles related to this topic, Or straight answers are here, either okay. I am implementing a search system on a site in PHP / MySQL that has a lot of visitors, so I have some restrictions the length character of a visitor is allowed to enter the search field and two searches Required minimum time between Since I am new to these problems and why I do not really know the "real cause" why this is usually done, it is only my impression that the character applies to the minimum length to reduce the number of results in the database , And the spamming of the search system prevents the time between searches to prevent robots and slow down the site. Is it true? And finally, the question of applying the minimum time between the two searches. Set a test cookie on the URL where redirect the user to i where the search result should be check if the test cookie is present or not If not, the ou...

javascript - get a list of all folders in directory -

तो मेरे पास फाइल सिस्टम है जो इस तरह दिखता है: संगीत - 001 - Song.mp3 - 002 - song.mp3 - 003 - 004 - 005 - song.mp3 संगीतप्लेयर.मैं संगीत प्लेयर। Js मैं उत्सुक था अगर इसके बारे में एक सूची प्राप्त करना संभव है सभी फ़ोल्डर नाम? यह जावास्क्रिप्ट, html5, या यहां तक ​​कि jQuery, मैं कुछ भी स्थापित नहीं कर सकता। उनके प्रश्न में एक बिंदु है (एचटीएमएल 5) मैं उत्सुक था अगर यह है सभी फ़ोल्डर नामों के बारे में एक सूची प्राप्त करना संभव है? बस नहीं, लेकिन अंतिम उत्तर नहीं! जावास्क्रिप्ट (जे एस) एक व्याख्या कंप्यूटर प्रोग्रामिंग भाषा है। यह मूल रूप से वेब ब्राउज़रों के हिस्से के रूप में लागू किया गया था ताकि क्लाइंट-साइड स्क्रिप्ट उपयोगकर्ता के साथ इंटरैक्ट कर सकें, ब्राउज़र को नियंत्रित कर सकें, एसिंक्रोनस से संवाद कर सकें, और दस्तावेज़ सामग्री प्रदर्शित हो सके । 3 प्रमुख प्रकार के जावास्क्रिप्ट अर्थात् हैं: क्लाइंट-साइड जावास्क्रिप्ट (सीएसजेएस) - जावास्क्रिप्ट के एक विस्तारित संस्करण जो वेब पृष्ठों की वृद्धि और हेरफेर को सक्षम बनाता है और क्लाइंट ब्राउज़र्स...

geospatial - mongodb geoNear vs near -

It seems that two similar functions work for geological questions - near $ and $ geoNear . According to the Mongo Docks Geographical command offers alternatives to the operator of approximately $. In addition to its $$ functionality, Groundbreaking offers additional diagnostic information. It seems that a superset of near geoNear provides functionality. For example, pass returns only the nearest 100 documents, while geoNear lets you specify the maximum instead of pass geoNear Is there a reason to use ? Is a more efficient one than the other? The efficiency must be the same for either. The main limit of geoNear is that in the form of an order, it can return the results for the maximum document size because all matching documents are returned in a single result document Are there. It is also important to add a distance area in each result document, whether or not it is an issue based on your usage. Near $ $ is a query operator so that the result is larg...

syntax - What does :: do in PostgreSQL? -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब मैंने देखा है :: पोस्टग्रेज़ कोड से जुड़े विभिन्न स्थानों में मैंने नेट पर देखा है उदाहरण के लिए: SELECT '{apple, cherry apple, avocado}' :: पाठ []; ऐसा लगता है कि कुछ प्रकार की कलाकारियां हैं :: पोस्टग्रेज़ में वास्तव में क्या है और इसका उपयोग कब किया जाना चाहिए? मैंने थोड़ा सा गुगलिंग करने की कोशिश की और :: के लिए पोस्टग्रेज़ डॉक्स की खोज की लेकिन कोई अच्छा परिणाम नहीं मिला। मैंने Google पर निम्न खोजों की कोशिश की: पोस्टग्रेस डबल कॉलन पोस्टग्रेज़ :: :: मैंने निम्नलिखित खोजों को पोस्टग्रे डॉक्स खोज बटन में देखा है डबल बृहदान्त्र डबल कॉलन कास्ट :: यह SO पर पूछने के लिए लगभग शर्मनाक था, लेकिन मुझे लगा कि Google भविष्य में अन्य लोगों के लिए यह जवाब उम्मीद करेगा। PostgreSQL दो प्रकार की कंटैक्स को स्वीकार करता है, पोस्टग्रेएसक्यूएल-विशिष्ट मान :: प्रकार और SQL- मानक CAST (मान एएस प्रकार) । इस विशिष्ट मामले में, '{सेब, चेरी सेब, एवोकैडो}': पाठ []; स्ट्रिंग को शाब्दिक {सेब...

mysql - Trying to select all ID's from multiple tables and columns and order by the most matches -

Select all the IDs I have to do, which have the most matches and are listed in the order of the highest hit East: I want to meet Sunday at 9 am and 11 am, 10am at 10am and at 11am and on Tuesday at 9am and then want to sort them by most hits C hit A4 hit B2 First, let's ask a question to massage the data in a few simple ways: Selection ID, 0 AO Dow, 8 hours as, '8 AM' All Selection IDs from the Vivar Sangh, 0 AR Dow, as 9 Hours, All Selection IDs from Sunday Union, 0 AS Dow, 10 Hours as '9 AM', hit as `10 AM` on Sundays All select IDs from the unit, 0 AS Dow, 11 hours as on 11th Sunday, all selected units, 1 AS Dow, 8 hours as 8 hrs, Mandai Union All Selection ID, 1 AS Dow , As 9 hours, 9 AM, as all the selection IDs from Monday Union, 1 AS Dr , All select IDs from Monday Union like '10 AM', all selection IDs from Monday Union, 1 AS Dow, 11 HR, `11 AM 'as all selection IDs from Monday Union, 2 AS Dow, 8 Hours, All selection IDs f...

php - Isolating a specific value from complicated array returned from API call -

I am working with API for language classifier. I make a classifier, add two classes, train them, and then send a string to be classified. The response to the classification call is an array: $ response = $ uclassify-> Categorize ($ big string, $ title); Print_r ($ response); The following string is printed by calling print_r on the response (I've tabbed it and tried to understand it): Array ([0] = & Gt; array ([ID] => classified 12 911363801322 [classification] => Array ([0] => Array ([class] => Cool [P] = & Gt; ** 0.636574 **) [1] = & Gt; array ([class] => uncool [p] => ** 0.363426 **)) [text] =>) The only part of the array is that I am interested in the number (put in bold) I want to remove these two numbers. A print statement to write? Edit: Inappropriate print_r: Array ([0] => Array ([ID] => Classistife 12 911363801322 [classification] => Array ( [0] = & gt; array ([class] = & gt; cool [p] => 0.636574) ...

php - how do you construct an array of arrays in JSON -

If there are many arrays, then they call colors, plants, cars, family each or these arrays equal length 5 items I want to create another array called grouping like The group will contain the project in which group [0] => (Color => Color [0], Plant => Plant [0], Car => Car [0], Family => Family [0]) Group [1] = & gt; (Color => Color [1] Plant => Plant [1], Car => Car [1], Family => Family [1]) Group [2] = & gt; (Color => Color [2], Plant = & gt Plant [2], Car => Car [2], Family = & Family; [2]) Group [3] = & gt; (Color => Color [3], Plant => Plant [3] Car => Car [3], Family => Family [3]) Group [4] = & gt; (Color => color [4], plant => plants [4], car => car [4], family => family [4]) How can I set it to loop In reality, I have 50 items and each has 13 elements and then I would use PHP json_encode to put it in JSON so that I I can move it I have to meet it in the iOS dictionary. I can call...

clock - Vhdl with no clk -

I have a clock in my vhdl code but I do not use it, just my process depends on hand shake When one component is over and out, this output is in the sensitivity list of my FSM and then becomes an input for the next component and of course its output is in the sensitivity list of my FSM (such address When to End the Component Will count) ... and so on. Is this method wrong? It works in simulation and also works in post-simulation simulations, but I get such warnings: Warning: I prevent high violation in relation to CLK; And the warning: I hold low contradiction with respect to the CLK; Is this warning not important or will my code harm my FPG because it is not dependent on one watch? The warning you are getting is a violation of time. You get them because the tools find that your design does not comply with the time restrictions required for internal primitives. For example, look-tables (which is one of the main building blocks inside an FPGA) need to be held for a specific ...

c++ - How to set a variable after a target been made? -

मेरे पास .cc और .proto एक निर्देशिका में फ़ाइलें *। प्रोटोटा फ़ाइलों को .cc और .h फ़ाइलों को उत्पन्न करने के लिए उपयोग किया जाता है। अब मुझे $ चाहिए (एसआरसी) के पास सभी। सीसी फाइलें हैं, जो कि जेनरेट किए गए हैं एसआरसी = $ (वाइल्डकार्ड *। सीसी) ओबीजेएस = $ (पैट्सबस्ट%। सीसी,%। ओ, $ (एसआरसी)) सभी: कैसे? PROTOS = $ (वाइल्डकार्ड * .प्रो) प्रोटोटा $ (ओबीजेएस) प्रोटोटा: $ (प्रॉटोस) प्रोटोक - cpp_out =। $ (PROTOS) संक्षिप्त जवाब: आप नहीं कर सकते सुनिश्चित करें कि कोई भी निष्पादित करने से पहले निष्पादित होने वाले नियमों की सूची निर्धारित की जाती है। बहुत देर उत्तर: आप कर सकते हैं, लेकिन आपको खुद को दूसरी बार रन करना होगा: PROTOS = $ (वाइल्डकार्ड * .प्रो) SRC = $ (वाइल्डकार्ड *। सीसी) ओबीजेएस = $ (पैट्सबस्ट%। सीसी,%। ओ, $ (एसआरसी)) सभी: प्रोटोको $ (मेकिंग) ओब्जेक्ट प्रोटोटा: $ (प्रॉटोस) प्रोटोक - -cpp_out =। $ (PROTOS) objs: $ (ओबीजेएस)

Is there any command line profiling tool for cuda in ubuntu?? (Something like parallel Nsight) -

Can someone tell me about a profiling tool for Quda that can be used on command line in Ubuntu is ?? I am working on SSH to run my program on a remote Linux machine that is safe to Shell client. After the text "itemprop =" text "> If you have a normal Kuda 5 install, you should be available. Try typing nvprof typing at the command prompt to see if it is available and set up but it is not a graphical tool like parallel NSIT. However, if you are connected to a remote machine running a leak machine, and you have a normal CUD5 installed on the remote machine, and you have an X-forwarding (SS- X or SST-Y) you should be able to run remotely. You do not need X to run on a remote machine, but it must be running on your local machine. After joining with X-Forwarding, just type nvvp in the terminal Note that running a visual profileer can be slow due to X-forwarding in this way, so be patient. If you have the option to connect via something like NoMachine NX (or Ma...

javascript - Setting DIV's height automatically when it's lower than some specific value -

I'm using a DIV to wrap the table to provide scrolling as shown here: The list is large, but when the list is small, then it works fine: you can see that "select all" and "clear all" first gets away from the table which is not me needed. I know that the reason is a certain height of the DIV which is 300px. What do I need that the height of DIV should not exceed 300px and if the height of the DIV should be changed automatically if it is less than 300px. So that select all and clear all the buttons just below the table. .tableScroll {height: 300px; Overflow: Auto; } I think you only use maximum-height: 300px You may want to do; height: 300px; Instead of

backbone.js - backbone model toJSON strangely cache itself -

Image
I am still new to the spinal cord: My problem is that it is difficult to explain Model: {ID: xxx, question: [id: "yy", select: [{option id: "aaa"}, ..., {optionId: / p> "Zzz"}}}, ....]} An event method update selection is archived. After the event is triggered, I get two different results with two codes below: window.pkg.Questions.get (this.Id). SelectSetset (selected option); Console.log (window.pkg.Questions.get (this.Id) .Selections.toJSON ()); Console.log (window.pkg.Questions.get (this.Id) .toJSON () selection.); The first log shows the updated model, though it later shows the initial default value. Why is this working? These are two separate copies: There is a selection in your question model, which is called a property called a selection, and a backbone feature, also called selection is. I think that you want to use the selection collection, and will not be in sync with that feature is the original Jason which I think w...

How to use paramatrization in java? -

मेरे पास यह जावा कोड है जो & lt; T & gt; : सार्वजनिक स्थिर वर्ग mySet & lt; T & gt; सेट बढ़ाता है {/ / पैरामीट्रिक बहुरूपता सार्वजनिक अंतिम सूची & lt; T & gt; सेट; // सेट डेटा प्रकार के सार्वजनिक के लिए कन्स्ट्रक्टर को परिभाषित करें & lt; T & gt; MySet (सूची & lt; T & gt; दिया_सेट) {this.set = (सूची & lt; T & gt;) given_set; }} लेकिन मुझे यहां एक त्रुटि मिलती है (list & lt; T & gt;) given_set; । यह काम करना चाहिए क्योंकि मैं इसे अंतिम वैरिएबल सेट के समान बना रहा हूँ, लेकिन यह नहीं है। क्या किसी को भी पता है क्यों? ग्रहण कह रहा है: प्रकार बेमेल: java.util.List से परिवर्तित नहीं किया जा सकता है & lt; T & gt; Java.util.List & lt; T & gt; । आप इसे नहीं बना रहे हैं एक ही प्रकार का। कंस्ट्रक्टर घोषणा के सामने & lt; T & gt; का उपयोग करके, आप नया T को शुरू कर रहे हैं, वर्ग के टी । इसे हटा दो। फिर आप कलाकार को भी निकाल सकते हैं, ऐसा कुछ भी नहीं है।

sql - If staments with php & Mysql -

I need a little bit of your help if statement in PHP, as I am new to it First of all I have this question: $ sqlCmd = "Username by user name. User.user from WHERE user.id = '". $ _GET ['char'] "" 1 border "; And now I have another query visible $ sqlUpdate =" UPDATE user .user SET level = '1' WHERE id = ''. $ _GET ['four']. '' Border1 ''; What I have to do, is something like this: Code> If level> 1 run $ sqlUpdate , then print an error. / P> Thank you! And sorry, if this is a very non-question, then I I'm trying to learn!;) visible $ sqlUpdate = "UPDATE user.user SET level = '1' WHERE id = ''. Mysql_real_escape_string ($ _GET ['char']). '' And level & gt; 1 LIMIT 1 "; Your code is weak for SQL injection, which you need to avoid all requests properly Warning need to avoid get , post and request and a better...

java - check if file is jpg -

I would like to check whether I am reading from a directory the file is a JPG but I just do not want to check the extension. I'm thinking of an option to read the header. I have done some research and I want to use imageIO.read I have seen an example String directory = "/ directory"; Buffed image img = faucet; Try {img = ImageIO.read (new file (directory)); } Hold (IOException e) {// it is not a JPG file} I'm not sure where to go from here, it takes it in the complete directory ... but I Does the jpg file in the directory require that someone can tell me what is wrong in my code or what additional needs to be made? Thank you! You can read the first bytes stored in the buffer image. This will give you the exact file type For example GIF GIF87a or GIF89a JPEG image files begin with FF D8 and end with FF D9 Try it Boolean status = isJPEG (new file ("C: \\ user \\ public \\ pictures \\ Sample image \\ crissamium.jpg ")); System....

sql - Output Sum of some column in week intervals throughout a year, week dates consistent with day -

I need some help because I'm stuck. It is using SQL and ColdFusion. Basically I have a table that meets certain tickets in which they mark the entire date. This table is for example district and area, which is used in Group BY. That's why I have to look at every ticket that was done every week of the year, for example the user selects to run the report. I will list a little bit of SQL at this time. SAM (case when DATEPART (ww, closing date) SELECT SUM (when case pain (ww, closing date) = 1 THEN 1 ELSE 0 END) [January 1-7] ) As of [January 8-14], as SM (case when DATEPART (ww, closing date) = 3 THEN 1 ELSE 0 END) [January 15-21], SM ( As the case when DATEPART (ww, closing date) = 4 THEN 1 ELSE 0 END) [January 22-31] SM (case when DATEPART (ww, closing date) = 5 THEN 1 ELSE 0 END) [February 1-7], SUM (case when DATEPART (ww, closing date) = 6 THEN 1 ELSE 0 END [February 8-14], SM (case when DATEPAR T (ww, closing date) = 7 THEN 1 ELSE 0 END as [February 15-21], SM (case w...

How to pass value from querystring to action class in struts2? -

I want to pass the ID in my action class from the query string, and want to use that ID in my action class Am I tried: & lt; Li & gt; & Lt; A href = "Next page data action? RecordID = sessionMap.get (record id [0])" & gt; Next & lt; / A & gt; & Lt; / Li & gt; But I'm getting an exception I have an addred list for sessionMap and want to withdraw that value from session valueMap to queryString parameter. Can anyone provide solutions to this problem? If you keep in session then there is no need to send again as the request parameter. You can directly access that session variable in the action class.

eclipse won't overwrite files in the save location -

is due to an assignment, I'm trying to save the files Skeletal files are coded on, and then move them to their desktops, every time I save or save them all, click Yes to click them, I have been saved in that project, I have them Remove from the computer, and put them on the desktop, and Only the skeleton that have been put on them which I have no work, which was given to us for the original work. Any thoughts? That's because you are a fool and are looking into wrong workspace.

iphone - "Do Not Disturb" feature in iOS 6 How to implement? -

I want to implement the "dot no distribute" feature in iOS 6. The first question: is any framework or API apples to control them via code? After a lot of googling I found an application on the App Store "Call Bliss" which provides this functionality and calls, SMS and MMS. Can anyone explain how this app works? Or is there any other work to know and implement this feature in iOS? Thanks in advance ... By reading the details of call bliss, it Looks quite simple in how exactly works. 1) Do not worry every time should be enabled. Not set, not locked, but at all times 2) For this you need to set up a contact group for the exception of not enjoying the "fun exception". This means that the app needs access to your address book. From there, it may be wise to believe that it manages the contacts in the "joy exception" contact group based on the parameters you define in the application. It connects and removes people involved in those ...

Git reset not working -

I made a commitment, pulled and mixed some changes, and then made another commit. When I first wanted to go back to the commitment, I ran the command git reset - hard & lt; Sha hash & gt; While the "head was now a response on ", my code looks like I did before the order was run, usually before, before I What did, but it seems that something is not working properly additional information when I run git status It says: P> The app / assets / image / .DS_Store.orig is untracked and I can add it. According to GIT Rephael, I pulled the commit before making 1hash (which I consider "before merge"). One Shash hash 2 for the bridge (which was not shown git log ). When I dig hash1 and hash2, I can see the changes made by me and redefine my original code with this. Even so, it looks very strange if I try to do git reset on any of these, then I can not get my code before I merge. I'm sure the sha1 value placed in 'GIT reset - ...

ios - Get wrong time when adding an event to default calendar in iPhone -

Now I'm working on the calendar application in the iPhone. I'm trying to add an event to the default calendar in iPhone. An incident has been successfully completed in this incident. But I can not add an event to the proper start time The event's start date is quite right, but the time in the default calendar of the iPhone is different. I used the following code. Please help me .. NSLog (@ "Start Label:% @", startLabel.text); // 2013-03-28 12:03:41 PM NSLog (@ "end label is:% @", endLabel.text); // 2013-03-28 01: 03: 41 PM NSDF format * Data format = [[NSDet formatted ALLO] INIT]; [DateFormat setDateFormat: @ "yyyy-MM-dd hh: mm: ss a"]; [DateFormat set time zone: [NSTimeZone timezone name: @ "GMT"]]; NSLog (@ "Description:% @", [dateFormat description]); NSDate * sDate = [dateFormat dateFromString: startLabel.text]; NSDate * eDate = [dateFormat dateFromString: endLabel.text]; NSLog (@ "Start Date:% @", SDT...

styles - About css and !important tag -

What can anyone do in reality? Is Important in CSS Styles? When I cite the site on the other sometimes they use it, but why? I really do not value! Important "Job": D Thank you ... ! Important is a way to make your CSS cascade , but you also have rules that are always the most important. There is a rule in which ! Important The property will always be applied no matter why this rule appears in the CSS document. So if you want to make sure If any asset is always applied, you will add the tag to ! Important property, so to make the paragraph text always red, you will type in the example above: p {color: # ff0000! Important;} {Color: # 000000;} Using Important in your CSS is usually You mean to respect devs for being narcissistic & selfish or lazy ... ! Important is a part of CSS1.

networking - Azure Virtual Networks - Supplying a non-existant DNS server -

Image
I am busy creating a virtual network so that my blue VM can communicate with each other. I currently need to specify a DNS server address on screen (screen shot below). At this time I am unsure whether I would like to maintain the DNS server to resolve the name or if I only specify the IP address. Question: Is there a damn DNS server address that can not exist here? Does this mean that I use the IP address given on the screen given below to the DNS server at a later level Can I apply thanks After creating a virtual network, you can only subnet Can not add, and can not change the DNS server without deleting the virtual network Therefore, if you want to keep the virtual network, make sure that you enter some DNS server addresses. You may want to consider two of your personal IP addresses (VMs that you spin in AZURE) and for public IP address, you should consider adding at least the public address DNS. I used Google at 8.8.8.8. You should use the named addre...

transform - XML transformation -

मेरे पास XML शीट है: & lt;? Xml संस्करण = '1.0' एन्कोडिंग = 'विंडोज़ -1256' & gt; & LT; टीसी & gt; & LT; टीटी & gt; & LT; एसडी & gt; 112 & lt; / एसडी & gt; & Lt; sN & gt; गुड डे & lt; / sN & gt; & LT; आईडी & gt; 468,629 & lt; / आईडी & gt; & Lt; / टीटी & gt; & Lt; / टीसी & gt; मैं इसे नीचे कन्वर्ट करना चाहता हूं: & lt; टाडा स्कीमा विर्सन = "2" xmlns: जीई = "एसटी" xmlns: gl = " टीएस "xmlns: जीए =" एसजी "& gt; & Lt; ge: test internalID = "90566" dateAdded = "2013-03-19T11: 49: 28" अंतिम एडिट = "2013-03- 20T16: 26: 49" & gt; & Lt; ge: टीएन = "विश्व" internalID = "161634" / & gt; & Lt; / जीई: परीक्षण & gt; & Lt; / टाडा & gt; मैंने उन्हें दोनों को छोटा कर दिया है, क्योंकि वे बहुत लंबी फाइल हैं लेकिन यह विचार पहले एक्सएमएल से दूसरे एक्सएमएल में कन...

c# - Bind to Existing Process -

I'm trying to open SQL Server Management Studio, programmatically, I started the process to open SQL is used by the server and the start () method to open the process; using System.Diagnostics; Process Sql = New Process (); String Strawfill 1 = "Example 1 SQL"; String Strings 2 = "Example 2.sql"; Sql.StartInfo.FileName = "Ssms.exe"; // SQL Server Process Sql.StartInfo.Arguments = strfile1; Sql.Start (); Sql.StartInfo.Arguments = strfile2; Sql.Start (); This code opens up two examples of SQL Server, but I want to check if the process is already running and reuse the existing process and in the same process example2.sql Opens. How could this be done? You can check that a process is running by name (you need to know the name of your SSMS Is the process) in this way: process [] ProcName = process GetProcessesByName ("Enter name here"); If (procName.Length & gt; = 0) {// you are already running} but I do not think you ar...

c# - Efficiency for Path.GetFileName storing in a string or reusing method call -

I'm very curious to know what would be the best practice / efficient method. I have a way where I have an OpenFileDialog where I have paths in 5 places inside the method. GetFileName (openFileDialog.FileName) to be used. Which is the best way: either I call GetFileName or save it in string variable and then use that string variable? "+ + Path.GetFileName (openFileDialog.FileName) +" "string fileName = path.get filename (openFileDialog.FileName);" + + filename + "" Other responses already mentioned before considering the readability and maintenance, in the performance of this small contract string storage option (slightly ) Will display profit void Main () {string p = @ "d: \ temp \ file.txt"; string result; stopwatch SW = new stopwatch (); sw.Start () ; (Int i = 0; I & lt; 100000; i ++) {Results = "" + PathgateFileName (P) + "";} Sw.Stop (); console.witline ("PathgateFilename:" + sw.Elapsed.To...

python - Crop Function Jython JES -

Image
Hi trying to create a crop function for the Hi-Geeton environment, what the students have done to me so far. I am also trying to explain how to shape the canvas will raise the size all new pixels. Any help deaf crop (pic, startX, endx, startY, endY): canvas = makeEmptyPicture (source 500 for source, startx, endX) 800): Source in Source (startY, endY): color = getColor (getPixel (pic, sourceX, sourceY)) setColor (GetPixel (canvas, startx, start, color) startY = startY + 1 startX = startX + 1 show ( Canvas) Try it out: Note: The resulting canvas size can be obtained from (AndX - StartX) X (ANDY - StartAvai) 0) and \ (Endx & Lt; GetWidth (pic)) and (endY & lt; GetHeight (pic)): # Create a canvas with canvas of the right size = Iapital Picture (AndX - StartX, Endy - Startwave) # Source Xx (StartX, Endx ) Browse the interesting part: source in the source (Start, end): color = getColor (getPixel (pic, sourceX, sourceY)) write # pixels, start with # 0 (= startX (y...

Importing csv file in mysql database -

I have a CSV file with 8 columns. When I am importing the CSV file to a MySQL database, it is ignoring the second column and changing the data from the left to the other columns, please help. I think the problem is with CSV. Some CSV files have been successfully uploaded as file, how can I fix it? My query is to store this CSV file in the database: Load data INFILE '$ file_name' in '$ file_name' defined in the tablet import field '| ' LINES TERMINATED BY '\ N' IGNORE 1 LINES (@ srno, @custom_name, @ date, @ mobileo, @ city, @ state, @ type, @tailor) SET customer_name = @ customer_name, date = @ date, mobno = @ mobno , City = @ city, state = @ state, type = @ type, tellyer = @tailor, datetime = '$ datetime' This code worked for me to check it from the local database package Example_Import; Import java.sql *; Import java.text.ParseException; Import java.text.SimpleDateFormat; Import java.io * *; Import java.lang.String; Import j...

php - print result before print a function? -

I print a text line in each step and it adds up to 1 marker. Ex: write function () {$ score = 0; Foreach (Array $ arr as $) {Echo "Line 1"; $ Score ++; }} I want to print the first $ score and then want the text lines in the page where I will call that function. How do I print before the $ score function Write () {$ score = 0; $ Resonance = ''; Foreach (Array $ $ as Array) {Echo Echo $ = "Line1"; $ Score ++; } $ Score echo; Echo $ echo; }

c# - How to create an instance of class that takes interface as its constructor parameter using reflection? -

ऑब्जेक्ट [] parame = new object [1]; पैरामीटर [0] = परम 1; ConstructorInfo [] info = type.GetConstructors (); जानकारी [0]। इन्वोक (पैरामे); Obj = Activator.CreateInstance (प्रकार, पैरामीटर); यह मुझे ctor कहने में त्रुटि देता है क्योंकि ctor इंटरफ़ेस एक पैरामीटर के रूप में नहीं लेता है अब इस वस्तु का एक उदाहरण कैसे बना सकता है? सार्वजनिक नियंत्रक (ICustomInterface कस्टम) {_custom = custom; } मैंने एक ही परम के साथ ctor को लागू करने की कोशिश की और कहा कि इस वर्ग का उद्देश्य इंटरफ़ेस प्रकार में परिवर्तित नहीं किया जा सकता। यद्यपि यह वर्ग इस इंटरफ़ेस को लागू करता है। अपने इंटरफ़ेस का असंगत होने के लिए, ताकि आप उदाहरण बना सकें, कि इस तरह से इंटरफ़ेस लागू होता है: वर्ग कस्टम क्लास: ICustomInterface {} आप बस सक्रियक को प्री> var obj = Activator.CreateInstance (टाइपफ (नियंत्रक), नया कस्टम क्लास ()); यह Contoller का एक सही उदाहरण वापस करेगा, साथ नया कस्टम क्लास () कस्टर्टर तर्क के रूप में पारित किया जा रहा है

ruby - Setting Sinatra template options works locally, broken on Heroku -

My Sinatra Web site uses a valid ghetto approach to switch between two languages, which can be used on my local machine Works perfectly, but not everyone. My app.rb is as follows: requires 'sinatra' to set '/': erb,: views = & Gt; Settings.views + "/ en" erb: index, layout = & gt; False ,: View = & gt; Setting.views end get '/ tr': erb ,: views = & gt; Retrieve settings.views + "/ tr" ('/ home') Finally set '/ en': erb ,: views = & gt; Retrieve settings.views + "/ n" ('/ Home') '/ Home': 'Home' for 'Android' and 'Make Products': Product End ... When I click on the link to the / en and / tr URLs, then type me correctly / home link, but there is no change in the consideration folder. My gems are similar versions in both environments: Rack (1.4.1) Rack-Protection (1.2.0) Tilting (1.3.3) Papara (1.3. 3) Bundler (1.3.2) Help, please....

javascript - How to create a modal popup to login when the user is not authenticated? -

I have this view that displays a table of data: @if (Request IsAuthenticated) {& lt; Fieldet id = "detailPrix" & gt; & Lt; Legend & gt; Details Prix & lt; / Legend & gt; & Lt; Div class = "scroll container" & gt; & Lt; Div class = "scrollingArea" & gt; & Lt; Table class = "screw screw" & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; Carburant & lt; / Th & gt; & Lt; Th & gt; Prix ​​& lt; / Th & gt; & Lt; Th & gt; Date d 'invalid & lt; / Th & gt; & Lt; Th & gt; Mettar ¥ and lieutenant; & Lt; / TR & gt; & Lt; / Thead & gt; @for (int index = 0; index & lt; Model.carburants.Count; index ++) {& lt; Tbody & gt; & Lt; TR & gt; & Lt; TD & gt; @html Display name (model carburts [index] .dataautostring ()) & lt; / Td> & Lt; TD & gt; @ Html.DisplayName (Model.prixCa...

asp.net - C# Sending an object through HttpClient to a Web API -

I have a WindowsForm application and I have a list & lt; & Gt; Want to send For the web API Here is my code in the window code: Ury uri = new ury ("http: // localhost / test / api / v1 / name / Testcontroller / "); HTTP Client Client = New HTTP Client (); Customer Base Academy = Yuri; Var MediaType = New MediaTypeHeaderValue ("App / JS"); Var jsonFormatter = New JsonMediaTypeFormatter (); HttpContent content = new object communication & lt; List & amp;; Termbasefile & gt; & Gt; (Termbase List, JasonFormer); HttpResponseMessage responseMessage = client.PostAsync (Yuri, content) .Result; What should I put in the controller to get the list? You need to implement a post action, Type, or more specifically an object, such an object which possesses similar properties such as public-class termbase file postdates {// related properties go here} Public Class Test Controller: API Controller {PUBLIC HTTPPRESS PacesMsg Trust (list a...

How to escape "\" from JSON string in Titanium? -

I have written an original Android module, where I'm returning Jason String to the Javascript layer. But in the Javascript layer, I'm getting this Jason String, which adds "\" to everyone. How to Avoid "\" from this "j" string. It looks like your json is not a "real JSON object" , But just a string to explain why " symbols are saved. Try using JSON.parse () in your Javascript. var my_json_string = "{\" my_key \ ": \" the_value \ "}"; var my_json_object = JSON.parse (my_json_string); // something should be present such as / / object {my_key: "the_value "}

fortran90 - reading a variable into an open file -

I'm very new to Fortran and Stack Overflow .. I want to use Fortran for an assignment but I stuck with it. Run time errors .. Any help would be greatly appreciated I am trying to read two variables in a file that I have opened. This is a sample code given by my professor, but it shows run time error Please help sub-root input_data any real * 8a, b open (unit = 5, file (5, *) A, B pass (5) Return End This shows the runtime error on the read line. I assume that you are reading to file if so, your Your position in the open statement is not known "Old" like: open (unit = 5, file = 'inputdata.dat', condition = 'old') The situation will be "unknown" if the file does not exist, then try to create a file, and then try it since, since it was created now, there is nothing in that file, and therefore, you get an error. The status "old" tells you that the file does not exist, if you get an error the file ... does not exist :)...

Erlang appending double quotes to a string -

When adding a double quote with a string, I have a problem that is append / "no"? Flags = "1223", Flags = "1", lists: level (io_lib: format ("{xmlelement, \" distributionstats \ ", [{\" messageid \ ", \ "~ S \"}, {\ "Status \", \ "~ s \"}], []} ", [id, flag])). Your question is not very clear, but I have given the code given by you , And I think you are angry because the result string \ " is displayed with " instead of a single character. 1> ID = "1223" "1223" 2 & gt; Flag = "1" "1" 3> List: Flaton (io_lib: format ("{xmlelement, \" deliverystatus \ ", [{" messageid \ ", \" ~ s \ "}, {\" status \ ", \" ~ s \ "}], ["}, [Id, flag])." {Xmlelement, "DeliveryStatus \", [{\ "messageid \", \ "1223 \"}, {\ "status \", \ "1 ...

java - How to parse String "06\24\1989" into Date 06/24/1989 format using SimpleDateFormat -

How to parse the string "06 \ 24 \ 1989" (if the user has entered this way) In format (MM / DD / YYYY) using SimpleDateFormat. string to use only SimpleDateFormat > Remember to convert a date and another to it in the desired format string Remember to use double backslash in string literals ( \ Is an escape character) SimpleDateFormat sdfParse = New SimpleDateFormat ("MM \\ dd \\ yyyy"); Simple Data Format sdfFormat = New SimpleDetermat ("MM / DD / Yay"); Try {date date = sdfParse.parse ("09 \\ 24 \\ 1989"); Println (sdfFormat.format (date)); // prints 09/24/1989} catches (parsection e) {System.out.println ("invalid date"); } Of course, you can only change all the backslashes to forward slash, and try to parse it with new SimpleDateFormat ("MM / dd / yyyy") can do; If you want to validate that this is a valid date. string input = "09 \\ 24 \\ 1989". ("\", "/"); Simp...

Maven plugin in Eclipse can't find hibernate version over 3.6.0 -

When I try to find Hibernate 4.1.0 with eclipse pom editor, I can only get version 3.6.0 Is, I'm looking for & Gt; 4.0.0 Rent is my pom.xml file: & lt; Model Edition & gt; 4.0.0 & lt; / ModelVersion & gt; & Lt; Group & gt; Dk.janth.simpel-Maven spring & lt; / Group & gt; & Lt; ArtifactId & gt; Simplel-Maven spring-project & lt; / ArtifactId> & Lt; Version & gt; 0.0.1-snapshot and lt; / Edition & gt; & Lt; Packaging & gt; War & lt; / Packaging & gt; & Lt; Name & gt; Simple Maven Spring Project & lt; / Name & gt; & Lt; Construction & gt; & Lt; Plugins & gt; & Lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven-compliant plugin & lt; / ArtifactId> & Lt; Version & gt; 3.0 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; Source & gt; 1.7 ...

haskell - Is using mapM/sequence considered good practice? -

निम्नलिखित उदाहरण पर विचार करें: safeMapM f xs = safeMapM 'xs [] जहां safeMapM' [] Acc = वापसी $ रिवर्स एसीसी सुरक्षितमैप '(एक्स: एक्सएस) एसीसी = यू व एलटी; - एफएक्स सुरक्षितमैप एम' एक्सएस (वाई: एसी) मैप एम रिटर्न बहुचर्चित - बड़ी सूचियों पर स्थान अतिप्रवाह स्टैक का कारण है सुरक्षितमैप रिटर्न मोस्टेलिस्ट - लगता है बड़ी सुर्खियों पर mapM का उपयोग कर एक स्टैक स्पेस अतिप्रवाह होता है जबकि सुरक्षितमैप ठीक काम करता है (जीएचसी 7.6.1 का उपयोग करते हुए) -O2 )। हालांकि मुझे हास्केल मानक पुस्तकालयों में safeMapM के समान एक फ़ंक्शन नहीं मिल पा रहा था। क्या यह अभी भी mapM (या क्या उस बात के लिए अनुक्रम )? अगर ऐसा है, तो स्टैक स्पेस ओवरफ्लो के खतरे के बावजूद यह अच्छा अभ्यास क्यों माना जाता है? यदि आप वैकल्पिक रूप से उपयोग करने का सुझाव नहीं देते हैं? निकलस बी के रूप में, mapM की शब्दावली एक प्रभावशाली दायां गुना , और यह एक फ़्लिप संस्करण की तुलना में अधिक मामलों में सफलतापूर्वक समाप्त हो जाता है। सामान्य में, mapM अधिक समझ में आता है, क्योंकि यह दुर्लभ ह...

PHP - Split the string "example.jpg" into two variables, $name (example) and $format (.jpg) -

I would like to name the image and divide it into two different strings that are related to its actual name and its file format . For example, say for example: example.jpg I have to show an output like this: eca $ name; // Output "example" $ format; // outputs ".jpg" What is the best way to use PHP? Any advice, suggestions or input will be greatly appreciated! I know that this is going to get the RTM responses, but if you do not know how you really want to start, then this is not an easy task to find the right thing That's why I think the "best" solution that I think is more of this work. & lt; Php $ Path_parts = pathinfo ('example.jpg'); $ Path_parts ['dirname'] echo, "\ n"; Echo $ path_parse ['basename'], "\ n"; Replace $ Path_parts ['Extension'], "\ n"; $ Path_parts ['filename'], "\ n"; // PHP 5.2.0? & Gt; Ref: