Posts

Showing posts from May, 2012

java - Error in my hibernate request -

Hello, I have an error when I execute a request with Hibernate Error ast.ErrorCounter (ErrorCounter.java:33) - Line 01:22: Found the expectation of the president '*' My claim: public rechercheValeurTarifs () Throws exception {list tarifs = null; . {Tarifs try = getHibernateTemplate get () ( "FE_TARIF_IDF * Choose." + "From" FE_TARIF_IDF + "Where FE_TARIF_IDF.D_ANNEE (Select Max (FE_EXERCICE_FISCAL.D_CEXER) from FE_EXERCICE_FISCAL);"); If (tarifs == zero) {tarifs = getHibernateTemplate () ( "SELECT FE_TARIF_IDF. *" + "FE_TARIF_IDF the" + "in the WHERE FE_TARIF_IDF.D_ANNEE (select MAX (FE_EXERCICE_FISCAL.D_CEXER-1) from FE_EXERCICE_FISCAL);";}} catch (Exception e) {System.out.println (e .getStackTrace ());} Return tarifs;} My hbm.xml file: & lt; XML version = "1.0" & gt; & LT; DOCTYPE hibernate-mapping public "- // hibernate / hibernate mapping DTD 3.0 // eN" "http:...

user interface - Starting a GUI process from a Python Windows Service -

I am creating a Windows service class in Python which will eventually display a window when some conditions are met. Since (as I think) services can not have a GUI, I am trying to start a GUI in a different process (using subprocess.open ) when the conditions are correct Probably not, because the hair process has the same privileges as the service. So how can I start the process from a Python Windows service that has the ability to display a GUI on the screen? If you offer your service, then allow the service to interact with the desktop Permission to be able to create windows without the need to launch a subprocess.

c# - Problem displaying a linq query in a datagridview -

Hello: I am working on a C # project that reads an XML file and returns a list of lists. When I want to display a list, I do this: IEnumerable & lt; Foo & gt; MyFooQuery = Of MyLists Select T start-down blocking by order (L = & gt; L. bar) in the selection; DataGridView1.DataSource = myFooQuery.ToList (); My problem is that when I do this, you can not click the Data Header to sort the DataGrud view. I tried your follicles. Encunable (), but then nothing shows up in the datagrid view, even if I expect the calculation of the query. Am I clear about something, or what do I have to use? (?)? You can try: Enumeral Collection & lt; DataRow & gt; MyFooQuery = Of MyLists Select T start-down blocking by order (L = & gt; L. bar) in the selection; Dataview myDataView = myFooQuery.AsDataView (); DataGridView1.DataSource = myDataView; Edit - Line commented // dataGridView1.DataBind ();

Simple question about tuple of scala -

I'm new to Scala, and what I'm learning is taple . > I can define a tuple as the following, and get the items: val tuple = ("Mike", 40, "New York ") Println (" name: "+ tuple .0) How to get the length of tubal? Is Tupal Unstable? Can I modify my items? Is there any other useful operation that we can do on tuple? Thanks in advance! 1] Tupel.product error 2] No. 3] Some interesting operations you can do on Tupla: (a small REPL session) scala> Val x = (3, "hello") x: (int, java.lang.String) = (3, hello) scale & gt; X.swap res0: (java.lang.String, Int) = (Hello, 3) Skal & gt; X.toString res1: java.lang.String = (3, hello) scale & gt; Val y = (3, "hello") y: (int, java.lang.String) = (3, hello) scale & gt; X == y res2: Boolean = true scale & gt; X.productPrefix res3: java.lang.String = Tuple2 scala & gt; Val xi = x.productIterator xi: Itater [any] = empty eater sca...

c++ - Subsequent insertion of records with QSqlTableRecord fail after first error -

I have problems inserting data into SQLite database by using QSqlTableModel. The table is created like this: QSqlQuery createTblSMS ("Create table sms_tbl (" "Reed bullion tap," "Reditime datite," "Outtime datetime faucet," "Sender text not faucet," "Receiver text tap," "SMS Content text, "" primary key (arrival time, sender, receiver)) ";); I am including this type of archive: smsModel-> InsertRecord (-1, sms); QString Error = smsModel-> Last error (). Text (); SmsModel- & gt; SubmitAll (); SMS modal is QSqlTableModel If I put a value for example then this value (false, zero, '2010-06-30 17:27:55 ',' 075710383 ',' A142140 ',' Top 15 # 2 ') - Record is inserted. For example, if this record is placed after this record (false, zero, '2010-06-30 10:05:29', '075710383', 'one 142140', 'top 15 # 3') - this The record is al...

php - Session overlap, 2 users logged in somehow the system sees them as one -

Hardly our system is logged into users and I do not understand why. Scenario: 2 User Login (A & B) Normally everyone has their own ID, at some point the user (A) takes the ID of another user (B) and contributes to the website Like it is B. Technically this is happening: 1-2 users log in: Each user requests a "login" action from the Single Signon (SSO) server That runs on PHP, and a session is created for each user (sessions are stored in Memkach-X) 2- Users have different IDs: On each user's web server The second session will also be run on Ruby (ROR) at Memcached-Y Scripture saves each page they enter the RoR, is an iframe Czech who requests authentication SSO user browser. 3- At some point, User A resides in the form of B and BB: The log files SSO states that User A is still User A and User B is still User B, while ROR The logs show that user AB is given, it is still the same session ID. At that particular moment we checked the keys coming from ROR's...

Scala for comprehensions and partial map -

स्काला भाषा विनिर्देश अनुभाग 6.19 कहते हैं: ए समझने के लिए के लिए (पी एंड एलटी; - ई) उपज e0 को e.map {case p = & gt; E0} अतः ... scala & gt; सूची [या तो [स्ट्रिंग, इन्ट]] = सूची (वाम (बुरा), सही (1) (यानी [स्ट्रिंग, इन्ट]] = सूची (बाएं ("बुरा"), दायां (1) ) स्कला & gt; (वाम (एक्स) & lt; -l) उप-एक्स 5: सूची [स्ट्रिंग] = सूची (खराब) अब तक इतनी अच्छी है: स्केला & gt; L.map {केस वाम (एक्स) = & gt; X} & lt; कंसोल & gt;: 13: चेतावनी: मैच संपूर्ण नहीं है! लापता संयोजन सही एल.मैप {मामला वाम (एक्स) = & gt; X} ^ scala.MatchError: सही (1) $ anonfun $ 1.apply (& lt; कंसोल & gt;: 13) पर ... दूसरा संस्करण काम क्यों नहीं करता है? या फिर, पहला संस्करण क्यों काम करता है? यदि आप पैटर्न का उपयोग करते हैं अपने के लिए में मिलान करना - संकलक वास्तव में नक्शा लागू करने से पहले एक exampleOf -check के साथ फ़िल्टर पर कॉल डालेंगे कोड>। संपादित करें: इसके अलावा अनुभाग 6.19 में यह कहते हैं: एक जनरेटर पी ...

c# - Does code contracts really help unit testing? -

I have a fair amount of knowledge on unit testing. I want to read about code contracts. Does this really help in unit testing? Is it over-rated, especially when we talk about code-contract, help in testing the unit. I specifically mention contracts in .NET 4.0. I use nunit for unit testing. yes and no . The unit test is basically a contract that says, MyMethod () takes X, and hopes that the result of Y will be, and when it does not happen, then unit tests fail and you will not be able to develop the MyMethod As you are warned, some codes inside this contract help you to write unit tests, because you need to know the requirements of the unit tests rather than the contracts. To make it easier when you type them. However, the correct reason for the code contract is not for you, but for other developers using the API you created. With unit tests you get the proper input and output, but when you leave the code in the wild, unit tests are not released with .dll. Code Contract Ot...

Need help with Linq filtering in C# -

I have an hour's name collection, which is composed of hour objects, two properties in an hour, employee income and hours The employees have made records in and out of punch and an hour. So at the end of a week, I have been given an hour of tilt hour items for the mill workers of DAO. It is requested that a report is made, where only one threshold is shown to the total hourly staff. Example: A simple and flattened hourly Id | Hours ---------- 1 | 4.5 2 6.0 3 9.9 1 5.52 2.5 The threshold is 10. In this case, I want to record only one ID record, because its salt hours are more than 10. I know that I have a new DAO method when I return the list of hours for the first time to handle it. I can also make this very incompetence with a foreach statement, though I am trying to be better with Linq and want to see if it is possible. Thanks in advance for any help. var filtered = timlist. Group By (H = & gt; HID). Select (g = & gt; new {id = g.c.a., hours = g.SUM (h =...

java - Android: ListView fixed height of child view -

How to set a fixed high (in dip) for the child's view of the ListView component? I am using the relative layout as the root layout for the child view When I set the background image in relative layout it can be very high ( Maybe the background picture may be larger, because) and I want to set the exact height in the DP. While stopping the problem, looking for answers to some related questions. Anyway, the problem is to increase the scene. Instead of increasing a new layout, instead of raising your getView (or newView), instead of inflater.inflate (R.layout.your_layout, null) Instead of using the cursor adapter) / Pre> Instead: inflater.inflate (R.layout.your_layout, guardian, incorrect) Passing the view of the parents honors the child with the parent's limits, and there are false meanings that you instruct the Influencer not to attach it to the parents. After placing a certain height in the dip, it will work.

c++ - How to replace allocators of stl with actual source code -

I need to replace the allottee with my original source code. I extract the exported methods from the PE export table and weird I am facing long allocations where STL containers were used in the original source code. That is, if the source code was: typedef std :: list & lt; Std :: basic_string & lt; _TCHAR & gt; & Gt; TokenList; EXPORTS_API Constant Tokens & amp; GetLiteralList (); From the export table I'm receiving: std :: list & class; Std :: basic_string & lt; Unsigned less, std :: char_traits & lt; Unsigned mini & gt; ;; Class study :: allocation & lt; Unsigned minor & gt; Class std :: allocator & lt; Class std :: basic_string & lt; Unsigned short, struct std :: char_traits & lt; Unsigned minor & gt; Class class-allocator & lt; Unsigned minor & gt; & Gt; & Gt; & Gt; Const & amp; __thiscall CExpressionTokenizer :: getLiteralList (zero) How do I get the background in my original s...

php - Is there a way to set the default database handle with mysql_query? -

Is there a way to set default database handle with mysql_query? So I know that mysql_query can be called without a SQL handle, but then it will basically use whatever you get with previous mysql_connect if I want to decide The default is to handle myself, so how can I do it? I want to make it clear that we have all the code written without our handler. We do not have those changes that we have some code that changes the database between different database clusters. We want to be able to switch between databases repeatedly without having to call mysql_connect. Super Ghetto version. $ defaultHandle; Function SetDefaultHandle ($ handle) {global $ defaultHandle; $ DefaultHandle = $ Handle; } Function q ($ query) {global $ defaultHandle; Return mysql_query ($ query, $ defaultHandle); }

c# - Creating a collection for a base type with methods that will work on all inherited objects? -

I am currently starting a new project and I have participated in some part of a reading block. I am hoping someone can help me and I will do my best to describe this problem. I have the basics class called "entitybase", this class has about 100 or so legacy classes. There are several ways in EntityBase like load () and save () which are common to all my heritage classes. There are also some constructors that accept an integer or an IDataReader that is used to load the object from the database. All this is working very well. class, named EntityCollectionBase which list & lt; EntityBase & gt; Extends up to. I'm trying to write a load function for this but I'm not sure how to proceed, hopefully this code better can clarify my goal: public hair Load () {bool result = true; (IDataReader reader = _dbManager.ExectureReaderSProc (this.LoadProcedure, new SqlParameter [] {new SqlParameter ( "@ parentId", _parentID)}) {this.Add (New EntityBase (Rea...

java - Lucene Search with Unicode Characters -

I have indexed a database of some texts and database texts are of Unicode encoding. When I search an English term with Lucene Search, everything goes fine. But when I use a non-English queries like: "تو" It gives me the following exception: exception in thread "main" org.apache.lucene.queryParser.ParseException: not parse can do ' ?? ':' 'or'? 'Org.apache.lucene.queryParser.ParseException: org.apache.lucene.queryParser.QueryParser.parse on Search.main (QueryParser.java:187) as a result of the first character in WildcardQuery on (Search.java:151) Not allowed: ' ' or '?' First org.apache.lucene.queryParser.QueryParser.getWildcardQuery (QueryParser.java:923) on org.apache.lucene.queryParser.QueryParser.Term (QueryParser.java:1347) on org.apache allowed as character WildcardQuery is not. lucene.queryParser.QueryParser.Clause (QueryParser.java:1250) org.apache.lucene.queryParser.QueryParser.Query (QueryParser.java:1178) on ...

language agnostic - Are exception hierarchies really useful? -

It seemed to me that I have never seen an exception hierarchy for which the parent class The catch was really useful (of course, for the base exception class, which is is to be derived.) The exception hierarchies are really useful, the excerpts are all exceptions to the language Should the base be obtained from the exception class? Exception hierarchies are useful for grouping related exceptions together, when you have different locations But different granularities are needed to catch on. In all places, it is a matter of general use to adopt all the exceptions. This allows you to catch MyAppException at any time all errors are coming from your application, but still, to hold more specific exceptions when appropriate . (In the .NET, ApplicationException class was for this, but it was disliked for various reasons.) But you can also add exceptions to the limitations of the module, or In any other way that makes sense, use FooModuleException for exceptions coming fr...

history - How and why were linkers first developed as tools separate from compilers? -

Actually, I'm just curious about history. When was the first linker written? What was the argument on time? As the development of multi-language was an issue? Was the goal of this platform? What languages ​​and compilers were supported? According to the concept made by John Levin, at least, around 1960 with the significant development of the modern linkage editor in 1960. They are used by different programs to allow the reuse of libraries of different modules, which they require. I suggest reading text (links above Google Book Search) for more information.

osx snow leopard - Why does Applescript run in Script Editor, but error when saved as Application? -

My applescript needs to detect its own file, and runs fine on the following Snow Leopard (10.6) Set my_name to my name as string display dialog "name:" & amp; My_name Displays this "Name: AppleScript Editor" when I run it from AppleScript Editor, and it displays "Name: NewTest" when I call it NewTest as an app I save. When I run it on a Leopte (10.5) machine, it complains it can not make a name in the "Type string". When I remove the "string" portion, it goes under the script editor, returning "name: script editor", but when saved as an app, these errors occur and say " The name can not be obtained. " What's different about running the script editor and saving it as an app under 10.5? There is another idea here, though I have not investigated. One thing that can cause problems is "mill" generally when you get commands like "command mill" you run a command, then you are a...

javascript - Different Behavior of XMLHttpRequest for <input type="button"> vs. <button> -

निम्न कोड पर विचार करें: index.html & lt;! DOCTYPE HTML PUBLIC "- // W3C // DTD एचटीएमएल 4.01 // एन" "http://www.w3.org/TR/html4/strict.dtd"> & LT; html & gt; & Lt; शीर्ष & gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" src = "script.js" & gt; & lt; / स्क्रिप्ट & gt; & Lt; / head & gt; & LT; बॉडी & gt; & LT; प्रपत्र & gt; & Lt; बटन आईडी = "getInfoButton1" & gt; & lt; / बटन & gt; & Lt; इनपुट प्रकार = "बटन" id = "getInfoButton2" & gt; & lt; / input & gt; & Lt; / प्रपत्र & gt; & Lt; / body & gt; & Lt; / html & gt; Var रेक; फ़ंक्शन initAll () {document.getElementById ("getInfoButton1")। Onclick = getInfo; Document.getElementById ("getInfoButton2")। Onclick = getInfo; } Function getInfo () {req = new XMLHttpRequest (); Var URL = "index.html"; Req.open (...

asp.net - Best way of handling javascript within Custom Controls? -

I have some custom controls in ASP.Net that I have made. I used jQuery where it also helped. Well, a problem that I have (with a clear but "bad" workaround) is that for every user control, I executed some code from within pageLoad ( $ (document) / Code> will not work with the updated panel). Well now my problem is that I have to attach two custom controls to pageLoad event What would be the best way to do this? I just can not do old_pageLoad = pageLoad pageLoad = function () {. .. old_pageLoad ();} Because these custom controls can be used more than once on the page and the script needs to be run for each instance of control, plus what If there are 3 different custom controls on the page? The only way with which I came, it is something that looks like a super hack: old_pageLoad_ Are there any better ways to sort out these kinds of functions? I have also seen this, but whatever suggestions I give, I feel bad about what I am currently doing. ...

python - How to make tkinter repond events while waiting socket data? -

I am trying to create an app reading data from a socket, but it takes some time and lock the interface Does, how do I respond to vaccine events while waiting? It's easy! And you do not even want threads! But you have to make your I / O code a bit smaller. TC is equivalent to the EXTaddyPop () call of XT, which allows you to register a callback function which will be called from mainstream if I / O is possible on the ISO fileliver. This is what you need: Tkinter import tkinter tkinter.createfilehandler (file, mask, callback) from The file is a python file or socket object (Actually, anything with a fileno () method), or an integer file is one of the descriptor mask constants. RADAB or tacenator. Callback is said to be as follows: callback (file, mask) When you are done, callback must be unearned Note: Because you do not know how many bytes are available to read, you can not read or use the Python file object. Readline methods, because they insist on reading a p...

binding - Adding/Deleting items from a databound listbox -

I have recently put an XML file in a listbox, now I want to add or remove items from that listbox I want to type the function. The following error occurred when trying to listbox.items.add or listbox.items.insert: Instead of accessing and modifying elements of Controls.ITSOSOO elements. I googled it and said it instead to work on 'model', But I do not have any clue how to do this, how do I get more data from datasets Can I add or remove? I hate adding XML elements and values ​​to the original and then updating the file as a data source ... How about loading XML in a dataset and then restricting and rebounding the dataset? Instead of using the XML file and binding it in the listbox, try it: () string myXMLfile = "C: \\ MySchema.xml"; Dataset ds = new dataset (); Try {// reads file and data dataset in ds.ReadXml (myXMLfile); // Set the dataset of the list set to // set / Note that if you have a complex XML you need to set it in one of the datasets in...

Fixing a CSS problem for my JavaScript powered nav menu -

Hey, I have a javascript driven navigation bar, which has been used for primary navigation on my website, www.marioplanet .com I am having some problem when I try to adjust the width of my NAV bar so that the rest of my page is flush, and it seems to stop altogether due to some reason. Any suggestions will be helpful and quite appreciative! It appears that "privacy policy" has created a rap in your ul, li In style announcement, add white-space: nowrap; . So it's just for you to play with width in the #nav li style announcement 224px work in Firefox.

converting uppercase to lowercase in C.. (challenging one) -

I have received this code. Now challenging part my professor asked me to create a program that would allow the user to input The uppercase word The problem is that, the program wants to automatically change every input letter in uppercase, even if the user's keyboard is not in caps lock mode. Do not know that in my program really What is wrong not ... anyone ?? help?? I really need it .. thanks .. # include & lt; Stdio.h & gt; # Include & lt; Ctype.h & gt; #to & lt include, string.h & gt; Typingface four string [100]; Main () {Four answers; Int l, x = 0, asc = 13; String s, word 1; Clrscr (); Do {printf ("\ n1 topmost word:"); Do {0 [= 0] = see (); Word 1 [x ++] = s [0]; Strupr (s); Dome (S, "\ 0"); Put (s); } While (s [0]! = (Four) asc); Dome (word1, "\ 0"); Printf ("word \ n \ n 1 word in lowercase:"); For (L = 0; L & LT; Stellen (Word1); L ++) Eucalyptus (Tollar (Word 1 [L])); Printf ("\ nDo you wa...

Mobile Programming for Blackberry, iPod, and Android -

I bought an iPod touch half a year ago, and I recently got an iPad wifi I also got an onyx bold blackberry is. I do not have a Mac Book or any other apple product of laptop. As a programmer, I say C, Delphi and Java I want to start playing around in the mobile app. I do not know if I should start in Blackberry platform, iPod / iPad platform, or Android platform. OK, for each platform, what is the cheapest way to play around the language? 1. Blackberry 2. iPod 3. Android The path of low resistance and the least cost for you Java is the only development for Android, you do not have an Android phone even though I'm sure you can choose the cheaper used. Why: The Eclipse IDE is free, available for free from Google, eclipse plug-ins, iPhone / iPad development

javascript jquery show/hide of columns -

& lt; तालिका id = 'mytab' & gt; & LT; टीआर & gt; & Lt; td colspan = "6" & gt; ओएस & lt; / td & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & LT; टीडी & gt; & lt; / टीडी & gt; & LT; टीडी & gt; फेडोरा & lt; / टीडी & gt; & Lt; td & gt; सेंट ओस & lt; / td & gt; & LT; टीडी & gt; उबंटू & lt; / टीडी & gt; & LT; टीडी & gt; Suse & lt; / टीडी & gt; & LT; टीडी & gt; Redhat & lt; / टीडी & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & Lt; td colspan = "6" & gt; संस्करण & lt; / td & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & LT; टीडी & gt; & lt; / टीडी & gt; & LT; टीडी & gt; 6 & lt; / टीडी & gt; & LT; टीडी & gt; v2.4 & lt; / टीडी & gt; & Lt; टीडी & gt; बीटा 2 & lt; / td & gt; & LT; टीडी & gt; 8 & lt; / टीडी &...

asp.net - How can I identify which controls are updated in UpdatePanel? -

I have a UserControl (UC) that is in an UpdatePanel. When I UC loads, I am in this UC Run a recursive method to set tooltips for all buttons, link buttons, and dropdown lists. Sometimes the problem is that I update 1 control in UC as just a dropdown list, but I have to call the recursive method on all the controls of the UC. I was wondering if there is a way to know which controls are updated in UpdatePanel, I can update these controls properly. Thank you very soon! Many thanks. You can increase every control, essentially have a custom control for each control, and The property is called, for example, IsDirty. During the event of change of control, you can set this property to right, then set tooltips can run through your method, and all the controls of IsDirty property are incorrectly reset from the wrong After completion of your processing.

java - How to clean up combined vars declarations in Eclipse? -

Eclipse can recommend any option in the IDE for cleanup joint wars announcements int a = 0, b, c; / P> In: int a = 0; Int b; Int c; Thanks for the answer. I have a setting or a plugin that can fine refactoring that type is. This will then be a good candidate for a AST (abstract syntax tree) plugin , as you can find in this .

html - CSS: Where is a tag being applied? -

I am working on a website for a volunteer organization whose parent organization has ordered us to re-branding And gave us many css sheets. My problem is: A page is structured like this: & lt; H1 & gt; Heading & lt; / H1> & Lt; P & gt; Blah & lt; / P & gt; & Lt; P & gt; Blah & lt; / P & gt; & Lt; P & gt; Blah & lt; / P & gt; Firebug tells me that, the first paragraph is being given the p.intro property which is making it bigger. What tools can I use to implement tags? Assuming that the HTML you are providing is "view" Comes out of the source (hence it is not being messed up by any server-side processing), so it is almost certainly coming from Javascript. Search all the JS files to mention "Introduction" and you'll probably track it down. If it fails, expand the search for HTML files if you have embedded JSD.

ios - iPhone Objective-C programmatically adding scope buttons to a UISearchBar -

UISearchBar * searchBar = [[UISearchBar alloc] initWithFrame: CGRectZero]; [सर्चबार आकार टॉफिट]; //searchBar.delegate = self; SearchBar.placeholder = @ "खोज संदेश, श्रोता या स्टेशन खोजें"; Self.tableView.tableHeaderView = searchBar; UISearchDisplayController * searchDC = [[UISearchDisplayController alloc] initWithSearchBar: खोजकर्ता सामग्री नियंत्रक: स्वयं]; // उपरोक्त स्वयं को नियुक्त करता है। खोज डिस्प्ले नियंत्रक, लेकिन बनाए रखने के बिना // केवल पढ़ने के लिए संपत्ति को सेट और बनाए रखने के लिए बल दें [आत्म निष्पादक चयनकर्ता: @ सिलेक्टर (सेट सर्चडिस्प्ले कंट्रोलर :) ऑब्जेक्ट: सर्च डीसी); //searchDC.delegate = self; //searchDC.searchResultsDataSource = self; //searchDC.searchResultsDelegate = self; [सर्चबार रिलीज]; [खोज डीसी रिलीज]; मुझे टूलबार के नीचे 3 स्कोप बटन जोड़ना होगा: "विषय", "संदेश", "स्टेशन" और डिफ़ॉल्ट रूप से पहले चयनित एक है। कोई मुझे बता सकता है कि यह कैसे करना है? ओह .. नहीं .. यह पाया .. .. / P> searchBar.showsScopeB...

good cheat sheat or ref card for Rails ActiveRecord -

I'm just starting with the rail and active recordcards, I think I have two models ( is_to , has_one , has_many ), I have to read more about the documentation in order to really understand it Does anybody know about good cheats or rapids that the differences are visible? I recommend this to you (Chapter 2)

Java RESTful Web Service Tutorial with Eclipse and Jetty -

I want to create a permanent web service in Java, using jetties and using Eclipse as EDE To develop. I was thinking that anyone can post or link to me in the initial tutorial (even "Hello World!" Would be good, for starters). Thanks in advance! "Itemprop =" text "> P>

Android String Array Manipulation -

In my Android program I have a long string what I want, I need to split each word of that string And to copy each word in a new string array. For example: If the string "I have programmed an Android" and the string array is named my_array, then each index should include this value: my_array [0] = I my_array [1] = done My_array [2] = Android my_array [3] = Programmer is a part of the program that I have seen: StringToKonizer = New stringctonizer (result, "|"); Toast. Make Text (Appointment This, St. NX), TOST. LNGHHIARAT) Show (); While (st.hasMoreTokens ()) {string n = (string) st.nextToken (); Services1 [i] = n; Toast. Make Text (Appointment This, St. NX), TOST. LNGHHIARAT) Show (); } Can anyone recommend some suggestions .. Why not use? You can simply string [my_array = myStr.split ("\\ s +");

c# - Help! Checking if a field is empty -

I am using linq-to-SQL on an asp.net mvc2 application. I have a table related to Jeff's table. In my application, I do not want the user to enter a value in the IDJefe field, but rather select from Cambodia. What should I ask string string? (IDJF) or (Jeff) empty? Both of these properties are available to me, but this is my first adventure, in creating a full application with Linux-to-SQL. I was thinking of using IDJF as a value to check, because the combo box is a selected index, right? Thank you. Public INIM Marketplace & lt; Rule Violation & gt; GetRuleViolations () {If String.IsNullOrEmpty (Nombre) returns new rules violation ("Nombre requerido", "Nombre"); If the novel violates the New Rule (IDJF == Faucet) ("Jeff Essentials", "IDJephe"); Break the yield; } If you select the IDJefe value, then you have against the blankbox selected value Should check.

java - How can I fix the column in JTable so that the column is always visible -

How can I correct the columns in Jetel so that the column always appears? If I first use JViewport from the table then it is coming true, but when I click on the BTN for the second time, the next column in the geometry is fixed, so it continues every time. You can compare your current approach to the defined column example shows.

html - superfish drop-down displaying underneath text of another div -

I had a problem in the drop-down menu displayed behind a divan, but it is fixed, now it overlaps. The text of the second div is going: It is only in IE7, I think it is also in IE6 but did not test in IE6. Set the Z-index of DI div This drop-down is higher than Zee-index: 1; Google Chrome and Firefox works fine Any help is appreciated. Try adding status: relative; Your "Activity Wall" div. The z-index attribute will not work if your selector is not affiliated. And the context is

multithreading - Questions on simple threading jargons -

Manual reset event is triggered, then all threads waiting on the event are scheduled. When an auto reset event is triggered, then only one scheduler is awaiting the waiting thread on the event. There are really noob questions here to ask me, because I am new to threading. What does it mean to "set" and "reset" an event? What is the difference between manual-reset and auto reset events? When an event is "hint", what does it mean? Does this mean it is active? What does it mean when a thread becomes "Scheduler"? What is "waiting on the event"? Basically, a "waithandle" (which includes both manual reset events and auto reset events) are such that allow a thread. Wait until something is waiting - in this case, till WaitHandle "set". One thread (thread A) can "wait" on a wait room, wait until it has a different thread (thread B) "set" (== "signal") Will allow you to contin...

How do I obtain a value of an HTML field with C#/C++ -

I try to get HTML element based on ID and display this value and return it (As string)). The problem is that it is seen as an object. I have a HTML file containing it: & lt; Label id = "address" text = "asdf" & gt; & Lt; / Labels & gt; I have in my C ++ header file html element {element = this-> webbrowser1-> Document-> GetElementById ("address"); String ^ asdf = element-> GetAttribute ("text"); Asdf back; It creates, but when I launch the program, I get an exception "Object references are not set in an example of an object." I can not use System :: Convert.ToString (); Either, it will not let me build with that. Any suggestion is appreciated. Thank you. Which row throws an exception - the first or the second one? There are 4 or 5 places in that code that can throw that exception, and I will start by doing the job that who he is.

scripting - Using git filter-branch to rewrite authors/committers and commit messages simultaneously -

I have a Git repository that is originally imported from subversion. Some parts of the information of the author / commutator are incorrect, which is not a mistake of GET but is mostly due to earning sloppies with Subversion. I rewrite the history of the repository, communicator and author's information. There is a problem ... I need to embrace the author's information with a comment message i as far as I can tell, git filter-branch Allows you to filter the author information (with - env-filter ) and / or commit commitments (with - msg-filter ) , But not together with the information shared between individual filters, to simultaneously combine both together. That's why I'm kind of stymied about how to do this ... best I can think that it can do in many different ways: First, gather all the messages, then make a script And filter all author / committee information. It appears to be very insensitive and error, so I am thinking that someone else has done ...

django - online game best-practice -

I am developing a Django-based MMO, and I wonder what is the best way for server-client communication Will happen . I found the solution: Periodic AJAX call To keep a connection alive and send data through it After Edit in: This will include "You have a message", "User attacked X", "Transport has arrived for your X" and so on The numbers can increase (such as 1 / sec), but for a specific user they should not go up to 1 minute The server does not respond immediately Request Before time, there is a state update in the server, and the server eventually responds to the customer, which can then update. If there is nothing new to tell in fact, the update period The client within, then the server responds with the "no news" message before it expires, and the client "rests" "The request starts the request. Benefit: The customer does not have to do Ajax Probably too much silly voting traffic is not. D...

To upgrade or not to upgrade. Visual Studio 2008 to Visual Studio 2010 -

I can not find any compelling reason because I should request to upgrade my video studio to 2008, 2008 Pro Studio 2010 Anything Do I Miss Something? This is not just about tooling - if you want / need .NET Framework 4.0 (Runtime) and C # 4 (language not to mention new versions of VB.NET and all dynamic languages) - You have to use VS 2010. Another idea is that all your favorite add-ins have been updated to work with VS2010, because plugin architecture has changed and vendors have to update.

ruby - Reset cache in Thin instances launched by Unicorn -

I have a Ruby WebF that caches some frequently used information in the light layer, but many times I I want to reset the cache without restarting the whole process. Before using Unicorn, I had a known list of ports that I can send a special HTTP request to reset the cache at each instance. However, under Unicorn, the Unicorn process handles all HTTP requests and sends them to different processes in children. Under this model, there is a simple mechanism for sending a message to each launched example, reset your cache? You can configure workers for each after_fork with each main port and for each of those ports Send request. See the documentation.

.net - C# Double - ToString formatting to show a value in cents with no decimal displayed -

I have a situation where I need to show dual value in two decimal places but without displaying decimal has gone. There are some situations where I would like to use the same code and would like to display the double value differently, so I was hoping that I can handle it by passing through a string format pattern. For example, the double value can be: 11367.2232 I should have values: 1136722 Another example, the value may be 344576.3457 I should have assumed 34457635 A third example, the value may be 546788, assuming the value is 54678800 So, I want to do something like this: String.Format ( "{PATTERN}", dblCurrency); Is there any formatting pattern that is round at both decimal places and strips the decimal from being displayed? First , with a few exceptions (this is). To represent such a volume, you should actually use decimal . Second , rounding and display formatting are different functions, and your code should be expressed separately. strin...

ruby on rails - vim/macvim: locate where a method/symbol is defined -

I am using Macwim / VIM for most of my ruby ​​+ ruby ​​on the development of railroad. Is there a method currently defined within a project, what is there any way to reach it, even if it is not in the same file, where it is being implemented? Either a language works in an ignorant way or Ruby / Rail specific way. I recommend using the ctags plugin, how does Brian Leels use it with rail development Done, it gathered a nice screencard. Otherwise the cheat sheet: ^] - Find a tag ^ - T - Back : Tags - Show where you are : tag - anywhere in your tag stack : selection Or G] - Show where something is referenced - W-] - Find a tag in a split window You can see vim help by walking: Help: tags Edit: There is a good screencast for updating your tag file automatically

jquery - jqtouch - no loading image appears -

I am creating a web app using jqtouch and an AJAX link on the external HTML page. When there is internet connectivity, the link works fine, but when the connection is not available, there is no "loading" message. Should it be a default behavior in jqtouch? If so, can not the image be displayed? Thank you for your help OK I have done it by myself . js code: $ (function () {$ ('# link') .tap (function) {$ ('# myloading'). CSS (" Display "," "); window.place = this.href; return false;}); $ ('# Myloading') center ();}); JQuery.fn.center = function () {this.css ("position", "absolute"); This.css ("top", ($ (window). Height () - this.height ()) / 2 + $ (window) .scrollTop () + "px"); This.css ("left", ($ (window). Width () - this.width ()) / 2 + $ (window) .scrollLeft () + "px"); This return; } and insert a div on the page: & Lt; / Div & gt; an...

Android orientation issue -

I have an application that only works in landscape orientation I had set it in XML layout when I started the application It works fine. But when the application starts and the next time I lock the phone and then unlock, the application is in the first 1-2 second portrait mode and then in the scenario. Is it possible to leave 2 seconds? Define it clearly in your manifest android: screenorientation = "portrait" every & gt; Activity & gt; Add element.

php - UTF8 characters not printed as such in Drupals HTML -

I'm trying to debug a bad utf-8 problem, and do not know where to start The word 'carriageia' n 'in one page should be classified. Obviously something is wrong with UTF-8. It happens with all these multilingual characters. I have scanned gazial topics on UTF 8, but they cover mostly basic information, this is not the situation where everything is properly Is configured and is set correctly, but not clearly. The pages are provided by Drup a MySQL database Database Microsoft (not mine) was migrated by SQL-dumping and -importing trough phpmyadmin. Good chance there was something wrong, because before, there was no problem. And because the problem is only on old, imported items. Editing these objects or adding new ones, and handling incorrectly encoded characters, fixes the problem, though I'm not seeing any difference in the database. Content Re-edited Trough Drupal does not have this problem. When, on CLI, using MySQL, I can read that text and get the c...

GWT/JAVA - Getting an AJAX call into a dialog box -

I am new to GWT, and there is a problem showing the results of an AJAX call in my dialog box. I set my own dialogue box, Vpanel, and feedback labels here: VerticalPanel Event DiffetWindows = New Vertical Panel (); Last dialog box dialog box = 2 new dialog box (); DialogBox2.setText ("Event Details"); DialogBox2.setAnimationEnabled (true); Final HTML Server Response 3 = New HTML ("& lt; b & gt; Ok, It's Working & lt; / b & gt;"); ServerResponse3.addStyleName ("detailView"); EventDetailWindow.add (serverResponse3); EventDetailWindow.addStyleName ("detailWindow"); DialogBox2.setWidget (eventDetailWindow); RootPanel.get ("detailWindow") add (eventDetailWindow). Then, in the onSuccess method I have this: dialogBox2.setText ("Remote Procedure Call"); ServerResponse3.setHTML (results); DialogBox2.center (); CloseButton.setFocus (right); However, when this appears on the feedback page, not in the dia...

windows phone 7 - Tap and Hold (Long Press) -

Anyone has implemented Tap & amp; Still hold in a Windows Phone 7 application? I can complete some possible methods like Kidown / keyboard and a timer or manual start / manipulation and see a timer. Still it kills me that it is less than an idea approach because different apps have different timer settings which lead to inconsistency. Br> Am I missing something? I was hoping for a tap endless event The hold method for all ideas is this long press Will handle the function.

In .NET development, what is the breakdown of WinForms/desktop developers versus ASP.NET developers? -

WinForms / डेस्कटॉप विकास vs. ASP.NET विकास करने वाले .NET डेवलपर्स का अनुपात क्या है? क्या बहुत ज्यादा ओवरलैप है? क्या वे बहुत अलग कौशल-सेट हैं? मेरा अनुमान है कि यह शायद 60/40 विभाजन है वेब विकास के पक्ष में लेकिन मुझे लगता है कि एक अधिक रोचक प्रवृत्ति यह है कि दोनों वेब और खिड़कियां शिविर महत्वपूर्ण विवादों को देख रहे हैं। विंडोज निश्चित रूप से WPF और गैर- WPF लाइनों के साथ बंटवारे निश्चित रूप से है, क्योंकि WPF ऐसी एक अलग यूआई मॉडल प्रस्तुत करता है। WPF अभी भी विंडोज डेवलपर्स का एक छोटा प्रतिशत है, लेकिन यह निश्चित रूप से कुछ जमीन प्राप्त कर रहा है मुझे लगता था कि WPF शायद केवल 10-20 प्रतिशत विंडोज के विकास को बना देता है। वेब विकास अधिक दिलचस्प हो सकता है क्योंकि आपके पास केवल सिल्वरलाइट विभाजन पर नहीं चल रहा है, लेकिन आपके पास MVC विभाजन हो रहा है । पारंपरिक एएसपी.नेट विकास अभी भी राजा है, लेकिन एमवीसी निश्चित रूप से महत्वपूर्ण कर्षण प्राप्त कर रहा है और सिल्वरलाइट एक शक्तिशाली आला बन रहा है हो सकता है कि एएसपी.नेट, एमवीसी और सिल्वरलाइट में क्रमशः 60-25-15 विभाजन हो ...

Rails datetime with single textbox for date and time drop downs -

I have a Rail Form, which has Dateline input I have a single text box I would like to create that user will input in the MM / DD / YYYY format (or through jQuery's datecocker) and then the time input will be based on the 12-hour point spreading downwards. I found this plug-in - - to handle the part of the 12 hour time, but I'm not sure how to make a text box (and only date). I could convert this text to multiple text boxes instead of several drop-downs through this plugin - I want to do it with at least controller logic so if its name It is possible in such areas that the railways who know how to add them, which will be ideal. In the field of a text you can do this only by a JavaScript mask, in the input field of the date Build hidden areas with each part. If you want to use Javascript anyway, use it to select date or trust for a user to input the date in a specified format, both scenarios will give you a formatted string , So that you can easily parse it # ...

python dictionary is thread safe? -

Some said that the dragon dictionary thread is safe, does it mean that I can not modify or edit items in a dictionary Can not I? Two concepts are completely different, that means two threads modify the same object at the same time The system can be left in an inconsistent state. He said, you can not modify a dictionary while walking on it. See. The dictionary P should not be mutated during recurrence. It is safe to modify the values ​​of the keywords (as is the Python 2.1), as you repeat on the dictionary, but The keys are not set up for such a long time only.

branch - svn branching and tagging best practices -

I have a project for which I am ready to create a branch, which will be 1.0.x for all 1.0 . .x Changes I have to do a set of tags according to changes made in that branch, i.e. 1.0.1, 1.0.2 etc. When I am creating 1.0.x branch for the first time, I am also making a tag called 1.0. At this point, the branch and the tag have the same content (as I had changed the 1.0.x branch, I would create new tags for 1.0.1, 1.0.2 as described above). It seems that the way svn stores a bit of duplication with the branches and tags is it a good practice to make branches and tags? Or is there a better way to do this? Thanks, Jeff svn really does not care how projects are stored , Truck, tag, branch layout is just a suggestion. It seems that you are going to use your branch for the development of the main branch, and then for tagging the branch to be posted as a version, it seems to me that traditionally used in the trunk Brunch is done. Here's a pretty standard development cycle: Buildi...

KPI Adjustment Table -

I have a table with the monthly summary of the KPI client now wants to be able to make adjustments in the original data. I am allowed to preserve original data along with adjustments. The report that I generate will show any adjustments by reporting the original data + or subtraction Here is an example that I need to be able to do. A report requests to minimize KPI_1_QTY from customer 5/31 kPi_1_QTY 88 Customer 5. This result is being KPI_1_QTY 83. I need to report 83, but have to keep the original value also. Any ideas about the code are many ways to address the general problem of having audited trails of the original data. The simplest line is to include the timestamp and in the "IsHead" bit field. For example: FactID timestamp attribute value is 2 8/1 kPi_1_QTY 83 true 1 7/31 kPI_1_QTY 88 false If you have "head of data" "If you want a branch, then you filter on IsHead = true (usually you create a view for it). If you want a change l...

javascript - callback function return global object :/ -

कृपया नीचे वर्णित मेरी समस्या के साथ मदद करें: var भूमि = कार्य () {this .cities = []; } Land.prototype = {addCity: फ़ंक्शन (शहर) {this.cities.push (शहर); }} Var शहर = फ़ंक्शन () {this.val = "foo"; }; सिटी.प्रोटोटाइप = {टेस्ट: फ़ंक्शन () {this.val = "bar"; console.log (this); }} Var myLand = नई भूमि (); MyLand.addCity (नया सिटी ()); // यह पंक्ति वापसी सही - सिटी ऑब्जेक्ट - :) myLand.cities [0] .test (); फ़ंक्शन कॉलबैक (एफएनसी) {एफएनसी (); } // यह पंक्ति वापसी विफल - वैश्विक ऑब्जेक्ट - :( // मुझे पहली बार कॉलबैक (myLand.cities [0] .test) के रूप में सिटी ऑब्जेक्ट की आवश्यकता है; ऐसा इसलिए होता है क्योंकि आपका कॉलबैक फ़ंक्शन fnc पैरामीटर सीधे, और संदर्भ का आह्वान करता है fnc में कोई भी बेस ऑब्जेक्ट नहीं है ( fnc किसी भी सुलभ वस्तु के लिए बाध्य नहीं है) इस से बचने के कई तरीके हैं, सबसे आसान आईएमओ, एक अनाम फ़ंक्शन का उपयोग करने के लिए होगा, और वहां आपके फ़ंक्शन निष्पादित होगा: कॉलबैक (फ़ंक्शन () {myLand.cities [0] .test ();}); उस तरह से, यह ...

actionscript 3 - Controlling an embeded SWF movie(audio/sound) file in flex -

So I'm trying to get the sound on my Flex application, then only to load an SDF movie with audio But when it is loaded on init (), it loops non-stop here is a sample code: [embed (source = "assets / alert 03.swf") ] Private var alert01 Sww: class; Private Vendor 01 Loader: Movie Clip; Private function init (): zero {alert01Loader = MovieClip (new alert01 SWf ()); Alert01Loader.stop (); Alert01Loader.gotoAndStop (0, empty); //this.addChild(alert01Loader); } It just gets useless! And I can not stop it. I tried to use OGG but was running slow in loading. MP3 is no good because it's not free right now. Any suggestions on using audio in Flex would also be great! stop () and goto ANDStop functions Control the frame navigation - do you have the proper functions defined in those frames? WARNING 3. Define stop audio / play audio functions in swf document class and call them Main SWF

javascript - jQuery foo.html("<span>bar</span>") not changing foo[0], so what does it mean? -

फ़ायरबग में, jQuery का उपयोग करते हैं, यदि निम्न एक करके किया जाता है: foo = $ ('& Lt; div & gt; foo & lt; / div & gt;') foo [0] // = & gt; & Lt; div & gt; Foo.html ('& lt; span & gt; बार & lt; / span & gt;') foo.html () // = & gt; "& LT; अवधि & gt; बार के & lt; / span & gt;" फू [0] // = & gt; & Lt; div & gt; $ ('Body')। प्रीपेड (foo) // = & gt; पृष्ठ के शीर्ष पर स्थित शो बार यह अजीब है कि foo.html () दिखाता है span , लेकिन foo [ 0] दिखाता है div ... असंगतता क्यों है? ऐसा लगता है कि foo एक span तत्व के लिए एक jQuery आवरण बन गया है foo [0] को span भी नहीं दिखाना चाहिए? html () & lt; div & gt; तत्व की आंतरिक एचटीएमएल संपत्ति लिखता / पढ़ता है; यह तत्व की जगह नहीं है आपके पास वास्तव में अब क्या है & lt; div & gt; & lt; span & gt; बार & lt; / span & gt; & lt; / div & gt; तो नहीं, यह विशेष रूप से अजीब व्य...

javascript - ul with links remains selected -

I have a side bar menu in which the UL-> Li-> A is styled with CSS, so that one vertical To be shown on the menu on the left. I have noticed that when I select an option, a thin tree will surround the dotted line box (menu buttons) that I have chosen. For me it looks "wrong", is there any way to stop it from appearing? Thank you! A: active {framework: none; }

Alternatives to GNU diff? -

Image
अंतर आमतौर पर निर्बाध उत्पादन उत्पन्न करता है यहाँ एक अच्छा उदाहरण है यदि हम इसके साथ शुरू करते हैं: वर्ग वर्ल्ड डीफ़ हैलो हैलो "हैलो, विश्व" अंत डीईएफ़ अलविदा डालता है "अलविदा, दुनिया" अंत की समाप्ति ड्रॉप दूसरा तरीका और सबसे पहले बदलें: वर्ग वर्ल्ड डेफ हैलो "हैलो, # {से}" एंड एंड diff -u एक कुल गड़बड़ी होगी - दो तरीकों का सुझाव दिया गया है विलय: वर्ग विश्व def हैलो - डालता है "हैलो, दुनिया" - अंत - डीईफ़ अलविदा - डालता है "अलविदा, दुनिया" + "नमस्कार, # {से}" अंत की समाप्ति अधिक उचित के बजाय डालता है: वर्ग विश्व def हैलो - "नमस्कार, दुनिया" + डालता है "अलविदा, विश्व" - अंत का अंत यह सिर्फ एक खिलौना उदाहरण है, इसलिए diff डालता है "हैलो, # {स्वयं}" अंत - डीईफ़ अलविदा डालता है क्या diff के कुछ विकल्प हैं जो कुछ हद तक चालाक हो सकते हैं? (ड्राफ्ट डिफ उपकरण) ने यह रिपोर्ट की: उपकरण जीएनयू अंतर और wdiff का उपयोग करता है।

create file on desktop in c++ -

I know that we use the following code to create a file in c ++ #include & lt; Iostream & gt; # Include & lt; Fstream & gt; using namespace std; Int main () {offstream out; Out.open ("exemple.txt"); Return 0; } I have to follow my question. I want to create a desktop.txt file on the desktop or in another directory, how to make the desktop easier to do? Please help with this kind of help? out.open ("example.txt", "C: \ Users \ David \ Desktop"); The main problem with your code is that '\' has the escape character C / \ C ++ So when you put the string: "C: \ users \ David \ Desktop" slash is running from the next character and thus they are not really part of the string and Do Use escape sequence for slash '\\' "C: UsersDavidDesktop" to compensate for it There are two options for: / code> like this: "C: \\ user \\ David \\ Desktop" Or use to isolate the character f...

How to push information from a PHP proxy to a Flex application -

Then I have a PHP proxy that receives information from a website Assume that the proxy (www.example.com) Getting information from it checks whether the number of lines is as before, if there are more lines, then considering the difference, the flex client needs to push this information that it is new information, (x) There are more lines written. I do not know how to push push mechanism on php proxy because I'm not sure how to actually push the customer to a proxy, never before. Any help? Normally, you can not initiate a transfer from the server side. You can set a timer in the Flex application that sets fire on every 2-3 seconds and checks for php proxies for updates by using Use Direct Sockets (Straight) to push data - To use sockets, clients need to open some ports which may be blocked by their firewall.

Variables in Batch FTP script -

in C you type % username% as the for the current user name for the directory listing and such as: c: \ documents and settings \% username% Is there anything like this for batch script? Just do not help using the % username% . I have written a script which accesses my FTP server so that I can load the file on the server. I want my friends to use this script, but I do not want to write many different scripts. Even I have so far: @echo off @ftp -s: "% ~ f0" and goto: EOF Open FTP.server.com User Pass CD / Home / FTP Bin If you change the batch file, then it can be done when you write the script file in the script file for each script file when the batch file is running. > Using echo command , which you can type in ftp Can send. The reason for this is that% code before expanding the echo script file will expand the username% variable: @echo off del script.txt echo open FTP server. Com & gt; & Gt; Script.txt [echo the rest of the scr...

$.get in Jquery problem -

I'm trying to use $ ajax (restful service) call $$. It works perfectly in IE but gives '401 unauthorized' in case of Firefox. At first I thought this was an 'NTLM authentication' issue and tried to add the domain (easy to serve - eg: config -> network.automatic-ntlm-auth. Trusted-uris) but no success. I'm sure this is not an NTLM issue, just as the Firefox is entering the same URL (cool service) in the browser Update: / H3> I think this was due to the 'cross domain' issue because the SAC has mentioned. I have another doubt w.r.t JSONP, the service I am using does not support additional parameters in the URL. But if I want to use JSONP callback, then I have to add "callback =" is there a way for the URL that I can get it. By your comment: If my server is on ABC Xyz .domain.com, I'm trying to access data from efg.xyz.domain.com. I also closed this server, but the same error abc.xyz.domain.com and efg.xyz.d...

php - MySQL autoincrement problem -

I have an auto-assignment field, for example I have 1,2,3 values, when I put 4 and it Removal will usually be the next 5. I delete 5 and after a long time, 1 week says that when I put a new record next time 4 happens. Can someone tell me why this happens, why the last entry ID of this table after new record is obtained after a long time, and it is not taking into account the deleted records. PS: It happens after a long time, it's working fine when I'm doing it in a short period Remember the last auto-increment value for table column is stored only. It is not written for a table or something else so if you restart your server (i.e. for backup) the last penny value (5) is lost and the table scans for the last value in the mysql table.

windows - DLL loading with hardlink -

I am trying to develop a method that helps to load DLL from a common location for different products. is. This file helps in the following directory structure to avoid replication. INNSTALLDIR / Product1 / bin INNSTALLDIR / ProductN / bin> Instead of copying the DLL in the bin directory, I can create a DLL repository / directory - 'DLLrepo' in INSTALLDIR and can load all the products aviable. I am thinking of doing this by creating a hardlink in each DLL in 'DLLrepo' in the bin directory of each product. This will help in addressing platforms starting with WinXP using the 'check' method only at Windows Server 2008 and above address. If your opinion looks like a proper solution then I have to get your opinion. When we make a file hardlink, the Explorer or DIR does not account for the valid size of the folder containing the command link. It records the actual data size in the linked file in the total size of the directory. If I'm not mistak...

c# - Call a method of type parameter -

क्या ऐसा कोड करने का कोई तरीका है: वर्ग जेनेरिक क्लास & lt; T & gt; {शून्य फ़ंक्शन ए () (टी.ए.); }} या, प्रकार पैरामीटर के एक समारोह को कैसे कॉल करें (प्रकार कुछ मेरा कस्टम वर्ग है)। एक सामान्य प्रकार ऑब्जेक्ट की एक विधि को कॉल करने के लिए आपको इसे पहले इन्स्तांत करना है। सार्वजनिक स्थिर शून्य रननस्पेट () {var c = new GenericClass & lt; SomeType & gt; (); } सार्वजनिक कक्षा जेनेरिक क्लास & lt; T & gt; जहां टी: कुछ प्रकार, नया () {सार्वजनिक जेनेरिक क्लास} ((नया टी ())। FunctionA (); }} सार्वजनिक वर्ग SomeType {सार्वजनिक शून्य फ़ंक्शन ए () {// कुछ यहाँ कंसोल। Writite ("मैंने यह लिखा है"); }}

formatting - How to set thousend separator for PostgreSQL? -

I want to format the long number using thousend separator. It can be done using the to_char function: SELECT TO_CHAR (76543210.98, '999G999G990D00') But when My UTF-8 encoding is done on the Polish version of PostGreySQL server windows, such that this type of selection ends: Error: invalid byte sequence for encoding "UTF8": 0xa0 Hit: This error can also occur if the byte sequence does not match the encoding required by the server, which is "Closed Int pattern g is defined as: group separator (local Uses) . This selection works without error when the server is running on Linux with Polish locale. As a solution I use the place in the format string instead of g , but I think that should be such a way, set the thousend separator in the defined Oracle: Optional session SET NLS_NUMERIC_CHARACTERS = ','; Is such a setting available for PostgreSQL? If you use psql , you can execute it: \ pset numericlocale example: test...

c++ - Multiple Inheritance Template Class -

क्लास संदेश A {}; वर्ग संदेश B {}; टेम्पलेट & lt; कक्षा T & gt; वर्ग कतार {सार्वजनिक: आभासी ~ कतार () {} void submit (T & amp; x) {}}; कक्षा ए: सार्वजनिक कतार & lt; संदेश ए & gt ;, सार्वजनिक कतार & lt; messageB & gt; {}; Int main () {ए एए; aa.submit (messageA ()); aa.submit (messageB ()); } मेरा पहला सोचा है, उपरोक्त कोड ठीक होना चाहिए, क्योंकि कक्षा ए में 2 ओवरलोडेड फ़ंक्शन शामिल होंगे, जो संदेश A और MessageB ऑब्जेक्ट स्वीकार करेंगे। हालांकि , कंपाइलर मुझे निम्नलिखित त्रुटि देता है: क्या मुझे पता है कि एक अस्पष्ट क्यों है? क्या यह बिल्कुल स्पष्ट नहीं है, 1 के लिए कॉल सबमिट करें, मैं संदेश ए संस्करण को कॉल करना चाहता हूं? 2 जी सबमिट कॉल के लिए, मैं मेसेज बी वर्ज़न कॉल करना चाहता हूं? ------ बिल्ड शुरू किया गया: प्रोजेक्ट: मेन, कॉन्फिगरेशन: रिलीज़ विन 32 ------ कंपाइलिंग ... main.cpp। \ Main.cpp (21): त्रुटि C2385: 'सबमिट' का अस्पष्ट उपयोग हो सकता है 'सबमिट' आधार 'कतार में & lt; messageA & gt;' या 'क्यू'...

java ee - Dynamic Junit Test -

As part of my final project of study, I have to create a J4 EEE application that allows users to run a Junket Test (Without any experience) click to do them and see the result), obviously there should be a way to modify this test and make new ones (upload new test files) ... You tell me about the right technology Can that allows me to load and run tests on the fly ?? Thank you in advance for your help You take a look at the implementation of OSGI (sources) in the pix test Test Equipment (1) This device generates OSGI bundles with zyunit tests on the fly and runs them within the testing of the OSGI Container. You can apply the same approach to JBEE. Hope this will help you estimate and estimate your project range. Cheers, Demetro (1):

iphone - NSDictionary losing its contents (exc bad access) -

So I have a uiviewcontroller, it has a property of NSMutableArray, which maintains a non-basic, synthesized property. DeodeLoad in view I put it in with the following, and also add a button in the NAV bar. test = [NSDictionary dictionaryWithObjectsAndKeys: [[SearchField alloc] initWithName: @ "subject": text], kSubjectKey, [[SearchField alloc] initWithName: @ "source publication": text], kSourceKey , [[SearchField alloc] initWithName: @ "keyword": text], kKeywordKey, [[SearchField alloc] initWithName: @ "author": text], kAuthorKey, [[SearchField alloc] initWithName: @ "color": boole] KColorKey, zero]; NSLog ([NSString stringWithFormat: @ "LOOL% d", [test count]]); The first log, when running through the debugger is running fine. However, I have tied the following code in the button: - (zero) search: (id) from sender {nsstring string string with format: @ "lol% d", [test Count] ]); When this code cra...