Posts

Showing posts from September, 2013

java - How To Create JSON Array Object With JSP Declarations -

I am new to JEE. I want to make json data in the jsp declarion tag, e can help me. This is my source code & lt;%! Public double getTax (string name, double AMT, double DI) {double total = 0.0; Hashmap & lt; String, double & gt; Hm = new Hashmop & lt; String, double & gt; (); Prepared state PS = DBCNation.Jetpreiere ("value, op, intelligence, select formula," + "Tax type tax where name =?"); Try {System.out.println ("Discount:" + D); Ps.setString (1, name); Results set rs = ps.executeQuery (); String form = "sub-discount"; System.out.println ("---------------- Tax Value Details -------------------"); JSONObject json1 = new JSONObject (); JSONArray jarr = new JSONArray (); While (rsnext ()) {JSONObject o = New JSONObject (); Double val = rs.getDouble (1); String op = rjest string (2); String IQ = R.Jest String (3); Form = rs.getString (4); String type = rs.getString (5); O.put ("val", val); Double su...

graphics - How do you add co-ordinates in python? -

So I am trying to create a function that allows the user to enter the length and width and dragon for a rectangle Drag the rectangle (using the graphics module) in the center of the graph. So I was thinking that you can add coordination as a way to get an error message. This is what I have so far received: def drawRectangle (): win = graphfin ('target', 200,200) win.setCoords (0,0,200,200) width = int (input ( 'Enter the width of your rectangle:')) Length = int (Input ('Enter the length of your rectangle:')) ** Top lift = point (100,100) + point (0, width / 2) -Pivot (length / 2, 0) Right = point down (100,100) -Point (0, width / 2) + point (length / 2,0) ** REC = rectangle (point left (top left.x, top left), point (Right below. I have put in between the two stars that the bit is messing the help will be greatly appreciated Since dot belongs to another class, so you have to type your function, add a series of digits . You can try it, but I...

saml 2.0 - OpenAM: Error processing AuthnRequest. null -

While trying to enter SSO via OpenMIM, I get the following error: HTTP Status 400 - Error in AuthnRequest Processing The request sent by Faucet client syntax was incorrect (error AuthnRequest .null). log method AMKeyProvider.getPrivateKey , are linked (NullPointerException), so I know that can not be read by a private key. However, I'm new to OpenM / SAML and do not know how to fix this issue. Here is the full stack trace: libSAML2: 10 / 17/2014 12: 06: 41: 247 PM CEST: Thread [Http- Bio 8443-Executive -8.5 , Main] error: error processing in processing at org.forgerock.openam.utils.AMKeyProvider java.lang.NullPointerException. getPrivateKey com.sun.identity.saml.xmlsig.JKSKeyProvider.getPrivateKey (JKSKeyProvider.java:112) on com.sun.identity.saml2.profile.SPSSOFederate.signQueryString (AMKeyProvider.java:269) (SPSSOFederate.java:1125) com.sun.identity.saml2.profile.SPSSOFederate.initiateAuthnRequest (SPSSOFederate.java:346) on org.apache.jsp.saml2 on com.sun.identi...

internet explorer - Detect latest browser version in JavaScript -

यह प्रश्न एक सटीक डुप्लिकेट है: 1 उत्तर आवश्यकता: मैं उपयोगकर्ता के ब्राउज़र संस्करण की तुलना करना चाहता हूं नवीनतम है या नहीं तो मैं जो चाहता हूं, वह ब्राउजर है जो आईई, क्रोम, एफएफ या सफारी को चेक करता है और फिर उस ब्राउज़र का कौन सा संस्करण उपयोग कर रहा है। तो मुझे यह देखने की आवश्यकता है कि क्या संस्करण उपयोगकर्ता नवीनतम है या नहीं। अगर यह नवीनतम नहीं है तो मैं उपयोगकर्ता को कुछ कस्टम उपयोगकर्ता परिभाषित संदेश के साथ सूचित करना चाहता हूं। मुझे क्या करना है: मैं उपयोगकर्ता ब्राउज़र और संस्करण का पता लगाने में सक्षम हूं। समस्या : उपयोगकर्ता द्वारा उपयोग किए जाने वाले उस ब्राउजर का नवीनतम संस्करण क्या है, यह कैसे जांचें। नोट : मैंने धागा पढ़ा है लेकिन मुझे कोई जवाब नहीं मिला। कृपया मुझे अलग-अलग ब्राउज़रों के नवीनतम संस्करण की जांच करने के लिए कृपया बताएँ कि IE , क्रोम , एफएफ और सफ़ारी । धन्यवाद! आपके पास दो विकल्प हैं: एक JSON सरणी में सभी ब्राउज़र से सभी नवीनतम संस्करण लिखें, फिर ब्राउज़र का प्रकार नाम और संस्करण लें और देखें कि क्या...

python - Is it posible to return on the line with exception? -

I have a code that looks like this: try: a = Try: Pass [a '] except: [B]: B = form [' B '] except keyError: try the following: c = form [' c '] except keyError: try: D = form [ D] except keyError: pass is something capable of doing something: try: a = form ['a'] b = form ['b '] C = form [' c '] d = form [' d '] except keyError: some keywords So if any' a 'form is still working in the form Au Key 'B' and so on UPD: Sorry, my bad, I do not need to preserve the values, and not one of them. That's why I need a keyword or something that will help me to continue the block even after the exception raises. "post-text" itemprop = "text"> If the form is a dictionary then you can also use syntax Are: & gt; & Gt; & Gt; Form = {'D': 5}> & gt; & Gt; 5) You can create the function. Format ('a', form.get ('b', form.get ('c'...

gruntjs - What causes this error in grunt-contrib-compass after update to Yosemite? -

Code> hoarse build throw this error: / user / rogerfuentes / documents / web / kelios / test / node_modules / grunt-contrib-compass / node_modules / tmp / lib / Tmp.jshew61 throwing; ^ ERROR: What is going wrong due to this error, it arises on the wrong error: (child_process.js: 1001: 11) on the process. Hair process._hand.onexit (child_process.js: 792: 34) And how can this be fixed? If you run a compass on the terminal window, you will see the following error: -bash: / usr / bin / compass: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: Bad Interpreter: Any such file or directory If you go to /System/Library/Frameworks/Ruby.framework , you will see that the installation updated the Ruby version to 2.0. This is the reason that the compass fails to run, because now there is no Ruby 1.8. Its solution is to restore Yosemite to the compass by running: xcode-select - Sudo gem update --system sudo gem install compass Install

java - My android phone is not getting detected in eclipse -

इस सवाल का पहले से ही एक उत्तर है: 1 9 उत्तर मैं अपने माइक्रोमैक्स कैनवास का उपयोग कर रहा था पिछले 1 साल से अपने आवेदन का परीक्षण करने के लिए ए 116 डिवाइस, यह पता चल रहा था और मैं सफलतापूर्वक डिवाइस में अपने ऐप को स्थापित कर रहा था लेकिन हाल ही में मैंने अपना लैपटॉप बदल दिया। मैंने अपने पुराने लैपटॉप से ​​पूरे कार्यक्षेत्र और ग्रहण की नकल की है। तो नए लैपटॉप में जब मैं ग्रहण करता हूं और अपने डिवाइस पर एंड्रॉइड ऐप को चलाने का प्रयास करता हूं तो हमेशा की तरह इम्यूलेटर शुरू होता है, ग्रहण डिवाइस टैब के तहत मेरा फोन नहीं दिखा रहा है। कृपया किसी भी समाधान का पता करें? मैंने इस समस्या के लिए आपको निम्नलिखित लिंक की जांच करनी है आशा है कि यह मदद करता है !!

Getting a CSS calc percentage result -

I'm trying to get some responsive CSS, which changes an image element in a spectacular way. Within a range ( @ media screen and (minimum-width: 600px) and (max-width: 960px) ) Percentage of your image Property is different. Specifically, at 960, I want to effectively do this width: 50% , but at the bottom 600, I have it effectively width: 38.1966 % For every pixel of width decrease, I need to reduce the width of 0.032787%. So far, I have not found any way to get the calc () to handle it. I need to first calculate the original calculation: (960px - 100vw) . Unfortunately, it gives results in pixels, while I have to convert it to some number, so that I can multiply my target percentage by variance. Is this possible? If you want to use jQuery: You calculate the calculated value as you mentioned, you can get it var madwithath = $ ('# id'). Internal (); After this, you can get the width of the page with the var bodyWidth = $ ('body'). Inne...

php - Converting Zend_Form_Element_Text to Zend_Form_Element_Hidden -

मेरे नियंत्रक स्क्रिप्ट में मेरे पास निम्न है: $ client_el = $ the-> और ; view- & gt; फार्म & gt; getElement ( 'CUSTOMER_ID'); Zend_Debug :: डंप ($ customer_el); इसका आउटपुट ऑब्जेक्ट (ज़ेंड_फॉर्म_ एलेमेंट_टाइट) # 13 (26) {["सहायक"] = & gt; स्ट्रिंग (8) "फॉर्मटेक्स्ट" ["_allowEmpty": संरक्षित] = & gt; बूल (सच) ["_autoInsertNotEmptyValidator": संरक्षित] = & gt; Bool (true) ["_belongsTo": pro ... और इतने पर ..... क्या यह $ client_el चर को Zend_Form_Element_Hidden में कनवर्ट करना संभव है ?? यदि हां, तो कैसे?

how to check PayPal user incoming transaction limits -

I have developed a crowded platform. I would like to check whether the person's PayPal account is a submission to any project, the limit of any inbound transaction is present. Any ideas on how to get it? Thanks There is no public API for this but to make sure A good option would be whether the received accounts are either premieres or buoys and have verified accounts. You can use the GetVerifiedStatus API for this, beyond that if you receive border issues, then you will be able to provide more support.

neo4j - Difference between Spring rest and Spring Data -

मैं Grails के लिए Neo4j SDN का उपयोग कर रहा हूँ, SDN बाकी और ('org.springframework.data:spring- डेटा-neo4j-rest: 3.2.0.RELEASE ') सरल एसडीएन' org.springframework.data:spring-data-neo4j:3.2.0.RELEASE '

c++ - Boost thread interrupt causes crash on Windows -

The code below causes a crash running on Windows 7. I have tried MSVC2013 x64 and MSVC2012 x86 compilers through Qtrator builder. Causes of both causes An accident occurs when the boost: thread :: interrupt () is called. Error message: #include & lt; Iostream & gt; # Include & lt; Boost / thread.hpp & gt; // A function that prevents weird record_app () {try {while {true} {boost :: this_thread :: interruption_point ()}; }} Hold (...) {}} // should start a thread, wait for one second and then thread int main () {boost :: thread thread (& test_function); Promote: this_thread :: sleep_for (boost :: chrono :: seconds (1)); Thread.in5rupt (); Thread.join (); Return 0; } This Boost version is 1.55 and compiled on my machine, which is with the above two compilers. The error message is reported: C ++ exception in c, flags = 0x1 (execution can not be continued) (first chance): Exception in 0x7fefd44940d, code: 0xe06d7363 \ boost \ boost_1_55_0 \ libs \ Thread \ ...

xml - Where is yearMonthDuration defined? -

XML contains a datatype called yearMonthDuration . Or at least I thought that. If I look at the list of XML datatype, then I can not see it. Duration If I look down further then I can see that there is one. I can not mention the year anywhere If I google it, it takes me to a (non W3C) with its definition, the second Google link indicates on the w3c website on a different standard, exforms. Why is not this the original XML in Imagine? Where is it defined? xs: year-old environment was defined earlier in XPath 2.0 specification ( And related expos such as XQuery 1.0 and XSLT 2.0). It was then transferred as the underlying type of standard XSD, and the exact specification for XPath 3.0 is in reference to its definition in XSD 1.1.

c# - Weird file download behavior in ASP.NET MVC application -

I have an action method in my MVC app that was saved on a file FileResult A basic problem in the database is that for some file types, the file can be returned by requesting a file, even if I have verified that the code in the content column is encoded The right material is made. However, the really strange part is that how difficult it is for me, the reason for this is that the reason for this is. Here are some groups I can not understand: Downloading text files, such as *. Txt and *. Csv gives an empty file, eg a PDF works properly to download It is only on our CI server, and I It can not be reproduced on your local workstation. CI server runs IIS7, while I perform locally on IIS Express which runs with Visual Studio How do I bother this? What could be the cause of this? OK, as the question is written is expected, this problem was very specific, For me, the actual fix for me is probably not interesting though, (hopefully) stumbled upon similar proble...

Getting PottsWheel application for Matlab to create a new model creates an error -

I just installed Potter Voice (latest version) for Matlab (version R2014a) on 64-bit machine. When trying to use the 'new model' button, I get an error that I have pasted below: ----------------- Problem detected in --- ----------------------- 2014-10-17 14:06:01: Reference area of ​​non-structure array The attempt line of 128 PVTFindwith PPMDell 2 CellArray.p Line line 170 PWSAPMODLP line 126 PWCEATOLLLPI line 607 PWCEmedelGuypo line 175PYCEEDMod Elgui.p line 95 GUI_Mainfcn.m line 95pvcredadledelguip Matlab 2014a (MaxW 64) Potter violet 3.1. 0 ------------------------------------------- Because there is no way to apparently access .p files because they are protected. Does anyone know how to fix this problem? .p files have been covered in MATLAB functions (or object type object files). So, you can not edit them. The possibilities are: You should read the documentation carefully and verify that your logic requirements are needed; If # 1 fails, you can contact t...

python - Cannot use parameter with pyodbc when dealing with 4D ODBC Server -

I can not find parametric queries that work with PoddBC and 4D Here is an example of simple and basic code (mySQL database) working through). Table B has two columns without any interruption. import pyodbc con2 = pyodbc.connect ('dsn = CRIPI-4D'); Cur2 = con2.cursor (); Keymap = {1: ('Aahah', Datamimett (1990,1)), 2: ('BCDFgh', Datetime Datete (1992 -2.1)), 3: ("aaa% 'aa', Datetime .date (19903,1)}; For Came: v = (K, kemap [k] [0]); Cur2.execute ("B (number, text) include values ​​(?,?); "V"; I always get this error message: traceback (most recent call final): file "D: \ jlandercy Include in the Or, that connection has failed, but if I have a select this works if I am doing wrong. Did you ( ) Instead of creating an object, have tried to enumerate the mapping? / P> For Cam: include cur2.execute ("b (number, text) values ​​(?,?);", K, keymap [k] [0]);

jqgrid column resize after manually width change -

I have a function where I manually set the width of the jqgrid column if I I want to use it to resize handle, so it adds relative or sub-all to the size of the original width. So it does not see my new width to take it as a base. I've tried putting width and withOrg without any success code model . I have a click handler in which I resize it, a column for a certain width on click. I have set the width of the trust js th . After this I want to be able to use the .ui-jqgrid-resize element to change the size of the column. A small version of my code, say th is 200px wide: $ ('and'). Dblclick (function () {$ (this) .wid ('100px');}); After the user double-clicked, and the th size went to 100px in small, using the user resize handle th 10px for. Expected result is a th of 110px wide, but jumps to widen th to 210px . It adds 10px , the user wants to add to the original state, not the state I have set with DoubleClick. I want...

Android JSON fetching - No value for (value) eventhough the value exists -

Image
I have a valid json link, and I want to get data from it. This is mine code to get the data: try {JSONObject topicsObject = new JSONObject (getTopicsJSON); JSONArray theme = themeobject.gatejsnare ("topic"); For (int i = 0; i & lt; topics.length (); i ++) {supertrryranoptic stt = new supertraneropic (); JSONObject sub_topic = topics.getJSONObject (i); JSONObject theme = sub_topic.getJSONObject ("theme"); ...} On the last line of the code, I get an error saying that org.json.JSONException: There is no value for the subject. The following screenshots show that this is not correct, as I have received the log-ed JSON, and you can clearly see that there is a topic "topic" there: First log of full Jason reaction The first part presents, and the second subject is the subject matter itself. Here is the second screenshot of the JSON format taken from your browser: You can see that the "topics" and "meta" objects are a...

php - file_put_contents adds "0" not string -

What would be the reason that file_put_contents will add 0 instead of string? It adds a 0 file to each attempt. So on the third attempt 000. $ masterpostEntry = $ heading "~" $ Filetitle; $ File = "../posts/master-allposts.txt"; $ Current = file_get_contents ($ file); $ Current = $ MasterpostEntry + "\ n"; File_put_contents ($ file, current $); The resonant of $ masterpostEntry shows the correct result: CSS-only solution for UI tracking ~ css-only-solution-for-ui-tracking Although the content of master-allposts.txt is: 000 . concatenates, + is arithmetic: $ current. = $ MasterpostEntry + "\ n"; ^ --- You are adding "two strings", so PHP converts them into integers unless there is a few digits at the beginning of any of the strings in those stars. It will be equal to: $ current. = 0 + 0;

powershell - SharePoint user permissions headache after site collection restore -

एक SharePoint 2013 स्थापना एक विकास प्रणाली (हमारे जीवित वातावरण से क्लोन) के रूप में चल रहा है। यदि मैं एक नया साइट संग्रह बना और प्राथमिक और द्वितीयक साइट संग्रह प्रशासक को क्रमशः sp_farm और sp_admin पर सेट किया है, तो मैं इन दो खातों में से किसी एक का उपयोग करके वेबसाइट को देखने (देखने) में सक्षम हूं - महान हालांकि, हमारे लाइव SharePoint फार्म से हमारे डेवलपमेंट सर्वर में एक साइट संग्रह (PowerShell Restore-SPSite का उपयोग करके) को पुनर्स्थापित करने के बाद, ऐसा लगता है कि पुनर्स्थापित संग्रह पर अनुमति के साथ कुछ अजीब हो रहा है। सबकुछ ठीक विन्यास के अनुसार दिखता है, उदा। दोनों sp_farm और sp_admin साइट पर पूर्ण नियंत्रण के साथ स्वामी समूह हैं। मैं sp_farm का उपयोग कर ब्राउज़र ठीक से वेबसाइट के माध्यम से भी पहुंच सकता हूं समस्या यह है कि किसी कारण से मैं sp_admin का उपयोग करके साइट तक पहुंच नहीं सकता हूं। साइट संग्रह के लिए व्यवस्थापक के रूप में सेट होने के बावजूद "मुझे क्षमा करें, यह साइट आपके साथ साझा नहीं की गई है" - मुझे सामान्य संदेश से बधाई दी गई है। मुझे लगा ह...

Git push/pull fails on GitLab in Google Compute Engine -

Image
I have installed GitLab on Google Compute Engine using Click to deploy "Project Interface". Deployment succeeds after a few minutes. I can do SSH in the example, and hopefully suck around it. I can also log in to GitLab using the web interface, and I can add the SSH key to my profile. So far, so good. However, when I tried to push a new instance repository or draw, I get this message: Permission denied (Prkashniki, Jisapiai-Keaks, Jisapiai-of-Mike) Fatal: Could not be read from the remote repository Please ensure that you have the right access rights and the repository is present. I removed my local SSH configuration so it does not interfere. Do I need to setup some type of SSH tunnel? What I'm missing Update: Delete your local ~ / .ssh folder, and create an SSH key (which I have added to my profile in GitLab). Does the following error: Disconnected from {GITLAB_IP_ADDRESS}: 2: Too many authentication failures for GIT fatal: Could not read from the remo...

knockout.js - KnockoutJS data-binding use instanceof on RequireJS modules -

I am creating a set of requiredJS AMD module objects. I define my module: define (["Libs / Knockout",], function (to) {MyModuleClass = function () Content *}} MyModuleClass;};); In my view (HTML), I have data binding: The goal is to show markup when samples are an example of MyModuleClass Otherwise, I do not want to show that markup This problem occurs because: Because of me ViewModel is using RequireJS to load MyModuleClass as a scope variable in my ViewModel, There is no reference to MyModuleClass in Knock OutJS bond. This may fail in data-bound because the MyModuleClass is undefined within that radius. MyModuleClass also has other modules that get from it, so the call of the example is quite important as it still wants to get hair stuff from MyModuleClass to pass the data-band. Are there any recommendations for solving this problem? I can create computable variables which I can turn off. Observations of those calculations can use an example logic, whi...

vb.net - Get folder name in specified directory? -

एक निर्देशिका में स्थित एक फ़ोल्डर है, इसे C: \ users \ उपयोगकर्ता \ AppData \ Roaming \ Mozilla \ Firefox \ Profiles \ यह हर उपयोगकर्ता पर अलग है, उदाहरण के लिए 1ITuum9.default नामित फ़ोल्डर। यह बिना किसी भाग्य, यह संदेश खाली है। मंद फ़ाइल पथ के रूप में स्ट्रिंग = "% Appdata% \ मोजिला \ फ़ायरफ़ॉक्स \ प्रोफाइल \" नई IO.FileInfo (फ़ाइलपथ) के रूप में मंद संदेश। संदेश। ) निर्दिष्ट निर्देशिका में फ़ोल्डर नाम प्राप्त करने का सही तरीका क्या है? आप यह कोशिश कर सकते हैं: मंद फ़ाइल पथ के रूप में स्ट्रिंग = पर्यावरण। GETEnvironmentVariable (" appdata ") & amp; "\ मोजिला \ फ़ायरफ़ॉक्स \ प्रोफाइल \" नई आईओ के रूप में दिये। डायरेक्टरीइन्फो (फाइलपेथ) संदेशबॉक्स। (डा। गेट डायरेक्टरीज () (0) .नाम) अगर वहां से अधिक है एक डायरेक्टर की तरह कुछ की आवश्यकता हो सकती है: आईआई के लिए प्रत्येक डायरे के लिए। डायरेक्टरी इनफ़ोर्स में di.GetDirectories () ListBox1.Items.Add (Dir) अगला संपादित करें: फिक्स्ड कोड लाइन 1 - टिप्पणियां देखें

python - Lock a choice in PyQt4 QComboBox using a QCheckBox -

I'm starting to write a GUI using PyQt4 . This is my first experience with GUI (and oo-programming is something new to me). The part of that GUI will be as 4 to 5 examples of QComboBox , as many options are being prepared, I want the user to be able to lock an option, such as later that is not changed inadvertently is being done. PyQt4 import QtGui, import QtCore class MyGui (QtGui.QWidget) sys: def __init __ (self): QtGui.QMainWindow for a QComboBox I code that I wrote Can solve the problem with .__ init __ (self) self.resize (250, 50) widgets # vertical layout for self.vbox = QtGui.QVBoxLayout () self.setLayout (self.vbox) # with some options Create a combo box self.combo_color = QtGui.QComboBox () self.vbox.addWidget (self.combo_color) item = 'red yellow Purple'.split () self.combo_color.addItems (items) self.connect (self.combo_color, QtCore.SIGNAL ('active (QString)', self.use_choice) # that was shown (concurrently The nation) combo like self.checkbox_...

c# - How to Fire an event when mouse points to the top location of the window? -

Image
नमस्ते मैं एक WPF अनुप्रयोग विकसित कर रहा हूं जहां मुझे डॉकपैनेल खिड़की है, लेकिन यह केवल तभी दिखाएगा जब माउस उस स्थान को इंगित करेगा, (ठीक इसी तरह विंडोज 8.1 शीर्षकबार की तरह, जहां आप शीर्ष पर अपने माउस को इंगित करते हैं, क्रॉस बटन और कम से कम बटन आते हैं), अगर माउस खिड़की की ओर और दूसरे स्थान पर निकलता है बाल तत्व & lt; StackPanel & gt; संपूर्ण विंडो को कवर करेगा और डेटा दिखाएगा, लेकिन जब भी माउस ने यूआई के शीर्ष स्थान को इंगित किया है, मुझे हेडर प्रदर्शित करना चाहिए मैंने अपने विचार से एक छवि संलग्न की है कोई भी कुछ सुझाव दे सकता है? बहुत सारे Googling के बाद मैंने पाया कि स्क्रीन रिज़ॉल्यूशन प्राप्त करने और खिड़की की ऊंचाई और चौड़ाई से घटाना मुझे इच्छा परिणाम देगा। लेकिन मुझे लगता है कि यह अंतिम समाधान नहीं है, एक अन्य तरीका होना चाहिए। सुझाव दिया है कि मैंने इस तरीके से कोशिश की & Lt; ग्रिड एक्स: नाम = "gdMainWindow" & gt; & LT; Grid.RowDefinitions & gt; & Lt; रोडिफ़िनिशन ऊँचाई = "20" / & gt; & Lt; रोडिफ़िनिशन...

sql - Using Multiple CASE Statements -

Is it possible to use multiple CASE statements to return the side-by-side (same line) results? I have read through many related posts, but it does not appear particularly addressed. I have 2 sample tables: Transactions Rowwide Tracks No. 1 12345 2 23456 3 34567 4 45678 5 56789 6 67890 7 78901 and document RowID TrxNo DocNo 1 12345 1 2 12345 2 3 12345 3 4 23456 1 5 34567 1 6 34567 2 7 45678 1 8 45678 29 5678 9 1 10 56789 2 11 56789 3 Based on these tables, this query SELECT T.TrxNo, is the case when D.DocNo = 1 then D.DocNo else 0 end Doc1, as the case when D.DocNo = 2 then D.DocNo or 0 end Doc2, as the case when D.DocNo = 3 then D.DocNo or Doc3 FROM [dbo] as the 0 end. [Transaction] Join T upper part [DBO]. [Document] D on D. TRCNO = T. TxNo Returns Trucks No Doc 1 Dock 2 Doc 3 12345 1 0 12345 0 2 0 12345 0 0 3 23456 1 0 34567 1 0 0 34567 0 2 0 45678 1 0 45678 0 2 0 56789 1 0 56789 0 2 56789 0 0 3 67890 0 0 78901 0 0 I do it TrxNo Doc1 Doc2 Doc3 12345 1 2 ...

c++ - GTKmm : Encode image in the file? -

मेरे पास यह यूआई है जो जोड़ (* प्रबंधन (नया जीटीके :: छवि ( "image.png"))); लेकिन ऐप इसे हर हार्ड ड्राइव पर हार्ड ड्राइव से खींचा जाता है, और अगर यह नहीं है तो यह टूटा हुआ है, आदि। मैं छवि कोड कैसे एन्कोड कर सकता हूं ताकि मैं इसे कोड में भेज सकूं ? इस के लिए GResource बहुत उपयोगी है यह आपको * .gresource.xml फ़ाइल में संसाधन फ़ाइलों (जैसे छवियों) की सूची देता है। Glib-compile-resources उपयोगिता इसके बाद से एक। सी फ़ाइल उत्पन्न करती है, और आप उस फ़ाइल को अपने आवेदन में लिंक करते हैं। आपको ऐसा कुछ करने के लिए कुछ मेकफाइल.एम परिवर्तन की आवश्यकता होगी, लेकिन आप कुछ मौजूदा परियोजनाओं में देख सकते हैं, जैसे मेरी ग्लोम प्रोजेक्ट: आप एपीआई का उपयोग कर सकते हैं Gtk :: Image :: set_from_resource () के रूप में। या आप सीधे g_resources_open_stream () जैसे एपीआई के साथ डेटा प्राप्त कर सकते हैं या यहां तक ​​कि g_resources_enumerate_children () के साथ सभी उपलब्ध संसाधनों के माध्यम से पुनरावृति कर सकते हैं। मेरे Glom प्रोजेक्ट से कुछ प्रासंगिक कमोडिटी यहां हैं:

java - Customize Spring Security Authentication -

I am trying to integrate spring protection for my entry form, and I have trouble understanding how spring Security validates a database: So I have configured spring protection like this: & lt; Http auto-config = "true" use-expressions = "true" & gt; & Lt; Intercept-url pattern = "/ login" access = "permitAll" /> & Lt; Intercept-url pattern = "/ logout" access = "permitAll" /> & Lt; Intercept-url pattern = "/ denied" access = "harol ('' ROLE_USER '')" /> & Lt; Intercept-url pattern = "/" access = "hirol ('ROLE_USER')" /> & Lt; Intercept-url pattern = "/ user" access = "harol ('' ROLE_USER '')" /> & Lt; Intercept-url pattern = "/ admin" access = "harol ('ROLE_ADMIN')" /> & Lt; Form-login login-page = "/ login" authentication-failur...

android - JQuery Mobile swipe event only firing every other swipe -

I've set a Swaipbav event in my app to move between form fields all fields dynamically generated , So I'm not swapping between pages, I am clearing and reproducing all DOM elements. The problem is that the swipe event only swipe on the page every other time or if I touch or tap anything on the page. Sets Here is the code that event: $ (document) .delegate ( "# scorePage", "pageshow", function () {$ .event. Speshlkswaipkscrolsupreshnthrasold = 10; $ Kiventkspeshlkswaipkhorizontldistansetreshold = 30; $ Kivent Kspeshlkswaipkdursntreshold = 500; $ Kiventkspeshlkswaipkverticodistansetrsold = 75; $ ( '# Divfu' ). on ( "Swaipbaut" swipe Lenfthandlr); $ ( '# divFoo'). on ( "Swiperight" SwipeRightHandler); Talikakriatt (symptoms [0] .keyboardID);}); For reference, tableCreate is a dynamically generated to put the table in the divFoo which can take a user here Event code is: Function Swipe Life Handler () {$ (...

c# - Where should the thread / task be started to see if you are still connected to a device (model or viewmodel)? -

I have a C # / MVVM application that works with a device. This device needs to be constantly checked to connect / disconnect the device. I was given a code that starts a thread (USB connection code project) that will constantly try to see if the device is connected or not. It will then use the callback to view modal to set the properties needed to be set. But should the ViewModel thread not start and then call the appropriate methods "USB connection code project" to check it? If I keep the thread in the model, then reading the other thread should probably use INOTifyPropertyChanged instead of the representative / callback .... right? In the current code absolutely is correct. There is absolutely nothing to check for a USB device, with view or logic; So this model is in. The utility INotifyPropertyChanged is really painful, and is not very clearly obvious. A representative or event callback is a completely proper notification mechanism to tell the model to...

SharePoint 2010 change list permission -

I have a SP list contained in the web and when the web provides an event receiver then list using this code Changes permissions: [...] SPList theList = Web List [listName]; TheList.BreakRoleInheritance (wrong); SP Group Group = Web. Group ["my group"]; SPRoleAssignment ra = new SPRoleAssignment (group); SPRoleDefinition role def = web Reel diners GetByType (SPRoleType.Contributor); Ra.RoleDefinitionBindings.Add (roleDef); List.RoleAssignments.Add (ra); List.Update (); In the workflow I need to change the permission for the group of readers instead of the contributor. I have used the following code: SPList theList = Web.Lists [listName]; Leading (SPRoleAssignment Assignment in List Resolutions) {If (Assignment .member == "MyGroup") {Assignment.rollditionBinding. Removalal (); SPRoleDefinition rda = web.RoleDefinitions.GetByType (SPRoleType.Reader); Assignment.RoleDefinitionBindings.Add (RDA); }} Although this code is not working and does not change th...

javascript - Angularjs grid selectedItems always returning undefined? -

Will not show angularjs grid in my sample? This is, any time I try to try the selected references, I get "undefined". I have tried in Chrome and IE with the same result. I have made a planker that is not the "original" item on the coiler grid page. Plnkr: Relat code: $ scope.gridOptions = {data: 'myData', selected items: $ scope.mySelectionChoiceChangeChange: function (line, event)) { If (row.selected) {Warning ('items selected' + $ scope.mySelections); Warning ('items selected' + $ scope.gridOptions.selectedItems)}}}; When trying to evaluate the selected items, I get "undefined", either directly through $ scope.mySelections or the grid. I have put "debugger"; Checked lines and values ​​in "If" - no selected item properties appear on the grid? (Edit: ** Removed from code block **. Forgotten that you can not code boldfox you have forgotten to start your $ scope.mySelections property I Becaus...

python - Save BLOB into MySQL using web2py -

Using the Web2py Framework I want to select a file through a file type input and save it to a MySQL BLOB type field. The file contains binary data. I need to use DAL for connection management, but I have a SQL process to work with me. The problem is that when I try it down I get error for SQL syntax Meets. f = form.vars.element.file.read () db.executesql ("some process (" F + "');") I have tried to insert raw binary in several ways and get the same or similar error. I have also tried to use MySQLdb directly: f = form.vars.element.file Read () db.cursor (). Execute ("call some process ('" + f + "');") Db.commit () This works perfectly but I have to use the above DAL version Is required so that the problem is still open. I have spent 3 days without this destiny. :( Please help! I'm not sure why your second example works That the DAL.executesql method eventually calls the cursor (.) Execute exactly the same wa...

java - Parse binary string as byte in JavaScript -

Is A binary string like "11100011" to me and I have to change it in a byte wish I have Java is a working example below: bytes B1 = (byte) integer. ParseInt ("11100011", 2); Println (b1); Here the output will be -29 . But if I wrote down some of the same code in JavaScript: parseInt ( '11100011', 2); I get an output of 227 . Why should I write a JavaScript code to get the output similar to Java? As Java bytes , two signatures, The one which is negative is the highest bit 1. Javascript is interpreting it as unsigned, so it is always positive. Try it: var b1 = parseInt ( '11100011', 2); If (B1> 127) B1 - = 256;

java - RFT does not recognize webelements -

RFT test object is not able to identify individual web elements in any browser. So far tested in IE9 and Chrome 32.0 . I have tried to clean all Java versions but it does not work. It works in my laptop with the same settings, but not in my desktop. Any thoughts My RFT version: - 8.5.1 IE version: -9 Java version installed in machine: -1.7.0_60-ea . Class for something like "Html.A" for links to property when the object inspector shows only screen coordinates. But Is the browser competency test passed? Is the issue seen on a specific site or a website? If there is a problem with all sites then I suspect that this browser is a potential problem. [Java needs to be enabled to enable the browser]. In addition to IE Tools> Ads, make sure that RENJIE IENBABLE class is enabled. Check the next general plugin in the Java Control Panel under the Advanced tab. It should be unchecked Check browser zoom level (this should be 100%). And where do you spit ....

sql server tlogs backup -

In my scenario I had a log shipping configured between two SQL servers and due to a problem the restoration was stopped a few days ago I went. Since the retention period is over and the net work has already deleted the logs from the primary server, so I can not drag the log to sync the primary server. My question How can I toggle backup from primary SQL Server for a specific period? For example, from the time of failure, it calls on (October 15th) to the present time (17 October 10 p.m.) manually. I do not want to take a differential backup or complete backup and restore it as secondary server, so I have to delete and redo the log shipping configuration. Unfortunately, you are going to pull another full backup of the database again and start it for secondary You can potentially disable the log shipping job, can run full backup, can be restored with the Norwari, and can re-enable log shipping job. I did it with Red Gate SQL backup, do not break the full backup restore l...

sql - Get all subids of mysql child nodes -

हमारे पास mysql तालिका है जहां हमारे पास है id | माता-पिता | मद कहते हैं कि मेरे पास एक id = 4 मुझे सभी आइटम प्राप्त करने की आवश्यकता है parent_id = 4 मुझे सभी उप-प्रकारों की आवश्यकता है, जहां parent_id IN (आईडी i मी उठ गया) फिर से 6 स्तर तक > किसी भी विचार कैसे एक क्वेरी के साथ उन लोगों को पाने के लिए? आपको चाहिए कम से कम आपके लिए काम करने के लिए किसी से पूछने से पहले यह प्रयास करते हैं, लेकिन ऐसा कुछ काम कर सकता है ... SELECT SELECT * T1 INNER तालिका T2 ON t1.id = t2.parent_id, ... INNER तालिका T6 पर t5.id = t6.parent_id जहां T1.id = 4

php - Laravel - How to use a vendor class? -

I want to use mobile detection on m routes.php file. I compose the package Added as required in JSN and it is installed in the vendor file. How can I use it now? I tried this answer and there was no luck because the class was not found: {"name": "laurel / larval", "description": "larval framework "", "Append", "app", "app", "app", "app", "app" Model "," app / database / migration "," app / command "," database / seeds "," ap / test / tests.cf "]}," script ": {" post-install-CMD ": [" Php artisan spot "PHP-Artisan Optimization"], "Post-Update-CMD": ["php artisan clear-compiled", "php artisan optimize"], "post-project-CMD": ["php artisan key: generated "]", "Config": {"prefer-install": "dist"}, "minimal stabi...

ios - Custom Cell - Change color of background and button in custom cell -

I have a custom cell that I made in IFFFSBiller and connected to my .h file. And then in my customLM file, I have to compile the @implementation TwoMealsTableViewCell @ daylabel, First MealBtn, secondMealBtn, indexPath; - (id) initWithStyle: (UITableViewCellStyle) style reuseIdentifier: (NSString *) reuseIdentifier {self = [super initWithStyle: style reuseIdentifier: reuseIdentifier]; DayLabel.textColor = [UIColor orange color]; If (self) {dayLabel.textColor = [UIColor orangeColor]; } Healthy return; } - (zero) set selected: (BOOL) selected animated: (BOOL) animated {[Super set selected: selected animated: animated]; // Configure the view for the selected state} @end And I have all the set up in the table view, and I see buttons and labels, but I do not think Why is it This cell color will change dayLabel.textcolor = [UIColor orangeColor];

java - How do I properly add a 'Z' at the end of a datetime that's marshalled by Spring MVC with JAXB? -

I have a DateTimeXmlAdapter that I am using to convert Joda strings into strings. It looks like this: Public class DateTimeXmlAdapter XmlAdapter extension & lt; String, DateTime & gt; {Private Stable Last String Pattern = "Yyen-MM-DD'THH: mm: SSZ"; Private stable last datetimeformer format = dateTime format.parten (petron); @ Override public datetime unskilled (string value) {return format. Paracetate Time (value); } @ Override public string martial (date time value) {return formatter.print (value); }} This results in the following string in XML: 2014-10-16T18: 31: 57-0400 However, the end point I'm sending it to expect of a 'Z' instead of -0400 at the end. They recommend switching to UTC, so there is no need to send information from time to time. makes sense to me. However, I can not seem to come to the end of the 'jade' as long as I will tell it literally: private static last string PATTERN = "yyyy-MM- Dd'THH: mm: ...

jsf - PostConstruct methos called again with richfaces 4.2 , works fine with myfaces -

I see in a page with various forms and many variations. Here is my backing bean: Import javax.annotation.PostConstruct; Import javax.faces.bean.ManagedBean; Import javax.faces.bean.ViewScoped; @ManJaddbeen @Vivascope Public Class Multiform Bean {String Input Text 1 = ""; String input text 2 = ""; @PostConstruct Public Zero initializeBean () {System.out.println ("PostConstruct call ------------------"); } Public string getInputText1 () {inputText1; } Public Zero Set InputText1 (string inputtext1) {this.inputText1 = inputText1; } Public string getInputText2 () {returnText2; } Public Zero Set InputText2 (string inputtext2) {this.inputText2 = inputText2; } Public Zero doSubmit1 () {inputText2 = inputText1; } Public Zero doSubmit2 () {inputText1 = inputText2; }} When I use the following XHTML, click Submit and Submit 2, at any time, you will not call the Post Editor at any time: & lt; A: Body & gt; & Lt; H: form id = "first form...

c# - Bind drop down list to calendar with conditions -

I'm new to ASP.NET and C # and I'm having trouble completing a project. I am trying to create a page where a user can select an item from a drop-down list, which has four options, each option is linked to specific days and times of the week. I am trying to do this, when a user selects an option where the specified days are Monday, Wednesday and Friday, so that it makes such a so that the related calendars are selected only on Monday, Wednesday or Friday. Allows There is no way in which you want to do it. Check out some JavaScript calendar pickers that can be configured which only allows a few months and uses it at the front end.

osx - sass source map issues on OS X Yosemite -

I recently was updated on OSX Yosemite and now, when I run the wand and in my project sass file If I make the changes, then I get the following error: WARNING: Error: Error generating source map: could not set public url for source stylesheet. There is no file name available so there is nothing to link to the source map. Use standard input - for trace backtracks Use to continue - Force I have not made any other changes in my grunting setup or sauce: dist, dependencies are unchanged and even further. Any help in solving this will be highly appreciated. Thanks! There can be more than one reason in this issue, maybe it will help you. Before starting to collect compiled css! Update content-content-saas for the latest version Need Sourcemap Sass 3.4.0, which can be installed with gem Install Sass Run the hard work and review compiled CSS. When everything is updated, the stream should be automatically created and available. Be sure to check the empty browser cache ...

java - How to split in JtextArea -

Hi, I'm trying to design a GUI to send emails I can send an email to Comandprompt but when I try to do it with a GUI, I can not divide my email It is that if I write xyz@gmail.com Yes, ABC @ gmail.omo My email is not sent I used Java split in the command prompt code and it worked but it does not work in GUI Can anyone tell me How can I use commas to separate two entries in Java Testeria? / P> if (! C.isEmpty ()) {string [] ccsplit = c.split (","); String [] ccsplit = c.split (","); For (int i = 0; i & lt; tosplit.length; i ++) {sendToServer ("RCPT TO:" + ccsplit [i]); ReceiveFromServer ();} This code worked for comand promt..but now it does not work for JTextArea Your code should look like this: JTextArea textArea = new JTextArea (); String c = textArea.getText (); If (! C.isEmpty ()) {System.out.println (c); // Check the value of C string [] ccsplit = c.split (","); For (int i = 0; i & lt; ccsplit .length;...

ruby on rails - How to get the scoped attributes when creating a new object through a has_many association -

एक has_many एसोसिएशन जैसे user.first.books.create के माध्यम से ऑब्जेक्ट बनाते समय! (...) , नई किताब को user_id को संघ से स्वचालित रूप से मिलता है। क्या उस user_id प्राप्त करने का कोई तरीका है? अगर मैं अपनी खुद की विधि बनाने कॉल? I.e. उपयोगकर्ता.first.books.own_create_method def self.own_create_method # उपयोगकर्ता ऑब्जेक्ट कैसे प्राप्त करें? धन्यवाद! उपयोगकर्ता को परिभाषित करने के लिए प्रथम। पुस्तकें। उपयोग करें / उपयोग करें आप उपयोग करेंगे: def self.own_create_method book = build # कुछ पुस्तक जिसे आप बुक बुक के साथ करना चाहते हैं। सविता एंड स्व। आपको रूबी में वर्ग विधियों को परिभाषित करने की अनुमति देता है।

java - How to use different log4j2.xml files for different webservices -

I am switching to log4j2 and how to use different log4j2.xml files for different webservices. I am using WebSpace 8.5. For example: I have 3 web servers (YS1, YS2, and WS3) with 3 different log files (WSG1, WSO2, YSOL3). 3 different logs such as 4 J2 configuration files (with different names or with different names with different names, but in different directories) In Log4j1.x I can use PropertyConfigurator to specify path and filename to specify log4j1.x. It is not available in log4j2I created the log4j.configurationFile system property but it only allows me to specify the path and file name of a single configuration file. Thoughts? thank you in advanced. You can make separate log4j2.xml configurations in separate web applications (war files). You can only have one log4j2.xml configuration in the same web application.

Android fragments xml crash -

Image
When I change my set content view to an XML layout and I'm not sure what's wrong, two pieces in the program There is a list view on the left and a web view on the right when it is in the scenario and is considered to be the only list in the picture, sorry for all the code, I have not yet figured out what is happening. This is my main activity the expansion of the public class main activity activity (static final string LOGTAG = MainActivity.class.getSimpleName () + "_TAG"; static resources mRes = Faucet; Fixed fragment manager mFrgmntMngr = faucet; static main activity M itAct = null; @ override protected form to zero (bundle saved instenstate) {super.Nocrat (saved instenstate); FragmentManager.enableDebugLogging (right); setContentView (R) .layout.activity_main_1view); MRS = Miller Resource (); MFrgmntMngr = ge TFragmentManager (); MThis act = it;} Static Boolean InlandScape Orientation () {return is mRes.get configuration (). Orientation == Configuration Or...

python - How do I embed an Ipython Notebook in an iframe (new) -

I have successfully achieved this using the method documented on it. However, it was supposed to edit the required user config file, I was actually expecting to be able to set it through the command line (for reasons). This indicates that the configuration is possible through the command line. However, all examples are for simple truth / incorrect value assignments. To set the server to allow embedded, it is necessary to set a value inside a dictionary. How can I pass an dictionary through the command line. Another acceptable option would be configuration overrides. Some people will be surprised - why is this all upset? !! First of all, it is not for production. I am trying to support non-developers by writing web-based applications that integrates iPathan notebooks via IFrame. Regardless of being on the same machine, it seems that the use of different port numbers used means that I can not do simple iframe embedding without installing X-frame insecurity bit. Being able...

asp.net - How do I do an EF Database.ExecuteSQLCommand async? -

Here is the code that I am using: for work Can anyone confirm that this is the correct way to use ASC? Specifically I need to do this: Full results = db.Database.ExecuteSqlCommand (sql, parameter); Wait db.SaveChangesAsync (); Note that the code works, but I am having a problem with my application where it stops without any error message. I am looking into every possible problem. / P> What is being saved here? I think there is no need to make calls to save changes here. Remove the save changes and you will see the same behavior because any changes you make in your stored procedure are not tracked by the outline of the unit. And you can rewrite your code as the following: integer result = wait db.Database.ExecuteSqlCommandAsync (SQL, standards); Did you find out because of your problem? Windows error logs etc? Go to the Visual Studio IDE debug menu, and if there is an open exception, then check 'Share language order exception' for both 'th...

ios - How align 2 buttons in a row using auto layout? -

Image
Actually, I want to align 2 buttons in the same line, such as approximately 1/3 of the buttons and edges between the edges The distance, like the following picture: However, what's inside the simulator: There are restrictions added for each button : Text "itemprop =" text "> View should use: kind of compulsion F: | [Spacer 1] [button 1 (120)] [spacer 2 (== spacer 1)] [button 2 (120)] [spacer 3 (= = spacer 1)] |

php - Laravel, any tips on how to load a specific controller or way to load a function -

Image
I am creating a control panel to show online players count, online players rely on my Twitter Bootstrap Navbar Keep me the image above is an example of what I want . I am using Laravel's cache to reload the online players for every 3minutes, and my current method of loading online players is that each controller has loader, any suggestions ? Is there a better thing / way to do this? Is it able to do this? Or even see?

security - How to disable SSLv3 protocol in Apache ActiveMQ? -

I want to disable SSLv3 protocol in Apache ActiveMQ. The relevant information here can not be found here: The above link only shows how to configure ciphertes There is a competent protocol option that you can use on the transport connector. You can not go out, but you can choose a valid protocol. transport.enabledProtocols = & lt; Separate list of CSL / TLS protocol comma & gt; Therefore, only one TLS "default" transport connector should look like this: & lt; Tronsportknector name = "SSL" URI = "SSL / /0k0k0k0:6l6l8?tronsport.anbledprotocols=tlsvl,tlsvlkl,tlsvlk2∓mp;mksimumknekshns=l000∓mp;vireformatkmaksfrmesize=l04857600"/>

angularjs - Auto focus on latest input element -

I was developing a module where I need to manually create some text input (on entry or on the button) Clicking) and input after immediately adding it to the Auto Focus list. So far the function works, but when I open the console log, then the $ progressive digest error appears beforehand is strange but if I delete some $ eval or $ then the code works Will not Here is my plnk demo for your reference: function keyEnter ($ document) {return (limited: "A", scope: false, link: function ( Radius, elephant, ethers) {ele.bind ("keydown keypress", function (event) {if (event.which === 13) {radius $ applied (function () (scope. $ Eval (attrs.keyEnter) ;}}};}}}};}}} Custom_outofocus function {return: 'A', link: function (region, element, ethers) {radius. $ Clock (function () {return area. $ Eval (attrs.customAutofocus);}, function (NewValue) {if (newValue === true) {element [0]. ();}}};}};} I followed the auto focus on this, it does not show any error, ev...

arrays - Javascript Object Cloning in Higher Order Functions -

I am very new to javascript and I'm working through fine javascript (2) practice to learn more I am A special exercise () is giving me so much trouble. The purpose of the exercise is death date for various things, in which according to the date of death, the date of death is different for different types of people according to the centenary. This is what I have done so far: function groupB (array, groupof) {var groups = {}; Array.forEach (function) {var groupName = groupOf (element); if (group name in group) group [groupName] .push (element); other group [groupName] = element;}); Return group; } Var byCentury = groupBy (Ancestor, Work (person) {return Math.ceil (person.died / 100);}); I believe the problem can be reduced by this line: group [groupName] = element; But I do not understand why this is wrong. Thanks for the help, if it is clear then I apologize in advance. You need to create an array in this line groups [GroupName] = element; Instead you are ...

node.js - nodejs v 0.11: cannot build native extensions for websockets -

I just upgraded the version of my node in v0.11.4, and now my NPM installation websocket fails to create inexperienced extension error The top part of the output is below Is anyone seen this? websocket@1.0.8 install / home / akonsu / projects / myproj / node_modules / websocket node install.js [ Websocket v1.0.8] Attempts to compile native extensions Child_process: CustomFds option is disliked, instead use stdio: Directory `/ home / akonsu / projects / myproj / node_modules / websocket / build 'cf (target) release / obj.target / validation / src / validation.o ../src/validation.cc:117:34: Error: 'Arguments' is not a type of permanent handle name (const argument & amp;) ^ ../src/validation.cc:117:45: Error: ISO C + + 'The forbidden declaration of' Args' without any kind [-fpermissive] stable handle new (const argument & amp;) ^ ../src/validation.cc:125:42: Error: 'logic' is a constant type No to Do not have the name of the name IsVal...

php - Output Mysql Result in Array -

I declare the variable in the $ array my input $ array = array ('5', '4' , '21', '55', '97', '17'); $ Pid = implode (",", $ array); I am processing questions while using PID ** ($ row = mysql_fetch_array ($ result)) {} ** How do I want $ Array = array ("foo" = & gt; "bar", "bar" => "foo",); What can I do for this? Good you want to customize your app separately. Then get the following code Can be useful - $ array = array (); ** while ($ line = mysql_fetch_array ($ result)) {array_push ($ array, "foo", "bar"); } ** And here you can keep your value $ array one by one and the value and value of $ row .