Search Results

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

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

  • [C#] Creating standalone, console (shell) for domain-specific operations

    - by mr.b
    Say that I have a system service, and I want to offer a low-level maintenance access to it. For that purpose, I'd like to create a standalone, console application that somehow connects to server process and lets user type in commands, allow it to use auto-completion and auto-suggestion on single/double TAB press (just like linux bash shell, mysql cli, cmd.exe, and countless others), allow command line editing capabilities (history, cursor keys to move around text..), etc. Now, it's not that much of a problem to create something like that by rolling my own from scratch, handling user input, scanning pressed keys, and doing correct actions. But, why reinvent the wheel? Is there some library/framework that helps with this kind of problems, just like readline library that offers improved command-line editing capabilities under linux? Of course, this new "shell" would respond only to valid, domain-specific commands, and would suggest valid arguments, options, switches... Any ideas? Thanks!

    Read the article

  • App.Config file in console application C#

    - by user1240679
    I have a console application in which I want to write the name of a file. Process.Start("blah.bat"); Normally, I would have something like that in windows application by writing the name of the file 'blah.bat' to Settings file in Properties. However, here I didn't find any Settings file and I added an app.config for the same purpose. I am not sure what to write here in app.config, that would lead to me to achieve similar thing as in windows forms. For eg: In windows forms. Process.Start(Properties.Settings.Default.BatchFile); where BatchFile is a string in settings file in Properties.

    Read the article

  • Difference between ps output and top output?

    - by Soumya Prasad Ukil
    I find it difficult to understand the output produced by ps and top? This is the output by top: PID PSID USERNAME TID PRI NICE SIZE RES STATE TIME CPU COMMAND 26439 23712 soumyau 26439 15 0 7512M 5234M sleep 286:25 16.67% or_lse2 (18) 26523 23712 soumyau 26439 -2 0 7512M 5234M cpu9 143:10 8.33% or_lse2 26522 23712 soumyau 26439 -2 0 7512M 5234M cpu3 143:10 8.33% or_lse2 This is by ps (ps -L -p 26439 -o pcpu,psr,pid,user,tid): %CPU PSR PID USER TID 99.9 3 26439 soumyau 26522 99.9 9 26439 soumyau 26523 0.0 8 26439 soumyau 26439 Why are there differences in two result? Can you briefly explain the significance of the two CPU% ?

    Read the article

  • Record and Play your WebLogic Console Tasks Like a DVR

    - by james.bayer
    Automation using WebLogic Scripting Tool Today on the Oracle internal mailing list for WebLogic Server questions someone asked how to automate the configuration of the thread model for WebLogic Server and they were having trouble with the jython scripting syntax.  I’ve previously written about this feature called Work Managers and the associated constraints.  However, I did not show how to automate the process of configuring this without the console using WebLogic Scripting Tool – the jython scripting automation environment abbreviated as WLST.  I’ve written some very basic introductions to WLST before and there is also an Oracle By Example on the subject, but this is a bit more advanced.  Fear not because there is a really easy-to-use feature of the WLS console that lets you “Record” user actions just like a DVR.  Using these recordings of the web-based console, you can easily create a script even if you are unfamiliar with the WLST syntax and API.  I’m a big fan of both DVR’s and automation as can be evidenced with this old Halloween picture taken during simpler times.  Obviously the Cast Away and The Big Labowski references show some age.  I was a big Tivo fan-boy back in the day and I still think it’s the best DVR. I strongly believe that WebLogic Scripting Tool (WLST) is an absolutely essential tool for automating administration tasks in anything beyond a development environment.  Even in development environments you can make a case that it makes sense to start the automation for environments downstream.  I promise you that once you start using it for any tasks that you do even semi-regularly, you won’t go back to clicking through the console.  It’s simply so much more efficient and less error-prone to run a script. Let’s say you need to create a Work Manager and MaxThreadsConstraint – the easy way to do it is configure it in the WLS console first while capturing the commands with a recording.  See the images for the simple steps – click to enlarge. Record Console Configurations to a File Review the Recordings and Make Slight Modifications In order to make the recorded .py file directly callable as a stand-alone script I added calls to the connect() and edit() functions at the beginning and calls to disconnect() and exit() at the end – otherwise the main section of the script was provided by the console recording.  Below is the resulting file I saved as d:/temp/wm.py connect('weblogic','welcome1', 't3://localhost:7001') edit() startEdit()   cd('/SelfTuning/wl_server') cmo.createMaxThreadsConstraint('MaxThreadsConstraint-0')   cd('/SelfTuning/wl_server/MaxThreadsConstraints/MaxThreadsConstraint-0') set('Targets',jarray.array([ObjectName('com.bea:Name=examplesServer,Type=Server')], ObjectName)) cmo.setCount(5) cmo.unSet('ConnectionPoolName')   cd('/SelfTuning/wl_server') cmo.createWorkManager('WorkManager-0') cd('/SelfTuning/wl_server/WorkManagers/WorkManager-0') set('Targets',jarray.array([ObjectName('com.bea:Name=examplesServer,Type=Server')], ObjectName))   cmo.setMaxThreadsConstraint(getMBean('/SelfTuning/wl_server/MaxThreadsConstraints/MaxThreadsConstraint-0')) cmo.setIgnoreStuckThreads(false)   activate() disconnect() exit() Run the Script If you want to test it be sure to delete the Work Manager and MaxThreadConstraint that you had previously created in the console.  Do something like the following - set up the environment and tell WLST to execute the script which happens in the first 2 lines, the rest doesn’t require any user input: D:\Oracle\wls11g\wlserver_10.3\samples\domains\wl_server\bin>setDomainEnv.cmd D:\Oracle\wls11g\wlserver_10.3\samples\domains\wl_server>java weblogic.WLST d:\temp\wm.py   Initializing WebLogic Scripting Tool (WLST) ...   Welcome to WebLogic Server Administration Scripting Shell   Type help() for help on available commands   Connecting to t3://localhost:7001 with userid weblogic ... Successfully connected to Admin Server 'examplesServer' that belongs to domain 'wl_server'.   Warning: An insecure protocol was used to connect to the server. To ensure on-the-wire security, the SSL port or Admin port should be used instead.   Location changed to edit tree. This is a writable tree with DomainMBean as the root. To make changes you will need to start an edit session via startEdit().   For more help, use help(edit)   Starting an edit session ... Started edit session, please be sure to save and activate your changes once you are done. Activating all your changes, this may take a while ... The edit lock associated with this edit session is released once the activation is completed. Activation completed Disconnected from weblogic server: examplesServer     Exiting WebLogic Scripting Tool.   Now if you go back and look in the console the changes have been made and we now have a compete script.  Of course there is a full MBean reference and you can learn the nuances of jython and WLST, but why not the WLS console do most of the work for you!  Happy scripting.

    Read the article

  • How to open the console in different browsers?

    - by Šime Vidas
    Chrome: Press CTRL + SHIFT + I to open the Developer Tools. Click on the "Open console." icon in the bottom left corner. IE9: Press F12 to open the developer tools. Open the Script tab, click the "Console" button on the right. Firefox 4: Press CTRL + SHIFT + K to open the Web console. What about Opera 11 and Safari 5? Clarification: By console I mean the JavaScript console that lets you input and execute JavaScript code.

    Read the article

  • cscript - print output on same line on console?

    - by Guy
    If I have a cscript that outputs lines tothe screen, how do I avoid the "line feed" after each print? Example: for a = 1 to 10 print "." REM (do something) next The expected output should be: .......... Not: . . . . . . . . . . In the past I've used to print the "up arrow character" ASCII code. Can this be done in cscript?

    Read the article

  • C# code simple console program not working

    - by Wast334
    I am trying to test some console ability in C#.. I can't get this code to work using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Dim myMessage; myMessage = @"Hello World"; printf(@"%@", myMessage); return 0; } } } I am getting a bunch of compiler errors i am not sure what I am doing wrong..? Error 1 The type or namespace name 'Dim' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\wstevens\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs 12 13 ConsoleApplication1 Error 2 The name 'printf' does not exist in the current context C:\Documents and Settings\wstevens\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs 14 13 ConsoleApplication1 Error 3 Since 'ConsoleApplication1.Program.Main(string[])' returns void, a return keyword must not be followed by an object expression C:\Documents and Settings\wstevens\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs 15 13 ConsoleApplication1

    Read the article

  • Getting output of a shell script in Cocoa

    - by Tristan Seifert
    Is there a way that lets me run a shell script, and display the output in an NSTextView? I do not want any input from the user to the shell script at all, since is is just called to compile a buch of files. The shell script part works fine so far, but I just can't figure out how to run it and show the output in an NSTextView. I know a shell script can be run using system() and NSTask, but how do I get it's output into an NSTextView?

    Read the article

  • using htmlpurifier for input or output escaping/filtering

    - by user214545
    I am processing a user input from the public with a javascript WYSIWYG editor and I'm planning on using htmlpurifier to cleanse the text. I thought it would be enough to use htmlpurifier on the input, stored the cleaned input in the database,and then output it without further escaping/filtering. But I've heard other opinions that you should always escape the output. Can someone explain why I should need to cleans the output if I'm already cleaning the input?

    Read the article

  • PHP text output in clauses

    - by arik-so
    Hello. I am working on a PHP project. There, I often use following syntax to output text in a cluase: if($boolean){ ?> output text <? }else{ ?> alternative <? } On my computer, this works perfectly well. I use XAMPP foer Mac OS X. But when I send the files to my coworker, these outputs often do not work and the compiler complains about having reached an unexpected $end of file. This occurs especially often when there is a tag in the output. We have to replace the means of output with echo. What's the reason for this strange behavior of the compiler? Is the above-mention syntax of outputting text wrong?

    Read the article

  • Need help again altering output of script

    - by Aaron
    wget --output-document=- http://runescape.com/title.ws 2>/dev/null \ | grep PlayerCount \ | head -1l \ | sed 's/^[^>]*>//' \ | sed "s/currently.*$/$(date '+%m\/%d\/%Y %H:%m:%S')/" \ | cut -d">" -f 3,4 \ | sed 's/<\/span>//' \ | awk '{print $3, $4, $1, $2}' Will output: 03/19/2012 18:03:58 123,822 people Would anyone be able to help me rewrite this so the output looks like: 03/19/2012 18:03:58,123822,people I need it this way because when I import it into googledocs, everything with a comma gets separated. Thanks if you help!

    Read the article

  • How do I retrieve program output in Python?

    - by Geoff
    I'm not a Perl user, but from this question deduced that it's exceedingly easy to retrieve the standard output of a program executed through a Perl script using something akin to: $version = `java -version`; How would I go about getting the same end result in Python? Does the above line retrieve standard error (equivalent to C++ std::cerr) and standard log (std::clog) output as well? If not, how can I retrieve those output streams as well? Thanks, Geoff

    Read the article

  • Single console in eclipse for both Server and Client

    - by rits
    I am building a client server application using Java Sockets (in Windows XP). For that I need different consoles for both Client and Server(for Input and Output operations). But in eclipse both share a single console. Is there any plugin or some sort of cheat through which I can do this. After googling I got this, http://dev.eclipse.org/newslists/news.eclipse.newcomer/msg17138.html But, this seems to be only for write operations, not read operations. Also, I tried the following to launch application manually, but even this is not working........ package mypack; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; public class MySystem { public static void changeStream(String mainFile) throws IOException{ File temp = new File(".") ; String parentPath = temp.getCanonicalPath() ; System.out.println(parentPath); //creation of batch file starts here try{ File f = new File(parentPath + "\\a.bat") ; System.out.println("Created : " + f.createNewFile()); //f.deleteOnExit() ; FileOutputStream fos = new FileOutputStream(f) ; String str = "java " + mainFile ; String batchCommand="@echo off\n"+str+"\npause\nexit"; char arr[] = batchCommand.toCharArray() ; System.out.println(str) ; for(int i = 0 ; i < arr.length ; i++){ fos.write(arr[i]) ; } fos.close() ; } catch(Exception e){ } //creation of batch file ends here //execution of batch file starts here try{ Runtime r = Runtime.getRuntime() ; System.out.println(parentPath + "\\a.bat") ; Process p = r.exec(new String[]{"cmd","/k","start a.bat"},null,new File(parentPath)) ; OutputStream os = (OutputStream)p.getOutputStream() ; System.setOut( new PrintStream(os) ) ; System.out.println("Hello"); } catch(Exception e){ e.printStackTrace(); } //execution of batch file ends here } public static void main(String[] args) throws IOException { MySystem.changeStream("MySystem") ; } }

    Read the article

  • Python - store output of subprocess() call in a string

    - by Mark
    Hey all, I'm trying to make a system call in Python and store the output to a string that I can manipulate in the Python program. #!/usr/bin/python import subprocess p = subprocess.Popen("pwd") # edit - actual command I want to store output of p2 = subprocess.Popen("ntpq -p") I've tried a few things including some of the suggestions here: http://stackoverflow.com/questions/1996518/retrieving-the-output-of-subprocess-call but without any luck. Many thanks!

    Read the article

  • Finding Errant Output to System.out in Large Java Program

    - by SvrGuy
    Hi, We have a large java code base [~1 M Lines]. Buried (somewhere) in the code base is some old debug output to System.out that we want to remove (its cluttering things up). The problem is: out code base is so large that we can't easily find where the output is coming from. What we want is a way to see where System.out.println is getting called from (like a stack trace from an exception or some such). Its not suitable to debugging -- the errant output is coming from some errant thread somewhere etc. Any ideas on how to track the source of this errant output down? PS: 99.99% of calls to System.out are legit, and we have thousands of them, so simply searching the code base for System.out calls is not a solution!

    Read the article

  • Ruby: output not saved to file

    - by Sophie
    I'm trying to give a file as input, have it changed within the program, and save the result to a file that is output. But the output file is the same as the input file. :/ Total n00b question, but what am I doing wrong?: puts "Reading Celsius temperature value from data file..." num = File.read("temperature.dat") celsius = num.to_i farenheit = (celsius * 9/5) + 32 puts "Saving result to output file 'faren_temp.out'" fh = File.new("faren_temp.out", "w") fh.puts farenheit fh.close

    Read the article

  • Form creating sites with output

    - by Alex
    Sites lite faary.com wufoo.com/and theformsite.com help you building forms But the output tables that being created are password protected as far as i know. Are there sites/scripts like the above which can make the output visible to all ? Something like a "guest book" script/form that you can edit the fields and the output will show immediately ? Thank you.

    Read the article

  • stream output of a command continuously run in php

    - by chandan kharbanda
    i am running this simple command { ./a.out < in; } & output.txt using exec and i want to output what's coming in output.txt through ajax request continuously. Also i want a way to turn off my output buffering.I tried flush() and ob functions but didn't succedded.In my /etc/php5/apache2/php.ini php.ini value of output_buffering = 4096.When I change it to Off and restart my apache2 server it fails to restart.P.S. I am using lamp server.

    Read the article

  • How to read output of android process command

    - by kevdliu
    I am trying to get the output of android shell command 'getprop' with java since getprop() always returns null no matter what. I tried this from developer.android.com: Process process = null; try { process = new ProcessBuilder() .command("/system/bin/getprop", "build.version") .redirectErrorStream(true) .start(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } InputStream in = process.getInputStream(); //String prop = in.toString(); System.out.println(in); process.destroy(); However what is printed is not the output but a bunch of characters and numbers (dont have the exact output right now). How can i get the output of the process? Thanks!

    Read the article

  • How do I change which audio jacks are used for input and output?

    - by yamaha1996
    I'm using a Realtek HD audio card built-in my motherboard. The Windows driver comes with a control panel that allows me to select which back panel jacks are used for what. So for example I can make both the blue jack and green jack for output and only the red one for mic-in. (Whereas by default, the blue jack is for line in, which I never need.) How can I do the same under Linux? If possible, please don't suggest something that involves PulseAudio or JACK; I'd like to do it the plain way, e.g. by editing ALSA configuration files, if possible. The way I understand it, my problem should have nothing to do with software servers redirecting streams, just instructing the driver to treat this jack as so and so because it's hardware supported. Thank you very much!

    Read the article

  • Redhat linux terminal garbage output when using telnet

    - by Dinesh
    I am using redhat-linux terminal to connect to a router device by means of 'telnet'. While the device boots, the characters are getting printed in garbage manner which is as follows, In terminal, If I click on the the menu 'Terminal'-- 'Reset', then it is getting changed to proper alphabetical. Is there any way available to prevent it ? I have tried setting the encoding of the terminal to UTF-8 from the menu options. But, still the same issue.

    Read the article

  • Choose an output audio device different from the default on WMP 11

    - by GetFree
    I like to play my music through a Hi-Fi audio equipment and everything else (like windows sounds, web videos and such) through my default PC speakers. On WIndows XP I had WMP 9 and I could do that with no problems since I can choose what audio device (which sound card) to use, and that selection is for WMP only, which can be different from Windows' default audio device. But now that I have Windows Vista and WMP 11 I cannot longer choose an audio device just for WMP, or at least I can't find a way to do it (the control in the options dialog is no longer there). Was this useful feature really removed from WMP 11? or there is some other way to do it?

    Read the article

  • Let putty watch for specific output in stdout and notify

    - by GrzegorzOledzki
    Do you know any way to introduce a notification feature to putty client? I would like to setup some regular expressions or simply text strings and be notified (by sound or some tooltip) when this content appears in stdout. If not specific in putty, how can I get it done? There used to be a similar feature in older version of KDE's konsole terminal, but even now I can't see it.

    Read the article

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