Posts

Showing posts from April, 2011

jQuery global variable with getScript -

This object is decalred in foo.js, and has been modified in bar.js. And when I getScript, I tried to get results. foo.js P> / * // It works fine, but I want to decalre it inside jQuery var myObject = {str: "hello world", num: "123"}; * / $ (Function () {// This makes my object global variable y myObject = {str: "Hello World", num: "123"}; Warning (myObject.str + "+ myObject.num); $ ; .getScript ("bar.js", function () {warning (myObject.str + "+ myObject.num);});}); bar.js $ (function () {myObject = {str: "new string", number: " 999 "};}); Since you have declared a variable within a function, it is local for functions . What you can do is declare the variable out, but assign values ​​inside jQuery's ready handler foo.js / * // This works fine, but I want to decalre it within jQuery var myObject = {str: "hello world", num: "123"}; * / Var myObject; ...

ios7 - How to add UIImageView (UIActivityIndicatorForSDWebImage) in SDWebImage downloader? -

I am using SDWebImage to download the image. I want to show an indicator while downloading the image. For this I got a square UIImageView ( UIActivityIndicatorForSDWebImage ); I have found it: Anybody please help me how do I add it to my project? I'm not using cocoapod to help Kripa Marie. You can copy .h and .m in your project as stated in the document In the first error, the UIImageView + WebCap category was not found. Are you sure you imported SDWebImage? Apart from the other screenshots, it seems that SDWebImageCompletionBlock is not found. I think it was introduced in version 3.7 of SDWebImage, so you may have an older version

avr - floating point operations anomaly -

I'm using temperature at temp sensor tmp36 using atmega2560. After reading the temperature sensor digital values ​​and converting two etemeda into readable form in 2560 microcontrollers, I get different answers. Why do I get answers like this? ? The code snippet is present below: Float temp; // global variable {unsigned long temp_volt; Unsigned four temp_h, temp_l; Unsigned integer temp_buf; Temp_l = ADCL; Temp_h = ADCH; Temp_buf = ((int) temp_h & lt; & lt; 8) | Temp_l; Temp_volt = (((unsigned long) temp_buf * 256 * 10) / 1023) - 993; // Decrease the offset giant tempo = ((float) temp_devault * 1000/1014 * 100/1996) / 10; // gain prints ("temp_buf:% d, temp_volt:% d, temp:% 0.2f \ r \ n", temp_buf, temp_volt, temp); } I have an ATMEGA2560 answer: temp_buf: 55, temp_volt: 447, temp: 22.4 What's on another ATMEGA2560 Found: temp_buf: 53, temp_volt: -861, temp: 0.00 For this reason I made this adjustment temp_volt = (( (Unsigned long) temp_bu...

multithreading - Can I accelerate python file method `read()` by parallelism? -

I have many files to read (300 ~ 500), and I want to speed up this task. is the illustration: import import import from import import _io filelist = map (open, OSListDipper) if __name__ == '__main__': with pool (): Pool: A = pool.map (_io.TextIowrapper.read, filelist) Of course, I got an error: type ERROR: Can not serialize '_IO.TextIowrapper' object The question is: Can I speed up the I / O process with equality? if so, how? Update findings: Now I have found a path of equality and my code has been tested: I used 22 items, total 63.2 Import from the multiprocessex import Import import import _Of my_read (file_name): with open (file_name) f: return f.read () def mul (): in the form of pool (form of pool In): A = pool.map (my_read, os.listdir ()) def single (): a = [] for i in os.listdir (): open (i) as f: r = f.read () A. Unfortunately, single () costs 0.4s while the is Mul () cost 0.8. Update 1: Some people said that this is an IO-...

facebook javascript v2.0 -

Facebook Javascript v2.0 app notifies specific user IDs But what if any old user has a Uninstalled the application and then changed that application after the version of the application? Will they have the new userid ? He will get the same ID, so that you can still identify the returning users. I tested it with an app to make sure: Authorize user, call / me, delete the app, authorize user again, call me / me & gt; Same id EDIT: We have only discussed this in another thread: It seems that Scoped ID can change if the user has unauthorized your app and long Authorized, but you have to delete the user data anyway, if the user does not use the app for a long time - data privacy and accessories

objective c - Sort the Main NSArray using the SubArray key value pair -

I want to sort my main array based on first_name in swap self.contacts The code that is used to sort the array - (zero) Sort {NSSortDescriptor * sdName = [[NSSortDescriptor alloc] InitWithKey: @ "first_name" ascending: yes]; Self.contacts = [NSMutableArray arrayWithArray: [Contacted with your own word descriptor: [NSArray arrayWithObjects: sdName, zero]]]; } MyData self.contacts = ({contact = {"first_name" = "test r";}; "Last_met" = ({"last_met_date" = "2014-10-09";});}, {contact = {"first_name" = "test of";}; "last_met" = ({"last_met_date" = "2014 -10-09 ";}};}) Try with this sort descriptor Do: Descriptor = [[NSSSort Descriptor Alok] initWithKey: @ "contact.first_name" ascending: Yes]; parameter key is actually a key path , and nsDictionary is compliant as you like stuff You can write: [Contact [0] valueForKeyPath: @ "conta...

.htaccess - multiple parameters friendly URL rewriteRule -

I need help on rewriteRule for several parameters: sitename.com/ Project .php? To become T = value1 and a = value2 sitename.com/project/value2/value1 But in any case I was unable to solve the problem and 500 internal server error The page shown to my HTAC file: DirectoryIndex index .php option -index & lt; Files * htaccess & gt; From all & lt; / Files & gt; & Lt; Files page & gt; Forteotype application / X-HPD-PHP & lt; / Files & gt; & Lt; IfModule mod_rewrite.c & gt; Option + SymLinksIfOwnerMatch RewriteEngine% {REQUEST_FILENAME} on rewriting! -d Rewrite Convert% {REQUEST_FILENAME}! -f #resolve .php Extension Extension Rewrite for php URL% {REQUEST_FILENAME}. Php -f rewrite rule ^ (. *) $ $ 1.php [L] RRRRRRRR ^ CP / edit-agent /([^/\.]+)/?$ cp / edit-agent.php? Name = $ 1 [L] Rev. Raul ^ ([^ /.] +) /? $ Agent.php? Name = $ 1 [L] Example # / 123 / sys RewriteRule Project / ([0- 9] +) / ([^ / \. +] /? #Crew to handle $ Proje...

angularjs - Disable button in angular js -

I have "save set" in my page that has 2 buttons; "Load set" in the "Set the save" button in the NG-disabled = HashView Disable () ...... Controller ('saveLoadSetToolbarBtn', ['$ scope', '$ modal ',' Attribute ', ($ Scope.loadTuneSet = function () {$ modal.open ({templateUrl:' loadSetDlg.html ', administrator:' loadSetCtrl '});}; $ scope.isSaveDisabled = function () {return Properties! Modified.get ();} ....... When I click on Load Set, it will open a popup and they will have a OK button. However, I should disable the "Save Set" button OK button, .controller ('loadSetCtrl', ['$ scope', '$ modalInstance', 'Normal Ta service ', function ($ radius, $ modalInstance, GeneralDataService) {$ scope.items = []; $ scope.selectedSet = undefined; $ scope.ok = function () {// Some arguments are closeDialog; $ ModalInstance .close ();} If there is any price change ...

python - Writing to a uWSGI unix socket -

I have a Python wsgi app that is served by UWSGI behind NGinx. NGinx listens on the network and requests the UWSGI Unix Socket located in /tmp/uwsgi.socket . Now, I'm trying to emulate what I'm guessing NGinx while talking to this socket I have tried to use the following Python: import socket uwsgi_socket_address = "/tmp/uwsgi.sock" socket_client = socket.socket (socket.AF_UNIX, socket.SOCK_STREAM) socket_client.connect (uwsgi_socket_address)) Msg = "GET / index HTTP / 1.1 \ r \ N "socket_client.sendall (msg) I get this error in return / usr / lib / python2.7 / socket.pyc meth (Name, self, * args) 222 223 DEF Math (name, self, * R GSA): - & gt; 224 Returns Getattr (self._sock, name) (* Args) for 225 226 in _socketmethods _m: error: [Errno 32] broken pipe 1) I also try to possible Is that socket and with UWGGI? If so, then what is missing to do this work? 2) Is there a Python utility that can help me in preparing HTTP requests of text...

python - Pandas tshift slow in groups -

Using panda tshift is awesome It's very fast! df = pd.DataFrame (index = PDAdit_Range (pd.datetime (1970,1,1), pd.datetime (19702,1)) df ['data'] = .5% Timed df.sum () # 10000 loops, 3: 162 μs per loop% timeit df.tshift (-1) # 1000 loops best, 3: 307 micron per loop # x2 slow But when I do group after tshift , it makes it very slow: Df = pd.DataFrame (index = Pd.date_range (pd.datetime (1970,1,1), pd.datetime (19702,1)) df ['data'] = .5 df ['A'] = randink (0,2, lane (df .index)% timeit df.groupby ('a'). Sum () # 100 loops, best 3: 2.72 ms per loop% ti Meit df.groupby ('a'). Hole (-1) # 10 loops, best 3: 16 loop per MSS # x6 slow! Why grouping at tshift Update: My actual use case is close to the code given below, I think the slow multiplier The size depends on the number of the group. n_a = 50 n_B = 5 index = pd.MultiIndex.from_product ([arange (n_A), arange (n_B), pd.date_range (pd. Dat_range (pd.datetime (1975,1,...

jQuery - How to get height from child of class -

मैं 2 div तत्वों के अंदर एक और पृष्ठ बना रहा हूं: & lt; div id = "id" वर्ग = "वर्ग-नाम" & gt; & Lt; div class = "child-1" & gt; & Lt; / div & gt; & Lt; div class = "child-2" & gt; & Lt; / div & gt; & Lt; / div & gt; मैं यह कोशिश कर रहा हूँ jQuery लेकिन यह काम नहीं कर रहा है: $ (window) .load (function () {$ ('। Class-name ') .ईच (फ़ंक्शन () {var height = $ (this)। $ ('। Child-1 ') ऊँचाई (); $ (यह)। $ ('। Child-2 ')। सीएसएस (' शीर्ष ', -ऊंचाई); }); }); वर्ग के नामों के बारे में चिंता न करें, मैंने यहां गुप्त संदेश का उपयोग किया है jQuery के या विधियों का उपयोग करें: var height = $ (this) .find ('। Child-1')। ऊंचाई (); $ (यह) .फिन्ड ('। बाल-2')। सीएसएस ('शीर्ष', हैइट); या: var ऊंचाई = $ (यह)। बच्चे ('। Child-1')। ऊंचाई (); $ (यह)। बच्चे ('। बाल-2')। सीएसएस ('शीर्ष', हैइट);

Rails - creating object using nested restful routes -

@shift_requirement belongs_to @reckoner - और मेरे मार्गों में संसाधन: गणनाकर्ता संसाधन करते हैं: Shift_requirements अंत /reckoners/show.html.erb में मेरे पास & lt;% = link_to 'एक बदलाव जोड़ें', [: नया, @ रिकॉर्डर, @shift_requirement]% & gt; ... लेकिन मुझे नए @शेफ्ट_रेक्वाइंट की बजाय मुझे एक नए @ रेकॉन्चर मिल रहा है - मैं कहाँ जा रहा हूं? आपको ये होना चाहिए: & lt;% = link_to 'एक बदलाव जोड़ें', [: नया, @ रेकॉन्नेर, : Shift_requirement]% & gt;

How to check the file string path is valid in java -

I am starting Java and I want to check if the string path available to the user is valid or not , For example if the path exists, if it does not exist and the file is not empty and etc. How can I do this? Private static final string FILE_PATH = "com.var.file.path"; String file_path = System.getProperty (FILE_PATH, DEFAULT_FILE_PATH); A boolean has been created in the file class that will check it for you. please: if (new file (file_path) .exists ()) {// Do Stuff} else {System.err.println ("Error:" + File_path + "does not exist."); // or whatever other output stream you want to use}

php - creating multiple onetoMany relations in Sumfony 2.5 -

I'm really new to Symphony so that I can apologize in advanced if it looks stupid and I really appreciate it I am someone to remove my understanding. I am studying and while reading, I thought why not make Dummy blog app to practice. The dummy blog app that I'm working on is very easy, just three tables and its strong> comments (where comments are for posting) its unit unit / comments. Php Category (where post categories go) its unit unit / category.php. I am working to save, show, update, delete all posts / categories / comments. What I am working after appearing on the blog, its range appears as a number (category id), so I was trying to link the post table with category table Question 1 , since the post is linked to the comment table and I need to link the same table of posts with the category table. We will call it the Entity / Post.php inside the class {/ ** * @ORM \ O neToMany (target mapped Antiti = "comments" = "...

java - Inserting a node in BST -

I am trying to insert nodes in my custom BST. For the first time called the insertData method, the new node is inserted correctly as the root. The problem occurs in second and subsequent calls. Below is my code: 1. node class = package ishan.trees.tree; Class node comparative & lt; Node & gt; {Private entity data; Public int getData () {return data; } Public Zero Set Data (Int Data) {this.data = data; } Public node getLeftChild () {return child left; } Public Zero set lift shield (node ​​left child) {this.leftChild = leftChild; } Public node getRightChild () {returns rightChild; } Public Zero Setwrights (Node RightChild) {this.rightChild = rightChild; } Private node leftChild; Private node daimbild; Public node (int data, node left child, node child right) {this.data = data; This.leftChild = leftChild; This.rightChild = rightChild; } To compare override public int (node ​​o) {if (o.getData ()> gt; this.data) return -1; If (o.getdata () tree class = package i...

c# - Visual studio doesn't support specific csproj file -

Image
When I try to open my project's solution file, I am getting this error is a solution file 2012 ( Using Notepad). If I click OK I do, the solution opens in addition to a CSPOject which does not load. I get the Migration Report in the .htm file that will be upgraded, for which there is a failed error for the failed project. Error: This project type is not found on which it was found. Please try this link for more information: Does the upgrade report mean that it is a project from the previous version of a Visual Studio? This view does not open even in Studio 2010. Anyway, it says that it does not support specific project type in that specific project file. This means that either the your project is not what you claim, or you are trying to create it on another machine used to make it a project. Various elements in a .csproj file to determine its project type. Look and this is how it compiles your project, which properties tab displays, which context men...

sql - The multi-part identifier could not be bound. Any solution -

When I run down the query, I get an error: multi-part not bound identifier "Karmcharikmel" Could have been. [Employee] [dbro]. [Staff]. [Employee] SET employee. Mail = empad.mail [dbistore] [DBO]. [Employee] AS employee (select employee, IID, match OPENROWSET ( 'Adisdioobsjekt' Addatasor ',' Select Employee ID 'LDAP: // DC = domain, DC = comp, DC = local' ')) AS Empad where employees A collated databaseEditFelt = Employed employee ID calllet database or employee. I have compiled DATABASE_DEFAULT = substring (empad.employeeID, Charindeks ( '-', empad.employeeID) + 2, Lane (empad.employeeID)) COLATATE DATABASE_DEFAULT Any solution: I think the problem is in the above statement: try below Update the Employee SET employee. Mail = empAD.mail

kernel - How to mount loop devices in Travis CI -

I am trying to run the following command in Travis CI: $ sudo Mount-O Loop, offset = 62914560 2014-09-09 -offi-rasbanian.img / home / travis / build / 3dprintfit / octopi / src / workspace / mount but although I With the end: Mount: No loop device could be found. Maybe it does not know about the kernel loop device? (If yes, recompile or `Moderrobe Loop '.) I'm trying to: sudo modprobe loop But he fails I do not have an error message anymore, but I think Travis CI environment is running in a container and you can not load kernel modules from there. Do I mount the device instead of fuses (and how?) Or can I do something about it? It seems that Travis-CI does not currently support Loopfax. Which means fujiso does not work either.

Getting CommandBean or form bean object with out @ModelAttribute in spring mvc -

मुझे कूटबन्धन या बीन ऑब्जेक्ट को नियंत्रक में @ModelAttribute का उपयोग किए बिना प्राप्त करने की आवश्यकता है JSP: & lt; फ़ॉर्म: form commandName = "user" method = "पोस्ट" एक्शन = "$ {pageContext.request.contextPath} / उपयोगकर्ता / निर्मित उपयोगकर्ता" & gt; नाम: & lt; फ़ॉर्म: इनपुट पथ = "नाम" / & gt; पासवर्ड: & lt; फ़ॉर्म: इनपुट पथ = "पासवर्ड" / & gt; & Lt; इनपुट प्रकार = "सबमिट करें" / & gt; & Lt; / प्रपत्र: प्रपत्र & gt; नियंत्रक: @Controller @RequestMapping ("/ उपयोगकर्ता") सार्वजनिक वर्ग UserController {@RequestMapping (method = RequestMethod.GET) सार्वजनिक स्ट्रिंग सेटअपफ़ॉर्म ( मॉडलमैप मॉडल) {modelMap.addAttribute ("उपयोगकर्ता", नया उपयोगकर्ता ()); वापसी "userRegistration"; } @RequestMapping (मान = "/ createUser", method = RequestMethod.POST) सार्वजनिक स्ट्रिंग createUser (ModelMap मॉडल, HttpServletRequest अनुरोध) {उपयोगकर्ता उप...

jquery - Iframe not loading on IE9 -

I am using .NET platform, there is an iframe on my master page. & lt; Iframe id = "NewsFeedFrame" name = "NewsFeedFrame" style = "height: 1042px; border: 0 px solid; overflow: hidden;" Intuitive = "intuitive" & gt; & Lt; / Iframe & gt; And on the document. Already in the javascript event I'm loading the iframe like this. $ ("iframe"). Attr ("src", "Abc.aspx"); But this thing does not load anything on Internet Explorer. Is there any solution ??? Note: There are some documents from IE9 that can help in understanding. Thank you for sharing it with us. After about a week after I became mad, I came to know this. The problem with IE9 is not specifically Javascript code in iframes even if javascript or javascript in iframes attached to any library (many of my js libraries and plugins can be IE9 screw) Not even with. The problem is that when you carry IFrame or ancestor through I...

shell - /usr/bin/perl -e "statement" doesn't accept variables -

I would like to execute perl script as the following: perl -e 'print 'My $ var = "Hello"; Print $ var "World \ n"; ' This ends in the following error message: Bearded found that the operator is on -e line 1, $ var = "hello" Near the pass (unavailable) operator "hello", the operator is expected, with the print $ var "" (Do you need to predeceate Hello?) Backslash found that the operator will be found on "e-line 1", "near the world" string found that at the end of the operator's expected line-line (Missing semicolon on previous row?) Syntax error, "near $ var" = "hello", "can not find string terminator" 'before eof - e line 1. first The following statement works perfectly: perl -e ' Rint 'Hello'; Print "World \ n"; ' It seems that perl -e variable does not accept whether this is true and if so, why? You have an additi...

unit testing - vstest.console throws System.IO.FileNotFoundException -

There are several unit testing projects in my application, all other projects and unit test projects have been created in a normal output directory. Along with, I am collecting all the unit testing assemblies and running vstest.console.exe to test these assemblies. "C: \ Program Files (x86) \ Microsoft Visual Studio 11.0 \ Common 7 \ Tools \. \ IDE \ Common Extensions \ Microsoft \ TestWindow \ vstest.console.exe" "Assembly1 UnitTest.dll "" Assembly2.UnitTest.dll "/ Platform: x64 / Framework: Framework 40 / Insolation / Logger: trx This is the result of an exception: System.IO.FileNotFoundException: Could not load one of the files or assemblies 'someassembly.dll' or its dependencies. The specified module was not found. When I execute vstest.console.exe for one unit tests, the above exception does not occur. From further investigation I came to know that once once the vest. If the console examines many assemblies then the test is copying...

how do i replace exact phrases in c# string.replace -

I'm trying to make sure that a list of phrases is found by them and \ n + idiom Like Your name: Your age: 28 My name: Your age: 28 I have a file with the phrases that I replace and through the bridge and the loop. Except for few words there are 2 words to use the I phrase, where the phrase starts and ends. It does not seem to work, why do anyone know? Example - The string is 'name: xxxxxx' is not edited. output = output. ('\ B' + "name" + "b", 'match'); By using regular expressions, accounts for any number of words with spaces: system. Text. Regular Expression; Reggae Rex = New Reggae ("(? & Lt; key & gt; \\ w + (\\ b \\ s + \\ w +) *) \\ s *: \\ s * (? & Lt; value & Gt; \\ w +) "); MatchCollection MC = re.Matches ("Your name: your age: 28"); Foretach (Match M in MC) {string key = m.Groups ("key") Values; String Value = M. Group ("value"). Values; / / Is...

events - Xamarin.Forms: Why is MasterDetailPage.IsPresentedChanged raised three times on Android? -

मेरे पास Xamarin.Forms (संस्करण 1.2.3) और एक MasterDetailPage (जैसा कि: ""): सार्वजनिक स्थैतिक कक्षा ऐप {स्थैतिक MasterDetailPage MDPage; सार्वजनिक स्थैतिक पृष्ठ GetMainPage () {MDPage = नया MasterDetailPage {मास्टर = नया सामग्री पृष्ठ} {शीर्षक = "मास्टर", आइकन = Device.OS == TargetPlatform.iOS? "Menu.png": null, content = new button {text = "open detail", कमांड = नया कमांड (ओ = & gt; {MDPage.Detail = नया नेविगेशन पेज (नया सामग्री पृष्ठ)); MDPage.Ispresented = false;} ),},}, विस्तार = नया नेविगेशन पृष्ठ (नया सामग्री पृष्ठ ()),}; MDPage.IsPresentedChanged + = (प्रेषक, ई) = & gt; कंसोल। WrightLine (DateTime.Now + ":" + MDPage.Is प्रस्तुतीकृत); वापसी एमडीपीज; एंड्रॉइड बटन क्लिक के माध्यम से मास्टरपेज मजबूत>, इस्त्रीकृत परिवर्तित घटना को एक बार के बजाय तीन बार ट्रिगर किया गया है कमांड लाइन आउटपुट के अनुसार IsPresented संपत्ति को या तो true - गलत - true या के रूप में टॉगल किया जाता है गलत - tru...

javascript - I get jQuery error while submitting my bootstrap form -

I have a small registration form and I try to submit this form using the bootstrap submitHandler, But he can not read the attribute of 'zero' attribute to the Uncaught TypeError: zero. . I use this code to validate and submit: $ (document) .ready (function () {// validating the registration form And save the value after verification $ ('# Register Form'). BootstrapValidator ({Message: 'This value is not valid,' Feedback Echoes: {Valid: 'Glyphikon Glyphikon-OK', invalid: 'Glyphicon glyphicon- With ', valid:' glyphicon glyphicon-refresh '}, field: {email: {validator: {notEmpty: {message:' email is required and Person can not be '}, email address: {message:' input is not a valid email address'}}}, password: {valid: {notEmpty: {message: 'password is required and can not be empty}' }}, Confirm Password: {validators: {notEmpty: {message: 'The password is required and can not be empty}}}, submit handler: fun...

Keep order while using multiprocessing in Python -

Please note how I can place commands while using multiprocessing in Python. Thanks to both the fanks and some fader returns lists, result = [] def callback (* args): results.append (* args) def in_parallel (fn, func): print process started ', For time.strftime ('% H:% M:% S ') pool = mp.Pool (processes = 4) num, I calculate (somefunc (fn)): pool.apply_async (func, args = ( I,), callback = callback ([num, callback])) pool.close () pool.join () Return results The problem is resolved with: r = pool.map_async (...) r.wait ()

sql - Query to retrieve groups where all related values are null -

मेरे पास निम्न है: | समूह_आईडी | मूल्य | | ---------- | ------- | | 146 | ए | | 146 | बी | | 23 9 | नल | | 23 9 | एफ | | 826 | नल | | 826 | नल | मुझे केवल उन आईडी को पुनर्प्राप्त करने की ज़रूरत है जिनके सभी संबंधित मान नल हैं। इस उदाहरण में, आउटपुट 826 होगा। मुझे पता है कि यह एक साधारण प्रश्न है, लेकिन मैं इसके साथ एक लंबे समय से संघर्ष कर रहा हूं। समूह समूह को योग से समूह_आईड चुनें (यदि मान शून्य है तो 1 अंत) = गणना (*)

sql - Adding two row counts in stored procedure in DB2 with parameters -

I am trying to create a stored procedure that uses to get the amount of rows in two tables And then turns out the result. Testator Test (in Tab 1 varchar (20), in Tab varchar (20), in msg msg) Select SQL Req SQL data with the return for COUNT (*) Comment R1 from Coorser Tab 1; DECLARE R2 cursor with return for selection from number (*) to tab 2; Open R1; OpenR2; ---- Add 2 plus ----- Call DBMS_UUPTP Put ('Zeilen ='); Call DBMS_OUTPUT.PUT_LINE (msg); END @ I updated cursor to entire source code since a selected variable = something does not seem to work like this SELECT tableOneCount = (1 (choose from) (*) tab 1); But now the problem is that I get an error in creating the process that tab1 is unknown which is obvious because it is a variable and I do not know how to add 2 cursor. / P> Any thoughts? Thank you in advance. The Vagaband As @Musascio said, you use the variable declare qty integer; SET QTY = (SELECT COUNT (*) tab 1);

xamarin.android - Cannot add packages to Xamarin Studio -

I'm trying to add some packages to my solution such as "restsharp" in xamarin studio, and I get the following error : / P> "Adding RestSharp ... is adding 'RestSharp 104.4.0' to sibuf. The package 'RestSharp 104.4.0' could not be installed. Trying to install the package in a project that 'mono android, version = v4.4', but any assembly reference or content files in the package Not included are compatible with that framework. For more information, contact the package author. " I tried to change the mono Android version and it is still not working. Please help ... RestrashNugget does not package Android projects Any assemblies consistent with are included. I would like to use instead of Xiamen component store. This component supports Android and iOS projects.

stored procedures - MySQL Error - understanding it -

Has seen such error and what does it mean? I have a stored procedure, a cursor is running through 502 records and it passes through the loop, it copies and pastes in the table, but it only records 239 of these records And I get this error 1265 line 5 1265 data line 6 1265 data line 7 1265 Data row column for '10 1265 data on small but short for column 'v_tagMemberSF' On Column 'v_tagMemberSF' made on shortened column 'v_tag MemberSF 'column on truncated for truncated to' v_tagMemberSF 'data v_tagMemberSF row 14 on v_tagMemberSF' 'line 13 truncated to 1265 data column' v_tagMemberSF 'Line 12 1265 Data column Reduced 'v_tagMemberSF' for line 11 1265 data columns' Process with stored cursor Open queue; - Start Loop - dataSetLoop: Loop - declared stored procedure the values ​​of each column in our variable v_dateTime, v_val, v_numIndex, v_tagName, v_tagIndex, v_tagMemberSF, v_tagMemberMinVal, v_tagMemberMaxVal c...

html - EML file downloaded in browser instead of opened inline with email app -

My intention is to send a request to the server, and with feedback (in EML format) open Outlook and Thunderbird where a user e Can edit and send mail text and send it. I am using a Java servlet to generate a response with the following headers (I think it should not make any difference): -Type: Message / RFC 822 Content-Dispute: Attachment; File name = "email.eml" The problem is that instead of opening it directly in the browser, the browser downloads the file I tried - Settings: Inline; File name = "email.eml" But there is only one problem. I have tested with IE 10 and Chrome 38, both have similar behaviors. If the user clicks on the downloaded file, then the email app opens correctly and they can send email, but any discarded disk disk is being made on the disc? The only alternative solution I can think of is using the Melato protocol. Meloto allows you to specify general email fields such as sending body, subject, address etc. Aut...

sql - Force Empty Decimal Placeholders in Decimal SimpleType -

I have XML which produces monetary quantities, which is often the result of currency conversions and therefore showed them well Degree of accuracy should be done (in this case, 4 dp). I came to know that when I apply XML with the numbers listed, as soon as I apply a schema on XML, all the "unnecessary" 0 points are removed. Unless I can understand it from a computer's perspective, we need to show our customers that regardless of the value of each number our number accuracy is in all digits. For their understanding, it is very clear if we are consistent in that, we always show 4 decimal places at such numbers. Here's an example that you can see what I mean (compare the results before and after): / * This schema will create a schema archive, use it and leave it , So * / DECLARE @XSD XML set @ xsd = convert (XML, '' xml version = "1.0" encoding = "UTF-8"? Gt; xml-stylesheet type = "text / Xsl "href =" xs3p.xsl "? ...

c++ - How to get similarity percentage in images using openCv? -

Image
I used Opansivi library to achieve equality percent images I used openCv library of interest ceremony worth repeating There, the name of the different method (int value) is passed in this ceremony and each Mehod has different results. How to decide on these double values ​​now ??? mat src_base, hsv_base; Mat src_test1, hsv_test1; // mat src_test2, hsv_test2; Matt HSV_Half_Down; String base impedance = [base image path UTF 8 string]; String first CmpImgPath = [firstCmpImagePath UTF8String]; // compare with image path src_base = imread (baseImgPath, 1); Read the source image src_test1 = imread (firstCmpImgPath, 1); Read compared image / src_test2 = imread (secondCmpImgPath, 1); If (! Src_base.data ||! Src_test1.data /*|||src_test2.data*/) {return zero; } CvtColor (src_base, hsv_base, COLOR_BGR2HSV); CvtColor (src_test1, hsv_test1, COLOR_BGR2HSV); // cvtColor (src_test2, hsv_test2, COLOR_BGR2HSV); hsv_half_down = hsv_base (range (hsv_base.rows / 2, hsv_base.rows - 1), range (0, hsv...

c# - FileStream missing in System.IO in Windows Phone 8.1 -

कोई भी विंडोज फोन 8.1 के साथ एक ही समस्या है? प्रकार या नाम स्थान का नाम ' वर्तमान संदर्भ में नाम 'फाइलमोड' मौजूद नहीं है नाम का नाम 'File.Stream' नामस्थान में मौजूद नहीं है '' system.IO '(क्या आप एक विधानसभा संदर्भ अनुपलब्ध हैं?) वर्तमान संदर्भ में 'FileAccess' मौजूद नहीं है 'System.IO.StreamReader' में 'बंद' के लिए कोई परिभाषा नहीं है और कोई एक्सटेंशन विधि 'बंद' प्रकार 'System.IO का पहला तर्क स्वीकार नहीं कर रहा है .स्ट्रीम रीडर 'पाया जा सकता है (क्या आप उपयोग निर्देशक या असेंबली संदर्भ को याद नहीं करते हैं?) मुझे एक ही समस्या थी नीचे दिए गए पोस्ट में समस्या का समाधान किया गया।

Cannot change R.java in Android Studio -

I am using Android studio and in the R.java file in a row public stable end-of-action verb / map = 0x7f09 0043; Giving an error error: ';' Expected & amp; Error: & lt; Identifier & gt; Expected . How to solve it? I tried to convert verb / map to action_map , but since the generated file can not have a problem again. Clear a project and then do a reconstruction. Build - & gt; Clean Project then Build - & gt; Project reconstruction

asp.net mvc - How to force MVC to route to Home/Index instead of root? -

अगर मैं एक MVC क्रिया या क्रिया लिंक बना देता हूं, उदा। @ Url.Action ("इंडेक्स", "होम") " मुझे पुनर्निर्देशित किया जाता है, लेकिन मुझे क्या करना है, इसे इसे रीडायरेक्ट करने के लिए बाध्य करना है। क्या स्पष्ट रूप से पूर्ण पथ को प्रस्तुत करने का कोई तरीका है? मेरी Google खोज खाली आ रही है। URL उत्पन्न करने के लिए रूटिंग का उपयोग करता है, इसलिए यदि आप चाहते हैं इसे बदलने के लिए, आपको इसे बदलना होगा। वर्तमान में यह कहता है कि डिफ़ॉल्ट नियंत्रक होम है और डिफ़ॉल्ट एक्शन अनुक्रमणिका है। उन्हें किसी और चीज़ में बदलें और तब आपको एक अलग यूआरएल देना चाहिए । उदाहरण के लिए आपका मार्ग कॉन्फ़िगरेशन शायद ऐसा कुछ होता है: मार्ग। नक्शा (नाम: "डिफ़ॉल्ट", url: "{नियंत्रक} / {action} / {आईडी} ", डिफ़ॉल्ट: नया {नियंत्रक =" होम ", एक्शन =" इंडेक्स ", id = UrlParameter.Optional}); डिफ़ॉल्ट को किसी अन्य चीज़ में बदलें या उन्हें निकालना: मार्गों। नक्शा (नाम: "डिफ़ॉल्ट", url: "{नियंत्रक} / {action} / {id}...

javascript - jQuery converted codes wont work -

Hello there I am trying to convert java code to jquery for better performance. Here are my JS code I: (function () {var body_container = document.body, content = document.querySelector ( '.Content- wrap "), open_menu = document.getElementById ( 'open button'), close_menu = document.getElementById ( 'close-button'), checkifOpen = false; function init () {initialize_process ();} function initialize_process () {open_menu.addEventListener ( 'click "ToggleMenu); if (close_menu) {close_menu. addEventListener (toggleMenu 'click'); if the goal is not ITA menu element or close a .. content.addEventListener ( 'click'} // menu elements of his descendants Are, function (EV) {var target = EV .target, if target (checkifOpen & amp; P == open_menu!) {ToggleMenu ();}});} Now here's my change jQuery version of JavaScript: (function () {var body_container = $ ( 'body'), content = $ ( '.content-wrap'), open_menu = $ (...

Error on removing strings from a pandas data frame - Python -

itemprop = "text"> I have a set and a function string variable in to remove 'nstandar' my panda data The set of frames, function and panda data frame are as follows: SETC = {'ADR', 'company', 'corporation', 'energy', 'ETF', 'group' ',' 'Ink', 'International', 'L'} Def quitarc (x): joining x = '' (one for an x ​​if not in a SETC) 0 1-800 nstandar return x Name. -FLOWERS.COM 1800flowerscom 1 1347 Property INC hldgs INC 1347 Property ins hldgs Inc 2 1 capital bank 1 capital bank 3 1 Century Bancshares Inc 1 Century Bancshares Inc 4 1st Constitution Bancorp 1 Constitution Bancorp 5 1 Lee Enterprise Bank 1 Enterprise Bank 6 1st Pacific Bancorp 1 Pacific Bancorp 7 1 La Source Corp 1 Source Corporation 8 1 Lee United Bancorp Inc 1 United Bancorp 9 21 Century Oncology Hldgs 21st Century Oncology Hldgs Congress However, when I To make a new variable without the wire, do not...

python - RawArray from numpy array? -

I want to share a numpy array in multiple processes. The process only reads the data, so I want to avoid making copies. I know how to do it if I can start with a multiprocessing.sharedctypes.RawArray and then create a numpy array using the numpy.frombuffer . But what if I get an oval array initially given? Is there any way to start a wireless connection with data of fake array without copying data? Or is there another way to share data in processes without copying it there? itemprop = "text"> I also need some of your needs: A) A large numerical array has been given, b) Processes it Need to share between a bunch of c) only for reading etc. And, for this, I am using some of the following lines: mynparray = #initialize a file shrarr_base_ptr = A large array of rawArray (ctypes.c_double, lane * rows * columns) shrarr_ptr = Np.frombuffer (shrarr_base_ptr) shrarr_ptr = mynparray Where in my case, MannPrera ​​is 3D to share as genuine, I used the following style...

bash - HowTo run a ShellScript in PHP in loop -

I have a shell script which is hidden in a php file to get the temperature. & lt ;? Php $ output = shell_exec ('sh temperature.sh'); Echo "& lt; east> $ output & deg; c ;"; ? & Gt; It has just exited once. I always need to change the php file so that the price is always up to date? Thanks PHP is a server side language This means that when it is full, it is done if you want to always update it, then you should use AJAX calls for it. var interval = 1000; // 1 second function doAjax () {$. AJAX ({type: 'GET', url: 'get_what_you_want.php', data: {}, data type: 'jason', success: work (data) {$ ('body') .text (data) // Put it on your page}, complete: function (data) {// next set timeout (doAjax, interval);}}) Schedule; } SetTimeout (doAjax, Interval);

css3 - Combining specific media queries in CSS -

I'm looking to apply styles to a very specific set of width / height combinations. I currently have two combo different, but I have several other combinations: @ media only screen and (width: 468 px) and (Height: 60px) {.header {height: 100%; }} @ Media only screen and (width: 728 px) and (height: 90px) {.header {height: 100%; } I have tried unsuccessfully to combine them into a media query. Is this possible? Many thanks. You can try this: @ Media only screen And (width: 468 px) and (height: 60px), only the screen and (width: 728 px) and (height: 90px) {.header {height: 100%; }}

http - ShellExecute fails for local html or file URLs -

Our company is migrating our help systems to HTMLMF format under the flyer. We have a URI command line But the flare has also been added to a topic based basis on systems that use CSHID, such as index.html # CSHID = GetStarted.html GetStarted to Launch Help Page Our apps are written in C ++ and take advantage of the Win32 ShellExecute () function to make the default app associated with HTTP to display the help system. We've found that when a hashtag is not specified, such as ShellExecute () works fine, like ShellExecute (NULL, _T ("Open"), _ T ("c: \ help \ Index.html "), NULL, NULL, SW_SOWNOWNMAL); This function will launch the default browser related to viewing HTML pages and in this case, the file: /// Protocol handlers will kick, the browser will launch and you see the file in the address bar: /// c : /help/index.html. However, once the topic # Add information, ShellExecute fails to open the page ShellExecute (NULL, _T ("open"), _ T (...

swing - Learning Event handling in Java -

I'm learning event handling using the Java Swing class. I have tried various combinations based on the tutorial from the new Boston homepage. I have made Class Defined Panel, Jebtons, Jettextlds and Jellbell. I have created a class named "handler" which has ActionPerfomed-method, and I've added two textfield (item 1 and item 2) in the addActionListener method. When I run my program, I get the program to do two textfolds (which indicates a choice of the desired text. Shomos Dialliog box). The problem comes when I want a massage pens. When I push one button to show a certain text - window: - "You pushed the button number 1!" Instead of displaying the text below. As I hope my code will be, an empty apppoint instead Shomosse delog-window appears. / P> I know what an experienced Java programmer would expect to be wrong in my code. Here is the part of the code that should be wrong: Private class Thandler implementation implementation (If event.getSour...

Android Studio reporting Date error -

मेरे पास निम्न श्रेणी है: सार्वजनिक वर्ग ModelCalendarDay {निजी इंट वर्ष; प्राइवेट इंट महीने; निजी इंट डे; // ......} मेरे पास यह विधि है: सार्वजनिक तिथि getDate () {ग्रेगोरीयन कैलेंडार thatDay = (ग्रेगोरीयन कैलेंड्रर) ग्रेगोरीयन कैलेंण्डर .get इंस्टेंस (); ThatDay.set (वर्ष, (महीने - 1), दिन, 0, 0, 0); उस दिन वापसी करें; } हालांकि मैं अभी भी ऐप लॉन्च कर सकता हूं, एंड्रॉइड स्टूडियो (महीने - 1) बिट के बारे में शिकायत करता है: कैलेंडर का एक होना चाहिए। जनवरी, कैलेंडर। फरवरी, आदि यह कैसे तय किया जा सकता है? यह बग है और इसे एंड्रॉइड स्टूडियो 0.8.13 में तय किया जाएगा। इसे तय के रूप में चिह्नित करने वाला टिप्पणी कहता है: 0.8.13 के लिए फिक्स्ड (नोट: इसे कैप्शन एनोटेशन मेटाडाटा को अपडेट करने के लिए फ़ाइल & gt; अमान्य कैश ... / पुनः आरंभ की आवश्यकता हो सकती है।)

Upload newer version of strangers project to central maven repo -

JBox2d संस्करण 2.3.1-SNAPSHOT पर है .. हालांकि पुस्तकालय का नवीनतम संस्करण है 2.2.1.1 .. क्या वहां है एक तरीका है कि मैं jbox2d का नया संस्करण हर किसी के उपयोग के लिए केंद्रीय रेपो में अपलोड कर सकता हूं? संक्षेप में, नहीं वर्तमान रखरखाव की अनुमति के बिना आप एक ही साथ एक नया आर्टिफैक्ट अपलोड नहीं कर सकते हैं, जैसे groupId / artifactId । से उद्धृत करने के लिए: मेरे पास foo.com पर विकसित foo प्रोजेक्ट का एक पैच वाला संस्करण है, मुझे किस समूह आईडी का उपयोग करना चाहिए? जब आप एक तिहाई पक्ष प्रोजेक्ट, यह पैच संस्करण आपका प्रोजेक्ट बन जाता है और इसलिए किसी समूह के तहत वितरित किया जाना चाहिए I समूह आईडी के बारे में उपरोक्त विचार देखें। या तो एक नया समूह आईडी चुनें , जो कि परियोजना के प्रभावी रूप से आपके कारीगर है, या नए रख पाने के लिए मौजूदा संरक्षकों के साथ सहयोग करें संस्करण को सेंट्रल में उनकी अनुमति के साथ।

jquery - Can't add to DOM content before page load Javascript -

I am currently trying to add a bunch of elements using javascript after querying the parse. I am able to get the full list if I do not add any click to the list, but if I add click listeners, then only the first 5 items appear in the list. Here is the code I javascript file, it is said in the first html: if (! Parse.User.current ()) {window.location.href = 'Index.html'; } Other {Receiver (); } $ (Document) .ready (function () {$ ('# sign-out'). Click (function () {Parse.User.logOut (); window.location.href = 'index.html';} ); }); function getpartners () {var participant = Parse.Object.extend ("participants"); Var query = new pars.q (participants); Query.ascending ("patientID"); Query.find ({Success: Work (Results) {for (var i = 0; i & lt; results.length; i ++) {var object = result [i]; var id = object.get ("patient id" ); $ (".list-group") attachment (" " + id + "& lt; / li & Gt; ...

debugging - Finding actual source file line number when JavaScript Error occurs? -

What is the industry standard or business process of knowing the actual line number in the source code of your Gaia page? I have used the browser debug tool and of course it shows you an error, but the line number is not the same as the service code file that is being served, I know that usually the server side Compared to scripts the file is actually more and making etc. I usually find the function or code near the error and eventually find it, but is this the better way? The easiest way is to make sure that your JS is written in non-templated .js files, Inline & lt; Script & gt; Instead of blocking in your templated html

Idris - Use implicit variable inside function -

How can we use an inherent variable inside a function? Reducing the simplest possible case, it is possible that: dim: vect n -> Without error, net slow vec = n : while interpreting the right hand of the representative: no such variable n Is there a way to use values ​​from inside? Or is it like asking for n inside sin n ? In this case, is it possible to prove that Vect is a "bijection" and can recover the variable from there? Actually there is no such variable n because it is surrounded by pattern matching is not. You obviously need to bring the underlying variable in the scope: dim: vector no -> gt; Net Dame (NIT) vec = n It is possible to see them in the IDRRL: *> : Setsplicats * & gt; Set: Tee Dive Main .Dem: {n: Prelide. met. Net} - & gt; {A: type} - & gt; (__P__Rarg: Prelude.Wate. Search A) - & gt; Prelude.Nat.Nat

c++ - QPrinter resolution is wrong in Linux -

I'm trying to get some image printing programs to work in QT. Trying to print a custom printer, for which the PPD is. The image to be sent to the printer is calculated based on the device's information. When looking at the printer properties, I think the resolution is 300dpi x 300dpi . In the windows, everything works well - but in Linux, the information of the computed image becomes very large, causing my file to explode ... seeing all the data I found in Linux, Code> Physical DPIX and physical dpi (used in code count) is 1200 instead of 300. Therefore, I set it on: Printer for defining QPrinter :: HighResolution 2 on the printer using Windows. For postScript printing, the resolution of the PostScript driver sets to 1200 dpi. I have changed my constructor to take care of it - just when the default is missed ... Task: Printer :: Printer (Constant Print Printer Infow and Printer Info, Maine Wando * PWND): #if Defined (Q_OS_WIN32) || Defined (Q_MAC_OSX...

javascript - RSS Notification Android Application -

Hello all I know that this has probably been asked a lot and I have tried to search but can not find the answer I am watching. I am trying to create an application for Android and iOS where the user can download the app and every time a download is received on the blog, it gets a notification to the user and when When they click on the information, it will take them into a blog article on the browser of their choice and on the web. I was wondering what the best way to do this is to have a third party. In fact, in a nutshell, an application synchronized with the RSS report is often and if there is a new article, it will give them a notification that links to the new blog article on it. For the web For the actual view of the app, I was just putting some information and possibly coordinating the interval of time with the RSS. If any of these please say please after zach I have created an app like this for Android, this is called" Toggles Newsreader ". You ne...

javascript - Non-modal or popup like window -

Is it possible to create a non-modal or pop-up window using jquery in JSP? To show information in some detail, but without blocking the main window. I want to use a new tab or browser window so that it's basically like a modal box, but the ability to reach the main page is also there. You may have a modal window on the screen and the display property can not be set to anyone When you have a program that requires a window for it, show it you can also make a division on the fly, and then you want them to give space. This should be a very simple solution and no additional library or framework will be required.

ios - How make a transition between several ViewControllers from SKScene? -

Image
I want to change my ViewController with the game censen with the spritkit. I have 3 scenes with 3 different view controllers When my application starts with PresentationViewController, my transition code does not work to my GameScene (GameViewController) GameOverViewController (see screenshot 1) and I have an error Can read messages. Error message: whose view is Not in the window hierarchy! My code: to storyboard = UIStoryboard (name: "Main" bundle: nil) to settingController: UIViewController = storyboard.instantiateViewControllerWithIdentifier ( " ?? PresentationViewController ") VC as the UIViewController = self.view .window .rootViewController VC is really .presentViewController (settingController, animated: completion: zero) and when my app Begins with GameViewController (see screenshot 2) transition code works perfectly. I do not know why this is about 2 cases There is a difference between The transition between PresentationViewContr...

SSIS (in SQL Server 2012): Upsert in Lookup component -

I have & gt; 10 packages that need to update / add dataflow I am able to: Lookup => Match output branch = & gt; OLE DB command Lookup => There is no matching output branch & gt; OLE DB Destination However, I was wondering if I can use the "merge" statement in any way (or any other) ) Component such that I can do something like this: merge [dbprac] [Dbo]. [GoalBable] To use ATS [SourceBable] TSIID = ST.Id WHEN on AS ST then match - * Update archives, if found based on record ID, updated SET tt.SSN = st.SSN, tt .FirstName = st.FirstName, tt.MiddleName = st.MiddleName, tt.ListName = st.ListName, tt.Gender = st.Gender, tt.DateOfBirth = st.DateOfBirth, Tt.Email = st.Email, tt.Phone = St.Phone, tt.comment = st. Comment did not match goal - * Enter from source to target. INSERT (ID, SSN, First Names, MiddleName, LastLameM, Ling, Detfirth, Email, Phone, Comment) Value (St. Edi, St. SSN, St.Fastam, St. Middle Name, St.Lostnam, St. Gender, St. DateOfBirth,...