Posts

Showing posts from August, 2013

postgresql - Postgres - indication for no rows updated -

I am running a simple update query, something like this: some_table STT column updates Do = 'value' where column B = 'other value' There is no way to generate an error in any posts or to print a message when no rows are updated? In the database, this is only possible if someone is updating from a stored procedure. In plpgsql: BEGIN Update some temporary STT columns A = 'value' where column B = 'other value' 'Nothing unchanged' to take exception; end if; END Values ​​are not logged though, but the command has been canceled. If you want to log it out, use Use alert instead, and set postgresql logging to include the warning. If you use the API to access PostgreSQL, then you usually update the number of one function values ​​in Java. Execute SQL executes executeUpdate (): Public execute executeUpdate (string SQL) throws SQLException statement, which is a INSERT, UPDATE, or Delete statement or a SQL statement may no...

jquery - .call() is not a function -

I have created a CSS3 animation plugin for jquery that works perfectly in JS Fiddle: But when I use it in my reference "TypeError: the result of the expression '$ fnStop.call' is not [undefined] function." Here's my code: But I can not know why any thoughts? In this way I have overwritten the jquery native close function: if (Modernizr.csstransitions) {$ fnStop = $ .fn.stop (); $ .fn.stop = Work (clear question, jumpstands) {if (this data ("CSS3 Atom")) {return methods.stop.apply (this, logic); } And {refund $ fnStop.call (this, argument); }}; } $ fnStop = $ .fn.stop (); Should probably be: $ fnStop = $ .fn.stop; You probably want to point it out, not trigger (and save its result).

security - Securing Ajax Requests in ASP.net via Autenticated Webforms -

I have already read and Now let me explain my scenario, below will be the code snippet that can help in explaining the subject. [WebMethod [EnableSession = True] [ScriptMethod] Public Static String CreateTitle (string strTitleName) {String strResult = "custom json string"; If (session ["Authorized"] == "Truth" & amp; amp; String.INNLLI below (strTitleName) {string strTitle = Server.HtmlEncode (strTitleName); InsertRecordInDB (strTitle); StrResult = "custom jSOn string" + Encrypt MD5 ("Record ID"); Return return} and the Javascript call to send the parameters below is the BtnCreateTitle_click button. The client side's click event is the TxtTitle title name accepting the textbox. Validated pages have also been made to validate the textbox. CreateTitle is a page method that I call using ScriptManager function BTN Cretalitlical (avent) {if (Page.ClientValidate ()) {if ($ get ("getTxtTitle")) {PageMethods.CreateT...

c# - Sort fields in database with linq -

I need to sort query results in the actual database (so when I get some results, let me sort it Not required) Can I do it with linq? Database tables are naturally unrolled; it's not possible. Instead, you can use a view with a ORDER BY section or create a property in your Data-Access class which is IOrderedQueryable & lt ; T & gt; .

objective c - Array subscript is not an integer -

int i; Va_list ऑब्जेक्ट_सूची; Va_start (ऑब्जेक्ट_लिस्ट, ऑब्जेक्ट); के लिए (आईडी ओ = ऑब्जेक्ट्स, आई = 0; ओ! = नाइल; ओ = वीए_आर्ग (ऑब्जेक्ट_लिस्ट, आईडी), आई ++); ऑब्जेक्ट्सएअररे = मॉलोक (साइज़फ (आईडी) * आई); va_end (objects_list); // ... (malloc NULL जांच यहाँ है, इसमें शामिल नहीं है I) va_start (ऑब्जेक्ट_लिस्ट, ऑब्जेक्ट्स); के लिए (आईडी ओ = ऑब्जेक्ट्स, आई = 0; ओ! = शून्य; ओ = वीए_आर्ग (ऑब्जेक्ट_लिस्ट, आईडी), आई ++) {ऑब्जेक्ट्स इनरात्र [आई] = ओ; } Va_end (ऑब्जेक्ट_लिस्ट); मुझे एक आरे सबस्क्रिप्ट एक पूर्णांक त्रुटि objectsInArray [i] = o; लाइन पर नहीं मिल रहा है objectsInArray को id * objectsInArray के रूप में घोषित किया जाता है। i एक int है, इसलिए क्यों मुझे यह त्रुटि मिल रही है और मैं इसे कैसे ठीक कर सकता हूं? अग्रिम धन्यवाद। i प्रकार id लूप के भीतर अस्पष्ट सिंटैक्स को हल करने के लिए, id o के लिए के लिए (...) कथन घोषित करें। Xcode में, परियोजना सेटिंग्स के तहत, सक्षम करें "छिपे हुए स्थानीय चर" के लिए चेतावनियां, इसलिए संकलक ऐसे चीजों के लिए...

python - How to check user online with django and GAE? -

I am using Django with Google App Engine and I create a module to check the online / offline user Want to But GAE does not support the session, so I find it hard to find a way to do this. How can I resolve this problem? Any thoughts would be appreciated, thanks. Session Library will not solve this, because the HTTP is static. Using the session, you can determine that someone has finally made a request, but it does not tell you whether they are "online" - they can immediately close their browser tabs or they can switch it to a week's Can open for / P> If you really need to actually do this, you can use it. Alternatively, you can use the Session Library, or you can log in to the user using the user API, and you can list any person who requested the last n minutes as 'online'. Are there.

actionscript 3 - Is it possible for someone to hack my SWF by accessing one of its function -

In my SWF, I have a function that automatically runs at a certain time. Should the user not run that function or change the timer variable, is he able to do it with some work? All code running on the client side should be treated as unsafe and hatable. Period.

oop - Efficiently: Random numbers in fixed range without repetitions -

O people, I know there are one million questions on random numbers, but in fact I searched a lot but due to this I could not find anything like mine - it does not mean that there is not in it in any case, please forgive me if I am repeating any question, then just tell me that this is the case. So, I want to do something simple in the easiest way. I randomly generate all the N integers in the range as [0, n] , one by one, such a repetition is not. I know, I can do this by putting everything in the list , rotate it, get head, and then remove head from the list. But then I will change the length of my list to N , N-1 . Any better / sharp thoughts? You can only make one alteration, and then take action through the list.

class - php classes use of $game->details->something -

I do not understand what people do when they are $ game- & gt; Details- & gt; Some people can please explain it. This code means that $ game is probably a game class Example, in which the description is within another object (only one more attribute) within the game class, and there is a feature within some detail class. Semi-pseudo-code class games {public $ details; Function __ Construct () {$ this- & gt; Details = new details (); }} Class details {public $ something; Public __construct () {$ this- & gt; Some = "mike"; }} $ Game = new game (); Echo $ game- & gt; Details- & gt; some; // print mike

delphi - Removing the prologue of a function written in pure assembly -

I am using Delphi 2010. Is Delphi possible to not create the preamble for the function? I am writing some pure assembly functions like this: process some assembly; Stdcall; Asm start ... end; End; And I would not like to make Delphi an introduction and anecdote for this function, such as the __ display of C ++ (naked) feature. > And so nobody does not waste their time, I do not need help to work these tasks with preface; I can do this already, this is just a big discomfort and will make maintenance a big problem. I have to manually inspect the proposals generated by the compiler to see my length, and if it changes, then my The program will crash. I also know that I can write the function as a series of bytes byte array, but it will also get worse than going to find the length of delphi prelude. Delphi does not generate preamble or epils for the work of no logic And declares with the registered calling conference. If you want to work without preamble, then d...

ruby on rails - Heroku Postgres Error: PGError: ERROR: relation "organizations" does not exist (ActiveRecord::StatementInvalid) -

Harco is having a problem deploying my Rail App, where this error is thrown while trying to access the app: / P> PGError: Error: The relationship "organizations" does not exist (ActiveRecord :: StatementInvalid) SELECT a.attname, format_type ( A.atttypid, A.atttypmod), d.adsrc, a.attnotnull, FROM pg_attribute, a lower addition at pg_attrdef d on a .attrelid = d.adrelid and a.attnum = d.adnum where a.attrelid = '"organization"': : :: regclass and A.attnum & gt; 0 and not a.attisdropped by ORDER a.attnum Anyone have any ideas? This is the first thing for me, especially because I'm working on the second app with everyone, and have not seen anything like this. Of course, everything works on local SQLite - Any Thanks in advance for the help! - Mark I had the same problem to solve it, the database It's easier to reset. The migration was done successfully for my case :) While this is a good solution in this con...

asp.net mvc 3 - MVC 3 Razor Syntax for straight text output? -

How to use a razor / can you type text directly with wrapping it in some type of html tag? Example (this works but adds extra span tags): @ {var foo = true; } @if (foo) {& lt; Span & gt; Yes & lt; / Span & gt; } Other {& lt; Span & gt; No & lt; / Span & gt; } I would like to keep my final markup as clear as possible and not want to do additional tags. Thank you! Use tags @ {Var foo = true; } @if (foo) {& lt; Text & gt; Yes & lt; / Text & gt; } Other {& lt; Text & gt; No & lt; / Text & gt; } In the razor view engine to write content in the output & lt; Text & gt; tag signals. Alternatively, you can @: @ {var foo = true; Use; } @if (foo) {@: yes} and {@: no}

parsing xml from a network database in android -

When I click on a button, I want to show an XML file that is stored in a URL database. , How to do this, please give me an example. Get data on a server side script, and return it as XML, then download the page and Load it into your application. Using this code, you can get an XML file from an online database and it can be parsed as an XML document in Android. Documentation xmldocument = fromString (Download Page ("http://example.com/data.php"); This is a short script The webpage should download and return it as a string public string download page (string target ur) {try buffer = null; try // // desired page url url = new url (Target URL); = new BufferedReader (new InputStreamReader (url.openstream ()) by the server; String; output string = ""; while ((str = in.readLine ()) = null {// str is a line of text; readLine () new line / letters / output + = "\ n"; output + = Str;} Return output. Substring (1);} Catch (MalmarmdureLecepation E)...

objective c - Having images in a picker for iPhone app -

I am writing an iPhone app in which I have a double component picker, aside from 13 different card prices (Ace, 2, 3, 4, etc.) and the other should have a picture for four suits (spades, hearts, diamonds, clubs). I have four in the folder. PNG files dragged. Can anyone tell me why this code does not work? I'm following almost an example from the class. UIImage * spades = [UIImage imageNamed: @ "spades.png"]; UIImage * heart = [UIImage imageNamed: @ "heart.png"]; UIImage * Diamonds = [UIImage imageNamed: @ "diamonds.png"]; UIImage * Club = [UIImage imageNamed: @ "clubs.png"]; UIImageView * spadesView = [[UIImageView alloc] initWithImage: spades]; UIImageView * See heart = [[UIImageView alloc] initWithImage: heart]; UIImageView * diamondsView = [[UIImageView alloc] initWithImage: Diamonds]; UIImageView * clubsView = [[UIImageView alloc] initWithImage: Club]; NSArray * SuitArere = [[NSArray alloc] initWithObjects: spadesView, heart view, di...

android - need better explanation of services with explicid intents -

There are some intents that I am looking to use and I'm sure they are not registered in manifest such as manifest_screen_off May be. So when I start the service: context.startService (new intent (reference, service class)); Then on, a broadcast receiver registers like this: register receiver (screen receiver, new intent filter (int. Action_sirean_on)); and start my onStartCommant return Should the receiver be removed every time the screen is turned off? But this dosent I tried something like this with different receivers- action_battery_changed and they do not work "

ruby - Adding timestamp to Rails AppLogger -

मेरे पास निम्न लॉगर क्लास है: मॉड्यूल ऐप्लॉगर @@ _ लॉगर्स = {} def self.logger; self._creater_logger ( "my_app_name"); End def self._creater_logger (name) @@_loggers [name] || = $ 0 == "irb"? लकड़हारा.नई (एसटीडीओओटी): लकड़हारा.नई (रेलस्क्रिप्ट.जोइंड ("लॉग", रेल .एनआईवी + "। # {नाम} .log")) अंत डीईफ़ self.format_exception (e) "# {e.message } [[\ N \ t \ t # {e.backtrace.split ("\ n")। मैप {| l \ "\ t \ t # {l}"} .join ("\ n")}]] "एंड एंड और इसका इस्तेमाल करने के लिए: AppLogger.logger.info (msg) क्या है प्रत्येक लॉग पंक्ति में स्वचालित रूप से टाइमस्टैम्प जोड़ने का एक तरीका (मैन्युअल रूप से इसे हर कॉल में लॉगर में जोड़ने के लिए)? आप अपने वर्ग के सिंगलटन को फिर से परिभाषित कर सकते हैं और लॉगिंग स्तरों के सभी या कुछ स्तर जोड़ सकते हैं। % w (डिबग जानकारी चेतावनी त्रुटि घातक) .each do | level | Eval & lt; & lt; -end_eval def applogger.logger। # {Level} (message = "", और blk) अ...

iphone - OpenFeint Turn-Based Multiplayer -

After I'm wondering if anyone has ever used the OpenFeint turn-based multiplayer framework. I am now trying to open the sample applications that come with that framework and to compile and I get errors I, I really feel that is not ever used it before I want to run through someone to run a turn-based multiplayer sample application called the Modelial MPS Model App. I opened the MPSampleApp project and then followed all the steps under "Add OpenFinter as separate source files" in the remixed file that was started for OpenFient. I'm running Xcode 4, iOS 4.2, OpenFient 2.9.1, and Turn-Based Multiplayer Framework 1.1.2. Does anybody know that it is a valid configuration to be able to open "MPSampleApp"? Please remember that "MPSampleApp" is a sample app that comes with a multiplayer framework, not openfin If you can confirm that they will work, can you list all the steps I need to get the MPSampleApp compilation? Here is the error I'm gettin...

php - Curl hangs when downloading large file (500MB+) -

I am using cURL to download large XML files (between 500 MB and 1 GB) to remote servers . Although the script works fine for small test files, every time I try to download a file larger than a few hundred megabytes, the script hangs - it does not stop, there is no error message, it just gets there Is hanging. I am executing the script with the command line (CLI), so PHP should not have time to spare. I have tried curl verbose mode, but it does not show anything beyond the initial connection. Every time I download the file, it stops absolutely at the same size (463.3 MB). The XML of the file at this point is incomplete. Any idea was very appreciated. $ ch = curl_init (); $ FH = FOPAN ($ filename, 'W'); Curl_setopt ($ ch, CURLOPT_URL, $ url); Curl_setopt ($ CH, CURLOPT_FOLLOWLOCATION, TRUE); Curl_setopt ($ CH, CURLOPT_FILE, $ FH); Curl_setopt ($ CH, CURLOPT_HEADER, 0); Curl_setopt ($ CH, CURLOPT_TIMEOUT, 0); If (curl_exec ($ ch) === incorrect) {echo 'curl error:...

Delete Certain String in Text Files Using PHP -

& lt; php // संदर्भ पाठ foreach (ग्लोब ("file1.txt") $ filename1 के रूप में) { $ File1 = $ filename1; $ Line1 = rtrim ($ file1, "\ n"); $ सामग्री 1 = फ़ाइल ($ पंक्ति 1, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); $ String1 = आंत ($ सामग्री 1); // file_put_contents ('google.txt', implode ('', $ contents1)); $ Array1 = str_split ($ string1); $ Temp = $ array1; } // वेबसाइट से लाने $ url = "https://www.example.com/"; $ Str = file_get_contents ($ url); $ MyFile = "file2.txt"; $ एफएच = एफओपीएन ($ myFile, 'w') या मर ("फ़ाइल नहीं खोल सकता"); $ StringData = $ str; fwrite ($ एफ एच, $ stringData); fclose ($ एफ एच); विदेशी मुद्रा (ग्लोब ("fetch_hLeong.txt") के रूप में $ filename) {$ file = $ filename; $ Line = rtrim ($ फ़ाइल, "\ n"); $ सामग्री = फ़ाइल ($ पंक्ति, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); $ स्ट्रिंग = आंत ($ सामग्री); $ सरणी = str_split ($ स्ट्रिंग); $ Temp1 = $ array; ...

adobe - Why are my Alert.show windows *backwords*? -

I am writing an Adobe Air application, and for some reason, when I execute an alert. The show, dialog box shows that the text is backwards on the back, the label on the button is behind ... and when I say backwards, I mean the exact mirror image, not just the spelling word with letters in reverse order . If you see a dialog box in the mirror, then it looks right. I'm doing it like this: Warning. Show ("help, I'm back!"); Anyone have any ideas? Thank you, disappointment It changes because it is due to such a problem That was made when I updated Flex 4.0 to Flex 4.1. You can find the solution here: One less thing: D

winforms - C# Mouse Tracking Drawing Odd Behavior -

I have just created a few simple codes to track mouse offset from where the mouse in your current position Moves into the picture box. I am outputting a label's difference and it works fine. So say I like nests in X Location: 20 Y: 20 then left from mouse 5. My result is X: 15 Y: 20. Now this problem occurs when I take these results (diffX and diffY) and add them to an integer (testOne and testTwo). The result is fast different. The most relevant is that when I place the mouse in no place, but press the button. The results continue to grow. I have reduced my problem in the following code: point startpoint = new point (); Bool dragging = false; Int testOne = 30; Int testTwo = 30; Private Zero Picture Box 1_MouseMove (Object Sender, Mouse Event Ergus E) {If (Drag) {Int diffX = (PhotoBox 1 pointpointlient (E. location) .X - startPoint.X); Int diffY = (pictureBox1.PointToClient (e.Location) .Y - startPoint.Y); Label 9 Text = diffX.ToString (); // Works, shows the desired...

iphone - How do I persist a Facebook instance in multiple IOS view classes? -

I have been a reader of the stack overflow for some time and am eager to participate! On the question ... I'm programming for about 10 years, but new to iOS programming; Objective c. I'm trying to create an application that requires a Facebook login when the app opens, then a view needs to be loaded with the logo and a Facebook login button. I can do this and I can work with no problem. After logging in with Facebook, my application will send an API call to my server and authenticate them with my system and send a callback with their system permissions. If it comes back that they have the right permission to advance, then they will send a tabbed interface with a view. I also have a tabbed interface working I have created a First VCA controller to handle Facebook login button, and look at the controller for each tab. MyAppDelegate.m file will contain something like this: - (BOOL) Application: (UIApplication *) Application FinishLaunchingWithOptions: (NSDictionary ...

How to run more than 24 values in the visual foxpro in the "In" clause? -

I am using FoxPro 5.0 I have more than 3,000 records to run a query, for example my query remove from mytable.dbf where the field name is not in (1,2,3 , ...... 3909) This does not execute. Because FoxPro only allows 24 records in these clauses. How can I execute this query? No Simplification Ideas The following code indicates how you can delete records in a table based on the records in another table Are there. Conserve Table 1 (PKI) Create Table 1 (PK) values ​​in (1) INSERT (2) table 1 (PK) values ​​in Insert in Table 1 (PK) values ​​(3) Table 1 (PK) values ​​(4) Include in Table 1 (PK) values ​​(5) Insert table 2 (PKI) table 2 (PK) values ​​in cursor (2) Table 2 (PK) values Insert (4) Delete from table 1 where table 1.pk (Table 2 to select table 2.pk)

I want to call a method after particular time until my app opened in iphone? -

I want to call a method after every 2 minutes, how can I apply such a logic? You can use .. [NSTimer scheduled timer Withtime Interface: 120.0 Target: Self Selector: @Silator (Your Function :) User Ink: Zero Repeats: Yes]; ......... .......... (void) Your Function: (nstimer *

Plot a new series on an already-rendered jquery flot graph -

I have a float graph which is already providing a data series, i.e. var plot = $ Plot ($ ('# placeholder'), [data1], options); At a later point, I will get some new data which I have to plot on the same graph as a separate data series. Is there any way that I can just add this new data series to the current graph, and then do not need to recreate the whole graph? That is, I want to avoid making another call like this: var plot = $ .plot ($ ('# placeholder'), [data1, data2], options) ; and instead make a call like this: plot.addSeries ([data2], option); Thanks! @Black Box Operations are general descriptions quite well. When you repeatedly $ If you call Plot (...) then there are some problems with the memory leaks before the latest version (0.7). Either you can get the details of setData, setupGrid, and can attract methods.

android layout - How to set Height of linerlayout through java code -

In the xml file, I am using relative layout as a parent. In it I use linolereout for child How can I set the height of the linear layout? Thanks in advance Try this code which will determine the height of the linear layout. RelativeLayout in case .. Hope this will work correctly ... LinearLayout linearLayout = (LinearLayout) findViewById (R.id.linearLayout0); Linear layout SetminimalMight (Minhite);

Android Image Issue -

In my application, there is an image in the list view, change the image's image to another. I can identify which image has been clicked and it can be given a new image. After doing this properly it will not change the image after reloading it. How can I change the image without reloading? My program section status_id will show the return value of 0 or 1 holder.favorite.setOnClickListener (New View.OnClickListener) {Public Zero onClick (see v) { The string is the integer.toString (position) of the integer status_id; holder.favorite.setImageResource (0); status_id = change_status_of_Favorite (channel- [status], channelfavo [position]); if (status_id == 0) {channelFavo [position ] = "False"; holder.favorite.setImageResource (R.drawable.favorite_gray); Toast.makeText (activity, "Excluded from Favorites", Toast.LENGTH_SHORT) .show ();} else {ChannelFavo [status] = " True "; holder.favorite.setImageResource (R.drawable.favorite_icon); Toast.makeText...

Can modulus/modulo work on big numbers in python? -

Using a mod at a large number like 600851475143 does not give the right answer, why do anyone know? print 600851475143 / 2.0 print 600851475143% 2.0 print 4 / 2.0 print 4% 2.0 600851475143 / 2.0 = 300425737572.0 600851475143% 2.0 = 1.0 4% 2.0 = 0.0 I was working on creating my own master number function and this is fine for small numbers Works, but it seems to break the modular number gets bigger. I'm just roaming with the dragon and Euler challenge and now beating my head against a wall for a while I ha. Thank you. & gt; & Gt; & Gt; Print 600851475143/2 300425737571 & gt; & Gt; & Gt; Print 600851475143% 2 1> gt; & Gt; 4/2 2 & gt; & Gt; & Gt; 4% 2 0 In addition to: There is nothing to do with the large number of problems - it is only about executing the integer in Python.

clearcase remote client - How to move windows CCRC views to UNIX CCRC? -

I need to move Windows CCRC views to a UNIX CCRC server, therefore: How to access all users on a UNIX CCRC server? How can CCRC server be accessed through CCRC client? I have just reinstalled the CCRC server (such as after any other ClearCase installation, the following: d) I need to use any type of user access (to ensure that user logins are still valid on new UNIX servers ): ' id -a auser ' should work. Any CCRC customers, Windows or Linux, will be able to access the new CCRC server provided they: Change the connection address Re-enter your web ideas Rebuild (I do not move the visual stores forward: it was easy to reproduce what was needed for them). D. Note: A Unix CCRC server will not be able to access the Vib server on Windows, only Vob Server on Unix If your current Windows CCRC is reaching the UNIX Vob Server then migration will be easy. If not, that means migrating Windows from WIBs to Unix, and this is another task;)

php - Adding exactly 100 values to database using ajax -

O people, 3:36 AM and I need to be mentally promoted. Simple question, is the easiest / quickest way to add 100 points to a database, please assume that everyone will not work due to write, duplicate, poor data etc. I am trying to update the database with value 100. Once I have a good piece of data, I have to add it to the database and I will use the function called updateDB. This function just writes a latitude / LNG coordination for the database. If there is a duplicate or write fails, then I send "error" from php and the loop must continue to continue collecting data, unless I have 100 points from the database. This function that I am using CCT is used for XSAS prevention, please ignore it, it works fine. //// More than this (100-completed & gt; transmitted) ++; UpdateDB (LAT, LNG); /// more junk and then this function functionDB (lat, lng) {var cct = $ ("input [name = csrf_mysite]"). Val (); $ Ajax ({type: "post", url: "/ form...

emacs ido-mode select and edit completion -

Using ido to complete the file, is it possible to choose and edit for the first time? For example, if I had this, I'd like to complete with apple, but not with IDO-Extit-Munebfer, so I can add apple at the end: to: Search the file: / home / me / {apple | Pears | Armadillo | ...} To: Search the file: / home / me / apples Cheers, CE (edit the input string) seems to be doing this Want to

documentation - Clear Definition of the the scope of a software project -

Everyone has to write a report for a piece of software I developed, and one of the first things should be defined What is the scope of the project? There are many definitions about the projects in the General , but how would you define it in relation to any software product? I suggest reading.

c++ - convert std::string to nsstring issue -

नमस्ते मैं NSString पर std :: string को परिवर्तित करने के लिए निम्न का उपयोग करता हूं लेकिन इसे वापस (रिक्त) जबकि nsstring के मूल्य को प्रदर्शित करने की कोशिश कर रहा है मुझे रूपांतरण की स्थिति में रिक्त स्थान के बजाय (रिक्त) लौटने की आवश्यकता है StudyDate = [NSString stringWithCString: studyDate length : strlen (studyDate)]; "> संपादन: NSString के निर्माण के लिए वाक्यविन्यास @" स्ट्रिंग " को केवल उपयोग किया जाता है। std :: string के साथ आपको मानक "string" वाक्यविन्यास का उपयोग करना चाहिए। NSString * aConstantNSString = @ "foo"; Const char * aConstantCString = "foo"; Std :: string aConstantStdString = "foo"; CFStringRef aConstantCFString = CFSTR ("एफयू"); आईफोन एसडीके की शुरुआती शुरुआत के बाद से यदि स्ट्रिंग में केवल एएससीआईआई वर्ण होते हैं, तो अक्सर आप कर सकते हैं। आपकी विधि केवल तभी काम करती है जब अध्ययन डेटा एक सी स्ट्रिंग (अर्थात const char * ), लेकिन आपने कहा है कि आपक...

web applications - Eclipse: convert "dynamic web module" to "web fragment module" -

I decided to split a dynamic web application into two dynamic web applications, one main part and a project specific part. If I run Maven then I get the jar file through its palm.xm project. However, with WTP I am not able to understand Eclipse to deploy core projects. If I'm editing the target file name in the "Depler assembly" of the project, from a jar-file if I blah.war to blah.jar , then close it's project properties and Re-open it again - it's a WAR-file again. / P> So I decided to try to make the core project a web piece module (when I split the original project, I did not notice it). If I unselect "dynamic web module" and in the project aspects "web piece module" then I do not have permission to click on "apply" or "ok" because they are in-depth. What do I do now? Finally I want WTP to write a jar file of the core project in the libfolder of the web project. Edit: I tried to find a clear difference be...

security - Configuring tomcat server to forward requests to other web server -

On ports 9944, I need a security layer above this level on webpubs in web site, which accepts the request, then Internally forwarded (not redirected) request to the JBoss server without any changes to the URL on the client side, like this I need a layer of proxy from above my WebApp layer I need such a thing for security reasons. If any request comes from the browser, it will be hit on that proxy layer first, then it will forward the request internally to me. The webpage instance without any change in the browser address bar. Any ideas how can I move forward? If the proxy is in the same web application then you can use it. .forward () in the Servlet API. If the proxy is in a separate web application then you should request an HTTP connection and request for a primary application. There are several different ways to do this, including Apache HTTPClient, Spring Restamplate, Jersey Client, etc.

PHP PDO returning single row -

अद्यतन 2: तो यह सबसे ज्यादा अनुकूलित हो सकता है ? $ DBH = नया पीडीओ ("कनेक्शन स्ट्रिंग यहाँ जाता है"); $ STH = $ डीबीएच - & gt; तैयार ("तालिका 1 से आंकड़ा चुनें"); $ एसटीएच - & gt; निष्पादित(); $ परिणाम = $ STH - & gt; लाने (); प्रतिफल $ परिणाम ["आकृति"]; $ डीबीएच = नल; अद्यतन 1: मुझे पता है कि मैं एसक्यूएल क्वेरी में सीमा जोड़ सकता हूं, लेकिन मैं भी foreach लूप से छुटकारा पा रहा हूं मूल प्रश्न: मेरे पास निम्न स्क्रिप्ट है जो डेटाबेस से कई पंक्तियों को लौटने के लिए अच्छा आईएमओ है "Foreach" खंड। मैं यह कैसे अनुकूलित करूँ, अगर मुझे पता है कि मैं हमेशा डेटाबेस से 1 पंक्ति प्राप्त करूँगा। अगर मुझे पता है कि मुझे केवल डेटाबेस से 1 पंक्ति मिलेगी, तो मुझे नहीं पता कि मुझे अग्रमच्छ लूप क्यों चाहिए, लेकिन मुझे नहीं पता कि कोड कैसे बदलना है। $ DBH = नया पीडीओ ("कनेक्शन स्ट्रिंग यहाँ जाता है"); $ STH = $ डीबीएच - & gt; तैयार ("तालिका 1 से आंकड़ा चुनें"); $ एसटीएच - & gt; निष्पादित(); $ परि...

swing - Java: JTable not showing icons properly -

Image
In my application, I have to display the file system file in JTbables. When I click on Jetri node (which is a system folder), then the content of that folder is shown in JTable. In the first column of JTable (where the name of the file or folder icon is shown), the icon is obtained from the system icon and displayed. Everything is working fine, however, the problem is that when the renderer renders the icon, then the first line icon (the first line of the jetties) is repeated in all the rows. I mean that the icon does not convert to JTable later rows. Here is my code in which a render icon appears and the model displays in JTable class KeyIconCellRenderer DefaultTableCellRenderer {public KeyIconCellRenderer (string Ext) {File file = new file (ext); Icon icon = FileSystemView.getFileSystemView (). GetSystemIcon (file); SetIcon (icon); }} And here's the code where I'm using the render to display applies the Private class selection to TreeSelectionListener {Public Z...

ruby on rails - obtain :title field in controller -

I want to store page titles in some place for later use. I used Nifty-Generator to generate layout How to use the value, which was determined according to the title () method? Do I have to hold it in the controller? Is it stored in a reaction somewhere? Or do I need to move the title setting to the controller's action, because I wonder what do I have to do with the MVC nature? If you want to use any of the variables in more than one request, keep it in the controller needed. There are several ways to do this: You can pass this variable in the URL. Put it in session Keep cookies in it You can also use Flash in Rails.

Display pdf from the weburl iphone sdk -

I am working on a project, I want to display a PDF on the website, I have a PDF URL Besides how I can do this, I want to make PDF thumbnails on the website. You can display a PDF UIWebView * webView = [[UIWebView alloc] initWithFrame: CGRectMake (0, 0, 360, 420)] in your device. ; NSURL * targetURL = [NSURL URLWithString: @ "http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIWebView_Class/UIWebView_Class.pdf"]; NSURLRequest * Request = [NSRR request request with url: targetURL]; [WebView loadRequest: request]; [Self.view addSubview: webView]; [Webview release];

upload - Salesforce - Is it possible to display image file from ContentVersion to custom visualforce page? -

I wrote a simple visualfold page that the user should upload the file to an ContentVersion Object. Now I want to display the saved image in my custom view panel page. Is this possible? It looks like & lt; Apex: image & gt; can not be used & lt; Img href = "{! Cv.contentVersion}" ... ... & gt; There was no luck. The real problem is that I successfully uploaded the image file but what is its URL? I have tested it out on Google with random URLs and I can display the image (like /../..some.jpg "). But I do not know what is the full URL for the image file that was uploaded. Contentversion. Note: This is not a static resource because my users can change their user image often. Code Public image utilizer controller with shared code {public Lab file {get; set;} public string image file path {get; set;} public content server cv {get; set;} public image uploadtist controller () {cv = [selection id, version data, title, pathOnClient contentVe...

gwt - Inject into anonymous inner class (GIN) -

मेरे पास ऐसा कुछ है: request.findAllProjects ()। आग (नया ExtReceiver & lt ; सूची & lt; परियोजनाप्रोक्सी & gt; & gt; () {@ ऑवरराइड पब्लिक व्हॉयड ऑन स्यूवेस (लिस्ट & amp; प्रोजेक्ट प्रॉक्सी & gt; प्रतिक्रिया) {view.setProjects (प्रतिसाद);}}); यह अमूर्त वर्ग ExtReceiver के गुमनाम आंतरिक वर्ग है एक्स्ट्रिसेवर एक त्रुटिहैंडलर के साथ त्रुटियों को संभालने के लिए है जिसे मैं प्रदान करना चाहता हूं। सार्वजनिक अमूर्त वर्ग ExtReceiver & lt; T & gt; प्राप्तकर्ता प्राप्त करता है & lt; T & gt; {निजी त्रुटिहैंडलर त्रुटिहैंडलर; सार्वजनिक ExtReceiver () {} @ सार्वजनिक विन्ड सेट एररहेन्डलर (त्रुटिहैंडलर त्रुटिहैंडलर) {this.errorHandler = errorHandler; } @ सरस्वती पर सार्वजनिक सार शून्य को ओवरराइड (टी प्रतिक्रिया); @ विफलता पर सार्वजनिक शून्य को ओवरराइड (सर्वरफ़ाइलर त्रुटि) {errorHandler.exception (त्रुटि); } @ ओवरराइड सार्वजनिक शून्य पर उल्लंघन (सेट & lt; उल्लंघन & gt; त्रुटियां) {मान्यकरणउलिल.प्रक्रिया उल्लंघन (त्रुटियां); }} मुझे समझ में आ...

dreamweaver - formating PHP source code with DW? -

There is no way to format PHP code with Dreamweaver. So it clearly looks ?? Dreamweaver is not really a PHP Dev device, while it can edit PHP files and syntax to highlight it. "post-text" itemprop = "text"> Designer's side more capable PHP Developer Tool can be formatted for ELSEX.

javascript selected value -

I created a div to create a function, when u seals the value in the dropdown box, divs on length The number of will be created, therefore the code and select The function is tested function testing () {var result = get_id.options [get_id.selectedIndex] .value; If (results == 1) {var i = 0, c = model_details_json.com liberation, Jammu = c. Length, communication_dig = document.getElementById ("model_small"); If (j == 0) {alert ('nothing'); } (; I & lt; j; i ++) for {var communication = c [i]; Var create_div = document.createElement ('div'); Create_div.id = 'communication_id' + i; Create_div.name = 'Communications'; Var create_anchor = document.createElement ('a'); Create_anchor.innerHTML = communication.communication_name; Communications_div.appendChild (create_div); Document.getElementById (create_div.id) .appendChild (create_anchor); Create_anchor.setAttribute ("href", "javascript: zero (0);"); Creat...

c# - parser String boolean expression -

I should create a search engine so that any Boolean expression like (word1 + word2) -! Word 3 - where + stands for and , - means or and ! means not . Then searches for these words in the database and returns the documents that receive the expression .. Then I used the dictionary like this: dictionary & lt; String, list & lt; Int & gt; & Gt; Word and doc = new dictionary & lt; String, list & lt; Int & gt; & Gt; (); And I searched every word in the database, then added it to the list of document IDs in the document - I have declared two methods. To merge two lists first: Public list & lt; Int & gt; public list & lt; Int & gt; The problem is: How should I parse Boolean expression in the text box (list & lt; int & gt; p1, list & lt; int & gt; p2) The problem is: Where + is then combine two lists of words. If - is in the end, then consolidation two lists to prepare a list of required ...

Quartz Scheduler using database -

I am using quartz to schedule cron jobs in my web application. I am using an Oracle database to store jobs and related information. When I add jobs to databases, I have to start server / app (tomac server) to be scheduled for these new jobs. How can I add jobs to the database and work them without restarting the server. I believe that you are using JDBCJobStore ? In that case, this database is not ideal for making direct changes to the table tables that store data collections. However, I think that you can set up a different job that runs for every x minute / hour, checks whether there are new jobs in the database (which are required to be set), and schedule them as usual.

css - Is it possible to set transparency in CSS3 box-shadow? -

Is it possible to set transparency on box shadow? This is my code: Box-Shadow: 10px 10px 10px # 000; -WebKit-Box-Shadow: 10px 10px 10px # 000; -Move box-shadow: 10px 10px 10px # 000; I think rgba () will work here . After all, the browser support for both is almost the same. / * 50% black box shadow * / box-shadow: 10px 10px 10px RGBA (0, 0, 0, 0.5); div {width: 200px; Height: 50px; Line-height: 50px; Text align: center; White color; Background color: red; Margins: 10px; } Div.a {Box-Shadow: 10px 10px 10px # 000; } Div.b {box-shadow: 10px 10px 10px RGBA (0, 0, 0, 0.5); } & lt; Div class = "a" & gt; 100% black shadow & lt; / Div & gt; & Lt; Div class = "b" & gt; 50% black shadow & lt; / Div & gt;

Google app engine,sockets are disabled,what it means -

I'm reading. I have some files hosted on the Racketspace and I wanted to open them for use in my app. Chairs are disabled, what does it mean that I can not host anywhere other than the files hosted on Google? See urlfetch api for how you can open external URLs.

cocoa touch - iphone sdk - object model context design help -

I need some help to design the iPhone's core data object model reference. I have started making a golf scorecard application using XCode 4, and the way I want the app to behave ... -User (first / last name, initial with ) Players can add Users can add course (name, address details, holes with equal / length) - run a round so that I decide that segment at the top of the scorecard tableview Which is Will not crawl, and show More with the best score at the level of the current score for each player. In the header in the section, I want to show the hole 11: cross as 3/150 meters "and on each line I want to show the button to add the stroke, and the best score on that particular hole. - , Add / delete, the user can also browse the round which player is ever played. What is the best way to design the institutions? I have received some consultations before and they They suggested that I should have it: player: - first_name - last_name - initial - round: * - date - cou...

android - ResourcesNotFoundException when initialising Drawable -

निजी ड्रायनीय ड्रॉएबल; Drawable = this.getResources ()। GetDrawable (R.drawable.icon); जब मैं इसे अपने एचटीसी इच्छा पर चलाता हूं, लेकिन एमुलेटर पर यह क्रैश हो जाता है जब मैं प्रारंभिक ड्रॉअलेबल की कोशिश करता हूं। यह क्यों है? संपादित करें: यहां मेरा स्टैकट्र्रेस है 03-28 13: 27: 58.453: त्रुटि / गतिविधिथीफ्रेड (888): कॉम के लिए प्रदाता जानकारी खोजने में असफल .google.settings 03-28 13: 28: 06.414: त्रुटि / एंड्रॉइड रेंटाइम (888): अनचेड हैंडलर: बिना किसी अपवाद के कारण धागा मुख्य निकलता है 03-28 13: 28: 06.486: त्रुटि / एंड्रॉइड रेंटाइम (888): java.lang RuntimeException: प्रारंभ करने में असमर्थ गतिविधि ComponentInfo {be.test.helloworld / be.test.helloworld.MyMapActivityII}: android.content.res.Resources $ NotFoundException: संसाधन आईडी # 0x7f020000 03-28 13: 28: ०६.४८६: त्रुटि / AndroidRuntime ( 888): android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2268) पर 03-28 13: 28: ०६.४८६: त्रुटि / AndroidRuntime (888): android.app.ActivityThread.handleLaunchActivi...

mysql - count number of days between nextmonth and nextmonth +2days -

Find the number between COUNT numbers in the field created (next month (created date) This mysql query query requires data for both date and datetime EX: Created Expirydate 2-01-2011 2-02-2011 3-04-2010 3- 02-2011 Number of results 1 MySQL is a TO_DAYS () function , Which will give you the number of days for dates after the year 1582. Two dates in the number of days MySQL Date and Time DataMathic DATE_ADD) or Date + Interval 2 days This functionality can be changed to the desired date Can be used to find. See the manual and the difference between one day and that day + interval 2 days is always 2 days according to the definition.

java - Class objects and JSP -

I have a class product that contains the attribute name, description, and value. My intention is to populate the products within the scope of my project. How do I get it? Second, on popularizing products, I want to be able to display each product in a table in a JSP page. Each product will have its own table, its name, description, and value and the cart button must be added I want to populate products in the application scope of my project. How do I get it? So do you want to populate it once during the lifetime of the webapp? Use a circactext listener . @WebListener Public Class StartupListener applies ServletContextListener {@Override Public Zero Context Start (ServletContextEvent Event) {List & lt; Products & gt; Products = LoadIight (like); Event.getServletContext () SetAttribute ("product", product); } // ...} In this way, the products list & lt; Products & gt; Products = (list & lt; product & gt;) getServletContext ()...

javascript - jeditable edit multiple links -

Image
Trying to make jeditable to edit several links, and result onsubmit Function InlineAdWords (LinkId) {$ ('.inlineLinkEdit_' + linkId). Editable ('crudDocumentationLink.htm', {event: 'editclick', Submit: 'Save', Cancel: 'Cancel', Notifier: '' and html: & lt; A href = "$ {document.link}" square = "inline link _ $ {document.id}" id = "inlineEdit _ $ {document.id}" & gt; $ {Document.link} & lt; / A & gt; & Lt; Span style = "display: none;" Class = "inlineLinkEdit _ $ {document.id}" id = "Inline Edit _ $ {document.id}" & gt; $ {Document.link} & lt; / Span & gt; & Lt; Span class = "inlineLinkTrigger _ $ {document.id}" onclick = "editLink ($ {document.id})" style = "cursor: indicator;" & Gt; Edit & lt; / Span & gt; To edit the work but I need to update that value according to user input. So what...

java - Hibernate bidirectional @ManyToOne, updating the not owning side not working -

I have a very simple setup to try bidirectional mapping with annotations: @ entity public class type a abber modell and lieutenant; Type A & gt; {@Id @GeneratedValue Private INAD; @OneToMany (mapped = "A") private collection & lt; TypeB & gt; Bs; // Gates & amp; Setters ...} and @EntiType public class TypeB abber modell extension & lt; TypeB & gt; {Private Stable Last Long Serial Year UID = 3526384868922938604 L; @ ID @ Generated Private Private ID; @ManyToOne () @ Zone column (name = "A_ID") Private type AA; } When I set property TypeA.bs it does not affect mapping, although this should look like the following example: TypeB b = new TypeB (); This.typeBDao.save (b); TypeA a = new type A (); A.setBs (ListUtils.createList (b)); Println (a.getBs ()); // Output: [TypeB @ 25fe4d40] this.typeADao.save (a); Println (a.getBs ()); // Output: [TypeB @ 25fe4d40] this.Typeadao.refresh (a); Println (a.getBs ()); // Output: [] This Type...

c# - asp.net Reading images from a database and outputting -

Image
The images I have in my database table are stored and read from the database and output these images in the asp.net page. Are looking for. Does anyone have any suggestions or suggestions for this? Thank you You must create an Ashx handler then some tags in your page output Insert and in the handler category, you can read the image with DB and stream the client down with the response. Remember to set the content type correctly here is an example: As soon as you are working with the first version, you need to improve it by adding some cash handling, but we start making handles :)

How to send a like to facebook from delphi? -

In my app I have a small custom button that only shows a faby icon and links to the business page. I want to display the button so that the number of choices on the page increases. So far, I only see a link to fetch graphic such as FB so that it can be liked. How do I leave the right way? Your user needs to go to a page on Facebook so that Facebook can confirm its account And their choice of "likes" you can not go around - it is by design so that spammed applications can not force users to "like" their will.

Use the Android gallery to display Media RSS -

I know that the original Gallery app on Android can display pictures stored with Picasa Web Account. I searched for SDK, but could not find that there is no way to get Media RSS available in basic gallery applications (and ideally will work with any gallery application). I have thought of creating a ContentProvider, to make them available, but the gallery seems to display only what is included through MediaStore. If you have any ideas, then let me know. Thank you very much.

Sort list by field (C#) -

मेरे पास वर्ग की तरह है: वर्ग SortNode {सार्वजनिक Int32 m_valRating = 0; सार्वजनिक सॉर्टनोड (Int32 valRating) {this.m_valRating = valRating; }} और कुछ सूची refSortNodeList : सूची & lt; SortNode & gt; RefSortNodeList = नई सूची & lt; SortNode & gt; (); यादृच्छिक रेफरल = नया रैंडम (); के लिए (इंट आई = 0; आई & lt; 100; ++ i) {refSortNodeList.Add (नया क्रमबद्धनोड (पुन: रैंडम। अगला (-10, 30))); } Foreach (varSortNode में refSortNodeList) {Console.WriteLine ("SortNode रेटिंग {0}", varSortNode.m_valRating है); } आसानी से मेरी refSortNodeList द्वारा m_valRating फ़ील्ड को कैसे सॉर्ट करें? या शायद मुझे कुछ और सूची वर्ग का उपयोग करने की आवश्यकता है? धन्यवाद! list.Sort ((x, y) = & gt; x.m_valRating.CompareTo (y.m_valRating));

silverlight - How to navigate without HyperlinkButton beatween two pages? -

I create two pages on my scratch silver application, pages appear on the main page (main page is a user control ). Now, I want to see page 1 on top and navigate to page 2. I can not add the hyperlink button. How can I add page 2? And how can I navigate from page 1 to page 2 (can be from the main page that contains page 1 and page 2) I try to do something deceptive and not work. Code & lt; Navigation: Frame x: name = "framedivator" source = "/ view / page 1.xaml" & gt; // Anyway, page 2 needs to be added & lt; / Navigation: Frame & gt; Are you trying to show both pages at once? And why do not you want a hyperlink button for us? If you want users to click on something and go to page 2, but you do not want to look like a hyperlink button, you can change the contents of the hyperlink button. & lt; HyperlinkButton.Content & gt; & Lt; Image ... /> & Lt ;! - or whatever - /> & Lt; /HyperlinkButton.Content...

hibernate - another auto generated field which is not the ID -

I want to create another autogunated field in my class. I followed this unanswered question - no success I need a more simple thing - I want my second area - like @ID @ autozenited Is there a way to do this to get the price? Try this kind of example. Validated: incorrect, updating = false) private integer column; @ generatedValue (strategy = detection) @ column (name = "columnname", exclusive = true, empty = false, insertable;

mysql - Clear transaction deadlock? -

Using "show engines show Inrodb position 'I think that WordPress has two deadlock I would like to clear these, But I do not see an active process for any one of these CMDS (ie some 'kill' and hopefully compels a rollback). I can see the thread ID, query edit: this is the (relevant?) Part of the situation: P > ------------------------ Latest Decked Deadlocks --------------- - -------- 110,327 10:54:14 *** (1) transactions: transactions 9 FDA 0 99 e, active 0 seconds, operation start number 14207, OS thread ID 1228433728 index 1, lock 1 lock Read mysql table Wait 2 lock struct (s), stack size 376, 1 row lock (s) MySQL thread ID 12,505,112, query id 909492,800 Juno .... edu 129 .... 54 wor Where Remove from dpress_user update wp_options OPTION_NAME = '' _site_transient_timeout_theme_roots '' *** (1) it offered waiting to lock record locks space ID 4951009 page no 4 n bits 384 index `table Ke` option_name` wordpress_work` .`wp_options` TRX ...

ms access - Loading table from database with large integers in R -

I am trying to load the data from the state education access database into the data frame in R. The database provides information about schools in the state, and each school has a 12-digit identification number. When I Demofactors & lt; - Loading table with sqlQuery (connection, "SELECT * FROM 'demographic factor" WHERE YEAR = 2010 ") This number appears to be scientific notation (which is here It is apologetic for not keeping a good understanding of inner workings). When I try to convert them back to an integer, because they are in the database demo.factor $ ENTITY_CD & lt; Using as.integer (demo.factors $ ENTITY_CD) I get a bunch of NAs and integers that do not match the original. Is there any other data type that I should use? Is there any way to recover the original intent or import them from the beginning? Thank you very much for your help! Your problem is that an integer value is only 2 * 10 ^ 9 (i.e. ~ 9 digits long) Can handle t...

algorithm - Binary tree recursive problem -

I found this problem and I'm not completely sure that my approach is correct: "A binary tree can be encoded using two functions L and R, such as node n, L (n) left child n (or zero if none) and R (n) gives the right child (Or zero if none). Test (L, R, X) Root node for binary tree with encoding from L and R functions with x To make a simple recursive algorithm for taking binary trees, and "yes", no node in the tree is not exactly a child, give the pseudocode for this algorithm. " I Tried to do this: test (l, r, x) if ((L (x)! = Null & amp; r (x)! = Null) || (L ( X) = "null and r (x) == faucet") "yes" other ("L, R, L (X)" test (L, R, L (X)) == "Yes" test ("L "X") == "Yes" test (L, R, R) and "No" returns "Yes" return Is that correct? If L and R functions are there, why is the function passed as a normal parameter? Thank you in advance for your reply! The...

c# - Dictionary throws exception even after checked for null -

I am trying to read a value of one key from a dictionary like the following: If (myDic ["myKey"] = null) {} I can see that I am checking the blank, but still throws this KeyNotFoundException. How should I check more? Please advise! It seems that you are confusing the behavior of HashTable Code> Dictionary & lt; Vaccines, televisions & gt; With . The HashTable class will return an null value when the key will not be present, while the dictionary & lt; Vaccine, tv, gt; will throw an exception. You have to use either included or TryGetValue to avoid this problem object Values; If (myDic.TryGetValue ("apple", outside values)) {...}