Search Results

Search found 28350 results on 1134 pages for 'command switch'.

Page 6/1134 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Hiding Command Prompt with CodeDomProvider

    - by j-t-s
    Hi All I've just got my own little custom c# compiler made, using the article from MSDN. But, when I create a new Windows Forms application using my sample compiler, the MSDOS window also appears, and if I close the DOS window, my WinForms app closes too. How can I tell the Compiler? not to show the MSDOS window at all? Thank you :) Here's my code: using System; namespace JTS { public class CSCompiler { protected string ot, rt, ss, es; protected bool rg, cg; public string Compile(String se, String fe, String[] rdas, String[] fs, Boolean rn) { System.CodeDom.Compiler.CodeDomProvider CODEPROV = System.CodeDom.Compiler.CodeDomProvider.CreateProvider("CSharp"); ot = fe; System.CodeDom.Compiler.CompilerParameters PARAMS = new System.CodeDom.Compiler.CompilerParameters(); // Ensure the compiler generates an EXE file, not a DLL. PARAMS.GenerateExecutable = true; PARAMS.OutputAssembly = ot; PARAMS.CompilerOptions = "/target:winexe"; PARAMS.ReferencedAssemblies.Add(typeof(System.Xml.Linq.Extensions).Assembly.Location); PARAMS.LinkedResources.Add("this.ico"); foreach (String ay in rdas) { if (ay.Contains(".dll")) PARAMS.ReferencedAssemblies.Add(ay); else { string refd = ay; refd = refd + ".dll"; PARAMS.ReferencedAssemblies.Add(refd); } } System.CodeDom.Compiler.CompilerResults rs = CODEPROV.CompileAssemblyFromFile(PARAMS, fs); if (rs.Errors.Count > 0) { foreach (System.CodeDom.Compiler.CompilerError COMERR in rs.Errors) { es = es + "Line number: " + COMERR.Line + ", Error number: " + COMERR.ErrorNumber + ", '" + COMERR.ErrorText + ";" + Environment.NewLine + Environment.NewLine; } } else { // Compilation succeeded. es = "Compilation Succeeded."; if (rn) System.Diagnostics.Process.Start(ot); } return es; } } }

    Read the article

  • Newlines not being interpreted when passed to php via the command line

    - by CarbonX
    I have a PHP script that I'm invoking from another shell script that sends an automated email with a message generated from the shell script. Problem is, when I send the message all the newline characters are printed into the message. How do I get them to be interpreted? sendmail.sh: /path/to/phpscript/sendmail.php "Some Message With Newlines\nHello World.\n" sendmail.php: $message = $argv[1] . "\nNewline"; $smtp->send($to, $from, $message); The odd thing is the \n after the $argv variable is interpreted and actually prints Newline on a new line, but the newlines in the $argv variable don't, I have tried wrapping the variable in double quotes among other things but so far to no avail.

    Read the article

  • can not run java program from command line which resides in package

    - by kshitij
    See following code with resides in fillowing directory mypack.pack1 package mypack.pack1; public class myclass { public static void main(String args[]) { System.out.println("KKKKKKKKKKKKKKKKKKKKKKKKKKKKKK"); } } See following screen shot. that is giving error. And i dont want to add anything in class path because i am in particular directory and it has to work. why it is not working.??????

    Read the article

  • How to Print or Save a Directory Listing to a File

    - by Lori Kaufman
    Printing a directory listing is something you may not do often, but when you need to print a listing of a directory with a lot of files in it, you would rather not manually type the filenames. You may want to print a directory listing of your videos, music, ebooks, or other media. Or, someone at work may ask you for a list of test case files you have created for the software you’re developing, or a list of chapter files for the user guide, etc. If the list of files is small, writing it down or manually typing it out is not a problem. However, if you have a lot of files, automatically creating a directory listing would get the task done quickly and easily. This article shows you how to write a directory listing to a file using the command line and how to use a free tool to print or save a directory listing in Windows Explorer. Amazon’s New Kindle Fire Tablet: the How-To Geek Review HTG Explains: How Hackers Take Over Web Sites with SQL Injection / DDoS Use Your Android Phone to Comparison Shop: 4 Scanner Apps Reviewed

    Read the article

  • Unable to assign command output to a variable

    - by Harish Maralihalli
    I am trying to assign the latest file name obtained from the below ls command but getting some error, it would be very nice if someone can answer how can I fix this! fn=`ls -lrt pur_bom_interface_daily*.log | cut -c59-102 | tail -1` or fn=$(ls -lrt pur_bom_interface_daily*.log | cut -c59-102 | tail -1) Error got: ls: 0653-341 The file pur_bom_interface_daily*.log does not exist Note: pur_bom_interface_daily*.log I am using * since there are multiple files starting their name with pur_bom_interface_daily and concatanated with the date on which they have got created.

    Read the article

  • bash command for each file in a folder

    - by Robert
    I have a set of files on which I would like to apply the same command and the output should contain the same name as the processed file but with a different extension. Currently I am doing rename /my/data/Andrew.doc to /my/data/Andrew.txt I would like to do this for all the .doc files from the /my/data/ folder and to preserve the name. I tried several versions but I guess I have something wrong in the syntax as I an new to linux.

    Read the article

  • Custom keyboard shortcut to lauch a terminal and run a command in Unity

    - by David Weinraub
    I know this should be the simplest thing, but coming up empty. ;-( I would like to create a keyboard shortcut ctrl-alt-P that opens a terminal window and runs a ping command: ping -c 4 somefixeddomain.com [Useful for quickly checking whether my internet connection is actually working.] I have attempted to do this (in Unity, Ubuntu v11.10) using: Settings > Keyboard > Custom Shortcuts filling in all the obvious stuff, but no luck. All ideas welcome.

    Read the article

  • Bash command history not working

    - by user12663
    The command history between sessions is not getting saved. I'm using guake and the history for the session is working fine. I noticed that .bash_history had some commands I executed in sudo -s mode and tried the same again and all the commands while in the session got saved so I tried chmod 777 .bash_history Now the old commands appear at the start of a session but no new commands are getting saved Thanx in advance

    Read the article

  • C Minishell Command Expansion Printing Gibberish

    - by Optimus_Pwn
    I'm writing a unix minishell in C, and am at the point where I'm adding command expansion. What I mean by this is that I can nest commands in other commands, for example: $> echo hello $(echo world! ... $(echo and stuff)) hello world! ... and stuff I think I have it working mostly, however it isn't marking the end of the expanded string correctly, for example if I do: $> echo a $(echo b $(echo c)) a b c $> echo d $(echo e) d e c See it prints the c, even though I didn't ask it to. Here is my code: msh.c - http://pastebin.com/sd6DZYwB expand.c - http://pastebin.com/uLqvFGPw I have a more code, but there's a lot of it, and these are the parts that I'm having trouble with at the moment. I'll try to tell you the basic way I'm doing this. Main is in msh.c, here it gets a line of input from either the commandline or a shellfile, and then calls processline (char *line, int outFD, int waitFlag), where line is the line we just got, outFD is the file descriptor of the output file, and waitFlag tells us whether or not we should wait if we fork. When we call this from main we do it like this: processline (buffer, 1, 1); In processline, we allocate a new line: char expanded_line[EXPANDEDLEN]; We then call expand, in expand.c: expand(line, expanded_line, EXPANDEDLEN); In expand, we copy the characters literally from line to expanded_line until we find a $(, which then calls: static int expCmdOutput(char *orig, char *new, int *oldl_ind, int *newl_ind) orig is line, and new is expanded line. oldl_ind and newl_ind are the current positions in the line and expanded line, respectively. Then we pipe, and recursively call processline, passing it the nested command(for example, if we had "echo a $(echo b)", we would pass processline "echo b"). This is where I get confused, each time expand is called, is it allocating a new chunk of memory EXPANDEDLEN long? If so, this is bad because I'll run out of stack room really quickly(in the case of a hugely nested commandline input). In expand I insert a null character at the end of the expanded string, so why is it printing past it? If you guys need any more code, or explanations, just ask. Secondly, I put the code in pastebin because there's a ton of it, and in my experience people don't like it when I fill up several pages with code. Thanks.

    Read the article

  • Logging every time a command is run

    - by Tom D
    I want to log every time I run a certain type of command in the terminal. For example, every time I run: sudo apt-get install [something] I want to add [something] to a log file in my home directory that will look like the following: [timestamp] [something] 2012-10-02 mysql-server 2012-10-03 ruby1.9.1 2012-10-06 gedit-plugins 2012-10-07 gnome-panel synaptic What's the easiest way to make this happen automatically?

    Read the article

  • VLAN Through Switch Doesn't Work

    - by vcsjones
    I have the following scenario: I have a Cisco Aironet 1040 access point. I have it configured with two SSIDs, each going to a different VLAN. So: SSID internal : VLAN 90 SSID guest : VLAN 70 On the router side, I have a Cisco RV220W (with the radios now turned off) and have setup VLANs with like VLAN IDs. VLAN 90 : 192.168.90.0/24 VLAN 70 : 192.168.70.0/24 As far as DHCP is concerned, each VLAN has a "DHCP Server" in the router's configuration: So with the access point connected directly to the router, everything works great. I connect to the internal network, and I get a 192.168.90.x address, and the guest network gets a 70.xxx address. Next I introduced a Cisco SG200-50 PoE switch between the router and the access point. The port is configured as a trunk port, so the VLAN tags should go right through the switch back to the router. However, when something is connected to the access point, nothing works. It isn't able to get an IP address, and manually assigning one doesn't seem to let any traffic route. Given that the access point works correctly when connected to the router directly, I believe the switch is misconfigured. What am I missing here? What can I use to better diagnose what the problem might be? It's small business equipment, so CLI access is not available. Below are screenshots of the switch's config. The access point is connected to GE2.

    Read the article

  • What switch should we use for PCoIP?

    - by Jay R.
    We have a small lab space that seats 10 people and has 20 machines. Each machine is set to 1920x1200 resolution because the user apps are best used at that resolution. Currently the machines are all located close enough to montors that a DisplayPort cable will reach, but the pending lab remodel positions them around 80 feet or more away in racks. Our proposed solution is to use PCoIP. We purchased 10 PCoIP portals and 20 PCoIP host cards. We plan to set up a dedicated network to handle just the PCoIP traffic. After testing just one portal and one host card with a cheap 1G switch from a local office supply store, we were left with less than good impressions about the usefulness in our lab. The framerates were not spectacular and the mouse seemed jerky. Our concern is that we can't get away with the cheap 1G stuff from the store because adding more machines to the switch will just make the user experience worse. What switch would be recommended to best support our PCoIP situation? We will need to plug in at least 30 cables based on just those machines. Is there a particular feature to search for that makes a difference? Is there a switch that works best with PCoIP? Added Info: The reporting webapp for the host card shows maximum bandwidth usage to be 220000 kbps. The average appears to be around 180000 kbps. The reverse direction is much lower, like 15000 kbps.

    Read the article

  • Bash: command not found

    - by Alexandre Teles
    I have a script that needs to know the processor architecture. I'm doing this way: if [["$(uname -m)" = "x86_64"]]; then wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm else echo "Nossa! Você só pode usar 3,5GB de memória RAM. Que triste :( Vou baixar a versão 32bits pra você tá?" wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.rpm fi But when I execute the code, I receive: instala_chrome.sh: line 35: [[x86_64: command not found Anyone can help me to solve this? Thanks!

    Read the article

  • Create bootable USB install image from command line?

    - by j-g-faustus
    I'm trying to create a bootable USB image to install Ubuntu on a new computer. I have done this before following the "create USB drive" instructions for Ubuntu desktop, but I don't have an Ubuntu desktop available. How can I do the same using only the command line? Things I've tried: Create bootable USB on Mac OS X following the ubuntu.com "create USB drive" instructions for Mac: Doesn't boot. usb-creator: According to apt-cache search usb-creator and Wikipedia usb-creator only exists as a graphical tool. "Create manually" instructions at help.ubuntu.com: None of the files and directories described (e.g. casper, filesystem.manifest, menu.lst) exist in the ISO image, and I don't know what has replaced them. (At my disposal is Mac OS X and Ubuntu server; I have neither Ubuntu desktop nor Windows.)

    Read the article

  • Command line method to find disk usage of camera mounted using gvfs

    - by Hamish Downer
    When my camera was mounted on /media I could use the standard tools (df) to see the disk usage of the card in my camera. However now the camera is mounted using gvfs, and df seems to ignore it. I've also tried pydf and discus to no avail. The camera is definitely available through nautilus, and when I select the camera in nautlius, the status bar tells me the amount of disk free. I can also open the ~/.gvfs/ folder in nautilus and right click on the camera folder and get the disk usage in a graphical way. But that is no use for a script. Are there command line tools that are the equivalent of df for gvfs filesystems? Or even better, a way to make df report on gvfs filesystems?

    Read the article

  • grub recover command line

    - by Rakesh Mohan Hallen
    Recently the service provider link suddenly broke,while I was updating. Then suddenly while I was trying to boot, i could not. The message on my screen was grub recover missing, and I had no option but the grub recover command line. I really did not know what to do. So I installed an earlier version of ubuntu 10.04. It started to boot normally. Now my system is back to 12.04 the version i was working with. How does one handle problems like this?

    Read the article

  • C code - ls system command not showing bash colors

    - by m0atz
    I've just been fooling around with some code in C, an example of a really basic program is as follows which just, obviously, lists the directories using the ls system command. #include <stdio.h> int main (void) { system("ls -l -d */"); printf("I've just listed the directories :-)\n"); return 0; } This runs fine, but it shows the ls output in monochrome, whereas Bash would output the list using colors for the directories (or files if I included files). How can I make my C code use the bash colors? Thanks

    Read the article

  • Unable to run java file from command like Ubuntu

    - by KodeSeeker
    I'm a newbie to Ubuntu and Im looking to run Java code from the command line. Ive checked that path as well. The interesting thing is the code compiles but fails to run ie. user@ubuntu:~/py-scripts$ javac Main.java' works well. but when I do . `user@ubuntu:~/py-scripts$ java Main I get the following error Exception in thread "main" java.lang.UnsupportedClassVersionError: Main : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:634) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: Main. Program will exit.'

    Read the article

  • A command-line clipboard copy and paste utility?

    - by Peter.O
    In Windows I used command-line clipboard copy-and-paste utilities... pclip.exe and gclip.exe These were UnixUtils ports for Windows (but they only handled plain text). There were a couple of other native Windows utils which could write/extracy any format. I've looked for something similar in Synaptic Package Manager, but I can't find anything. Is there something there, that I've missed? ... or maybe this is available in bash scripting? The type of utility I'd like will be able to read/write via std-in/std-out or file-in/file-out, and handle Unicode/Rich-text/Picture/etc clipboard formats... Late Edit: NB: I'm not after a clipboard manager.

    Read the article

  • Hide debug information when running apps from the command line

    - by tutuca
    Most of the time running a gtk application from the command line it starts dumping debug information to the stdio even though I put them in background. Example: ~$ gedit test.html # and ctrl+z to suspend zsh: suspended gedit .zshrc ~$ bg [1] + continued gedit .zshrc ~$ # do some editing (gedit:6208): GtkSourceView-WARNING **: Could not find word to remove in buffer (whoosh), this should not happen! (gedit:6208): GtkSourceView-WARNING **: Could not find word to remove in buffer (haystack), this should not happen! I want to note that the error, or warning, changes according to what I'm doing at the moment. The GtkSourceView-WARNING shown here is one of the cases. Anyway... Do you know if it's at all possible to avoid getting that information printed out?

    Read the article

  • Mount encrypted volumes from command line?

    - by cha
    If I have an encrypted external disk (or an internal disk that is not in fstab), I see an entry for it in Nautilus -- with an entry like "X GB Encrypted Volume". I can click on this volume, and am prompted for a password to decrypt and mount the device. But how do I do this from the command line? This wiki page, and other docs I can find, only refer to GUI methods of decrypting the device; but this won't do in the context of headless servers or SSH logins. Is there a simple way to get devices to mount to automatic locations in "/media" just like they would with the GUI? (I'm not asking about encrypted home directories -- I'm aware of ecryptfs-mount-private. This question is about additional encrypted volumes.)

    Read the article

  • Looking for an old classic book about Unix command-line tools

    - by Little Bobby Tables
    I am looking for a book about the Unix command-line toolkit (sh, grep, sed, awk, cut, etc.) that I read some time ago. It was an excellent book, but I totally forgot its name. The great thing about this specific book was the running example. It showed how to implement a university bookkeeping system using only text-processing tools. You would find a student by name with grep, update grades with sed, calculate average grades with awk, attach grades to IDs with cut, and so on. If my memory serve, this book had a black cover, and was published circa 1980. Does anyone remember this book? I would appreciate any help in finding it.

    Read the article

  • Editing a command-line argument to create a new variable

    - by user1883614
    I have a bash script called test.sh that uses command-line argument: lynx -dump $1 > $name".txt" But I need name to be created from the argument by specific keywords in the argument. An example is: http://www.pcmag.com/article2/0,2817,2412941,00.asp http://www.pcmag.com/article2/0,2817,2412919,00.asp Both are two separate articles but are the difference can only be seen in those 12 characters. How do I create a variable from a url for those 12 characters? So that when I run test.sh in Terminal: ./test.sh http://www.pcmag.com/article2/0,2817,2412941,00.asp there is a text file saved as 0,2817,2412941,00?

    Read the article

  • Home networking - Wireless switch?

    - by gamers2000
    I currently have a Linksys WRT160N that has a couple wireless clients and a few wired clients. We are planning to switch from DSL to cable and unfortunately, there isn't a cable point in a location close to the wired clients (i.e. the new location of the router would be too far from the wired clients to lay Ethernet cables). Thus, I was wondering if there was a wireless switch of some sort in which it would be a standard Ethernet switch that would connect to my wireless network? (This is a home network,of course.)

    Read the article

  • Hooking up my power switch/reset switch/LEDs

    - by David Oneill
    I'm working on building a computer (first time for me). There are several plugs that I need to connect to the motherboard (Power LED, reset switch, etc). Of the two wires, they are either: Color and white (reset switch, power LED, HDD LED) red and black (speaker, power switch) The manual for the motherboard has a nice diagram of where to plug them in, but has them labeled + or -. Which colors are positive, and which are negative?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >