Posts

Showing posts from March, 2012

css - JavaFX - styling an unfocused ListView row -

I'm trying to styling a selected, uncompressed list view row with a different color (say gray). It proved useful to me, but it lacks a very useful behavior, but there is a lack of necessary behavior to fill the selection in color. / * 1. Strange rows with white background colors; 2. List view: When there is a mouse on an item, highlight it with blue shadow; 3. List view: When an item is selected, paint it with a shield; 4. List view: When the focus is lost from the list event, the selected item should be painted with a gradient; 5. List view: All items filling text will start with black. But on mouse and / or when selected it will turn into white. * / .list-cell: fill: selected: focus, .list-cell: filled: selected {/ * 3:, 4: * / -fx- Background color: linear-gradient (# 333 0%, # 777 25% , #aaa 75%, #EEe100%); -fx-text-fill: white; / * 5 * /} .list-cell {-fx-text-fill: black; / * 5 *.} .list-cell: Strange {-fx-background-color: white; / * 1 * /} .list-cell: Even {-fx-backgr...

web services - Passing BASIC authentication data into a spring ws client -

I have a web service that uses basic HTTP authentication to use the server Web service has its own authentication username and password WS is using the SOAP UI after setting the required parameters I am not developing a UI client which is a web Will use spring to use the service My question is how do I use HTTP Send the encryption that is entered by the user while opening it on the web server so that he gives me access to the website I cite the interesting part of the configuration: & lt; Bean id = "Web service service" class = "org.springframework.ws.client.core.WebServiceTemplate" & gt; & Lt; Constructor-arg ref = "messageFactory" /> & Lt; Property Name = "MessageSenders" & gt; & Lt; Bean square = "org.springframework.ws.transport.http.HttpComponentsMessageSender" & gt; & Lt; Property Name = "Credential" & gt; & Lt; Bean class = "org.apache.http.auth.User...

dartium - Dart - running a project does not load the dart file and not printing in the console -

Image
I have created a new project in Dart and have added some code, but when I run (does not make any difference to me I ran Dart file with "run in darts" or if Ctrl + R) is not showing the button created in the main dash (main) method, I have also added a print () print a message in the console , But nothing has been shown. In addition: If I go with "Run as Javascript", the button is shown normally, this is what I am doing: 1.- My HTML code: & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; Capitulo9 & lt; / Title & gt; & Lt; Link rel = "stylesheet" href = "capitulo9.css" & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Script type = "app / dirts" src = "capital 9 dart" & gt; & Lt; / Script & gt; & Lt; Script src = "packages / browser / dart.js" ...

database - Difference in two SQL query, but same result -

I'm new here, I think I'll get some help. I have two questions First SELECT ename, deptno, sal, emp to emp WHERE sal (SELECT sal FROM emp WHERE deptno = 30) and COM IN (SELECT comm to emp WHERE deptno = 30) SECOND SELECT ename, deptno, sal, em em em (in serial, com) (select sal, com fam amp WHERE dept = 30) they produce the same result , But what is the difference between them ??? Maybe the second result will back up faster than the first one .... or ??? Thank you very much! These are not exactly the same questions. They can produce similar data, but that's because your dataset does not describe the difference. As you can see, this: (your second query) is not like this: (your first query) Will also return the employee, of which 30 will get any salary, and the department will give the same commission to anyone in 30, but each of them is allowed for different people, i.e. wages a match w / person x Maybe and the commission can be a match...

android - What does Path.transform(Matrix) do to a line? -

Image
What is the calculation when I execute the following code? The source code of both classes refers to the basic methods, unfortunately. path path = new path (); Path.moveTo (20,20); Path.lineTo (40,20); Matrix matrix = new matrix (); Matrix.setScale (2,250,50); Path.transform (matrix); Take some lessons with what I have to do. For example, ago: after: me Which calculation would be required to leave alliance with the line? Note that I do not want to change the size of the text, only move it. Use the same matrix while drawing this text. There is a set matrix method in the canvas.

javascript - Django Client Side Filtering -

I am very new to Genzo and I am working on the site where I want to be able to filter the user Objects can be easily filterable in views.py and reload the template based on objects timestamp, but how should I make this filtering client? Would it be a good idea to load everything: {all_objects for obj%} & lt; P & gt; {{Obj.time}} & lt; / P & gt; {% Endfor%} And then use javascript to hide and show relevant items? I do not expect more than 1,000 items I have taken a look at this: And the author says that he will use angular JS instead of a custom AJAX solution. Is angle my best choice or are there other structures that are easy to integrate with the DEGENGO? You do not need full frameworks like Koner to filter your results, Want to use one of the popular MVC frameworks, however, if you go that route, then you should change the architecture of your dégggo app quite a bit, because Kangaroo and actually created for single-page applications Land, and you ...

python - Why does len() execute __set__ of my class? -

I have implemented a Django, it is an image field that allows a URL string to load an image In addition to specifying a file directly. ImageFileDescriptor of imports Import models Import django.core.files.base import Django.db.models.fields.files from Uuid import urllib.request django.db UrlImageFileDescriptor (ImageFileDescriptor) : Def __set __ (self, example, value): # if string is used for assignment, then to fetch an image from URL # and store it on the server if isinstance (value, str): try: feedback = Urllib.request.urlopen (value) image = response.read () name = str (uuid.uuid4 ()) + '.png' value = ContentFile (image, name) Except: print ('error fetch', value) Suup Su passes () .__ __ set (eg, value) square UrlImageField (models.ImageField): descriptor_class = UrlImageFileDescriptor Normally, field work. But for some reasons, the DJ gives the string value itself internally. When is a query set of models using the field, __ set __ that is called with th...

angularjs - ui-bootstrap collapse not working with Angular -

I have an angular module and config: var app = angular.module 'Project', ['E.U. Bootstrap', 'Transgenal', 'NGRUT']); App.config (function ($ migration provider, restangelular provider) {$ routeProvider. When ('/', {Controller: EntryCtrl, templateUrl: 'Foreground / Partial / Entry'}} .... Meta http-equiv = "X-UA-compatible" content = "IE = edge" & gt; & Lt; Meta name = "viewport" content = "width = device-method, initial-level = 1" & gt; title & gt; BMWFirm Administrator & lt; / title & gt; link rel = "stylesheet" href = " / Frontend / css / style.css "& gt; & lt ;! - latest Pulled and minified CSS -> Link rel = "stylesheet" href = "// maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> partial / entry.html: & lt; Div class = "dropdown" & gt; & Lt; A class = "btn btn...

c# - Basic SQL - SELECT -

Then I got this code: query2 = "SELECT *" WHERE id = '"+ ID +"' "; And it seems that there may be problems with the script, maybe I'm doing something wrong here. For example, when I write it: query2 = "SELECT * to click WHERE id = 3"; .. It works just fine, and the script is not a problem but with my original code it shows me this error: OleDbException Was rejected by the user code A type of exception occurred in the 'System.Data.OleDb.OleDbException' system Itemprop = "text"> The way you have typed the query will be like this : SELECT * by clicking on WHERE ID = '3' come of a number Pass' which means that it looks the same as the ID as a string 3. So you want to delete a single quote around the number, so it will search for the number 3, or whatever number you use, this is what you want: query2 = Clicking SELECT * WHERE ID = "+ ID;

installation - Couldn't open IDLE after installing Python, no error message -

I installed Python 2.7.8 (My system, Windows 7, 64 bit) but IWL could not open. When I use CMD, it showed that "Access is denied" I tried to uninstall and re-install several times, but every time it is the same. The message "Please wait while Windows Python 2.7.8 configures" appears in the screen, after which nothing is not shown no error message. Can anyone tell me what is the possible reason for this? Thank you very much!

python - Using While condition inside of Thread's run() method -

I'm not sure that while true: run () method I have executed this code without the and status and it works fine. But I still want to know the purpose of using it. Any idea why it should be used or not? QtCore .QThread): def __init __ (self, theQueue, parent = none): QtCore.QThread .__ init __ (self, parent) self.theQueue = theQ def def (self): while true: function = self.theQueue. Get () Self.sleep (1) self.theQueue.task_done () Thread = [] In the range I (1, 3): thread = TheThread (theQueue) threads.append (thread) thread.start () In (len (thread)): theQueue.put (i) while True Loop means that your thread will always continue to block (in principle), task = self.theQueue.get () on the call. If you were using the threading.Thread object, it would hang your program and fail to exit, because Python threads will keep the main thread alive until they are running Before you start the daemon formula attribute in right. However, because you are using Qt-...

Android :: Custom Dialog with number scrollable picker? -

Image
समस्या हम लाल वृत्त में इस घटक को क्या कहते हैं ?? और मैं इस तरह से संवाद कैसे कर सकता हूं। असल में मुझे नहीं पता कि इसका नाम क्या है, इसलिए मुझे कीवर्ड नहीं पता उस बारे में खोजना नोट मुझे पता है कि किसी भी तरह एंड्रॉइड में साधारण संवाद कैसे बना सकता है कल्पना कीजिए कि आप एक NumberPicker रखना चाहते हैं जो 0C से 20C तक डिग्री मान दिखाता है। आपको अपने नंबर पिक्चर को पॉप्युलेट करने के लिए स्ट्रिंग एरे सेट करना होगा । सबसे पहले, अपने स्ट्रिंग को अपने मूल्यों के साथ प्रारंभ करें, जैसे: स्ट्रिंग [] degreesValues ​​= new string [20]; के लिए (इंट I = 0; i & lt; 20; i ++) {डिग्री वैल्यू [i] = स्ट्रिंग.वल्यूएफ़ (i) + (चार) 0x00B0; } फिर, बस अपने NumberPicker पर इस तरह से लागू करें: NumberPicker picker = (NumberPicker) findViewById ( R.id.numberPicker); picker.setMinValue (0); picker.setMaxValue (19); picker.setDisplayedValues ​​(degreesValues);

pug - How to post an array in node.js -

मैं node.js को भेजना चाहता हूं: {name : "जॉन स्नो", ई-मेल: "john.snow@got.hbo.com", फोन: [{संख्या: "1xx123345567", प्रकार: "होम"}, // हिंटरफ़ेल {संख्या: "1xx897654651", प्रकार: " इनपुट इनपुट (नाम = "नाम") इनपुट (नाम = "ईमेल") इनपुट (नाम = "फोन [0] .नंबर") इनपुट (नाम = "फोन [0]। प्रकार") इनपुट (नाम = "फ़ोन [1]। नंबर") इनपुट (नाम = "फोन [1]। प्रकार" ) कोई सफलता नहीं: / के लिए एक JSON ऑब्जेक्ट बनाएँ JSON.stringify () का उपयोग कर अपने सरणी। var userObj = {नाम: "जॉन स्नो", ईमेल: "john.snow@got.hbo.com", फोन: [{संख्या: "1xx123345567", टाइप करें: "होम"}, // सर्दीफ़ेल {संख्या: "1xx897654651", प्रकार: "कार्य"} // दीवार]} var jsonUserObj = JSON.stringify (उपयोगकर्ता); तब आप इस ऑब्जेक्ट को http अनुरोध के लिए लिखते हैं जो आप डेटा पोस्ट करने के लिए करते हैं। यहां विस्तृत विवरण -

https - MITM proxy using FiddlerCore -

We want to implement a MITM proxy. This should obtain the https request from the client, decrypt them, and return the previously recorded responses This means that the proxy is not connected directly to the remote server. I know that Fidelor MITM supports, but how can I use it in my scenario? Thanks This is a very simple job . If you look at the demo project included in Fidler Coir, you can get more ways from there. Fiddler Feldler App Preceding + = Representative (Fidelatoration OS) {if (oSession.HTTPMethodIs ("Connect")} {oSession.oFlags ["X-ReplyWithTunnel"] = "Fake To HTTPS Tunnel"; Return; } If (OS.U.R.T.TTTT) (OSM), "OSTill Craft Response Endbipse Server"; OS.responseBodyBytes = Session IWantToReturn.responseBodyBytes; OS.oResponse.headers = (HTTPResponseHeaders) session IWantToReturn.oResponse.headers.Clone (); }};

c# - XPathEvaluate behave differently in other environments -

I am working on a game in unity and want to parse one file in unity script, from my file line Starts And I want to get the map width attribute, My code is: var mapWidth = ((IEnumerable) tiledMapXmlRoot XPathEvaluate ("/ @ width")) Cast & lt; XAttribute & gt; (). Select (a => Int32.Parse (a.Value)). first (); which is working correctly while testing in Visual Studio, but fails when it runs in Integration Script, while debugging I can see it fails Because XPathEvaluate returns an empty collection System.Xml.Xpath.SimpleSlashIterator While returning to the Visual Studio type System. Xml.Xpath.XPathEvaluator.EvaluateIterator and it is a collection with an element in the expected form How is it possible to work differently in two environments for the same code? I looked at the version of System.Xml.Linq and viewed it in Visual Studio 4.0.0.0 while in Unity (monodevelop script editor) it is 3.5.0.0, but seeing the library documentation the cod...

Doxygen escape nested comments in C -

I am writing a dosstring in doxygen within a comment block, and I want to include a snippet containing / * text * / I know that I can include a file, but this is just 8 letters or so. And it does not need to be / * text * / , // text (since I want to document the behavior of the source code parser). Is there any way to avoid the letter, can there be something that can cause problems for the dose of oxygen or compiler? / ** * This is a malicious comment * * This parser supports C style formatted comments: `` / * text * / `` * * / Realize that I can use C ++ comments for the main Doksian comment block. But still curious if it is possible without doing this (this means that for this one snippet alone, a big comment block has to be changed.) In version 1.8.7 & amp; Zwj; is present (see Chapter 24 HTML command of the document). Did you try (it's a bit of a trick): This parser supports C-style formatted comments: / & amp; Zwj; * Text * and; Zwj; / ...

c# Webbrowser - identify javascript function by div id -

In fact, I'm having some trouble with the weblist I try to get a div content created by a Java content I am doing. Unfortunately I can not understand that this Javascript is actually filling this divis. How can I find that script? msg_content textbuff text center "> gt; script & gt; & gt; form action =" http://s124-de.ogame.gameforge.com/game/index.php?page=messages&displayCategory = 9 & amp; displayPage = 1 "name =" delMsg "method =" post "& gt; & gt; Input ID =" new_msg_count "type =" hidden "value =" 0 "/> & gt; Table ID = "Maze" class = "list" cells = "0" cellpadding = "0"> gt; tbody & gt; tr class = "first"> tr id =" TR30738105 "class =" entry trigger alt "/> & lt; tr id =" TR30734795 "class =" entry trigger "/> & Lt; tr id = "TR30734031" class = ...

java.lang.NoSuchMethodError in compiling android app in IntelliJ IDE -

I am trying to use IntelliJ IDE 13 to develop an Android app, whenever I have a new project I try and compile it to get this error: java.lang.NoSuchMethodErro I have tried another SDK, but nothing has changed. The picture of the error is attached. Please help me: ( This means that you have some method Are not available at the current API level which you are using. Learn more about

pdf - Dynamically attached php file using phpmailer show err on opening the file -

I am sending a PDF file as an attachment using PHPMailer, which is generated using mpdf. But the attachment is not open from receiving mail and this error indicates that "Adobe Reader can not open the file because the file is either damaged or not supported". It is also saying that the attachment was not properly decoded. The code I used to upload the file $ string = file_get_contents ("url var1 and var2"); $ Binary_content = file_get_contents ($ string); $ Emailobj- & gt; Advertent Attachment ($ binary_tent, "invoice pdf", $ encoding = 'base64', type $ '' application / octost-stream ''); "" Note: I do not want to upload the file to the server. Please provide any solutions for this.

How to launch a PDF File using PDFBox -

I want to spend time while opening a PDF file. I can not find a way to use this PDFBox. I have created a PDD document in my Java program and want to use some APIs to launch a PDF file through my code. I'm unable to figure out which PDFBox API objective. So it would be useful if I could get some information on it. Thank you. Swati File C in the document Drive. If you execute the Java code below, then it will open Adobe Acrobat in the 04-Request-Headers.pdf file. The total time to open the PDF file is displayed in the console. Below is an example of how to open a PDF file using Java. Code: package com.pdf.pdfbox.test; Import java.awt.Desktop; Import java.io.file; Public class OpenPDF file using Java {public static zero main (string [] ARGs) {file file = new file ("C: / document / 4-request-header PDF"); If (file.exists ()) {long startTime = System.currentTimeMillis (); Desktop.getDesktop () open (file). Long end time = system Time Received (); ...

How to create a custom-shaped bitmap marker with Android map API v2 -

Image
इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर मैं एक एंड्रॉइड एप्लिकेशन विकसित कर रहा हूं जहां मैं Google मानचित्र एपीआई v2 का उपयोग कर रहा हूं मुझे कस्टम मार्कर के साथ मानचित्र पर उपयोगकर्ता स्थान दिखाना होगा। प्रत्येक मार्कर उपयोगकर्ता की तस्वीर किसी यूआरएल से दिखाएगा। छवि सर्वर से एसिंक्रोनस मोड में डाउनलोड होनी चाहिए। उदाहरण के लिए संलग्न स्क्रीनशॉट देखें। मैं मार्कर में एक छवि और कस्टम जानकारी कैसे जोड़ूं? इसमें एक मार्कर डमो एक्टिविटी वर्ग में आप देख सकते हैं कि कस्टम छवि GoogleMap पर कैसे सेट की गई है। // कस्टम आइकन का उपयोग करता है MSydney = mMap.addMarker (नया मार्कर ऑप्शन ()। स्थिति (सिडनी)। शीर्षक ("सिडनी")। स्निपेट ("जनसंख्या: 4,627,300") .कॉन (बिटमैप डिस्क्रिप्टर फॉरेंचर। फ्रॉम रिसोर्स (आरड्रॉवएबल.एरो))); चूंकि यह एक छवि के साथ मार्कर को बदल देता है, जैसा कि आप अधिक जटिल और फैन सामग्री को आकर्षित करने के लिए Canvas का उपयोग करना चाहते हैं: बिटमैप। कॉन्फिफ conf = बिटमैप। कॉन्फ़िफ़.एआरजीबी_8888; बिटमैप बीएमपी = बिटमैप.क...

Sorting with PHP and GET method? -

I'm trying to sort them using the link and the GET method. I provide the code first and then explain what I am trying to achieve. Could be a better way of using AJX and making it dynamic (I think?), But I want to start it already. code: if (isset ($ _ GET ['order'])) {$ order = $ _GET ['order'];} else {$ order = 0;} if (isset ($ _GET ['field'])) {$ order_field = $ _GET ['field'];} switch ($ order) {case 0: $ order_next = "DESC"; break; Case "DESC": $ order_next = "ASC"; break; Case "ASC": $ order_next = 0; break; } And later, I have this snippet in the HTML page: OK I have the Last link, which includes 3 terms, default , DESC command, Em> ASC command. When I click on it once, it should be sent through the GET method, the field I clicked was the "last name" field, and I need the next position (by default (sorting Without the next one (DESC in this case)). I can not catch t...

javascript - jQuery script does not load in Tumblr theme -

I wanted to use Jquery script for my tumblr theme but it does not work. This is my code: & lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Script src = "// ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> & Lt; Script src = "http://static.tumblr.com/wgijwsy/jgemkyt9x/jquery.photoset-grid.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ ('Photoset Grid') photosetGrid () .; & Lt; / Script & gt; {Block: post} {block: photos} & lt; Div class = "photoset" & gt; & Lt; Div class = "photoset-grid" data-layout = "{PhotosetLayout}" & gt; {Block: photos} & lt; Img src = "{photoURL-500}" {block: caption} alt = "{caption}" {/ block: caption} / & gt; {/ Block: photos} & lt; / Div & gt; {Block: caption} {caption} {/ block: caption} & lt; / Div & gt; ...

linux - Raspberry PI node EventEmitter memory leak -

I am using Johnny-Five node module on Raspberry Pi to run some services on the robot with the following script. var = = required ('Johnny-Five'), board, servo, lead; Board = new five Boer (); Board.on ('ready', function () {servo = new five.Servo ({pin: 9, category: [0,180]}) // Allow direct commandline access board. Repl.inject ({s: servo });}); I get the following error when running this code with node 0.10.29-1 on Raspberry Pi 1 (node) Warning: Potential events Emmetor discovered memory leaks 11 listeners said. Use the emitter.setMaxListeners () to increase the range of trace in the process. EventEmitter.addListener (events.js: 160: 15) at process.on.process.addListener (node.js: 768: 26) Board. On board (/ home / pi / sonny / node_modules / johnny-five) / Lib / board.js: 375: 15) On board. & Lt; Anonymous & gt; (/home/pi/sonny/node_modules/johnny-five/lib/board.js:154:18) at SerialPort. & Lt; Anonymous & gt; (/home/pi/sonny/node_modules/...

c# - IIS8 HTTP Error 500.0 - Internal Server Error -

I'm trying to move my website to another host, shared hosting, and I receive this message Detailed error notification: module AspNetInitializationExceptionModule Notification Launching Handler Expander URLHandler-Integrated-4.0 Error Code - 0x00000000 Requested URL Physical Path - h: \ root \ home \ picsize-001 \ Www \ 3144clubmember The logon method is not yet determined by the logon user yet fixed Committee not I've tried many things but nothing worked for me. It looks like your host does not support NT 4.5 or you do not have it enabled. Your Host Control Panel: You have enabled. Net 4.5 is running in integrated mode and is not a classic pipeline

osx - NetBeans8 Scala on Mac OS X - Cannot detect and install the selected platform -

मैंने SCALA_HOME और amp; JAVA_HOME और netbeans_default_options में प्रत्येक पर्यावरण चर के लिए पूर्ण पथ और NetBeans 7 या 8 के साथ netbeans_default अद्यतन किया गया है। OS X पर स्काला प्लेटफार्म का पता लगाने में अभी भी असमर्थ है। SCALA_HOME = / संस्करण / MyPassportForMac / Scala-2.11 1 JAVA_HOME = / लाइब्रेरी / जावा / जावावर्च्यूअल माइकंस / जेडीके 1.8.0_11.जेडीके / सामग्री / होम नेटबींस_जडखूम = "लाइब्रेरी / जावा / जावा वर्चुअल माइकंस / जेडीके 1.8.0_11.jdk / सामग्री / होम" कोई भी मदद की सराहना की। धन्यवाद। पृष्ठ से: एक नई निर्देशिका और पृष्ठ बनाएं & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & Gt; & Lt;! DOCTYPE plist PUBLIC "- // एपल कंप्यूटर / / डीटीआई PLIST 1.0 / / एन" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> & Lt; plist संस्करण = "1.0" & gt; & LT; dict & gt; & LT; कुंजी & gt; SCALA_HOME & lt; / कुंजी & gt; & LT; स्ट्रिंग & gt; /Volume...

regex - Nginx string manipulation on a variable -

Is there any way I can change the string on nginx variable I use nginx as proxy for s3 restricted downloads I am doing And I'm forwarding $ upstream_http_etag to the feedback header with different names. add_header Content-MD5 $ upstream_http_etag; Proxy_set_header content- MD5 $ upstream_http_etag; The problem is the tag double quoted . I wanted to remove this double quotes before adding it to the header. There is a possible way to do this. I know that I can strip it to the client. But this is for older apps to work without updates. Any help is greatly appreciated. For example, space / {header_filter_by_lua '-Double remove} quoted local value = string.gsub (ngx.var.upstream_http_etag or "", [[^ "(. +)" $]], "% 1") - Feedback header Add ngx.header ["content-MD5"] = value '; Proxy_pass ...; } BTW, proxy_set_header is used to pass the upstream to the additional request header, however, $ upstream_http_et...

node.js - Using libphonenumber library in postgresql function -

I have to parse the phone number in the postgrascape function. I am using the waterway ORM and basically doing this calculation in javascript. Now I want to take the whole argument into postgrescale archived work. But the obstacle is that the availability of Lymphonumber Library is available. It is available in Node.js, but it is not sure how to use it in postgresql. Any thoughts? C binding is already available Create Extens PG_LebonNumber; SELECT parse_phone_number ('03 7010 1234 ',' AU ') = parse_phone_number (' (03) 7010 1234 ',' AU '); Select table fu as parse_phone_number (pH, 'au') (value ('0370101234'), ('03 7010 1234 '), (' (03) 7010 1234 ')) AS T (PH); Find my answer

go - resp declared and not used in golang -

I get this error every time I try to run the code I'm unsure how to use unused variables How to code and work without unused variables To post this question, I had to remove one another's statement. The problem is as follows: If (case1) calls a URL and if (case2) calls another URL, then calls to other URL. Thanks for the help. I tried various hacks but none of them are working. Package main import ("fmt" "math / rand" "net / http") func handler (w http.ResponseWriter, r * Http.Request) {anger: = rand.intnt ( )% 3 var resp * response if anger == 1 {resp, _: = http.get ("https://maps.googleapis.com/maps/api/place/ Textsearch / json? Query = Restaurants + in + Sydney and amp; key = Aaisa SAH 4 T-Kyuelmaiaraksanke 0 XF0Yiu9ZXVFDNfPTCFs ")) and {resp, _: = http.Get (" https://maps.googleapis.com/maps/api/place/nearbysearch / Json? location = -33.8670522 , 151.1957362 & amp; radius = 500 & amp; types = food & amp; name...

php - WordPress Illegal string offset Warning in Post Metabox -

मेरा कस्टम पोस्ट प्रकार नया उत्पाद पृष्ठ जोड़ें यह चेतावनी दिखाएं चेतावनी: अवैध स्ट्रिंग ऑफ़सेट यहाँ लाइन नंबर 66 के साथ मेरा कोड है P> & lt; div class = "added_slider_img_wrapper" & gt; & Lt;? Php $ e_added_img_count = $ mydata ['e_added_img_count']; के लिए ($ i = 1; $ i & lt; $ e_added_img_count; $ i ++) {? & Gt; & Lt; div वर्ग = "गैलरी_होल्डर & lt;? Php echo $ i?; & Gt;" & gt; & Lt; label style = "float: left; मार्जिन: 5px 5px 0 0;" & gt; छवि & lt;? Php echo $ i + 1; ? & Gt; & lt; / लेबल & gt; & Lt; input type = "text" id = "e_gal & lt;? Php इको $ i;? & Gt;" नाम = "ई_गल" & lt;? Php echo $ i;? & Gt; " मान = "& lt;? Php echo $ mydata ['e_gal'। $ I];; & gt;" शैली = "चौड़ाई: 550px; फ्लोट: बायां; मार्जिन: 0 5px;" / & gt; & Lt; input id = "_ btn" class = "uplo...

google maps - Show parks in terrain view -

I use a map with "terrain" - look at this. But in this view, PoI -> Parks are overlapped in any way. Any idea how to solve this? Perhaps overhaul an area-map with a standard roadmap? The funny thing is: when zoom level> 13, parks are shown, maybe this zoom level can be adjusted? I do not know how but somehow solved this problem.

php - Maximum amount of items in one Page of Yii -

I am developing this yii application and displaying "preview" of these items in the index and currently it 8 is displayed item so it will pave yourself. I would like to make it a page on every 4 items and I have searched online and found that I can use cepagation. I have followed the example in the documentation and it is working but I do not know how to show the model, I have the following code in the index. foreach ($ Model $ as model): endoirch; $ This- & gt; Widget ('CLinkPager', array ('page' =>; $ pages,)); Besides that the data I want to display is the title, content, image and id and I can use _view because I have about CSS Everyone is set in In addition to this, it is a way to display the index with CLISIviVe by defining the yii application, where I can set the item limit instead of using CPIgnition If you want to display 4 items only on the index page, edit this type of index edit: Public Function ActionIndes () {$ DataProvi...

How to package JavaFx application -

I use eclipse and efxclipse plugin I have created a very simple JavaFx application after Oracle documentation. My JDK version is jdk1.7-045 I think the export application as normal Java is different from the normal Java application. What if I want to create a normal jar file, and can be executed by double click jar file? Any indication D: \ Temp & gt; Java -classpath ./jfxrt.jar jar Fxhello.jar exception in thread "main" java.lang.NoClassDefFoundError: JavaFX / application / Ap fold java.lang .ClassLoader.defineClass1 java.lang.ClassLoader.defineClass (ClassLoader.java: 800) (Native method on java.security.SecureClassLoader.defineClass) (SecureClassLoader.java:14 2) on java.net.URLClassLoader.defineClass (URLClassLoader. Java: 449) java.net.URLClassLoader.access $ 100 (URLClassLoader .java: 71) to (URLClassLoader.java java.net.URLClassLoader $ 1.run on (URLClassLoader.java:361) java.net.URLClassLoader at $ 1.run: 355) java on java.net.URLClassLoader.findClass. secu...

Rspec test to check user gets a self-populated ip_location attribute filled (Rails 4/devise/geocoder) -

In my sign-up page, I have implemented an IP tracking feature, when a user signs up, the country It comes from the user, so to fill the 'user_country' feature of the newly created account This works but as a newbie I do not know how to test with RSPC To do that, it works. Sign up to create a user, then get the account After a Brahmin, that user_country is no longer empty. How can I use the /app/controllers/registrations_controller.rb method to assign a country here. User's newly created record on controllers / registration_controller - see below class registration controller & lt; Wise: RegistrationsController Layout 'Lightbox' def updated account_update_params = devise_parameter_sanitizer.sanitize (: account_update) [: password]. Required for blank settings # When the password if the account_update_params are left blank form to submit? Account_update_params.delete ("password") account_update_params.delete ("password_confirmation...

jquery - Adding event handler to dynamically added span elements -

इस सवाल का पहले से ही एक उत्तर है: 5 जवाब मैं एक क्लिक बाँधना चाहता हूँ यहां तक ​​कि गतिशील रूप से जोड़ा हुआ स्पैन तत्वों को मेरे पृष्ठ पर एक नोड में। मैंने एक स्थिर तत्व के लिए बाइंड ईवेंट लिखा था और यह ठीक काम करता है - फ़ंक्शन क्लिक करेंस्पैन (domNode) {$ (domNode) .पुस्तक ("span")। बाइंड ("क्लिक", फ़ंक्शन () {चेतावनी ("स्पैन क्लिक");}); } मैंने गतिशील रूप से जोड़े गए तत्वों के लिए एक ही लिखने की कोशिश की और "बाँध" को "पर" विधि में बदल दिया। किसी भी तरह यह गतिशील रूप से जोड़ा गया अवधि तत्वों के लिए काम नहीं करता है। क्लिक करने के लिए मैं गतिशील रूप से जोड़े गए स्पैन तत्वों को कैसे प्राप्त करूं? इस कोड को आज़माएं: $ ('# parent_selector')। पर ('क्लिक', 'स्पैन', फ़ंक्शन () {चेतावनी ("यहाँ");});

java - Why does this result in non-lazy fetching and N+1 select statements? -

I just hope to have a SQL query, but I'll go to the N + 1 selected network. I really do not understand why there is a problem in detail here: I have a unit "player": @inti @Table (name = " Player_ref ") Public class PlayerRef {// constructor etc ... @OptimasticalLock (removed = true) @OneToMany (fetch = FetchType.LAZY, mapped =" player ") public set & lt; Player & gt; Millplayer () {Return Player; }} and a class player: @Entity @Table (name = "player") public class player {// constructor etc ... @OptimisticLock (excluded = true) @ManyToOne (optional = true, bringing = FetchType.LAZY) @JoinTable (name = "cr_player_ref_player", joinColumns = {@JoinColumn (name = "player_id", unique = true)}, inverseJoinColumns = {@JoinColumn} Public player Reef Miller () {This return player.}} Now, in my program I use the following HQL query to all playerRef entities To get: query playerRefQ = session.createQuery...

php - ZF2 Autoloader: Use factory for base class on extended classes as well -

If I increase my base class for any of the squares, then in the base class factory named function, Is a Better Way? $ serviceManager = & gt; Array ('factory' = & gt; array ('someBaseClass' = & gt; function ($ this service manager) {$ db = $ get this service manager- & gt; get ('db'); $ thisBaseClass = new \ MyNamespace \ thisBaseClass ($ db); return $ thisBaseClass;},));); Edit Also for the answer I accepted, here is the code I have worked on. class file use Zend \ ServiceManager \ AbstractFactoryInterface; Use Zend \ ServiceManager \ ServiceLocatorInterface; Class base classifier device \ Zend \ ServiceManager \ AbstractFactoryInterface {public function canCreateServiceWithName (ServiceLocatorInterface $ locator, $ name, $ $ Requested name = '') {Return ('baseClass' === $ name || is_subclass_of ($ name, 'baseClass' )); } Public Function createServiceWithName (ServiceLocatorInterface $ locator, $ name, $ r...

node.js - How to serve the default angular seed/tutorial app on the root route? -

Image
I'm using this as the basis for creating an app. However, when I start NPM, I have to go to localhost: 8000 / app / to get the app. I would like to change the route so that I can run the app on the root path ( localhost: 8000 / app / ). Where can I configure? I have just tried to move the app / app from root but it breaks NPM / build scripts. Without running the project itself (after all this is Sunday), it seems that you have the package Inside the start command / app path will need to be added. Jesen Also check the http-server docs to know more about the omissions - Other things may depend on the basis of ./ That is, there can be something breakage. should read something like this "Start": "http-server / app --domain 0.0.0.0 --port 8000",

php - custom captcha submits form even if code is not correct -

I am using a custom captcha but submitting this form even if the code is not correct, here the index page The main code is $ (document) .ready (function () {$ ('# send'). Click (function () {// name validation var nameVal = $ ("# name "Val (('' Label class =" error "id =" name_error "> if (nameVal == '') {$ (" # name_error "). Html (''); $ (" # Name ");) (/ '&.) + @ ([\ W -] + +.) + [\ W -] {2,4}) $ $ /; var Email Address = $ (" # Email "). Val (); if (emailaddressVal == ('& lt; label class =" error "id =" email_error "& gt; Please enter your email address. & Lt; / label & gt;';) Returned if} otherwise! ($ EmailReg.test (emailaddressVal) {$ ("# email_error"). Html (''); $ ("# Email"). ('& Lt; label class = "error" id = "Email_error" & gt; Enter a valid email address. & Lt...

javascript - css jquery Background fade to black upon clicking button... unknown bugs -

I'm a newbie on this. I have created a demo here: But there is something wrong with that code which prevents it from working. All I want to do Clicking on the button will turn black. The black background will fail to click on the button again for the second time. It should be easy to do but I think there are some bugs in the code, thanks for any useful advice! HTML & lt; A href = "#" class = "btn btn-default" data-toggle = "active" & gt; Button & lt; / A & gt; & Lt; Div id = "overlay" & gt; & Lt; / Div & gt; CSS #overले {width: 100%; Height: 100%; Opacity: 0; Background: '# 000'; Top: 0; Left: 0; Transition: Opacity .25s; -Mozy-infected: ambiguity .25s; -Wbkit-Infection: Opacity .25s; } .backdrop {Fuzzy: .4! Important; } {/ Code> JS / jQ $ (document) .ready (function () {function toggle () {$ ('# overlay'). Toggleclass ('Backdrop');} $ ('[data-tog...

php - Facebook api: "open_basedir restriction in effect" -

I have uploaded my script for Facebook script, which is based on Facebook php API 4.0, PHP 5.4 on web hosting Supports, but I'm getting WARNING: is_readable (): Open_basedir restriction in effect. The file / (/ dev / urandom) is not allowed within the path: /home/myuserid/public_html/Facebook/FacebookRedirectLoginHelper.php in line 244 (/ home / myuserid: / usr / lib / php: / tmp) Line 244 and some of the following if (is_readable ('/ dev / urandom')) {$ fp = fopen () '/ Dev / urandom ',' rb '); If ($ fp! == incorrect) {$ buf = fread ($ fp, $ bytes); Fclose ($ FP); If ($ buf! = FALSE) {return bin2hex ($ buf); }}} If this can be helpful, here is the original login script: ; GetSessionFromRedirect (); } Catch (FacebookRequestException $ East) {// Facebook gives an error} Catch (Exceptions $ pre) {// When validation fails or if we have one session see other local issues} // If (isset ($ session) ) {// Graf API Request for User Data $ Request ...

python - Appending a list which refers to a list inside a function -

I have the task of preparing a blackjack game in Python, allowing 4 human players to play automatic houses simultaneously. gives. / P> I have to use a function 'get_deck' (see code below). I am struggling to get a card from 'get_deck' and add it to the player list. I used to manage the program while using my own defined list for the card, but for this assignment, I have to use the 'get_deck' function. '?????' In the code given below, where I have referenced my first card value list. This is my code: def get_deck (): deck = [value + value for suit 'SHDC' for the suit '23456789 TJQA'] random. (Deck) return IAR (deck), while correct: get_deck () player1 = [] player 2 = [] player3 = [] player4 = [] home = [] player1.append (Random.choice (?????) ) Player2.append (random.choice (?????)) player3.append (random.choice (?????)) player4.append (random.choice (?????)) house.append ( Random.choice (?????)) player1_bust = wrong player 2_...

PHP Explode using a space but how to find two word matches -

For a news script, I want to recognize the content of the artist about the user, so if they mention an artist So I want to put it in an external database and when a person sees the article, they can see the articles that are reading the article. But I have a creativity problem that keeps me back. I use an explosion function to isolate the words: function multiexplode ($ delimiters, $ string) {$ ready = str_replace ($ delimiters, $ delimiters [0], $ String); $ Launch = explosion ($ delimiter [0], $ ready); Return $ launch; } $ Pieces = multi-explode (arrays (",", ".", "|", ":", "", "", "& Gt;", ""), $ _POST ['article_content']) ; So if I have mentioned artist Afrozak for example, then I can get it back in the array of pieces. Works well but there is a problem. If for example the user mentions Nikki Romero, the artist is spread over two arrays and I probably can not find it in my databas...

javascript - Obtaining page maximum height in Jquery -

I do not know that I am specific enough, but I have a lightbox-style FEDIN background but I It seems that the background will not reach the bottom of the page. So when I scroll, white background is visible again. Here's the demo: HTML & lt; Body & gt; & Lt; Div id = "overlay" & gt; & Lt; / Div & gt; & Lt; One style = "position: absolute;" Href = "#" class = "btn btn-default" data-toggle = "active" & gt; Button & lt; / A & gt; & Lt; Div class = "east height" & gt; & Lt; / Div & gt; css #overlay {position: absolute; Width: 100%; Height: 100%; Background: # 000; Top: 0; Left: 0; Opacity: 0; Transition: Opacity .3s; -Moose infection: ambiguity .3s; -WebKit-Infection: Opacity .3s; } .backdrop {Fuzzy: 0.4! Important; } .ex-height {height: 1204px; } Jquery $ (function () {function toggle () {$ ('# overlay'). ToggleClass ('backdrop...

java - Why do I get N+1 select queries when lazy loading many-to-many entities -

I just hope to have a SQL query, but I'll go to the N + 1 selected network. I really do not understand why there is a problem in detail here: I have a single unit "player": @ entity @Table (name = " Player_ref ") Public class PlayerRef {// Creator etc ... @OptimisticLock (Excluded = true) @LazyCollection (LazyCollectionOption.TRUE) @ManyToMany (fetch = FetchType.LAZY, mappedBy =" playerRefs ") set public & lt; Player & gt; Millplayer () {Return Player; }} and a class player: @Entity @Table (name = "player") public class player {// constructor etc ... @OptimisticLock (Excluded = true) @LazyCollection (LazyCollectionOption.TRUE) @ManyToMany (fetch = FetchType.LAZY) @JoinTable (name = "cr_player_ref_player", joinColumns = {@JoinColumn (name = "player_id", unique = true)}, InverseJoinColumns = {@JoinColumn (name = "player_ref_id"}} Private set & lt; PlayerRef & gt; GetPlayerRefs () {thi...

ios - Localization not working on Xcode -

I can not work with my app localization. I have a localization The strings file and the languages ​​that I have localized are marked. (For now I am base, English and Spanish.) Local storyboard with three languages. In the Project Settings> I checked the information Usage of base internationalization and all languages ​​are correctly added. (Besides this, it displays 2 files localized next to the language, which I think should be a storyboard and a .string file. I am using this example: self.loginLabel.text = NSLocalizedString (@ "login", @ "login text information"); "login" = "log in" like this; However, this is not working and instead it Showing login . I have forgotten the important step? BTW: I have already tried to replace the login text overriding the label. However, instead of just the base, make sure you are one Line also add English and Spanish fi les (clearly translated as appropriate). Next...

ruby on rails - Unable to save or update ticket status -

I am making ticket booking applications for my sample project using Ruby on Ruby 4.1. There are three three models - There are many tickets and reservations in the event, tickets and booking events. There are many tickets in the ticket and they are related to the events. Booking is related to events and tickets. Here is a ticket model: class tickets & lt; ActiveRecord :: base is_many: event has_many: booking before_create: check_start_date before_update: def self.check_start_date check_start_date if self.booking_start_date == Date.today self.update_attribute (: position => Open ') end end Ticket Controller: Class Ticket Controller & lt; ApplicationController def index @event = Event.find (params [: event_id]) @tickets = @ event.tickets.all enddef show @event = Event.find (params [: event_id]) @ticket = @ event.tickets.find (Params [: id]) End DEF New @event = Event.find (params [: event_id]) @ tickets = tickets. Make New End DEE @Avent = Event.Find (PARAM ...

visual studio - Can't initialize structure with * void pointer in C -

मेरे पास संरचना है: typedef struct नोड {char * question; संरचना नोड * नहीं; संरचना नोड * हाँ; } नोड; संरचना सूचक के लिए स्मृति प्राप्त करने की कोशिश कर रहा है: नोड * n = malloc (sizeof (नोड)); और संकलन त्रुटि मिली: प्रकार का एक मान "शून्य *" प्रकार "नोड *" की एक इकाई को प्रारंभ करने के लिए नहीं किया जा सकता मैंने दृश्य स्टूडियो 2012 को सी कोड संकलित करने के लिए कहा - सी कोड (/ टीसी) के रूप में संकलित करें इस समस्या को कैसे हल करें? malloc () के शून्य * को आपके नोड * 100% मान्य सी है, और आपकी समस्या यह है कि आपके कंपाइलर आपके कोड को सी ++ के रूप में पढ़ते हुए कुछ कारणों से आ रहा है जो कि आप / TC ।

html - Menu links are unclickable in parent negative z-index container. -

Image
I need to design menus like images. I have achieved this to radius and negative layers up to the limit but the fourth and The fifth menu item can not be clicked on. Your suggestion is required here Getting the Menu Design: Problems adding classes Security has been solved. Since the "third menu" is at the top of all the menus (layer) and "second menu" and "fourth menu" are at the same level, similarly in the "first menu" and "fifth menu" there is also the same level of layers. Received .memu div.three {status: relative; Z-index: 3; }. Menu div.four {status: relative; Z-index: 2; }. Menu div.five {status: relative; Z-index: 1; } it has been updated

copy - Copying a file to a different folder and renaming it with the current date -

I am trying to recreate a VBScript which I wrote that will copy one file to a remote volume, Then rename the file with the current date. For this, Google (and SO) has a bunch of results, but I can not get hold of it right what I have, but when I run it, it returns a error "finder gets an error: Handler can not control the objects of this class. " on duplicate commands. Set date {date:}} with {date:}} set {day:}} to set (current date) with {year: y} (current date) date to mm & amp; "-" & amp; D & amp; "-" & amp; Y set filename to date & amp; "Finder" duplicate POSIX file "/ User / RHPT / Documents / Feel" for ".xml" POSIX file "/ Volume / Public / Backup" set name "POSIX file" ("/ version / public / backup / file") XML for the file name as "nickname .xml" as the nickname. Try: mm set {month: mm, day: day, year} y} "& Y as text set file Set the nam...

Equivalent of LabVIEW Threshold 1D Array Function in Python -

क्या लैव्यू थ्रेशोल्ड 1D अर्रे फ़ंक्शन की बराबर है: अजगर में? मुझे एक के बारे में नहीं पता है, लेकिन यह लिखना बहुत छोटा है। आप निम्न कार्य को फ़ंक्शन में लपेट कर सकते हैं p = next (ii के लिए ii, v in enumerate (x) अगर (v & gt; = y)) frac = p-1.0 + (float ) - x [p-1]) / (एक्स [पी] -एक्स [पी -1]) उपरोक्त में, x इनपुट डेटासेट है , y वह मान है जिसके लिए आप फ्लेक्शनल इंडेक्स चाहते हैं frac है, अच्छी तरह से ... छोटा विवरण: एन्यूमरेट (एक्स) एक इटरेटर बनाता है जो कि x से देता है (सूचकांक, मान)। तो, वे जो हो ii, v में डालते हैं।

php - How to loop through elements (one field) in the mySQL table -

How to access the first element in the last element of the column and how to write a PHP code to output another PHP function is . & lt ;? Php $ mysqli = new mysqli ("localhost", "root", "", "whit"); / * Check connection * / if (mysqli_connect_errno ()) {printf ("Connect failed:% s \ n", mysqli_connect_error ()); Go out(); } $ Query = "Select Website From Websites"; If ($ result = $ mysqli- & gt; query ($ query)) // // To pass the PHP code to the first element till the last element of the column website and pass the output to another PHP function} / * free Result set * / $ result-> near (); } / * Close connections * / $ mysqli- & gt; Close (); ? & Gt; read the php manual: while ($ Line = $ result-> gt; fetch_assoc ()) {your_function ($ line ["website"]); }

HTML5 audio blob would not play on Android -

I serve an audio file (WAV file containing a small uncompressed PCM) from my GAE app while using Bluetooth I am here. On the click event, I set the audio. Src and call audio.play () . Now it's a weird part: While working locally - it performs well on both iOS and Android. After deploying GAE, it plays well on iOS - but not on Android ! No errors were shown - it just does not play anything, as far as I can tell from the GAE log, all the files have the audio file . In the case of Android, I can see a request from "Player / LG Player 1.0 for Android 4.4.2". What's going on, or how to debug it? According to the suggestion of Stuart Langley, tried to run the file from Google Cloud Storage In that case, Android plays well, and IOS does not (gives an error from one side.) Then a solution for me is storing files on cloud storage, and calling it to createGsBlobKey For it a blob. On behalf of the client, I check whether this is Android ( Navigat...