Posts

Showing posts from January, 2015

java - Int cannot be referenced -

I am trying to split two integers into two different variable variables with the same input. For example, the input will be formatted as 11 2 or 1027-11, always a place between these numbers. X and Z systems. OutprintLine ("Please Enter Value for X and Z"); // different x and jade int x = KB.NXINT (); Int [] var = XZ.split (""); I get an error that when I try to create XZ in a partitioned array, the difference can not be removed. Is there an easy way to split these variables? The method is found in the string class

java - HibernateTemplate has incompatible types error after upgrading from Spring 3 to Spring 4 -

I'm trying to upgrade an application to use the latest version of Spring. It currently uses 3.5.6 in Spring 3.0.7 and Hibernate. I am able to successfully upgraded in the spring 3.2.8, but if I did it spring have been upgraded to 4, if I get errors in compiling the following: [error] / user / mraible / dev /foo-upgrades/foo-core/src/main/java/com/company/foo/dao/companydb/impl/hibernate/InFaxDAOImpl.java:[71,82] incompatible type [ERROR] necessary : Java.util.List & lt; Com.company.foo.common.domain.FaxPage & gt; [Error] found: java.util.List & lt; Capture # 49? & Gt; The method call looks like the following: list & lt; Fax page & gt; Fax Page = getHibernateTemplate (). FindByNamedQueryAndNamedParam (query name, hklperm, value); I can fix the compilation error by casting list type, but it does not look correct list. & Lt; FaxPage & gt; faxPages = (List of & lt; FaxPage & gt;) getHibernateTemplate () findByNamedQueryAndNamed

Is there any simple way to set max id of ID column using trigger before insert in MS SQL Server -

I've seen almost every post about this question, but some of them have not captured the best one I recommend using the identity , but I would also like to use the trigger to increase the integer column to some trigger because in this case more removed in my table will be given. Apart from this, as I have come mainly from Interbus DBMS, where I used to create one before the insert trigger on the table, so far this problem is useless till I have come to MS SQL Server from Interbase . Thus, I declared the variable M integer as the currency currency_bi for the active currency before the interbase 0. Choose from currency Maximum (ID) +1 Initially: M; If (: M is the tap) then M = 1; new.id =: meters; End So, as I should use it often, which is the best way to create a trigger that increases the integer columns using the maximum (ID) +1? Do not use triggers to do this, kill performance based on your transaction usage Or cause all kinds of concurrency problems and lockin

.length showing value 1 in javascript -

मेरे पास निम्न फ़ॉर्म है & lt; form name = "client-login" method = "पोस्ट" ऑनसबमिट = "रिटर्न चेक_फॉर्म ();" & gt; & lt; लेबल & gt; ईमेल & lt; / लेबल & gt; & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "क्लाइंट-ईमेल" मान = "" & gt; & lt; br / & gt; & lt; लेबल & gt; पासवर्ड & lt; / लेबल & gt; & lt; इनपुट प्रकार = "पासवर्ड" नाम = "पासवर्ड" मान = "" & gt; & LT; इनपुट प्रकार = "submit" नाम = "सबमिट करें" मूल्य = "सबमिट करें" "& gt; & lt; / प्रपत्र & gt; और नीचे जावास्क्रिप्ट समारोह है Check_form () < / code> & lt; स्क्रिप्ट & gt; समारोह Check_form () {var ईमेल = document.getElementsByName ( "क्लाइंट ईमेल"); वर पासवर्ड = document.getElementsByName ( "पासवर्ड"); चेतावनी ( email.length); अगर (email.length == नल) {email.style.border = '1px ठोस लाल'

c# 4.0 - How to enter in new line using windows phone emulator -

How do I access a new line using Windows Phone Emulator? I am trying to use the "Enter" key but I can not find it in the new line. OK, I got the solution accept return = " True "

android - Error in XML- unbounded prefix -

Can someone explain why I got this error? My styles in res / layout folder are. Xml I & lt; Resources & gt; & Lt ;! - Base Application Theme, Depending on the API level, this theme has been replaced by App / Base-vXX / styles.xml on the new devices by AppBaseTheme. - & gt; & Lt; Style name = "appbashtheme" parent = "theme.excompat.light" & gt; & Lt ;! - Theme customization available in new API levels can be found in Res / values-vXX / styles.xml, whereas backward-compatible optimization can go here. - & gt; & Lt; / Style & gt; & Lt ;! - Application theme - & gt; & Lt; Style name = "Aaptim" parent = "appbashtheme" & gt; & Lt; Item name = "Android: Button Style" & gt; @ Style / buttonTheme & lt; / Item & gt; & Lt; / Style & gt; & Lt; Style name = "buttonTheme" origin = "Android: widget.button" & gt; & Lt; Item name = &quo

gruntjs - Extending a scaffold build -

I have created a bootstrap app that is with Oman and Grunt, but now to add another library (D3) the wanted. I have downloaded D3 with Kashmir and included the script tag and everything works in development. When I run the dist build, the D3 Lib does not appear in the distinction folder and returns the app to the errors because it can not be found. The best workflow of staging setup using nesting, broom and puberty Try it, Download and install the package: > hoarse-bower-install < / Pre> Update Index OX

java - Send notification to the client from a web server -

In my setup, there is a weblogic server that runs various restore services that accepts an HTTP request from the customer (an Android app), reads data from a MySQL database, and this data as a client's response Sends. My requirement is that as soon as the database is updated, the customer should be informed. I have applied a "voting" mechanism, constantly sending requests and inquiries for any changes made to the customer database. Although this is not a very efficient mechanism, can you please suggest any effective way of getting it? Thanks in advance! One way to write a cron job for an overview of database changes. Also, so this topic has already been discussed. Refer to the link given below,

printing - CPrintDialog Creation Failing in Service Mode of an Application -

I have an application that automatically prints the report. I'm using CPrintDialog to get printer DC I am Zero CMyClass :: PrintReport () {CDC DC; CPrintDialog printDlg (FALSE); PrintDlg.GetDefaults (); :: DeleteDC (printDlg.m_pd.hDC); LPDEVMODE pDevMode = printDlg.GetDevMode (); if (pDevMode) {pDevMode- & gt; DmOrientation = DMORIENT_LANDSCAPE; :: GlobalUnlock (pDevMode); } HDC HDC; If ((hDC = printDlg.CreatePrinterDC ()) == NULL) {:: GlobalFree (printDlg.m_pd.hDevMode); :: GlobalFree (printDlg.m_pd.hDevNames); Return; } :: GlobalFree (printDlg.m_pd.hDevMode); :: GlobalFree (printDlg.m_pd.hDevNames); dc.Attach (HDC); // Attach a printer DC dc.m_bPrinting = TRUE; Dc.setMapMode (MM_LOENGLISH); / * Print Logic using DC * /} This works fine when I run my application in debug mode, which comes with an AA console application. However, CPRIIDO is the creation when I fail to run the application as a Windows service. Am I doing something wrong? :( Please help me. Note:

Rails 4 multidomain application with locale set for each domain i18n locale -

In a Rail 4 Multidomain app, I will need a set of local files (3 domains total) for 4 languages ​​for each domain. Some translations overlap between domains, but some of them are very specific, so I'm thinking of a structure that would be something like this: < Code> config / locase / nnlf.iml.dinl.it.iml # All domain config / locale / domain1 / nnlf IML. D.M.L. have been raised by. Domains taken by domain 1 config / locale / domain 2 / n.imil.fr.yml ..de.yml ..it.yml # have been taken by 2 domains / config / locales / domain3 / en.yml. .fr.yml ..de.yml ..it.yml # This domain has been raised by 3 Is it possible in Rail 4? And if so, what would be the best way to go about this setup? In config / application you will have: some_domain = Rails.root.basename.to_s # This will give us "myapp.com" if the app is in "/ var / www / myapp" .com "config.i18n.load_path + = Dir [Rails.root. To_s] This will load only the required files and shoul

javascript - Dojo 1.9 How can I add a blank to the dojox/layout/TableContainer? -

How do I open an empty & lt; Td> can add to dojo TableContainer I have this code: var tablecontainer = new tablecontenter ({id: "filteTableContainer", cols: 3} ); Which tablecontent translates (6 TDs due to the widget label): & lt; Table & gt; & Lt; TR & gt; & Lt; Td> Widget 1 label & lt; / Td> & Lt; Td> Widget 1 & lt; / Td> & Lt; Td> Widget2 label & lt; / Td> & Lt; Td> Widget 2 & lt; / Td> & Lt; Td> Widget 3 label & lt; / Td> & Lt; Td> Widget 3 & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt; I & lt; Td> How can I create a third set of empty set of Currently I have tried to drop an index, because I thought it was just leaving any widget on the third set of kernel Will give For example: tableContainer.addChild (productTypeIdTextBox, 0); TableContainer.addChild (dummyButton, 1); TableContainer.addChild (dummyTextBox1,3);

PHP MySQL Warning : mysqli_fetch_array() expects parameter 1 to be mysqli_result -

इस सवाल का पहले से ही एक उत्तर है: < / p> 33 उत्तर यह मेरा PHP कोड है: & lt; html & gt; & Lt; शीर्ष & gt; & Lt; title & gt; एसक्यूएल डीबी प्रबंधन & lt; / title & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; h1 & gt; mysqladmin & lt; / h1 & gt; & LT; तालिका & gt; & LT; टीआर & gt; & Lt; th & gt; & lt;! - शीर्षक 1 - & gt; & lt; / th & gt; & Lt; th & gt; & lt;! - हेडिंग 2 - & gt; & lt; / th & gt; & Lt; th & gt; & lt;! - इसे खाली छोड़ें - & gt; & lt; / th & gt; & Lt; / टीआर & gt; & Lt;? Php $ db_host = "mysql.freehostingnoads.net"; $ Db_username = ""; $ Db_password = ""; $ db_name = ""; $ db_table = ""; $ db = mysqli_connect ($ db_host, $ db_username, $ db_password, $ db_name); अगर (mysqli_connect_errno ()) (मर ("MySQL से जुड़ने में असफल:"। Mysql_c

ios - How do you make this plist file programatically? -

Image
इस सवाल का पहले से ही एक उत्तर है: < / P> 3 जवाब मैं बनाने की कोशिश कर रहा हूँ plist फ़ाइल programatically यहाँ plist फ़ाइल का एक स्क्रीनशॉट है। मुझे यह सेब दस्तावेज़ मिला ( ) हालांकि, मैं इसे सही बनाने के लिए समझ नहीं सका। आप कैसे इस plist फ़ाइल programatically कर सकता हूँ? एनसैप्शन * dict = @ {@ "डेटा": @ [@ {@ "शीर्षक "@" मूल्य ": @" मूल्य ": @ (56)}, @ {@" शीर्षक ": @" एएए ", @" मान ": @ (12)}, @ {@" शीर्षक ": @" @ "मूल्य": @ (10)}, @ {@ "शीर्षक": @ "डीडीडी", @ "मान": @ (30)}, @ {@ "शीर्षक": @ "ईईई", @ "मान": @ (40)}]}}; [डिक्ट टाईफाइल: फाइलनाम परमाणु रूप से: हाँ];

c# - XML deserialization of derived classes -

How can I create a deserialization method that can take any object of class or object derived classes? public class conference {public string appname; } Public class CustomConfig1: Configure {public string CustomConfig1Param1; Public string CustomConfig1Param2; } Public class CustomConfig2: Configure {public string CustomConfig2Param1; Public string CustomConfig2Param2; } I have to do something like the serialization method which defines the type of input object: public string string (object obj) {XmlSerializer serializer = New XmlSerializer (obj.GetType ()); StringRitter Stylized = New Stringwriter (); Serializer.Serialize (serialized, obj); Return Serial ..ToString (); } But when I read an XML from DB, then I can not define the type of object, so I can not do it with XmlSerializer Em> Config can be any of the objects or derivative classes Please help how can I define the type of input object? [XmlInclude (CustomConfig1)] [XmlInclude (typeof (CustomConfig

html - Set select option using php when reloading the same page -

I have selected a php population and given a matching value using PHP from the loop through the results of a SQL query has gone. $ result = mysqli_query ($ con, "definitely select *") echo " This gives me a populated drop down list with all the syllabus titles, on the submission I selected by using the $ _ POST ['CourseSelect'] I can use the value; However, the drop down (selection) resets itself when the page is reloaded. How can I use php? I know For example, while the page is loading, the second option will be selected: & lt; Select & gt; & lt; option & gt; a & lt; / option & Gt; & lt; option selected & gt; two & lt; / option & gt; & lt; option & gt; three & lt; / option & gt; & lt; / select & gt; You can make it simpler while ($ line = mysqli_fetch_array ($ Results)) {$ select = ''; if (isset ($ _ POST ['coursch']) and $ _POST ['select cou

javascript - How can I autologin into a website with IE? -

I use the source code below in my script. I have worked fine with the CRM browser. But did not work with Internet Explorer. How can I do this? Someone helps me. & lt;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; & Lt; / Title & gt; & Lt; Script language = "javascript" & gt; & Lt ;! - Function Login () {document.form1.action = "http://website.com/login/login.asp"; document.form1.submit (); } // -> & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body onload = "login ()" & gt; & Lt; Form method = post name = "form1" id = "form1" & gt; & Lt; Input type = "hidden" name = "ID_Text" value = "ABCD" & gt; & Lt; Input type = "hidden" name = "PW_Text" value = "ABCD" & gt; & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & g

android - if in runnable function not working -

I will show scoring IsCollides is a function that checks the collision. If you work in other calls then work well but not working in runner function. code> private Rnnebl scoring = new Rnnabl () {@Override public void run () try {// TODO Auto-generated method stub {ifCollides (awards, splash )) {Score ++; P.setText (":" + Score); }} Hold (Exception E) {// TODO Automatic Holding Block e.printStackTrace (); } MHandler.post Delayed (mStartVamp, 3000); }}; Public boolean Colloids (Sprite Sprite 1 Sprite Sprite 2) throws an exception {float diffX = Math.abs ((Sprite1.getX) + Sprite1.getWidth () / 2) - (Sprite2.getX () + Sprite2.getWidth () / 2 )); Float Difarfai = Math.abis ((Spritelkgeti) + Spritelkgetheigt () / 2) - (Sprite2kgeti () + Sprite2kgetheigt () / 2)); If diffX (Sprite1.getWidth) / 2 + Sprite2.getWidth () / 3) & amp; Amp; And diffY & lt; (Sprite1.getHeight () / 2 + Sprite2.getHeight () / 3)) {back true; } Other {return false; }} Any changes o

rails 4 how ro remove the limit condition from sqlite -

I have a table for the question and I want to show only current user questions in the index page so that I can do it : question.fund_b_user_id current.id but it only returns 1 record with this ID. When I looked in the generated sqlite code I found this SELECT "questions". * "Question" Where "Question" "User_id" = 2 LIMIT 1 So I delete this limit or zero find_by always matches a single record with the given conditions. Instead use the find_all_by or where question. (User_id: current_user.id) OR / pre> I suggest you to use where .

c++ - Is there an idomatic way to return a pointer that optionally owns its value -

I have a function named that path, keeps a look and gives the corresponding value an indicator. Sometimes the price stays in a stable cache, sometimes it is calculated and made on the fly. Therefore, sometimes it takes ownership to make calls and after reading it, the object is required to be removed, and sometimes it does not. I am thinking, is there anything with which I will wrap this pointer so that the caller can be automatically freed from the required form? I was thinking that I might be able to use a unique PTR, but the deleter part of the type, how can I return the same type which sometimes does and sometimes Does not really destroy. In fact, for a value created inside a solution function, a normal std: can return, and with each other the empty deliler for the value in the map. You can see that both the use cases do not require any action from the calling code and are completely transparent.

Unable to replace String occurence in java? -

I have a stringbuilder object in Java that stores some Jason formatted data created on the fly by using the Java program. I am trying to do this, trying to change the occurrence of string one with string two in stringbuilder object. I wrote the code below to change but it will not work? Any reason or effective method to replace a string? stringbuilder json = new stringbilder (); Public Zero Method 1 () {string replacelater = "{\" name \ ": \" & lt; Font color = \\\ "# ff 20000 \\\" & gt; + "+ \ funcvp_name4.trim () +" <\\ / font> \ ", \" child \ ": ["; callingmethod2 (); replacewith = "{\" name \ "with string: "& Lt; font color = \\\" # FF0000 \\\ "& gt; + + funcvp_name4.trim () + totalempforfuncvp +" & lt; \\ / font & gt; \", \"children\":[ "; String jsonnew = json.toString (); Jsonnew.replaceFirst (replacelater, replacewith); Json.setLe

sql server - set transaction read only option generates error -

Since I am new to SQL Server, this question may seem very naive for most of you. Quoting a book on SQL, I came to this statement ** Set transaction read-only, read separation level latent, Diagnostics size 5; ** But when executed, it returns the following error. Message 156, Level 15, State 1, Line 2 Wrong syntax near the keyword 'reading'. It seems that in relation to SQL Server rather than dealing with SQL Server Some information about a programming languages ​​are mentioned. As far as I know, the transaction is set to read only and the level of isolation is related to the cases

html - form action dont work right -

यह मेरा कोड है: & lt; form action = "& lt;% = अनुरोध .QueryString ["SubmitTo"]% & gt; / test "method =" get "id =" myform "& gt; & Lt; input runat = "server" id = "sendBtn" नाम = "sendBtn" प्रकार = "सबमिट करें" मान = "समाप्त" / & gt; & Lt; इनपुट प्रकार = "छिपा हुआ" नाम = 'आईडी' मान = "& lt;% = अनुरोध .QueryString [" आईडी "]% & gt;" / & gt; & Lt; / प्रपत्र & gt; अनुरोध करें। JQueryString ["SubmitTo"] = "google" अनुरोध .QueryString ["Id"] = "123456 " इसके बजाय प्रपत्र google / test पर जाता है, यह http: // स्थानीयहोस्ट: 49607 / मायवब / प्रोजेक्ट / google / test? Ctl00% 24MainContent% 24sendBtn = समाप्त और आईडी = 123456 क्या आप मेरी मदद कर सकते हैं? संहिता की कोशिश करें। फॉर्म के लिए हम दो एक्शन और यूआरएल दे सकते हैं टाइप भिन्न हो सकता है एक पूर्ण य

why do two mysql lock and flush statements on different dbs hang -

We have two identical DBS A and B. First I connect to DB A with the client mysql -ua -pa a I issue commands write lock table table 1, write table 2; Flush table table 1, table 2; I open a new session without closing the session mysql -ub -pb b I issue the same order write table table 1, write table 2; Flush table table 1, table 2; The second flush seems to be trapped. Only when I close the first connection, the second flush is the success. Why does this happen, are these two different DBS? How can I avoid this? I use mysql 5.1 and all tables are myisam tables. <div class = "post-text" itemprop = "text </ p> </ div> </ html> </ p> </ div> <p> </ p > </ Div> <p><br /><br />

mean stack application runtime error in the webstorm ide -

I am running my mean stack application using webstorm IDE. When I'm trying to run the application, I am having the following error error: enter, open 'c: \ documents and settings \ ssit \ WebstormProjects \ ts \ node_modules \ express \ Node_modules \ connect \ node_modules \ public \ favicon.ico ' Can you tell me the reason for the problem and tell me the possible solution. I have encountered the same problem once I have changed the node server path on run Which is at the top right corner. It solved my problem Hope it can solve you.

php - SQL - select id where id is not in array -

I want to select from a table after the last 12 news. I tried but there was no result. I got undefined $ news public function get_all_news_home () {$ news = array (); # Nectum la bas de date $ the-> load-> Database (); #CheapSize $ top_news_query = $ this- & gt; Db- & gt; Query ("Choose where * from the selection = 1 and ready = 'wi' order date from DESC limit 4 '); $ Last_news = $ this-> db-> query ($ last_news_query); $ Last_news = ( $ last_news-> num_rows ())? $ last_news- & gt; result_are (): null; foreign currency ($ last_news as $ ln) {array_push ($ news, array ('id' = & gt; $ ln ['id']))} $ All_news = $ this-> gtc-> if ($ all_news-> num_rows ()) {$ all_news = $ all_news-> result_re ();} and {$ all_news = NULL;} Return to $ all_news;} Please help me. How can I remove the first 4 id < P> Try it out: ... $ newsIds = implode (',', array_values ​​($ news)) ... ... $ all_news = $

elisp - Emacs word-level buffer merge from lisp -

I know how to merge word-level buffer with EDIF, though I need to merge the buffer EDIF control buffers An internal lip function without I have two buffers, buf-A in: foo bar and < Code> buf-b includes: foo baz It is given that buff-b Is always new to buf-A and therefore always preferred I have the following merged buf-c buffer: foo & Lt; del & gt; Bar & lt; / Del & gt; & Lt; Symbols & gt; Falcon & lt; / Mark & ​​gt; The template is easy enough, as it is setting up ediff-word-mode t , however, I can not understand how it functions internally. about MXEdif-regions-WordWorldRIT What's in

sql - Delete duplicate column value from mysql -

मेरे पास mysql तालिका ईमेल है जहां एकाधिक कॉलम जैसे "प्रथम_नाम", "अंतिम_नाम", "ईमेल", "संपर्क" इस तालिका में मेरे पास बहुत से ईमेल आईडी हैं कृपया इस डाटा को अनन्य रूप में बनाना चाहते हैं, जहां अन्य पंक्ति में कोई भी ईमेल नहीं है। कृपया इसके लिए एसक्यूएल क्वेरी लिखना कैसे साझा करें धन्यवाद परस पहले आपको निम्न क्वेरी का उपयोग करके डुप्लिकेट ईमेल की सूची ढूंढनी होगी। ईमेल का चयन करें, सीएनटी द्वारा ई-मेल ऑर्डर द्वारा ईमेल समूह के रूप में सीएनटी (*) के रूप में क्वेरी ईमेल और दोहराव की गिनती देगा। फिर उस रिकॉर्ड के आधार पर कौन सा रिकॉर्ड वैध है, हटाए जाने के कदम उठाएं।

Date generate from start to end date in java -

I am trying to prepare a list of dates from a given start and end date. I got the solution in stack overflow But, the code provides delivery starting from the month of January. Why am i not able to help please help me The beginning, ending string is format 'yyyy-mm-dd' . The period is array list , I'm using dates to store dates. list & lt; Date & gt; Period = New ArrayList & lt; Date & gt; (); & Lt; Date & gt; Date_req = new arreelist & lt; Date & gt; (); Calendar Start = Calendar.Justation (); Date format format = new simpledate format ("yyyy-mm-dd"); Date date_st = formatter.parse (start); Date date_en = formatter.parse (end); Int init = 0; start.setTime (date_st); Calendar End = Calendar. Just Instance (); end.setTime (date_en); End.add (calendar.DAY_OF_YEAR, 1); // Add 1 day for termination Make sure that the last date is included in the last list, while (start.before (end)) {duration.add (init, start.getTime ()); Sta

php - how i save data in zf2 using mongoodm? -

I am creating a controller in zf2 to save data in mongodb, but this does not save any record in the event table, How do I save data? Here is my code: public function createAction () {$ calendar_id = (int) $ this- & gt; Params () - & gt; Fromoutout ('id', 0); If ($ calendar_id == 0) {return $ this-> Redirect () - & gt; To to route ('calendar', array ('action' => 'index')); } // echo $ calendar_id; $ Dm = $ this- & gt; GetServiceLocator () - & gt; Obtain ('doctrine.documentmanager.odm_default'); $ Form = new eventform (); $ Update = false; $ Message = ''; $ Form & gt; ('CALENDAR_ID') - & gt; setValue ($ id); $ Form & gt; Mill ('Presented') - & gt; setValue ('Add'); If ($ this-> getRequest () -> isPost ()) {$ post = $ this- & gt; getRequest () - & gt; GetPost (); $ Form & gt; setInputFilter ($ form> getInputFilter ()); $ Form & gt; setData ($ po

php - Can't insert in a table or create a table in MySQL using Python -

I have an arduino uno and temp36 I read the sensor value with the Python arduino serial monitor. It works !! But I can not use Python in a built-in MySQL table and I do not know why I do not have any errors or warnings. Import serial import time import MySQLdb dbhost = 'localhost' dbname = 'test' dbuser = 'x' dbpass = 'y' ser = serial Serial ('COM7', 9600, timeout = 1) # On the Ubuntu system, / dev / ttyACM0 is the default path to the serial device on Arduinos, you are probably different. While 1: time.sleep (1) the_goods = ser.readline () str_parts = the_goods.split ('') conn = MySQLdb.connect (host = dbhost, user = dbuser, passwd = dbpass, db = dbname) cursor = conn . Include cursor () sql = "arduino_temp (temperature) values ​​('% s');" % (Str_parts [0]) Print "Number of rows entered:% d"% Cursor. Try Orcount: Excluding cursor. Execute (SQL): cursor pass.close () conn.autocommit = true conn.close ()

ios - Draw circle around custom UIBezierPath -

I have a UIBezierPath that has been dragged by the user on the touchscreen. Now I want to make a cycle around this path / drawing, and the path should be in the middle of this circle. I tried to use: UIBezierPath.bounds But obviously it does not work :( So my next idea is to point out every point in UIBezierPath Go through the medium and get the "lowest" point and the most "left" point, then attract the circle based on those points. My question is, to pull a circle around Is there a more beautiful and efficient way for custom UIBezierPath? From: NSMutableArray * bezierPoints = [NSMutableArray array]; CGPathApply (drawpath.CGPath, (__Bridge zero *), myCGPathApplierFunc) Float Minx = 100000.F; Float Minawy = 100000.f; (for the bezierPoints in the NSVL value) {CGPoint point = Value.CGPointValue; if (point xxlt; minX) minX = point.x; if (point.A drawpath.bounds.size.he ight) {radius = drawpath.bounds.size.width * 0.65; } And {radius = drawpath.bound

sql - Postgresql insert trigger does not work -

New row in table A has been added and should trigger me that row in row automatically insert row in row Will do Insert Texture () Trigger the return as $ body $ IN blocks in $ B (blocked.id, blocked.number, blocked.date) VALUES (new. Id, new.prefix, now ()) returns new; End $ entity $ language called 'plpgsql' NLL input security invoice called; To create the trigger, insert RAW executables for public.table; insertblocked (); Please help and advise, why is the SQL compiler return and error QUERY: Block blocked (blocked.id, blocked.number, blocked .date) value ($ 1, $ 2, now ()) returns $ 3 < P> You have lost a semi-column at the end of your insert statement; .

java - Show FacesMessage and reload Page in JSF -

I am sending emails from the JSF application. I need that when I send an email, the FaceSmase is displayed, the action is confirmed and the browser is reloaded on the same page. I have shown this code but it does not reload the same page. Send Public String Email () {// Send Email Code ..... Transport.send (Message); FacesContext.getCurrentInstance (). AddMessage (empty, new FacesMessage (FacesMessage. SEVERITY_INFO, "Success \ n", "You've successfully sent an e-mail:" + e_mail + ". \ N" Thanks "); "E-mail redirect-true" return; } This is what I have tried, this code reloads the page, but FacesMessage is not shown. Send public string email () {// send email code ..... Transport.send (message); FacesContext.getCurrentInstance (). AddMessage (empty, new FacesMessage (FacesMessage. SEVERITY_INFO, "Success \ n", "You've successfully sent an e-mail:" + e_mail + ". \ N" Thanks "); FacesContex

bash - MySQL authentication using script without supplying password in plain text -

मैंने bash का उपयोग करके एक cgi स्क्रिप्ट लिखा है, जो < कोड> MySQL क्वेरी चूंकि मेरा उद्देश्य एक कार्य को स्वचालित करना है, इसलिए मुझे लिखे में MySQL क्रेडेंशियल्स को केवल सादे टेक्स्ट में होने वाले पासवर्ड के साथ रखना था मेरे लिए मुद्दा इस सवाल का सर्वर है जो स्क्रिप्ट निष्पादित करेगा जो बाहरी एक्सेस के साथ एक उत्पादन सर्वर है। मैं ऐसे समाधान की तलाश कर रहा हूं जहां स्वचालन रहता है लेकिन बिना सादे पाठ में पासवर्ड प्रदान किए पुनश्च: मेरे लिए एक समाधान दूसरों के लिए सभी अनुमतियों को हटाकर, जड़ के लिए आरवॉइएक्स के समूह और रूट के लिए स्वामित्व बदलकर सख्त अनुमतियां लागू करना है। लेकिन चूंकि यह एक सीजीआई स्क्रिप्ट है, मैं दूसरों के लिए पढ़ने और निष्पादन को हटा नहीं सकता। निम्नानुसार कोड है #! / Bin / bash echo "content- प्रकार: टेक्स्ट / html "echo" "echo" & lt; html & gt; " गूंज "& lt; body & gt;" mysql -h $ host -u रूट -ptest -e "उपयोगकर्ता, अंक, $ db से प्रतिशत चुनें;" | Sed 's / \ t /, / g'

c# - How to Add an Empty List Box and move the items from one listbox to another listbox -

How to add an empty list box and move items from one list to another listbox, and save the transferred data to the database asp Using .net mvc in the first EF code, In my project I have created a list box that displays data from the database code In Administrator: Create Public Tasks () {IEnumerable & lt; SelectListItem & gt; Item = db IiDBS Select (C = & gt; New SelectionLitim {value = C. Institution, Text = C. Institution}}; ViewBag.IIDBS = Item; Return View ();} Legend & gt; Member Access Rights & lt; / Legend & gt; & lt; divstyle = "text -decoration: underline; text-align: center "& gt; strong & gt; & lt; spanstyle =" background color: #FFFFFF "& gt; member access rights & lt; / span & gt; & lt; / Strong> & lt; / div & gt; List of financial institutions & lt;%: HTML listbox ("name of the institute", (INM Mybal and lieutenant; seleastitum gt;) Vibug.IIDBS, &qu

c# - Should programmatic logic reinforce database logic? -

It seems that there is a strange question, I believe some of you, but I teach myself, I have never done otherwise best practice on me. In short, suppose I have a database table (Table 1) that is connected to another database table (Table 2). There should be a relationship between them in relation to the record being removed in Table 1, no action should be taken in Table 2 - the record recorded in the table has been referenced, strengthening recordable integrity from the table 1 and record 1 stop So if I programmatically removed the record in Table 1, which was recorded in Table 2 (for example using ADO .NET), I get an error. The question is whether should I strengthen a logic by examining the linked records before requesting a record deletion. As far as I see it, it doubles on the check (the questions) and provides additional protection of anyone by changing the relationship in the database, but it also ensures that the argument is still being followed - every inquiry For a s

Using PHP what is the best way to get multiple rows in one MySQL query? -

इस सवाल का पहले से ही एक उत्तर है: < / p> 6 जवाब कौन सा सबसे अच्छा तरीका है $ id_array = array ('34', '341', '342', ' 334 ',' 344 ',' 354 ',' 3234 ',' 33234 ',' 3234 ',' 3234 '); मैं mysql डेटाबेस से उन आईडी से संबद्ध शीर्षक प्राप्त करना चाहते हैं । मेरे पास दो दृष्टिकोण हैं: 1) उदाहरण : foreach ($ id_array $ id के रूप में) {$ query = mysqli_query ($ con, "सामग्री का चयन करें शीर्षक WHERE id = ' $ आईडी ' "); $ Id_db = mysqli_fetch_row ($ क्वेरी); गूंज $ id_db ['title']; } 2) उदाहरण : $ query = mysqli_query ($ con, "सामग्री का चयन करें शीर्षक WHERE id = ' $ id_array [1] 'और id =' $ id_array [2] 'और id =' $ id_array [3] 'और' id = $ id_array [4] 'और id =' $ id_array [5] ''); जबकि ($ परिणाम = mysqli_fetch_assoc ($ क्वेरी)) {गूंज $ परिणाम ['शीर्षक']; } मैं उच्च लोड साइट पर काम कर रहा हूं

html - My JQuery code is not working in Internet Explorer while working on other Browser like Mozilla and Chrome -

JQuery code in this code is not working in Internet Explorer while working on Firefox and Chrome // alert ($ ('input [type =' text ']'). Eq (0) .val ()); Why this alert is not shown here? & lt; Html & gt; & Lt; Top & gt; & Lt; Style & gt; div {border: 2px solid blue; } .a {color: red} B {background-color: green; }. C {font-size: 55px; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "container" & gt; This is my div & lt; input type = "text" value = "50" name = "first_input" & gt; The first label & lt; / Input & gt; & Lt; Button & gt; First button & lt; / Button & gt; & Lt; Input type = "text" & gt; The second label & lt; / Input & gt; & Lt; Input type = "text" & gt; Third label & lt; / Input & gt; & Lt; Input type = "text" & gt; Fourth label

c# - ASP.NET MVC - Cannot pass string[] value to another Controller action -

I am trying to get another string array (with two values) from one controller action. But the second action has this value: 'System.String []' passes the controller action with this value. But when I try to pass the second pass it only passes the empty string. HTML (razor) @using (HTML.benform ("declaration", "administrator", formmath.post, new {id = "form"})) {// there other Html elements .... and label class = "checkbox-inline" & gt; & Lt; Input type = "checkbox" name = "tag" id = "web" value = "web" check = "check" /> & Lt; Period & gt; Web & lt; / Span & gt; & Lt; / Labels & gt; & Lt; Label class = "checkbox-inline" & gt; & Lt; Input type = "checkbox" name = "tag" id = "ambulance" value = "client" check = "check" /> & Lt; Span & gt; Ambulance Client & lt; /

javascript - How to set selected option of select element by its ID? -

& lt; आईडी = "कॉम्बो बॉक्स" & gt; & Lt; विकल्प आईडी = "1" & gt; एक & lt; / विकल्प & gt; & Lt; विकल्प आईडी = "2" & gt; दो & lt; / विकल्प & gt; & Lt; विकल्प आईडी = "3" & gt; तीन & lt; / विकल्प & gt; & Lt; विकल्प आईडी = "4" & gt; चार & lt; / विकल्प & gt; & Lt; / चयन & gt; मैं आईडी 3 के साथ विकल्प का चयन करना चाहता हूं। क्या इसमें कोई रास्ता नहीं है, बिना पाश कैसे करना है? मुझे इस तरह से कुछ उम्मीद है $ ("# combobox")। Val ("3"); लेकिन आईडी के बजाय मूल्य के साथ। (इसलिए मेरा मतलब है कि कॉम्बो बॉक्स के सदस्य के रूप में उस विकल्प को एक्सेस करना है, जैसे कि document.getElementById ('3'); ) & lt; स्क्रिप्ट प्रकार =" टेक्स्ट / जावास्क्रिप्ट "& gt; document.getElementById ( "3") का चयन किया = सच। & Lt; / स्क्रिप्ट & gt; या & lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्

How to process form in cs-cart 4 -

I created a custom smart phone block in the CS-Cart 4. This block contains forms and will be displayed on every page . Now what action URL should I use and how can I capture the post variable for now & lt; Form method = "post" action = "{" "| fn_url}" & gt; But after submission I am redirected to 404 pages. The main ultimate "sending" of each form is. & lt; Form method = "post" action = "{" "| fn_url}" & gt; & Lt; Input type = "submit" name = "send [your_controller.some_mode]" value = "submit" & gt; & Lt; / Form & gt; or When you submit this form, the CS-Cart controller will be named "your_controller.php" (app / controller / frontend /your_controller.php) this controller You can do whatever you need in For example, if {$ ($ mode == 'some_mode') {db_query ('' $ '' '[' REQUEST_METHOD '

php - shell_exec not executing sh file for inkscape command -

एक.श #! bin / bash कमांड = "सीपी 357.svg 000.svg" गूंज "कमांड निष्पादित"; Exec $ आदेश; निष्पादित करके sh one.sh चलाता है और यहां तक ​​कि php shell_exec ("sh one.sh") में; काम करता है ठीक है। दो.श #! Bin / bash कमांड = "/ usr / bin / inkscape -f 357.svg -e 357.png" गूंज कमांड "; Exec $ आदेश; शेल से sh two.sh ठीक काम करता है लेकिन php का उपयोग shell_exec ("sh निष्पादन नहीं करना कोई भी बता सकता है कि वह क्यों निष्पादित नहीं कर रहा है? प्रयास करें: गूंज shell_exec ("sh two.sh 2" gt; & amp; 1; ")" और देखें कि आउटपुट क्या है, हो सकता है कि यह आपको अनुमति अस्वीकृत त्रुटि देगा। संभव है कि आप जिस उपयोगकर्ता के साथ चल रहे हैं उसे जांचना (शायद www-data की तरह कुछ)

sql server 2005 - SQL code for DB query by date -

I'm a bit of a SQL Newbad, but to work with some code to get value from a historian database Work has been done. I am retrieving the name of the item and its value at a specific time every month of the year. However, the user coming from a report of the year will be the prescribed parameter. So if the user selects 2014, then it should ask 1/1/2014/2/1/2014 and so on. I have come up with a simple part of the query which is looking at tag names and associated values: SELECT tag name, from runtime.dbo to value History WHERE Tagname IN ('Tag1', 'Tag2') and wwVersion = 'Latest' and DateTime = @ Date The problems I have to solve are: 1. I manually Can set up @data, but I want to do it as mentioned above. I am thinking that some kind of loop can be used? 2. I'm not sure how to view it in the table format: Tag 1, (mass value), (fb value), (merge value) etc. Tag 2, (mass value), (fab value), (mary value) etc ... Any help would be appreciated. Th

javascript - Angular View {{ var }} updating, but $scope.var doesn't change? -

I am using UI-Bootstrap, and I had to face some strange. The following is used for the markup: Directorate Directory, Rate Value and Rate Max & lt; Div class = "RatingContainer text centered" & gt; Two variables are passed in & Lt; Rating value = "rate value" max = "rate max" & gt; & Lt; / Ratings & gt; & Lt; / Div & gt; & Lt; h4 & gt; {{RateValue}} / {{Rate Max}} & lt; / H4 & gt; The odd thing is that I can see the rate value variable which is updating in the scene, when I select different stars. But the value of the variable is not updated in the $ diameter view model. app.controller ('addModalCtrl', function ($ scope, $ modalInstance, selected movie, myMovieService) {$ scope.rateValue = 0; $ scope.rateMax = 10; $ scope.selectedMovie = Selected movie; $ scope.addToLib = function (items) {var jsonData = {tmdb_id: $ scope.selectedMovie.id, my_rating: $ scope.rateValue // It always remai

php - how to add posts with image programmatically in wordpress -

This code requires to add a post to the program in WordPress (Dynom) (__ file__). '/wp-load.php'); Global $ user_ID; $ New_post = array ('post_title' = & gt; 'Table Tennis',' Post_ content '= & gt;' Table Tennis or Ping-Pong is a game in which two or four players use a table tennis racket The back and back game is played on a hard disk divided into a net, except for the initial service, the players should be allowed to bowl only on one side of their side of the table, so that it can be bounced in the opposite direction. not Fails to return the ball within the yama, then the points are made. ',' Post_States' = & gt; 'Publish', 'Post_data' = & gt; Date ('YMD HH: I: S' ), 'Post_yyther' = & gt; $ User_ID, 'Post_type' = & gt; 'Post', 'Postgate' => Array (2),); $ Post_id = wp_insert_post ($ new_post); How to add the image to the post? I am new to Word

ruby on rails - Editing some values from a file config.yml -

फ़ाइल config.yml से कुछ मान कैसे संपादित करें? config.yml default_params: & amp; चूक inform_about_completion: first_reminder_day: 5 सेकंड_रिमार्ड_डे: 1 उत्पादन: & lt; & lt ;: * डिफ़ॉल्ट विकास: & lt; & lt ;: * डिफ़ॉल्ट कैसे के माध्यम से इंटरफ़ेस को दो मानों को संपादित करने के लिए: प्रथम_रिमाइंडर_डे , second_reminder_day । मैंने नियंत्रक बनाया: वर्ग व्यवस्थापक :: सेटिंग्सकंट्रोलर & lt; ApplicationController def संपादित करें अंत डीईएफ़ अद्यतन अंत समाप्ति मार्ग: नामस्थान: व्यवस्थापक संसाधन: सेटिंग्स, केवल: [: संपादित करें,: अद्यतन] अंत < / Code> क्या इसे लागू करना संभव है? आपका क्रिया को संपादित करने के लिए कॉन्फ़िगरेशन पैरामीटर को संपादित करने के लिए उपयोगकर्ता को फॉर्म के साथ प्रस्तुत करना होगा। वास्तविक अद्यतन करने के लिए update कार्रवाई की आवश्यकता है बेशक यह कार्यान्वित किया जा सकता है। ** अद्यतन ** आपको routes.rb फ़ाइल। इसे आज़माएं: नामस्थान: व्यवस्थापक संसाधन: सेटिंग्स, केवल = & gt; [: संपादित करें,:

c# - Read/Explore solution zip file for components in CRM 2011 -

Is there any device available to read or search solution components using a solution file? OR Is there any class in the Microsoft Dynamics CRM 2011 SDK, which takes the solution as a zip file in input and then I use its properties / methods for the contents of the components and Can I read / validate components? For verification purposes, there are several schema files in the SDK, one of these is the CustomizationsSolution.xsd To read web resources, you can see directly in the "Web resource source" folder or by scanning the "solution.xml" file. These two will need to unzip

R Custom Function - include argument value in title -

I have written a basic custom function to create some charts: gw_chart & lt ; Qualct (variable, main = ("QQ-plot")} function (variable) {hist (variable, pro = t) line (density (variable, no.m.m = t) / code> When I type gw_chart (age) , where the age is a variable in the dataframe, the function produces two charts, but the title of the histogram is based on that default hist < / Code> - & gt; "Histogram of Variable", and xlabel is variable. How do I get the value of variable - In case: Age - Can be displayed instead? And I would also like to customize the title of qqplot. Thanks gw_chart & lt; - function (variable) {laboratory <- deparse (substitute (variable) hist (variable, prob = t) Line (density (variable, no. Rm = t) rug (jitter (variable) qqPlot (variable, main = paste ("copy of", laboratory)), main = paste ("histogram of", lab)

haskell - Apply a function to a list of items -

I have defined a function f which will be given value Item is x stored inside a list of prices with [code] [[string, string, ante]] a = string x = String value = int prices list = [(a, x, price)] fax ((a1, x1, price): ys). A == A1 & amp; Amp; X == x1 = value | Otherwise = FA x YS I have to apply this function in a list of items, but I'm stuck. Is it possible to use the map? I can not get it. (Only functions that can use recursion f) Edit to clarify some examples < Code> pricesList = [("Apple", "iPod", 100), ("Apple", "iPhone", 200), ("Samsung", "Galaxy", 200)] Passure = [("Harry", 1 9 85, "Apple", ["iPhone", "iPod"]), ("George", 1983, "Samsung", ["Galaxy"])] * Main & gt; I should know how much money has been spent by defining a new function, assuming that spent code> F Inside of it) * main & gt; &quo

database - Will denormalization improve performance in SQL? Advice appreciated -

I want to speed up our SQL queries. I have started reading a book on DataWire, where you have a separate database with data in different tables. The problem is that I do not want to create a separate reporting database for each of our customers for a few reasons: We have more than 200, maintenance on these databases is sufficient < li> Reporting data should be available immediately I was thinking, if I only report on the tables I currently have, there are so many in it and believe it is expensive (table About 20,000,000 lines in) So I copied several tables of data, it will display a little? I know that there are issues of copying data everywhere, but it can be good for any point in history .... Would anyone have experience and tell me in the right direction? / P> Denormalization performance is not guaranteed to improve. Have you considered the questions of your application as tuning? Take a look at what the report is running, identify places where you can

symfony - How to persist entities from an embedded form submission? -

मेरे पास एक व्यक्ति इकाई और एक पता इकाई है, सेट अप एक बी-दिशात्मक एक-से-एक रिश्ते के साथ, पता : ... वर्ग व्यक्ति {... / ** * @OR पर एफके के साथ \ OneToOne (targetEntity = "पता", मैप किया गया = "व्यक्ति") * / संरक्षित $ पता; ...} ... वर्ग पता {... / ** * @ORM \ Id * @ORM \ OneToOne (लक्ष्य = "व्यक्ति", इनवर्स्ड बाय = "पता") * @ORM \ JoinColumn (name = "personID" , संदर्भित कॉलमनाम = "आईडी") * / संरक्षित $ व्यक्ति; } पता अस्तित्व में एक समर्पित प्राथमिक कुंजी नहीं है, इसके बजाय इसके पहचान को व्यक्ति के साथ विदेशी कुंजी रिश्ते के माध्यम से प्राप्त होता है, जैसा कि मेरे पास एक नया व्यक्ति बनाने के लिए फ़ॉर्म भी पता के लिए फार्म को एम्बेड करता है। जब फ़ॉर्म जमा किया जाता है, तो यह नियंत्रक क्रिया निष्पादित होती है: सार्वजनिक फ़ंक्शन createAction (अनुरोध $ अनुरोध) {$ person = new person (); $ Form = $ this- & gt; createCreateForm ($ person); $ फार्म & gt; handleRequest ($ अनुरोध); यदि ($ form- & g

c++ - Code selector using inheritage during runtime -

Is there a way to insert an abstract class inside a container? No. Is there a way for a base class to reach derivative classes? Using the Virtual Function Is this example code any way to work properly and bark to console? Is there any way for vector containers? Do not keep examples, do not keep reference / notation? It is safe to store points inside std :: vector if I use reference counters in examples, which is my last resort, do I miss something? class cnimal {public: like virtual zero sounds () {cout & lt; & Lt; "Base function \ n"; }}; Class Cadence: Public Cannmil {Public: Zero Sounds (like) (cout & lt; & lt; "vap \ n";}}; Class CZoo {public: std :: vector & lt; cnimal & gt; animalList; Add zero () (AnimalList.push_back (CDog ());}}; Console base function returns the message: int main (int argc, char * Argv []) {CZoo nationalPark; nationalPark.addDog ();. NationalPark.animalList.front () soundsLike (); // base function

How do you delete a block of text that appears multiple times with vim -

Image
Whenever veem is used then there will be a block of code that appears several times in a file I want to get away from Do the following: I block I can now avoid all the markup using the option of code in the highlighted question, but it will be crazy. Is this an effective way to remove the block of code in Vim? (I know that I was drying properly, I probably do not have to start with this problem, but I do not always edit my code) Use the tag text object for this case: dat one tag To delete all events that you can use : global and : general together with an example example: : g / Pat / normal dat See more: < Code>: h at: h text-science: h: g: h: ideal

jpa - How to call a SQL function like "HOUR()" in a @NamedQuery in Java Persistence -

I should know how the SQL function such as HOUR () a @NamedQuery To make it simple, in one row in the initial time ( TIMESTAMP ) column, I need to get the rows that are CURRENT_TIMESTAMP and Starting between HOOR (CURRENT_TIMESTAMP) +1 I have spent a day on Google and have not yet managed to find the answer The following query works when we try with JAVADB , but the same failed in @NamedQuery lives. Java DB Example : select e.EMPLOYEEID, e.FIRSTNAME, r.STARTTIME, r.ENDTIME reservationR, employee E Where e.EMPLOYEEID = r.EMPLOYEEID and hours (from .STARTTIME) = this hour (CURRENT_TIMESTAMP) @NamedQuery : @NamedQuery (name = "reservation.getcurrent", query =) reservation R, employee E where e.EMPLOYEEID = r.EMPLOYEEID and hours (r.STARTTIME) = this hour (CURRENT_TIMESTAMP) e. EMPLOYEEID, e.FIRSTNAME, r.STARTTIME, r.ENDTIME Choose "> Error: [2014-04-22T17: 03: 00.946 + 0530] [Glassfish 4.0] [Saver] [] [javax.enterprise.system.core] [

c# - How to write recursive lambda expression (LINQ query) -

मेरे पास एक ऑब्जेक्ट है: सार्वजनिक वर्ग फ़ोल्डर: डीबीओबैजबेस {सार्वजनिक स्ट्रिंग नाम {get ; सेट; } सार्वजनिक सूची & lt; FileEntry & gt; फ़ाइलें {प्राप्त करें; सेट; } सार्वजनिक फ़ोल्डर ParentFolder {get; सेट; } सार्वजनिक सूची & lt; फ़ोल्डर & gt; बालफ़ोल्डर {प्राप्त करें; सेट; }} और मैंने एक क्वेरी लिखा है जो प्रत्येक फ़ोल्डर के भीतर एक फ़ोल्डर संरचना और सभी फ़ाइलों को प्राप्त करता है: var परिणाम = DbContext.Set & lt; फ़ोल्डर & gt ; ()। (एफ = & gt; एफ। पेरेंटफ़ोल्डर) शामिल करें। (एफ = & gt; एफ। चाइल्डफॉल्डर्स) को शामिल करें। (एफ = & gt; एफ फाइलों) को शामिल करें। (एफ = & gt; एफ। चाइल्डफ़ोल्डर। चयन करें (एफ 1 = & Gt; f1.files)) शामिल हैं। (एफ = & gt; f.ChildFolders.Select (f1 = & gt; f1.ChildFolders)। चुनें (f2 = & gt; f.Files))। शामिल करें (एफ = & gt; ChildFolders.Select (एफ 1 = & gt; f1.ChildFolders) .Select (F2 = & gt; f.ChildFolders.Select (F3 = & gt; f3.Files))) .Include (च = & gt; f.ChildFolders.

java - Getting text from a text pane in a scrollpane -

I'm just starting out in Java here's my problem: I have this code with A scrollable field text is created (1) : jZone_Text = new JTextPane (); ScrollPane = new JScrollPane (jZone_Text); JZone_Text = new JTextPane (); JPanelRecord.add (Scrollpane); ScrollPane.setBounds (20, 70, 550, 190); ScrollPane.setVisible (wrong); Then I want to get the text from my JTextPane and write it in the .txt file so I made it (2) : Ex> try {FileWriter fw = new FileWriter ("C: \\ user \\ administrator \\ desktop \\ memo.txt"); Buffett Vitter BW = New Baffed Vitter (FW); Printritter feature sortie = new print-viter (bw); Feature softy.printLN (jZoneText.getText () + "\ n"); FichierSortie.close (); } Hold (IOException e2) {} But when I try, it makes my memo, but it is empty. I tried to use the code (2), and asked to get text from a text file that is not in my scrollable panel and it works perfectly. I think I can not get the text from a text bar which is

c# - Buttons on form1 will change amount of something in form2 -

I am creating an application, and I want to create different difficulty levels. One way to change this amount is to call something in Form 2, when click on 1 of 3 buttons in Form 1. _multiplicand = randomizer.Next (2, 11); _ When you click on 1 button on 1, the amount of form 2 (2, 11) is required; When you click on the button 2 on Form 1, the amount of form 2 is required (10, 21) and when you click on the button 3 Form 1 should be the amount of Form 2 (20, 101); I know that you can duplicate Form 2 twice and change the amount in each form and simply add the button to other forms (Form 3, Form 4) The application will be larger. You can type form2 inside your form1 Need to keep the reference and then "submit" the new value: Something like this: form2 form2; Zero Init () {form2 = new form 2 (); // though you make Form 2} zero OnButtonClicked () {var newValue = GetNewValue (); Form2.CurrentValue = newValue; } and inside Form2 something like thi