Search Results

Search found 25093 results on 1004 pages for 'console output'.

Page 11/1004 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Overloading Console.ReadLine possible? (or any static class method)

    - by comecme
    I'm trying to create an overload of the System.Console.ReadLine() method that will take a string argument. My intention basically is to be able to write string s = Console.ReadLine("Please enter a number: "); in stead of Console.Write("Please enter a number: "); string s = Console.ReadLine(); I don't think it is possible to overload Console.ReadLine itself, so I tried implementing an inherited class, like this: public static class MyConsole : System.Console { public static string ReadLine(string s) { Write(s); return ReadLine(); } } That doesn't work though, cause it is not possible to inherit from System.Console (because it is a static class which automatically makes is a sealed class). Does it make sense what I'm trying to do here? Or is it never a good idea to want to overload something from a static class?

    Read the article

  • Program output to file in Java (and reading it again)

    - by Cohagen
    I have a large main method in an IO class which creates objects from four different classes in my program (which all use one another to some extent). My main method takes all info in using a scanner, from the console window, and uses this info to call the constructors and methods in the other classes. As this is my first full program in Java I have been focussed on making the main method work via the console, without properly considering file input and output. I cannot see an easy way of making that work now. Ideally what I require is some way of writing everything I input to the console while running the main method to a file, in a format that can be read again and inputed back through the main method? I have refrained from posting the main method as it is 250+ lines long, but will post any relevant parts of it if required. Any help appreciated

    Read the article

  • MySQL Utility Users' Console Oerview

    - by rudrap
    MySQL Utility Users' Console (mysqluc): The MySQL Utilities Users' Console is designed to make using the utilities easier via a dedicated console. It helps us to use the utilities without worrying about the python and utility paths. Why do we need a special console? - It does provide a unique shell environment with command completion, help for each utility, user defined variables, and type completion for options. - You no longer have to type out the entire name of the utility. - You don't need to remember the name of a database utility you want to use. - You can define variables and reuse them in your utility commands. - It is possible to run utility command along with mysqluc and come out of the mysqluc console. Console commands: mysqluc> help Command Description ----------------------           --------------------------------------------------- help utilities                     Display list of all utilities supported. help <utility>                  Display help for a specific utility. help or help commands   Show this list. exit or quit                       Exit the console. set <variable>=<value>  Store a variable for recall in commands. show options                   Display list of options specified by the user on launch. show variables                 Display list of variables. <ENTER>                       Press ENTER to execute command. <ESCAPE>                     Press ESCAPE to clear the command entry. <DOWN>                       Press DOWN to retrieve the previous command. <UP>                               Press UP to retrieve the next command in history. <TAB>                            Press TAB for type completion of utility, option,or variable names. <TAB><TAB>                Press TAB twice for list of matching type completion (context sensitive). How do I use it? Pre-requisites: - Download the latest version of MySQL Workbench. - Mysql Servers are running. - Your Pythonpath is set. (e.g. Export PYTHONPATH=/...../mysql-utilities/) Check the Version of mysqluc Utility: /usr/bin/python mysqluc.py –version It should display something like this MySQL Utilities mysqluc.py version 1.1.0 - MySQL Workbench Distribution 5.2.44 Copyright (c) 2010, 2012 Oracle and/or its affiliates. All rights reserved. This program is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, to the extent permitted by law. Use of TAB to get the current utilities: mysqluc> mysqldb<TAB><TAB> Utility Description -------------        ------------------------------------------------------------ mysqldbcopy      copy databases from one server to another mysqldbexport    export metadata and data from databases mysqldbimport    import metadata and data from files mysqluc> mysqldbcopy –source=$se<TAB> Variable Value -------- ---------------------------------------------------------------------- server1 root@localhost:3306 server2 root@localhost:3307 you can see the variables starting with se and then decide which to use Run a utility via the console: /usr/bin/python mysqluc.py -e "mysqldbcopy --source=root@localhost:3306 --destination=root@localhost:3307 dbname" Get help for utilities in the console: mysqluc> help utilities Display help for a utility mysqluc> help mysqldbcopy Details about mysqldbcopy and its options set variables and use them in commands: mysqluc> set server1 = root@localhost:3306 mysqluc>show variables Variable Value -------- ---------------------------------------------------------------------- server1    root@localhost:3306 server2    root@localhost:3307 mysqluc> mysqldbcopy –source=$server1 –destination=$server2 dbname <Enter> Mysqldbcopy utility output will display. mysqluc>show options Display list of options specified by the user mysqluc SERVER=root@host123 VAR_A=57 -e "show variables" Variable Value -------- ----------------------------------------------------------------- SERVER root@host123 VAR_A 57 Finding option names for an Utility: mysqluc> mysqlserverclone --n Option Description ------------------- --------------------------------------------------------- --new-data=NEW_DATA the full path to the location of the data directory for the new instance --new-port=NEW_PORT the new port for the new instance - default=3307 --new-id=NEW_ID the server_id for the new instance - default=2 Limitations: User defined variables have a lifetime of the console run time.

    Read the article

  • Iphone Receiving Errors in Organizer Console

    - by user192124
    When attempting to use the app I have developed I am receiving the following errors: Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p3b): unknown register number 59 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p3c): unknown register number 60 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p3d): unknown register number 61 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p3e): unknown register number 62 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p3f): unknown register number 63 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p40): unknown register number 64 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p41): unknown register number 65 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p42): unknown register number 66 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p43): unknown register number 67 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p44): unknown register number 68 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p45): unknown register number 69 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p46): unknown register number 70 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p47): unknown register number 71 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p48): unknown register number 72 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p49): unknown register number 73 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p4a): unknown register number 74 requested Unfortunately I am not finding anything on google about RNBRemote or HandlePacket_p messages. Has anyone received anything like this before and what could be causing it? It crashes the app. Thank You

    Read the article

  • Special Characters on Console

    - by pocoa
    I've finished my poker game but now I want to make it look a bit better with displaying Spades, Hearts, Diamonds and Clubs. I tried this answer: http://stackoverflow.com/questions/2094366/c-printing-ascii-heart-and-diamonds-with-platform-independent But I couldn't make it work. I'm running on Windows.

    Read the article

  • Console app showing message box on error

    - by holz
    I am trying to integrate with a vendors app by calling it with command args from c#. It is meant to automate a process that we need to do with out needing anyone to interact with the application. If there are no errors when running the process it works fine. However if there are any errors the vendors application will show a message box with the error code and error message and wait for someone to click the ok button. When the ok button is clicked it will exit the application returning the error code as the exit code. As my application is going to be a windows service on a server, needing someone to click an okay button will be an issue. Just wondering what the best solution would be to get around this. My code calling the vendor app is... ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "someapp.exe" startInfo.Arguments = "somefile.txt"; Process jobProcess = Process.Start(startInfo); jobProcess.WaitForExit(); int exitCode = jobProcess.ExitCode;

    Read the article

  • Using OUTPUT/INTO within instead of insert trigger invalidates 'inserted' table

    - by Dan
    I have a problem using a table with an instead of insert trigger. The table I created contains an identity column. I need to use an instead of insert trigger on this table. I also need to see the value of the newly inserted identity from within my trigger which requires the use of OUTPUT/INTO within the trigger. The problem is then that clients that perform INSERTs cannot see the inserted values. For example, I create a simple table: CREATE TABLE [MyTable]( [MyID] [int] IDENTITY(1,1) NOT NULL, [MyBit] [bit] NOT NULL, CONSTRAINT [PK_MyTable_MyID] PRIMARY KEY NONCLUSTERED ( [MyID] ASC )) Next I create a simple instead of trigger: create trigger [trMyTableInsert] on [MyTable] instead of insert as BEGIN DECLARE @InsertedRows table( MyID int, MyBit bit); INSERT INTO [MyTable] ([MyBit]) OUTPUT inserted.MyID, inserted.MyBit INTO @InsertedRows SELECT inserted.MyBit FROM inserted; -- LOGIC NOT SHOWN HERE THAT USES @InsertedRows END; Lastly, I attempt to perform an insert and retrieve the inserted values: DECLARE @tbl TABLE (myID INT) insert into MyTable (MyBit) OUTPUT inserted.MyID INTO @tbl VALUES (1) SELECT * from @tbl The issue is all I ever get back is zero. I can see the row was correctly inserted into the table. I also know that if I remove the OUTPUT/INTO from within the trigger this problem goes away. Any thoughts as to what I'm doing wrong? Or is how I want to do things not feasible? Thanks.

    Read the article

  • XSL transformation generating output from other nodes

    - by Abel Morelos
    I have the following XSL template: <xsl:template match="SOAP-ENV:Body/*[local-name()='Publisher']"> <html> <xsl:call-template name="body" /> </html> </xsl:template> The previous template generates the output I want, it's generating the tags containing the output generated by the "body" template. The issue I'm having is that before the opening tag I'm getting text output from a previous node. Not sure why this is happening since I'm not selecting these other nodes. For example: <SOAP-ENV:Header> <!-- Many child nodes here--> </SOAP-ENV:Header> <SOAP-ENV:Body> <publishParty:Publisher> <!-- Many child nodes here--> </publishParty:Publisher> </SOAP-ENV:Body> Given the previous sample XML fragment, my output would contain what I would expect of formatting the Publisher element, but I'm also getting the text nodes of the children of the SOAP-ENV:Header node. Any ideas? Thanks!

    Read the article

  • getting number from console!

    - by Johanna
    Hi this is my method that will be called if I want to get a number from user. but if the user also enter a right number just the "else" part will be run ,why? please help me tahnsk. public static int chooseTheTypeOfSorting() { System.out.println("Enter 0 for merge sorting OR enter 1 for bubble sorting"); int numberFromConsole = 0; try { InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); String s = br.readLine(); DecimalFormat df = new DecimalFormat(); Number n = df.parse(s); numberFromConsole = n.intValue(); } catch (ParseException ex) { Logger.getLogger(DoublyLinkedList.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { Logger.getLogger(DoublyLinkedList.class.getName()).log(Level.SEVERE, null, ex); } return numberFromConsole; } and in my main method: public static void main(String[] args) { int i = 0; i = getRandomNumber(10, 10000); int p = chooseTheTypeOfSorting(); DoublyLinkedList list = new DoublyLinkedList(); for (int j = 0; j < i; j++) { list.add(j, getRandomNumber(10, 10000)); if (p == 0) { //do something.... } if (p == 1) { //do something..... } else { System.out.println("write the correct number "); chooseTheTypeOfSorting(); }

    Read the article

  • get pure text form odt file in console

    - by naugtur
    I am looking for a small linux tool that would be able to extract text from odt file. It just needs to be human-readable and it can have problems with complicated objects etc. It's almost a duplicate of this question but I need it to be small and have no dependencies on OpenOffice or X server I remember having a 1MB MS-DOS program that could render .doc files quite readibly (with some weird markup getting through from time to time), so i expect it to be possible in the linux world too ;)

    Read the article

  • Output columns not in destination table?

    - by lance
    SUMMARY: I need to use an OUTPUT clause on an INSERT statement to return columns which don't exist on the table into which I'm inserting. If I can avoid it, I don't want to add columns to the table to which I'm inserting. DETAILS: My FinishedDocument table has only one column. This is the table into which I'm inserting. FinishedDocument -- DocumentID My Document table has two columns. This is the table from which I need to return data. Document -- DocumentID -- Description The following inserts one row into FinishedDocument. Its OUTPUT clause returns the DocumentID which was inserted. This works, but it doesn't give me the Description of the inserted document. INSERT INTO FinishedDocument OUTPUT INSERTED.DocumentID SELECT DocumentID FROM Document WHERE DocumentID = @DocumentID I need to return from the Document table both the DocumentID and the Description of the matching document from the INSERT. What syntax do I need to pull this off? I'm thinking it's possible only with the one INSERT statement, by tweaking the OUTPUT clause (in a way I clearly don't understand)? Is there a smarter way that doesn't resemble the path I'm going down here? EDIT: SQL Server 2005

    Read the article

  • Problem with cyrillic symbols in console

    - by woto
    Hi everyone, sorry for bad English. It's Ruby code. s = "???????" `touch #{s}` `cat #{s}` `cat < #{s}` Can anybody tell why it's code fails? With sh: cannot open ???????: No such file But thic code works fine s = "????????" `touch #{s}` `cat #{s}` `cat < #{s}` Problem is only when Russian symbol '?' in the word and with symobol '<' woto@woto-work:/tmp$ locale LANG=ru_RU.UTF-8 LC_CTYPE="ru_RU.UTF-8" LC_NUMERIC="ru_RU.UTF-8" LC_TIME="ru_RU.UTF-8" LC_COLLATE="ru_RU.UTF-8" LC_MONETARY="ru_RU.UTF-8" LC_MESSAGES="ru_RU.UTF-8" LC_PAPER="ru_RU.UTF-8" LC_NAME="ru_RU.UTF-8" LC_ADDRESS="ru_RU.UTF-8" LC_TELEPHONE="ru_RU.UTF-8" LC_MEASUREMENT="ru_RU.UTF-8" LC_IDENTIFICATION="ru_RU.UTF-8" LC_ALL= woto@woto-work:/tmp$ ruby -v ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux] woto@woto-work:/tmp$ uname -a Linux woto-work 2.6.32-26-generic #48-Ubuntu SMP Wed Nov 24 10:14:11 UTC 2010 x86_64 GNU/Linux woto@woto-work:/tmp$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 10.04.1 LTS Release: 10.04 Codename: lucid

    Read the article

  • MPI C fprintf() output not showing up if the process hangs on MPI_Recv

    - by Karolis
    I'm writing an MPI C program. I have troubles debugging it, because whenever I use fprintf, like this: fprintf(stdout, "worker: %d", worker); if the program hangs, because of some blocking MPI_Recv, I can't see any output. I'm sure the line of code is reached, because I can put a return statement after the fprintf statement, in which case the process finishes execution and the output is printed. Any ideas, on how to print (see the output) even though the process gets blocked later by Recv? I hope this makes sense.

    Read the article

  • How do I get rid of extra lines in my output from Rails

    - by Dan B
    I am using Rails 2.1 to output tables from a database. But the output includes lots of extra lines and tabs. I am using a while loop with lots of nested if statements. I am also wrapping all of my non-output lines in <%- code -%. Any idea what might be happening and a solution? Thanks, ex: <tr> <td>Some data</td> <td>more data</td>

    Read the article

  • my output parameters are always null when i use BeginExecuteNonQuery

    - by CharlesO
    I have a stored procedure that returns a varchar(160) as an output parameter of a stored procedure. Everything works fine when i use ExecuteNonQuery, i always get back the expected value. However, once i switch to use BeginExecuteNonQuery, i get a null value for the output. I am using connString + "Asynchronous Processing=true;" in both cases. Sadly the BeginExecuteNonQuery is about 1.5 times faster in my case...but i really need the output parameter. Thanks!

    Read the article

  • Run command with no terminal output

    - by Insomaniacal
    Hello, I've searched around online, but can't find the answer to my question. What I want to do is run a command in pythong, using the subprocess module, and store the output in a variable. However, I do not want the command's output to be printed to the terminal. For this code: def storels(): a = subprocess.Popen("ls",shell=True) storels() I get the directory listing in the terminal, instead of having it stored in a. I've also tried def storels(): subprocess.Popen("ls > tmp",shell=True) a = open("./tmp") [Rest of Code] storels() This also prints the output of ls to my terminal. I've even tried this command with the somewhat dated os.system method, since running "ls tmp" in the terminal doesn't print ls to the terminal at all, but stores it in tmp. However, the same thing happens. I'm using python 2.6. Any suggestions? Thanks in advance!

    Read the article

  • How do I fix a corrupted harddrive after failed upgrade?

    - by Nil
    The problem originated when I was trying to fix this problem. Things went horribly, horribly wrong and I ended up with a new problem altogether. The last thing I did was run sudo apt-get install and that caused my system to freeze. I restarted my computer and it would not boot from the harddrive. I ran a copy of Ubuntu 12.10 from a flashdrive that I had and ran gparted to see if my partitions were all there. It returned this message: Invalid partition table on /dev/sda -- wrong signature 5208. The drive appeared as a 2TiB unallocated drive with an error. The drive had 4 partitions before (plus random unallocated space). There was a fat32 partition, an ext4 partition which contained ubuntu 13.04/13.10 (I don't even know which one at this point), an extended partition which contained a swap partition for my ubuntu partition (I was meaning to move that ubuntu partition into the extended partition, never got around to it), and another partition (I don't remember how I formatted it). I should also mention this is a 1TB harddrive. So in short, I have a corrupted partition table on my primary harddrive from which I boot from, how can I fix this? I tried mounting the drive with sudo mount /dev/sda1 /media/ubuntu then I changed my directory to said folder and tried to list files and this monstrosity happened: $ ls ls: cannot access ??w?j^?.: Input/output error ls: cannot access ??(? ?x?.|: Input/output error ls: cannot access 6W_@?)?._??: Input/output error ls: cannot access HB0v???.A}?: Input/output error ls: cannot access ???.?X: Input/output error ls: cannot access t)?.+?l: Input/output error ls: cannot access ?h@ ?.@ : Input/output error ls: cannot access >? @??.???: Input/output error ls: cannot access m???.??: Input/output error ls: cannot access @ if??a?: Input/output error ls: cannot access ?M!vN$?.??n: Input/output error ls: cannot access ?o? ??.Bm`: Input/output error ls: cannot access ?:I??? M. : Input/output error ls: cannot access W??.??: Input/output error ls: cannot access ?: Input/output error ls: cannot access ?W?s??: Input/output error ls: cannot access ?v?k?.???: Input/output error ls: cannot access 5?$<N??: Input/output error .x????.??i: Input/output error ls: cannot access je????.j?1: Input/output error XjD?.???: Input/output error ls: cannot access W??n???.?: Input/output error ls: cannot access ?^x.$"?: Input/output error ls: cannot access !??*!??j.??: Input/output error ls: cannot access '-??k?^?.???: Input/output error ls: cannot access b?w?w?b.\??: Input/output error ls: cannot access o????"z.??B: Input/output error ls: cannot access ??b?h.?3-: Input/output error ls: cannot access ??.$7: Input/output error ls: cannot access )??K.bk: Input/output error ls: cannot access s??z?.?(?: Input/output error ls: cannot access ?F@?0?.@?: Input/output error .?D: Input/output error .??: Input/output error ls: cannot access?????. @: Input/output error ls: cannot access ?/?? ?.??: No such file or directory ls: cannot access rk?p4q(?.?k: Input/output error This looks promising. This is the output of fdisk -l $ sudo fdisk -l /dev/sda Warning: ignoring extra data in partition table 5 Warning: ignoring extra data in partition table 5 Warning: ignoring extra data in partition table 5 Warning: invalid flag 0x5208 of partition table 5 will be corrected by w(rite) Disk /dev/sda: 2199.0 GB, 2199023132672 bytes 255 heads, 63 sectors/track, 267349 cylinders, total 4294967056 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x44fdfe06 Device Boot Start End Blocks Id System /dev/sda1 113305600 894715903 390705152 c W95 FAT32 (LBA) /dev/sda2 894715904 1489307647 297295872 83 Linux /dev/sda3 1489309694 1497307135 3998721 5 Extended /dev/sda4 1497309184 1953523711 228107264 7 HPFS/NTFS/exFAT /dev/sda5 ? 3013257822 3688738171 337740175 aa Unknown

    Read the article

  • Font for Wine that supports the entire character set of the Win32 Console?

    - by Brian Campbell
    I would like to be able to display in the Wine console all characters that the Win32 console can display. I've written a small test program to print out all 8-bit characters: #include <stdio.h> int main(int argc, char *argv[]) { int i, j; for (i = 0; i <= 0xF0; i+=0x10) { for (j = i; j <= i + 0x0F; ++j) printf("%2x:%c", j, (char)j); printf("\n"); } getchar(); return 0; } Under Wine, the best I can do so far is using Andale Mono: While this is what I see on Windows Server 2008: Is there anywhere I can legally download a font that will allow me to view all of those characters under Wine? edit I've found a set of DOS fonts that includes a CP437 font, which should cover the character set I'm interested in. However, even if I install this font, wineconsole doesn't seem to recognize it. Is there any way I can get wineconsole to use this font, or convert this font to a format that wineconsole can use? Or is there any way I can extract fonts from DOSEMU for use in Wine? Oh, and I should probably mention that I'm on Mac OS X 10.6.2, installing Wine via MacPorts, using the wine-devel package. more information I have tried installing some console fonts that should cover the full character set as Mac OS X fonts (such as the NewDOS font listed above, and a font I tried converting from the fonts supplied by DOSEMU). Wine does not seem to pick up on new fonts installed in Mac OS X. Is there a way to register new fonts I've installed with Wine? Would manually editing the system.reg file that seems to contain font mappings work, or is there something else I'd need to do? bump Bounty ends soon, I'm still looking for an answer for this. Does anyone use the Wine console for complex text user interfaces?

    Read the article

  • C# Putting the required DLLs somewhere other than the root of the output

    - by aip.cd.aish
    I am using EmguCV for a project and when our program runs it needs some dlls like "cxcore.dll" etc. (or it throws runtime exceptions). At the moment, I put the files in the root of the output folder (selected "Copy Always" in the file's properties in Visual Studio). However it looks a bit messy, to have about 10 different dlls just there. Is there someway where I can move it to a subfolder in the output folder and it'll still find it.

    Read the article

  • Xcode and input/output files

    - by user112232
    I have to put my input files directly in the root directory for xcode to see them, and the output files are always in the same root directly. How can I configure xcode to change the input/output directories ?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >