Search Results

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

Page 19/1134 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • How to calculate required switch speed based on network usage?

    - by tobefound
    I have a 48 port HP Procurve Switch 2610 (J9088A) that can handle 13.0 million PPS (packets per second) and features wire speed switching capacity at 17.6Gbps. First off, what does that REALLY mean? Where do I start when trying to figure out if my office (with 70 employees) will be well setup with this switch? How to calculate through-put based on a user average load of X MB per day? 90% of the folks will only be sending email, access random websites, etc... the other 10% will be conducting heavier tasks like moving image files (10 MB) across network shares, constant external FTP streams through the switch to a server etc... Is this switch good enough?

    Read the article

  • Sending mail from command line if body not empty

    - by cdecker
    I'd like to write a simple script that alerts me if a log changes. For this I'm using grep to find the lines I'm interested in. Right now it works like this: grep line /var/log/file | mail -s Log [email protected] Problem is that this sends a mail even if no matching lines are found. The mail utility from mailutils seems to have no switch telling it to drop mails that have an empty body. Is there a quick and easy way to do so?

    Read the article

  • Escaping %’s in file-/folder-names at the command-line

    - by Synetech
    Does anybody of a way to access files and directories that have a % in their name (which is valid) from the command-line? Specifically, if there are two %’s and the text between them happens to correspond to an environment variable. For example, if there is a file called C:\blah\%temp%.txt or a folder called C:\Program Files\%temp%\, none of the following will work because the variable gets expanded: > dir "c:\blah\%temp%.txt" > dir "c:\blah\^%temp^%.txt" > dir "c:\blah\%%temp%%.txt" > dir "c:\blah\\%temp\%.txt" > dir "c:\program files\%temp%" > dir "c:\program files\^%temp^%" > dir "c:\program files\%%temp%%" > dir "c:\program files\\%temp\%" Using wildcards will work, but does not uniquely select the file/folder and may include others: > dir "c:\blah\?temp?.txt"        (also shows ztempz.temp, 1tempa.txt, etc.) > dir "c:\program files\?temp?"   (likewise) (This is frustrating because every now and then—usually when Explorer is restarted for whatever reason—the environment variables stop expanding and some places where they are used end up creating files or directories with the environment variable in it. For example, because I configured Chromium to store its cache in a subdirectory of %temp%, if the variable expands, it is fine, but when it doesn’t, Chromium creates a directory called %temp% under its own directory and stores the cache—which can get large—there. I want to add a line to my temp-/junk-file cleaning script to automatically delete that folder if it exists, but I cannot figure out how to access it from the command-line without resorting to wildcards.)

    Read the article

  • How can I switch user in a shell and use the existing gnome display session?

    - by z7sg
    If I switch user in a terminal. su bob I can't open gedit because bob doesn't own the display. If I execute xhost + before switching to bob I can open the display for some applications but not all. I get the following output when trying to execute gedit: (crashreporter:4415): GnomeUI-WARNING *: While connecting to session manager: None of the authentication protocols specified are supported. * GLib-GIO:ERROR:/build/buildd/glib2.0-2.28.6/./gio/gdbusconnection.c:2279:initable_init: assertion failed: (connection-initialization_error == NULL)

    Read the article

  • What's the difference between find and findstr commands in Windows?

    - by Prashant Bhate
    In Windows, what are the differences between find and findstr commands? Both seems to search text in files: find c:\>find /? Searches for a text string in a file or files. FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] "string" [[drive:][path]filename[ ...]] /V Displays all lines NOT containing the specified string. /C Displays only the count of lines containing the string. /N Displays line numbers with the displayed lines. /I Ignores the case of characters when searching for the string. /OFF[LINE] Do not skip files with offline attribute set. "string" Specifies the text string to find. [drive:][path]filename Specifies a file or files to search. If a path is not specified, FIND searches the text typed at the prompt or piped from another command. findstr c:\>findstr /? Searches for strings in files. FINDSTR [/B] [/E] [/L] [/R] [/S] [/I] [/X] [/V] [/N] [/M] [/O] [/P] [/F:file] [/C:string] [/G:file] [/D:dir list] [/A:color attributes] [/OFF[LINE]] strings [[drive:][path]filename[ ...]] /B Matches pattern if at the beginning of a line. /E Matches pattern if at the end of a line. /L Uses search strings literally. /R Uses search strings as regular expressions. /S Searches for matching files in the current directory and all subdirectories. /I Specifies that the search is not to be case-sensitive. /X Prints lines that match exactly. /V Prints only lines that do not contain a match. /N Prints the line number before each line that matches. /M Prints only the filename if a file contains a match. /O Prints character offset before each matching line. /P Skip files with non-printable characters. /OFF[LINE] Do not skip files with offline attribute set. /A:attr Specifies color attribute with two hex digits. See "color /?" /F:file Reads file list from the specified file(/ stands for console). /C:string Uses specified string as a literal search string. /G:file Gets search strings from the specified file(/ stands for console). /D:dir Search a semicolon delimited list of directories strings Text to be searched for. [drive:][path]filename Specifies a file or files to search. Use spaces to separate multiple search strings unless the argument is prefixed with /C. For example, 'FINDSTR "hello there" x.y' searches for "hello" or "there" in file x.y. 'FINDSTR /C:"hello there" x.y' searches for "hello there" in file x.y. Regular expression quick reference: . Wildcard: any character * Repeat: zero or more occurances of previous character or class ^ Line position: beginning of line $ Line position: end of line [class] Character class: any one character in set [^class] Inverse class: any one character not in set [x-y] Range: any characters within the specified range \x Escape: literal use of metacharacter x \<xyz Word position: beginning of word xyz\> Word position: end of word For full information on FINDSTR regular expressions refer to the online Command Reference.

    Read the article

  • C++: Calling class functions within a switch

    - by user1446002
    i've been trying to study for my finals by practicing classes and inheritance, this is what I've come up with so far for inheritance and such however I'm unsure how to fix the error occuring below. #include<iostream> #include<iomanip> #include<cmath> #include<string.h> using namespace std; //BASE CLASS DEFINITION class hero { protected: string name; string mainAttr; int xp; double hp; double mana; double armour; int range; double attkDmg; bool attkType; public: void dumpData(); void getName(); void getMainAttr(); void getAttkData(); void setAttkData(string); void setBasics(string, string, double, double, double); void levelUp(); }; //CLASS FUNCTIONS void hero::dumpData() { cout << "Name: " << name << endl; cout << "Main Attribute: " << mainAttr << endl; cout << "XP: " << xp << endl; cout << "HP: " << hp << endl; cout << "Mana: " << mana << endl; cout << "Armour: " << armour << endl; cout << "Attack Range: " << range << endl; cout << "Attack Damage: " << attkDmg << endl; cout << "Attack Type: " << attkType << endl << endl; } void hero::getName() { cout << "Name: " << name << endl; } void hero::getMainAttr() { cout << "Main Attribute: " << mainAttr << endl; } void hero::getAttkData() { cout << "Attack Range: " << range << endl; cout << "Attack Damage: " << attkDmg << endl; cout << "Attack Type: " << attkType << endl; } void hero::setAttkData(string attr) { int choice = 0; if (attr == "Strength") { choice = 1; } if (attr == "Agility") { choice = 2; } if (attr == "Intelligence") { choice = 3; } switch (choice) { case 1: range = 128; attkDmg = 80.0; attkType = 0; break; case 2: range = 350; attkDmg = 60.0; attkType = 0; break; case 3: range = 600; attkDmg = 35.0; attkType = 1; break; default: break; } } void hero::setBasics(string heroName, string attribute, double health, double mp, double armourVal) { name = heroName; mainAttr = attribute; hp = health; mana = mp; armour = armourVal; } void hero::levelUp() { xp = 0; hp = hp + (hp * 0.1); mana = mana + (mana * 0.1); armour = armour + ((armour*0.1) + 1); attkDmg = attkDmg + (attkDmg * 0.05); } //INHERITED CLASS DEFINITION class neutHero : protected hero { protected: string drops; int xpGain; public: int giveXP(int); void dropItems(); }; //INHERITED CLASS FUNCTIONS int neutHero::giveXP(int exp) { xp += exp; } void neutHero::dropItems() { cout << name << " has dropped the following items: " << endl; cout << drops << endl; } /* END OF OO! */ //FUNCTION PROTOTYPES void dispMenu(); int main() { int exit=0, choice=0, mainAttrChoice=0, heroCreated=0; double health, mp, armourVal; string heroName, attribute; do { dispMenu(); cin >> choice; switch (choice) { case 1: system("cls"); cout << "Please enter your hero name: "; cin >> heroName; cout << "\nPlease enter your primary attribute\n"; cout << "1. Strength\n" << "2. Agility\n" << "3. Intelligence\n"; cin >> mainAttrChoice; switch (mainAttrChoice) { case 1: attribute = "Strength"; health = 750; mp = 150; armourVal = 2; break; case 2: attribute = "Agility"; health = 550; mp = 200; armourVal = 6; break; case 3: attribute = "Intelligence"; health = 450; mp = 450; armourVal = 1; break; default: cout << "Choice invalid, please try again."; exit = 1; break; hero player; player.setBasics(heroName, attribute, health, mp, armourVal); player.setAttkData(attribute); heroCreated=1; system("cls"); cout << "Your hero has been created!\n\n"; player.dumpData(); system("pause"); break; } case 2: system("cls"); if (heroCreated == 1) { cout << "Your hero has been detailed below.\n\n"; **player.dumpData(); //ERROR OCCURS HERE !** system("pause"); } else { cout << "You have not created a hero please exit this prompt " "and press 1 on the menu to create a hero."; } break; case 3: system("cls"); cout << "Still Under Development"; system("pause"); break; case 4: system("cls"); exit = 1; break; default: cout << "Your command has not been recognised, please try again.\n"; system("pause"); break; } } while (exit != 1); system("pause"); return 0; } void dispMenu() { system("cls"); cout << "1. Create New Hero\n" "2. View Current Hero\n" "3. Fight Stuff\n" "4. Exit\n\n" "Enter your choice: "; } However upon compilation I get the following errors: 220 `player' undeclared (first use this function) Unsure exactly how to fix it as I've only recently started using OO approach. The error has a comment next to it above and is in case 2 in the main. Cheers guys.

    Read the article

  • Converting switch statements to more elegant solution.

    - by masfenix
    I have a 9 x 9 matrix. (think of suduko). 4 2 1 6 8 1 8 5 8 3 1 5 8 1 1 7 5 8 1 1 4 0 5 6 7 0 4 6 2 5 5 4 4 8 1 2 6 8 8 2 8 1 6 3 5 8 4 2 6 4 7 4 1 1 1 3 5 3 8 8 5 2 2 2 6 6 0 8 8 8 0 6 8 7 2 3 3 1 1 7 4 now I wanna be able to get a "quadrant". for example (according to my code) the quadrant 2 , 2 returns the following: 5 4 4 2 8 1 6 4 7 If you've noticed, this is the matrix from the very center of the 9 x 9. I've split everything up in to pairs of "3" if you know what i mean. the first "ROW" is from 0 - 3, the second from 3 - 6, the third for 6 - 9.. I hope this makes sense ( I am open to alternate ways to go about this) anyways, heres my code. I dont really like this way, even though it works. I do want speed though beccause i am making a suduko solver. //a quadrant returns the mini 3 x 3 //row 1 has three quads,"1", "2", 3" //row 2 has three quads "1", "2", "3" etc public int[,] GetQuadrant(int rnum, int qnum) { int[,] returnMatrix = new int[3, 3]; int colBegin, colEnd, rowBegin, rowEnd, row, column; //this is so we can keep track of the new matrix row = 0; column = 0; switch (qnum) { case 1: colBegin = 0; colEnd = 3; break; case 2: colBegin = 3; colEnd = 6; break; case 3: colBegin = 6; colEnd = 9; break; default: colBegin = 0; colEnd = 0; break; } switch (rnum) { case 1: rowBegin = 0; rowEnd = 3; break; case 2: rowBegin = 3; rowEnd = 6; break; case 3: rowBegin = 6; rowEnd = 9; break; default: rowBegin = 0; rowEnd = 0; break; } for (int i = rowBegin ; i < rowEnd; i++) { for (int j = colBegin; j < colEnd; j++) { returnMatrix[row, column] = _matrix[i, j]; column++; } column = 0; row++; } return returnMatrix; }

    Read the article

  • Executing command line from windows application

    - by aron
    Hello, i need to execute command line from .NET windows application. I tried with this code but i get error 'C:\Documents' is not recognized as an internal or external command, operable program or batch file. var command ="\"C:\\Documents and Settings\\Administrator\\My Documents\\test.exe\" \"D:\\abc.pdf\" \"C:\\Documents and Settings\\Administrator\\My Documents\\def.pdf\""; var processInfo = new ProcessStartInfo("cmd","/c " + command) { UseShellExecute = false, RedirectStandardError = true, CreateNoWindow = true }; var p = Process.Start(processInfo);

    Read the article

  • command to format mount points in windows 2003

    - by user136104
    I need a command to format the mount point in windows 2003. Generally we use the following command to format a volume in windows type C:\sri.txt| FORMAT E: /v:volume /Q /fs:NTFS But by using the same command we can't format the mount points. So is there any command to format a mount point in windows

    Read the article

  • "at" command on Ubuntu

    - by user34104
    I want to list using the "at" command. I try this: pedro@Pedro-PC:~$ ls -l | at 10:27 warning: commands will be executed using /bin/sh job 5 at Tue Apr 20 10:27:00 2010 But doesn't work.

    Read the article

  • How to upgrade XBMC Live via command line?

    - by sunpech
    I've been unable to do a fresh install of XBMC Live 9.11 to my hard drive. Everytime it fails at the Install System step. But I am able to get XBMC Live 9.04.1 to install successfully. How do I upgrade XBMC Live 9.04.1 to 9.11? I understand that Ctrl+Shift+F2 brings up the command line, but what are the next set of commands to run?

    Read the article

  • Reverse DNS Lookup from the Command Line

    - by user41322
    I'd like to get a list of all domains pointed to a certain IP address. Is there a way to get this information from the command line? Nothing like "host", "nslookup" or "dig -x". Those return the hostname of the IP address which, while helpful, is only part of what I want returned.

    Read the article

  • Trying to get to the command prompt through recovery disk

    - by cody
    I'm trying to reach the command prompt through a vista recovery disk I have, and it boots from the disk and gets to the point where it asks which installation I want to repair and then says the disk is not compatible with my version of windows. I have a dual boot setup with Vista and server 2008 R2. Is there another was to run check disk? I can't boot in safemode or normally, I suspect a driver (atipcie) is the problem

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >