Posts

Showing posts from March, 2011

javascript - Creating a small dialog box inside a page -

Image
What am I trying to do, instead of creating a pop-up page I wanted to create a dialog box with that notification I appear when clicking an image This model The popup content is & lt; Div class = "modal" tabindex = "- 1" id = "mymodal" role = "dialog" aria-labelbedby = "" aria-hidden = "true"> ... pop up content & lt; / Div & gt; 1) $ ('# myModal'). Modal (); (jquery call) 2) & lt; Button Type = "Button" Data-Toggle = "Model" Data-Target = "#MyMold" & gt; Launch Modal & lt; / Button & gt;

Constrained linear least-squares for xA=b in matlab -

Image
मैं xA = b को बाध्य 0 & lt; = x x के लिए मुझे कार्य की तरह और जो ax = b के लिए हल करता है। हालांकि, xA = b के लिए हल करने का कोई अच्छा तरीका नहीं मिल सका। मैं xA = b गैर-नकारात्मक एक्स बाधा? टिप्पणी के रूप में, यह दर्शाता है कि ताकि आप समस्या को हल करने के लिए मानक विधियों का उपयोग कर सकें ए ' और बी' के साथ और उसके बाद उत्तर स्थानांतरित करें।

c++ - Splitting a floating point number almost-equally with no loss -

Assuming 2 digits after the decimal view representation of floating point number (eg: currency), with the most to divide the amount What is the best way to minimize the total error? For example, to deliver 100.00 equally to 3 bank accounts, I do something like this: double amount = 100.0; Double acc1 = zodiac / 3.0; Double acc2 = zodiac / 3.0; Double acc3 = zodiac / 3.0; However, when printing each account balance with 2 decimals, I get: printf ("% .2f \ n", Acc1); Printf ("% .2f \ n", AC2); Printf ("% .2f \ n", ACC3); 33.33 33.33 33.33 It is clear that the amount of all the accounts is 99.99, 0.01 is lost due to rounding. Ideally, I need some functions / algorithms that print almost equally and visually 33.34 33.33 33.33 It does not matter which of the three accounts gets the extra 0.01. How do I do this? Is there a round algorithm name for this? You are creating several errors here double one double-exact Binary is fl

php - Why is my single quotation mark (') not getting encoded? -

I have to change the code for my UITextView text encoded in NSString < / Strong> that I can include in my database with other stuff. This insertion works perfectly well, when there is a single quotation mark ... so it does not work. When I was NSLog encoded NSString , 'was not converted to anything. So when it's going to cause it to be "still have the url is to web server requests that fail ... Why not be the first to encode single quotes? iOS: NSString * encodedString = (NSString *) CFBridgingRelease on my code (I'm not very good with php ) is (CFURLCreateStringByAddingPercentEscapes (zero, (CFStringRef) self.textView.text, zero, (CFStringRef) @ "* '(); [:? @ & amp; = + $, /% #]", kCFStringEncodingUTF8)); NSString * strURL = [NSString stringWithFormat: @ "http://example.org/postText.php?thePost=%@&byUserID=%@&nickname=%@", encodedString, [UniqueUserIdentification getUserID], name]; php: & lt; Php $

installer - Method to Print Custom Exit codes in Innosetup on Failure on DOS prompt -

I have provided it to provide custom exit code for the installer (.exe file) I did this: Method 1: [Code] Process Exit Process (Exhaust: Integer); External 'Extrouse @ kernel32.dll stdcall'; Var1: = 10 if (var1 is not equal to 12; 12) then does not start equal to 12 msgbox (& lt; some messages, mbInformation, MB_OK) ExitProcess (9) end; I have a dos shell script, such as: @echo off my_exe.exe / verysilent if% errorlevel% == 9 (the error of reason given the failure is% errorlevel% exit / b% errorlevel%) Output is: failure given 9 method 2: Now I have used the following code: function GetCustomSetupExitCode: integer; Start the result: = 9th; Var1: = 10 if (var1 <) does not equal 12 to 12 msgbox (& lt; some message, mbInformation, MB_OK) // Exit Process (9) GetCustomSetupExitCode (); End; I used the same doscript. Now in the output I can not get any exit code printed in DOS. In what way is correct. It is safe to use the Exit Process ()

python - Velocity Field line -

Image
मैंने उपरोक्त छवि के वेग फ़ील्ड रेखा की छानबीन करने के लिए कोड लिखा था, लेकिन किसी नतीजे के परिणामस्वरूप अंधेरे का कुल जाल हो गया है क्या कोई मुझे मदद कर सकता है? यहाँ मेरा कोड है। x = linspace (-45, -15,1500) y = लिनसेपेस (-3,9,600) थर (एक्स, वाई, वीएक्स, वीजे) वीएक्स और वीजे एचडीएफ 5 डेटा से हैं और उनके आकार हैं (600 एल, 1500 एल)। या, क्या वेक्टर क्षेत्र को छानने का एक तरीका है जब -25 से -30 से एक्स और -5 से -1 के लिए z अंधेरे की छवि इस प्रकार है: मैंने तब कोड की कोशिश की x, y = numpy। मैशग्रीड (numpy.linspace (-45, -15,1500), numpy.linspace (-3,9,600)) तरकश (एक्स [:: 20, :: 20], y [:: 20, :: 20], वीएक्स [:: 20, :: 20], वीजे [:: 20, :: 20], रंग = 'आर', कोण = 'एक्सआई', पैमाने_अनुमति = 'एक्सआई', पैमाने = 9000000) और छवि इस तरह दिखती है

ruby - Creating XML nodes using Nokogiri -

I'm having trouble creating nodes and adding them to XML files: Lt; Mainnode & gt; & Lt; Secnode & gt; & Lt; Data1 & gt; & Lt; / Data2 & gt; & Lt; Data2 & gt; & Lt; / Data2 & gt; & Lt; / Secnode & gt; & Lt; / Mainnode & gt; I want to add to the file like this: & lt; Mainnode & gt; & Lt; Secnode & gt; & Lt; Data1 & gt; & Lt; / Data2 & gt; & Lt; Data2 & gt; & Lt; / Data2 & gt; & Lt; / Secnode & gt; & Lt; Secnode & gt; & Lt; Data1 & gt; & Lt; / Data2 & gt; & Lt; Data2 & gt; & Lt; / Data2 & gt; & Lt; / Secnode & gt; & Lt; / Mainnode & gt; I'm having trouble with the concept of adding nodes with nokia. This is my current code: def openXML f = File.open ("file.xml") doc = Nokogiri :: XML (f) end DRP parseXML mainnode .name = 'mainnode' f = openXML temp = Nokogiri :: XML :: Nod

MySQL get name of last added value on group by query -

I want to show in the videogame cheats and tips page in an index where all the available cheats are listed, the results are grouped by videogame Doing and counting how many cheats in the video game is counting, I can fulfill it, but I am trying to show the last deceit in the game. My query is: Select a_games.game_id, cheat_count as COUNT (*), a_games.game_fname, a_games.game_logo, a_cheats a_cheats.cheat_title On the left a_games a_games.game_id = a_cheats.game_id group include a_cheats.game_id This only shows the first added fraud. I tried to use the maximum on cheat_id but the value added cheat_title shows the previously added fraud. table a_cheats cheat_id type_id member_ id game_id cheat_title cheat_body cheat_date 1 | 1 | 1 | 22 | Troaks Wei ... | Introduz ... | 2014-10- | 2 | 1 | 1 | 25 | Invulnera ... | Durante ... | 2014-10- | 3 | 1 | 1 | 25 | Modo Debu ... | Durante ... | 2014-10- | 4 | 1 | 1 | 25 | Charm in ... | Durante ... | 2014-10- | 5 | 1 | 1 | 36 | Cab

Using local function parameter inside a while loop - SQL Server -

My inline table function prints numbers from 1 to number which is the input in the function. Since I'm new to SQL Server, I'm not sure how to implement a little loop inside the function. My implementation is as below as expected that I get a lot of compiler errors at WHILE , BEGIN , THEN . Can someone suggest how I can improve the code? Thanks! Build number num_F (@nnn INT) return form in return form (select when @nnn = 0 then more than tap when dbo.num_F (@nnn) & gt; 0 BEGIN Then go to First_Col as DB Num_f (@nnn) SET dbo.num_F (@nnn) = dbo.num_F (@nnn) -1 END as First_Col ASC) Code> is done in the most simple way by using General Table Expression (CTE) class = "post-text" itemprop = "text"> Built-in function Numfunctn1 (@ number INT) return as table return (in the form of CTS (selection 1 came) Mr. union all select ID CTE WHERE id + 1 & lt; @num) SELECT * FROM cte) SELECT * Numfunctn1 (10)

Spring "Integrating Data" Getting started guide - using variables in the integration.xml file -

I have worked through the guide on the Spring website and trying to determine how the configuration settings (the replacement ) In the integration.xml file instead of the hard codes, instead of the different items. This is primarily driven by the desire to exterminate some configuration from XML and takes advantage of the ability to allow for the outer system of Spring Boot. I am trying to determine the solution for some time, thinking that this is a simple answer (for those who know how to know). In the snippet given below (taken from the guide) I have used the $ {outputDir} as a placeholder for the configuration item, I will pass in the application: & lt; File: Outbound-channel-adapter id = "file" mode = "APPEND" charset = "UTF-8" directory = "$ {outputDir}" file name-generator-expression = "helloword" /> Basically, I'm trying to determine what I need to do to get the $ {outputDir} replacement job. I h

Javascript - pull values of an element with matching property in one array and save to another array -

Send me 2 arrays, sendInstalls and sendUsers. Both arrays have a property called objId with values ​​matching two arrays, arrays are not sorted in a particular order What are your requirements? For each element of the sendUsers array, find the element in the sendInstalls array with a matching ObjId property Return the value of the DEVTOKEN property of that element in sendInstalls I tried the following: However, console.log (matchInstall) returns line of 'undefined' instead of line mailing array index. The data is not pasted because this user is sensitive, but is there anything obvious immediately that is wrong with the above? If the data is needed to resolve this, I can try and type a part and update this question. Any help greatly appreciated. Cheers Now you do not mention the structure of your two arrays in your question But assuming that you have defined it correctly and coded it, you probably need to determine the function findwithAttr loop w

c++ - Find the center position of a QGraphicsScene? -

I have tried to use the following code to add a line to my view: line = new QGraphicsLineItem (200,55,200,55); Mscene.addItem (ruler); But it seems that the coordination of QGraphicsLineItem starts at the left corner. I do not want to change the original in any way. I just want to regain the coordination of the position of the center of the QigraphicsScene / Qigraphixview. Which function do I use? line = new QGraphicsLineItem (200,55,200,55); Mscene.addItem (ruler); As a state for this creator of QGraphicsLineItem: - creates a QGraphicsLineItem, (x1, y1) and ( X2, y2) as the default line. This creates a QGraphicsLineItem with local coordinates (200, 55, 200, 55), so the line you are creating Is the beginning and closes the coordinates on the same point (200, 55). Once you create a line object and add it to view, you can make a call to your position. To get the status of the visual center, you can use it and: - // Assume that PSCEN QGraphicsScene line-&

php - Overriding Admin -> Sales -> Orders -> Edit -> Products page in OpenCart -

Image
I am currently working on a refund extension for both Alipay and 99Bill, and all this is done in the admin panel (The user does not see this extension.) I order -> Interesting to add a refund button for Edit - & gt; The page in question is displayed below: / P> I spent some time this page See controller and for (looking at the above URL, this sales sale / order / update), but / admin / sale / order and then The update () function does not appear to relate to what I am changing. I'm very interested in overriding the red button that removes the product order list - I'll add a refund argument there. Can anyone tell me about the model / view / controller for this order -> edit -> product page?

c# - Searching for a specific sound within an audio file -

Looking at a small audio sample, I should get the sound of the same sound inside a large audio file and get their timestamp Will happen. Is there any C library that can do this? Thank you! Looking at one, you can and compare it. You can learn more about Fast Fourier Transform (FFT) This is one and this is it. In addition to

c# - nUnit for methods with 3K-4K LOC -

I recently joined a project that was created without the nUnit or unit testing framework. Now we are thinking The main problem is outlined below 1: Many codes are written in code behind the page. . 2: Our class has ways like 4K-5K LOC 3: The app completely by using XML Is configurable How should we move forward in creating NUIT for applications? Thanks in advance! Technology: ASP.NET 3.5, C # .

R function to assign value based on multiple columns -

I have a function that provides values ​​(cat, dog or hare) in column C of a data frame based on the entry Does the column B: mydf 2 & amp; x <6) y 6) y <- "Rabbit" returns (y)} mydf $ c <- sapply (mydf $ b, myfunction) I would like to write a function that makes the assignment conditional, for example, the value of columns A and B can be in situations: A: the cat has been assigned if only and if mydf $ a == 1 & Mydf $ b == 1; B: Whenever mydf $ a = $ 2 mydf $ b, regardless of value, and when mydf $ a == 3 & Mydf $ b == 5; c: Other cases There is a problem with the syntax, no examples were found from the previous post. you ifelse index end lie- as.character (interaction (mindf, sep =" ")) mydf $ c <- Ifelse (index == '11', 'cat', ifelse (substr (index, 1,1) == '2' | Indx == '35', 'dog', 'rabbit')) mydf # abc # 1 1 1 cat # 2 2 3 dogs # 3 3 5 dogs # 4 4 9 rabbit

java - Why cursor.moveToFirst() should be called while we using cursor? -

इस सवाल का पहले से ही एक उत्तर है: < / P> 5 जवाब शीर्षक की तरह, मुझे लगता है उस बारे में हैरान उदाहरण: यूरी संपर्क डेटा = डेटा.getData (); स्ट्रिंग [] प्रक्षेपण = {Phone.NUMBER}; कर्सर c = getContentResolver ()। क्वेरी (संपर्क डेटा, प्रक्षेपण, रिक्त, रिक्त, रिक्त); c.moveToFirst (); इंट कॉलम = सी.गेट कॉलम इंडेक्स (फोन। संख्या); स्ट्रिंग num = c.getString (स्तंभ); आप query से प्राप्त कर्सर शुरू होता है पहले रिकॉर्ड से पहले। तो इसका इस्तेमाल करने के लिए, आपको इसे कहीं भी रखना होगा।

imagemagick - Correct barrel distortion in OpenCV manually, without chessboard image -

I get images from the camera where it is not possible to take a chess picture and calculate correction matrix using OpenCVI. So far, I have corrected the images using the ImageMagic Converter, change the "Distinct Barrels" option with 0.0 0.0 -0.035 1.1 "'where I got the parameter with the test and error. Now I I want to do this in OpenCV but all I find on the web is automatic improvements using chess image. Do I have any chance to implement some simple manual trial and error lens distortion correction What did I do with the image map? OK, I think I got matrix cam 1 In, the cam2 image center was disappearing (see the documentation). I added it and changed the focal length to avoid a very strong change of the image size. Here is the code: import As NMP import cv2 src = cv2.imread ("deformed image .jpg") width = SRC. [1] height = src.shape [0] distCoeff = np.zeros ((4,1), np.float64 ) # TODO: y Yes add your coefficient! K1 = -1.0e-5; # negative

Strange behaviour when appending items to lists inside dictionaries in python -

इस सवाल का पहले से ही एक उत्तर है: < / P> 2 जवाब मेरे पास एक शब्दकोश अनुक्रमित है 201 पूर्णांक कुंजी (0..200) इनमें से प्रत्येक कुंजी के लिए मान एक सूची है। नीचे दिए गए कोड से उत्पन्न: शब्द = dict.fromkeys (range201, []) जब मैं आइटम संलग्न करने की कोशिश करता हूं तो मुझे यह अजीब व्यवहार मिल रहा है यदि मैं ऐसा करता हूं: शब्दकोष [1] .append ("foo") मैं यह उम्मीद करता हूं : & gt; & gt; शब्दकोश {0: [], 1: ["foo"], 2: [], ...} लेकिन इसके बजाय मैं इसके साथ समाप्त होता है: & gt; शब्दकोश> {0: ["foo"], 1: ["foo"], 2: ["foo"], .. ।} एक संदर्भ को थोड़ा स्पष्ट करने के लिए जो ऑपरेशन किया जाता है, मैं उन मानों की एक सूची को एन्यूमरेट कर रहा हूं जो None या float < / कोड>, मैं कोई भी नहीं छोड़ना चाहता हूँ और float को सूचीबद्ध करने के लिए सूची में जोड़ना चाहता हूं: i के लिए, मूल्य मानना ​​(मान सूची): यदि मान नहीं है: जारी रखें शब्दकोश [i] .append (value) यह व्यवहार स्वतंत्र है ज

grails - app real path issue in spock integration test case -

I am working on a code integration test case using the pdf > Jasper . There is a sub-report in this jusupur. To get the path of sub-report ( abc.jasper in web-app / reports / ), first of all I request. GetSession (). GetServletContext (). GetRealPath ("") returns / home / mkb / workspace / my-project / web-app and then the parent in the JSPR report sub- To get the report, insert /reports/abc.jasper . This is working fine (test-app) while doing test-apo code above code giving / home / mkb / workspace / my-project / target / work / code / code. scriptwriter and so I am getting it net.sf.jasperreports.engine.JRException: resource not found: / home / mkb / workspace / my -project / target / work / scriptwriter / report / abzeser How can I fix or fix this path problem in test cases? Please use the class static method getRealPath () to get the actual path (Grails 2.3.9) ServletContextHolder.servletContext.getRealPath ('/') This

mysql - Unable to fetch the order id through last updated tracking id -

This is the question to fetch order_id from this order's history table $ sql = select "DISTINCT (` order_id`) from `` Dibi_ PREFIX. "Order_history` where Trakkod = '". $ Trakkod. "the"; status ... The order is packaged when the tracking ID is assigned to it and the order_history has been added to the table, if the order has been sent by another courier service, then order another in the order_ history table According to the above given question it will fetch order_id for tracking_no. Even the order history table also changed. Another case: - If the tracking number Wrongly assigned the order and then changed it, so two order_id will be brought through the above question. How can I find the right way to resolve it? order_history The table is like this create table 'order_history` (`order_histo ry_id` int (11) taps Attangrement, `order_id` int (11) NOT NULL, Ordr_stetus_aid` Int (5) narwhal,` Notifik` Tinint (1) is not text NOT N

.net - IP*Works SSH PublicKey Auth with C# -

I'm trying to get IP * Athameed to work certificates, better Pblikki, with SSH / Seksik Works of Everything works fine when I am using simple user / password combination. My Code for the Public: private static void DoSExec () {var sexec = new Sexec {SSHUser = "abc", SSHHost = "someserver", SSHPort = 22, SSHAuthMode = SexecSSHAuthModes.amPublicKey, SSHCert = new certificate (@ "c: \ work \ key.pem"), SSHEncryptionAlgorithms = "aes128-ctr, aes192-ctr, Aes256-ctr, 3des-cbc"}; Sexec.config ("SSHMacAlgorithms = HMAC-SHA1"); sexec.Config ( "SSHAcceptServerHostKeyFingerPrint = C9: C 4: 53: 46: 19: E7: 58: EC: A7: 3d: 29: CC: 42: 87: F 5: a5"); Sexec.OnStdout + = SexecOnStdout; Sexec.OnConnected = SexecOn Connected; Sexec.OnError + = SexecOnError; Sexec.OnDisconnected + = SexecOnDisconnected; Sexec.OnStderr + = SexecOnStderr; Try {sexec.SSHLogon (host, port); If (sexual .. connected) {sexec.Execute ("ls"); If (s

vb.net - This is an assignment I have to turn in. I am missing something about the function calculation -

I have three test scores, the lowest score will be dropped. A function is used to calculate the final range and the grade has to be converted from a number to a letter. I have done everything I can and I am trying to ensure that the function is written correctly. 'I put them in public class so that they could use the entire program in Deam Test 1 Double Dim Test 2 as Double Dim Test 3 string deep Result 1 as two slow students As the string function of the string deem total, as the semestergrad (Double double as double T, T2, double as TT2, as double-by-T3 double) as 'double function' test score And the lowest score calculation determines the drops that T 1 & lt; T2 and T1 and LT; T3 then total = CST (T2 + T3) / 2)) LSIF T2 and LT; T3 and T2 & LT; T1 then total = CSR (((1 Test 1 + Test 3) / 2)) LSIF T3 & LT; T2 and T3 & LT; T1 then total = CST ((T1 + T2) / 2) 'I have added it if the calculation for the statement was all the same because the program

machine learning - How to predict a continuous dependent variable that expresses target class probabilities? -

My samples can be either class 1 or class 1, but for some of my samples, only one possibility for them Available to Class 1 So far, I have applied my target variable to a limit i.e. all classes are assigned to 1 and I have abandoned all those samples that have non-zero probability of 1 class. Then I applied a linear SVM to the data using SkitKit-learning. Due to this, I extract quite a lot of training data from a distance. One thought was that I had to quit decryption and instead use regression, but generally it is not a good idea to approach classification by regression, for example, the estimated value of the interval [0,1] Does not guarantee. The way in which nature of my attributes is similar to some of them, I am also present to be present for the related feature. For error, if I separated my attributes in the same way on which I separated the dependent variable, then there was not much difference. You can make an estimate using sample weight - assign a sample to tha

Delphi Android Pie Chart -

I want to make a pie chart for Android (FMX). I did a research on Google, but none of the components is free. I am looking for a free component or any sample about it. Is there a sample about the pie chart for Android? Delphi comes with limited TeeChart Lite component suite which is what you need for it. Check the Tchart component and how to use it. It supports both VCL and FMX platform.

node.js - atlasboard display blank or empty widget till the widget moves or restart the atlasboard -

I have added some widgets to my Atlasboard. Suddenly, without any errors in the logfile, some widgets are empty (empty) If I refresh the page or move the widget, then everything works fine. I changed my browser to Chrome and I did not see the empty widget is. There may be some problem with Firefox.

c# - WPF - setting properties to themselves fails to fire changed event -

Here is a unique piece of behavior. We recently created some code in a WPF MVVM application that looked a bit like this: foreach (var mA in preferences. Where (itm => itm.Preference == "Y")) {Member M = _members.FirstOrDefault (itm = & gt; itm.MemberID == mA.MemberAvertedID); If (m = = null) {m.Selected = true; }} Subscribers = _members; Therefore, the first default receives a reference for a member, which is updated. The members and members are effectively the same - the former is a property, wrapping it later as a private variable, with an event fire: public supervision qualification & lt; Members & gt; Members {meet {return _members;} set {_members = value; OnPropertyChanged ("member"); }} The purpose of the members to set up members was to bring the incident to the fire only - but this does not work. As you stepped through, OnPropertyChanged fired the event, but the application did not respond. This, however, works: foreach (var

Android L activity header image with transparent toolbar and collapse on-scroll -

Image
I have a new KitKat app and I'm trying to reproduce the new layout in my activity. Or store Google+ profile activity What I'm trying to achieve is a transparent toolbar and an "activity-header" image that will fall on the scroll: What is the result? Mitigation is a new Aepakanp widget or follow patterns? You may also find useful to consult the new toolbar.

javascript - Fade effect with .hide() .show() in JQuery -

I found a good method to split large posts on Blogger, here in many pages: I am trying to add a faint effect while changing pages, but I do not know how to do it, when it comes to jquery, I have no experience ... I So far the page has been managed to scroll back to the top, and adding some animations using the time values But it does not look right. JQuery (document) .ready (function () {jQuery ('. Page1') .JQuery ('. Content2'). ("HTML, body") Click (jQuery (" JQuery ('. Content1'). (1000); jQuery ('.3 content)', hide (1000); jQuery ('. Content4'). ). (1000); jQuery ('.5 content5'). Print (1000); So what I basically want to do, The "Page" is to be faded ... Use the code below Add JavaScript effects below to the fadeIn-fadeOut page . & lt; script type = "text / javascript" & gt; $ (document) .ready (function () {$ ("body"). FadeIn (800); $ ("A") .No cl

How to hit two servlet in url in java -

After jumping a JSP or servlet through the URL, I login to a web application through the URL. How do I go directly to the 2 GSP page via the URL All the solutions are, < Filters to block URL via 1 web.xml 2 Strong>. > Use the Redirect or Forward feature in Servlet or Jsp .

Android rendarscript on video -

Renderscript is new to me and I want to know that I can use renderspip to apply filters or effects on video I am I know that the render script is the best choice for image processing. Can anyone suggest me how we apply and filter video effects on our project?

post - PHP | $_GET & $_POST issue -

इस सवाल का पहले से ही एक उत्तर है: < / P> 5 जवाब क्या आपके पास कोई सुझाव हैं मेरी समस्या। मुझे एक ही समय में $ _GET और $ _POST का उपयोग करने की आवश्यकता है I $ _GET क्योंकि मुझे वह पंक्ति प्राप्त करने की आवश्यकता है जिसे उपयोगकर्ता सहेजना चाहता है मैं यूआरएल के माध्यम से पंक्ति को कम कर देता हूं। $ _POST क्योंकि मुझे परिवर्तित इनपुट को एक सीएसवी फ़ाइल में लिखना होगा। ऐसा लगता है: $ fileName = '../anfragen.csv'; $ लाइननम = $ _GET ['पंक्ति']; $ Arr = फ़ाइल ($ fileName); $ LineToEdit = $ lineNum; अगर ($ _GET ['speichern']! = नल) {$ handle = fopen ("../anfragen.csv", "w"); $ Arr [$ lineToEdit] = utf8_decode ($ _ POST ['ईमेल']) "," । $ _POST ['लिंग'] "," । "\ N"); // सीएसवी फ़ाइल foreach में सरणी लिखें ($ arr $ $ पंक्ति) {fwrite ($ handle, $ line); }} का उपयोग करें $ _ GET और $ _ POST एक सरणी में चर।

java - Enabling Cross Domain in Jersey - Facing runtime exception -

I am following this to complain to my Jersey CORS. So far, I have implemented the access-control-permission-origin header to apply the containerprint filters to my header, this is my snippet: Response builder resp = Response.fromResponse (contResp.getResponse ()); Resp.header ("Access-Control-Permission-Origin", "*") Header ("Access-Control-Permission-Practices", "GET, POST, OPTIONS"); String reqHead = req.getHeaderValue ("access-control-request-header"); If (empty! = ReqHead & amp; reqHead.equals ("")) {resp.header ("access-control-permission-headers", reheard); } ContResp.setResponse (resp.build ()); And this is my web Xml content is: & lt; Servlet-name & gt; Jersey-servalweight & lt; / Servlet-name & gt; & Lt; Servlet category & gt; Com.sun.jersey.spi.container.servlet.ServletContainer & lt; / Servlet-class & gt; & Lt; Init-param & gt; & Lt; Ultimate

javascript - How to pass $q to angular directive link function? -

मुझे अपने निर्देश के $ q एक लिंक फ़ंक्शन का उपयोग करने की आवश्यकता है । मुझे यह संभव वादा लपेटने की ज़रूरत है जो कि तर्कों में से एक के पीछे है (नीचे दिए गए उदाहरण देखें)। मुझे नहीं पता कि, कैसे इस कार्य में $ q निर्भरता को पारित करना है कोणीय। मॉड्यूल ('निर्देश')। डायरेक्टिव ('मेरी डायरेक्टिव', फ़ंक्शन () {वापसी {दायरा: {onEvent: '& amp;'} // ... लिंक: फ़ंक्शन ( $ का दायरा, $ तत्व) {$ scope.handleEvent () {$ q.वह ($ scope.onEvent ()) {...}}}}} बस इसे अपने निर्देश पर निर्भरता के रूप में जोड़ें और $ q लिंक फ़ंक्शन में उपयोग करने योग्य होगा। यह जावास्क्रिप्ट के कारण है। < P> नीचे दिए गए उदाहरण आपके कोड के आधार पर है। कोणीय। मॉड्यूल ('निर्देश')। डायरेक्टिव ('मेरी डायरेक्टिव', ['$ q', फ़ंक्शन ($ q) {return} गुंजाइश: {onEvent: '& amp;'} // ... लिंक: फ़ंक्शन ($ दायरा, $ तत्व) {$ scope.handleEvent () {$ q.वह ($ scope.onEvent ()) {...} }}}}])

java - While Loop won't terminate? -

I'm using the loop for a while and when it will not end when it should be if it works correctly When it was done, it ends when randro is either == highbound or == low-end . The code of the loop: do {do {randno = (int) (Math. (Math.rendum (* * 4)) + 0.5) -1) ; Direction = getDirection (Rendo, Heading); } While (robot. Approach (direction) == iarabot.wall); Println (randno); Println (highbound); Println (lowbound); Println ("---------------"); } While (randonne! = Cumound | randno! = Highbound); The output is either 3 3 2 ------ , or 2 3 2 ------ , So the loop should end. The first loop ends properly (I try embedding it to work by trying them ...). What's going wrong? Randonne! = Cummand | Randno! = HighBound is always true, because randno can not be the same as both less and highbound (assuming they are not So if the loop does not end. If you want to end, when is different from both the ranges, then your position is lower Change in:

html - Elements in two columns with scrollbar -

I want to visualize a set of elements in two columns. When the number of elements is more than the space available, I would like to see a vertical scroll-bar. HTML here: & lt; Div class = "container" & gt; & Lt; Div class = "box" & gt; Box 1 & lt; / Div & gt; & Lt; Div class = "box" & gt; Box 2 & lt; / Div & gt; & Lt; Div class = "box" & gt; Box 3 & lt; / Div & gt; & Lt; Div class = "box" & gt; Box 4 & lt; / Div & gt; & Lt; Div class = "box" & gt; Box 5 & lt; / Div & gt; & Lt; Div class = "box" & gt; Box 6 & lt; / Div & gt; & Lt; Div class = "box" & gt; Box 7 & lt; / Div & gt; & Lt; Div class = "box" & gt; Box 8 & lt; / Div & gt; & Lt; Div class = "box" & gt; Box 9 & lt; / Div & gt; & Lt; Div class = "box" & gt;

JMeter FTP tests failing on Linux FTP for 1000 users -

We are firing JMeter FTP Test (1000 users) from Windows VM to an FTP server (RHEL 6.2). (FTP 1 CPU, 60 GB HDD, 4GB RAM), and we are getting below errors after some time: Reply Message: Java.O.FileNotefxAxception: 128KFile (Requested Operation A User Mapped Section Can not open on file with) And 12% errors were reported in the report, which is a test scheme to be used here after the investigation: There are 1000 threads in the thread group. The length of the ramp up is 600 seconds. Total duration is 780 seconds. FTP request has server IP, port number 21, remote file and local file. Receipt of request (RETR) Username and PWD are given. The file given below is the vsftpd.conf file of RHEL FTP anonymous_enable = YES local_enable = yes write_enable = YES local_umask = 022 dirmessage_enable = yes xferlog_enable = Yes connection_from_port_20 = yes xferlog_std_format = yes listen = yes pam_service_name = vsftpd userlist_enable = yes tcp_wrappers = yes max_per_ip = 5000 # max no

events - Why I can't pass RoutedEventHandler directly in c# -

I got a UserControl where I want to make an event public: public Event RoutedEventHandler CloseButtonClicked; To post this incident, do not the following: public MyUserControl () {InitializeComponent (); CloseButton.Click + = CloseButtonClicked; } The following does while working: Public MyUserControl () {InitializeComponent (); CloseButton.Click + = (Sender, Args) => CloseButtonClicked (Sender, Args); } Why is that so? The difference between your two is when the CloseButtonClicked event is evaluated . In the first, non-example example, the value of the event field is evaluated when the program statement CloseButton.Click + = CloseButtonClicked; is executed. Unless you already set up a field for some useful values, then when the click event is raised later nothing will happen. Second, for example, the example work example event field is evaluated when the click event is picked up. This statement declares an anonymous method (via lambda expressio

java ee - EJBAccessException within @Schedule method in JBoss 6 -

We are filling a map using the remote method EJB from the client. The app is using the timer to work on this map's data. When the security domain is activated using LDAP, the client is able to call the remote method using LDAP authentication but javax.ejb.EJBAccessException: Invalid user The timer is thrown out by the timeout method @ javax.ejb.Schedule has attempted to call the local EJB method, and the authentication failed. I have read a lot of threads about this configuration: Maybe, but there is no effect on the comment on the timer @RunAs . I have tried different blends between jboss-app / security-domain and @org. Jboss.ejb3.annotation.SecurityDomain comment without success Does anyone have a timer experience with LDAP authentication? in & lt; interceptor-riff name =" org.jboss.ejb3.security.RunAsSecurityInterceptorFactory "/ & gt; StatelessBeanTimeoutMethodStack ejb3-interceptors-aop.xml (line 203 look almost) like: &

ruby on rails - change image in partial from js.erb without refresh of page -

ruby ​​v 1.9.3p194 rails v 3.1.3 i have ruby ​​/ rail / js a while i Till no benefit was taken. How can I update both images with caption_photo? I am using JS to capture an image from a webcam and I am setting it as an avatar of users. The pictures are being stored in the patient. Photo_ue I display the image in part 2 and want both images to be saved once. I think I want to do it with my capture_photo.js.erb // related sidbar.html .ahl:% a # user_sidebar_image {href: "javascript: zero (0)" } = Image_tag user_avatar_url (current_change, "thumbs") // related_patient_info.html. Evening:% img.img-polaroid {: src = & gt; "# {Photo}", alt: "patient avatar image"} // relevant caption_photos Jesserb: // I want to set a picture here OK ... the answer is. . & lt;% if @success == true% & gt; $ ('# User_sidebar_image' img ') Attr ('src', "and lt;% = @ patient.photo.try (: url)% & gt;") $ (

hide - Show footer menu on scroll bottom page -

I have a script to show the powder menu at the bottom of the fixed picture and it works, but when it opens The page or footer menu is visible reloaded in the beginning. And after scrolling it gives feedback to the way I want it. It's fairly simple enough but my head does not work right now. $ (window) .scroll (function () {if ($ (this) .scrollTop () & gt; 20) $ $ ('footer') Slidedown (300);} And {console.log ('there'); $ ('footer'). SlideUp (300);}}); This is Tack it on myself I was hardly thinking that I forgot to set the display: none; I have changed a line in my CSS code below: < Ex> footer {status: fixed; Background color: white; Bottom: 0; / * Just display footer: none when the page is loading * / display: none; Z-index: 300; } And here is a link that belongs to your demo:

Working with excel file in R -

I'm still drinking every time when I work with Excel file in R Most What's the best way to do the following? 1- In the form of "complete workbook" can you be able to analyze imported Excel and any sheet in the workbook? If you think of using XLConnect , please keep in mind the problem "out of memory" with Java. I have more than 30MB files and every time I deal with Java memory problem It takes more time. ( -Xmx running does not work for me). 2- Do not miss any data from any Excel sheet? Saves the file in csv and says that some sheets are "out of range" which are 65,536 rows and 256 columns. Apart from this, it can not deal with some formulas. 3- Do not need to import each sheet separately? Import a sheet for SPSS, STATA or preview and save it in its extension and then work in R's output file, which works most of the time though, there are two major problems in this method; One is that you have to download the software on the ma

r - Updating dataframe values with functions at scale -

I've got a data frame for which some of the conditions require manual overrides, which give different conditions Are there. However, these conditions take a consistent form (I always want to change one value with another, a specific date range, etc.). I am thinking that there is another great way to do the following; I suspect that, seeing that I am wrapping the function call again. Here's an example: set.seed (1234); Library (deptter) data & lt; - data.frame (biz = sample (c ("tailo", "shipping", "technique"), 50, location = TRUE), area = sample (c ("mideast", "americas", "Asia") 50, place = TRUE), date = delegate (sic (as.Date ("2010-02-01"), length = 10, by = "1 day"), 5)) Now, as mentioned above, I want to change the values ​​in this dataframe, subject to certain conditions regarding the values ​​of the other variables. My first idea is to use the function: changeFunc & lt

pdfbox - How to read the value of fields in signed PDF using PDF Box API -

Once you have completed the digital signature for PDF to use DocuSign, using the field ID / name PDA How to read the value of field in (using the PDF box API)? I am not able to obtain the Digiitally signed PDF field ID Sample PDF shows that field in PDF PDF form field after all Not Acrofornm nor XFA, they are only texts with some rows around them (they can be once in PDF form fields that were flat, or they can never start with the PDF form field.) < / P> In this way, your only option is text extraction. There is a very detailed extraction engine in PDF box. Take a look at PDFTextStripper You can try this class as you see in the extracted string for field labels and extract the following text till the end line; Or if you have the time, you can try to use the internal PDF structure where the content of the field is in a different object.

asp.net - How to override Request.Browser on server side? -

Opera user agent "Mozilla / 5.0 (Windows NT 6.1; WOW64) Apple WebKat / 537.36 (KHML, like GECO) Chrome / Html 38.0 .2125.104 Safari / 537.36 OPR / 25.0.1614.63 "On the server side is defined as" chrome ". I wanted to override the creation of an object request. Broser and a file "opera.browser" added to a folder "App_Browsers": & Lt; / Identification & gt; & Lt; Capabilities & gt; & Lt; Capacity name = "browser" value = "opera" /> & Lt; Capacity name = "major version" value = "$ {major}" /> & Lt; Capacity name = "low value" value = "$ {minor}" /> & Lt; Capacity name = "type" value = "opera $ {major}" /> & Lt; Capacity name = "version" value = "$ {version}" /> & Lt; / Capabilities & gt; & Lt; / Browser & gt; & Lt; / Browsers & gt; But Regex is not working and reque

In Cassandra how to select rows by multiple filters? -

मेरे पास नीचे की तरह एक तालिका है: टेबल टेस्ट तैयार करें (एक int; b int; c int; d int; प्राथमिक कुंजी )); मैं 0 के साथ डेटा का चयन करना चाहता हूं; एक & lt; 10 और 0 & lt; बी एंड एलटी; 10, मुझे प्राथमिक कुंजी कैसे सेट करनी चाहिए और मुझे सीक्यूएल क्वेरी कैसे चलानी चाहिए? धन्यवाद! विभाजन कुंजी पर रेंज ऑपरेटर (& lt;>) का उपयोग करने की अनुमति नहीं है जब तक कि आप बाइटऑर्डर्ड पार्टिशनर का उपयोग न करें जो प्रदर्शन से संबंधित कई कमियां हैं। अन्यथा, डिफ़ॉल्ट Murmur3partitioner के साथ, आपके पास दो विकल्प हैं। पहला समाधान: तालिका परीक्षण (एक int, b int, c int, d int, प्राथमिक कुंजी ((a, b)) बनाएँ; फिर 1. में 1. एक्स के लिए परीक्षण से * चुनें * जहां a = X और b (1,2,3,4,5 , 6,7,8,9,10) दूसरा समाधान: तालिका परीक्षण (एक int, b int, c int, d int , प्राथमिक कुंजी (ए, बी)); तब परीक्षण से * चुनें * जहां एक (1,2,3,4,5,6,7,8,9,10) और बी & gt; = 1 और बी & lt; = 10;

Convert PHP code to curl command where only TLSv1 is allowed -

How do I convert curl command to this php code? . I want to use this code on Linux machine executing a curl command $ header = array ("content type: text / xml", "content length:". Strlen ( $ Xml)); $ Ch = curl_init (); Curl_setopt ($ ch, CURLOPT_URL, $ this- & gt; url); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); Curl_setopt ($ ch, CURLOPT_TIMEOUT, 10000); Curl_setopt ($ ch, CURLOPT_POST, true); Curl_setopt ($ CH, CURLOPT_POSTFIELDS, $ xml); Curl_setopt ($ CH, CURLOPT_HTTPHEADER, $ headers); $ Data = curl_xac ($ ch); I was tired of this one, but failed: curl -x post h "content type: text / xml" -o output. Txt -d "param1 = param1 & amp; username = username & password = password" can be https://site.url.com -d@ data.xml The problem is in HTTPS, because only You will use it in PHP: < P> curl_setopt ($ ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_1); Documentation speaks of more TLS versions: CURL

itunesconnect - Is it possible to submit a new testflight version while another version is in the review queue? -

Version 1.0.1 of the app I'm working on is waiting for review. We have introduced version 1.0.2 with the application loader, in which it is in line 1.0.1 with the intention of making available pre-release builds for testers. After one or two hours we received an email stating that the version 1.0.1 developer was rejected. There is no way of a version in the review queue, while our testers check the next version as a pre-release build through Testflight beta distribution? It is possible that you can upload new buildings from 1.01 to iTunes Connect, and test them through the testflights Can test, while version 1.0.1 is waiting for "review". I did this with my app I uploaded all the bills with Xcode, if it makes a difference.

c# - Fetch a value of a property of an object in ArrayList -

I started a ArrayList for Windows Forms in C #. I am adding new objects with some properties of each object in , such as: ArrayList FormFields = new ArrayList (); CDDatabaseFieldDB = newCDDatabaseField (); Db.FieldName = FieldName; // fieldname, the input value received from the Windows Form Db.PageNo = PageNo; // page, description, button command area name is also received like DB. Description = description; Db.ButtonCommand = ButtonCommand; FormFields.Add (DB); Now when I want to check only FieldName of each object in ArrayList (assuming that there are many objects in the code> ArrayList ). How can I do this? I tried: for (int i = 0; i But this is causing the error (in the IDE). I'm new to C # programming, so can someone help me with this ?? Error: Error 21 'object' has no definition for 'field name' and no extension method 'fieldname' does not accept 'first argument' of type 'object' can be found (Do not you

job scheduling - Run task on all available cores - Windows HPC Pack 2008 R2 SP4 -

I am using Windows HPC Pack 2008 R2 SP4 to run the MPI application to run the app on all available cores I am having trouble getting a Job Scheduler. Here I have my code ... using (icedular scheduler = new scheduler ()) {scheduler.Connect ("MyCluster") ; Var newJob = Scheduler CREATE JOB (); Newjob Name = "my job"; //newJob.IsExclusive = True; Var Single Task = Newsb. Cutte (); SingleTask.WorkDirectory = @ "C: \ MPI Worksspace"; SingleTask.CommandLine = @ "mpiexec MyMpiApp.exe"; NewJob.AddTask (singleTask); Scheduler SebiumOS (NewJob, blank, blank); } In the cluster, I assign all the 1 (small) core of 16 available in two compute nodes in the cluster. The best I can get is the line to newJob.IsExclusive = true; By completing , which assigns all the cores to one of the compute nodes (8 cores). If I can use mpiexec switch / np * to use all available cores, but was running from the command line, But this task begins to override by th

javascript - PHP echoing emptying string in $.ajax response -

I am trying to retrieve data from an AJAX call. I have tested with a string but it is returning empty, I just want to console the response to the string. JS: makeRequest: function (sService, oData) {var request = $ .post ( '.. /../Utils/utils/php/userQuery. Php ', {' service ': sService,' oData ': oData},' json '); Request.done (function (oResult) {// This is to stop firing, but an empty string is printed console.log (JSON.stringify (oResult)); var fail = errorHandler.check (oResult); if (! Fail ) {It is firing off but empty string console.log (oResult);} else {console.log (unsuccessful);}}) is printing; Request.fail (function (oResult) {console.log ("There was an error retrieving service data");}); } PHP: class request {private $ sService; Function _ composition ($ sService) {$ _SESSION ['user_Id'] = 100000; $ This- & gt; $ S service = $ sService; Switch ($ this- & gt; $ sService) {Case 'Followers': Break;

r - Remove factors from boxplot that have no data -

I have a data frame with two factors: Peel - either "standard" or "delay" and wafer - wafer But what I want as a factor: ** peel ** ** wafer ** Standard 122 standard 123 delay 124 delay 125 (Sorry) I'm trying to post the actual data, but it appears that it has come out in a foolless format) When I press my data box for a variable against both factors I get the difference on the X axis, where there is no data: boxplot (von.fwd ~ wafer * peel, data = df, las = 2) I have tried posting an image but apparently I need 10 to do this reputation The data is unavailable because it does not exist. I do not want it to plot the difference. I have seen the code in the droplevel code, but I do not want to leave all my factors, only some combination of factors Is there no way to say that there is no data, Do not conspirate those factors where many thanks Pete Peel ERF Wafer Device Width Length Von.fwd Vth.fwd STS.fwd On.Off.fwd Ioff.fwd Von.rev Vth

php - Server 500 error occurs always -

& lt; php $ dbhost = 'xx'; $ Dbuser = 'xx'; $ Dbpass = 'xxxx'; $ Conn = mysql_connect ($ dbhost, $ dbuser, $ dbpass); यदि (! $ Conn) {मर ('कनेक्ट नहीं किया जा सका:'। Mysql_error ()); } Mysql_select_db ('url') या trigger_error ("डेटाबेस पर स्विच करने में असमर्थ:"। Mysql_error ()); फ़ंक्शन arr ($ num) {$ ch = curl_init (); $ R = रैंड (1,90); । $ Url = "https://www.googleapis.com/customsearch/v1?q=Gravity%20Falls%20Latest%20images&num=10&start=" $ आर "& amp; सुरक्षित = बंद & amp; cx = एक्स।: 2hdsc4__avm & amp; 0 फिल्टर = & amp; c2coff = को निष्क्रिय & amp; alt = json & amp; कुंजी = एक्स "; Curl_setopt ($ ch, CURLOPT_URL, $ url); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, सच); $ आउटपुट = कर्ल_एक्सएसी ($ CH); curl_close ($ ch); $ एक = intval ($ संख्या); $ डेटा = json_decode ($ आउटपुट, सच है); $ Se = $ डेटा ['आइटम'] [$ a] ['पृष्ठमैप'] ['cse_image'] [0] ['

java - How to set path to file -

I am creating a simple program that saves everything from JTextArea to file. So I would like to know how to set the path that fits for any user using this program. Example: C: \ Users \ A User \ Desktop \ file.txt You can use System Properties You can find the user directory "user.home" and then search the desktop directory. file path = new file (System.getProperty ("user.home"), "desktop \ file.txt"); Stay tuned, because this code will work only in Windows * Ux system, you will not have any desktop directory in the user's directory.

scala - How to compute inverse of a multi-map -

मेरे पास एक स्कला मानचित्र है: x: [b, c] y: [b, d, e] z: [d , एफ, जी, एच] मैं इस मैप के व्यूअर को देखने के लिए चाहता हूं। बी: [x, y] c: [x] d: [x, z] और इसी तरह। क्या इन परिवर्तनों के बीच में उपयोग किए बिना ऐसा करने का कोई तरीका है यदि यह एक बहु-नक्शा नहीं है - तो निम्न कार्य करता है: typeMap.flatMap {case (k, v) = & gt; V.map (vv = & gt; (vv, k))} संपादित करें: मार्थ ने सही तरीके से बताया कि इसमें शामिल करने के लिए निश्चित जवाब। मेरा जवाब उनके मुकाबले थोड़ा और अधिक है क्योंकि मैं प्रत्येक चरण के माध्यम से जाने की कोशिश करता हूं और शैक्षिक उद्देश्यों के लिए फ्लैटमैप्स द्वारा उपलब्ध कराई गई जादू का उपयोग नहीं करता है, उसका अधिक सरल है:) मैं आपके नोटेशन के बारे में अनिश्चित हूँ। मैं मानता हूं कि आपके पास कुछ ऐसा है: val myMap = नक्शा [टी सेट करें [टी]] (एक्स -> सेट (बी, सी), y - & gt; सेट ( आप निम्नानुसार रिवर्स लुकअप प्राप्त कर सकते हैं: Code> val instances = for {keyvalue & lt; - myMap.toList value & lt; - keyValue._2} उपज (मान,

regex - Search for a piece of string Sublime Text 2 -

How do I search all the ColdFusion cflosis tags without the attribute of addtoken? Using subtitle text 2 It can be used to find all events without cflocation tags Paste this expression into additional feature tool file locator lite. & lt; Cflocation \ s + url = "[^"] * "\ s * & gt;

c++ - main.c:(.text+0x30): undefined reference to `reciprocal' -

I was trying to program ahead of advance Linux programming. Some other people also felt this problem but reading those threads is not helping me. I tried those methods but my problem is still there please help me. The main thing is here #include & lt; Stdio.h & gt; #include "reciprocal.hpp" int main (int argc, char const * argv []) {int i; I = Atoi (argv [1]); Printf ("% d mutual% g \ n", i, reciprocal (i)); Return 0; } reciprocal cpp #include on listing listing Parikropal. HP #ifdef _cplusplus extern "c" {#endif extern double reciprocal (int i); #ifdef _cplusplus} #endif Listing Makefile: reciprocal: main.o reciprocal.o G ++ $ (CFLAGS) -o reciprocal main. O Reciprocal.cpp reciprocal.hpp G ++ $ (CFLAGS) -c reciprocal.cpp: o reciprocal.hpp gcc $ (CFLAGS) -c main.c i ../include reciprocal.cpp I ../include clean: rm -f * .o reciprocal is error: state $ make gcc -c main.ci ./include G ++ -C reciprocal.cpp i ../include G

iOS ARC memory warning -

I make an app in iOS with ARC, when used for a little bit of surfing between screen memory is correct, but some Message received after use "Received Warning Warning" and crash! What is the problem? Cueps It can be in any number only because you Does not mean that you will never get memory warnings, this means that you do not need to manually increase and reduce reference count. The cycle. When not necessary, do not keep the items strong signal. I recommend watching the basics of how the ARC works.

How to shift column data using UPDATE in a MySQL table? -

I want to use a fixed-size table like this: + --- --- + ---------- + ----------- + | ID | Col1 | Col2 | + ------ + ---------- + ----------- + | 1 | One | X | + ------ + ---------- + ----------- + | 2 | B Y + ------ + ---------- + ----------- + | 3 | C. Jade. + ------ + ---------- + ----------- + What a way to move columns For example, when I update [3, col1] then data up? The table should look like this ... + ------ + ---------- + ----------- + | ID | Col1 | Col2 | + ------ + ---------- + ----------- + | 1 | B X | + ------ + ---------- + ----------- + | 2 | C. Y + ------ + ---------- + ----------- + | 3 | D * | Jade. + ------ + ---------- + ----------- + * New in line 3, call 1 Value] and column data has been moved; thank you in advanced. You can do this update / join : update table t left table tnext on t.id = tnext.id - 1 set t.col1 = (case 'tnext.col1 end when tnext.id is zero) ;

php - remove un necessary hierchy from json output -

Image
I am creating an administrator backend for the Android app. My code provides a JSN output that the Android developer uses in its app. The developer asked me whether it is possible to reduce hierarchy level in JSL output Remove highlighted [] 0 and instead of insert content directly inside [] data . This is my current PHP code if ($ type == 1) // handel item display {try {$ query = "SELECT SELECT FROM CATEGORY"; $ Result = $ DBH-> Query ($ query); While ($ line = $ result- & gt; receive (PDO :: FETCH_ASSOC)) {$ cat = $ row ['category']; $ Query1 = "SELECT *" from the item is catagory = '$ cat' "; $ Value = $ DBH- & gt; Query ($ query1); If ($ line1 = $ value- & gt; get all (PDO :: FETCH_OBJ)) {$ main [] = array ('data' = & gt; array ($ line 1)); } And {$ main [] = array ('data' = & gt; array ('cat' = & gt; $ line ['category'])); }} Echo json_encode ($ main); $ Result->

re-engineering database using oracle sql developer data modeler does not include synonyms -

I use it as a reference to use the Oracle SQL Developer Data Modular Version 3.0.04 to reset the DB Schema I am trying to engineer: The schema is very large and all tables are in "synonymous" though I choose synonyms (regardless of their number) they are not visible in the final diagram. If I choose from "table" then they are shown in the final diagram. Does anyone know how to fix this? Should I use a different version? I have to do this process using only SQL Developers, but is this a simple tool? Thanks You can not import synonyms only, those imported tables imported Indicate those synonyms that need to be done. If you have actions selected on Tables, then you will be able to import them into Oracle SQL Developer Data Modelor in your Relational Model.

ruby - Default :exclude option for Rails resource routing -

A minor question: I am using the rail for my REST API, but since This is a bad API; I do not really have to route : new or : edit for any resource because people only through automatic JSON requests Will interact with the API, not graphically For example, there is no need for a dedicated edit page. Currently, I have to do something to define every resource: # routes.rb Processing: People in / config / routes except for option on each resource : there is no big deal: [: new,: edit] rb but is it fixed Is there a way to do that I do not need to specify this on every resource? I would like to vacate this code for a while, such as passing some local option along with some local options like lame without something. More generally, can you define the default options for rail routes : ? Thank you! For the rescue! with-option (except: [: new,: edit]). Opt. Opt.resource: session opt.resource: other_resource opt.resources: end of people

android - Change ActionBarCompat title color but not other texts color -

I am using the last release of Support Library (V21) in which content topics (under the theme. AppCompat's name) And I want to try to achieve this by using the TextColor Primary (as shown) in my custom theme to keep the ActionBoard title in white. & lt; Style name = "appbashtheme" parent = "@ style / theme.AppCompat.Light" & gt; & Lt; Item name = "color primary" & gt; @color / orange & lt; / Item & gt; & Lt; Item name = "color primary diary" & gt; @color / orange_dirk & lt; / Item & gt; & Lt; Item name = "color clock" & gt; @color / white & lt; / Item & gt; & Lt ;! - Set this feature text color - & gt; & Lt; Item name = "android: textColorPrimary" & gt; @color / white & lt; / Item & gt; & Lt; / Style & gt; With this I got the title of a white actionbar but all other text (text view, editing) was also white ... Is there a w