Posts

Showing posts from May, 2015

How to close a excel if it is opening when accessing using JAVA and APACHE-POI 3.6?` -

We are developing applications in Java and are using APE PoI 3.6 to access MS Excel files. Let's assume that my Excel file is open when I run my program, this error and the program ends. So, first I have to check whether my Excel has been opened or not. If it is opening, then I want to close my Excel file and open that file ... itemprop = "text"> POI does not run Excel anymore It is an independent code that opens your Excel file and interprets the content. There is no direct route to Java code to communicate with Excel and to see if it's running. To try to coordinate, you can see the Java / Com Bridge for complex mechanisms.

java - Accessing a mapper's counter from a reducer -

I need to access the counters from my Maper in my reducers. Is this possible? If so, how is it done? As an example: My Mapper is: Public square counter mapper and text text, text, text, text & gt; {Static enum TestCounters {TEST} @ Override throws the protected Zero map (text key, text value, reference reference) IOException, interrupted; Exception {context.getCounter (TestCounters.TEST). Construction (1); Context.write (key, value); }} is my reducer extends the public square CounterReducer Reducer & lt; Text, Text, Text, Longway & gt; {@Override Reduces Safe Zero (text key, iterable & lt; text & gt; values, reference references) throws IOException, interrupted; Exception {counter counter = context.getCounter (CounterMapper.TestCounters.TEST); Long counter value = counter .getValue (); Context.write (key, new long countervalue); }} counterValue is always 0. Am I doing something wrong or is it not possible? In Reducer's Configurable (JobCon...

c# - Handling a one-to-many relationship with value types in Fluent NHibernate -

I am working on migrating an application to NHibernate, and I am using Fluent NIBnet I have a phone number value type in which there are some properties - number , number type , and details . There are several objects in my domain that have a phone number store. In the database (SQL 2008), these values ​​are kept in different tables. That's why I can have customer and customer phone number as well as vendors and seller phone number . The problem is that I would not like to use a simple PhoneNumber value type without having customer phone number and seller phone number Type whose properties are related to their parent's type, and I do not know how to accomplish it in NHibernate Is it possible or do I need to match my domain object more closely to the built-in database schema? is? Update: A little more info It seems that I'm having trouble getting a basic map to work for the encounter. Here's a simple example: Public class CustomerMap: C...

c - How would I properly make this loop display the first 40 digits of the fibonacci sequence? -

As far as I can tell, it seems that it should work. The first two elements are set to 1 (I'm ignoring the first 0). Loop is considered to be loop through the array, and since Fibonacci numbers are equal to the sum of two preceding numbers, I want to add them, then they have to display them. The output is all 2s, and I'm pretty sure why not. Note: I am not looking for direct answers, but there is a way that I can understand myself. // Fibonacci sequence #include & lt; Stdio.h & gt; Int main (zero) {int fib_numbers [40] = {1, 1}, i; For (i = 1; i & lt; 40; i ++) {Fib_translation [i] = fib_scrime [i] + fib_nug [ii]; Printf ("\ t% d \ n", phib_genement [i]); } Return 0; } after the first step, the wrong element is 0 (not initial, but 0 in this matter). FAB [I + 1] = FAB [I] + FIB [I-1] is about; Printf ("% d \ n", fb [i + 1])? And of course, Phib should have 41 shapes instead of 40.

javascript - How to test if an input contains a question mark? -

I have a script which tests, if there is an input question mark, and if this happens then some CSS changes is. How can I do this? jQuery usage : Do not use jQuery: if (document.getElementById ('myinputbox'). Value.indexOf ("?") = 1) { Document.getElementById ("Some LayerHelments") ClassName + = "NewClass"; This.className + = "NewClass"; } And {warnings ("question mark is not included"); } Update: Confirm KidDown () $ ("# myinputbox"). Keydown (function () (if ($ (This) .val () IndexOf ("?") = -1) {$ (this). CSS ("color", "green");} and {$ (this ) .css ("color", "red");}});

java - convert String in time to Time object without Date -

I have a problem converting string time into a time object because it prints with date, this is my code string time = "15:30:18"; Date format SDF = new SimpleDateform ("HH: mm: SS"); Date date = sdf Prs (time); System.out.println ("time:" + date); How to convert and print only time without a date in Java. It would be better if you can give an example. Thank you. Use the same SimpleDateFormat that you used to parse it: string time = "15: 30" ;; Date format SDF = new SimpleDateform ("HH: mm: SS"); Date date = sdf Prs (time); System.out.println ("Time:" + sdf.format (date)); Remember, the date object always represents a combined date / time value; it can not represent only the date-only or the time-value value That's why you have to use the correct DateFormat to ensure that you "only see" the desired parts.

Using OpenSSL library in D -

I have to use OpenSSL library at Ubuntu 10.04 with DMD + Tango bundle. I've compiled OpenSSL 1.0.0d I have files: /usr/local/ssl/lib/libssl.a / usr / local / ssl / lib /libcrypto.a So, I'm using them like this: $ dmd myfile.d -l / usr / local / ssl / And error is: No such file: File format not recognized collection 2: LD 1 exit status --- Error Level 1 I also tried to do it with OpenSSL 0.9.8r is. I do not have any information: / I can prepare SSL certification, so I think OpenSSL works right. Please help me. I believe the second argument is -ll / usr / local / ssl / lib should be -L once to the compiler to rest the linker, and then ld -L for the option That the library adds a directory to the search path).

paypal - Retrieve POST data in the order they were sent in in Django -

Is there a way to get the DjangoView data in that order in which it appears in the HTTP header? I am due to the need of PayPal's prompt payment due to its need - you have to accept the information by sending the data back in such a way to ensure the integrity of the data. I can not understand it! Maybe your friend can be? It is available since Django 1.3.

iphone - sending http request using method post in php to a mobile application that is using objective C (.xcode) -

I am working on the project that is taking data from the VoiceXX LX application and then sends the VoiceXXLPL application variable that contains the data Is in PPP and I have been with that part but the problem is that when I request a PHP. I want to send fat by sending from FPC to mobile application, which is installed on the iPhone which is written with the Objective-C programming language, an extension (.xcode), I had to face a problem getting the variable on the mobile app, So what I tried to do for a few months, the first variable sent the second .php and it works with me, by removing the problem with the mobile app Will try I used the httpRequest () class-method post to send the variable but the problem is that I do not know what to write, to get this variable on another .php file and Then display it. This is the complete code: & Lt; Format result ($ line = mysql_fetch_array ($ result1)) by $ / / & quot; // line; {$ message = $ line ["message"]; echo...

An easy android 2D game engine with an easy learning curve -

O All .... I am currently trying to create a game on the Android platform. I need some guidelines to choose a good Android 2D game engine. I have been looking at the internet for some time and have found these games engines to choose from which there is no major learning curve and the engine libGdx JMonkeyEngine For anyone who wants to know more about different game engines, the following link should help you. I intend to keep the interface simple and attractive, so I want to choose the correct engine, and also want to choose the right engine Till game too easy for my future projects. If someone can use me commercially for free (or open source) game engine, then I would be really grateful. I also do not pay attention to learning a 3D game engine, if its learning curve is not very vertical and implementation of 2D games is also very simple. Endgreens hides most of your complexity, so it's easy to start, but because of this It does not have complete control. Docu...

C# How do you count the number of inputs to find the average in a switch loop? -

This is my loop which donates for group number. I am wondering how to calculate the number of donations to find the average for each group. using the system; Public Sector Total Purchases {Public Stable Zero Main () {Double Total 4 = 0; Double Total 5 = 0; Double Total 6 = 0; Int myint = -1; While (mant! = 0) {string group; Console.light line ("Please enter group number (4, 5, or 6)"); Console.light line ("(to leave 0):"); Group = Console.ReadLine (); Myint = Int32.Parse (group); Switch (Manit) {Case 0: Break; Case 4: Double charity 4; String input string 4; Console Type ("Please enter the contribution amount:"); InputString4 = console Readline (); Donate 4 = convert toDouble (inputString4); Total 4 + = Charity 4; break; Case 5: Dual charity 5; String input string 5; Console Type ("Please enter the contribution amount:"); Input String 5 = console Readline (); Donate 5 = Convert. ToDouble (inputString5); Total 5 + = donation 5; break; Case ...

php - How To Install Zend Framework On Wamp? -

Hello friends, I have a big problem in the Zend Framework. How to install the zend framework on wamp no one can direct me Please guide me how to install zend Step 1 :. Scroll through for people who say "zip | targa jje" instead of "free download" to bypass the stupid email harvester. Step 2: Remove it from anywhere that your code can reference. Step 3: Use it by referring to a component as needed There is no need to take any special steps, there are no additional things that need to be installed, nothing. Just put the library somewhere and use it.

javascript - Getting JSON encoded variables from php -

मेरे पास यह php कोड है: $ query = mysql_query ("चुनें" से तालिका WHERE id = $ id "); जबकि ($ item = mysql_fetch_assoc ($ क्वेरी)) {$ dataArray ['var1'] = $ आइटम ['var1']; $ डेटाअरेरे ['var2'] = $ आइटम ['var2']; $ डेटाअरेरे ['var3'] = $ आइटम ['var3']; array_push ($ return_arr, $ dataArray); } गूंज json_encode ($ return_arr); यह मेरे ajax.php फ़ाइल में है फिर मैं AJAX अनुरोध के जरिए आईडी भेजने के लिए jquery का उपयोग कर रहा हूं: $। Ajax ({type: "POST", url: 'ajax.php', डेटा: 'id =' + आईडी, सफलता: फ़ंक्शन (डेटा) {चेतावनी (डेटा);}}); और यह मुझे यह चेतावनी देता है: [{"var1": "somevarhere", "var2": "somevarhere2", "var3": "somevarhere3"}] कोई मुझे बता सकता है कि मैं कैसे पूर्व के लिए उपयोग कर सकते हैं var3 प्राप्त करने के लिए somevarhere3 ? धन्यवाद के दस्तावेज के अनुसार, यह डेटा जो पहले पैरामीटर के रूप में प्राप्...

android - How to dynamically add radiobuttons and not lose view contents -

मेरा लेआउट इस तरह दिखता है & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "utf-8" & gt; & Lt; LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" एंड्रॉइड: अभिविन्यास = "ऊर्ध्वाधर" एंड्रॉइड: layout_width = "fill_parent" एंड्रॉइड: layout_height = "wrap_content" & gt; & Lt; TextView android: layout_width = "fill_parent" एंड्रॉइड: layout_height = "wrap_content" एंड्रॉइड: textStyle = "bold" android: text = "कृपया उस रेस्तरां का चयन करें जिसे आप रेट करना चाहते हैं:" / & gt; & Lt; RadioGroup android: layout_width = "fill_parent" एंड्रॉइड: layout_height = "wrap_content" एंड्रॉइड: अभिविन्यास = "ऊर्ध्वाधर" एंड्रॉइड: आईडी = "@ + आईडी / चयनरेस्टोरिटी" & gt; & Lt; / RadioGroup & gt; & Lt; बटन एंड्रॉइड: layout_width = "100px" एंड्रॉइड: layout_height = "wrap_content" एंड्रॉइड: ...

soap - Is there a dummy guide for using Savon with Ruby? -

Is there a real dummy guide for using Sawn with Ruby to consume SAP web services? The official document is very good, is not it enough? If so, why?

Direct string representation in Ruby -

Is there an easy way to present a direct string of ruby ​​build? For example: a = [: foo,: bar] when a.to_s I: "foobar" What I'm looking for: "[ : Foo ,: bar] " Which version of Ruby are you using ? I'm getting the use of Ruby 1.9: irb (main): 002: 0> A = [: foo ,: bar] = & gt; [: Foo,: bar] irb (main): 003: 0> A.to_s = & gt; "[: Foo,: Bar]" IRB (Main): 004: 0> A.inspect = & gt; "[: Foo,: bar]" Edit: As indicated by @ Flanders, in 1.8.7, you inspect Can . In general, inspection is considered to provide human-readable strings, even if to_s does not: obj.inspect  ???? String returns the human-readable representation string of obj if it is not overridden and there is no frequency variable, then uses the to_s method to generate the string. There is no claim about being human-readable.

Edit each line in a file in Ruby -

I am trying to find an easy way to edit each line in a file, and I have a problem How do I understand to use the file class to do this? The line I want to edit is that there are several hundred rows in each line with commas separated values, I am only interested in the first value in each line, and I first assume all values I tried to delete the following: Try File.open ('filename.txt', 'r +'). File | File.each_line {| Line | Line = line. Split (",") [0]} file.write file.close end that does not work because the File.write method is required The content is to be written in the form of logic. Can someone add me how can I get the desired effect? Using one of the better solutions (and the most secure) to create a temporary file and complete it It needs to be moved to the original location: is required 'fileutils' requires 'tempfile' t_file = Tempfile.new ('filename_temp.txt') File.open (" Filename.txt ", ...

ruby on rails 3 - How to define new instantaneous variable row by row - RAILS3 BEGINNER -

I was hoping someone could point me in the right direction ... My Information is given to a database that is near and use a search command to select the rows in this database that match some criteria @matching = Info.find (: all ,: Conditions => ["product_name = I then drag these items to the cheapest @cheapest = @ In the end, I have a Want to create an improvised array that contains many b That's the list of @cheapsteps for the OGS norms i.e. in line 1 sarpst for @OlkeApest criteria1 @ 1, in row 2 @OlcaPest is serp for criteria 2 ... Any help great Thank you in advance info.where (: product_name = & gt; distinct_product.to_s ) .order ('value ASC'). First How to choose the cheapest price for product_name, without further insight into the structure of your database, this suggestion Ena be difficult to obtain after how, but you info.where (: product_name = & gt; Distinct_product.to_s). ('Value ASC'). Group (: product_name) ...

java - JSONP or other alternatives? -

I am developing a web site that works with my custom built webserver in Java Web site PHP / JavaScript is running on Apache in JQuery and I have created a simple second webserver in Java which supports some of the designs I have designed, and this server runs under another port xxxxx The problem is, i have jquery Want to request another server Domains are different, this page runs on the domain and $ .getJSON function calls domain: xxxxx is not allowed. I thought the user is related to issues related to $ $ .getjsonp but related issues are tied between two points ( I was thinking that a token beyond the callback generated by JQN). Two coins are secured in this case supported by $$ .getJSONP or other options to think in browsers support (IE 7 + and FF3 +) exist. Sorry for my English :) Best regards Liloiro JSONP should work for your needs, though your other server will have a proxy service on your other server. Request server side your client-side code, instead of JSN, all ...

parsing - Problem with sablecc on production rule of the form prod = (expr | expr')* -

प्रोडक्शन प्रोग्राम = सीएलएस *; Cls = clsdef नाम openbrace clsdata समापन ब्रेस; Clsdata = (clsfield | clsmethod) *; Clsfield = [variabletype]: नाम [variablename]: अर्द्ध नाम; Clsmethod = [वापसी प्रकार]: नाम [methodname]: नाम openmethodbrace closingmethodbrace ओपनब्रेस समापन ब्रेस; समस्या में रहता है clsdata = (clsfield | clsmethod) *; अगर मैं clsdata से clsdata = clsfield * सेट करता हूं; या clsdata = clsmethod *; यह ठीक काम करता है, हालांकि, जैसा कि आप कल्पना कर सकते हैं, इसका मतलब यह नहीं है कि मैं इसके लिए क्या करना चाहता था मैं चाहता हूँ कि एक क्लास दोनों तरीकों और क्षेत्रों (किसी विशेष क्रम में नहीं!) के लिए अनुमति दें। तो मेरा सवाल है कि मुझे clsdata को कैसे परिभाषित करना चाहिए ताकि मैं नहीं त्रुटियों। मैं पुनरावर्ती विकल्प के बारे में सोच सकता हूं, लेकिन मैं इसे यथासंभव अधिक स्वच्छ रखना चाहूंगा! धन्यवाद clsdata = (clsfield | clsmethod) *; SableCC के पास एक EBNF जैसा वाक्यविन्यास है, लेकिन इस प्रकार का समर्थन नहीं करता व्याकरण नियम का ज...

java - GUI programming study materials? -

GUI programming is difficult to understand Some good content / books / lectures / features / advice for learning about this Java (swing) Q., PQT .... Did you have any inquiry online of documentation?

iphone - Simulating an anchor point when translating in Core Gaphics -

Core graphics do not provide an anchor point property, and all conversions / translators assume an anchor point 0,0 (bottom left). . Core animation provides an anchor point, but we are not using CA. Does anyone know how to modify the transformation matrix (CGF is used with Transforms) so that we have different anchor point locations, center, etc.)? Thank you Be sure to translate the desired point to 0, 0. Regardless of the changes you want, apply it. Then apply inverse translation. Say that you want to rotate the point 25, 25. Do this: CGFFEINE TRANSFORM * T = CZFIN TransformMake (); T = CGFine transportlet (T, -25, -25); T = c GEFFEN transcentrate (T, angle); T = CGFine transcontinental (T, 25, 25); At this point, T is a change that will rotate about 25, 25 from angle.

R6RS vs. R5RS scheme -

I'm relatively new to the plan and I have difficulty finding a solid document online by seeing major changes with R6RS . Anybody care to care? has prepared a list of high level changes with some commentary, which includes: Square brackets are now equal to parentheses (e.g., (let ([foo3]) ... - This was supported in some plan implementation but now standard Multiple values ​​ String is the ability to return more escape characters, such as As a library Relatively new and you have patience, you will get more benefits instead of leaving the changelog ...

winforms - Launch VB.NET form as a separate process -

I have a VB.NET application that has IE control in one form, the application initially starts with memory size 9 Around the MB, but when the IE form launches, the consumption of memory increases to 27 MB, and when that form is closed, then there is a reduction of only 3-4 MB in memory, hence allocation to IEFRM Why memory is not allocated automatically? Is there any work to solve this issue? If possible, launching the form as a separate process will be helpful. If you make sure the farm, the garbage collector should eventually free up this memory. In separate process, IE should not be required to run control. However, if you are using IE 7, you may want to read about memory leaks.

CakePHP Javascript Confirm dialog Form Submission cancel not working -

With the registration form of my cake php, once I click on the Submit button, I just want to show the Javascript Confirm dialog box, which should work as follows: I canceled I am, though it is submitted. Why do not know? Cake PHP form code: & lt ;? Php echo $ form-> Create ('Poor', array ('type' = & gt; 'file', 'url' = & gt; '/ register', 'onsubmit' => 'confirmfrmSubmit ();' ')) ;? & Gt; My JS code: `function confirmfrm submit () { var agree = confirm (" are you sure Want to continue? "); If (agreed) return is true; Second false return; } ` Please tell me, if you have some ideas with it. Thank you! Update: credit for fixing my broken callback See below for details (and not to allow stacko to accept an edit to finalize a big raspberry, answer author.) Using jQuery here The solution is: & lt ;? Php $ this- & gt; HTML-> Submit script ("j...

android - Vertical Gallery implementation using ListViews -

We must implement the vertical gallery of objects (say static text) with fixed focus in the center of the screen. The focus will be at one point and the item will scroll up and down and the list will start from the center of the screen. Question: Can this list view be used? Do I have to expand the gallery object and work on orientation? The gallery will not allow vertical scrolling, only horizontal for this reason, I do not think That your second question is the answer to a work. I recently need to get something done with these lines and it can be found:

android - I wants to launch an activity from the same Activity using menu items -

How can I launch an activity from the same activity under some activity using the menu item? Example: - I have an activity, which can be launched in two conditions depending on the value boolean variable 'flag'. The value of this flag may be "true" or "false" if the flag is "false" then the menu option should be disabled for this activity in the icon / text. This means that I should not be able to start activity. And if the flag is "true" then the menu option should be enabled for this activity and I should be able to launch the same activity using the menu item. (Note: The activity of both cases should have the same content, but only the page header will be different.) Thanks, If you relate on your activity behavior sigle boolean - it will handle passes and handle matters for Botske. Check out this question about how to pass data for activity.

deployment - Cannot run heroku pg:info from rake task -

I am writing a rake work to deploy on my rock, there is only one step in the job: sh% {heroku pg: info --app myapp} and failed with it myoku pg: info Unknown command Run 'Harkuuk Aid' to use information rack abortion! Failure with command status (1): [Heroki PG: info --app ...] The funny thing is that any other hack command starts working idea? Thanks in advance for any help due to the problem rack, the hackoku mani Version 1.6.3, which does not support PG commands. After updating my jamfile to update Harkoku to 1.18.3 I started to do everything.

What is the advantage of initializing multiple javascript variables with the same var keyword? -

When I read the javascript code which is clean and written by those that are obviously very good, then I Often see this pattern var x = some.initialization.method (), y = some .els (), z; What is the benefit of the benefit of that writing var x = some.initialization.method (); Var y = something.els (); Var z; The second format is easy to maintain, because each row exists by itself, then you can delete a line or add a line, and not to see if it The first or the last variable that is to be started is to be started. It also means that source control diffs / merges will work better. Given these losses, I think there is some benefit in the first format - but what is this? Of course they execute equally as it is similar to parser. Javascript to be sent to the browser; Google will only compile a var version in 'whotspace' mode: var x = some.initialization.method (), y = some .els (), z; and as multi: var x = some.initialization.method (); Var y = somethin...

c++ - Get process name windows title name and installed software name -

I would like to know a software when it wants to run it on the name of the process name and its company and for example this windows The name of the software is Add / Remove Program, which is called File Client 3.3.2.1, its process name is filezilla.exe, its company name is FileZilla Project, its Windows Title Title is FileZilla Is it possible to get these connections Calculate all windows to get your window handle (HWND) with EnumWindows. For each window: Use GetWindowText to get its title: Use GetWindowThreadProcessId to get the process ID of windows To get a handle in the process, use OpenProcess to get the name of the exe Use GetModuleBaseName for

vb.net - How to populate a database using entity framework -

How do you put some data into the table when you use the "Create database from the database" feature? After the database is prepared for example, I want the tableble with all the countries. Is there a script / shortcut to do this? You have the following options DB / Create SQL scripts for creating tables and data / P> DB / table using database management tools (such as management studios for SQL Server) Create and insert data

entity framework 4 - Binding navigation properties to formview -

I am using forms and objectsstrons to edit / insert objectstrokes. I want to update a unit object update properties with its navigation properties in a single form view. Is this possible? Any thoughts on how to do this? Yes, this is possible. One way is to override the FormView.ItemInserting / ItemUpdating methods and manually add new values ​​to any type and type (including navigation properties) by hand.

activerecord - association data in rails model scope -

I have a model posted (blog post) and a model named category . Each term is related_to a category. Each category has a feature called holder , which specifies the amount of time before "ending", for example movies_category.retainer = 30.days What am I trying to do that is preparing a scope for the post which searches for all the posts that have been "expired" for example, suppose I hardcoded the value of 30.days and it takes up all the categories (hence all the posts) The scope would have been: scope: expired, lambda {where ("post.ctated_t However, instead of hardcoding, value 30.days , I want to get the value of the holder from the post category and base it on the basis of something like that : scope: expired, lambda {where ("post.ctated_t Then put it in words: I have to admit all the posts The end is to be finished, and the status of the term is determined by the retireer value of each post category (i.e. posts in the cat...

Eclipse->Prefrences->Network connections -

In the Eclipse network connection, I must select 'active provider' as 'root' and some proxy entries need to be added. But I am unable to do this. There is nothing to add proxy entries and to not select entries from the web browser PLS support. Thanks The network connection of eclipse depends on your local area network ( LAN Settings. For Windows, go to Control Panel -> Internet Options -> Connection ->

database - Tips and Tricks to speed up an SQL -

संभव डुप्लिकेट: ये मूल बातें SQL फ़ंक्शन और कीवर्ड हैं। क्या आपके SQL को गति देने के लिए कोई युक्तियां या चाल है? उदाहरण के लिए; मेरे पास कई खोजशब्दों के साथ एक प्रश्न है ( AND, GROUP BY, ORDER BY, IN, BE, जैसे ... etc) कौन सा खोजशब्द मेरी क्वेरी में सबसे ऊपर होना चाहिए? मैं इसे कैसे तय कर सकता हूं? उदाहरण; जहां नंबर IN (156, 646) और '01 / 01/2011 'और '01 / 02/2011 के बीच की तिथि '01 / 01/2011 'और '01 / 02/2011' के बीच और जहां की संख्या (156, 646) OR कौन सा एक तेज़ है? कोई "ट्रिक्स" नहीं है। प्रतियोगिता को देखते हुए डेटाबेस विक्रेताओं के बीच जो एक "तेज" है, किसी भी "चाल" जो कि हमेशा सही होता है डेटाबेस में ही कार्यान्वित होगा (इन चीजों को "ऑप्टिमाइज़र" नामक डेटाबेस के रूप में लागू किया गया है)। वहाँ केवल कुछ चीजें हैं जिनके बारे में पता होना चाहिए, लेकिन इन्हें आम तौर पर कम नहीं किया जा सकता है: सुविधा सुविधा का प्रयोग करें वाई यह उस मॉडलों की तरह कभी भी...

c - "Bad file descriptor" error, when using file descriptors of the socketpair function more than once -

The following code sends messages to their parents by sending their parents to the socket pair. Add # & lt; Sys / types.h & gt; # Include & lt; Sys / socket.h & gt; # Include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; #include & lt; String.h & gt; #defined message "hello" ent main () {four messages [100]; Int i, pdfurk, ​​socket [2]; / * * Trying to use a socketpayer function * * (if socketpayer (aufunix, SOCAKRRM, 0, sockets) == -1) {* peer ("make socketpair"); * Exit (-1); *} For (i = 0; i & lt; 2; i ++) {if (socketpayer (f_UNEX, SOCAKRRM, 0, sockets) == -1 (retaliation ("making socketpayer"); exit (-1);} Printf ("i:% d \ n", i); PidFork = fork (); If (pidFork == -1) {perror ("make baby process"); exit ( -1);} And if (pidFork! = 0) {// Basic Closed (Chairs [0]); if (Read (Sockets [1], Message, Stellen (Message)) == -1) {Mess ("Data reading"); exit (-1);} Printf (...

xml - XSD for simplecontent with attribute and text -

How can I validate the length of the text of that element in which there is an attribute Example: & lt; Game code = "FB" & gt; Football & lt; / Sport & gt; Now I need to restrict the potential values ​​of code attributes (like "FB", "BB", "TT") and I need to restrict its potential values ​​and length The text ("football", "basketball", "table tennis") and the maximum length of these lessons ("football", "basketball", "tablettini") can be 20. I tried & lt; Complex type name = "sports" & gt; & Lt; SimpleContent & gt; & Lt; Extension base = "string" & gt; & Lt; Attribute name = "code" type = "code" /> & Lt; / Extension & gt; & Lt; / SimpleContent & gt; & Lt; / ComplexType & gt; & Lt; Simple type name = "code" & gt; & Lt; Restriction base = ...

ruby on rails - Working with router.rb -

हे! मेरे पास (उदाहरण के लिए): @ w1 = रैंड (99 99 99 9) @ वा = डाइजेस्ट :: SHA1.hexdigest (@ w1.to_s) और मुझे मिलता है: 6437gdfghfijd8794tyr98vdhf (कोड) .. ओकेई ... रेल में मैं इस कोड को मेरे यूआरएल में कैसे डाल सकता हूं .. ऐसा कुछ: लोकलहोस्टः 3000 / 6437gdfghfijd8794tyr98vdhf? #router आरबी map.about '/ @ w',: नियंत्रक = & gt; 'Ans',: क्रिया = & gt; 'सूचकांक' इसे आपको कुछ विचार देना चाहिए या यदि आप इसे अपने दृश्य में उपयोग करना चाहते हैं:

mysql - Drop multiple databases with names matching a pattern -

I want to leave all the databases that start with one word. abc xyz cms_db1 cms_db2 Cms_xyz pqr In the above example, I would like to exclude all the databases starting with the word "database". I think that the matriculation or shell script can do this. What is the best way? Linux methods: #! / Bin / bash DB_STARTS_WITH = "cms" MUSER = "root" MPWD = "mypass" MYSQL = "mysql" dbs = "$ ($ MYSQL -u $ MUSER -p $ MPWD -Base 'show database')" for DB $ Dbs; If [["$ db" = ~ "^ $ {DB_STARTS_WITH}"]]; Then echo "$ db removal" $ MYSQL -u $ MUSER -p $ MPWD -On the "dropdown $ db" use of drop Participate at your own risk;)

c# - Anchoring/docking behavior in WPF on Canvas layout -

I'm just arranging several elements on a canvas layout, in fact elements represent the interactive flow-chart Is implemented as a change, I need relative change on some elements. Specifically, I should anchor or dock some elements on their original elements. I get different solutions, though I do not know that they solve my problem in the most beautiful way. Here's an example: & lt; Line X1 = "80" x 2 = "800" Y1 = "730" Y2 = "730" /> & Lt; Polygon point = "0,30 40,0 40,60" canvas.lift = "48" canvas.pop = "700" /> Polygon pulls a triangle and I want to dock it to the left side of the line, this means when the line is translated into a new condition or while scaling it, the polygon Should move forward with it. Is this possible? Place them in your canvas, in this way you can keep the status of the outer canvas completely And keep the interior accessories together Like this: ...

tortoisesvn - Listing outdated files using SVN commands -

मैं SVN कमांड्स का उपयोग कर पुरानी फाइलों को कैसे सूचीबद्ध करूं? सर्वव्यापी करने से पहले svn update संघर्षों और हलकों से समाधान करें।

django - Python find closest decimal match -

मेरे पास निम्न सूची है: CHOICES = (('8.25', ' 0 '), (' 7.35 ',' 1 '), [...]) मॉडल का उपयोग मैं टपल में पहला मान (उदाहरण के लिए 8.25 - आंशिक रूप से मिमी में )। तो उदाहरण इनपुट 8.11 जो 0 या 7.30 वापस आएगा, जो 1 आदि लौटाएगा। जब तक आपके मान सॉर्ट नहीं किए जाते हैं और विकल्पों की संख्या मानते हुए बड़ा नहीं है: परिणाम = सॉर्ट किया हुआ ([( मैथ। एब्स (कश्मीर इनपुट_वल), v) के लिए (के, वी) विकल्प में)] [0] अन्यथा विकल्प को एक बार सॉर्ट करें और द्विआधारी खोज () का उपयोग करें, जैसा कि में सुझाव दिया गया है अन्य जवाब यह इस तरह दिखता है: #do इस भाग को केवल एक बार पसंद करें _dict = dict (विकल्प) sorted_keys = sorted ([float (k) के लिए (k, v) विकल्पों में)] # .. L, r = bisect_left (input_value, sorted_keys), bisect_right (input_value, sorted_keys) k = l अगर math.abs (input_value-l) & lt; math.abs (input_value-r) अन्य r परिणाम = options_dict (str (k) )

c++ - Use typdefs of STL classes like map, list etc -

I am programming in an existing project, C ++, and I map the STL sections, set and list multiple times Now I'm interested if there is any way to clear some codes using internal data types. For example: std :: map & lt; Uint64_t, std :: list & lt; Int32_t & gt; & Gt; Mymap; // map (std :: map & lt; uint64_t, std :: list & lt; int32_t & gt; :: constiiterator = mymap.begin (); it! = Mymap.end (); it ++) {// Add some to the map for it here iterative here} My question is if I std :: map & lt; Uint64_t, std :: list & lt; Int32_t & gt; & Gt; :: const_iterator for example mymap.const_iterator , but does not compile it to bid for G ++: Error: Longer unsigned integer of "stud :: map", std :: list & lt; Int, std :: allocator & lt; Int & gt; & Gt;, std :: less & lt; Long unsigned int & gt; std :: allocation & lt; Std :: pair & lt; Long long unsigned construction, std :: list & lt; Int, std...

iphone - Why does iOS Simulator render my images at lower resolution in mobile Safari for Retina? -

I am trying to test my web application in a safari in Mobile Safari and can only use the iOS simulator I am My images are all rendering at 2x resolution, I know that it may seem to be at some level, but I really want to render the images at their natural resolution. How can I get the img tag to render on my natural resolution in the mobile safari on an iPhone retina device? (Simulator or otherwise) UPDATE I am not writing a basic application and calling Safari, I am writing a simple official language website I want to present the Safari to my img tag images in full resolution for both retina and non-retina devices. P> You need to use the media query Retina will not automatically assume that you are using 2x property without it; So that all website graphics will be able to render at 50% of their desired size. Disaster! (from HTML5 boilerplate): / * iPhone 4 and higher pixel ratio device ----------- * / @ Media only screen and (-webkit-min-device-pixel-ratio: 1....

Google Maps Location and Area Fields for Django -

I'm looking for two Django model fields which are easy to use in admin and Google Maps offers interactive interface. Locationfield Store latitude and latitude, the administrator clicks the map to mark the user location. Fieldfield Stores different strings from commas, the admin user creates a shape on the map to mark an area. / Ul> There is also definitely geodjango but this one bit overkill for this project. We are experimenting with a custom (non-administrator) interface. If the location can not be found from Google street address, we offer a navigable map and allow the user to choose a location, then store latitude and longitude. Otherwise, there is a possibility of getting lots of street addresses that can not parse Google Maps.

fast sampling in R -

क्या base :: sample फ़ंक्शन? आप आधार को नष्ट करने से थोड़ा-सा गति प्राप्त कर सकते हैं: : नमूना फ़ंक्शन कॉल: & gt; X & lt; - rnorm (10000) & gt; System.time (1: 100000 में मैं) x [अनंत (नमूना (10000 एल, 10 एल, गलत, नल))) उपयोगकर्ता सिस्टम बीत चुका 2.873 0.017 2.851 & gt; System.time (1: 100000 में मैं) नमूना (एक्स, 10)) उपयोगकर्ता सिस्टम बीत गया 3.420 0.025 3.258 आपकी समस्या के आधार पर गति बढ़ाने के अन्य और अधिक चालाक तरीके हो सकते हैं तुम्हारा कोड। एक छोटे से बड़े नमूने के साथ कई छोटे कॉलों को बदलने के तरीके के बारे में सोचें।

c# - Passing References -

I want to know a great way to pass class references from class. Basically I have two classes in my check code: One is an investigator game code. class checker codes {IchecherMove [,] Pieces; Public static counter counter; Checkers Checker; Public Zero ExecuteAll (ET column start, int linestart, int column end, int rowend) {checker = new checkers (); Gaming g = new game (pieces, column start, line start, column end, queue); // I live this reference down I want to pass in the method given in the Mewelidity Manager (); Checker.obtainGameReference (g); // I want to pass this method through this method. Other code form code: Public partial square checkers: form {public Checkers () {Initial group (); } Checkersode codefile = new checksod (); Private Zero Checkers_load (Object Sender, EventAgds E) {chessPics = Pattern (); PrintPieces (codeFile.FirstLoad ()); } Game GameFif; Public Zero gear reference (game g) // I want to get that reference here {gameRef = g; And this}} Th...

r - remove top and right border from ggplot2 -

इस सवाल का पहले से ही एक उत्तर है: 4 उत्तर क्या इसे हटाने के लिए संभव है Ggplot2 ग्राफ़ से ऊपर और दायां सीमा? Ie, मैं एक्स और वाई-एक्स को रखना चाहता हूं लेकिन ग्राफ़ के चारों ओर के बाकी हिस्सों को दूर करना चाहता हूं। यह धागा देखिए, यह विशेष रूप से समस्या के साथ संबंधित है और एक ऐसा समाधान देता है जो काम करने के लिए प्रतीत होता है।

reflection - Is there a way to run code when an assembly loads? -

I am creating an application that will load unbelievable assemblies for inspection (i.e. the full name of the assembly recovered. ). For security reasons, I am trying to think about the ways in which these assemblies can be written which will allow them to execute the code upon loading. I have not code with a method yet, but wanted to throw it out to see if anyone can do it. I know that I can load these assemblies in an incredible app domain, so that they have to stop doing just about anything, but I want to avoid its complexity if it is not necessary. > In particular, I use Assembly.Load and . Maybe there is a better way to load the assembly name without using the assembly class? Thank you, Matt First of all, AssemblyName The square is it allows you to find the name of the assembly without loading it. Second, you can load assemblies using the Assembly.ReflectionOnlyLoad , which reflection only uses context - no code can be executed from this kind of assembly. ...

php - Updating a many-to-many connector table all at once -

I have two tables: article categories There are many tables that connect them. Create Table Cat 2art (article Iid, category_id INT); For a specific article, I have a 'new list' of the Category ID, and we need to update the CatBart table with them. Some categories were removed, some were added and some were where they were. What is the most effective way to update this table? I can remove all records with the specified article_id indisputably and can add them again. However, if I record a date in the same table that relates to a category, that information will now be destroyed. I'm looking for a great pattern that easily solves it issue. This question is especially for PHP and MySQL, but the answers to other languages ​​are also fine, they also apply to PHP + MySQL. supports other system MERGE statement that actually what you do Want to do However, in MySQL , you have at least two questions (this can not be deleted / inserted / updated for a s...

user interface - Testing Android App GUI -

I'm developing an Android app on GUI development, I have to raise the issue that if the GUI works on various Android phones So how can I test (I am with different screen sizes, density and etc.). How can I see that everything is right? You are asking to do the hardest job in Android development if If you are targeting the Motorola device, the SDK for the emulator is a bunch of adsense. If you need to test a specific device, you can try to use it.

xslt - Conditional AND OR two different values -

I have combinations of AND for different variables I and I tried the following: & lt; Xsl: if test = "$ countrycode = '104' and (transaction type! = 'Allowance' or revenue center! = '1100')" & gt; But it does not work whether it is possible to test conditional or do I have to divide it like this: and in another element I do: I searched the Internet but there was no sign of it. Thanks and best regards, Peter XPath expression : $ countrycode = '104' and (Lane -Den type! = 'Allowance' or revenue center! = '1100') The syntax is correct . Can not say anything because no XML document is provided As always, do not recommend that the ! = operator, Not necessary in - It is used when any argument is a node-s et (or sequence or node-set in xpath 2.0) than most people expect Sector so far. ! = better use the function no () : $ countrycode = '104' and (not (transaction type = ...

iphone - how to change barbuttonitem from edit to done -

Image
I am putting the toolbar at the top of my view with the editing button. I'm taking action to edit the table shown below for the edit button. - (IBAction) Edit ModeForTable {[tableview setEditing: Animated Yes: Yes]; NSLog (@ "Edit Button"); } What do I need now when I click on the edit button, I have to change this button to edit button. This is my screen. Whenever I click on the edit, I have to set the edit mode for the table Similarly, whenever I click on the button that I have done, I need to change it Which should edit the button and edit mode incorrectly. Update: - (IBAction) Edit Moderate {if (buttonClickid == 1} {[All List Set Editing: Yes Animated : Yes]; Mybutton.style = UIBarButtonSystemItemDone; Mybutton.title = @ "done"; button clicked = 2; NSLog (@ "mmm");} if (button-clicked == 2) {[All List Set Editing: No Animated: Yes]; Mybutton.style = UIBarButtonSystemItemEdit; MyButton.title = @ "Edit"; ButtonCl...

javascript - Pixastic doesn't work properly for me, why? -

I need to do some interactive image processing on the webpage I found and it looked good for work. I'm trying to blur an image, but I can only get "blurfast" to work "Blur" does not work for me. I am watching and reading the document and can not see why this is unsuccessful. Does anybody have any ideas? I use this JS: $ (function () {var img = document.getElementById ("imageone"); $ ("# blurfastbutton" " Click (Function (Process (IMG, "Blurfast", {Amount: 0.2});}); $ ("#blurberton") Click (function () {pixstick. Process (IMG, Blur) "};});}); For many additives, pixstick must swap & lt; img & gt; element and lt; canvas & gt; element and per-pixel adjustment form A security exception is being tampered with the image being compromised using the "blur" , because the image source is on the separate domain in the document. You also must know that due to security restrictio...

android - Binary Data SMS not received on emulator -

I'm trying to send and receive binary data sms from my app (SDK 2.1-Update 1), no luck No I have the following receivers installed in the manifest: & lt; Receiver Android: name = ". MainReceiver" & gt; & Lt; Intro-Filter Android: Priority = "10" & gt; & Lt; Action Android: name = "android.provider.Telephony.SMS_RECEIVED" /> & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt; & Lt; Receiver Android: name = ". MainReceiver" & gt; & Lt; Intro-Filter Android: Priority = "10" & gt; & Lt; Action Android: name = "android.intent.action.DATA_SMS_RECEIVED" /> & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt; I took action without data tag and without DATA_SMS_RECEIVED: & Lt; Data Android: host = "localhost" /> & Lt; Data Android: port = "16001" /> I have specified that all the permissions I can do ar...

hibernate - HQL Query Based on Set Contents -

मेरे पास एक सेट के साथ हाइबरनेट प्रबंधित POJO है: सार्वजनिक वर्ग बुक {निजी सेट & lt ; पृष्ठ & gt; पृष्ठों; सार्वजनिक सेट & lt; पृष्ठ & gt; GetPages () {रिटर्न पृष्ठ; } सार्वजनिक शून्य सेटपृष्ठ (सेट & lt; पृष्ठ & gt; पृष्ठ) {this.pages = pages; }} पब्लिक क्लास पेज {निजी इंट पेज नम्बर; सार्वजनिक int getPageNumber () {वापसी पृष्ठ संख्या; } सार्वजनिक शून्य सेट पृष्ठ संख्या (इंट पेज नंबर) {this.pageNumber = pageNumber; } मैं पेज नंबर पर आधारित एक HQL क्वेरी कैसे लिखूँगा? उदाहरण के लिए, जिन सभी पुस्तकों की संख्या 100 से अधिक पृष्ठ है? निम्न कार्य नहीं करता: पुस्तक से जहां पृष्ठों। PageNumber & gt; 100 का प्रयोग करें join : पुस्तक ख में शामिल होने से अलग बी चुनें p.pages p जहां p.pageNumber & gt; 100 बिना अलग यह स्थिति संतोषजनक प्रत्येक पृष्ठ के लिए पुस्तक का एक अलग उदाहरण वापस करेगा। यह भी देखें:

Pass an array of custom objects + Android -

I am very new to Android development, there is a small problem facing here. I have a class animal. I need to pass an array of animal classes between two activities. I have searched for forums and have found that it can be done with identifiable, but I could not fully understand it. I tried to use serialjob but found exceptions. Please guide me how can this be done? : ArrayList & LT; Animals & gt; Animal = new arreelist & gt; Animals & gt; (); // Fill your list with your animals here intent.putExtra ("animals", animals); Recover: Arreelist & gt; Animals & gt; Animal = (arrelisted & lt; animal & gt;) getIntent () .getSerializableExtra ("animal"); Your class animal should implement the serialjob . Edit: Please note that this approach is easy-to-implement, but it is time to periodically serialize and deorize the object, and if the array is large in size If there is a noticeable delay in change in activities (e.g...

assembly - Why don't the bytes intersect? -

क्यों बाइट्स काटना नहीं है ?? (gdb) x / 4x 0x7fffffffe958 0x7fffffffe958: 0x0040045c 0x00000000 0x00000000 0x00000000 (gdb) x / 4x 0x7fffffe960 0x7fffffffe960: 0x00000000 0x00000000 0xf401d994 0x00000034 वे करते हैं ऐसा लगता है कि आप भूल जाते हैं कि पता हेक्स में है हालांकि। यहां से ऊपर दिए गए शब्दशब्द हैं, लेकिन बाइट के डेटा के नीचे प्रत्येक बाइट के पते के पिछले दो अंकों के साथ: 0x0040045c 0x00000000 0x00000000 0x00000000 58595a5b 5c5d5e5f 60616263 64656667 0x00000000 0x00000000 0xf401d994 0x00000034 60616263 64656667 68696a6b 6c6d6e6f यदि हम पतों से मिलते हैं, तो हम देखते हैं कि बाइट 0x60 से 0x67 दो के बीच समान हैं (दोनों ही मामलों में सभी शून्य)।

c# - How can I override/hide the SetModified method on a DataRow? -

मैं RowState पर एक DataRow ऑब्जेक्ट। यहां तक ​​कि मेरे पास क्या है, लेकिन मेरा SetModified विधि कभी भी नहीं बुलाती: आंतरिक वर्ग DataRowEx: DataRow, INotifyPropertyChanged {#region ईवेंट सार्वजनिक ईवेंट PropertyChangedEventHandler PropertyChanged; #ेंड्रियन # रेलीयन निर्माण सार्वजनिक डेटारवएक्स (डेटारवबिल्डर बिल्डर): आधार (बिल्डर) {} #ेंड्रियन # रेगियन ओवरराइड संरक्षित नया शून्य सेटमोडिफाइड () {base.SetModified (); संपत्ति बदल गई (यह, नया सम्पत्ति बदलकर ईवेंटअर्ज ("रोस्टेट")); } #ेंड्रियन} मुझे लगता है कि मैं इसे आंतरिक बना सकता हूं और पंक्ति से युक्त ऑब्जेक्ट से खुद को कह सकता हूं, लेकिन मुझे लगता है कि बेहतर तरीके से होना चाहिए। DataTable साथ काम करता है DataRow और, जैसे, कभी कॉल नहीं करेगा आपका SetModified () में DataRowEx (यह विरासत में मिला सदस्य के "छुपाता है", यह इसे ओवरराइड नहीं करता है)। संभवतः प्राप्त करने का सबसे आसान तरीका जो भी आप चाहते हैं वह कस्टम DataTable को लागू करना है, या तो OnRowChanging () या OnRowChanged (...

ruby on rails - Sync between locale files -

I have two languages ​​yml files like en.yml and es.yml. Whenever I add some keys to en.yml, I do not want to manually copy wires from en.yml to es.yml. For example en key1: "message1" key2: "message2" es: key1: "message1" When I should have some work connected to key2 es.yml Try screencast is hopefully your Can help

Single quotes in sqlite on android -

itemprop = "text"> I'm getting value from WebSwari Some of my values ​​come with single quotation marks Support this sqlite single quote like this sample not doing. So I change them with double quotation marks. When I get the value from DB then I am not able to parse the value. I did not get the parser exception well Can anyone tell me how to do this? Instead of a single quote for my double quote, my code is stockservicevalue = stockservicevalue.replaceAll (" string sql = "select", "from myquest;"; log: 03-28 19: 02: 36.309: Warning / system. er (344): org.apache .harmony.xml.ExpatParser $ ParseException: line 1, column 50437: well went not formed (invalid token) 03-28 19: 02: 36.321: Warne / system. er (344): at org.apache.harmony.xml .ExpatParser.parseFragment (ExpatParser.java:492) 03-28 19: 02: 36.330: Warne / system. er (344): at org.apache. Harmony.xml.ExpatParser.parseDocument (ExpatParser.java:477) 03- 28 19 : 02: ...

javascript - Should one write window.X when referring to a built-in global property X in the (desktop) browser? -

Therefore, (desktop) browsers have dozens of built-in global properties, for example: document undefined parseInt JSON Location Warning setTimout etc. While referring to those qualities, they should clearly note them as global property by prefixing them with their properties window. ? Therefore, for example: var wrap = window.document.getElementById ('wrap'); and window.setTimeout (loop, 100); and var x = window.parseInt (input.value, 10); I think there are three answers to this question: Yes, you always write window.X No, you do not have to write window.X . Just X is OK. For some properties it depends on the property, use window.X , for some other properties, X (If this is your answer, expand it.) So, what is it? I leave a few exceptions and go to 3: No window . In the browser, the window refers to the global scope window. As unnecessary in window.prompt () , you can emphasize it to u...

java - Best design to organize HttpUnit+junit as standalone app -

I have to write a set of HTP unit tests, which should be deployed and on the external server as a single threaded application Should start. After reading some investigations and documentation, I came to the following application structure: Public static zero master throws exception (class ... args) {class [] Test Cases = {LogInsthest. Class, Test 2 Class, Test 3 Class}; TestSuite suite = New TestSuite (Testcases); TestResult Results = New TestResult (); Suite.run (results); DisplayResults (results); } And testcase looks like this: extends the public class LoginPageTest TestCase {Public Zero testLogin () throws IOException, SAXException {WebConversation wc = New WebConversation (); // something HttpUnit init code here loginForm.setParameter ("j_username", login); LoginForm.setParameter ("j_password", pass); LoginForm.submit (); String Expected = String. Format ("/% s ​​/ verb / logon.", Endpoint); AssertEquals (wc.getCurrentPage (). GetURL (). G...

routing problem in asp.net mvc 3.0 -

When I try the sample application with asp.net mvc 3.0 as the default, about home and link But whenever I use the global controller / action / id = urlhelper.optional, ultimate = urlhelper.optional and custom like the project. If I try to add data, all the links' href just disappears, i.e. & lt; A href = "" & gt; Home & lt; / A & gt; Like a markup is generated please help Thanksgiving This is a known bug in MVC 3. Here is a blog post:

scripting - ruby script to enter prompt command from a system command -

I am trying to write some DBS mysqldump as a simple script I'm stuck at the password prompt though. I have only one config file, which contains all DB credits, then the script can be used to connect those people to DB. The problem is a command like: system ('mysqldump -u username -p') then prompts for Enter password: Even when I do something like this: System ( 'Mysqldump -u usernames -p some_password') I still get a prompt for the password ... In Ruby I can not do lots of scripting I am in harm's way why my script is automatically reporting this information Can Rg so does not require the user to run the script. You -p system ('Mysqldump -uusername -psome_password') or delete the location without a password system ('mysqldump -username') or system ('mysqldump -username --password =')