Posts

Showing posts from May, 2012

why can't i change this div's innetHTML with ajax? -

Just started learning AJAX today and fell on the first stage, the worst part is, what I really can not find With the code, can you see it? The internal HTML of the device should be converted into a response. Text within the data.txt. The text inside of this file is "Hey man" (cuz no hello world does not like) & Lt; / Head & gt; & Lt; Body & gt; & Lt; div id = "hehe" & gt; Ha ... We are here, this will be an Ajax performance! & Lt; / Div & gt; & Lt; / Body & gt; & Lt; script src = "script.js" & gt; & Lt; / Script & gt; & Lt; / Html & gt; javascript var request = new XMLHttpRequest (); Request.open ('receive', 'data.txt'); Document.onreadystatechange = function () {if ((this.readyState === 4) & amp; (this.status === 200)) {document.getElementById ('hehe'). InnerHTML = request.responseText; }}; Sent request (); Thanks in advance! use the request...

digraphs - Graphviz Dot placing node inside subgraph even though it was defined elsewhere -

Image
I am trying to create a dot script generator for the problem of homework, except that it is running well, except I have this issue where some nodes are not being defined in the subgraph, being placed in them for example, the following dot script: digraph DG {compound = true; Labelloc = "t"; Label = "test.cpp"; Vehicle; Make; Subgraph Clusterford {label = "Ford" Ford [Size = "None"] [style = "invis"] [label = ""]; Horse - & gt; Vehicles [label = "personal"]; Thunderbird - & gt; Vehicles [label = "personal"]; } Ford - & gt; [Label = "public"] [ltail = "clusterford"]; Subgraph Cluster Chevrolet {label = "Chevrolet" Chevrolet [Size = "None"] [style = "invis"] [label = ""]; Camaro - & gt; Vehicles [label = "personal"]; } Chevrolet - & gt; [Label = "public"] [ltail = "cluster chevrolet"]; } It g...

powershell - WebAdministration module not found -

I have installed a webserver 2008 R2 core version and I try to configure it to remotely manage from another server I am doing Domains I need to import web administration modules according to the steps highlighted in this article. Import the module 'web administration' to me using the import-modules web administration Was not because no valid module file was found in any module directory line1 char 14. I get command- module -ListAvailable command and 4 module types returned Bestprexes, bits tracerber, PSDiagnostics and ServeManager I read other threads about this issue, none of them is uniform and offers a good solution for it. The BTW server is a way to create a Microsoft repository to download the requested modules if not found. Any suitable proposal for this solution will be appreciated Is the IIS PowerSheep Snap-in installed? If not, you can download or run MSI (using MSIXAC / I, this is original), the snap-in must be registered and import-module or ...

Doubts in development of a basic ontology using RDF/S: ontology reuse and "instance vs. inheritance" -

I am trying to develop a simple "ontology" using the RDF and RDF schema. For now, I have written the following sections and properties: & rdf: class rdf: about = "# Model "& gt; ... & lt; / Rdfs: class & gt; & Lt; Rdfs: class rdf: about = "# system" & gt; ... & lt; / rdfs: Class & gt; & Lt; Rdfs: about class rdf: = "# concept" & gt; ... & lt; / Rdfs: class & gt; & Lt; Rdfs: property rdf: about = "represents #" & gt; & Lt; Rdfs: domain rdf: resource = "#model" /> & Lt; Rdfs: category rdf: resource = "#system" / & gt; & Lt; / Rdfs: Property & gt; & Lt; Rdfs: property rdf: about = "#include" & gt; & Lt; Rdfs: domain rdf: resource = "#model" /> & Lt; Rdfs: category rdf: resource = "#in concept" /> & Lt; / Rdfs: Property & gt; The idea is that I want to define a "mode...

java - How to remove object from array -

Please understand it; Because it can be difficult to understand I have a Jabatone 50 size big, for this example Ill use is 7 jbutton object within 7 I 1 2 3 4 6 7, but not 5. They are printed on the screen. I want to remove these jbuttons, but all 5 buttons are removed, while the last two are not. For (int i = 1; i Remove element to array , suppose that the subsequent indexes have been changed after the removal. For this purpose, you should use the list : Iterator Butitator = seat.buttonList.iterator (); While (ButtonErterator hasNext ()) {Object Button = Buttitter.Next (); // or more specific type, if your list is generated (button == blank) {// or some other criteria, it is written as an example example Iterator.remove (); }} If it is mandatory to use array , you have two options: set seat .buttonArray [i] to the null value, it has been pointed out that it has been removed; See Javadok for details, although I do not recommend this approach due to per...

python - How to enforce method signature for child classes? -

Text after "itemprop =" text "> Like the C # quote, the Java method is loaded, if the child class does not apply the method with exact signature overwrite Will not, which means the basic method. How do we apply the method signature in child classes in Python? The following code sample shows that the child class overwrites the original method with different method signatures: & gt; & Gt; & Gt; Class A (Object): ... Diff Me (Self, P = None): ... Enhance Customized Arrays ('Not applicable') ... & gt; & Gt; & Gt; Class B (A): ... Diff Me (self, p 2 = none): ... print P2 ... & gt; & Gt; & Gt; B () M ('123') 123 Although it is not very important, or it may be that the design of a dragon (like * args, ** quorz) I am asking for clarity if this is possible. Please note: I have tried @ abstractmethod and ABC already. Below is a full-fledged example, to ensure that how to use metaLessels sub -School met...

sql - Syntax error for mysql while doing inner join -

SELECT t1. Type PERFORMS_SURGERY as a PS Inner (selection CPT, type of surgery) as T1 ON T1 .CPT = PS.CPT WHERE PS.PUsername = "klove30" I get a syntax error as PR Inner from "PERFORMS_SURGERY" (choose search CPT, type of surgery) ". What is the syntax error? select t1. By type, ... You should not have a comma after the last column in the selection list. Change this to change: SELECT t1 ... to type ...

security - Provide and Protect a Read Only PDF on Website -

I have a customer who wants to provide PDF documents on their website but they want to ensure that It's safe to download I have seen some JS plugins that provide to readers, but it seems that seeing instantly on the source code will most likely find the path of PDF in most cases. Does anyone have experience with this or know how it can be done? If you want to allow people to view documents but make it difficult to copy them , You have to do document-rendering server-side. Keep an eye on the user's viewport (size, zoom, coordinates in the document, etc.), present the portion of the document as a static image within the viewport, and send it to the user. Keep in mind that whatever you do, they can be re-assembled in the user document if they make sufficient efforts in it.

web services - Constructing rich web "desktop" environments -

I know that this could potentially be a very detailed question, but I'm sure about it and where Say it. Hope this can serve as the basis for me and the demand for building other rich web applications. I'm interested in the intersection availability, which reduces the creation of rich web "desktop" apps. The best example I can think is that the airdride (demo :) is. I have studied HTML and JS which has been made but have tried to study it, but it all appears to be ownership. If I want to make something similar in a strong fashion, then what are some mature, open source technologies, libraries and frameworks should show me? I have found at least one framework to answer the required attributes for implementing this type of system Asked in os.js is a JavaScript framework in which "Web Desktop Implementation for Your Browser is fully developed Window Manager, API API, GUI Toolkit, and FilesystemAbstract." As such, it requires special features to...

c# - Cross client GUI update -

This is my simplified scenario, each client has a PC on LAN: Customer 1: Add Maximum Number: _ Maximum Number: 0 Client 2: Add Max Number: Maximum Number: 0 then saves " 1 " as the maximum number of Customer 1 and Client 2 will automatically update and receive changes To: Customer 2: Add maximum number : _Maximum number: 1 (last updated on 23/04/2014 by Client 1) 1-Voting: DB servers in regular intervals for each user's update: itemprop = "text" Asking: Pros: Easy to implement, safe cons: excessive bandwidth and consumption of DB server process 2-centralized TCP server: A dedicated machine Listens to the connection, each client connects to it and informs events, the server redirects those events to the related client. Pros: Minimum bandwidth, not necessarily much process is needed: more 3-decentralized UDP notification: If the clients are in the same LAN, You can broadcast UDP packets in that network, each custo...

c# - Running a Method Upon Exit Button Click -

I have a C # / WPF application that has a main window and system tray icon when I close the main window To keep an application running in the system tray, configure App.xaml with ShutdownMode = "OnExplicitShutdown" . Now I want to associate the main window on the "X" is a method of clicking on the close button, which checks to see if there is a member in the observation archive and to close the main window Does not allow, if calculation & gt; 0. I'm having trouble finding the method running when X button is clicked. Add a handler for the event, which you can close the window Called while attempting (including the X button). Then after your check, if you do not want to close the window, set your CancelEventArgs.Cancel to the correct. Private Zero onWindow_Closing (Object Sender, CancelEventArgs E) {If (some collection.Count> 0) e.Cancel = true; }

java - Paddle game - Ball contacting paddle -

Currently coding Java games where the sword has three walls and one paddle, trying to implement the collision method Checks the ball attacking the paddle Ball sometimes notice the pedal, and sometimes it does not, it does not. If someone tells me where I am wrong My code: Public boolean is Sieigenie (ball one ball) {int ballYPos = aBall.getY (); // getY will return the end of the ball paddleXPos = Paddle.this.getX (); / / Will return to the upper left corner of the pedal if (ballypos-aBall.getRadius () == Paddlex POS + width) // Check for yPos-radius {return true; } And false return; } You are currently checking whether they are exact identical. So it will be right only when they are exactly the same, i.e. 10.1 == 10.1 .... However 10.1! Try to use if (ballYPos-aBall.getRadius () & lt; = paddleXPos + width) // YPos- Check for radius {Back to true; } However it seems that this is a clunk way to calculate in any way. You're comparing the Y value of the ball...

html - How do I center an image vertically within a div that is position:fixed? -

इस सवाल का पहले से ही एक उत्तर है: 6 उत्तर मैंने एक के माध्यम से देखा है कई ऊर्ध्वाधर केंद्रित तकनीकों में से बहुत सारे हैं, लेकिन कोई भी मेरे लिए काम नहीं कर रहा है - मुख्यतः क्योंकि मैं एक निश्चित स्थित डिवा का उपयोग कर रहा हूं। & lt; div id = "lightbox" & gt; & Lt; div id = "lightboxImgContainer" & gt; & Lt; img src = "'+ image_href +'" / & gt; & Lt; / div & gt; & Lt; / div & gt; # लाइटबॉक्स {स्थिति: तय; शीर्ष: 0; बाएं: 0; चौड़ाई: 100%; ऊंचाई: 100%; पृष्ठभूमि: #ffffff; text-align: केंद्र; z- सूचकांक: 4; कुछ भी डिस्प्ले मत करो; } #lightboxImgContainer {display: table-cell; ऊर्ध्वाधर- align: मध्यम; अधिकतम ऊँचाई: 100%; अधिकतम-चौड़ाई: 100%; text-align: केंद्र; } # लाइटबॉक्स आईएमजी {अधिकतम-ऊंचाई: 100%; अधिकतम-चौड़ाई: 100%; } इसके अलावा, क्या मैं एकमात्र व्यक्ति हूँ जो सोचता है कि यह एक मजाक है जो ऊर्ध्वाधर संरेखण क्षैतिज संरेखण के समान सरल नहीं है? मैंने इस पर बहुत ज्यादा समय बिताया है जो एक...

php - MPDF57 CSS3 list-style:none not being applied (or isn't supported) for items inside element -

I want to clear the generated PD. I have read (and supported according to documentation), but during the formation of output () PDF file, you can see the circle . HTML output range is to emphasize only, elements which are being targeted. PDF output CSS ( available via HTML ) .schedule_logo_con img {width: 300px; Height: auto; } .daily_schedule {font-family: helvetica, sans serif} .schedule {font-family: helvetica, sans serif; Margin: 0 px! Important; Padding-down: 10px; } .schedule_list {margin: 10px 0 0 0} ul {margin: 0; Padding: 0; }. Widget {width: 65px; Text align: center; Border-left: solid #ddd 1px; Red color; } .weekday ul li {border: 1px solid red; } ul,. Week de ul. Week de ul li {list-style-type: none; } I have also tried (besides this also, if there is anything with MPDF57 ), see also MPDF56 Checking), but the style is not being implemented regardless of this. For now, this is a singing problem, it seems only from the library & lt;...

superscript - determine exponent or subscript by position via Y axis for a math equation in kineticjs -

Any person can help write a function in KineticJS to determine the state of math object. To wit. Determine if there is a number 2 squire index or just 2. Position of objects has been taken from X-axis (horizontal position with left to 0). Functions will then be written in order eg: [faa (???) (x)] [=] [2] [x] [2] then check the position through the y-axis. If a function is typically more or less then it is considered for an exponent (for top) or a subscript label (below). After this we are: [faa (???) (x)] [=] [2] [x] [? Square?] If a function is small, then it is to ask the user to confirm an exponent or subscript label and function [FAC (x)] [=] [2] [x] [squared] I suspect that many people want to take their time to do their work for you, It should not be very difficult to try. You will have to use the getAttr ('y') on the base number and then have to make the same call to the subscript and compare those two values. The function can return a boolean, which is an ex...

c# - Get Windows logged in user's email when offline -

We currently use this code to get the user's email: var CurrentUsersEmail = UserPrinnal Present. Email address; When on the network it works fine. However, we have a laptop user who runs our code remotely and in a disconnected position. The above code causes this exception when: System.DirectoryServices.AccountManagement.PrincipalServerDownException Message: "The server could not be contacted." Does anyone know the way to get an email from an existing user who will work on network / connect and when it is disconnected? Update: If you are wondering why we want to do this, there are several ways in our system that send alerts via email. When our developers are running automated tests, we want the email to be sent to the currently logged-in user (i.e., the developer) so that they can verify the format. You can rewrite your application so that it UserPrincipal.Current.EmailAddress For the first time, and perhaps whenever it is online, and then working...

How do you combine two functions in OCaml? -

आरईसी का परीक्षण करें b = एक के साथ मेल करें। [] - & gt; [] | (ई, आर) :: पूंछ - & gt; यदि बी = ई तो आर:: (टेस्ट टेल्स बी) अन्य टेस्ट टेल्स बी test2 जी = मैच जी के साथ | ई, आर - & gt; ई, (परीक्षण r) मेरे दो उपर्युक्त कार्यों के बारे में 2 प्रश्न हैं। test2 कॉल कर रहा है परीक्षण । मैं test को test2 में कैसे डाल सकता / सकती हूं, तो यह एक फ़ंक्शन बन सकता है? इन test2 , ई, आर - & gt; ई, (परीक्षण आर) के साथ लाइन पर - परीक्षण 2 तर्क स्वीकार करते हैं, लेकिन यहां हम केवल r , तो इसका मतलब क्या है? दिए गए सवाल 2, मुझे लगता है कि आपने ये कार्य नहीं लिखा है इसलिए आपको उन्हें मिले, क्योंकि वे बहुत बुरी तरह से लिखे गए हैं (सीएफ इन्फ्रा), तो यह जानना कठिन है कि आपके सवालों का जवाब कैसे होगा ... वैसे भी: 1। पहले , ध्यान रखें कि कई मामलों में दो अलग-अलग फ़ंक्शन रखते हुए कोड को पढ़ने, बनाए रखने, पुन: उपयोग करने में आसान बनाता है ... ऐसा कहा गया है, ऐसा करने के दो तरीके हो सकते हैं: आप या तो परीक्षण अंदर test2 परिभाषित कर सकते हैं उस मामले मे...

python - Properly mapping first names to emails? -

I am working on a research project and I have a list of ~ 200 names and 6 email addresses. It is necessary that every email from these email messages needs to be mapped to an email address after this requirement: "Emails on names starting with A, B, C, D, E 1. F.G.G., H., I, J. Email 2 and so on and so forth. Now I am trying to think about the name of a special mail to those names "If Name AE starts with email1 , due to all the names and the initial letter of each name Instead of checking the query. Is there a way to accomplish this? 'I can think that RegEx can help, but it is not certain that (possibly ^ [a-eA-E] ?) again is an undocumented in the module that can be used to attach an arbitrary function call to redo the pattern. Could. This is called the Scanner.scan method, the supply text is matched with each regex pattern, and the associated function is said to be found when a match is found. Scan Me import re def make_email (i): def email (sc...

javascript - Change colour of elements previously clicked -

I have a list of elements, which I want to change color after clicking on the user's button (then a different Clicked). I know how to change the color of the button on click, I will use the onclick , but how will I change the color of the button after I click? For example, the user clicks the Titanic nothing happen. Then the user changes color to Titanic 7, Titanic and saves that color. After that user clicks the Titanic 9 Both the Titanic and Titanic 7 have given the "visit" color. See JSFiddle If I understand you correctly, I do: $ ('. Song'). Click (function (e) {e.preventDefault (); $ ('Selectnext'). CSS ('background-color', 'blue'). RemoveClass ('select'); $ (this) .addClass (' Selectnext ');});

c# - Calling Process.Start("foo.exe") in an ASP.net project hosted on Azure. How to restrict "foo.exe"'s access? -

Then I have an ASP.NET.net project that is hosted on Azure which runs executable provided by users is. Think of it like an online web terminal simulator. I am running with the process of exe presented. Start (). I have been granted a user-executable. For example, I want to sandbox execution in a particular directory so that a malicious exe is not able to view or copy my files in other places. And I want to exclude the Xi process from time to time after 5 minutes, so it does not have my processing pool. / p> "post-text" itemprop = "text"> How to use the AppDomain class in the sandbox app. Load the executable in AppDomain . Please note that this will work only for Net Executables. Good luck!

c - fprintf ignore ^M carriage returns -

I have such a set up my phopan, I tried both my FOPIN without "T" and "T" is. For some reason my fprintf ^ M is printing out what the carrier returns. How do I stop frpintf from doing this? I just want to use the character of normal new line FILE * outputfp; The location is for +5 to .5 and terminator four * fname = calloc (strlen (argv [1]) + 5, size (fname [0])); Strapepie (FNA, AGRV [1]); Dome (fname, ".lst"); Outputfp = fopen (fname, "w"); // printf ("above error message \ n"); If (outputfp == NULL) {printf ("Error opening file. \"); Return 1; } Fprintf (outputfp, "hello \ n"); I am using Fedora and I am compiling it with GCC Update: if ((int) line [0] == 46) {// printf ("you have a duration \ n"); // printf ("% s", line); {// fprintf (outputfp, "% c", line [i]) for (i = 0; i & lt; 80; i ++); If (ISPrint (unsigned char) line [i]) || Operation ((unsigned char) l...

newtons method - Use inverse CDF to generate random variable in R -

Image
First of all, I have no idea, Professor gave a wrong question. Anyway, I tried to generate F (x) ~ U (0,1) , where CDF F (x) = 1- (1 + x) exp (-x) (For this CDF, you could not calculate with x = g (f)) hand. Because 0 To INF / code>, uniroot () is out of the question therefore , I use the Newton method to write one. Then, my code is such: f = function (x) {ifelse (x> = 0 , X * f (-x), 0)} in.C = function (n) {a = runif (n) g = for tap (i in 1: n) {del = 1 x = 2 while (abs ( Del) & gt 1e-12) {del = (1- (1 + x) * exp (-x) -a [i]) / f (x) x = x-del} g [i] = x} g} system however, if f (x) is too small , And Newton is a step in the method, then there will be errors if the time (tt> the result may be less than zero. Your code has been modified like this: f = function (x) {ifelse (x> = 0, x * exp (-x), 0)} in.C = function AB (Dell) & gt; 1e-12) {if (x> = 0) {del = 1x = 2 for (i in 1: n) {del = 1x = 2} {a = runif (n) g = (1- (1 + x) * ...

windows runtime - What's visible in a ScrollViewer? -

I have a GridView . I'm using nested ScorpViewer of SnapPoints to see each record because it is only a visible change, and there is no data change, how can I determine it Which record (current) are visible to me? Something like SelectedItem , but a visual query. I can check every record, but it seems disqualified. idea? In your case, you can use the XTL Toolkit with VisualTreeHelperExtensions And do something like gridView .GetDescendantsOfType & lt; GridViewItem & gt; (). Select (gvi = & gt; gridView.ItemFromContainer (gvi)); It does a somewhat intense visual tree search, but it can be fine for your scenario if your GridView uses virtualization because the item returns Have gone or are near view ports. If you want to be more precise then you can test to force reset intersections. Something can be sufficient: Fixed class rectExtensions {public static bool ContentsPartOf (This RET Bearerctact, Ricet Shortcut) {// It is a very small scrollable...

ios - AppStore MetaData Rejection -

Image
The appstore has dismissed my game's metadata. The reason for this is: 3.8: Developers are responsible for giving appropriate ratings on their apps. Inappropriate ratings can be changed by Apple 3.8 / We've found that the rating you select for your app is consistent with the content of your app as per the App Store review guidelines. Was not there. Since your app contains content or features that are related to guns or gun related activities, your rating is " repeatedly / acute "Settings should reflect " in iTunes Connect You can modify your ratings in iTunes Connect, manage your applications, view the details of the appropriate app, then on the ratings tab Reach Edit the version information for the filter and select the settings. If your iTunes connected app state is rejected, then a new binary will be required. Change the desired metadata when you upload a new binary. If your iTunes Connect Application Status Metadata is declined, we do not ne...

c# - How to represent The SQL query in Linq -

I have SQL query but have difficulty in converting to linq. I'm new to LINQ. The selection statement of my SQL is as follows: Select in CM.ParentCategoryID (Select from the CategoryID as CM.CategoryName as dbo.utblCategoryMaster from Dbo. UtblCategoryMaster where CategoryName = 'Events') I know this is simple and easy x.ParentCategoryID == objutblCategoryMaster; I have tried this selection from objutblCategoryMaster = {classID = objutblCategoryMaster.CategoryID, CategoryName = db.utblCategoryMasters.Where (x = gt) => results in the results at = db.utblCategoryMasters. CategorID & gt; ; Amp; x category name == "event")}; Return result. CoptoDataText (); "itemprop =" text "> After getting involved with one you can get results. Results at = db.utblCategoryMasters .Join (db.utblCategoryMasters.Where (c => c.CategoryName == "Event"), cm = & gt; cm.ParentCategoryId, c = & Gt; c.CategoryId, (cm, c) =...

python 2.7 - How can I change django server's port number in Eclipse? -

मैंने Eclipse & amp; Django & amp; Pydev । शुरू करने के दौरान आवेदन विफल हो जाता है और मुझे निम्नलिखित त्रुटि दी गई है: * त्रुटि: [एर्रो 10013] सॉकेट को एक्सेस ऐप अनुमति से प्रतिबंधित करने के लिए प्रयास किया गया था * मैंने रन कॉन्फ़िगरेशन को बदलकर ईक्लीपसे में 8080 में पोर्ट नंबर बदलने की कोशिश की है, लेकिन यह विफल हो गया है। कैसे इस समस्या को हल कर सकता है और अन्य पोर्ट पर मेरे डीजेंगो आवेदन होस्ट कर सकता है? यदि आप एक्लिप्स से बाहर करने के लिए तैयार हैं, तो आप एक भिन्न पोर्ट पर डीजांगो डेवलपमेंट सर्वर चला सकते हैं अजगर manage.py चालक PORT_HERE उदाहरण के लिए, पोर्ट 8005 का उपयोग करने के लिए, आप python manage.py चालक 8005 कर सकते हैं

contextmenu - Use Highchart context menu provided in version v4.0.0 -

Add a context menu on the right cache of the bar chart, Hiarch API version v4.0.0. The hiker has been provided in the new version of the context menu, but I do not know how to use it. I need to add a context menu on the right click. The .old version of the API does not support context menus You custom events. JS can catch the right click event and then the display will be the DISPEL which will be the context menu.

node.js - How to retain the values across conections in websocket server? -

नीचे websocket सर्वर साइड कोड है जो "ws" प्लगिन का उपयोग करता है। var WebSocketServer = आवश्यकता ('ws')। सर्वर, wsSend = new WebSocketServer ({port: 8080}) // ग्राहक इस पोर्ट पर संदेश भेजता है। , wsReceive = नया वेबसॉकेट सर्वर ({पोर्ट: 8081}) // प्रतिक्रिया इस पोर्ट पर भेजी गई है। , ClientMessage; wsSend.on ('कनेक्शन', ReceiveSocketConnection); // ग्राहक से ग्राहक के संबंध में // कॉलबैक फ़ंक्शन फ़ंक्शन ReceiveSocketConnection (वेबसॉकेट) {webSocket.on ('संदेश', GetMessageFromClient); } // हैंडलर ग्राहक से संदेश प्राप्त करने के लिए फ़ंक्शन GetMessageFromClient (messageFromClient) {clientMessage = messageFromClient; // क्लाइंट से संदेश चर में सहेजा गया है) wsReceive.on ('कनेक्शन', SendSocketConnection); // क्लाइंट के लिए नीचे क्लाइंट साइड कोड है। var वेबसॉकेट = आवश्यक ('ws'), wsSend = new WebSocket ('ws: // localhost: 8080') // भेजें पोर्ट, wsReceive = नया वेबसाकेट ('ws: // localhost: 8081'); // भेजें पोर्ट पर ...

android - remove table rows except the first one -

सार्वजनिक रहित पॉप्युलेट () {TableRow tr = new tableRow (getActivity ()); tr.setId (100 + गिनती); Tr.setLayoutParams (नया लेआउटप्रर्म (लेआउट पैरामा.फिल_पैंट, लेआउट पैरा। WRAP_CONTENT)); बटन b_add = नया बटन (getActivity ()); b_add.setId (20); b_add.setText ( "+"); b_add.setTextColor (Color.RED); b_add.setGravity (Gravity.CENTER); B_add.setPadding (2, 2, 2, 2); b_add.setOnClickListener (जोड़ने); tr.addView (b_add); TextView v_no = नया संपादन टेक्स्ट (getActivity ()); V_no.setId (200 + गणना); V_no.setHint ("वाहन नहीं"); v_no.setTag ( "पता"); v_no.setTag ( "v_no"); v_no.setTextColor (Color.BLACK); v_no.setGravity (Gravity.CENTER); tr.addView (v_no); बटन b_minus = नया बटन (getActivity ()); b_minus.setId (20); b_minus.setText ( "-"); b_minus.setTextColor (Color.RED); b_minus.setGravity (Gravity.CENTER); B_minus.setPadding (2, 2, 2, 2); b_minus.setOnClickListener (निकालने के लिए); tr.addView (b_minus); // अंत में इसे टेबल पंक्ति tl.addVie...

java - Do arrow keys don't work in terminal emulation vai ssh -

While ssh'ing in my machine, I am able to use Ctrl + P for command history in terminal emulator . I wanted to know that it is possible to increase the arrow keys too. I am ssh'ing through a program, via the command ssh user @ host Why am I asking this because, separately from the byte array, Before removing the individual characters, I am printing it when a character is pressed, so many numbers are visible in the byte array, but when I press the arrow keys, it does not print anything I do Ctrl + P works To act as the arrow keys will have to be. Please note that the shell value is / bin / bash In addition to this, I have used these words for TERM variable: dumb, vt100, xterm, linux. For secure login, I am using the GNID SSH library I am using. Update: (with tips as trifle) A small snippet of keyboard processing logic is as follows: (int i = 0; i & lt; len; i ++) {char c = (four) (data [i] & amp; 0xff); System.out.print (c + ","); If (C == 8)...

javascript - Best way To handle a Cookie -

I'm a newbie in developing web applications and want to learn best practices, I want to know how to handle cookies What is the best practice, should the data be used in JavaScript or PHP to handle any cookie data? 1. Do you use JavaScript to get the cookie and pass it to PHP to filter all? 2. Do you use PHP to do all the things? 3. Any one of the above will get better performance or is there any other way? Post-text "itemprop =" text "> Should JavaScript or PHP be used to access cookie data? To make it a little more common, call it "Client Side" (which is almost exclusively javascript) and "Server Side" (which can be in PHP, Javascript or any other language) code. The short answer is that: It depends on what you are doing cookie data. Officials At times, cookies are easy to deal with server side. Occasionally, information in the cookie needs to be secure, and you do not need to access it with the client-side code, So that...

path finding - Understanding this implementation of A-star algorithm in Python -

I'm new to Python I have this code I have its A-star algorithm code. I wanted to know how it creates obstacles. Actually I have a black and white image. My task is to reach the end point from start point to avoid white bars. Finding the path-find algorithm in the function pathFind () Code> is well commented and decomposed If you have some specific confusions, let us know what it is. I recommend that you suggest reducing the parameters (M, N) after a 4x5 or 5x6 then move through your execution, either PDB debugger (single-phase at important points Or set breakpoints), or hacking in many print statements as per your requirement: # matrix matrix n = 30 # horizontal size m = 30 # vertical size First try to give your own custom maps that it Ase works ( # to modify fillout) map matrix ... lines). Then run it interactive in the debugger.

Camel - split and aggregate exceptions -

I want to send separation message, separately to process the webservice endpoint, each CSV line as a CSV file I am examining exceptions, and send a response with the exception summary: My route is: & Lt; Split Strategy = "MyAgregrate Stracia" & gt; & Lt; Tokenize token = "\ n" /> & Lt; Unmarshal & gt; & Lt; CSV Seamankita = ";" / & Gt; & Lt; / Unmarshal & gt; & Lt; Process ref = "miprocessor" /> & Lt; From Yuri = "Bean: Mywbysis? Method = Process" / & gt; & Lt; / Split & gt; & Lt; / Route & gt; How can I do this? Feedback & lt; DoTry & gt; More about using and & lt; DoCatch & gt; within your logic? You can have whatever logic you want in the catch, eg Something like this: & lt; a bean to consolidate / Route & gt; & Lt; Uri = "cxf to: bean: my endpoint" /> & Lt; Split Strategy = "MyAgregrate S...

I need to do this with ajax -

& lt; शैली & gt; # संख्या {ऊंचाई: 50px; रंग: # 000; } & Lt; / style & gt; प्रगति: & lt; div id = "number" & gt; & Lt; / div & gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; var i = 0; डी = 1; कार्य वृद्धि (डी) {यदि (i & lt; 100) {i + = d; Document.getElementById ('संख्या')। InnerHTML = I + '& amp; # 037;'; } और {document.getElementById ('संख्या')। InnerHTML = 'किया'; }} SetInterval ('वृद्धि (डी)', 1000); & Lt; / स्क्रिप्ट & gt; & Lt; बटन प्रकार = "बटन" आईडी = "बटन" onclick = "d ++" & gt; जोड़ें & lt; / बटन & gt; & Lt; बटन प्रकार = "बटन" onclick = "window.location.reload ()" & gt; ताज़ा करें & lt; / बटन & gt; मैं वर्तमान में asp.net mvc पर विज़ुअल स्टूडियो के साथ एक वेब ऐप पर काम कर रहा हूं। 4. मुझे एक आंशिक दृश्य बनाने की आवश्यकता है जो एक काउंटर को दिखाता है जो 1 से 10...

emacs - deft mode terribly slow -

I use emacs24 (which comes with Ubuntu) The dull mode my ~ / .emacs-d / init.el looks like this to copy the behavior of informational velocity at: (setq deft-directory "~ / notes") to load your folder with (add-to-list 'load-path' ~ / .emacs.d " I have a few thousand text files in the folder containing the CJK character (setq deft-use-filename-as-title) > txt Now, running mode is running / now / slower, it is impossible to type in searches in files, after typing a word, before I appear on the screen, through the notes medium I have to wait for several minutes, even if it takes a long time to close emacs My computer is a Lenovo W540 64-bit i7-4800MQ CPU @ 2.70GHz ?? 8 and 23.2 GIB Memory (this tells me). I'm running Ubuntu 14.04 What's in my emacs Can be wrong? I'm new to emacs and obviously I still can not understand what I wrote above, I just want to gather the setup from the tutorial. Find online, so forgive any foolishne...

ASP Crystal Reports asks for database credentials after changing to HTTPS -

I know that this question has been asked many times, but I have a slight variance of it that I try to solve I am doing / P> I have a crystal report on the old web system written in classic ASP. I have been running all the reports without any problems for many years, although recent security had improved so that the system is now accessible to HTTPS. Could. Since this change reports have begun to ask for database credentials. If SSL is disabled, then it returns back to the regular HTTP, then they start working again. The system was created by another developer who has gone since then, so I am not very familiar about it, but as far as I am fully aware that the system DSN is installed in the server's control panel The IIS is running which is set to. The database is located on a different server. Does anyone have a suggestion that after changing the report into HTTPS, will you start asking for the database credentials and how to solve it? I will not be able to make any code...

.htaccess - RedirectMatch htaccess redirect folder to folder -

For example, how can I redirect the folder to the folder: www.domain .com / folder / W-search to www.domain.com/stackoverflow/w-search I try: RedirectMatch 301 ^ / Folder /(.*)) / stackoverflow / $ 1 but it guides me: http://www.domain.com/ Stackoverflow / w-search? / Folder / W-search How can I improve it? This should work: RewriteEngine On RewriteRule ^ folder / (. *) / Stackoverflow / $ 1 [R = 302, L] change

javascript - Dynamically resize JQuery modal Dialog to IFrame content -

I have found a JQuery dialog with an internal iframe, which uses a PHP document so that an image and something Information . It works correctly, but if I click on one of the images to go to the full size image and show it in IFrame, the size of the dialogue does not change. In this way, iframe and dialog are created, I have erased some extra code, but here it is important: $ ('& lt; iframe id = "frameProductos" width = "100%" src = "articulos_info.php? codigo_art = '+ val +'" name = "frameProductos" & gt; '). Annex ('body'); Var dialog = $ ("# frameProctctos"); Dialog.dialog ({title: 'Revisión de producto', resizable: false, modal: true, position: ['center', 150], overlay: {opacity: 0.5, background: "black"}, open: function (event ('' 100% '');} Close: function (event, UI) {$ (this) .dialog ('deleted'). Remove ();}, width: 500, height: 500, butto...

php and mysql database turkish character -

Hello friends, I know that this question is in StakeVareflow, but I look for answers to all the questions, but solutions for me No. My problem is mysql and php turkish character problem I call it & lt; meta & gt; & lt ;! DOCTYPE HTML Public "- // W3C // DTD XHTML 1.0 Transcriptional // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Top & gt; & Lt; meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> But the Turkish character is watching this: a ?? One ÃÆ'à ¢ â,¬Å¡Ãƒâ € šÃ, · ÃÆ'à ¢ â,¬Å¡Ãƒâ € šÃ, · ÃÆ'à ¢ â,¬Å¡Ãƒâ € šÃ, · p> I try the DB connection like this: & lt ;? Php define ('DB_SERVER', 'localhost'); Define ('DB_USERNAME', 'root'); Define ('DB_PASSWORD', 'root'); Define ('DB_DATABASE', 'test...

javascript - How to change the Menu colour when selected? -

I have created a menu in my ASP.NET website and I want to highlight the active menu item in the menu click This is usually the menu is white, but when the user selects any menu then it should be red, please search below which I have done so far: Jquery: & lt; Head runat = "server" & gt; & Lt; Script type = "text / javascript" & gt; $ ('Thumbnail'). Click (function (e) {$ ('thumbnail'). RemoveClass ('selected'); $ (this) .addClass ('selected');}); & Lt; / Script & gt; & Lt; asp: ContentPlaceHolder ID = "head" runat = "server" & gt; & Lt; / ASP: ContentPlaceHolder & gt; & Lt; / Head & gt; ASPX page: & lt; Div id = "nav" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; a href = "Default.aspx" square = "thumbnail" & gt; Dashboard & lt; / A & gt; When I want this menu option to be red in the Dash...

python - Execution time of int(raw_input() and converting raw_input() to int manually -

यह मेरा कोड है आयात करें datetime n = raw_input () प्रिंट "aaa" a = Datetime.datetime.now () के लिए मैं एक्सरेन्ज (1,100000) में: x = 0 के लिए i में n: x = ord (i) -48 + 10 * xb = datetime.datetime.now () प्रिंट एक्स, बीए N = raw_input () प्रिंट "aaa" a = datetime.datetime.now () एक्सरेन्ज (1,100000) में: x = int (n) b = datetime.datetime.now () प्रिंट एक्स, बीए मेरे सिस्टम पर मुझे दोनों इनपुट के लिए समान मूल्य 5 के लिए कई बार मिल रहा है, मुझे ये अलग-अलग मान क्यों मिल रहा है और यह भी कि ये मान एक ही क्रम में नहीं हैं, इसके साथ कुछ भी नहीं है कंप्यूटर में मेरा इनपुट टाइपिंग समय या शाखाएं मामला 1: 5 aaa 5 0: 00: 00.112000 5 एए 5 0: 00: 00.104000 मामला 2: 5 aaa 5 0: 00: 00.108000 5 एए 5 0: 00: 00.140000 मामला 3: 5 aaa 5 0: 00: 00.114000 5 एए 5 0: 00: 00.107000 मामला 4: 5 aaa 5 0: 00: 00.110000 5 एए 5 0: 00: 00.1 24000 आप समय निष्पादन अंतर के लिए गलत दृष्टिकोण का उपयोग कर रहे हैं। इसके बजाय का प्रयोग करें; यह आपके सिस्टम के लिए स...

java - Using JDK 7 Or Higher With Android Studio And Eclipse On Mac OSX -

Both Android Studio and Eclipse are asking me to install JDK 6, although JDK 8 has already been installed. Many work online told me that to change java_home to point to jdk 8 installation location, it has been done that both / usr / libexec / java_home and java -version commands refer to JDK 8 installation, but Android studio and Eclipse is still asking me to install JDK 6 android studio based on Intellij Idea 13 . The solution also applies to me to modify the information for 1.6 * 1.7 * for me. BTW, I have noticed that at least Android Studio uses a huge amount of 0.5.5 memory with Java 8 for very simple projects it gets more than 2 GB with Java 7 Still poor, but takes about 1.5 GB.

android - zxing barcode scanner giving notfoundexception -

Image
Using the code below, I get a notified passphrase all the time. Please help. Bitmap bitmap = BitMapfinderReddodersource (MyActivity.This.JetterSource (), ArndrableBarcode_Dream); Int [intArray = new int [bMap.getWidth () * bMap.getHeight ()]; // Copy copy pixel data from 'bitmap' intere 'array BIMAP.getpixel (intere, 0, bmap, gatewythth), 0, 0, bmapgetwidth (), bmapgatehite ()); LuminanceSource Source = New RGBLuminanceSource (bMap.getWidth), bMap.getHeight (), intArray); Binarybitmap bitmap = new binarybitmap (new hybridbenerizer (source)); Reader Reader = New MultiFormatReader (); // Use it otherwise try Checksam Expansion {hashtable & lt; DecodeHintType, Object & gt; DecodeHints = new hashtable & lt; Decodheinttype, object & gt; (); decodeHints.put (decodheinttype.trY_HARDER, boolean.true); //decodehints.put(DecodeHintType.PURE_BARCODE, boolean. TRUE); Result result = reader.decode (bitmap, decoded); If (result! = Null) {utility. ShortshotShort (My...

rounding - c++ upper value calculation -

I have double variable double dub 1. If this is a multiplier of integer 15, then I want to get the result of division (like 30/15 -> 2) if this integer is not multiple, then I think the upper value (like 20/15 -> 2 OK) I want to score with How do I handle the first part? int divres = dub1 / 15; // divres ++ for the second part; & lt; Cmath & gt; Use the function located in ,: int divres = static_cast & lt; Int & gt; (Std :: ceil (dub1 / 15)); You can use OK, without roofing , as follows: int divres = dub1 / 15; If (std :: fmod (dub1, 15)! = 0) {divres ++; }

c# - How to render data set data to word (docx) file with template? -

In my C # .net (win form) project, I have many template word files with content and tables I have MS Word Bookmarks Or fill out this word file with your database data using the field. What tools can I use for this issue? Point: This tool should fill in my nested table with the proper template definition. Any idea is welcome I know aspose.word but it's free, I'm looking for a free find. You can use OpenXml DockX I used OpenXML last time and it is very easy. I do not have code for this, though there are some links to the stack overflow here

java - How to sort word count program by value or count? -

How can I sort my password output based on the count / value of the key? In the general case, the output is Hi 2 hw 3 wr1 r 3 but the desired output is wr 1 hi 2 hw 3 r 3 My code is: Public class sorting application {applies the public static class map MapReduceBase Mapper & lt; Longweightable, text, intrite, text & gt; {Private Final Static IntWritable A = New IntWritable (1); Private text word = new text (); Public Zero Maps (LongWritable Key, Text Value, OutputCollector & LT; IntWritable, Text & Production; Report, Reporter Correspondent) throws IOException {string line = value.toString (); StringTokenizer Tokenizer = New String Toner (Line); While (tokenizer.hasMoreTokens ()) {word.set (tokenizer.nextToken ()); output.collect (one, word); }}} Expand declines in public static class MapReduceBase applies Reducer & lt; IntWritable, Text, IntWritable, Text & gt; {The public throws down zero (Iterator & lt; IntWritable> Key, Text value...

linux - Ping status and return -

I am writing a Perl script which issues a ping to a specific IP address, in which a ping size of 65000 and Count 1000. Now when the remote PC is up, things are fine. Ping succeeds and ends after sending 1000 px. However, in case of failure, it always returns "destination host unavailable" . Ping Arp is trying for a long time before requesting / ping requests, with the end leaving the 100% PCT loss with the string. My question is, the initial 100 pings do not respond automatically. I do not want to wait too long when the initial pings fail. I should get out of Ping How do I do this? I am currently using Linux of my script. Please tell me that Linux How to do this for Windows The ping pkt changes. So I want a solution which is independent of size / count I recommend using the module Gives you the flexibility to control different pings from your script.

javascript - jQuery Modal and displaying different content -

Hi, I'm trying to display different content in one click. Modal works fine but I am trying to find more efficient ways to write the following code to display the content. $ (document) .ready (function () {$ ('# click (function () {modal.open ({content: $ ("& lt; p> Display the content & lt; / p & gt; ", width:" 500px ", height:" 200px "}}}}} $ ('# block') .Holclass ('block 2'); {$ ( Click 'Block2'). (Function () {modal.open ({content: $ ("& lt; p & gt; contains different content "), width: "500px Click here (function () {modal.open}, "height": "200px"}}}}} $ ('# block'). HasClass ('block3' '500px ", height: ($" block3'). ({Content: $ ("& lt; p> and then separate " 200px "}))}}}}}); $ (robot ($ (This) .hasClass ('block1')) content = 'content1' if ($ (this) .hasClass ('block2')...

plot - ways for cross correlation in R -

Image
/ code> to plot it , But two plots are not the same. Agree with the BayPont plot of plot ccf before acf , while the second plot by ccf does not agree with the Daamotom plot ACF . I wonder if I miss something? Thanks! CCF (x [, 1], x [, 2]) CCF (x [, 2], x [, 1]) par (mfrow = c (2,1) / Code> ACF (x) ACF measures the correlations of a time series against its own long. CCF measures co-relation between two time series at different times. That appears to be the first conspiracy by the CCF (and the left plot plot of the ACF) is actually different if you remove the values, so I'm sure you will see it. If there is a high relation between the two time-series, then it is very likely that the ACF and CCF will look the same. The first conspiracy of the CCF actually matches the ACF plus Top ACF joint downstream. Top left and right ACF plots express only the correlations of time-series interval. If you enter multivarium repeatedly in the ACF functio...

rest - Is CSRF token the cause for not be able to get authentificated in CURL command? -

The FOSSTBundle is fully working in my project but without authentication. Now, my goal is to make my requests with auth. To do this, I have added this firewall to security.yml firewall: # ... main: Pattern: / Form_login: Provider: fos_userbundle remember_me: True login_path: / login check_path: / login_check default_target_path: minn_ads_default_index csrf_provider: form.csrf_provider Remember: key:% secret% rest_api: Pattern: ^ / api / stateless: true http_basic: Provider: fos_userbundle # ... access_control: # .. In order to check the certification in the curl order, I tried this command: code> curl -i \ -H 'accept: application / js '\' H: Authority: Basic DG9UXxxJoxMJM 0 '\ http: //localhost/tuto/app_dev.php/api/test/1 Where dG9uaXZkdjoxMjM0 = encode_base64 (' tonivdv : 1234 ') The result is: HTTP / 1.1 302 found Date: Fri, 11 April 2014 13:56:08 GMT Server: Apache / 2.2.22 (Ubuntu) By X-Power: PHP / 5.4.9-4ubuntu2.4 Set-Cookie: P...

javascript - Execute multiple functions -

I have an object, InsertDB , which has many functions. I would like to execute one after another only function 2 InsertDB.addNot (); Function 1 InsertDB.addBk (); has finished looping, putting records, and so on. Calling 7 function with the object lists each loop and indexed DB insertsDB = {ADBK: collects records in the function (if (object is hidden from the hypocopy ( "Books")) {for (var i = 0, j = object ["books"]. Length; i & lt; j; i ++) {server.books.add ({title: object ["books"] [I] .id, content: object ["books"] [i]});}}}, addNot: function {if (object ("host" property ("notification (For "var i = 0, j = object [" notification "]. Length; i & lt; j; i ++) {server.notifications.add ({content: item [" notifications "] [i]});}}} etc ... ... // On the event of Ajax success, do one thing after the other described above. Synchronize = {Start: function () {Return $ .ajax ({. ..... S...

php - Running queries in PDO without binding -

Can you run questions in PDO without preparing them? I am getting acquainted with SQL-injection which may be born with it, but I am in a testing environment. I want to be able to write pure MySQL questions and just have to execute them, do not prepare queries, placeholders, etc. ... I have the following Like would like to be able to execute a query. INSERT (table_id, car, bike, value (1, 'BMW', 'Suzuki', 2004) In the table, I think that this Errors that are running directly on the query are running. Thanksgiving statement is not the main idea that you can tie the parameters, but you can do it. Reuse the compiled statement several times , Thereby increasing efficiency. Ready-to-execute workflow as well as for unused use cases The PDO also provides other methods: executes a statement and returns the number of affected rows, it is useful for initial stuff, but SELECT s. Static query is useful, which does not include unreliable input. It is similar to ...

.net - Asp.net Label not updated after postbck. Need extra refresh -

On the page load I'm clicking on the button after entering the record in DB, I'm checking that the user was present or Not today and display the correct label The problem is that the post label is displayed incorrectly, but if I refresh, I see the correct label. Protects the sub-handle Btn_Click (as object, ByVal and System.EventArgs as the sender) AttendBtn handles. ConnectionString con = New SqlConnection (conString) con.Open () Dim cmd New SqlCommand ("Login in presence (UserID, Date, Presence_click) as New Connection String (" Attconnection ") as string conString = New SqlConnection Dim conString , Comments) value (@ USIDID, @date, @entendens_callic, @ comments) CMD parameter.Advate value ("@date", datetime.more) CMD parameter.Advate value ("@entensensical" GlobalVarAndFunc.CurrentCycle (2) ) cmd.Parameters.AddWithValue ("@ Comments", "") cmd.Parameters.AddWithValue ("UserID", GlobalVa rAndFunc.UserID) ...

timestamp - Javascript:Add Hours to Date -

I'm new to Java scripting and I'm trying the following code added Can be var r = document.getElementById ("Choose"). Values; // r can be 5 or 2.5 or so. Var dt = new date (); Var time = dt.getHours (); Var time2 = dt.setHours (1); Warning (time 2); But I get some of these kind of values ​​ 1398284822090 Is not there a better way to add hours and change in standard format? For more information, any document will also be useful. Thank you .. long value is a timestamp calling setHours Really changes the date to dt , so that you simply: dt.setHours (1); Warning (dt);

php - Why is the md5 returning same hashes for two different file names -

I have two video files that have different file names. But when I am returning both the hashes back to the MD5 file name are the file names below. 1. \ test \ downloadvideo \ ans-70055040.hd.mp4 2. \ test \ downloadvideo \ ans-70055298.hd .mp4 $ this-> _video_md5 = md5_file ("\ test \ downloadvideo \ ans-70055040.hd.mp4"); $ This- & gt; _videoo_md51 = md5_file ("\ test \ downloadvideo \ ans-70055298.hd.mp4"); Copy "MD5". $ This- & gt; _video_md5 md551f767588587184d13b8c9e6ed550166sh190d2078270d4ea1cb570b1de7 fb890bc761bda9a copy "md5". $ This- & gt; _videoo_md51 md551f767588587184d13b8c9e6ed550166sh190d2078270d4ea1cb570b1de7 fb890bc761bda9a How can I get two different MD5 hash file names As written above, md5 | Sha1_file is the content of the hash back file, file name is not included. Possible "solution" will result in the hedge of both the filename and the hesh of the file, which will ...

ios - Conversation with a specific user -

How can I get a specific user's conversation from my inbox using a user's UID? For example: if I want to talk with UID = 786758454 and user X with me? Select something like select message_id, thread_id, author_id, body, created_time, viewer_id FROM message where thread_id IN (selection thread_ID, topic, folders from folder_ id = 0) and author_id = 'user x uid' created by ORDER DESC LIMIT 0,25 You need both User ID User X UID and your UID Try to use this fql query: select message_id, thread_id, author_id, body, created_time, viewer_id From the message where thread_id IN ( Select from folder yag folder_id = 0) and (author_id = 'user X') Hope this can solve your problem.