Posts

Showing posts from May, 2015

swift - Use Parse.com Data in iOS 8 Notification Center widget -

I am trying to download some strings from parse.com inside the Notification Center widget. That's why I need to first need to first load credentials to sign in to parse the user, which is the NSUserDefaults (I know about the security aspect.) The app has been saved. This step works fine, but when I follow the following code, the widget says it is not possible to load the data. func signUserIn (username: string, password: string) {PFUser.logInWithUsernameInBackground (username, password: password) {(user: pfusor !, error: nsERr!) - & gt; If in zero (user! = Zero) {SMKeychainService.saveToken (password) var defaults = NSUserDefaults (suiteName: "group.xxx.xxx") defaults.setObject (user name, for: "username") defaults.synchronize () Self. Have you tried to load data from parse.com inside one of you? Widget and how did you do it? I can not even load the data, because as I mentioned widget crash on the user's sign-in. There is no problem signing in...

Change .js in google chrome with php/javascript? -

Hello :) Is it possible to set different javascript files in different browsers? I want to change a JS in Chrome (PC version) I know that is possible with CSS, so I tried this code with a .js file, but apparently do not work .. So what am I asking There is a different way to set .js (if this is possible). & lt ;? Php if (ereg ("chrome", $ _SERVER ['HTTP_USER_AGENT'])) {echo '& lt; Script src = "js /developr.inputCHROME.js"></script> '; } Else {echo '& lt; Script src = "js / developr.input.js" & gt; & Lt; / Script & gt; '; }? & Gt; Thank you in the consultation. Try $ user_agent = $ _SERVER ['HTTP_USER_AGENT' ]; If (strokes ($ user_agent, 'chrome')! == incorrect) {echo '

Android Studio can't find color reference within the same resource file -

यहां मेरी संसाधन फ़ाइल \ res \ values ​​\ colors.xml की सामग्री है: & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & Gt; & LT; संसाधनों & gt; & Lt; color name = "themeGray" & gt; # ff8A9199 & lt; / color & gt; & Lt; color name = "themeLightGray" & gt; # फ़ेफ़ेएया & lt; / color & gt; & Lt; color name = "themeDarkGray" & gt; # ff3f434b & lt; / color & gt; & Lt; color name = "themeRed" & gt; # ffCC292B & lt; / color & gt; & Lt; color name = "themeBlue" & gt; # ff002E63 & lt; / color & gt; & Lt; color name = "themeWhite" & gt; # ffffffff & lt; / color & gt; & Lt; color name = "बटन सामान्य" & gt; @ रंग / थीमग्रे & lt; / color & gt; & Lt; color name = "buttonPressed" & gt; @ रंग / थीमब्लू & lt; / color & gt; & Lt; / संसाधन & gt; ...

How to connect RIDGID LM-400 distance meter with iOS via Bluetooth? -

Image
itemprop = "text"> I have a situation where the business logic is to integrate some popular BLE distance meter Working with me in With the help of iOS CoreBluetooth.framework , I have already found success in integrating some major models. But connecting RIDGID LM-400 gives me real headache I already use BLE ( CoreBluetooth.framework ) , But have tried a lot with no answer. I use the GameKit GKPeerPickerController , GKPeerPickerControllerDelegate , GKession G2CessionDelegate found some tutorials for Bluetooth connectivity with code>, and , but no positive results. Question: What are the other prospects to bluetooth To connect with the device other than CoreBluetooth and GameKit ? I have already tried the private structure but then my app will be rejected, so it is useless. I downloaded from the App Store and installed and I tried to connect the device. As soon as I operated on the device, I found a message that appeared ex...

Android studio res/xml directory not found -

I need to include a searchable configuration file in my project, in the Android documentation they have said that this xml file Res / xml is included in the directory. But the XML directory is not found. Do I need to create an XML directory or add this XML file elsewhere? import android.app.activity; Importroid.os.Bundle; Import android.util.log; Import android.view.View; Import android.widget.TextView; Public class increases main activity {Private static string; APP_TAG = "tag"; See private text view lessons; Override public null on @reate (bundle saved instainstate) {super.naught (savedinstenstate); SetContentView (R.layout.main); TextView = (TextView) findViewById (R.id.textField); findViewById (R.id.readBtn) .setOnClickListener (New View.OnClickListener () {@Override public void onClick (View v) {XmlPullParser parser = getResources () getXml (R.xml.cars) ;. StringBuilder stringbuilder = new StringBuilder ( ); try {while (parser.next () = XmlPullParser.END_DOCUME...

javascript - Element's coordinates relative to its parent -

विधि el.getBoundingClientRect () परिणामस्वरूप व्यूपोर्ट के शीर्ष-बायां कोने के सापेक्ष परिणाम देता है ( 0,0 ), किसी तत्व के अभिभावक के सापेक्ष नहीं, जबकि el.offsetTop , el.offsetLeft (आदि) एक परिणाम के सापेक्ष परिणाम देते हैं माता-पिता। क्या उसके माता पिता के सापेक्ष किसी तत्व के निर्देशांक रखने का सबसे अच्छा अभ्यास है? el.getBoundingClientRect () माता-पिता को (0,0) समन्वय, या फिर el.offsetTop , el.offsetLeft और इतने पर? आप उपयोग कर सकते हैं getBoundingClientRect () , बस मूल के निर्देशांक घटाकर:। वर parentPos = document.getElementById ( 'माता-पिता-आईडी') getBoundingClientRect (), childrenPos = document.getElementById ( 'children- आईडी ')। GetBoundingClientRect (), रिश्तेदार POS = {}; relativePos.top = childrenPos.top - parentPos.top, relativePos.right = childrenPos.right - parentPos.right, relativePos.bottom = childrenPos.bottom - parentPos.bottom, relativePos.left = childrenPos.left - parentPos.left; console.log (relativePos); अब आपके पास...

batch file - How to zip all sub folders inside folder with a specific name -

I want to find all the folders under the name "logfile" inside a slightly different folder structure. For example how do I find the logfile folder inside C: \ ECU \ ECU1 \ Logfile, C: \ ECU \ ECU2 \ Logfile, C: \ ECU \ ECU3 \ Logfile and C: \ ECU \ ECU4 \ Logfile? I then want to zip the .txt contents of this folder in each case. I currently have a batch file that allows me to zip the contents of a folder, which has the same folder structure every time, but the above versions all need to be combined together. Any help would be great ... Thanks. @echo push push "C: \ ECU \ ECU2" || Goto: Zip for all files in the EUREMEM backup directory for %% A in (*. TXT *, * .cpi *) "C: \ Program Files \ WinRAR \ WinRAR.exe" a -r "%% ~ nA" Zip "" %% A "FOR %% A IN (*. TXT, * .cpi) DO DEL" C: \ ECU \ ECU2.cpi * "" %% A "popped Try this first test to see if it prints the correct folders: @echo break / d / r ...

jquery - posting a single dimenstion array to db ajax post -

I have this form, which loads details using the jazz loader load function & lt; Form id = "form1" name = "form1" method = "post" verb = "" & gt; & Lt; Div id = "tablebg" & gt; & Lt; Width of the table = "100%" range = "0" cellspacing = "0" cellpadding = "0" class = "list" & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th width = "39%" scope = "cluster" & gt; White list & lt; / Th & gt; & Lt; Th width = "61%" radius = "colonel" & gt; & Amp; Nbsp; & Lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; / Table & gt; & Lt; Div style = "max-height: 400px; overflow-y: auto" & gt; & Lt; Width of table = "100%" range = "0" cells = "0" cellpadding = "0" id = "list" & gt; ...

Eclipse code fomatter not working for Java Generics code? -

I am using the eclipse code format jar file formatted Java code and Maven dependence & lt; Dependency & gt; & Lt; Group & gt; Org.eclipse.jdt & lt; / Group & gt; & Lt; ArtifactId & gt; Org.eclipse.jdt.core & lt; / ArtifactId> & Lt; Version & gt; 3.7.1 & lt; / Edition & gt; & Lt; / Dependencies & gt; And when I'm trying to format the code below package com.editor.test; Import org.eclipse.jdt.core.ToolFactory; Import org.eclipse.jdt.core.formatter.CodeFormatter; Import org.eclipse.jface.text.BadLocationException; Import org.eclipse.jface.text.documentation; Import org.eclipse.jface.text.idocument; Import org.eclipse.text.edits.MalformedTreeException; Import org.eclipse.text.edits.TextEdit; Public class FormatterTest {public static void (String [] args) {string code = "import java.util.Map; public class TestFormatter {public static void (String [] args) {Map & lt; string, object & gt; map = Null;...

java - Line Chart Slider Implementation using google visualisation dashboard and controls -

Image
I am facing problem while applying slider control using the Google Visualization Conrad. I have implemented the number range filter as a control cover. I have the following column figures. var dataTable = google.visualization.arrayToDataTable ([['' year '' '' 'Australia' '' ''], [2004, 1000, 400], [2005, 1170, 460] [2006, 660, 1120], [2007, 1030, 540] [2008, 1030, 540]]); All column number types are there. When this drawing is appearing in the X Axis data number format, the reference was found and corrected. Here my code: var dashboard = new google.visualization.dashboard (document.getElementById ('dashboard_div')); ('' Filter '' '' option ': {' filter column ': 1,' width ':' 100% ',' UI ': {' LabelStacking ':' horizontal ',' format ': {' pattern ' : '####', 'fractionDigits': '0', 'grouped symbol...

node.js - User Limit Reached when connection is requested in pool of mysql database -

In node js, I have created a pool for database connectivity var pool = Mysql .createPool (// Use a pool for multiple connections {connection: command: 4, waiter connection: true, qi limit: 0, host: hostname, user: username, password: passName, database: database name}) ; The code works fine after creating four connections, but five connection requests for connection are in queue after pool and then I pool_getConnection (funtion (Err) {if (err) console.log ('[error] with connection' + err););); Error occurs then ---> [Error] Error with connection: ER_USER_LIMIT_REACHED: User 'b1312146aa0cc6' has created 'max_user_connections' resource ( Current value: 4) Try this: var mysql = required ('mysql'); Var pool = mysql.createPool ({connectionLimit: 4, waitForConnections: true, queueLimit: 0, host: hostName, user: usernames, passwords: passName, database: databaseName}); Var sql = 'Choose from bag * where id =?'; Var args = [1]...

What is type erasure in Java generics? -

इस सवाल का पहले से ही एक उत्तर है: 7 जवाब जावा में प्रकार मिटाव क्या है जेनरिक? जैसा कि मैंने पढ़ा है, यह संकलन समय पर होता है, लेकिन मेरा सवाल है: अगर समय संकलन में होता है, तो क्या यह जानना हमारे लिए इतना महत्वपूर्ण है? क्या होगा यह कैसे काम करता है इसका सरल उदाहरण है, कंपाइलर में क्या होता है और हम किस प्रकार प्रकार के विलोपन का उपयोग कर रहे हैं? जावा में जेनेरिक्स मूलतः डेवलपर के लिए वाक्यात्मक चीनी हैं वे रनटाइम पर मौजूद नहीं हैं और इसके कई कारण हैं जिनमें डेवलपर को अवगत होना चाहिए। उदाहरण के लिए, सी #: सार्वजनिक इंटरफ़ेस में ऐसा कुछ संभव है & lt; T & gt; {...} सार्वजनिक वर्ग उदाहरण: ए & lt; स्ट्रिंग & gt ;, ए & lt; फ्लोट & gt; {...} लेकिन ऐसा जावा में संभव नहीं होगा क्योंकि प्रकार के विलोपन के कारण। दोनों सी # और जावा में आप प्रत्येक इंटरफ़ेस केवल प्रति वर्ग एक बार लागू कर सकते हैं। लेकिन जेनरिक्स के प्रकार के विस्मरण के कारण जावा में कोई फर्क नहीं पड़ता है और A & lt; स्ट्रिंग & gt; और A & lt; Float & gt; सम...

java - The keyword 'system' generates InternalParser with errors -

जब मैं एक कीवर्ड system को मेरे व्याकरण में जोड़ता हूं, तो उत्पन्न InternalParser त्रुटियों को दिखाता है, जब कीवर्ड एक जावा क्लास होता है। उदाहरण के लिए मैं सिस्टम का उपयोग करता हूं, जिसका उपयोग निम्न पद्धति में भी किया जाता है। सार्वजनिक स्थिर अंतिम इंट सिस्टम = 98; सार्वजनिक फाइनल बूलियन सिंक्रैड 1 9 6_इनैंट डम्मी पर्सर () {state.backtracking ++; Int start = input.mark (); {Synpred196_InternalFoStructuresParser_fragment () का प्रयास करें; // अपवाद कभी नहीं फेंक सकते हैं} पकड़ (मान्यता अपवाद पुनः) {System.err.println ("असंभव:" + पुनः); } बूलियन सफलता =! राज्य। input.rewind (शुरू); state.backtracking--; state.failed = झूठी; वापसी की सफलता; } क्या यह तय करने का कोई तरीका है? XText 2.6.2 के साथ सब कुछ ठीक काम कर रहा था, लेकिन मुझे XText 2.7.2 का उपयोग करते हुए यह त्रुटि है। मेरे दिमाग में क्या आता है, यह व्याकरण पर एक पोस्ट प्रोसेसिंग चरण है जो कुछ गंभीर अपवादों द्वारा सिस्टम। इस बीच आप एक्सटेक्स्ट के खिलाफ एक टिकट फाइल कर सकते हैं।

Can i use HTTP POST method with jquery datatables sAjaxSource and webapi -

By default, data will be retrieved with the HTTP GET method. From research I came to know that we can configure the dataset to use the HTTP POST method. ). DataTable ({ "bServerSide": true, "sAjaxSource": 'api / GetEmpAll /', "sAjaxDataProp": "aaData", "iDisplayLength": 10, "bProcessing": true, "bLengthChange": false, "sPaginationType ":" full_numbers "," aoColumns ": [{" mData ":" first "," sWidth ":" 100px "}, {" mData ":" last name "}]}); And when I try to "type" it with: "Post" it does not call my Web API Post method. When I give "type": "Post", tell your Web API breakpoints will not be hit at all datatables someone please tell me how POST method to use "sAjaxSource" and Web Can do for API. I'm using DataTable and I've seen they are...

ios - Accessing data from HealthKit with Swift -

I'm totally noob on swift (and xcode), in fact, only the only programming language I (to some degree)) is javascript. I am trying to make a swift spirit kit game, and I want to use the number of calories burned in the healthcare. The idea is that my game does not really track anything like other apps like Endomondo, such as you burn more calories more points, I just leave other apps left by the Health app I want to access the data. Is this possible? (I'm running the latest version of everything from Mac OS X to Xcode) It does not seem that technically you have nothing to stop from calling the Healthcare API in your game. In fact, you are quite happy to mix and match the use of any public infrastructure provided on iOS. One thing to keep in mind is the disclosure of the use of privacy and health data. The user must explicitly grant his app's permission to view the data. There are several ways to access many different types of data, and in reality you are only ...

arrays - C++ OpenGL Large Mesh is missing triangles -

So I'm putting an altitude map renderer which will do most of the task int to the shirtier, but first of all I want to render I am creating a net for the moment, I am currently playing with upper bounds of Open GL and C ++ to see how I can dense a mesh (hence I want to do something later in the case of Lod mesh division. I'm) anyway! To cut this issue; After testing a mesh resolution of 32, 64 I saw while 128 occurred to me runtime experience crashes, I stopped them using a self-class "Indeksafs", which is the array length Keeps the 6 index to reduce, the problem is only on the resolution of 128, the 3G of the mesh actually displayed, I was wondering if the number of indexes can be open GL or may be Using 1 set of fferObjects or if there is a problem with handling things of C ++ with my hand. I have been generated mesh through the following: void HeightMapMesh:: GenerateMesh (GLfloat Masskel, Glushart Meshrisolusn) {Glushart Vertex mount = (Mesh Resolut...

Edit object in sub of sub array in MongoDB -

I need all array sub-updates in MongoDB. "Flavio", "desc": "feature", "my name": " The task will push a new array for the task _ id = ObjectId ("54410bf33561315021a29e2b") Expected the job to be updated:. ("54410bf33561315021a29e2b"), "name": "lol", "date": "17/10/2014 09:30:43 am", " Writer ":" 5424ac37eb0ea85d4c921f8b "" Points ": [{" Count ": 10," Name ":" pt "}]} I was trying with: db.projects.update ({"US.tasks": {$ elemMatch: {"_ id": ObjectId ("544029257266e4841735cde8"}}}}, {$ Push: {"US $. ": {" Points ": []}}} db.projects.update ({" US.tasks ": {$ elem match: {" _id ": ObjectId (" 544029257266e4841735cde8 "}}}}, {$ push: {"US $ tasks.points ..": {"Count": 10, "name": "pt"}}}) b...

ios7.1 - Core Plot 1.4 - Reduce the gap between Y-axis and X-axis labels -

Image
I am trying to implement core plot in my iOS application. 1) When my app is run, it should start with the graph (0,0). Because at present it is not displayed anywhere which is not visible. Then I changed the boolean value down in ya and then I saw the scroll and the line which was way above the origin. "plotSpace.allowsUserInteraction = Yes;. 2) I can manually adjust the position between X-axis and 2-digit on Y-axis lines. Here is the code that I have to follow the tutorial for the article of WikiLeaks Wenderlich Tried, but as you see I can see only one line in the image. Other lines For that I need to pull up and down to see other lines. And special thanks to Eric Schoch and his team for their wonderful work. Thanks //////// Configure X-X CPSTXXis * xAxis = [axisSet XAxis] CPTAxis * x = axisSet.xAxis; x.title = @ ""; x.titleTextStyle = axisTitleStyle; x.titleOffset = 5.0f; x.labelOffset = 5.0f; x.axisLineStyle = axisLineStyle; X.labelingPolicy = CPTA...

Scratch output file .txt or similar -

I want to know that opening a simple .txt file and loading some comma-delimited data in the scratch is in the variable and its Can you add any .txt file or some variable data to scratch? I have made a fair bit of Google search but nothing has come, so I thought I would ask you people I would love to use Java or some things, but this My school is for children and I can not teach them to do this in java or something else because what they have to do in a scratch, which is upset, but I can not change anything. Scratch has no IO capabilities file, and I doubt it will never happen. The closest thing I know is right-click the list watcher, and export from Scratch IDE. This will create a .txt file, with each list item on a new row. If you have a similar formatting TXT file, you can import it using the same method. Each line corresponds to one list item. Comma-delimited data does not work with this.

small basic - Multidimensional arrays -

Currently, I am using it as a test code while (callpay & Lt; = 6) R = 1 for rows Graphics window for c = 1 column. Brush Coiler = Graphics window. Gatorandum (R) [R] [C] = Shapes. Adraktekangal (width, height) Shapes. Mov (box [R] [C], 620, 100) Endorph Endorph But for my real game I want to draw images from the top above the array. But how to manually write an array that I can store images? How can I also give the image a specific value? (A number) Any help would be great as much as possible! Funny, someone just asked the same question here: So what What exactly are you trying to do? If you want to draw an image from the array, you can do this: Shapes. Mov (boxes [1] [1], 100,100) What do you mean by giving an image a value? like this? Image: [1] = Shapes. Image (IMG) Hope this helps at least: D

c++ - Simple vector initialization in C++11 returns weird error -

कोड का यह टुकड़ा संकलित करना: #include & lt; vector & gt; लंबे समय तक समऑफमिडीयन (इंट बी, इंट एमयूएल, इंट एड, इंट एन, इंट क) {std :: vector & lt; int & gt; ओपन स्कूल {एन + 2,0}; के लिए (इंट आई = 0; आई & lt; एन; आई ++) {if (i == 0) संख्या [i] = बीज; अन्य नहीं [आई] = (संख्या [आई-1] * एमयूएल + जोड़)% 65536; }} Int main () {sumOfMedians (3,1,1,10,3); वापसी 0; } एक त्रुटि का कारण बनता है *** `/ / a.out 'में त्रुटि: मुक्त (): अमान्य अगले आकार (तेज़): 0x00000000006e8010 *** [2] 31743 एबर्ट (कोर डंप किया गया) ./a.out थोड़ी देर में वेक्टर आरंभीकरण लाइन (पिछले कोड में पंक्ति 5) को बदलते हुए (नया 5,6 लाइन में) कोड) #include & lt; vector & gt; लंबे समय तक समऑफमिडीयन (इंट बी, इंट एमयूएल, इंट एड, इंट एन, इंट क) {std :: vector & lt; int & gt; ओपन स्कूल; nos.resize (N + 2,0); के लिए (इंट आई = 0; आई & lt; एन; आई ++) {if (i == 0) संख्या [i] = बीज; अन्य नहीं [आई] = (संख्या [आई-1] * एमयूएल + जोड़)% 65536; }} Int main () {sumOfMedians (3,1,1,10...

Java - get parent process -

I think Java does not provide much in the API about achieving processes, is there any way By which you can get the parent process of PID / ID in Java? If you are running Linux, you can use /proc/self/stat.

c# - Unity "ContainerControlled" Singletons and multi-threaded method calling -

I am using Microsoft Unity for Dependency Injection (DI). My classes are basically static (calling in coding / conventions, not just in functionality) except that I want DI, so I use Unity and Constructors which automatically solves other Unity classes. Since this is a singleton pattern, do multiple formulas execute the same code block at the same time? i.e. Suppose I have an add method, which returns an int, and takes it as an input, two ants ... Whether multiple-threads at the same time in a singleton object on this method Can you add? Or because this is the same example, are the threads waiting to block? To keep it on the other side, is there any difference between the method of calling for a static method, a singleton vs. method? (I know that any shared data used from within singleton instantiation methods should be secured to thread) There is no distinction Thread security is important only when you have some shared state that you need security as a way of y...

sql - CTE to represent a logical table for the rows in a table which have the max value in one column -

I have a "only insert" database, in which the records are not physically updated, but rather logical forms by adding a new record With a CRUd value, with a large sequence, in this situation, the "CEC" column can consider a primary key, but the "ID" is the logical identifier for the record. In the example below, This is a physical representation of the table: seq id name | CRUD | ---- | ----- | -------- | ------ | 1 | 10 | John | C. 2 | 10 | Joe You 3 | 11 | Kent | C. 4 | 12 | Kati | C. 5 | 12 | Sue | You 6 | 13. Jill | C. 7 | 14 | Bill | C. This is the logical representation of the table considering the "most recent" records: seq id name | CRUD | ---- | ----- | -------- | ------ | 2 | 10 | Joe You 3 | 11 | Kent | C. 5 | 12 | Sue | You 6 | 13. Jill | C. 7 | 14 | Bill | C. For example, for example, to recover the most recent record for the person with id = 12, I will do something like this currently: People from PDP P WHERE PIID = 12...

unix - Compare two files with first column and remove duplicate row from 2nd file in shell script -

I will ask your questions with an example. I have two files: File # 1 002,948,998 752986QAK NTR974VTS 0000000 102,948,932 752986QSC NTR974VTS 0000000 102,948,933 752986QSC NTR974VTS 0000000 File # 2 Desired output: 002948998 752986QAK NTR974VTS 0000000 102948932 752986QSC NTR974VTS 0000000 102948933 752986QSC NTR974VTS 0000000 002,901,998 752986KFK NTR974MTS 0,990,000 note :. There should no difference (in) between lines I want to compare file 1 and file 2 using the first column and remove the entire line from file 2, if they match the first file Are there. I would like to save the result to 1 file or a new file, file # 3 which contains all the entries from file 1 file 2 (without duplicates with file 2). Please advise a good resolution in shell scripts. I am currently using: awk 'FNR == nr {a [$ 1]; next};; ($ 1 in a) 'file1 file2 & gt; File 3 file3 & gt; & Gt; code> cat file1 file2 | Sort-U & gt; File 3 This will sort...

SQL Server : count() for each group, but only groups having 1+ element like... AND all elements like -

तालिकाओं (और स्तंभ) जैसे हैं: ग्राहक (clientid) मकान (houseID) दर्शक (clientid, houseID, visit_date) संविदा (contractID, houseID, clientid, rentDate_from, rentDate_end) मैं इस तरह के एक SQL क्वेरी लिखने के लिए समस्या है: उनमें से एक को किराए पर लेने से पहले, प्रत्येक ग्राहक को घरों की कितनी बार यात्रा हुई थी? सभी विज़िट्स को सूचीबद्ध करते हुए, प्रत्येक ग्राहक के लिए कुल संख्या की विज़िट की गणना करना आसान है, clientid और प्रत्येक समूह के लिए गिनती (*) का चयन। मान लीजिए कि इस select_1 है, और select_2 सभी ग्राहकों के लिए सभी अनुबंधों लिस्टिंग रहा है। Select_1 का जवाब नहीं है, क्योंकि गिनती केवल समूहों पर ही की जानी चाहिए, जो: कम से कम 1 पंक्ति "पसंद" पंक्ति में select_2 (इसका मतलब है कि कम से कम एक दौरा किये गए घरों को किराए पर लिया गया था, क्योंकि यह ग्राहक हो सकता है कुछ मकानों को देखा, लेकिन दूसरे को किराए पर लिया, घर नहीं गए)। जहां s1.clientID = s2.clientID और s1.houseID = s2.houseID प्रत्येक समूह: इस के लिए मेरे विचार के साथ s...

How use array in text file text file (PHP)? -

I have a txt file that has an array like this: Array (0 = & gt; 'jack', 1 = & gt; 'alex') I want to use this array in my PHP code but it does not work on this example Is a $ list = file_get_contents (myfile.txt); Echoes $ list [0]; How do I convert it? Rather array serialize d or json_encode d After that, when reading this, within that file, only unserialize or json_decode in $ list example: $ list = unserialize (file_get_contents (myfile.txt));

Matlab array output from 'for' loop -

रूट = स्थानांतरण ([- 10 2 20 -5]); wd_root = शून्य (); I = 1 के लिए: रूट (i) & gt; 0 रूट (i) wd_root (i,:) = [रूट (i)] एंड एंड wd_root यह आउटपुट [0, 2,20] के रूप में सरणी, लेकिन मैं केवल [2,10] के रूप में केवल सरणी का उत्पादन करने की कोशिश कर रहा हूं। मुझे नहीं पता कि यह अतिरिक्त तत्व '0' क्यों जोड़ रहा है क्या कोई गलती देख सकता है? धन्यवाद

php - How can we use opencart events? -

I have searched a lot about opencart triggers but have not found any suitable examples. OpenCert 2.0 contains such triggers on which the developer can hook up the function and estimate WordPress action and filter. For example catalog / model / checkout / order.php a trigger $ this-> event-> The trigger is ('Post.order.history.add', $ order_id) Can someone help me hook up my work on the above triggers? Important note: This answer is OC> 2.0.xx and The problem here is an incorrect word that is being used (and searched) - the right side you are looking for is event , and event listener and trigger event (unfortunately, there was no luck while trying to search for those people, and the documentation for 2.0 is still missing ). Now I believe that the whole background is more understandable, especially if you have any other frameworks (maybe jQuery ?) About incidents Here's some information, but here's just a quick guide (how to work w...

PHP: Get path after domain from current URL -

I am beginning to complete PHP, so please keep this in mind. Let's just get the path to the current URL, which is the variable. For example, if the current URL is http://example.com/blog/2014/blogpost.html then I want to get to / blog / 2014 or much more are equal. I have PHP code so far: $ full_url = $ _SERVER ['HTTP_HOST']. $ _ Server ['PHP_SELF']; $ Path_info = parse_url ($ full_warns, PHP_URL_PATH); Echo $ path_info; However, this does not work, and I can not see the appropriate solution to Google. Do anyone have any signs? Thanks in advance! You can use strrpos to get the last code / and before: $ req_uri = $ _SERVER ['REQUEST_URI']; $ Path = substr ($ req_uri, 0, stropo ($ req_uri, '/')); This will give you exactly what you need ( / blog / 2014 )

How to recursively copy files in MSBuild, *Where files to copy are specified on some file.txt* -

I read a list of files from a file. I want to copy and maintain their folder structure - seen in the file name (backslash or the presence of the lash on the front), how do you do it? In short, you do not have metadata which you will get if you get the filename using the wildcard. These options do not work for me because I am copying my files from a file. For example in files.txt folder // test1.txt folder / subfolder / subfolder / test 1.txt / folder / subfolder / test 2 .txt So how do I copy these files without the success of an output file? You have one file per line, I think this is the source file, and the destination base directory somewhere else To be specified? I think // is not important, but it indicates that it may be due to the paste paths together. First of all, you can read the data using data. You will populate an item list with each item per line. To get started, & lt; Target name = "microscopy" & gt; & Lt; ReadLinesFromFil...

kendo ui - Telerik kendoUI panelbar jumping -

all, I'm having a problem while using panellabars and animations, it spreads, It 'jumps' down a little. Inside the panel there is a padding / margin near my material, which I need to make it different. Anyone know how to get out of it jumping is still under the padding / margin of the material inside? "post-text" itemprop = "text"> We also had this problem with the panelbar, and we have solved the CSS rule by adding it to a content in the panel: Html: & lt; Ul data-role = "panelbar" & gt; & Lt; Li & gt; & Lt; Span & gt; & Lt; H3 & gt; Some text & lt; / H3 & gt; & Lt; / Span & gt; & Lt; Ul class = "category-content" gt; & Gt; Some items & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; / Ul & gt; CSS: .category- content {width: 100%;}

python - Loop that uses try/except for input and loops until 'done' is entered -

I'm new to coding in Python and I'm trying to write a loop that asks for numerical input and By the time the user input "done", he exits from the loop and prints the variable: number, count and average. (Not trying to store anything in a list) I also want to print "invalid input" and if the user enters anything then he will continue the loop when Unless it is "full", Unfortunately this gives "invalid input" and whenever I enter "done" it keeps looping even though what I am doing wrong? Can anyone tell me in the right direction? number = 0 count = 0 average = 0 inp = 0 while correct: try: inp = int (raw_input ('enter a number:')) If 'ip' is done Print: 'Invalid Input' Print Number Print Number Print Float (average) : Number = number + RAP number = count + 1 average = float (number / count): sum = 0.0 count = 0 while true: inp = raw_input ('Enter a number:') If inp == 'done'...

Why is the first element in an array always 0? -

I am thinking that where the idea of ​​the first element in an array came from zero. Why is not this 1? I have used for the fact that it is zero, but the first element can not be due to being zero. An array is a block of sequential memory if the array starts with memory address x , Then the first element is in the address x + 0 , the second is on the x + sizeof (arraytype) , the third x + 2 * sizeof (Arraytype) is on , etc.

r - Change the behaviour of the markdown renderer? -

By default, the markdown package provides an image like this & gt; Library (Markdown) & gt; Txt & lt; - "! [My caption] (/ img / my_image.png)" & gt; Res & lt; - Render Markdown (text = TSTT); Res [1] " & lt; / n " Now I was wondering if it is possible to change this default behavior and put it in my own renderer for some tags / elements. For example, I used to say" my caption " I would rather not use the same as the "code> alt attribute, but in the form of the text below the image. Is this possible, and is this an example? Study for I would recommend using Multi Markdown $ Cat test.txt! [My caption] (/ img / my_image.png) $ multimarkdown test.txt & lt; shape & gt; img src = "/ img / my_image.png" alt = "my caption" /> my caption It goes outside of R, but it It should be easy to type any cover. Besides it supports fast and many other things. Personally I prefer Pa...

angularjs - Redirect after login to backbone route with rails -

I am trying to provide users with a general functionality, to log in to the original requesting URL Afterwards, I'm redirecting them to a safe path. For example, the user clicks the link on the email through the notification in the system, tries to go on it: the user is not logged in, so is brought back after the entry, they should not be brought to their home page, rather the original form For the requested URL from I am very popular with the technique to save the effort URL in the session before redirecting to the login page. The point is that the URL has a backbone router after the core URL, i.e. the #details part of the URL is not sent to the server as it is usually for internal page jump. I am thinking that how are the web developers working like JS MVC framework like spine, angular and others are emerging? Some moves? Is there really any way to pass the server in the HTTP specification? Any idea is appreciated, thanks. The easiest solution to this problem, if y...

Recursion in functional programming will not give high concurrency. Is it correct? -

I'm new to functional programming. In the compulsory programming, loops replace replication of FP. Another statement is the FP high concurrency. Instructions are implemented in parallel on multi-core / CPU systems as data is irreversible. While in recursive, the steps can not be executed parallel to the stage execution, depending on the results of previous steps. So, I'm convinced that the recycling in the FP will not give high concurrency. Am I right? Sort. Data parallelism can not get you more parallel execution; This is it. However, you often have more data parallels, which are expressed in normal sequential algorithms, whether functional or necessary. For example, consider taking a vector scalar multiple: (note: this is a built-in self-style language): function scalar_available (scalar c, vector v) {vector v1 ; For (int i = 0; i & lt; length (v); i ++) {v1 [i] = c * v [i]; } Return v1; } Obviously, this is not going to run in parallel. If we rewrite i...

php - How we can use external site URL in moodle redirect function? -

I am trying to use an external site URL, which says that the www.google.ca Moodle Redirect function The block is specified in the Config Settings. It seems that Moodle always presents the current directory path with that URL, what is the work for that? I also tried to use header (), but when I specify the hardcoded URL in the header, it works when it comes from config settings. In short, I use a certain page (outside of my Moodle domain) using the Moodle Redirection function. How can this be done? The site URL must start with the http in the config otherwise Moodle thinks its relative

why does Java servlet gives ClientAbortException when file size larger than about 2 MB? -

I am trying to write a Java sublett on the Linux server, which can be used by client to download is a video file it works file size small (probably MB less than 2), but larger file size error: org.apache.catalina.connector.ClientAbortException: java.io.IOException: broken pipe . After performing a Google search, it seems that this error occurs when the client breaks the connection. In my case, I am using a customer and can confirm that I am not doing anything which will break the connection (not least on purpose) - the browser remains open, etc. When this error occurs then is. Any idea what is the reason (and how to fix it)? Public class GetFile HttpServlet spreads {@Override Public Zero Init (ServletConfig config) throws ServiceExtension {super.init (config); } Protected void doPost (HttpServletRequest request, HttpServletResponse res) throws ServletException, IOException {String filename = "init_java"; Try {// user parameter file name = req.getParameter ("f...

css - how to get a panel within a set height parent wrapper to scroll not change the parent's height at the same time -

I am trying to determine the height of a child so that whatever extra comes is set to scroll the overflow But do not affect the parent's height; - Updated url - & lt; Div class = "wrapper" & gt; & Lt; Div class = "header" & gt; Header & lt; / Div & gt; & Lt; Div class = "menu" & gt; Menu & lt; / Div & gt; & Lt; Div class = "content" & gt; Kajs; This content is, it is flexible, should be dsfasdflkasjdfl fdlkasj dsfasdflkasjdfl; Kajs; Fdlkasj dsfasdflkasjdfl; Kajs; Fdlkasj dsfasdflkasjdfl; Kajs; Fdlkasj dsfasdflkasjdfl; Kajs; Fdlkasj dsfasdflkasjdfl; Kajs; Fdlkasj dsfasdflkasjdfl; Kajs; Fdlkasj dsfasdflkasjdfl; Kajs; Fdlkasj dsfasdflkasjdfl; Kajs; Fdlkasj dsfasdflkasjdfl; Kajs; Fdlkasj dsfasdflkasjdfl; Kajs; Fdlkasj dsfasdflkasjdfl; Hinge; Fdlkasj dsfasdflkasjdfl; Kajs; Fdlkasj & lt; / Div & gt; & Lt; / Div & gt; CSS part: . Warper {boundary: 1 px solid black; Wid...

javascript - Rendering an atmosphere using three. js -

For the purpose outlined in the title, I have seen the question, as well as this also. I am using THREEx.atmospherematerial () from the package in this way. The content, in addition to the colors, is controlled by two parameters, power (P in the demo) and the cofficient (in the same demo). It is easy to find out that power controls the slope of the shield, but it is necessary to the extent. In the demo, it is seen that the outer edge of the atmosphere is crisp, and the inner side, the field Turns towards transparency, gradually increasing. I want it to be round like the other, thus: the inner edge should have the lowest transparency, and the outer edge should be transparent. Trying to use any negative force was not successful. Can someone please help me, please? I'm not sure that this is a good practice (moderators help me on this issue), but I got an answer, I'm sharing this, someone needs it in the future: You can use lines content = new THREEx .atmosphe...

uitableview - change position and layout of table view and table view cell for iOS app in Swift -

I have created Table View Controller with a table view cell for my iOS app with Storyboard in Xcode 6. I have an image and a label in the cell, at the top of the view controller, I should have a title and I have a tab bar at the bottom. This is my setup. But now I want to change the position and layout of the table view and legacy cells, by default they cover the whole screen. The table view should start below the top and the tab should end above the bar. At present, the contents of the cell are displayed under the title and tab bar. Is it possible to determine the position of the table view and / or cell? And I also want to change the layout of cells. I have to be somewhere between two cells and one corner radius. THX! This is an old "problem" if you use UITableViewController If you want to use, the table view will cover the whole screen; UIViewController 's view will be the property table view if you have a table on the screen You want to use UIVie...

php - Laravel returning multiple views -

I am trying to return several views using the Laravel Framework. When I return the variable, it does this only through the loop only, so only a comment is displayed on the page. foreach ($ index_comments as $ comments) {$ comment note = $ comments-> Comment; $ Index_children = NULL; $ GetUser = DB :: table ('user') - & gt; Where ('id', '=', $ comments-> by_user_id) - & gt; get (); Forex Currency ($ user $ $ as user) {$ firstName = $ user- & gt; first name; $ Last name = $ user- & gt; last name; } See Return: Creating ('Feeds Dotmates') - & gt; With (Arai ('first name' = & gt; $ first name, 'last name' = & gt; $ last name, 'comment comment' = & gt; $ comment comment, 'index_children' = & gt; $ index_children)); } I would like a way to get back many views. Thanks for any help! Toby. It seems that you do not understand the concepts of Laravel and / or PHP yet. So we sta...

javascript - Why is my form doing other things than what I told it to do on submit? -

I have broken some code from a website and I have my input element (because it is a server Was causing the error). So what I did is change verb to "" and onsubmit = "myFunction () " add what I have & lt; Form method = "get" name = "formname" action = "" onsubmit = "myfunction ()" & gt; .... & lt; / Form & gt; and function myFunction () {Warning ("Well, my work was called"); } I have confirmed that when I enter input , the alert function is called. However, the error of the saver is that the form is still going on after right click on the alert. Why could it be any thoughts? Basically, I am trying to create myfunction , only when form is served. Either you need to call preventDefault () or Return the call to the function, otherwise it will execute default behavior either submit the form. Either it's like. function myFunction () {Warning ("Well, ...

javascript - Scroll to bottom on page load -

I have the following code, this is a chat display that was using the Firebase API. The problem is that when the page loads, I want to set it straight to the scrollbar on the bottom. At the moment it is slowly sliding down (because basically). When I reload the page, how can I always scroll down the bar, even if new content is added to the chat? $ (document) .ready (function () {var myDataRef = new Firebase ('https://ot7fwnsj7h7.firebaseio-demo.com/'); myDataRef.on ('child_added' , Function (snapshot) {var message = snapshot.val (); display message (message.name, message.text);}); function displaylames (name, text) {$ ('& lt; div / & gt;' ). Text (name + ':')). AppendTo ($ ('# displayChat')); // Every time someone posts a text ($ '(' And this is my favorite: I hope that I have become clear! Thank you. This line of code scrolls the element at its bottom, every time you update the update, Then call him. $ (...

javascript - Limit text in a TextArea to the actual Area of the TextArea -

When asking about most questions about TextError, I do not want this. I want to know how to limit the editable area of ​​textare HTML element to actual textarea. Is this also possible. Example: Say I have Textaria, which is from 30 columns 4 rows. You can limit the text to this field to 120 characters, but it can not stop the user from hitting 5 times and I have already set it up for the given area. I do not want to come to a scroll bar. Is there a javascript that can fix it? text with visibility: hidden display with font styles similar to Texter and Copy to a max-width , which will not increase beyond the number of your columns if the hidden copy of the text exceeds your threshold, delete the text that was added. The following shut down is what you need. Unfortunately, it does not get to the 5th line (after entering the 4th row) until you type something on it, and it may leave some letters on the 5th line (if you are from the fourth row Wrap in the 5th line). I a...

php - Create blank UL list for Blade templating system - Laravel + jQuery TagIt -

Trying to use jQuery Tagit with Laravel and Blade. It works fine, but the rest of the form is using the blade and I want to keep it all so that I want to use the blade to make the list. However, I can find a way to make a blank ul list using slang blade. then looks like blade for ul: {{HTML :: ul (array ('a', 'b'), array ('square' = ' & Gt; mylist '))}} what works but I'm currently using this way: & lt ; Ul id = "myTags" name = "tags" class = "form-control form-control-ultagit" & gt; & Lt; / Ul & gt; I usually do not mind too much, but want to use the input :: old () method. Any help? When using: {{HTML :: ul (array (), array ('class' = & gt; 'mylist'))}} Nothing is shown and UL is not created. There is no way to present an empty list using HTML: ul () or HTML:

c# - FormatException exception in DbGeography when changing region -

Text after " What's the simple one? This code runs in Australia (where it was written), it works. public static void CreatePointTest () {double latitude = -33.613869; Double Lawn = 153.123456; Var text = string.Format ("POINT ({0} {1})", loan, lat); // 4326 is the most common co-ordination system, which is GPS / Maps var expansion on line = DB oophyli Used by the phraseframe text (text, 4326); } When I change the "French (France)" area code on my computer and run it, I get an exception on the return statement which is related to the number format: System.Reflection.TargetInvocationException was thrown by the target without action _HResult = -2146232828 _message = exception target of an invocation. HResult = -2146232828 IsTransient = false Message = Exception is thrown from the target of an invention. Source = mscorlib StackTrace: System.RuntimeMethodHandle.InvokeMethod (object object, object [] logic, signature sig, boolean producer) [Erosion...

How do I delete read-only file in Gradle? -

How do I delete read-only files in Gradel? The following code silently ignores read-only files in the "C: \ Temp" directory: Task cleanTempDir (type: delete) {delete the fileTree (dir: "C: \ \ Temp ")} You can remove the flag to read before being deleted Are there. Tasks CleanTempDir & lt; & Lt; {Ent.Trub (only: incorrect) {fileset (dir: 'C: / Temp')} Delete fileTree ('C: / Temp')} Will work . If you want to work on Unix, then you want to use the anti's chmod function. ant.chmod (dir: '/ tmp', perm: 'ugo + w')

mysql - Joda-Date Mapper for Slick - MappedColumnTyoe -

My problem is very close to this question, but my error is different this is my utility class which has been JDATE defined Mapper package org.mydomain.utils Import slick.driver.MySQLDriver.simple ._ import org.joda.time.DateTime Import java.sql.Date Import org.joda.time.DateTime import java.sql.Timestamp seal featuring JDATE object DateUtils {implicit def jdateColumnType = MappedColumnType.base [DateTime, timestamp] (dt = & Gt; new timestamp (DT. GetMillis), ts = & gt; New DateTime Jetaim))} domain object user. Scala is as follows Case Class UserRow (ID: Long, Birthday: Jedit) Class User (Tags: Tag) Table [UserRow] (tag, "USER") {def id = column} ] ("ID", O. Primary, O. Autoink) Def Deading = Column [JDATE] ("Birthday") DEF * = (ID, Birthday) & lt; & Gt; (UserRow.tupled, UserRow.unapply)} Error: The method is not sufficient reason for the column: (underlying TM Skla. Slick.ast.TypedType [org.mydomain.utils. JDATE]) scala....

html - iframe does not work on iPhone when the webpage is saved to homepage -

I have a video player on the webpage using IFrame and Javascript (parts of the code shown below). With iOS 8, everything works on my laptop and Safari on the iPad. However, if I add a home page to the homescreen and open the webpage from the homescreen, the video will not load. I have created a quick JSBN with everything and this home screen. Works on iOS 8, so it should not be a problem with code. Is there something different that Safari does when the link from the homepage is opened? and iframe class = "youtube-player" type = "text / html" width = "320" height = "192" id = "YouTubePlayer" & Gt; & Lt; / Iframe & gt; javscript: url = 'http://www.youtube.com/embed/5JJ983bxFGU'; $ ('# YouTubePlayer') Attr ({src: url})

java - what regular expression can match the [ and ] characters? -

I'm trying to change the Java method, replace all (), all the characters that match a given reg , Therefore, I need to use it as a paragraph that matches [and]. I have tried [[| ] Or ([|]) but they do not work. You need to avoid them: \ [and \ ]

Key Values not getting printed when im trying to access windows system registry in c -

I am trying to print the values ​​of keys in the Window System Registry, the code mentioned below. Showing only a blank screen, I think calculating and printing of every important value of the datatype in the registry. Any help would be appreciated! #include & lt; Windows.h & gt; # Include & lt; Stdio.h & gt; # Include & lt; Tchar.h & gt; # Include & lt; Conio.h & gt; #define MAX_KEY_LENGTH 255 # defined MAX_VALUE_NAME 16383 zero QueryKey (HKEY hKey) {TCHAR achKey [MAX_KEY_LENGTH]; // Buffer DWORD cbName for sub-name; // Name String TCHAR achClass [MAX_PATH] = TEXT (""); // buffer DWORD for class name cchClassName = MAX_PATH; // Square string DWORD cSubKeys = 0 size; // Number of subkeys DWORD cbMaxSubKey; // Longest subkey size DWORD cchMaxClass; // longest class string DWORD cValues; // Important DWORD number of values ​​for cchMaxValue; // Longest Value Name DWORD cbMaxValueData; // Longest Value Data DWORD cbSecurityDescriptor; // Se...

python - Parsing compressed xml feed into ElementTree -

I am trying to parse the following feed in ElementTree in Python: "" (big file warning) Whatever I have tried here: feed = urllib.urlopen ("http://smarkets.s3.amazonaws.com/oddsfeed.xml") # Feed Compressed_data Compressed = Feed.read () Import StringIO compressedstream = StringIO.StringIO (compressed_data) Import gzip gzipper = gzip.GzipFile (fileobj = compressedstream) data = gzipper.read () #Parsx XML tree = ET.PERS (data) But it just hangs on compressed_data = feed.read () Land is infinitely be ?? (I know that this is a big file, but I think it takes a lot longer than other non-compressed feeds, and it is massively killing any bandwidth benefit from gzip compression in the first place) . Next I tried Request , url = "http://smarkets.s3.amazonaws.com/oddsfeed.xml" header = {With 'accept-encoding': 'gzip, deflate'} r = request.get (url, header = header, stream = true) but now tree = ET Parse (r) .content) or ...

css - Issue on Adding Down Triangle to the Top Border -

I Trying to add the triangle to the top of the active square! Here] [2] I am using this CSS rules: .xxx a {border-top: 3px solid # E1483F; } .xxx. Active & gt; A: After {border-top: 12px solid # E1483F; } But as you can see that I can not find the triangle plus. Item (CSS) is taking the previous position down. Can you please decide how I can ? Thanks You can get it like this: JSFiddle - .navbar-nav> Lee (Status: Relative; Text align: center; }. Active: {Before content: ""; Status: Completed; Left: 50%; Conversion: Translator X (-50%); Z-index: 999; Width: 0 pixels; Height: 0 pixels; Border-style: solid; Border width: 12px 12px 0 12px; Border color: # E1483F Transparent transparent transparent; }