Posts

Showing posts from August, 2014

windows - How to read Bluetooth Low Energy RSSI in Java not android -

I have a Bluetooth low energy USB that is based on Ti CC 2540, I just need to scan RSSI values Other beacons use my computer and save it in the database (MySQL, etc.), is there a Java library which does this? I know how to do this in Android but I have to do it on my PC which is working on Windows I'm working on a Linux platform with similar applications. The first C-program that searches for BLE enabled devices through the terminal, make sure that you have set up blues and BTM strcpy (command, "pseudo. / Btmon & hcitool lescan "); System (order); Run the file compile and run through Java and read the console's inputstream. Processor Builder = New process builder ("/ beacon"); Builder.redirectErrorStream (true); Process process = builder.start (); InputStream = process.getInputStream (); BufferedReader Reader = New BufferedReader (New InputStreamReader); People get you the stream of data that you can view for RSSI values ​​and expo...

How are chapters handled in Typo3 Neos? -

I want to use chapters and chapter-menu like That image gallery, reference module or other archive Typo3 Neos There are several domains with different content in my installation because I do not have nodeset. There is a problem with Yamal: All site packages are based on NeosDemoTypo3Org. Because I do not have to make many entries "Chapter", "Chapter Menu", "YouTube" and so on, I nodesteps in my copies of NodedipoAudio. Yumal has been removed (which is still established). When I add a page to the element's element "chapter menu" and put some chapters in it, the chapter observation is displayed only if the nodtip back in my package configuration. But still I have several entries of the same thing. How can I configure this to fit my needs? This should not be a problem. Just a chapter etc in a nodesite. Yamal is enough for now (as long as we do not apply separation on the site that we have to do at some point). But I think that...

reachability - No internet at startup of iOS application - Keep retrying -

I want to test the startup of the application, if the device is connected to the Internet, do not notify the warning For the need of a device connected to the Internet, stop it from launching the app, if it is not connected, and at any time if it is disconnected, then to reload the app, it's like the principle of class conflict Is the only ... loads for the internet On trust, if someone does not load Internet app us..And someone loses time user connection, the app will restart. Any idea how to do this? Use the library to add it to the appellate: Internet Reachability = [Reachability Possibility: Hollow Name: @ "www.google.com"]; Internet accessibility is internet accessibility. RecycleBlock = ^ (Reachability * Access) {// Main Thread Dispatch_Assic (Update on Dispatch_Jet_man_clu ()), {{NSLog (@ "Internet connection established"); // update accordingly, use storyboard or navigation stack}); }; // Internet is not accessible to internet. Inevitable = ...

regex - what is wrong with my regular expression (\d.\s.V13\d+\s.N\d.\s.\w*)? -

मेरे पास यह स्ट्रिंग है: 3 V1388832414 N1 G96ca813824e9c752da0d0000ffe8688c और मेरा शासन है: \ d। S.vi13 \ d + \ sn \ d। \ S। \ W * लेकिन यह मैच नहीं है। मैं कहने की कोशिश करता हूं: एक अंक पहले और एक सफेद स्थान और चार वी 13 और किसी भी अंक में एक या एक से अधिक लंबाई और एक सफेद स्थान और चार एन और एक अंक और एक सफेद स्थान और किसी भी पात्र को किसी भी लम्बाई के साथ। आप इतने सारे अनावश्यक क्यों हैं । यह पर्याप्त होना चाहिए: \ d \ sV13 \ d + \ sN \ d \ s \ w * मुझे पूरा यकीन नहीं है कि क्यों । अपने regex में । का उपयोग किसी भी एक अक्षर से मेल करने के लिए किया जाता है और इसलिए आपका regex काम नहीं करता

android - Get a record from DB based on date? -

I want to get a record from the DB table based on the date. I have entered a file called "Date" in my table and I store the date in the format "yyyy-MM-dd HH: mm: ss" at this date. Please help me I have tried with this. Here is my "TABLE_NAME" "Date" my column name here cursor cursor = mDb.rawQuery (select date DESC range 1 from date to date " ,Zero); Cursor cursor = mDb.rawQuery ("Date from date SELECT MIN (date) to date", empty); My table has been created but sorting alone is not good. I am getting a response for this sorting, but the sorting does not seem right.

php - Is it acceptable to use a wrapper class to hide errors? -

Is it OK to wrap a global array in the class to hide undefined errors (and Returning wrong) with OOP? If not, then why? I am using the following input wrapper class. Primarily using it with my FormValidator class, so that I do not want to use / use the amount of input for the isset () to write. Class Input {Private $ _ Sons; Public function __ composition (array $ source) {$ this- & gt; _source = $ source; } Public function is present () {Return! Lower ($ this-> _source); } Get public function ($ input) {return (isset ($ this- & gt; _source [$ input]))? $ This- & gt; _source [$ input]: wrong; }} Good comments on your question, there are different ways and maybe The better built-in concept you can use to solve the problem of use. But to answer your question about OOP practices in PHP, I certainly argue that the hiding errors in your wrapper class are legal. I consider this as a black box and the concept of that error is not known because your in...

html - Full height navbar links in a list -

This is my code: I am thinking that what is right The meaning of creating my navigation link is that the entire height of the navigation bar is centered vertically. I tried to set a link with a line-height but Navbar did not affect the height of the link. Any help would be appreciated, thanks. I believe you want to add: A {text-decoration: none; Font-size: 40px; } and . Navigation Lee {color: #fff; Font-Family: 'Helvetica New', Helvetica, Ariel, Non-Serif; Line-height: 60px; Padding-left: 30px; Padding-right: 30px; } You can find a demo here:

Multi level hash/dictionary creation in C++ -

I have lost a bit, I have a CSV file like USN name dob cm Percent 111 ABC 07/03 3 88 112 CD 18/07 4 77 123 G 15/11 4 80 I use a type of type structure (multilingual dictionary using C ++) I want to create code> dictionary & lt; string, dictionary & lt; string, string & gt; & gt; ). Here I want to store the first row as the key ie USN, name, DOB .. In the form of Is it possible to have the keys of the hash and the value of the value hash in that column? Any help would be greatly appreciated .. Thanks in advance. In view of your question, you will see unordered_map , which is C ++ 11 is standard and is very common in the previous implementation. If performance is not very important (or really small map) you can also use the map , then you can: using namespace std ; Unordered_map & lt; String, unordered_map & lt; String, string & gt; & Gt; Dict; After that, it's a question of parsing your CSV file ...

objective c - How to dealloc memory of an array in iOS? -

I have created up to 150 UIwebviews and stored my array in named NSArray. After using those webviews, I do not need those 150 webviews. Then I created another 100 UIWebView and stored in myArray. I thought the first 150 webviews will be automatically distributed. But when I checked in the device, then 250 web views are alive. How to release memory manually? I am using ARC, so I am not able to use the release method. Please advise. Use it: NSMutableArray * webViews = [NSMutableArray new] ; [WebViews addObject: [self createWebView]]; for (NSInteger i = 0; i & lt; 150; i ++); [Remove webviewallobject]; [WebViews addObject: [self createWebView]]; for (NSInteger i = 0; i & lt; 100; i ++);

Azure storage - disable use of authorization header -

Image
Is it possible to configure the Azure archive to ignore the contents of the authority HTTP header? It seems that Azure always tries to use Hemara, even if it is configured for anonymous access and receives a pure GET request. Leaving the field blank is not an option in my scenario. Configure Ezur for unknown access. Use a plugin like Postman to create a GET request. Set the "Authorization" header for the value such as "This is a non-blue related authority header which is part of the request for technical reasons." The ezur reacts with HTTP status code 400. Request without authorization header: Request with Authorization Header:

java - Receiving error when trying to run my program -

मुझे थ्रेड "मुख्य" java.lang.NumberFormatException में त्रुटि अपवाद प्राप्त हो रहा है: इनपुट स्ट्रिंग के लिए: "3 50" में नीचे दिए गए कोड और मुझे इसे सुलझाने में कठिन समय आ रहा है। क्या कोई संभवतः उस पर प्रकाश डाल सकता है जो वह हो सकता है? मेरी समझ से इसका आम तौर पर मतलब है कि त्रुटि 3 पंक्ति और पंक्ति 50 में सही है? पैकेज report.generator; आयात करें java.io.buffferedReader; आयात करें java.io.FileReader; आयात करें java.io.File; Import java.io.filewiter; आयात java.io.buffferedWriter; आयात java.io.IOException; सार्वजनिक वर्ग रिपोर्ट जनरेटर {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {BufferedReader br = null; बुफ़ेदार वाइटर बीवी = नल; कोशिश {br = नया BufferedReader (नया FileReader ("C: \\ sprocketorders.txt")); स्ट्रिंग रेखा; स्ट्रिंग तत्व [] = नई स्ट्रिंग [2]; Int sum [] = नया इंट [5]; फ़ाइल फ़ाइल = नया फ़ाइल ("सी: \\ sprocketordersreport.txt"); जबकि ((पंक्ति = ब्र.रेडलाइन ()) = = शून्य) {element = line.split (""); स्विच (पूर...

wordpress - Dropdown of existing posts in a metabox -

Image
I have the ability to select one page, which should appear in a sidebar, from multiple post types. So I understand that I need a meta box with a dropdown list of all the positions, but I do not know how to create it in the function. All I want is exactly the same, but this does not help me much, because I can only select from a post type and can display in the post pages. is a free plugin that will solve all your troubles. It says. It has the ability to add a list of posts to a field and attach that field to pages. Here's how you would do it: First install the plug-in and navigate to the custom field screen. Fix your area like this: Then you need to select these options in the options given below that section: This will play ACF only on pages. After setting up you will get a small sidebar block like this: You can then select each post for the page and it will return that object to the frontend. To impose the required positions for you, you need to use a...

php - Show image based on label - jQuery Datatables -

I'm trying to show images based on some labels with the jQuery datatables. & lt ;? Php while ($ row = mysql_fetch_array ($ result2)) {? & Gt; & Lt; TR & gt; & Lt; TD & gt; & Lt ;? = $ Line ['ip'] & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt ;? = $ Line ['agent'] & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt ;? = $ Line ['verified'] & gt; & Lt; / TD & gt; If ($ line ['label'] == "other") {& lt; Td> & Lt; Img src = "imgb.png" & gt; & Lt; / Td> } Other {& lt; Td> & Lt; Img src = "imgc.png" & gt; & Lt; / Td> } & Lt; / Tr & gt; & Lt ;? Php}? & Gt; The problem is that 'if part' is not working, it shows only two images ($ line ['label'] == "other") {} other { } If ($ line ['label'] == "other crawler") {} Else {} if ($ line ['label...

php - Querying for days where bookings already exist -

I have a booking table, I would like to ask to know which day before they have future bookings , Especially the space. ID Buyer Timetable Endadays Vehicle Spec Situation 2 5 2014-04-29 09:00:00 2014-04-29 21:00:00 2 1 1 3 6 2014-05- 03 13:00:00 2014-05-03 18:00:00 3 1 1 So the result should be as follows (meaning that at least one booking is present on that day) : Mangal Mouth debate through Venus Sat true true false false false false false Then there is a booking in my exanmple on Saturday May 3, hence the result The Saturn column will be true because it is booking on Saturdays. The tu columns will also be true because there is a booking on 29th April, which is Tuesday. Let's say that there is no future booking for space on any day which is Wednesday, so the pillar of Wednesday is false. Whatever you can gather, you are trying to do something like this: $ query = mysql_query ("Select Book WHERE datetime = '$ datetime'"); $ Taken = mysql_nu...

javascript - Get all items in NotesXSPDocument -

In my notes database, I audit when the document is saved. Lotuscript is very easy, I take the original document from the server (oDOK), then in the document that I have modified (MDOC), I loop a follower who receives the names of each item; Hold the same item from the ODoc for all items in the MDoc.items, execute a function with new items as an argument that will run a case statement that will see if there is an area in which we Care about If so, then I update a set of list values ​​in the document with "when", "who", "what field" and "new value". I'm doing this on server side script. In this endeavor, I discovered some interesting things; The current documents are notes-SSP documents, in which everything was changed. currentDocument.getDocument () includes pre-conversion values, it also gives a notes document that contains the "item" field through which I can run. The thing is, I need something similar in the notes p.pd...

python - Append to dataframe from another with calculations -

I have 2 CSV files that I have read and make 2 dataframes out of them. I am taking another dataframe and doing some calculations with it to attach to the first dataframe. Although it does not appear that the data that is already attached to the frame is actually happening. What do I need to do to correct this? Here the code is using I: as PDF meter = pd.read_csv ('DailyHistoricData.csv', header = none, index_col = 0 ) F = pd.read_csv ('ImportFMP.csv' import panda, header = index in range (lane (f)): a0 = f.ix [index, 0] a1 = f.ix [index, 1] a2 = F.ix [index, 7] a3 = f.ix [index, 8] -f.ix [index, 9] a4 = 100 * fx [index, 2] a5 = fx [index, 10] -F.X [index, 11] A6 = F.x [index, 3] a7 = f.ix [index, 4] a8 = f.ix [index, 5] a9 = f.ix [ Index, 6] m.append ([a0, A3, A4, A5 a2, A1, A6, a7, a8, a9]) print m.tail (3) The information for F is: & lt; class 'pandas.core.frame.DataFrame' & gt; Int64Index: 720 entries, data columns to 0 719 (total 1...

dll - Where are the default icons of components in C# stored? -

I would like to load the timer icon in the main form icon, but it can not be stored. So my question is: Which DLLs are the symbols of the stored components (where the timer icon is stored)? The icons you are referring to include resources such as .NET Framework Assemblies Has been embedded in. You can get different images and icons from

ios7 - iOS TapGesture not working -

I initially had a label and added a gesture identifier. It was working, I added the same gesture identifier to another label, stopped working on the first label and continued to work on the second label, which is very incompatible. Sometimes it works on the first label and sometimes happens on the other. Even the behavior on the device is similar. Any ideas please. Visual Control implements the UIGestureRecognizerDelegate Protocol. label1.tag = 8; Label2.tag = 9; UITapGestureRecognizer * Taperexizer = [[UITapGestureRecognizer alloc] initWithTarget: Auto Actions: @selector (foundRecognizer :)]; TapRecognizer.numberOfTouchesRequired = 1; TapRecognizer.numberOfTapsRequired = 1; [Set tactic set: self]; Label1.userInteractionEnabled = Yes; Label2.userInteractionEnabled = Yes; [Label 1 adiastariotiszer: tapprice]; [Label 2 addGestureRecognizer: Tapraciser]; says, "A gesture identifier touches the hit-test for a particular scene That's all the subwives of that scene. It s...

javascript - jquery after appendTo cannot focus on input box -

After adding the input box to another element, it will not allow the click in the box (the focus immediately goes away). why will? Here HTML & lt; Div id = "placeholder" onclick = "appendsearch ()" & gt; Placeholder & lt; / Div & gt; & Lt; Input id = 'box' type = 'text' & gt; & Lt; / Input & gt; JS function append search () {$ ("# box"). AppendTo ($ ("$ placeHolder")}} An attachment method that returns input The reason for losing focus is because the input is now in the div, and it is calling the function on click, the following code will be the account for it. function append search () (if ($ ("# spacehold input"). Length == 0) {$ ("# box"). AppendTo ($ ("#placeholder") );}}

jquery - beforeunload on Chrome -

I have this code that will redirect the user to any other URL whenever it closes the page. It's working on Firefox, IE, Safari, but not in Chrome. This will not redirect the user to the new URL. jQuery (document) .ready (function () {jQuery (window) .bind ('beforeunload', function (e) {location.href = "http: // google Before you leave the .com / "; return", please take a look at this limited time offer. ";});}); Not sure what you want, it will redirect the user if that option To stay on the page: var a, b; Window.onbeforeunload = function (e) {if (b) returns; A = setTimeout (function () {b = true; window.location.href = "http://google.com";}, 500); Return "Before you leave, please take a look at this limited time offer."; } Window.onunload = function () {clearTimeout (a); }

XSLT: How to get a key from current page's items only (Umbraco)? -

I am using XSL in Umbraco to obtain and obtain a list of objects related to the current node. This list of items is created from the "embedded content" plugin content type. I've found this too: & lt; Xsl: key name = "key-name" match = "listOfItems / data / item" use = "itemKeyName" /> but this all from Umbraco node Actually selects listOfItems , I need a key to match with $ currentPage / listOfItems / data / item , but as I xsl: key can not use the variable, how can I get it? There are several XSLT examples for the Oumbrco tree translcal:

Python - How to get http response of site -

I want to make a dragon checker to check an http response for a site I Script other person script like this import pycurl import cStringIO import curl re = pycurl.Curl () hobby = cStringIO.StringIO () hdr = cStringIO.StringIO () Curl.setopt (pycurl.URL, 'http://example.org') curl.setopt (pycurl.WRITEFUNCTION, buff.write) curl.setopt (pycurl.HEADERFUNCTION, hdr.write) curl.perform () Print "Status code:% s"% curl.getinfo (pycurl.HTTP_CODE) # - & gt; 200 status_line = hdr.getvalue (). Splitlines () [0] meters = re.match (r'HTTP \ / \ * * s * \ d + \ s * (. *?) \ * $ ', Status_line) if m: status_message = m.groups (1) Other: status_message = '' print '' status message:% s "% status_message # - & gt; > www.google.com www Facebook.com www.twitter.com you get a .txt file for example: import urllib f = ('list.txt') for L in open f: try: python3.x use # For: x = urllib.request.urlopen ('http: //...

mysql - Sql query for like operator -

I have a search box where the user enters and submits anything in the text box. Indicate that the user enters Peter. If we are comparing in SQL, with the following query the table select * from XML where the name '% peter%' this question is well Works, but when I only want to search for Peter in the string, then it creates a problem. When I want to find only those rows that exist in the column called Peter column. Name in column, value 1- My name is Peter Valu2- My name is Petreter Valu3- My name is staying in America Peter. When I want to find it should be given only the first and the third line. Not at the second number. To get three lines with the above question. How can I correct it? Please guide it on "name with code * / div>

authentication - <sec:authorize> doesn't work -

मेरे पास निम्न उपयोगकर्ता एक्सएचटीएमएल पृष्ठ है: & lt; html xmlns = "http: //www.w3.org/1999/xhtml "xmlns: h =" http://java.sun.com/jsf/html "xmlns: f =" http://java.sun.com/jsf/core " Xmlns: p = "http://primefaces.org/ui" xmlns: sec = "http://www.springframework.org/security/tags" & gt; & Lt; शीर्ष & gt; & Lt; title & gt; उपयोगकर्ता & lt; / title & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; p & gt; उपयोगकर्ता & lt; / p & gt; & Lt; sec: अधिकृत करें access = "हैरोल ('ROLE_ADMIN')" & gt; & Lt; p & gt; केवल व्यवस्थापक इसे देख सकता है! & Lt; / p & gt; & Lt; / सेकंड: को अधिकृत & gt; & Lt; / body & gt; & Lt; / html & gt; लेकिन जब मैं किसी ऐसे उपयोगकर्ता के साथ पृष्ठ तक पहुँचता हूं जिसकी ROLE_ADMIN भूमिका नहीं है, तो वह अभी भी "केवल व्यवस्थापक ही देख सकता है!" संपादित करें: यहां मेरा स्...

php - Authorize.net AIM Transaction -

need_once 'anet_php_sdk / AuthorizeNet.php'; परिभाषित करें ("AUTHORIZENET_API_LOGIN_ID", $ AUTHLogin); परिभाषित करें ("AUTHORIZENET_TRANSACTION_KEY", $ authKey); // सेट खाते के लिए सही पर सेट, वास्तविक खाते के लिए गलत पर सेट करें परिभाषित करें ("AUTHORIZENET_SANDBOX", सच); $ बिक्री = नया प्राधिकृतनेट एएएमएम; $ बिक्री- & gt; राशि = $ कॉन्ट्रैक्टरराइट; $ बिक्री- & gt; कार्ड_नाम = $ ccnumber; $ बिक्री- & gt; exp_date = $ ccexpire; $ बिक्री- gt; card_code = $ cccvv; $ प्रतिक्रिया = $ बिक्री- & gt; प्राधिकृत करें और कैप्चर (); // यदि मंजूरी दे दी है, लेनदेन आईडी प्राप्त करने के लिए इसका इस्तेमाल करें अगर ($ प्रतिक्रिया- & gt; स्वीकृत) {$ transaction_id = $ response- & gt; transaction_id; // एआरबी सदस्यता तैयार करता है और सबमिशन के समय से 30 दिनों की आरंभ तिथि सेट करता है। Need_once 'anet_php_sdk / AuthorizeNet.php'; परिभाषित करें ("AUTHORIZENET_API_LOGIN_ID", $ AUTHLogin); परिभाषित करें ("AUTHORIZENET_...

PHP array_merge combining arrays with same values -

I have two arrays which I am adding to one and I have several that may possibly be duplicates. Looked and it makes great sense. This is an example that I am trying to achieve. array1 ('make and model 1', 'make and model 2', 'make and model 1' ...); Array 2 ('serial number 1', 'serial number 2', 'serial number 3' ...); Array 3 ('Other make and model 1', 'Other make and model 2', 'other AK and model 3' ...); Array 4 ('Other Serial Number 1', 'Other Serial Number 2', 'Other Serial Number 3' ...); $ Make = array_merge ($ array1, $ array3); $ Serial = array_merge ($ array2, $ array4); Foreach ($ make, $ serial) $ model = & gt; $ Number): if (($ model == "") || $ model == "other"): ... code ... endiff; Endforeach; Now you can see that I have two make and model 1, what is happening is that it is in combination with arrays, but with the first make and model 1 Instea...

coldfusion - Returning all output using CFEXECUTE -

Image
मेरे पास निम्न की तरह एक CFEXECUTE टैग है: & Lt; cfexecute timeout = "10" चर = "परिणाम" नाम = "# पथ को चुनने योग्य" तर्क = "# myArgs #" & gt; & Lt; / cfexecute & gt; मुझे जो समस्या है वह यह है कि टैग द्वारा सभी आउटपुट को कैप्चर नहीं किया जा रहा है। जब मैं कमांड लाइन से सीधे निष्पादन योग्य चलाता हूं तो यह पाठ के कई लाइनों को दूसरे के बाद प्रिंट करता है, लेकिन एक ही समय में सभी नहीं। मुझे अंतिम पंक्ति में पाठ आउटपुट का निरीक्षण करने की आवश्यकता है। लेकिन जब मैं CFEXECUTE का उपयोग कर निष्पादन योग्य चलाता हूं, तो यह लगता है कि आउटपुट की पहली पंक्ति पर कब्जा हो रहा है, प्रक्रिया समाप्त हो गई है और फिर मेरी सीएफ़ लिपि चलाने पर वापस लौटें। क्या किसी और को यह सामना करना पड़ता है और यदि ऐसा कोई भी संभव समाधान है? अधिक जानकारी: नीचे दी गई छवि कमांड लाइन से चलने पर उत्पादित उत्पादन को दिखाता है पीएलए अनुभाग वह सब है जिसे सीएफ़ द्वारा वापस किया जाता है। मुझे जो जानकारी चाहिए वह हरे रंग का खंड है CFEXECUTE टैग वाले स्...

xpath - Get text but exclude node if it has a certain child in a for-each loop in XSLT? -

I am trying to get the following text divided into: bonaire, sint ESTATIUS AND SABA (BQ, BES, 535) KURASAO (CW, CEW, 531) Sint Maarten (Dutch part) (SX, SXM, 534) Out of this source (fraction): & lt; Td> Divided into: & lt; Br / & gt; & Lt; A href = "/ wiki / Caribbean_Netherlands" title = "Caribbean Netherlands" & gt; Bonaire, Sint Eustatius and Saba & lt; / A & gt; ( BQ , BES , 535 and ;) & Lt; Sup id = "cite_ref-7" class = "reference" & gt; & Lt; A href = "# cite_note-7" & gt; & Lt; Span & gt; [& Lt; / Span & gt; Note 4 & lt; Period & gt;] & lt; / Span & gt; & Lt; / A & gt; & Lt; / Sup> & Lt; Br / & gt; & Lt; A href = "/ wiki / Cura% C3% A7ao" title = "Curacao" & gt; Curacao & lt; / A & gt; (& Lt; tt> cw , & lt; tt & gt; CYW & lt; / tt>, & lt; tt & lt...

sockets - how to set proxy instead of real IP while sending http request in php? -

I want to hide my real IP when sending any http request in php. What should I do, is it possible? If not, is there any way to do this excepts PHP? When the server receives a request, then the customer should be able to send the reply back. It knows where to send the answer back because it knows the IP address of the customer, you can not establish an HTTP (or more commonly, a TCP) session with a spoofed IP address. At the IP level, you can send an IP packet with spoofed source address. Although it is not very good to connect to a web server. If the packet server does not have a TCP packet sent to port 80, then it is probably not likely to reach the server, it is likely to be blocked by a firewall, which is between the server and the Internet. As soon as you want to establish a TCP connection, a packet starts sending the customer to the connection connection, and the server responds until the customer receives a reply from the server , The connection is not established unti...

c# - Run Windows Phone 8.1 RT app under lockscreen -

How can I create my Windows Phone 8.1 app to run under the lock screen such as I can use the following code by using Windows Can I Phone in Phone: PhoneApplication Service. Present. Application idle datetime mode = disable identity mode. Disabled; PhoneApplicationFrame as rootfame = App.Current.RootVisual PhoneApplicationFrame; If (Rootframe! = Null) {rootfreem.obscqueued + = new event handler & lt; ObscuredEventArgs & gt; (Rootfreem_obscuser); RootFrame. Your School + = New Event Handler (Root Frame_Ansksk); } I am working on the Windows Phone 8.1 Runtime (Store) app because the Silverlight type is not one, so it seems that the phone applications service is not part of this API, so the above The code will not work. Does anyone have the idea that what is suggested to do this in the Windows Phone 8.1? PS If this is not possible because I am starting with fear then it is a matter, what are my alternate options? updated When the RT Windows Phone 8.1 app Is cre...

java - Use of scope property for Facebook authentication -

I am writing a Facebook API that needs access to the user's e-mail and publishes the timeline. I get these two links: I use scope and default to tell scope properties: org.springframework.social.facebook.security.FacebookAuthenticationService But none of the two solutions are working. This application uses Spring-Social-Samples like the starting point: @configuration- Enables EnableSocial public class FacebookConfig social configurations {@ Private Data Source Data Remove source; @Override public void addConnectionFactories (ConnectionFactoryConfigurer cfConfig, Environment env) {final FacebookConnectionFactory fbcf = new FacebookConnectionFactory (env.getProperty ( "facebook.appKey"), env.getProperty ( "facebook.appSecret")); Fbcf.setScope (env.getProperty ("facebook.scope")); CfConfig.addConnectionFactory (fbcf); } / ** * Singleton Data Access Objects which provide access to connections in all * users. * / @Override public Users...

database - Will SqlClient or ADODB work if SQL Server is placed on a centralized server in network? -

The scenario is that I will keep the database on a centralized server and use it in front of all clients, as I Adding the end and the end of the back, I go to this question whether I am using ADODB or SQLClient as my connection driver. I had given preference to the SQL client these days, but I'm not sure if this will work if the SQL Server has been placed on a centralized server?

python - Tagging spanish text with Unicode characters not possible with NLTK? -

I'm trying to parse some Spanish sentences that contain non-Eski characters (for example. Peilicula (film), anension (meditation), etc.). I am reading lines from a file which is encoded with UTF-8. Here is a sample of my script: nltk.corpus as imported as unit from import cess_esp to import nltk import system # - * - coding: utf- 8 - * - nltk import BigramTagger as b = f (code_sentences', encoding = 'utf-8' W + ') for line in ITER (F): output_line = "current line content before tagging-> + str (line.decode (' utf-8 ',' replace ')) print output_line results_file.write (output_line. Encode ('utf8')) output_line = "Ungram Tagger->" print output_line results_file.w Rite (output_line) s = line.decode ('utf-8', 'replace') output_line = tagger.uni.tag (s.split ()) print output_line results_file.write (str (output_line) .encode ('utf8' )) F.close () results_file.close () On this line: output...

java - Android: Empty Image in ImageSwitcher -

itemprop = "text"> I have an ImageSwitcher: XML: & lt ; ImageSwitcher Android: id = "@ + id / is" Android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: animateLayoutChanges = "true" & gt; & Lt; / ImageSwitcher & gt; code: is.setFactory (New ViewFactory) {@Override Public View makeView () {// TODO Automatic Created Stub iv = New imageView (getApplicationContext ()); iv.setScaleType (ImageView.ScaleType.FIT_CENTER); iv.setLayoutParams (New ImageSwitcher.LayoutParams (LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); return iv;}}); And on my onclick, I switch between some pictures if I add pictures to a click, it always shows a "blank / black" image between some pictures. I have an animation: in animation = animationUltimately Load animation (this, R. AnimationFrame left); Out of animation = animation utility. Load animation (this, R. anime. Autorat);...

node.js - Listen to channel matching the pattern on node redis? -

I am using node-radis Everything is working only I am subscribing to the specific channel but I am receiving messages from every channel: server code: socket.on ('connection', function (customer) {cons subscribe = redis.createClient (637 9), '127.0.0.1') subscribe.psubscribe ('tracking_ *'); Subscribe.on ("error", function (error) {console.log ("error" + mistake);}); Subscribe.on ("pmessage" (Message, message, "# channel +" received from channel "", "+ Message +;");}); Client.on ('message', function (msg) {log ('debug', msg);}); Client.on ('disconnect', function (log) (log ('warning', 'disconnect from radis'); subscribe.quit ();}) customer code: socket.on ('connect', function (data) {setStatus ('connect'); socket.emit ('subscribe', {channel: 'tracking_hi'});}); As you can see, I'm subscribing to the only su...

javascript - jQuery UI Dialog box and Leaflet -

I am trying to display a manual letter within a jQuery UI dialog box, but there is a conflict when: / P> $ ("# dialog-specified-route") .dialog ... is ready on the document. I tried an alternative solution to hide 'dialog-assign-path' with style 'Display: None', then transfer $ ("# dialog-assigned-route") .dialog ... Click Event Inside this, a leaflet map is displayed in the dialog box, but the dialog is not displayed correctly Can a sheet and jQuery solution provide a solution to the UI dialogue? & lt; Div id = "dialog-assigned-route" title = "assigned route" & gt; ; & Lt; Div id = "dialog-scheduled-route-list item-area" & gt; & Lt; Ol class = "selection" & gt; & Lt; Li class = "ui-widget-content" & gt; M60 & lt; / Li & gt; & Lt; Li class = "ui-widget-content" & gt; SBS 15 & lt; / Li & gt; & Lt; / Ol & gt; ...

ruby - refactoring tests that use assert_raises -

मेरे पास एक परीक्षण ब्लॉक है: वर्णन 'बिना' का वर्णन 'लेखक' करते हैं ((लेखक) {निल} यह ('असफल') {assert_raises (ArgumentError) {excerpt}} अंत का वर्णन 'शीर्षक' ऊपर के रूप में वही सामग्री नहीं है, लेकिन शीर्षक शीर्षक परीक्षण 'सामग्री' का वर्णन ऊपर के रूप में वही सामग्री # लेकिन सामग्री की समाप्ति का परीक्षण यह ठीक काम करता है और परीक्षाएं पास होती हैं - लेकिन यहां बहुत सारी पुनरावृत्ति होने के बाद, मैं रिफैक्टर करना चाहता था: वर्णन ' बिना 'आइए वर्णन' लेखक 'दें' ((लेखक) {निल} यह ('विफल करता है') {assert_failure (excerpt}) # इस पंक्ति के अंत में एक विधि को जोड़ा गया 'शीर्षक' का वर्णन ऊपर के रूप में वही सामग्री है, लेकिन शीर्षक के अंत में परीक्षण 'सामग्री' का वर्णन केवल ऊपर की तरह ही सामग्री है, लेकिन सामग्री की समाप्ति # पर परीक्षण करना और विधि यहाँ def assert_failure (उदाहरण) assert_raises (ArgumentError) {instance} अंत समाप्ति हालांकि यह नहीं है काम - मेरे परीक्षण निम्न त्रुटि के साथ विफल: ...

java - Using ExecutionEngine#execute(String) outside of a Transaction? -

I have just discovered 10 minutes to work against the testing database to test my unit to end the simple question Took about 25 seconds. The reason for this was that, obviously, I forgot to wrap a call in the execution eagin # execution (string) in transaction . I did not know that was supposed to be possible. Hmm My code looked like this: ... @ before public zero () {db = New TestGraphDatabaseFactory () NewImpermanentDatabase (); / * Create all test nodes and after public zero after relay * () {db.shutdown (); } @Test Public Zero Testing All Titles () {/ * Create Cipher Query / Attributes & lt; Maps & lt; String, Object & gt; & Gt; Results = Engine. Exept (cipher); / * Inserts all the things ... The deceptive part here is that execute () comes back once and executes the following statements is done. But before successfully ending, test stalls for about 25 seconds. Changing the statement without any intervals as expected: ... try (transaction trans...

salesforce - Call visualforce Page through scheduled apex -

I have a scheduled class that I would like to work in such a way that it is called a visible page that does things for the record is . At present the user has to click the button on separate records which call the visible page. I want to run it and execute it for scheduled Apex. Here is what I have so far. I named the visualforce page as a place holder for now. Any guidance would be very commendable! Global Level LastLoginUpdate's Implementable {Global Zero Execution (Scheduled Consultant SC) {List & lt; Case & gt; CASE = [SELECT ID, STATUS, Qi_FROCIVICICCC, from where the status = 'be billed']; (Case C: Case) {if (C.Stats == 'To be billed') {// Call CreateTraccInvoice; }} Updated cases; Instead of calling the page, }} In the controller class, the action method must be executed which is responsible for that page. If you look at the page you are mentioning, you can see the & lt; Apex: page controller = "myController" ... where m...

Is there something like remove(bool) in jQuery? if not, how to create an extension? -

I know that it exists: $ (".thing"). Remove () (1) Is there something like this? $ ("something.") Remove (wrong); Do not remove // ​​$ (".some") Remove (true); // Delete (2) If not, how can I expand $ ? I think the answer to my first question, (1), is "no" because I have read the documentation, but I think it is the other method As with .ogg (bool) is inconsistent or prop ("..", bool) $ Fn.remove_elem = function (flag) {if (flag) this.remove (); }; $ ("Something.") Remove_elem (true); Try it out.

arrays - Javascript - returning objects based on multiple properties -

I need to create a function that takes an array of object s And objects return a certain set of criteria that match what I've done so far is quite simple: (pseudocode) // input: conditions: {prop1: "x", prop2 : "Z"} // Source: [{prop1: x}, prop2: "y"}, {prop1: "x", prop2: "z"}; // output: array of objects with the same properties ; Values ​​/ / ex: // getObjects ({prop1: "x", prop2: "z"}, [{prop1: "x", prop2: "y"}, {prop1: "x", prop2: "z "}]); // Returns: [{prop1:" x ", Prop2: "z"}] // .... var for results = []; (Various prop in orb) {var match = false; (for different condoms in the circumstances) {if (cond === Prop. Where Conditions is an object that represents one or more properties that should be near the matching object. The problem is that it is returning duplicate objects in any way , Which obviously In can be. I know that this is a...

Jquery Mobile popup won't close -

I have been working with jquery mobile for a while and used different popups, today I am the one who The errors will not and will stop. Here is the code for popups: & lt; Div data-role = "popup" id = "questPop" & gt; Trial & lt; / Div & gt; And I'm opening it with $ ("# questPop"). Popups ("open"); $ ("#QuestPop") popup ("off"); Firebug gives me the typeError: this.options.container is undefined and Chrome says Uncount Type error: Properties 'One' can not be undefined Should be placed with class ui-container

Temporary file upload location in Asp.Net MVC web deploy -

I use web deployment to publish "Publish" of Visual Studio 2013 and Web Asp.Net MVC 5 website . However, when I update my website, it will not work during upload. I am looking for a way to reduce website downtime during the update. The website is running in VPS and I have full access to it. A solution coming to my mind is to configure web deployment to be uploaded in a temporary folder and after the upload is complete, new files should be replaced. This update will make a few seconds at the top. I can do it manually, but this is not a great way to update someone's website. PS: Maybe there are better ways to update the website but so far I like web deployment. For example, it is very fast compared to FTP. One of the most interesting things I have seen is that two websites are running at only one of them . After the upload completes, you disable the active, and you can enable whatever you have uploaded. This works fine if both are in the same application pool ...

unit testing - JUnit Tests: User Input -

इस सवाल का पहले से ही एक उत्तर है: 7 जवाब वर्तमान में JUnit परीक्षण लिख रहे हैं लेकिन हो रही है उपयोगकर्ता इनपुट पर भरोसा रखने वाले तरीकों का परीक्षण करने के लिए आते समय फंस जाता है क्या एक तरीका है कि मैं परीक्षण विधि में 'नकली' उपयोगकर्ता इनपुट कर सकता हूं? मेरे पास ऐसा कुछ है (मैं वास्तविक कोड पेस्ट नहीं किया क्योंकि विधि काफी लंबी है, और समस्या को समझने के दायरे से परे भी जाती है, हालांकि, मैं उपयोगकर्ता इनपुट के लिए पूछता हूं, और यदि यह गलत है, तो मैं इसे फिर से पूछता हूं जब तक सही मान दर्ज नहीं किया जाता है): सार्वजनिक शून्य विधि () {System.out.println ("कुछ लिखें"); Int a = स्कैनर.एक्सआईटी (); के लिए (;;) {if (a! = 10) {System.out.println ("कृपया अन्य मान दर्ज करें!"); एक = sc.nextInt (); अन्य {ब्रेक; }} // आगे कोड} क्योंकि यह इंटरैक्टिव है, यह संभवतः कठिन होगा समान कोड का परीक्षण करने का एक आम तरीका एक ऐसी विधि को निकालना होगा जो एक स्कैनर और प्रिंटवेयर में लेता है, और इसी तरह की परीक्षा कि: सार्वजनिक शून्य विधि () {विधि (...

Matching strings even if they start with white spaces in SED -

I'm having trouble matching strings even if they start with any number of white spaces in regular expression It has been a very short time since starting to use, so I need some help Here is an example. I have a file (file.txt) which has two rows # string1 = 'test one' string1 = 'test two' I am trying to change the value of the second line without affecting row 1, so I used it sed -i "s | string1 =. * $ | String 1 = ' Test three '| g " It changes the values ​​of both lines, how can I change only the value of the second string? thanks With gnu sed, you can \ s , while other SAL implementations usually work with the [[: space:]] character group. Therefore, choose one of these: sed 's / ^ \ s * AWord / AnotherWord /' sed 's / ^ [[space:]] * AWord / AnotherWord /' Since you are using -i , I agree to GNU sed in any way, you probably should not re-type your word, because it is a Introducing the possibilit...

Testing STDIN in Ruby -

I am currently trying to test a basic method that receives some input from the user (ho) and It (puts) it. After some research I found a good way to test the standard output stream, which is given below: def capture_standard_output (and block) original_stream = $ stdout $ stdout = duplicate = string IO.new Produce mock.string.chomp Make sure $ stdout = original_stream end is the method I am testing below is one, the output and input refers to the Ivars that I started in the beginning Start and point out $ stdout & amp; $ Stdin: def ask_for_mark ouput.puts 'What will I say to you today?' Answer = input.gets.chomp.capitalize answer end Now I have seen some solutions for STDIN but in reality nobody understood them and I definitely do not want to copy I am Paste it. The only one to do "work" is given below, but it is not really working when I run RSPC and it waits for input and just logs by pressing, it passes: "takes the name of the user and r...

tomcat - SymmetricDS Error 404 during registration -

I am trying to synchronize nodes with cimetric aids, but I have some problems. I deploy the war on Tomcat 7. It starts, creates tables and everything looks fine, but other nodes can not be registered and when I go to the registration URL, I get 404 responses. Other nodes that are trying to connect: could not register before sleeping for 4000 MS before trying again. This node is unregistered. It will try to register using registration. Failed to read batch batch because: http: // localhost: 8181 / sync / registration ... by: java.io.FileNotFoundException The server has this setting: Registration.url = http: // localhost: 8181 / sync sync.url = http: // localhost: 8181 / sync auto.registration = true Customer: registration. Url = http: // localhost: 8181 / sync auto.registration = true What is wrong with the server running the Tomcat Manager Show? There was a problem with the URL ... correct: Http: // local host: 8181 / warname / sync

python - Correct way to pass fortran OpenMP flags using numpy distutils? -

I am developing a Python package which uses the Fortran 90 code with OpenMP Directives and I can use the package Want to do Numpy.distutils The problem I am facing is that the compiler flags and OpenMP libraries are different for different FORTRAN compilers (for example - ForPenMP and GIFRAN and -Pampump for Gimp and -LimP-5 ifort). I have found that when I know the compiler, then I can successfully pass in the compiler and add the flag. For example, if I'm sure the user has a cautious, then I can, ext1 = numpy.distutils.core.Extension (name = 'rabacus_fc', source = f90_paths , Extra_f90_compile_args = ["First, I tried to force the compiler using an additional keyword argument in the extension to call F2py_options = ["--fcompiler = gnu95"] This error message returns, running running bdist_egg running egg_info Building_src build_src building extension "raba Cus_fc "source f2py option: ['--fcompiler = gnu95'] f2py: & g...

twitter bootstrap - php, print all rows into <p> -

I am trying to print data in a Bustrap 3 blockquote and small paragraphs. The blockkote displays users & lt ;? Php $ query = $ db- & gt; Ready (Using PDO to print all the rows with the codes given below) "Choose from the review"); $ Query-> Executed (); $ Result = $ query- & gt; Fatch ALL (); Forex Currency ($ result as $ line) {echo " " . $ Line ['short'] "& lt; / blockquote & gt;"; Echo "& lt; small & gt;" . $ Line ['first name'] "& lt; / small & gt;"; }? & Gt; However this code does not display it correctly, such as I personally code this Basically the top line is how it looks in HTML but IM is trying to get the code above class = "post-text" itemprop = "text"> fixed: foreach ($ result as $ line) {resonant "block" Lt; p & gt; $ Line ['Short'] "& lt; / p & gt; & lt; p & gt; Echo ...

sql - Rails ActiveRecord Sum with conditions not working -

मेरे विचार में मैं फ़ंक्शन कॉल करता हूं def sum_customer_yearly_revenue (customer_id, year) sum_customer_yearly_revenue = एसईसीएल पोस्टग्रेस्क्ल पर भेजे गए किसी कारण के लिए (जैसा कि देखा गया है): Sale.sum (: net_amount,: conditions = & gt; ['customer_id =? & Financial_year =?', Customer_id, year]) लॉग फाइल में) निम्न प्रकार है: SELECT SUM ("बिक्री"। "Net_amount") "बिक्री" से sum_id के रूप में सभी स्थितियां रेल 3.x def sum_customer_yearly_revenue के लिए sum_customer_yearly_revenue विधि को अपडेट करें (ग्राहक_आईडी, वर्ष) बिक्री.वहाँ (: सभी,: शर्तें = & gt; ['ग्राहक_आईड =? और वित्तीय_यरे =?', ग्राहक_आईडी, वर्ष])। राशि (: नेट_माउंट) समाप्ति रेल 4.x डीईफ़ sum_customer_yearly_revenue (ग्राहक_आईडी, वर्ष) बिक्री। जहां (ग्राहक_आईडी: ग्राहक_आईडी, वित्तीय वर्ष: वर्ष) .सम ((नेट_माउंट) समाप्ति

ember.js - Is it possible to pass some content to a {{partial}}? -

मेरे पास एक ऐसा टेम्पलेट था जो कि जैसा था: & lt; script type = "text / एक्स-हैंन्डबर्स "आईडी =" कुछ "& gt; & Lt; div class = "thisIsJustAnExample" & gt; मैं टेम्पलेट में कुछ चाहते थे & lt; / div & gt; {{Outlet}} & lt; div class = "thisIsJustAnotherExample" & gt; मुझे टेम्पलेट में कुछ और चाहते हैं & lt; / div & gt; & Lt; / स्क्रिप्ट & gt; और किसी अन्य टेम्पलेट में निम्नलिखित करें: & lt; script type = "text / x-handlebars" id = "thisThingPutsSomethingInSomething" & gt; & LT; अवधि & gt; {{#partial "something"}} & lt; div & gt; कुछ सामान मैं आउटलेट में जाना चाहता हूं ... & lt; / div & gt; {{/ Partial}} & lt; / span & gt; & Lt; / स्क्रिप्ट & gt; तो परिणाम है: & lt; div class = "thisIsJustAnExample" & gt; मुझे टेम्पलेट में कुछ चाहिए & lt; / div & gt; & Lt; div & gt; कुछ सामान ...

css - How do I align this div to the bottom-right/left in the parent div? -

Therefore, I & lt; Div = id = "action"> below & lt; Div = class = "right"> In the code you can see that I tried to do it with relative and below situation: 0 but it does nothing. I can float to the right so that's fine so I have to take it down. Right now it keeps under the lower part of the text. echo "& lt; div class = \" product \ "& gt;"; Echo "& lt; div class = \" left \ "& gt;"; Echo "& lt; div style =" width: 225px; Height: 180px; Background: #ccc \ "& gt;" . $ Obj- & gt; Product_img_name "& lt; / div & gt;"; Echo "& lt; / div & gt;"; Echo "& lt; div class = \" right \ "& gt;"; Echo "& lt; form method = 'post' action = 'update.php' & gt;"; Echo "& lt; h3 & gt;" . $ Obj- & gt; Product_name "& lt; / h3 & gt;"; Echo...

twitter bootstrap - Ember render all templates in folder -

I am using amber and bootstrap and I can copy that folder to / templates / modals / I want to create a separate .hbs file for each model currently at the end of my application.hbs I have a list of all the modals {{render 'modals / harry'}} { {Render 'modals / potter'}} {{render (Modals / a '}} {{render' modals / wizard '}} There is a render of all the files in a folder One way? Actually, do this There is no way. / P> But check Amber CLI ().

c++ - Why is DMatch in OpenCV a struct and not a class -

So far I have noticed that every type in the C ++ interface is a class why DMatch is still a struct, when the documentation It has to be said that it is listed as a class here: "keypoint descriptor for class match: query descriptor index, train descriptor index, train image index, and distance between descriptor." or the obscure one in the context of the class is simply think the DMatch / opencv-master / modules / core / doc / basi C_structures.rst Looking for information on why OpenCV is still using structs in its C ++ interface. In addition to documenting files in the form of a cloud, for example DMatch ------ .. ocv: class :: Demache client's the key point descriptor: query descriptor index, train descriptor index, train image index, and the distance between the narrator :: class DMatch {public: DMatch (): queryIdx (-1), trainIdx (-1), imgIdx (-1 ), distance (std :: numeric_limits & LT; float & gt; :: max ()) {} DMatch (integer _queryIdx int _tra...

ssh - How to quickly check if a private rsa key still works for a bunch of servers in bash? -

I have a list of several servers if key on private hand can still be used to login with SSH There is a need to check (actually does some work on them). If I use the ssh -i / path / to / private_key administrator @server_host . It just keeps asking for the password: password for admin @ server_host: What can I do to avoid this kind of lightness, and gather information? When the private key does not apply to this server? You can tell ssh to allow password authentication to be used: For this reason, SSH will exit immediately if private key does not work. If you want to exclude it even if you succeed, just add that command to the end: ssh -i / path / to / private_key -o Password authentication = any admin @ server_host exit

jquery - MagicScroll, I can't make it work on iPad, iPod nor iPhone -

I am working on this site I am using jQuery, MagicScroll and TimeLineMax . This link MagicScroll My problem is that (via Safari) after trying to MagicScroll debug, why I can not understand that working iPad, scroll to the iPod or iPhone (swipe) Does. I really hope you can help me, thank you very much Please ask me for more information. If (modern .touch) {var myScroll; $ (Document) .ready (function () {// iscroll $ (Wrap "# content-wrapper"). AddClass ( "scrollContainer"). WrapInner ( '& lt; div class = "scrollContent" & gt; & Lt; / div & gt ;;); // Controller Controller = New Scroll Magic (In Container: "#Content-Cover", Global Skiinnops: {Trigger Hook: "On Lavay"}}) // iScroll myScroll = new Scroll scroll to mycroll.on ("scroll", "scroll", "scroll", "scroll", "scroll", "scroll", "scroll", "scroll", "scroll", "s...