Posts

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 में यह कहते हैं: एक जनरेटर पी ...