Posts

Showing posts from January, 2013

mysql - PHP weight SQL results -

This may be a bit confusing, but bare here with me. I have a mysql table that I store a column ( ticket ), and the ticket can be in any number. What I would like to do is a mysql query that chooses all the rows from the column, sorting them in descending order, and then the result of the query uses PHP for "weight" so that the top ticket value. It seems very confusing. Essentially, in a high number of tickets , it is a high chance to be chosen. Is there any way to do this by using procedural mysqli to pick rows and pick the tickets for PHP? All inputs are accepted. The query is not what you want, which is essentially a weighted Random selection It looks like what you need to do is select all the rows and they are called numerically indexed array, where x numbers of rows are present which are placed in X-rays in different indices. You then choose that randomly select a number between 0 and [ARRAY_SIZE - 1] to set the row. The query may appear: SELEC...

http - URL with trailing slash from AngularJs/ui-router to nginx accesses incorrect resource -

मेरे पास AngularJs ऐप ( ui-router द्वारा रूटिंग के साथ) ) nginx द्वारा सेवा की जा रही है मुझे यकीन नहीं है कि कौन सा अपराधी है, लेकिन जब मैं अनुगामी स्लैश के साथ एक यूआरएल के साथ अपने ब्राउज़र को ताज़ा करें करता हूं, तो यह दिखता है जैसे यूआरएल के उत्तरार्द्ध को एक उपनिर्देशिका के रूप में माना जाता है, और स्थिर संसाधन ( img / css / js उदाहरण: रीसिंग www.site.com/login को logo.png की आवश्यकता होगी, जिसे www.site.com/images/ से अनुरोध किया जाएगा लोगो पुनर्संरिंग www.site.com/login / (अनुगामी स्लैश) की आवश्यकता होगी logo.png , जो www.site.com / लॉगिन / images / से अनुरोध किया जाएगा, मुझे किसी भी तरह से यह लॉगिन / को उप-डायरेक्टरी के रूप में माना जा रहा है। एनजीएन सी Onfig: चूंकि कोणीय अपने स्वयं का रूटिंग करता है, मेरे nginx config में मेरे पास एक एपीआई मार्ग REST एपीआई के लिए है, और सभी अन्य यूआरआई के लिए फ़ॉलबैक मार्ग , जो सभी अज्ञात संसाधनों के लिए index.html पर कार्य करता है मैंने यूआरआई से पीछे वाली स्लिप्स ...

chrome app angularjs+jquery console errors when processing remote html -

I have a Chrome app and loads a remote website (given by the URL user input), which By $ 100, it parses content through the angularJs and results with Jquery while it works, when I angular.element (data) .find ('. Someclass h2. Anotherclass a '). I get many errors appearing in the console: by loading the image Denied 'http://someurl.com/whatever_white.png' because it infringes the following Content Protection Policy Directorate: "IMG-SRC 'Self' Data: Chrome-Extension-Resource:". How to go around this? Close Chrome and - Disabled- Web-security logic Try to restart with it. This can help you as a solution for development. Read about it here

networking - What bandwidth is required for broadcasting a live video to say 50000 users -

I have been assigned the project to broadcast an event on the Internet in which there are 50,000 users, Users will watch the same live video. My query is that my bandwidth will be required, which will not be as per the number of users who see this stream. I'm a little confused; Due to why every user needs a different stream of bandwidth in the broadcast? If I install the server with the streaming capability of 50 Mbps bandwidth, then it is a broadcast. Do I have to be a Class C IP to run streaming server on the RTP protocol? If possible, how do services like Google Hangout Air work to get it through RTSP? Please suggest to me that you have such a practical experience in particular. Thank you in advance You need a bandwidth and a ton of resources. If you need more bandwidth, you have to know your average bitrate for the video. Suppose that the bitrate of your live video is 1 megabit (overhead, retention, sequence which requires more bandwidth, etc.) ...

Perl : Fetching the header row or row count from a file in FTP -

I have a Perl script and a special feature to get the column name and row number of the file present in the FTP location. the wanted . Attempted Net :: FTP module but it does not retrieve the row count or column header. Is there any way that I can attain those qualities and specify it in a variable?

javascript - Keep toogle value on page refresh -

I want to value toogle on page refresh. I try to do this with cookies but it does not work, I can not keep them right and can not figure out how. Javascript: $ ("div # unu"). Click (function () {$ ("div # autori") SlideToggle (); document.cookie = "autori";}); If (document.cookie == 'autori') {$ ('div # unu') Click (); } HTML & lt; Div id = "unu" & gt; Auto & lt; / Div & gt; & Lt; Div id = "autori" hidden & gt; & Lt; Ul & gt; & Lt; Li & gt; Mark Twain & lt; / Li & gt; & Lt; Li & gt; Mark Twain & lt; / Li & gt; & Lt; Li & gt; Mark Twain & lt; / Li & gt; & Lt; Li & gt; Mark Twain & lt; / Li & gt; & Lt; Li & gt; Mark Twain & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; You must add callback to the sloglag function and if there If this code is not using either set to set...

javascript - How do I remove a selected option dynamically -

I am trying to find out the junkie deletion of an option after selecting the user. & lt; Select ID = "Field 4" name = "ProductCancingAutomom" style = "width: 30%" & gt; & Lt; Option value = "" & gt; -Please select - & lt; / Options & gt; & Lt; Option value = "1" & gt; 1 & lt; / Options & gt; & Lt; Option value = "2" & gt; 2 & lt; / Options & gt; & Lt; Option value = "3" & gt; 3 & lt; / Options & gt; & Lt; Option value = "4" & gt; 4 & lt; / Options & gt; & Lt; Option value = "5" & gt; 5 & ​​lt; / Options & gt; & Lt; / Select & gt; & Lt; Select ID = "Field 5" name = "ProductCancingTworks" style = "width: 30%" & gt; & Lt; Option value = "" & gt; -Please select - & lt; / Options & gt; & Lt; Option value = "1...

javascript - Map using tuples or objects -

I am trying to use new (ES6) objects to represent a map between properties and value I am I have the same form of objects: {key1: value1_1, key2: value2_1}, ..... {key1: value1_N, key2: value2_N} I want to group them by both their key1 and key2 values. For example, I want to x and y lower than [{x: 3, y: 5, z: 3} The group may be able to group, {x: 3, y: 4, z: 4} {x: 3, y: 4, z: 7} {x: 3, y: 1, z: 1} {x : 3, Y: 5, Z: 4}] and get a map with: {x: 3, y: 5} = = & Gt; {X: 3, y: 5, z: 3}, {x: 3, y: 5, z: 4} {x: 3, y: 4} ==> {X: 3, y: 4, z: 4}, {x: 3, y: 4, z: 7} {x: 3, y: 1} == & gt; {X: 3, y: 1, z: 1} In Python, I use Tupale as a dictionary key. ES6 permits arbitrary objects in the form of map keys, but use the standard parallel algorithm ( === ), so the object is the equivalent of the context of only I can tell. How can I do this like the group using ES6 maps? Alternatively, using a simple JS objects is a solution if I have a great way to ignor...

postgresql - Jive 5.0 Current Profile Image -

I am currently trying to export profile images from live 5.0 databases. Pulls my PostgreSQL query that picture I but I'm having difficulty in determining whether the currently chosen went image of the profile SELECT * U jiveuser left waiting When jiveusercontainer include u.userid = c.userid left on c left are jivecontent ct.containerid = c.usercontainerid whistles joined jiveattachment ja on ja.objectid = ct. Content Where ct.contenttype = 501 and ja.objecttype = 501 and u.userid (4794) and filename = 'profile_image_500.png' ja.modificationdate desc order Anyone Know where is this information stored in the organism database? This will pull the current profile, which I believe he is the query image: select ja.attachmentid, c.displayname, ja.creationdate, ja.filename, (jivecontentprop select propvalue from jcpi where jcpi.contentid = ct.contentid and propname = 'index') U left the jiveuser Join jiveusercontainer c u.userid = c.userid where lEFT JOIN...

php - association linking models together HaBtM doent function -

यह मेरी त्रुटि है: त्रुटि: SQLSTATE [42S22]: कॉलम नहीं मिला: 1054 अज्ञात कॉलम 'users_groupnames.id' 'फील्ड सूची' में और SQL क्वेरी: का चयन करें 'समूहनाम' .``, `समूहनाम `.समूह नाम,` समूहनाम`। यूज़र_आईडी`, `उपयोगकर्ता समूह नाम```````````````````````````, 'यूजर_ ग्रुप'नाम`` यूज़र_आईडी`,` यूजर_ग्राऊंटनाम``` समूह -नाम_आईडी` केका-ब्लॉग `` समूहनाम` के रूप में `समूहनाम 'जॉइन' केक-ब्लॉग '।' यूजर समूह नाम 'के रूप में` उपयोगकर्ता समूह नाम'। यूज़र_आईडी` (1, 2, 4, 5, 6, 13, 14) और ` उपयोगकर्ता समूह नाम `। समूह_आईड` =` समूहनाम``````````) अब ये प्रश्न है: "क्या मेरी कोई गलती थी?" मॉडल समूहनाम। Php: $ $ सार्वजनिक $ हैऔरबेलॉन्गसमय = सरणी ('उपयोगकर्ता' = & gt; सरणी ('className' = & gt; 'उपयोगकर्ता', 'जुड़ने योग्य' = & gt; 'users_groupnames', 'foreignkey' = & gt; 'ग्रुप_आईडी', 'एसोसिएशनऑरगेनकी' = & gt; 'यूज़र आईडी' ) ...

c# - Reactive Extensions ControlScheduler -

Well, I'm using Reactive Extension Event Handler to handle my app events, I run the headlines on the Yuri thread. I also use ControlSubular for However, recently I am getting cross thread exception despite using control scheduler and I do not know what the problem is. Code: Observable.FromEventPattern & Lt; String & gt; (CC, "UiAlertMessage", New Control Session ()) Subscribe (_ = & gt; {Alert Control. (Show this language, title, _.EventArgs.UppercaseFirst ());}); The new control scheduler (this) is not to run the code on the UI control thread, so I do not get cross threading exceptions? you should do Observable.FromEventPattern & lt; String & gt; (CC, "UiAlertMessage"). AboveOption (this). Subscribe (_ = & gt; {Alert Control. (Show this language, Titles, _.EventArgs.UppercaseFirst ());}); This is the standard way of sending a scheduler related to specific controls. Passing control scheduler as you have got subsc...

php - Reading out value of specific key in array -

I have created a multi-dimensional array for an event calendar. Array ([0] => Array ([ID] => 11 [Title] => Evening 1 van 1 Dag [Started] => 2014-01-01) [1] = & gt; ; Array ([id] = & gt; 12 [title] = & gt; evening 2 van 1 week [start] => 2014-02-01)) Do I Can I load startdate in a variable? Yes, it is very easy: $ startdate = $ Array [0] ['startdate']; Where $ arrays is the name of your array. To select other starters, change the number in the first group of the square cell multidimensional array.

spock - How to call a method from another class in groovy? -

For example, I have a class like this: first class {.. DF A () {}} Class SecondOn {// I already have to call Method A from class and use one I also if I try to follow Java like call I still get error First one method = new first one (); // method.A ()} I have already tried but no way. Any suggestions or examples will be really helpful. I will not see any problem in: class first one {Def a () {println "a"}} Second one {DEF (B) (New First On). A () println "b"}} New First First () A () println ("") new seconds (). B () Output: aab

c# - Use of Dynamic Keyword in .Net 3.5 -

I used this code in Visual Studio 2013. Written using V4.5. The problem I have is that I am now declining in Net Work 3.5 and the dynamic keyword is throwing an error because an assembly reference is unavailable. Is there a similar type of 'dynamic' in pure v3.5 or is there a way to get the same result given below for me? I thought I got my answer, but Var is throwing errors I add. Features or Improve properties Private Zero CreateControl & lt; T & gt; (String objText, panel pnl, string HTMLTag = "& lt; td>", string applicant ID = "", EventHandler HNSL = null) {pnl.Controls.Add (New Literal Control (HTMLTag)); Dynamic obj = activator.CreateInstance (typeof (t)); Obj.Text = objtext; If (applicant! = String.opti) {obj.Attributes.Add ("ApplicantID", applicant ID); } If (hndl! = Null) {obj.Click + = new event handler (HDL); } Pnl.Controls.Add (obj); Pnl.Controls.Add (New Little Control (HTMLTag.Insert (1, "/");} ...

rspec's .should fails (outside describe/it block) in Ruby 2? -

In Ruby 2, with gem rspec 2.14.1 (the most recent of the Ubuntu), due to lack of installed rail, Why is it unsuccessful? 'rubygems' is required 'rspec' 3. Shouldnt == 3 NoMethodError: An uncertain method for 'should': Fixnum I have trusted And say this syntax is still the default Formally supported. The title "outside description / block" has been added with the title , because it seems to be the root cause. If you want to use it outside the description / it block, So it seems that you have to enable it first, though the documentation says that it is enabled by default. I suppose that enable by default means only a specific file is in [] for example: requires' rubygems' 'rspec 'RSpec.configure do | Config | Config.expect_with: rspec do | C | C.syntax =: end should end 3. Shield == 3 # true

javascript - need to pass a php array constructed from a txt file back to an ajax call -

I'm peating your head with it, now you're searching on tube and stackoverflow flow, similarly There is no issue with any luck to solve the situation, so I hope that if I ask directly then someone can help ... Now to explain my problem ... I have a php page that has a selected field like text field which is javascript and Must distinguish between themselves through a combination of PHP. Now the selection field has a list of countries from which I get the value from this code: var select = $ ("select [name = 'from_country'] option: selected") . Text (); Where from_country is the name of the field selection. Text field on the other hand is uncontrolled Jquery function with a keyboard, which is then considered to use the "select" variable value, which is considered to pass on the PHP function through an AJAX call , Which at the end will find a txt file with the appropriate name of the country from the value of the selected country and put...

How can I add additional columns to the Rally.ui.tree.PortfolioTree -

I am trying to modify the standard portfolio hierarchy report to include additional columns. But I can not see a way to read this portfolio docs. Is this possible? Unfortunately, adding additional columns is not yet supported. Unfortunately, adding additional columns is not yet supported. You can override the Trinity Template to add additional fields that appear (as shown in customizing the UI section). It can not be enough for you to do it, but you can let it go. The next SDK release will come with the hierarchical tree grid, which will be a more polished version of the rally. Ui.tree should be configurable and just as a regular grid. Until then, I hope it helps!

android - SQL query next lowest value -

मेरे पास निम्न तालिका है: _id मूल्य गैलन ओडोमीटर 1 3.1 9 15 10000 2 3.25 13.2 10200 3 3.24 14.8 10400 4 3.31 15.3 10600 5 3.31 12.8 11000 6 3.2 9 12.9 10800 7 3.32 14.3 10900 8 3.28 15.1 11200 9 3.27 11.7 11400 10 3.21 14.7 11600 मुझे ईंधन की गणना करने की आवश्यकता है मौजूदा ओडोमीटर रीडिंग का उपयोग करके पिछला, और गैलन की मात्रा का उपयोग करके लाभ। मेरी समस्या यह है, यदि ओडोमीटर रीडिंग क्रम में दर्ज नहीं किए गए हैं (या यदि उपयोगकर्ता एक के मान को बदलने के लिए वापस जाता है, तो मैं नए एमपीजी की गणना कैसे करूं?) उदाहरण: _id मूल्य गैलन ओडोमीटर 1 3.1 9 10 10000 & lt; - पहले प्रविष्टि में कोई एमपीजी रेटिंग नहीं है क्योंकि पिछला डेटा नहीं है 2 3.25 10 10200 & lt; - 20 एमपीजी, पंक्ति 2 & amp; 1 और 10 गैलन 3 3.24 10 10400 & lt; - 20 एमपीजी पंक्ति 3 और amp के अंतर पर आधारित; 2 और 10 गैलन 4 3.31 10 10600 & lt; - 20 एमपीजी, जो पंक्ति 4 & amp; 3 और 10 गैलन 5 3.31 10 11000 & lt; - यह पंक्ति शुरू में पंक्ति 5 एमएपीजी अंतर 5 & amp; 4 (अभी तक पंक्ति 6 ​​अभी तक न...

html5 - play/pause button in javascript, when audio is defined in javascript -

How to create a play / pause button in the following javascript and html. javascript: var audio = new audio (); Audio src = 'track.mp3'; Audio.controls = True; Audio.loop = True; Audio.autoplay = true; Function aud_play_pause () {var audio = document.getElementById ("audio"); If (audio paused) {audio.play (); } Else {audio.pause (); }} html: & lt; Button type = "button" onclick = "aud_play_pause ()" & gt; Play / pause & lt; / Button & gt;

sql - How to refine last but one? -

I have the following table I need to get the last but one event associate for every event event_id event_date event_associate 1 2/14/2014 bin 1 2/15/2014 Ben 1 2/16/2014 Steve 1 2 / 17/2014 Steve // ​​This is the last one, but for the event a 1 1 2 / 18/2014 Paul 2 2/19/2014 Paul 2 2/20/2014 paul // This colleague is the last but for the event 2 2 2/21/2014 Bin 3 2/22/2014 Paul 3 2/23/2014 Paul 3 2/24/2014 Bin 3 2/25/2014 Steve // ​​This is the last but the event is one for 3 3/2/26/2014 Ben I have to find out who was the last who had a event_associate for each event event_id event_associate 1 steve 2 paul 3 steve I know that to do this, I want to do the maximum Event_date and event_associate I tried to exclude select event_id, where event_associate is not present (select * from mytable WHERE Event_date = MAX (event_date)) Qualification at row_NUMBER () (order event_date according to Event_id DESC By) = 1 But I do not know how to EXISTS in this case. ...

web services - Intercepting specific messages between applications in Android (similar to snapchat) -

I am implementing an application, with the same functionality of Snapchat, and I was wondering if I had an SMS I can send audio from one device to another, with video / audio / picture / text in Android. I want the message content to be intercepted and stored inside to look inside the design, not on the device in the normal messaging folder. . What would be the plan to do my best attack to do this? I want to inform the user when a new message appears. Should I apply a push / bridge structure? I have access to a server, can I store the content and then do other device surveys in the database? If possible, I can send and store more SMS. What is my best plan to do this? Don 't worry, because it will not work on Android 4.4+ All SMS / MMS messages will be delivered to the user's default SMS / MMS client, and you have no means to stop it. is not.

java - How to use modeshape for many users -

Currently I'm thinking how many users in Medatep do I manage my own data? ). An example of the problem that I am currently thinking is Dropbox Model: Everyone has their own Dropbox with private files, not necessarily shared with anyone else. Will I create a new workspace for every user, or would it be better for a large tree, where there are nodes for all users under the root node? Is the number of Medeppet Workspaces limited? Thanks for any indication. Modeshap has a practical limit for the number of workspaces, because they need to be managed and this Management was not designed to support unlimited number of workplaces Generally, some specific behaviors exist between workstations in JCR, and workspaces were never used by JCR people. I would recommend to use a single repository and workspace to store all the contents for all users, where the hierarchy of the workspace nodes is used to separate and associate content with particular users is. Just be aware that JCR...

How do I get a Coinbase current user's info via API calls using OAuth2 and PHP? -

I have established a site that can successfully access the token and hold account balancing, for example, PHP library Now I'm a little stuck; It is not clear to me how to run different API calls available for Symbasebase, I am sure I can understand it at the end, but I want to make sure that I am not ignoring some functionality which is already coinbase PHP is built in library My impression is that I need PHP to authenticate JSON request for CNbbase Need to eat, or am I missing an example in the PHP library? For example, after authorizing the app, I want to display the authenticated user's name on my site. I do not see an underlying function for this in PHP Library, so I think I need to use the call. Does anyone give me an example of how this is actually done? Thanks to Robin on Coinbase support, I got an answer. Here's an example of how to get some user details in PHP via the Coinbase OAUTH2 API. In this example, these functions are added to Coinsbase-PH...

ios - iOS7 - Map view pin do not appear until screen is touched -

In my app, I download a set of points from the web service using json. To make the app real in iOS 7, I am using this problem: Places are downloaded, but pins are not portrayed on the map unless the user touches and "tricks" the map. Then they appear and work in all iOS6. How can I correct that behavior? EDIT: AddNnotation is called at the end of the method to receive the data, pass them to the mylocaction object: - (zero) plotBarPosition: (NSString *) Parsing data_string {// string in JSON NSDictionary * json = [[NSDictionary *] [datos_string1 JSONValue] objectForKey: @ "attributes"]; For (int i = 0; i & lt; [jsn count]; i ++) {/ * crushing every point * / milecation * location = [[mileo ocation elock] Init White Name: Name Lock Coordinates: Coordination Estado: Status Antenna id: antenaid]; [_mapView AddNotation: Location]; }} I also tried: [_ mapView display selector PermiteTrade: @Selector (with annexation :)with object: location waitingUnit...

Android Youtube API INTERNAL_ERROR -

My app is trying to play YouTube video via the YouTube Android API: intended intent = YouTubeStandalonePlayer.createVideoIntent (this, GetString (R.string.youtube_api_key), "cdgQpa1pUUE"); StartActivityForResult (intent, 1); But I get INTERNAL_ERROR in onActivityResult.

ms word - Which are the best Java API for convert docx to pdf -

I need API Java to convert a DOCX to PDF, I have tested with the ExDock report but my Believe it does not change the image of the head of the document. I need to change tables, images and limits in PDF, APIs can be paid or free for free. thank you in advanced. A few years ago I successfully used the Zedon Konter to run in the headless mode with open office. Change all types of files honestly I can not recall the exact limitations of the software, but here is a version that I just ran here as a webservice: and here. What is the current version of the converter, is not using it and it is possible that it is a bit old and at the moment it works very well, but you can try to change your files and see that before How well they come you go heading first in coding. I also found this article and it looks like this may prove useful to you, take a look at this:. Oh and by the way, it's the website that opensource:, so you can take a look at how it can be implemented;)

How to split two columns in a table in python -

is the data table 1 2 3 3 33 34 10 22 11 23 25 26 27 28 ..... Now I should split the data into two columns and merge them into a list. The codes written below do not have single digit numbers but two or three digit numbers. Myfile = open ("karate.txt", "r") # in the file and myfile.read () in a file for the row: # Read data in the file field = '' Kjoind (line. split ()) # print space field lines = map (brick field) to change the tuple to # partition column # integer data based on the table. Extension (rows) The output of this code for the above data 1 2 3 3 3 3 4 1 I 1 2 3 3 33 34 11 23 25 26 27 28 as a required output the problem can be essentially divided into two phases: the re-listing ads in numbers as the list again. Field = [] with open ("text.txt") f: fields = [line.split ('') for line f] print field # [(1, 2) (1, 3), (33, 34), (10, 22) ... etc ... flattened = [i Tap] Print flattened # [1, 2, 1, 3, 33, 34, ...

rest - Authentication on RESTful API on GET requests -

तो बाकी आर्किटेक्चर लागू करता है GET , POST , PUT और अनुरोध हटाएं मैं GET अनुरोधों के बारे में बात करना चाहूंगा http://example.com/api/students यह REST आर्किटेक्चर के तहत एक GET अनुरोध है जो मुझे डेटाबेस में छात्रों की सूची देगा। मेरा प्रश्न प्रमाणीकरण के बारे में है ऐसा लगता है कि GET अनुरोध पर प्रमाणित करने का सबसे अच्छा तरीका एक एक्सेस टोकन का उपयोग करके होगा, जैसे http://example.com/api/students?token=randomstring यह कैसे सर्वरएड को नियंत्रित करता है, इसका मतलब है कि किसी सेक्युलेंसियल प्रक्रिया को किसी दूसरे उपयोगकर्ता के टोकन को चोरी करने और उसे इस्तेमाल करने से रोकने के लिए। क्या हर अनुरोध पर टोकन ताज़ा होता है और परिणाम या उस तरह से कुछ वापस आती है? सबसे पहले - आपको यूआरएल में क्रेडेंशियल्स (एक्सेस टोकन) कभी नहीं लगाए जाएंगे। यह बिल्कुल गलत नहीं है या प्रति प्रतिबंधित है - इसका बुरा व्यवहार इसलिए है क्योंकि यह यूआरएल को गोपनीय क्रेडेंशियल्स को उजागर किए बिना साझा करना असंभव बनाता है (सोचें कि क्या होगा यदि आप यूआरएल को ई-मेल में कॉपी करते हैं और इसे...

mysql - retrieve row result using prepare statement in mysqli -

$ stmt = $ db- & gt; तैयार ("चुनें * उपयोगकर्ता से कहां नाम =?"); $ Stmt-> gt; bind_param ('s', $ username); $ Stmt- & gt; निष्पादित (); $ Stmt- & gt; store_result (); अगर ($ stmt- & gt; num_rows & gt; 0) {// उपयोगकर्ता का आईडी पुनर्प्राप्त करें} मैं यह जानना चाहता हूं कि उपयोगकर्ता मौजूद है या नहीं और उसका आईडी चुनें। मैंने पहली बार किया, कैसे अपनी पहचान प्राप्त कर सकते हैं? पंक्ति परिणाम के माध्यम से पाश? या मुझे एक और एसक्यूएल लिखना है? मुझे store_result () और get_result () के साथ भी भ्रमित हूं। मुझे लगता है कि आपको अपना परिणाम प्राप्त करना चाहिए $ stmt = $ db- & gt; तैयार करें ("चयन करें * उपयोगकर्ता से कहां नाम =?") का पालन करने के लिए क्वेरी को क्रियान्वित करने के बाद; $ Stmt-> gt; bind_param ('s', $ username); $ Stmt- & gt; निष्पादित (); अगर ($ stmt- & gt; num_rows & gt; 0) {$ row = $ stmt- & gt; फ़ेच_अरे () print_r ($ पंक्ति); }

c++ - Why does Visual Studio Release build break on non-executing code line -

When I created my C ++ program with the default release configuration in Visual Studio 10, I put a breakpoint on one line Who should never be reached. What confunded me was that when the program is running then it stopped at the breaking point. Adding a volatile statement and transferring this line to the break point does not break the execution of the code where the brake appears (though does not produce the same behavior as creating a minimum project with this function). Why is the "Release Debugger" (?) Step on this line and when executing breakpoints are executed? If I keep going after the break then false statement continues to return code execution. bool bounding box :: Cutting (int32_t xpos, int32_t ypos, int32_t dx, int32_t dy) const {int32_t intersectionX; Int32_t intersections; If ((dx> 0 & amp; amp; and & amp; xpos> rights) || (dx gt; Top) || (D & LT; 0 & amp; AOPO & Lt; BOT)) Return; If (DX! = 0) {intersection Y = ypos + (left...

c++ - String not being printed/initialized properly -

Image
I have been working on a hangman game in CPP ... then I created a variable called which initially stores the dash, but is slowly open. i ; Therefore, I try to initialize SoFar to include the dash, and TheWord Later, when I print sofar, it is just empty of the court Any and all advice Is appreciated. Here's my full program for reference: #include you defined SoFar Like: wire SoFar; ... then you try to write it: (i = 0; i & lt; = TheWord.length (); i ++) SoFar [i] = '-'; when If you write it, then Suffer still has a length of 0, so every time you execute SoFar [i] = '-'; , you are undefined Try it. Try: std :: string SoFar (TheWord.length (), '-'); It defines SoFar already has the correct number of dashes. Here's a quick demo: #include & lt; String & gt; # Include & lt; Iostream & gt; Int main () {std :: string TheWord {"trolled"}; Std :: string SoFar (TheWord.le...

ios - UITableView setter method functions not being called -

इस तरह कार्य करता है: - (NSInteger) numberOfSectionsInTableView: (UITableView *) tableView {एनएसएलॉग (@ "बुलाया") रिटर्न 1; } कॉल नहीं किया जा रहा है, क्योंकि कंसोल में लॉग दिखाई नहीं देता है मैंने [table realoadData] का उपयोग करने की कोशिश की लेकिन यह अभी भी काम नहीं करता सुनिश्चित करें कि आपके पास दोनों यूआईटीबल वीटाडेटास और UITableViewDelegate को वर्ग में सेट किया गया है जो इस विधि में स्थित है .h @interface class_name: UIViewController & lt; UITableViewDelegate, UITableViewDataSource & gt; {UITableView * tableView; } .डिमोड में (या कोई अन्य लोडिंग विधि) tableView.delegate = self; TableView.dataSource = self; यदि आप UITableViewController subclassing हैं, तो यह पहले से ही काम कर रहा होना चाहिए आशा है कि मदद करता है!

PHP email form not posting name or phone number -

I can not know why my php name and phone number is not sending over email to email and message working properly Are there. Here's my HTML: & lt; Form method = "POST" name = "contact_form" action = "php.php" & gt; & Lt; Label = 'fname' for & gt; Name: & lt; / Label & gt; & Lt; Input type = "text" name = "fname" & gt; & Lt; Label = 'email' for & gt; Email: & lt; / Label & gt; & Lt; Input type = "text" name = "email" & gt; & Lt; Label = 'phone' for & gt; Phone: & lt; / Label & gt; & Lt; Input type = "text" name = "phone" & gt; & Lt; Label = 'message' & gt; Message: & lt; / Label & gt; & Lt; Textarea name = "message" rows = 8 cols = 30> gt; & Lt ;? Php echo htmlentities ($ user_message)? & Gt; & Lt; / Textarea & gt; & Lt; Labe...

Is there a common repository or persistence pattern interface in .NET? -

After text Net exposes the data as a universal pattern for querying data from various data sources, including data treasure, and Very powerful. The ASP.NET Web API instantly exposes IITAP resources as the GET methods in the form of the OADATA interface. However, I think that every data is access layer layer solution, which includes the entity framework, and displays its own proprietary interface to insert, update and delete data associated with a repository or data source. Therefore when the IQueryable selection / data is analogous to query, IQueryable, create dynamic, or delete the data, when the query is not applicable for the data except as changing the data asked. DAL out for its own purposes, including the ability to swap, I'm probably going to be a small cover interface library that strengthens CRUD interface of any type. This probably looks like HTTP action action semantics and enjoys IQueryable as the basis of GAT / Read. But before I select this I do not have anythi...

Calling a C# .Net method that has ref String arguments from Delphi 7 -

Modified question: We use the D7 to call the C # method in the COM object are doing. The C # method gives a widestring. Is there any risk that .NET will collect widerstream returning from our feet while using it in our Pascal Code? If so, what are the options that we have to return a string safely to the C # com object? In addition, is our last Delphi line submanine: = The proper way to release the COM object? C # code [DispId (5)] Bull test (int verve 1, ref'in var2, ref string var3); Public Bull Test (Int. Verse 1, ref'in var2, riff string var3) {Bull results; If (var1 == 0) {var2 = 0; Var3 = "zero"; Result = true; } And {var2 = -1; Var3 = "one loan"; Result = false; } Return results; } Test code (var1: integer; var var2: integer; var var3); : Widestring): wordball; Devide 5; Is there a risk to the Pascal code calling the COM object 3GC-ED? Process TForm1.Button1Click (Sender: Tubbed); Var Subman: Tsoubman; Var1: integer; Var2: i...

Will rendering images outside an HTML5 canvas hurt performance? -

I am creating a 2D platformer game and I have a bunch of screen levels to show them Will damage the display, or should I develop any type of prevention of 2D to avoid changing it? Besides, how much would it be to hit performance? Rendering engine should call again the areas outside the canvas, but I still have those areas I do not want to try to attract, so that the overall overhead of executing unnecessary logic can be reduced, he said, if a large amount of repairs commences, then in this case it probably will not be so. Here is a webkit bug report (diagnostics) from 2010, which addresses the issue where the browser was accidentally pulling things out of the canvas: HTML

performance - fast binary digit counter 64bits numbers c# -

I try to find out its solution everywhere For example: 127 = 7 binary digits 153 = 8 binary numbers I got it in two ways to get it. By triming binary representation in a string, and using the "lamps" property. By obtaining the greatest power of 2, which does not pass the number, the result is that binary is the last place of representation, and if you add 1, then points to the number of points (which is 2 ^ 0) Both ways are good, but it takes too much time to calculate when the numbers are larger than 10.000.000.000 (10 billion) after you spent in seconds Calculate the time, which is the milliseconds Instead of Kands, and so bad for the performance of the rest of the code. Thank you very much and sorry Presentation, it has been written with a phone and I do not have all the tools to keep this fanatic and correct. Edit 1 Consider deeply the website of Bithax and see the speed as the first priority. I think I am going to use the method with implement...

twitter bootstrap - how can i remove the angle's box of dropdown? -

Image
इस कोण को कैसे अक्षम करें? मैं बूस्टर का उपयोग कर रहा हूं जहां से मुझे मिलता है यह मेरा कोड है .. & lt; div class = "navbar" & gt; & Lt; div class = "navbar-inner" & gt; & Lt; div वर्ग = "कंटेनर" & gt; & Lt; ul class = "nav" & gt; & Lt; li वर्ग = "ड्रॉपडाउन" & gt; & Lt; एक वर्ग = "ड्रॉपडाउन-टॉगल" डेटा-टॉगल = "ड्रॉपडाउन" & gt; मेनू & lt; b वर्ग = "कैरेट" & gt; & lt; / b & gt; & lt; / a & gt; & Lt; ul class = "ड्रॉपडाउन-मेन्यू" & gt; & Lt; li वर्ग = "ड्रॉपडाउन-सबमेनू" & gt; & Lt; एक वर्ग = "ड्रॉपडाउन-टंगलग" डेटा-टॉगल = "ड्रॉपडाउन" & gt; सबमेनू & lt; / a & gt; & Lt; ul class = "ड्रॉपडाउन-मेन्यू" & gt; & Lt; li & gt; & lt; a & gt; sub_1 & lt; / a & gt; & lt; / li & gt; & Lt; / ul & gt; & Lt; / l...

Track google calendar subscriptions -

Actively tell which email addresses or google / iCal accounts are included / subscribed to Google Calendar? I want to keep an eye on how many more email addresses use it or if they are unsubscribed, at present, the user can add the calendar to their Google Calendar or their iCal. I am the owner of this calendar and Its features should be fully utilized.

amazon ec2 - What are the possible capabilities of IAM in AWS? -

One of my clients wants to understand the IAM facility before migrating Microsoft Apps to Amazon Cloud. I have detected two experiments that we can recommend to our customer, these are: Resource-level permissions for EC2 • Allow users to work on a limited set of resources within a large, multi-user EC2 environment. • Users who control the user can control • Restrict user IAM roles for Amazon EC2 resources Use of command line • Use the Unix / Linux / Windows-AWS command line interface, which is an integrated tool for managing AWS services. We can explicitly access the command line interface using an EC2 example introduced with IAM role support without specifying credentials. Programmatic Use • Configure it with appropriate AWS language without specifying SDK credentials for the language of your choice. I would like to know the other abilities of IAM which we can recommend for our clients and other use cases which you can recommend to us, please tell us ...

javascript - Add additional scale parallel to x-axis -

Image
(Not sure that the scale is the correct word here.) I want to add an additional scale (AP1CLL, AP2WHO, ..) as a snapshot below the parallel X-axis: How do I get it? A column named "post-text" itemprop = " label has been added and the axis parallel axis has been added. has been created. Step 1 : Define d3.scale.ordinal () and d3.map Get a unique value using () . var x2 = d3.scale.ordinal () .domain (data.map (function (d) {return d.lL;}) ). Color ring band ([0, width], 0.05); step 2 : d3.svg.axis () . Pass the scale created on var xAxis2 = d3.svg .xis () .scale (X2) .orient ("bottom") step 3 : Add a g for the new axis and call axis was created. svg.append ("g") .attr ("class", "x axis") //.attr("transform "," translation (0, "+ height +") "). Call (xAxis2) Hope this helps :)

ExtJs Model Proxy vs. Store Proxy -

OK, I'm stuck on what should be a basic task in ExtJs. I'm writing a simple login script which Undoubtedly sends a username and password combination for the web service and receives a GUID if the credentials are correct. My question is, am I a model proxy or store proxy? In my understanding, models represent a record, whereas the store is to deal with the data set with more than one record. If it is correct, then it seems that the model is a proxy way. After the documentation of Senca on the code, something like this will appear: Ext.define ('AuthenticationModel', {extension: 'Ext.data.Model', field: ['Username', 'password'], proxy: {type: 'comfort', url: '/ authentication'}}); // Get a reference for the Certification Model class var validation model = Ext.ModelManager.getModel ('AuthenticationModel'); So far everything is fine, to the next step: // Modify a GET request authentication to use the RestProx...

javascript - HTML entity to input value? -

I am trying to use some organizations for my e-learning project. I wanted to change the input field dynamically from an array var equation value = new array ("", '& # 8722;' + 1,02,3); And here's my code But the input value does not support HTML entities. How to use the HTML unit in input value here What do you need to do to paste directly into the unit, use a function to convert it into text in the form of text or from the value of the unit. var equation value = new array ("", '-' + 1,02,3); Then ... something like this will appear & lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" & gt; Var equation = value = ["", '& amp; # 8722; ' + 1,02,3] ;; Function Funk () {var mdiv = document.createElement ("div"); Mdiv.innerHTML = Equation Value [1]; Document.getElementById ('t_1_1'). Value = (mdiv.textContent || mdiv.inn...

Python Fundamental Issue Seen When Creating List of Objects That Hold Other Objects -

I have a class is basically a container which contains a list of members in the container that holds the object. Each of these items has a list of sub-commodities and these objects are in turn replaced by other sub-objects. I want to use lists because the order of application in hand is to be ordered. Problem: I see that the list of objects in subclasses does not include the exact set of objects and the length of the lists I do not expect. Here is some example code (code can be copied and executed) and it is quite straight forward. I use Python 2.6.2. class mycls2: olist = [] class mycls1: olist = [] class mycl: olist = [] class myc: x = 0 def __init __ (auto, i): range (0, 2) in: self.x = i def test_obj1 (): kctr = 0 mylist = mycl (): s1 = mycls1 () print for "i = 1" s1: ", s1 for category (0, 2) : S2 = mycls2 () print "s2:", for category (2, 2) s2: c = myc (kctr) kctr + = 1 print "c:", c s2.olist.append (c) print " Adding C "C,...

Remain the previous userform open after unload me using excel vba -

I try to use the unload.me function to turn off userform Now I have 2 users, when the user's form On closing, the user will automatically switch off twice. I want to try to open the previous user. Please help and thank you Unload. May Regards, YY A quick solution, you Try specifying the exact form that should be taken. Use i.e. Load User Form 2 , if it does not help, check whether the form is a modal form or not. If not, then set them in modal.

eclipse - How to get deleted file from SVN Repository -

I deleted a file from my Eclipse work space but the file is in the SVN repository . Can someone help me get the deleted file from SVN without using the command line? There is only one way to recover files with Eclipse + SVN Go to the SVN Repositories View, find the folder located in your file, right click and select Show history. You will see a list of in this folder commute in the history view, please make sure it is switched to the remote rewines. A commitment from the list of Commits gets deleted which removed the file. The panel below has a list of files related to this commitment - you can find deleted files with a zero mark, double click to open this file in the editor ...

c# - MS SQL Server Compact Edition Multiple User -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब मैं विनफ़ॉर्म अनुप्रयोग का विकास कर रहा हूँ डेटाबेस के रूप में एमएस Sqlserver कॉम्पैक्ट संस्करण के साथ सी # में इस एप्लिकेशन में एकाधिक उपयोगकर्ता पहुंच में परेशानी है पहले से ही मैं अपने आवेदन में साझा संकल्पना की कोशिश की, लेकिन त्रुटि हो रही है। निम्नलिखित त्रुटि उत्पन्न हुई: एक फ़ाइल साझा उल्लंघन है एक अलग प्रक्रिया फ़ाइल का उपयोग हो सकती है। [\ JAN-941C126E \ Testing_GSm \ Debug \ New \ GSM.sdf] कोई अन्य समाधान? brinda, कृपया सुनिश्चित करें कि डेटाबेस से पहला कनेक्शन एक अनन्य मोड में नहीं खोला गया है। मोड सेट करने के तरीके पर नीचे दिए गए लिंक देखें:, आशा है कि यह मददगार होगा।

sql - How to Delete the Existing data based on Where clause condition using Merge -

I have written a merge statement, where I am facing difficulty in removing the basis of data on the clause condition. Let me explain your scenario clearly For example, I have entered the date from source to target based on key condition. For example, enter a 10 digit. For example some changes are recorded and it has been updated through the merge statement. Based on the conditions, three records have now come for the same date key and need to be inserted and the rest should be removed for that date key. My example code: Delete Table1 with # Table1 # Table1 in CREATE TABLE # Table1 (ID INT, name VARCHAR (30), DateKey INT) Enter the value (ID, Name, DateKey) (1, 'Mohan', 20,131,231) # Table1 (Enter in ID, Name, DateKey) Value (2, 'Raj', 20,131,231) # Table1 (ID, Name, DateKey) ) Make Table1 (ID, Name, DateKey) value (4, 'Majza', 20131231) in Value (3, 'Majjaa', 20,131,231) # Table 2 (ID INT, name VARCHAR (30), DATEKEY INT) DE CLARE @i_Date...

c - Set wireless channel using netlink API -

I am developing a WiFi device in Ubuntu Linux 12.04 environment and let me switch the WiFi interface between different channels. the wanted. Currently I found the solution in Warshark source code ws80211_utils.c function ws80211_set_freq but I do not know what it is to implement how my source code and include what libc and how to compile So that I can test it. The problem is that you have a lot of logic and flags to use. Also, this is the first time I develop a netlink wifi device. If there is a good manual available, where to start for WiFi and how to use it, provide me a link. Thank you very much! In the current Linux versions, "The right way to talk" is to keep in mind that for the wireless subsystem, Can not set arbitrarily a channel with each driver and every operating mode (master, client, monitor etc). Some drivers can change the channel only if the related interface is "down". In a mode such as a client ("managed"), the channel can...

java - Moving particular row from one table to another in mysql -

I am developing a web application ... which will be the list of users requesting registration ... We accept that all the details should be taken from the register table to enter the table ... created space ps = conn.prepareStatement ("Login (id, first Name, last name, gender, category, date of birth, age, address, country, state, city, postcode, email id, contact No, mobile number) * Select * from the register; I have to insert all the data from the register table, when I accept it. But when I copy the entire table from the register to the log in table to run it. When I click, only details of that particular user should be taken .... ID should be obtained from that particular user ... How to do this Please help me please ... This advance You must add a WHERE clause to the SQL statement: log in login (id, first name, last name, gender, ...) SELECT * registers where id =? Then bind the ID parameter to the created location : created locations Ps = Conn.prepareStat...

php - foreach() return a null value -

I now have another error, when I try to display a result in my view, the result is null and I can not do at the controller (home.php): $ data [ 'Hasil5'] = $ this- & gt; Home_model-> Popular_list (); Model (home_model.php) function popular_list (): function popular_list ($ limit = 2) {$ this- & gt; Db- & gt; Selection ('news *.'); $ This- & gt; Db- & gt; Where ('id', $ this-> uri-> section (3)); $ This- & gt; Db- & gt; Where ('Publish', 1); $ This- & gt; Db- & gt; Where ('see' = ', 5); $ This- & gt; Db- & gt; Order_by ('id', 'desc'); $ This- & gt; Db- & gt; Boundary ($ border); $ Query = $ this- & gt; Db- & gt; Receive ('news'); Return $ query- & gt; result (); } // Thanks to "Communications_V" and on my idea (home.php) as a part of "popular news": & Lt; H2 & gt; Most popular news: & lt; / H2 ...

doctrine2 - Flow3 - How to create a simple-to-use many-to-many relation? -

I am currently present between "project" and "person" in my first several-to-many relations in flow 3 I am working on and want to add, receive and remove elements of both controllers. Project Announcement: Class Project {// ... / ** * @ War Principles of Common Collections & lt; /*...*/ \ person & gt; * @ORM \ ManyToMany (targetEntity = "/*...*/" person ", mapped =" projects ") * $ / protected person; // ...} person declaration: class person {// ... / ** * @ wind / theory / common / collection \ Collection \ & lt; /*...*/ \ Project & gt; * @ORM \ ManyToMany (targetEntity = "/*...*/ \ project", invoked by = "person") * $ / protected projects; // ...} But I can only add / remove objects on the "person" (inverse) side. At least I can get the object from both sides. Do I really need to make a workaround with a "person" object on the "project" side or do I have a ...

insert - Inserting last record fields in the next record in mysql -

I have a table in mysql before it has some records, its fields have A, B and C. Sometimes I enter a record in this table, like with different values: $ query = "table (A, B, C) values ​​(INSERT '1', '0' '2') "; The values ​​are characters. The last record in the table is 5, 6, 4. I mean one = 5, B = 6 and C = 4 and I want to insert a new record. My values ​​are 1 and 0 and 2 but I want you to help me for this method: When B == 0, I do not want to save it and instead, I want to save the last field in the table. For example I am inserting 1, 0, 2 and it just inserts a = 1 and c = 2, but it inserts the last field from 0 instead of this table, which is 6. Something like this: Insert ($ 1) in the table (A, B, C) values ​​(false) {$ query}, the last value in the table , '2')"; } I do not read the last record of the table and do not use its value because it can reduce the speed for me and the speed is very important. It is bette...