Posts

Showing posts from May, 2013

Generatinge Unique Id on the fly Mysql + PHP -

I am trying to come up with a solution specifically to generate a unique ID on the fly. The area of ​​use can be an order, product or plan ID, where no security is involved. I do not like the idea of ​​generating random numbers and then DB should check its specificity and repeat the process, if it is not in this case where security is not a problem. Besides, I do not like to use auto-emoticon id because it looks very easy. My initial thought is that the combination of Auto Enerment ID + Timestamp has to convert the decimal value to hex, it seems like a random string and then finally prefixing and suffixing with 2 digit random strings. Generate function UID ($ num) {$ str = dechex (time () + intval ($ num)); $ Prefix = dashx (rand (1,15)); $ Suffix = decex (rand (1,15)); Return Strawper ($ suffix. $ Str. $ Prefix); } Where $ num is the auto_increment id returns such as E53D42A046 is the correct way to know what to do Is Collision Issues? Thank you for all the resp...

arrays - unable to show image from external hd php -

Image
I am new to programming and am now learning php. I have installed the xim and have written a bit code. I have some pictures on my external HD and I want to show some pictures. The problem is that I can get a list of the paths of my images with this code: echo " gt; body ; $ External DIR = "X: \ map \ maps \ more \" "$ total = count (array_diff (scanner ($ external diameter), array (". "," .. "))); $ Dirs = array_diff ( Scandor ($ External Dior), Array (".", "..")) Foreign Currency ($ dirs $$) {if (! Is_dir ($ external DIR. $ D)) {echo $ d "& lt; But if I want to show it as an image, then I can not show the image. I tried to do it in foreach: if (! Is_dir ($ external. $ D)) {$ file = $ outerhDir $ D; Echo 'img src = "'. $ External Direct $ d '' Gt; & Lt; Br> '; Echo '' & lt; Img src = '". $ External Diaries"' \\ '. $ D. "' Alt = ...

sql server - T-SQL code to add 7 days to a date -

If we recall the date of the ship, the details given below include 7 days on the date of shipment. For, 07/24/2014 did not send any vessel to the ship for any reason. The following query in shipments adds 7 days (as a result of 07/31/2014 ). The only problem is that the 'test ship' column adds seven days to shipment if we remember the date of shipment, only on Sunday the date. What do I mean for jobs that was the date of a scheduled ship of 07/24/2014 , and we miss the job navigations on that day, update the next scheduled ship next to the 'test ship' column Does 07/31/2014 only on Sunday. For example, the job J012345 is 07/24/2014 / 2014 . Then the 'Test Ship' column will update tomorrow's date.e 07/27/2014 (Sunday) instead of updating it on Friday 07/25/2014 Am I missing anything here? How do I get a 'test ship' to update on Sunday on Sunday? 'test ship' = case when J. Jobstats & lt; & Gt; 'S' and the...

java - Scanner.next returning path of file? -

मेरे पास एक स्कैनर है: m = नया स्कैनर (मान। Mazegen.replace ( "\\", "//") + "//maze.txt"); (मान। Mazegen.replace ("\", "//") + "//maze.txt" प्रिंट के रूप में C: // users // myusername // डेस्कटॉप) और जब मैं m.next () का उपयोग करता हूं तो यह C: //users//myusername//Desktop//maze.txt देता है। मुझे कोई जानकारी नहीं है की क्यों...? पूर्ण कोड: सार्वजनिक शून्य खुलाफ़ाइल () {try {if (Values.custom == true & amp; Values.customSolved == false) {m = नया स्कैनर (नई फ़ाइल (मान .MazeFile)); } Else if (Values.customSolved == true || Values.custom == false) {m = नया स्कैनर (मान। Mazegen.replace ("\\", "//") + "//Maze.txt") ; } और {एम = नया स्कैनर (मान.मज़ेज.रेले ("\\", "//") + "//Maze.txt"); }} पकड़ (FileNotFoundException ई) {System.out.println ("फ़ाइल नहीं मिली!"); } यदि (वैल्यूज कूफ्यूम == सत्य & amp; Values.customSolved == गलत) {m.nextLine (); }...

python - How to generate RequestToken URL for Google API -

"itemprop =" text "> I am writing Python 2.7 desktop applications which need to use Google Spreadsheets by using OAuth 2.0. I'va got a library for Google Spreadsheets for Python, which uses Python OAuth2.0 library. The flow for described desktop applications tells me that the first time I have to generate the RequestToken URL is that the user can use the application to get the authorization code. I have already created Client ID and Client Secret Developer Console. But I can not figure out what class / method I can use to generate RequestToken URL in Python. Should I somehow build myself or is there an API to do this? I have understood this from the document #! / Usr / bin / env oauth2client = OAuth2WebServerFlow (client_id = 'your_client_id' python import oauth2client.client import OAuth2WebServerFlow flow, client_secret = 'your_client_secret', scope = 'https: //spreadsheets.google.com/feeds', redirect_uri =' You need y...

android - How can I set eclipse to generate widgets in R class automatically? -

I'm new to Android I have a problem with my eclipse: Like the text view or button in the XML file R is not generated in the class even when I clear the project or create the project (There is no error in the xml file). The only way to make it in R class is to start the project Run the project and it will be generated immediately after running it. I saw in some instructions; When we create automatically under the Project tab, widgets created immediately after the composition but I do not have an eclipse. How can I fix this problem? Sorry for the lame question, I searched it and I could not find any answer. thanks please read your paint Doable image should not contain uppercase letters. Or you can remove ic_launcher and also check that your layout can not have uppercase letters. Then reboot the eclipse and clear it again. try. Thank you.

python - Scatter plot with arrows using matplotlib -

Image
I'm trying to create a scatter plot in matplotlib with an arrow coming out of the points to indicate the upper limit At the end I have done the following: arrow = u '$ \ u2193 $' ax.plot (x, y, linestyle = 'none', marker size = 20, marker = Arrow) Ax.plot (x, y, linestyle = 'none', markersize = 10, marker = 'o') However, I am not completely satisfied with the results - / P> to come to me Arrow is out of the middle of the point, then that point + arrow looks like a shape, is there any way to do this? Thank you! You can do this with Thiracer to create a plot filled with arrows For situation and direction takes data. But they will start at x, y instead of being centered (as you have been found in the plot) x = [4.07.0,4.5] y = [3.0,1.0,5.5] Ax = ([0,0,0] V = [1,1,1] fig, ax = subdivision () ax (x, y, u, v) ax.scatter (x, y, color = 'k') ax .axis ([0,10,0,10])

ios - NSNotificationCenter sending deallocated message during app purchase -

I know that this question has been asked many times, but I still have problems with it. I have some non-consumable app purchase codes that work fine if the user stays in the scene and buys them all at once. However, if the user leaves this menu and returns to it, the code will crash when he completes the transaction. I am using cocos2d for this. Provide MKStoremanager.m - (zero) to Resource: (NSString *) Product Identifier {NSLOG (@ "ProductInfifier =% @ ", Product identifier); NC = [NSNetification Center's default center]; Convenience = bought; [Nc postnotification name: @ "feature acquired" object: zero]; // & lt; - Crashes here [MKStoreManager updatePurchases]; MSStoreObverser.m - (zero) full transaction: (SKPaymentTransaction *) transaction {NSLog (@ " Full transaction "); NSLog (@ "transaction.payment.productIdentifier =% @", transaction.payment.productIdentifier); // [[NSNotificationCenter defaultCenter] to remove ob...

javascript - Gulp Watch Concat sometimes ignores some JS files -

I have a Falcon Conset Watch task setup to include some JS files: var source = ['public / js / script ajs',' public / js / scriptb.js', 'public / js / script c. JS ',' Public / JS / Script D. JS ',' Public / JS / Script EJs']; Gulp.task ('main.js', function) (return gulp.src (source) .pipe (conat ('main.js')) .pipe (gulp.dest ('. / Public / js'));} ); Gulp.task ('clock', function () {gulp.watch (source, ['main.js']);}); Pretty simple setup I think whenever a script changes, then main.js is created by adding the script to that sequence. It works 99% of the time right. But sometimes, perhaps randomly, the connection only leaves 1 or more files. For example, I will edit scriptB.js , save it , Then look at main.js and only copy it to scriptA , code> script b and script A . It completely left C and D out and sometimes it might just be C. Sometimes it can be D. Sometimes this can happen. It...

Return plain map from a Clojure record -

मेरे पास एक रिकॉर्ड है: (defrecord point [xy]) (def p ( प्वाइंट 1 2)) अब मैं रिकार्ड से बस नक्शा निकालना चाहता हूं। इन तरीकों से नौकरी मिलती है क्या ये अच्छे तरीके हैं? क्या बेहतर तरीके हैं? ({} (concat p)) ({} (नक्शा पहचान पी) में) (हेश-मैप लागू करें (कॉन्टैक्ट पी लागू करें)) मैं उम्मीद कर रहा था कि एक क्लीनर तरीका हो सकता है, शायद किसी रिकॉर्ड की धारणा में अंतर्निहित हो। रिकॉर्ड हैं मानचित्र (defrecord Thing [ab]) (def t1 (बात 1 2)) (उदाहरण? Clojure.lang आईपरर्सस्टेंटमैप t1); = & gt; सच है तो, सामान्य तौर पर उन्हें कोई भी APersistentMap टाइप करने की आवश्यकता नहीं है लेकिन, अगर वांछित आप ऐसा करते हैं तो में : ({} t1 में); = & gt; यदि आप एक स्वैच्छिक डेटा संरचना का पता लगाना चाहते हैं, जिसमें नेस्टेड रिकॉर्ड शामिल हैं, तो यह परिवर्तन करके, फिर चलाना (def t2 (थिंग 3 4)) (def t3 (चींटी टी 1 टी 2)) (डेफ कॉल (सूची टी 1 [टी 2 {: एफयू टी 3}])) (क्लोज़ोर.वॉक / पोस्टवॉक # (यदि (रिकॉर्ड?%) ({}% में)%) coll); = & gt; ({: A 1,: b 2} [{: a 3,: b ...

gvisMotionChart is not working in R markdown file -

I need to embed gvisMotionChart in an R. markdown file and find an example that is really helpful. However, when I press the "Run Code" button I keep getting this error: OpenCp to fail the connection: error fixed network error: a network error occurred Can anyone locate the solution? Thanks in advance. The GoogleVis package for interactive plot creates javascript which is embedded in an HTML document to run on a webpage. To be done you will not be able to work it for that reason in the console or roostdo. The only way to find out is to make sure that it's working, it's knit on HTML, and then publish it on Rpubs (or anywhere else online). This will work after you are online, depending on your browser settings, you may be able to work locally by opening HTML, but the browser often blocks the embedded plot when opened locally. Without looking at your actual code, I can not Edit: I thought I would add that several months ago I created a markdown file t...

php - Mysql query - using like <something> and <something='1'> with limit -

I'm being stumped on this problem, and I do not seem to understand this, hope someone heads here Expect to make or tail on it. When I use the following for the query of my database: $ q = "SELECT * from the item (searchable = '1' and the title ' Items are shown in the ways they want to. But when I end up with limits 10, 5 Add to: $ q = "SELECT * from the item (searchable = '1' and title '%' $ _ Srch."% ') Range 10, 5 "; The query does not show anything I can think of everything I have tried, but I will remember something LIMIT 10, 5 itemprop = "text"> / code> you're telling that you want That the database should start displaying from the 10th row and display 5 rows. - It's possible that you do not really have enough rows Try something like, LIMIT 0, 5 - It will display 5 lines before startup, but 10, 5 Only work when you have more than 10 rows. Read more here:

css - How to position a callout/speech bubble box inline -

I am using this CSS speech-bubble generator to create a callout box on the raththand side of a page (speech / Callout triangle to the left of the box) I need it to be located on the right side of the other & lt; Div>, but I have not tried anything like the way I need it. When I decide this, then the page is definitely scrolled up and down, which is not good when I float it correctly, it is & lt; Div> on the left (unless the window is small enough). I am thinking that the position of inline will be the best bet, but when I change the position from relative to inline triangle part of callout, then disappears. Any solution to solve this? Meditation .bubble {Status: Relative; Width: 200px; Height: 310px; Padding: 14px; Background: #FFFFFF; Limit: #cfcfcb Solid 4px; -WebKit-boundary-radius: 5px; -max-boundary-radius: 5px; Boundary-radius: 5px; } .bubble: after {content: ""; Status: Completed; Top: 16px; Left: -39px; Border-style: solid; Border width: 16px 39...

Give charging from one android phone to another via usb -

I think another Android phone is charging from another Android phone using USB Should be connected directly through. Is this possible? Is it possible to create an app that controls such charging? Please help me with this. Thank you Yes and no. You may charge a device as long as the device you are charging supports USB OTG (On-the-Go), by the second you have the right type of cable (usually ' Host cable '), after which you can plug your normal charger cable to charge on the device. Some devices can not make enough available electricity from your USB OTG port so your benefits may vary, do not be surprised if it works but lot slowly To make an app to control it, I'm almost 100% sure that this is not one - I do not believe Hope that helps: )

php - Multiple Page ids in wordpress function -

I have a WordPress function that redirects users to login while trying to view a certain page and that Moves to the page, log in. The function works fine when I only enter a page ID When I should redirect the url to log on to any of the page pages, The function stops working. Please solve how I can help it. add_action ('template_redirect', 'wpmy_check_if_logged_in'); Function wpmy_check_if_logged_in () {$ pageid = array (22 9, 1589, 1031); If (! Is_user_logged_in () and is_page ($ page ID)) {$ url = wp_login_url (get_permalink ($ pageide)); Wp_redirect ($ url); Go out; Instead}} Call is_page (frequently with an ID), I just take ID global $ post object and see whether it's in your array: add_action ( 'template_redirect', 'wpmy_check_if_logged_in'); Function wpmy_check_if_logged_in () {$ pageid = array (22 9, 1589, 1031); If (! Is_user_logged_in () and is_page ()) {global $ post; If (in_array ($ post-> ID, $ pagrid)) {$ url = w...

asp.net - ASP C#: Special characters: #, $, + cant pass trough URL parameter -

Image
I need to get the file from virtual folders. I have GetDocumentPreview.aspx which can do it. The parameter URL types are the good one below: /GetDocumentPreview.aspx?name=filename&type=jpg // But if I ask for a file with #, & amp;, + name: /GetDocumentPreview.aspx?name = & amp; File name & amp; Type = JPG /GetDocumentPreview.aspx?name=#filename&type=jpg/GetDocumentPreview.aspx?name=+filename&type=jpg I have a file, because of the character # & Amp;, + (I have tested all the characters). I get the URL parameter #, & amp; + How can I pass the URL parameters to use because I need this class phone from javascript hover tooltips with images. "itemprop =" text "> You need to escape those special characters: This function is the most Good: Be careful, do not use UrlEncode

php - How to change the location of the id -

स्रोत: else if ($ key == 'title') {if ( Strlen ($ value- & gt; advObj ['title']) 15) $ advTitle = substr ($ value- & gt; advObj ['शीर्षक'], 0, 15)। "..."; Else $ advTitle = $ value- & gt; advObj ['title']; गूंज '& lt; a href = "index.php? P = newApp और amp; id = & amp; obj = cpn'। $ मूल्य- & gt; advObj ['id']।" "& Gt; '$ value- & gt; advObj [ 'आईडी']। ' - '। $ AdvTitle।' & Lt; / a & gt; '; } क्लिक करने पर परिणाम: index.php? P = newApp और id = & amp; obj = cpn1038 और मुझे इसकी आवश्यकता है: index.php? P = newApp और id = 1038 & obj = cpn मैं यह कैसे करूँ इसका प्रयोग करें: else if ($ key == 'शीर्षक') (यदि (strlen ($ value- & gt; advObj ['title']) & gt; 15) $ advTitle = substr ($ value- & gt; advObj ['शीर्षक'], 0, 15)। " । "; Else $ advTitle = $ value- & gt; advObj ...

java - Button Function Not Working? -

Then I'm trying to write a program using swing components, whenever a user clicks on a button , Appears in a different word in the text box I say, "The temporary method button () can not be referred to by a static reference" I received an error saying, "I checked other answers that it was the same How to fix with error, l Q: I still can not understand it. Here it appears: color.buttons (); And this is my code: import java AWT *. Import java.awt.event. *; Import javax.swing. *; The color of the public class {Private JFrame f; Private JLL label; Personal zipal control panel; Private Pocket button 1; Personal pocket button 2; Personal pocket button 3; Private JTextField text box; Public color () {readyGUI;} Public static zero main (string AGR []) {color C = new color (); color. Buttons ();} private Zero preparedGUI () {f = new JFrame ("color"); F.setSize (400, 400); F.addWindowListener (New Window Adapter) {Public Zero Window Closure (Window Event...

jquery - Fancybox version 3 beta: How to use "index" to jump directly to a specific picture -

I am using Fancybox for a simple gallery, such as with HTML & Lt; Div class = "item" href = "0 showcase / abstract / img / e75_2056.aggg" data-fancybox-group = "button" title = "" & gt; Sometimes I need to show the image directly on the basis of # number for which I use the following code: if (window .location. Hash) / warning (using the 'index:' + parseInt (location.hash.substring (1))); $ Fancybox.open ($ (". Item"), {index: 3}); // hardcoded for testing}; This works fine in version 2, but version 3 does not always show the first picture, your help would be appreciated!

sync - InteelliJ JavaDoc comment auto update -

I'm using IntelliJ IDEA 13.1.4 Community Edition. What is a way to create a new parameter in the method to update Javascript's comment? You can try the JavaDoc Sync Plugin to install it File -> Settings -> Plugin -> Browse Repositories -> Search and Install for Javacock Sync Plugin JetBrains Says - The Jwdak Sync Plugin will help your jwadak to synchronize interface definitions and implementation, or between system definitions and method overrides. The plugin now uses the template-based generation of Javadak so that the javaDaq text can now be easily customized for your needs.

vim - Match strings surrounding another string -

In Wimi, I'm trying to match two strings (upskix) only when C Function (foo, bar) Call Other Function (foo) Call Third Function (foo, bar): Now if we specify the string foo, then I want to look it like this (things will be matched & lt;>) call & lt; SomeFunction (& gt; Foo, Bar & lt;) & gt; Second function (foo) call and third function (& gt; foo, bar & lt;) & gt; Call. A simple example must match the string surrounded by something special. As in some foo, some times (foo, bar) only the second event of foo, bar matches but no bracket . From there, I might work on it Any thoughts? You can use to achieve your goal: (\ @ & Lt; = [^ ()] *) \ @ = It can be rewritten: (\ zs [^ ()] * \ Ze) They (...) .

forms - displaying php captcha image -

My captcha image is having a big problem displaying in my HTML form referenced below "captcaImageOutput.php" file fully Is opened in a browser (code for this too has been copied) but I get a broken image in web form? // Edit - Added code / output for the captain. At the end of PHP, // appreciate the people who respond quickly to your !! :) // Code for HTML FORM & lt; Form Action = "CaptchaAutput.FPP" method = "Post" & gt; & Lt; Label = "verify" & gt; & Lt; H3 & gt; And finally, verify your person! & Lt; / H3 & gt; & Lt; / Label & gt; & Lt; Input type = "text" id = "verify" name = "verify" /> & Lt; Img src = "captchaImageOutput.php" /> & Lt; / Form & gt; // Code for PHP captcha image & lt ;? Php session_start (); $ _SESSION ['safe'] = rand (1000,9999); ? & Gt; & Lt; Img src = "captchaCode.php" /> & Lt;...

ios - What is the best way to store slide-out sidebar menu data -

I have a sidebar menu in my application (like Facebook) and currently I link to my sidebar categories Hard-coded. My question is: What is the best place to store that menu's data? Did I really do such a hardcode? SQLite database? Plist file? I am asking because I want to keep it in memory which I am in the menu, and I wonder if the database will not be a better way to do this? Thanax Advance If you only mean categories of menus, then Hardcoding is fine, depending on how likely they want to change. But if it's like Facebook and they do not change, then it's okay. In relation to the content displayed on taping a menu item, this is different. There I used to recommend either a SQLite database or better use it to manage it for you. If you have a view controller that manages the status of that menu, then you can place that menu item there, choose a list of items to display, etc. and that's fine, There really is no need for a database though I s...

jquery undefined variable for jscrollpane -

I am trying to implement jScrollPane in a WordPress subject and I am working on the instructions on the site Have followed. I have in my head: & lt ;! - Styles required by jScrollPane - & gt; & Lt; Link type = "text / css" href = "& lt; php bloginfo ('template_url') ;? & gt; /jquery.jscrollpane.css" rel = "stylesheet" media = "all" /> & Lt ;! - Muswell plugin - Optional to provide muswell support - & gt; & Lt; Script type = "text / javascript" src = " And in my footer I have: jQuery (function () {jQuery ('# content'). Chetan ({'margin- Top ':' 120px '}, 1500); jQuery (' content '). JScrollPane ();}); When I load the page, then animate #content box, as it should be, but. The scroll bar near the content divide is standard. I refresh and say "uncontrolled error: undefined variable: jQuery" and entered: ! Function (a, b, c) { which...

javascript - AngularJS assign different params and functions -

It may not be an AngularJS problem but I think I'm new to understanding what I'm doing Am wrong here Can you push me in the right direction? I tried to get depressedness from 3 hours and later: - ( I have a function in which I pass my SQL questions with other parameters. This function will be flexible as much as possible. prepareQuery (choose from names' where id = ', [$ scope.listId], listnameResultHandler (), defaultErrorHandler ()); prepareQuery (?) (Select' products * From ', [], defaultResultHandler (), defaultErrorHandler ()); To explain this: Ultimate: SQL Quay Ultimate: Bind the query Ultimate: If success is possible, then the query is possible The ultimate: error-function, if there is a problem Now it is that prepare-function: function prepareQuery (query, ultimate, successHandler, errorHandler) {$ scope.db.transaction (function (TX } {Tx.executeSql (query, ultimate, successHandler, errorHandler);}, errorCB;} The problem is...

An HTTP 401 unauthorized response coming form IIS 7 body is empty. ASP.NET WEB API -

I have a custom message that is being unauthorized when I have to pass the customer. I have used the following code to pass the message value on the response body: string message = baseEx.Detail.ExtraData; Return Reference. request. Create irreversions (HTTP status codes. Unknown, messages); All work well on my local host, but when I deploy the code on Windows Server machine with IIS 7, I get a blank reaction body. I am using the asp.net web API What could be? Thanks

asp.net - Visual Studio Publish stuck at Adding ACL's for path -

I'm trying to publish a web application, but for the last 10 minutes, Adding ACL to the path . I have no clue why it is stuck there, I've published several times without problems. I have the same problem and it has come to know that the web application I have used Many user-specific directories and files have been submitted for upload / report files etc. in a custom directory. Visual Studio checks and updates ACL for each file and directory, if there are many of them, then why it takes so long. Check the directory with the user-created content or other content along with a lot of files and check whether you can safely remove them (for example, those files are only temporarily created - as if this case was here). After cleaning the directory on the web server, the deployment is almost immediately for continuous updates, which are very slow before the cleaning process.

Concatenate a string with the output of a php function as a parameter of anouther function -

When I call the function mainfunc () I want to have a clear value near the output As a parameter of mainfunc () I want to do some time such as a mainfunc ('foo'.LaTeX ()); . But, when I do this, I get the output of LaTeX () before "foo" it really does LaTeXfoo for me Print LaTeX () is LaTeX ) and I only get one when I try to index it like LaTeX (). Then, this function LaTeX () : function latex (?) {? & Gt; ; & Lt; Span class = "latex" & gt; L & LT; SPU & gt; & Lt; / Sup> T & LT; Sub & gt; E & lt; / Sub & gt; X's & lt; / Span & gt; & Lt ;? Php} So, do I LaTeX () function, please? You can do this by using mainfunc to get exactly fooLaTeX The answer is simple: Do not print (what happens if you close the PHP code and reopen it again). The following two lines of code essentially do the same thing (they are equivalent): echo & lt; B & gt; Hello World! ...

smlnj - What are the options Some and None SML? -

I am new to sml (and programming, in fact). List of fun reading (infile: string) = val in = TextIO.openIn infile funny loop INS = case textIO.inputLine = some row => Line :: loop ins | None = & gt; [] TextIO.close In the loop ins before these endings; This is a program I saw here. How to use nothing else and how to use 'first' option data type is used if there is a valid value There is a possibility of something. For example, fun split xy = if y == 0 then nothing else (x / y) Can be used when it is necessary to handle a special case of zero-partition without taking the exception of exceptions. TextIO.inputLine return none is nothing to read, and some A , where L that line is read, when there is. first is less important (the lowest of all) the infix function which first evaluates toward its left hand, then towards the right hand, and then returns to the left hand is. Br> type in 'a - & gt; Unit - & gt; A ' , i.e., ...

php - return all object created in loop -

I am new to PHP OOP, I am trying to select the OOP, I have class page {var $ title; Function Settlement ($ title) {$ this- & gt; Title = $ title;}} now class model {connection $ done; Function receivedApplepage () {$ query3 = "select * from pages"; $ Result3 = mysqli_query ($ this->; $ query3); While ($ rows = mysqli_fetch_array ($ result3)) {$ page = new page; $ Page- & gt; SetP_title ($ rows ['p_title']); } Return $ page; }} class controller {function index AllPage () {$ pages = $ this- & gt; Conn- & gt; GetAllPages (); ('Allpages.php'); }} see allpages.php If you want to return more than one page then you need an array: $ pages = array (); While ($ rows = mysqli_fetch_array ($ result3)) {$ page = new page; $ Page- & gt; SetTitle ($ rows ['p_title']); $ Pages [] = $ page; } Return $ page; Update: $ pages = $ this- & gt; Conn- & gt; GetAllPages (); // $ pages now have an array, so you h...

javascript - Phonegap button onclick on Ios -

I have phonegap in Android devices, and their work is fine. There is a problem with firing javascript function on the iOS version click button. I use the angulars: & lt; Button class = "grip" ng-click = "recordound ()" & gt; Grabar & lt; / Button & gt; This button does not work in iOS version but works in Android. Without angular (onclick = ...), there is a similar problem .. Thanks! PD: I use this example to use an example: And its work is fine! -_- But I think that's not the best way. It's better with the button. PD2: Okay! I resolve using this problem: & lt; Button class = "grab" onclick = "recordsass ();" & Gt; Grabar & lt; / Button & gt; But I do not understand why not ng-click.

python - Correspondence between a "ij" meshgrid and a long meshgrid -

Consider a matrix Z which contains grid-based results for z = z Are, m, e). Z has the size (lane (aggregate), lane (mg), lane (eagrid)) . Contains Z [0,1,2] in z (a = agrrid [0], m = mGrid [1], e = eagreement [2]) . However, we may have removed some elements of state space from the object (for example and simplicity, (a, m, e: a & gt; 3) say the size of a valid state location x . I have a code to convert this object to the Z2 shape of (x, 3) Each line in Z2 belongs to i to Z2 : (agrrid [a [i]], mGrid [m [I]], eGrid [e]]] . # first z, based on a mash grid Create tricks in which there are some invalid states (we set them to nan) agrid = Np.arange (0, 10, dtype = float) mGrid = np.arange (100, 110, dtype = float) eGrid = np.arange (1000, 1200, dtype = float) A, M, E = np.meshgrid (aggregate, mizid, eagrid, indexing = 'ij') Z = aZ [z3] = NP.NAN # # Now, translate them by size (grid from lane (aggregate), lane (mgid), grid (eagrid) = [a, m, e] grid...

security - Can you "SQL Inject" a PHP Variable Comparison? -

While working on an existing project, I am thinking of something when a simple variable comparison attacks "SQL injection" type attacks A user is entered. My basic login feature works by using a statement prepared by the user in the given username and profile table. If any records have been found, then profile ID is received from the record and is used to view the user's password in any other permission table. If this query is successful then the password provided by the user is === with the password retrieved from the database. So my question is, does a risk occur in the final phase? I have tried hacking it, like a '==' a '|| In an attempt to trigger the wrong way ' $ pass === $ checkPermRow [' pass'] but nothing seems to happen if you use the prepared statement and Ready to pass input as the parameter of the statement, are you safe? Therefore it should not be possible to inject anything into the query. However, you should not ...

delphi - Is interface inheritance nothing more than syntactic sugar? -

नीचे कोड काम नहीं करता है। प्रोग्राम Project7; {$ APPTYPE कंसोल} {$ R * .res} का उपयोग करता है System.SysUtils; प्रकार I1 = इंटरफ़ेस ['{B4BF44AD-23A 9-4F42-BA2B-6E137E22344E}'] प्रक्रिया 1 परीक्षा; समाप्त; I2 = इंटरफेस (I1) ['{AAAAAAAA-23A 9-4F42-BA2B-BBBBBBBBBBBB}'] प्रक्रिया टेस्ट 2; समाप्त; टी 12 = वर्ग (टीइंटरफेस ओब्जेक्ट, आई 2) सार्वजनिक प्रक्रिया 1 परीक्षा; प्रक्रिया परीक्षण 2; सार्वजनिक समारोह MeAsI1: I1; समारोह MeASI2: I2; समाप्त; समारोह T12.MeAsI1: I1; परिणाम शुरू: = (I1 के रूप में आत्म); समाप्त; फ़ंक्शन T12.MeASI2: I2; परिणाम शुरू करें: = (I2 के रूप में आत्म); समाप्त; प्रक्रिया T12.Test1; राइटेलन ('टी 12: इंटरफ़ेस i1 से test1') शुरू करें; समाप्त; प्रक्रिया T12.Test2; राइटेलन ('टी 12: इंटरफ़ेस i2 से test2') शुरू करें; समाप्त; अभिकलन: var MyClass: T12; AI1: I1; ए 2: I2; शुरू MyClass: = T12.Create; ए 2: = मायक्लस। मेएएसआई 2; AI2.Test2; Readln; AI1: = MyClass.MeAsI1; // & lt; & lt; अपवाद इंटरफ़ेस समर्थित नहीं AI1.Test1; Readln;...

Selecting a value in an array in an array; Javascript -

इस सवाल का पहले से ही एक उत्तर है: 14 जवाब मेरे पास एक सरणी है, वह एरे से भरना होता है: [[1, "बात"], [2, "दूसरी चीज़"], [3, "अभी भी दूसरी चीज"]] मैं एक का चयन करने में सक्षम होना चाहता हूं सरणी को एक अस्थायी चर बनाने के बिना और आइटम को चुनने के बिना किसी एक सरणी के भीतर का मान। क्या यह किया जा सकता है? आप एक ही '[]' वाक्यविन्यास के साथ नेस्टेड सरणी में अनुक्रमणिका कर सकते हैं var arr = [[1, "चीज़"], [2, "दूसरी बात"], [3, "अभी भी दूसरी चीज"]]; console.log (आगमन [0]); // [1, "बात"] console.log (arr [0] [0]); // 1 संदर्भ के लिए, दो-आयामी

jquery - how to focus next cell in kendo grid by enter -

I want to select the next cell by pressing Enter in the center grid. And I am using the following script: databound at function (e) {$ ("#batchgrid"). ("Focus", "TD", function (e) {var rowIndex = $ (this) .Parent (). Index (); var cellindex = $ (this). Index (); $ ("input"). ("KeyDown", function {if (event.keyCode == 13 () "$" ("#Betchgrid") .data ("cando grid"). Edit call ($ (".k-grid- Find "(" trunk "). Find (" Tables "). Find (" tr: Eq ("+ rowIndex +") ". (" Td: eq ("+ + cellIndex +") ") .next Focusin ($ ("#BatchGrid"). Data ("Kendo Grid") .closeCell ($ (".k-grid-content") .Find ("Table") .Find ("Tubby") .Fund ( "Tr: eq (" + rowIndex + ")" .Find ("td: eq (" + + cellindex + ")") .Parent ()));) Is a liar;}}};}}} And it is my problem with t...

android - How to display a notification over a running activity? -

I am creating a Clothing + Mobile app using Android Ware SDK. When a user gives a text lecture, it is passed to the mobile app which creates a DB query and results the result to the app. If I use the message then it's working fine, but I would like to make a notification for the app for mobile app wear. If I make an information it is sent properly but it is shown under the running app ... I send a notification which appears on the ongoing activity?

javascript - How to handle multiple fieldnames and values as variables using mongoose "where" method? -

I'm using the where method to pass a field name and value to a Mongoose fineOne Query Model.findOne (). Where (field 1, value 1) .where (Field 2, the value 2) .exec (function (fault, callback) {...} See the above tasks. However, my the problem is that we have more Area name and values ​​that are passed to the above explanation. I do not know the number of Field and values ​​to be used, because it dynamically to use user Configreshnkman a loop Ways to build clauses where I do not know, but I do not know how. Can anyone help? a value object as the field that you want to save, and a fields field name to save the array, you can do this: var value = {p_last_name: 'Smith', p_first_name: 'John', ...}; var field [ 'p_last_na me', 'p_first_name']; Var query = Model.findOne (); (var i = 0; i & lt; fields.length; ++ i) {var field = field [i]; Query.where (field, value [field]);} Query.exec (call Track);

Printing image from JLabel (using Printer) using java netbeans -

I am using Java Netbeans and want to print the image with JLABB but its not working. If I am using TextArea.print () I just want to print the image, please help. icon icon = Noska_Camela. Gate Icon (); BufferedImage bi = New BufferedImage (icon.getIconWidth), icon.getIconHeight (), BufferedImage.TYPE_INT_RGB); Graphics G = Two Character Graphics (); G.dispose (); Try {PrintAll (g); Joppenpen Shomos Digital (empty, "success"); } Hold (java.awt.print.PrinterException e) // An error {System.err.format ("%% can not be printed", E. Message ()); You are settling graphics objects before printing g.dispose (); Try {PrintAll (g); Joppenpen Shomos Digital (empty, "success"); } Hold (java.awt.print.PrinterException e) // An error {System.err.format ("%% can not be printed", E. Message ()); } should be try {printAll (g); Joppenpen Shomos Digital (empty, "success"); G.dispose (); } Hold (java.awt.print.PrinterException e) // ...

jsp - Passing List from controller to view with JSTL or EL -

I would like to switch EL or JSTL from script, but I can not understand how you can view in your view passes Controller We say that our controller has a list of cars, and we want to display them on our scene. With the authors we will: & lt;% list & lt; Cars & gt; Cars = (list) request.getAttribute ("car"); & Gt%; Div class = "post-text" itemprop = "text"> I'm assuming that you are defining your list with your controller - request.setAttribute ("item", item); If this is the case, then you can access each item in this list as follows - If there are assets in the list that have the property, say, value (which means that you have getPrice in the class You can do this to access that value - $ {item.price} inside of that jstl loop .

python - Array of foreign keys in Django Model -

I'm not sure that this is the best title, but I'm having trouble writing it plainly. Actually, I Building a model that represents the business. It includes and address, time of operation, etc. It has operating hours that are tripping me I have my address class address (models.Model): --snip-- business = model. Foreign Key (BusinessInfo) So each business has one or more location addresses I am looking for to do this with hours square hourhand (model) .model): Open = isOpen = Model. Booleanfield () Open = Model Timefield (Null = true) off = Model Timefield (Null = True) I want to apply it that every business should have an array of 7 hours - one day of each week for. I can not feel stumbling in a clear, elegant way to do this. Is this a good way to model in the Django? Use a lot of: time code (model. Model): model = Model: model = model = model. Boolean field (open) = model Timefield (tap = true) off = model Timefield (null = true) class day (model model): ...

c# - How to Properly Implement a Trial Experience in Windows Phone -

I installed the app in the App Launch and App Activation as LicenseInformation.IsTrial for your app My main question guided here is to return CheckLicense to _isTrial = _licenseInfo.IsTrial () in release mode, if a user is not an active connection (say That they do not have cellular service where they are currently), then will the app crash? My main concern is that every time the app is activated or launched, so in order to be careful to stop the action from crashing, do I need to store the current test status in separate storage? The documentation was not clear on this and I have not got anything in this situation and stating what to do. App.xaml.cs Private Static LicenseInformation _licenseInfo = New LicensingEconomy (); Private static bool _isTrial = true; Public bool istrial {receive {return_isTrial; }} /// & lt; Summary & gt; /// View the current license information for this application /// & lt; / Summary & gt; Private zero checkLicense () {// Debug...

jboss - JMS call overwriting current jaas subject -

are I have an application using Jeaas to protect Jeass, running Jebis AS Ijebi component. Object of Javax.security.auth.login Login Contex is used to verify any method before calling. I have a functionality where I am calling EJB which is safe using role permissions (via EJB deployment descriptor). Before calling EJB, there is a code to deliver messages in JMR Q. The issue is that the subject matter contains the correct user details before the JMS Qi code. Once the JMS code changes the subject to the guest, execution of EJB fails because the guest does not have the right role to call the EJB. And ends with the following exceptions [org.jboss.ejb.plugins.SecurityInterceptor] Error security interceptor java.lang.SecurityException: Rejected: collar with subject = Subject: Principal: Each principal: roles (members: John, guest, J 2) and security context post-mapping roles = roles (John guest, J. 2E,): ejbMethod = someEjbMethod I first The subject after JMS call is that EJB refe...

php - Query an external file like a database -

मेरे पास php / mysql से एक गतिशील मेनू है, जैसे & lt; ul & gt; & Lt; li & gt; श्रेणी 1 & lt; ul & gt; & Lt; li & gt; 1 प्रकार & lt; / li & gt; & Lt; li & gt; 2 प्रकार & lt; / li & gt; & Lt; / ul & gt; & Lt; / li & gt; & Lt; li & gt; श्रेणी 2 & lt; ul & gt; & Lt; li & gt; 1 प्रकार & lt; / li & gt; & Lt; li & gt; 2 प्रकार & lt; / li & gt; & Lt; / ul & gt; & Lt; / li & gt; & Lt; li & gt; श्रेणी 3 & lt; ul & gt; & Lt; li & gt; 1 प्रकार & lt; / li & gt; & Lt; li & gt; 2 प्रकार & lt; / li & gt; & Lt; / ul & gt; & Lt; / li & gt; & Lt; / ul & gt; सर्वर अनुरोधों को बचाने के लिए, एक दिन में एक बाहरी HTML फ़ाइल को प्रिंट करने के लिए एक क्रॉन जॉब सेट अप है (जो पूरे साइट में उपयोग किया जाता है)। इस बहु-स्तरीय उल और रिटर्न परिणाम पर एक mysql- जैसी खोज को चलाने के लिए दूर है? यानी, ...

glsl - OpenGL cannot create uint uniform -

I'm wondering, why does the UIT uniform fail? Is UIT type removed in OpenGL 3.x (3.2 cores) or is there just one bug in Nvidia Driver (337.88)? #Version 150 Uniform selection of UIT; // Glign Uniformation () = -1; # Version 150 Uniform Int Select; // Glaginiformlocation () = 3; Use in shader: if (choose == 0) {last collar = ....

asp.net - news ticker jquery not running on dynamic content (repeater control) -

I created the news to show as a ticker that is dynamic, I create repeater controls to display the news I have, & lt; Div id = "nt-1" for a jquery (vTicker) to slide the news one by one. Jquery was working on static data but it is not working, title-container "> gt; & lt; asp: repeater id =" rptNews "runat =" server "> gt; item title & gt; & lt ; Li> ID = "Ticker"> & lt; asp: label Id = "lblHeader" runat = "server" text = '& lt;% # Eval ("newsHeader")%> & gt; CssClass = "lblHeader" & gt; & lt; / ASP: Labels & gt; & lt; / p & gt; & lt; small & gt; & lt; asp: label ID = " LblDate "runat =" server "text = '& lt;% # Eval (" newsDate ")% & gt; CssClass = "lblDate" & gt; & lt; / ASP: Labels & gt; & gt; & gt; & lt; br / & gt; & lt; p & ...

mongodb - Mgo pull update not working -

I'm trying to achieve the following functionality with Emoji Library: db Artists.update ({_id: ObjectId ( "534944125117082b30000001"}}, {$ bridge: {study: {_id: ObjectId ( "53d53591718a522e04000001")}}}) this is basically a Update in the collection of artists, where I am trying to remove a study related to the field of study, based on its ID. So I use these: pullQuery: = & amp; Bson.m {" Dhyyn ": & amp; bson.M {" _ id ": bson.ObjectIdHex (" 53d53fd6718a521954000001 ")}} err = col.Update (& amp; bson.M {" _ id ":" 534944125117082b30000001 "}, & amp ;; Bson.m { "$ bridge" Pulclaiti}) but it does not seem to work. If I run earlier versions directly Robomongo (Mongodb client utility) it is working fine, but with Mjio, it does not seem to work err = col.UpdateId (bson.ObjectIdHex ( "534944125117082b30000001"), & amp; bson.M { "$ pull": pullQuery}) ...

ruby on rails - Why does my route insist on being GET, when it ~should~ be PUT -

मेरे पास एक अनुक्रमणिका दृश्य में यह लिंक है। & lt;% = link_to "स्वीकार करें ! ", Playtime_accept_path (खेल का समय) जब तक playtime.Accepted? & Gt%; इस लिंक का उद्देश्य एक प्लेटाइम रिकॉर्ड को अपडेट करना है जो कि पहले से मौजूद है, सृजन होने पर: स्वीकृत विशेषता गलत है, और उपयोगकर्ताओं को इसे बदलने के लिए इस लिंक पर क्लिक करें। नियंत्रक की कार्रवाई बेहद सरल है (हालांकि अगर ऐसा करने के लिए एक सरल तरीका है, तो मुझे जानना अच्छा लगेगा) डीफ़ स्वीकार करें playplay = playtime.find (params [ Playtime_id]) @ playtime.accepted = true response_to do | format | अगर @ प्लेटाइम.अपडेट_एडिट्रीज (पाराम [[प्लेटाइम]) format.html {redirect_to @playtime, नोटिस: 'विश्राम का समय सफलतापूर्वक स्वीकार किया गया था।' संसाधन: प्लेटयम्स को 'स्वीकार्य' मिलता है = & gt; "प्लेटीयम्स # स्वीकार्य",: जैसा = & gt; : इसे स्वीकार नहीं करना चाहिए? यदि हां, तो ऐसा करने का सबसे अच्छा तरीका क्या है? रेल को बताने के लिए अपने मार्गों को अपडेट करें कि का...

c# - Assigning value of a Vector3 to another Vector3 -

कोड की निम्न पंक्ति में, _pro एक और वर्ग का उदाहरण है जिसमें रूपांतरण होता है नामित लक्ष्य और posi एक vector3 भी है और एक मान्य मान है। _pro.Target.transform.position = नया वेक्टर 3 (posi.x, posi.y, posi.z); मैं posi को Target.transform.position के मान को असाइन करना चाहता हूं लेकिन यह एक NullReferenceException । प्रत्येक भाग का निरीक्षण करने के बाद, _pro है null । यहां मैंने कैसे _PRO को इन्स्तांत करने की कोशिश की: सार्वजनिक प्रक्षेपण _pro; GameObject go = GameObject.Find ("दुश्मन"); // जाना शून्य नहीं है _pro = go.GetComponent & lt; प्रक्षेप्य & gt; (); // _pro शून्य है "दुश्मन" खेल जिस ऑब्जेक्ट में मिली थी, उसमें कोई प्रोजेक्सेल घटक नहीं है, इसलिए यही कारण है कि go.GetComponent & lt; प्रोजेक्लेइल & gt; () आपको null । आपको अपने कोड में प्रक्षेप्य को कहीं ज़ूम करना चाहिए। आप ऐसा कुछ कर सकते हैं: go.AddComponent & lt; प्रक्षेप्य & gt; (); // जहां जाना है "दुश्मन" खेल ऑब्जेक्ट या य...

If PHP always copies objects by reference, what happens if an object created in a method is assigned to a member variable? -

I am confused about what will happen in this situation: public function foo () {$ Obj = new \ stdClass (); $ Obj- & gt; Bar = 'fubar'; $ This- & gt; Obj = $ obj; } If $ obj is copied from the reference, then when foo () returns, then $ Obj can be removed and thus $ this-> obj point to an object that no longer exists? In the method it looks like this: $ obj - --------. & Gt; - [object] $ this- & gt; Obj - ' When the method return $ obj variable is lost, and $ This-> Obj will still point to the object: $ this-> obj ------> [Object] [object] The price will only disappear (or the garbage can be collected), once all the references have been removed.

node.js - Difficulty using seperate template files in ember router with browserify -

I have my backend node. I have followed this tutorial to set up the JS server, but instead of using spine-meriant for foreground, I want to try Amber. Therefore, after successfully setting up the server, I am now using Amber I am going through this tutorial. The problem I am running includes external templates in my amber routes. The app works fine with this code and Todo template written in the browser. var Ember = require ('ember'); Window. Tados = amber application. Create (); Todos.Router.map (function () {this.resource ('todos', {path: '/'})}}; However, with template ./templates/application Written in .hbs and using the browser to try it, Todos.routor.map (function () {This.resource ('is required (' .templates / application .hbs'), {path: '/'})}}; I get the errors given below. Unkit type error: undefined There is no function myapp.js: 46841 Error: Prohibition failed: URL '/' error in error (original) on any o...

Is there a way to add flv video to video.js player in Wordpress? -

Video.js supports mp4, wemb and ogg formats but i think a move to add flv format Is: http: // jsfiddle.net/N8Zs5/18/ this link to compel Flash fallback An example of is the initial technique tried However, it is necessary that you can use "data option" on your computer. Just a FLV is not required for back play, unless you include the type attribute with source ( video / flv ), then Video.js will automatically Flash fallback should be used for that source. That being said, I would encourage you to try and use HTML5-friendly formats like H.264 or WebM. :)

database schema - cakePHP one app multiple needs -

I'm dealing with a conceptual problem. I am writing an app that collects data from different users profile. Each user profile requires a different set of tables. Profiles do not have common tables. In addition to collecting data from the end, I should do some analysis on correlating the data with different profiles. I plan to use a prefix on tables to separate a db, and profile. Since I have to support ~ 20 profiles, so I will end up with 100+ model / controlling classes. Can I somehow arrange them in a more manageable way? Ps: I am starting a cake :-) Usage Do, as well as see. You can apply that using a table in a relational db or you can use a key-value database. profile_id | Key | Value This simple table layout allows you to store several key-value pairs as a per profile. Which DB system you are using, you apply it in KPPHP.

spring - How to execute a single instace of my java destop application? -

I'm new to JavaFX, I made a client-server application. My main problem is that I have the same example by the machine I want to execute I'm using Spring Framework, maybe it could help me. Anyone can help me I did not understand at all, so I answer and hope to kill the point. If you want your client to come only on the application / machine: Tie a predefined port on the local host > To make a file (when this program is present, if the probe is present, when the probe is started on startup)> However, if you exactly 1 example / machine required The server-side will be implemented, something like this, although this is an example / machine (the program is inside VM C may be) may be only a "session with the server to make sure the IP does not ensure. Hope you find what you are looking for. This (references after the comments): Another option would be: User logs in (this connection allows 1 to call). The server can refuse more user login while...

knockout.js - Knockoutjs better list example sort not working with new items -

Here, in the example, when I add "trees" and "bees" sort, these original objects are two new Separate observable array from items. to replace this.sortItems = function, based on the answer to mckeejm, how do we fix it, or is it a known bug? () {This.allItems.sort (); }; With this.sortItems = function () {this.allItems.sort (this.sortFunction); }; See http://stackoverflow.com/questions/6965951/sorting-an-observablearray-for-one-of-the-templates // and http://jsfiddle.net/rniemeyer/93Z8N/ this.sortFunction = function (A, b) {return a.toLowerCase () & gt; B.toLowerCase ()? 1 1; }; This is not a bug, it's ASCII-based sorting. The upper case starts with a letter 65, and starts with lower case 97. Try "twenty" and "tree" and you will see the difference.

java - How do I get all nodes in a scene in JavaFX? -

In C #, I found a way that was pretty sweet, from which you control all the tribes and all their descendants. I am looking for a similar method for Java FX. I have seen that the parent class is the one with which I want to work because this is the category from which all the node classes that raise the children are taken. This is what I have done so far (and I actually did not find anything on Google with "JavaFX finding all the nodes from one view"): Public Fixed Arrestist & lt; Node & gt; GetAllNodes (Generate Route) {ArrayList & lt; Node & gt; Descendents = new ArrayList & lt; & Gt; (); Root.getChildrenUnmodifiable (). Stream (). For every (n -> (Descendents.contains (N)) Descendents.add (N); if (N.getClass () == Parent.class) Descendents.addAll (GetAllNodes (guardian))) ;}); } So how would I tell that N is a parent (or extended by parents)? Am I doing this right? It is not working ... This root (parent) is in grabbing all th...

angularjs - How to assign scope in a promise? -

I want to allocate one value in one of my scope (one in http.get) but my value is not assigned to my For the scope! I have tried many things (use my scope instead of this in controller) but it does not work: ( Here's my HTML search input: & lt; input class = "searchcontent" type = "text" placeholder = "Type here to search for content" ng-controller = "search as search" ng-keyp = "search. Here is my view for my search page: {/ search.scope.results} }} This is my JS code: (function () {var app; app = angular. Module ('Search Module', [] ); App.controller ('SearchCtrl', ['$ location', '$ http', function ($ location, $ http) {var is this = this; this.typingQuery = function () {var url = This.scope Url; if (url! = '' & Amp; url! = Undefined) {if (url == 'profile' || Url == 'Education' || Url == 'Skills' || Url == 'experience' || Url == 'Con...

commit - Accidentally used git reset -

मैं गलती से भाग गया git reset मेरे प्रोजेक्ट फ़ोल्डर में अब "जीआईटी ऐड" को चलाने का प्रयास करते समय। मैं इस मुद्दे को कम कैसे कर सकता हूं? # हटाई गई: bin / वर्गों / com / उदाहरण / androidChatter / FriendAdder $ 1.class # हटाई गई: bin / वर्गों / com / उदाहरण / androidChatter / FriendAdder $ 2.class # हटाई गई: bin / वर्गों / com / उदाहरण /androidChatter/FriendAdder$3.class # हटाई गई: bin / वर्गों / com / उदाहरण / androidChatter / FriendAdder.class # हटाई गई: bin / वर्गों / com / उदाहरण / androidChatter / ListOfFriends $ 1.class # हटाई गई: bin / वर्गों / com / उदाहरण / AndroidChatter / ListOfFriends $ FriendL istAdapter $ ViewHolder.class # deleted: bin / classes / com / उदाहरण / androidChatter / listOfFriends $ friendL istAdapter.class # हटाए गए: bin / classes / com / उदाहरण / androidChatter / listOfFriends $ संदेश Receiver.class # हटाए गए: बिन / कक्षाएं / कॉम / उदाहरण / एंड्रॉइड चैटर / लिस्टऑफ़फ्रीएड्स। वर्ग # हटाए गए: बिन / वर्ग / सी Om / example / androidCha...

php - Get an url with preg_match_all (simple) -

I do not know why I can not get some URL from some source code from a website with preg_match, maybe it I am doing it wrong, I tried to do it in many ways but I can not find it ... The problem is that I am just trying to get the URL from a source code That looks like this: & lt; H2 & gt; & Lt; A href = "http://www.website.com/index.php" h = "id = sERP, 5085.1" & gt; Website Name & lt; / A & gt; & Lt; / H2 & gt; So how do I want to go into a variable I was doing something like this: preg_match_all ('/ / Lt ; H2 & gt; & lt; a href = ". *" & Gt; / ', $ text, $ m); $ / Text> $ text source code, its actually a long website source code, so I just want to get href from the tag & lt; A> Those that are in the tag & lt; H2>. . I hope you guys can help me You have asked for a regular expression here, But this is not the right tool to parse HTML, use it for: $ html = & lt; ...

python - Calling Django server api from android phone -

I'm developing an Android app. I have created a new denggo server on my laptop for local testing. My problem is that I'm not able to call the app Demogen API from app code. For example, if I want to call a Django Server API from the desktop, then I type "Local Host: 8000 / Lok Sabha / Link / 2". Now how to change the "localhost part" of this URL by calling the same API from mobile. And my desktop is connected to the internet by the same mobile hotspot, then basically both desktops and phones are on the same network. My ifconfig command on the desktop show and my desktop is a pair of Mac and Mobile Samsung Core You can use your device's internal IP address for the development in the terminal: $ ifconfig | Grap cabinet You will get: Cabinet addr: 10.0.0.1 ...... Running server with Django that runs the server $ Dragon manage.py runserver 10.0.0.1: 8000 By using Android: "" String as your URL