Posts

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.