Search Results

Search found 8190 results on 328 pages for 'switch'.

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

  • Networking switch setup

    - by Crash893
    I have two 48 port gigabit netgear switches with 2 SFP ports each (i also have two Mini-GBIC copper transceiver modules) Is it best to set the ports up by using the built in ports (ie plug port 1 of switchB into port 48 of switchA and port1 of switchA into the router) or is there an advantage to using the mini-gbic? (lets call the sfp ports 49 and 50) router - port 49 on switchA, port 50 switchA - port 49 SwitchB

    Read the article

  • Connecting server to more than one switch.

    - by Jake
    I have 3 switches, one NEATGEAR GS748T and two JGS524. Initially I wanted to connect them in a triangle loop, but later suspect that the JG524 does not have spanning tree support. Now I have a Dell R710 with 2 NIC at the back. If I connect the server in between the two JGS524, which both in turn connect to the GS748T, will that consitute a loop? According to my limited understanding, with 2 NICs there will be 2 IPs for the server. Will the file server even work or not? Theoretically speaking, will this configuration increase the access speeds for clients? Thanks.

    Read the article

  • Switch User in RedHat like XP

    - by rd42
    In our cluster, RedHat4 & 5 machines, if someone locks the computer and walks away no body can use it. Is there a feature in RedHat5, Gnome, KDE etc that would allow for the option of switching users at the lock screen, so more than one person can be logged in? Thanks, rd42

    Read the article

  • Virtual bridge/switch for Windows server&client?

    - by Tiberiu-Ionu? Stan
    I can't find a very simple application, with litle to zero configuration on both client and server side which would help one computer to bring other computers on an existing private LAN. OpenVPN seems like an overkill for this type of thing, and is really hard to get running or debug by various clueless people trying to connect. Does such a software exist? It's very odd not to. THe Windows provided VPN (PPTP over TCP and GRE) is not what I'm looking for because it is often filtered by ISPs. Only TCP and UDP solutions pls. Encryption is not needed.

    Read the article

  • Looking for KVM switch (over IP) with good linux client [closed]

    - by B14D3
    I have some ATEN CN6000 and i1708 KVM boxes and clients for them are made for windows and java. Java clients doesnt work neither on win or linux systems(I can run them with JavaRE but they dont connect to KVM box). Client for CN6000 on windows works quite well but a have huge problems with connect to i1708 with win client. So I'm looking for some good replacement. I'm aiming to KVM with linux client. Whether there are such ? What kind of KVMs you are using and have good opinion about them?

    Read the article

  • Why no switch on pointers?

    - by meeselet
    For instance: #include <stdio.h> void why_cant_we_switch_him(void *ptr) { switch (ptr) { case NULL: printf("NULL!\n"); break; default: printf("%p!\n", ptr); break; } } int main(void) { void *foo = "toast"; why_cant_we_switch_him(foo); return 0; } gcc test.c -o test test.c: In function 'why_cant_we_switch_him': test.c:5: error: switch quantity not an integer test.c:6: error: pointers are not permitted as case values Just curious. Is this a technical limitation? EDIT People seem to think there is only one constant pointer expression. Is that is really true, though? For instance, here is a common paradigm in Objective-C (it is really only C aside from NSString, id and nil, which are merely a pointers, so it is still relevant — I just wanted to point out that there is, in fact, a common use for it, despite this being only a technical question): #include <stdio.h> #include <Foundation/Foundation.h> static NSString * const kMyConstantObject = @"Foo"; void why_cant_we_switch_him(id ptr) { switch (ptr) { case kMyConstantObject: // (Note that we are comparing pointers, not string values.) printf("We found him!\n"); break; case nil: printf("He appears to be nil (or NULL, whichever you prefer).\n"); break; default: printf("%p!\n", ptr); break; } } int main(void) { NSString *foo = @"toast"; why_cant_we_switch_him(foo); foo = kMyConstantObject; why_cant_we_switch_him(foo); return 0; } gcc test.c -o test -framework Foundation test.c: In function 'why_cant_we_switch_him': test.c:5: error: switch quantity not an integer test.c:6: error: pointers are not permitted as case values It appears that the reason is that switch only allows integral values (as the compiler warning said). So I suppose a better question would be to ask why this is the case? (though it is probably too late now.)

    Read the article

  • C# Switch-case Loop for Datagridview cells

    - by Nail Yener
    Hi, I am working on a form with datagridview and webbrowser controls. I have three columns as URL, username and password in datagridview. What I want to do is to automate the login for some websites that I use frequently. For that reason I am not sure if this is the right approach but I created the below code. The problem is with the argument of switch. I will click the row on datagridview and then click the login_button so that the username and password info will be passed to the related fields on the webpage. Why I need a switch-case loop is because all the webpages have different element IDs for username and password fields. As I said, I am not sure if datagridview allows switch-case, I searched the net but couldn't find any samples. private void login_button_Click(object sender, EventArgs e) { switch (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()) { case "http://www.website1.com": webBrowser1.Document.GetElementById("username").InnerText = dataGridView1.Rows[3].Cells[3].Value.ToString(); webBrowser1.Document.GetElementById("password").InnerText = dataGridView1.Rows[3].Cells[4].Value.ToString(); return; case "http://www.website2.com": webBrowser1.Document.GetElementById("uname").InnerText = dataGridView1.Rows[4].Cells[3].Value.ToString(); webBrowser1.Document.GetElementById("pswd").InnerText = dataGridView1.Rows[4].Cells[4].Value.ToString(); return; } HtmlElementCollection elements = this.webBrowser1.Document.GetElementsByTagName("Form"); foreach (HtmlElement currentElement in elements) { currentElement.InvokeMember("Login"); } }

    Read the article

  • Weird switch behavior in .NET 4

    - by RaYell
    I have a problem understanding what's causes the compilation error in the code below: static class Program { static void Main() { dynamic x = ""; var test = foo(x); if (test == "test") { Console.WriteLine(test); } switch (test) { case "test": Console.WriteLine(test); break; } } private static string foo(object item) { return "bar"; } } The error I get is in switch (test) line: A switch expression or case label must be a bool, char, string, integral, enum, or corresponding nullable type. Intellisence shows me that foo operation will be resolved on runtime, which is fine because I'm using a dynamic type as a param. However I don't understand how if condition compiles fine when switch doesn't. Code above is just simplified version of what I have in my application (VSTO) which appeared after migrating the app from VSTO3 to VSTO4 when one method in VSTO was changed to return dynamic type values instead of object. Can anyone give me an explanation what's the problem. I know how to resolve it but I'd like to understand what's happening.

    Read the article

  • Switch statement usage - C

    - by Jamie Keeling
    Hello, I have a thread function on Process B that contains a switch to perform certain operations based on the results of an event sent from Process A, these are stored as two elements in an array. I set the first element to the event which signals when Process A has data to send and I have the second element set to the event which indicates when Process A has closed. I have began to implement the functionality for the switch statement but I'm not getting the results as I expect. Consider the following: // //Thread function DWORD WINAPI ThreadFunc(LPVOID passedHandle) { for(i = 0; i < 2; i++) { ghEvents[i] = OpenEvent(EVENT_ALL_ACCESS, FALSE, TEXT("Global\\ProducerEvents")); if(ghEvents[i] == NULL) { getlasterror = GetLastError(); } } dwProducerEventResult = WaitForMultipleObjects( 2, ghEvents, FALSE, INFINITE); switch (dwProducerEventResult) { case WAIT_OBJECT_0 + 0: { //Producer sent data //unpackedHandle = *((HWND*)passedHandle); MessageBox(NULL,L"Test",L"Test",MB_OK); break; } case WAIT_OBJECT_0 + 1: { //Producer closed ExitProcess(1); break; } default: return; } } As you can see if the event in the first array is signalled Process B should display a simple message box, if the second array is signalled the application should close. When I actually close Process A, Process B displays the message box instead. If I leave the first case blank (Do nothing) both applications close as they should. Furthermore Process B sends data an error is thrown (When I comment out the unpacking): Have I implemented my switch statement incorrectly? I though I handled the unpacking of the HWND correctly too, any suggestions? Thanks for your time.

    Read the article

  • Multiple case or switch commands in php?

    - by kitenski
    Good Afternoon, I am trying to assign some variables to a listing which has a main category and a subcategory. This works fine for most of the variables, however in each sub category there are some fields which are other. ie Main Category 1 has sub category database, development and other Main Category 2 has sub category email, internet and other Main Category 3 has sub category graphics and other. So my first case statement is as follows which works fine. switch ($main_cat) { case "Main Category 1": $main="79"; break; case "Main Category 2": $main="83"; break; case "Main Category 3": $main="87"; break; } However I am struggling as to how to handle other. This stops the whole page loading with no error message switch ($second_cat) { case "Database": $second="145"; break; case "Development": $second="146"; break; case "Other": if ($main_cat) == 'Main Category 1' { $second="147";} break; } This doesn't work at all, second is not changed. switch ($second_cat) { case "Database": $second="145"; break; case "Development": $second="146"; break; case "Other": switch ($main_cat) { case "Main Category 1": $second="147"; break; } }

    Read the article

  • Why is the link between my switch and my router always negotiating half-duplex mode?

    - by Massimo
    I have a Cisco 2950 switch which has one of its ports connected to an Internet router provided by my ISP; I have no access to the router configuration, but I manage the switch. If I leave all switch ports with their default setup (auto-negotiation of speed and duplex mode), this link always connects at 100 MBit/s, but in half-duplex mode. I've tried replacing the cable, and also moving the link to another switch port: the result is always the same. A different device connected to the same port (or to any switch port, really) shows no problem at all. It could be guesed that someone configured the router to only connect in half-duplex mode... BUT, here's the catch: if I manually force the switch port to full-duplex mode (duplex full in the interface configuration), the link goes up, stays up and is completely stable. So: The connection is not forced to half-duplex mode by the router, otherwise it would not connect at all if I force the switch end to full-duplex. There is no actual link problem, otherwise the full-duplex connection would not go up or would at least show some errors. But if I leave the port free to auto-negotiate, it always connects in half-duplex mode. Why?

    Read the article

  • How should I refactor switch statements like this (Switching on type) to be more OO?

    - by Taytay
    I'm seeing some code like this in our code base, and want to refactor it: (Typescript psuedocode follows): class EntityManager{ private findEntityForServerObject(entityType:string, serverObject:any):IEntity { var existingEntity:IEntity = null; switch(entityType) { case Types.UserSetting: existingEntity = this.getUserSettingByUserIdAndSettingName(serverObject.user_id, serverObject.setting_name); break; case Types.Bar: existingEntity = this.getBarByUserIdAndId(serverObject.user_id, serverObject.id); break; //Lots more case statements here... } return existingEntity; } } The downsides of switching on type are self-explanatory. Normally, when switching behavior based on type, I try to push the behavior into subclasses so that I can reduce this to a single method call, and let polymorphism take care of the rest. However, the following two things are giving me pause: 1) I don't want to couple the serverObject with the class that is storing all of these objects. It doesn't know where to look for entities of a certain type. And unfortunately, the identity of a type of ServerObject varies with the type of ServerObject. (So sometimes it's just an ID, other times it's a combination of an id and a uniquely identifying string, etc). And this behavior doesn't belong down there on those subclasses. It is the responsibility of the EntityManager and its delegates. 2) In this case, I can't modify the ServerObject classes since they're plain old data objects. It should be mentioned that I've got other instances of the above method that take a parameter like "IEntity" and proceed to do almost the same thing (but slightly modify the name of the methods they're calling to get the identity of the entity). So, we might have: case Types.Bar: existingEntity = this.getBarByUserIdAndId(entity.getUserId(), entity.getId()); break; So in that case, I can change the entity interface and subclasses, but this isn't behavior that belongs in that class. So, I think that points me to some sort of map. So eventually I will call: private findEntityForServerObject(entityType:string, serverObject:any):IEntity { return aMapOfSomeSort[entityType].findByServerObject(serverObject); } private findEntityForEntity(someEntity:IEntity):IEntity { return aMapOfSomeSort[someEntity.entityType].findByEntity(someEntity); } Which means I need to register some sort of strategy classes/functions at runtime with this map. And again, I darn well better remember to register one for each my my types, or I'll get a runtime exception. Is there a better way to refactor this? I feel like I'm missing something really obvious here.

    Read the article

  • Repository pattern - Switch out the database and switch in XML files

    - by glasto red
    Repository pattern - Switch out the database and switch in XML files. Hello I have an asp.net MVC 2.0 project and I have followed the Repository pattern. Periodically, I am losing access to the database server so I want to have another mechanism in place (XML files) to continue developing. It is not possible to have a local version of the db unfortunately! I thought this would be relatively easy using the Repository pattern, to switch out the db repositories and switch in XML versions. However, I am having real trouble coming up with a solution. I have tried LinqToXML but then ran into problems trying to return a List of News items as the LinqToXML ToList returns Generic.List Should I be mapping the XElement list over to the News list by hand? It just seems a bit clunky compared to LinqToSQL attributes on the News class and then simply doing a Table.....ToList(); Any direction would be appreciated. Thanks

    Read the article

  • C# - using decimal in switch impossible?

    - by phobia
    Hi, I'm justing starting out learning C# and I've become stuck at something very basic. For my first "app" I thought I'd go for something simple, so I decided for a BMI calculator. The BMI is calculated into a decimal type which I'm now trying to use in a switch statement, but aparently decimal can't be used in a switch? What would be the C# solution for this: decimal bmi = calculate_bmi(h, w); switch (bmi) { case < 18.5: bmi_description = "underweight."; break; case > 25: bmi_description = "overweight"; case > 30: bmi_description = "very overweight"; case > 40: bmi_description = "extreme overweight"; break; } Thanks in advance :)

    Read the article

  • iphone sdk conditional in switch function

    - by Oliver
    I'm trying to make a random image appear on the press of a button. So it generates a random number, and the switch algorithm swaps the chosen image with the one in the imgview. but I want a switch in the settings app to toggle which set of images to use. I know pretty much how to do it...it's just that it doesn't work. I'm missing some syntax thing...Please help, stackoverflow? it's my birthday. int Number = rand() %30; NSString *toggleValue = [[NSUserDefaults standardUserDefaults] stringForKey:@"enabled_preference"]; switch (Number) { if (*toggleValue == 0) { case 0: picture.image = [UIImage imageNamed:@"1.png"]; break; case 1: picture.image = [UIImage imageNamed:@"2.png"]; break;} else { case 0: picture.image = [UIImage imageNamed:@"3.png"]; break; case 1: picture.image = [UIImage imageNamed:@"4.png"]; break;} }

    Read the article

  • Switch Case on type of object (C#)

    - by Sem Dendoncker
    If you want to switch a type of object, what is the best way to do this? ex: private int GetNodeType(NodeDTO node) { switch (node.GetType()) { case typeof(CasusNodeDTO): return 1; case typeof(BucketNodeDTO): return 3; case typeof(BranchNodeDTO): return 0; case typeof(LeafNodeDTO): return 2; default: return -1; } } I know this doesn't work that way, but I was wondering how you could solve this. Is an if then else else else statement appropriate in this case? Or do you use this switch and add .ToString() to the types? Kind regards, Sem

    Read the article

  • Generate switch cases in php from an array?

    - by mopsyd
    Is it possible to generate the cases for a switch in php using an array? Something like: $x=array( 0 => 'foo', 1 => 'bar', 2 => 'foobar' ); $y='foobar' switch($y) { foreach($x as $i) { case $x: print 'Variable $y tripped switch: '.$i.'<br>'; break; } } I would like to be able to pull the case values from a database and loop through them with a while() loop.

    Read the article

  • Performance of if statement versus switch statement

    - by behrk2
    Hi Everyone, I have an if statement with 16 cases (I am checking the state of four boolean variables). Would there be any value in trying to implement this differently, with nested switch statements perhaps? What is the actual performance gain of a switch statement over an if statement? Thanks!

    Read the article

  • Context switch time - Role of RTOS and Processor

    - by S.M
    Does the RTOS play a major role or processor play a major role in determining the time for context switch ? What is the percentage of share between these two major players in determining the context switch time . Can anyone tell with respect to uC/OS-II RTOS ?

    Read the article

  • Switch Statement in C#

    - by pm_2
    Does anyone know if it's possible to include a range in a switch statement (and if so, how)? For example: switch (x) { case 1: //do something break; case 2..8: //do something else break; default: break; } The compiler doesn't seem to like this kind of syntax - neither does it like: case <= 8:

    Read the article

  • Switch Statement Case Evaluation?

    - by TheDarkIn1978
    i would like to have cases that evaluate the expression in my switch statement. is this not possible? switch (zSpeed) { case (zSpeed > zMax): this.zSpeed = zMax; break; case (zSpeed < 0): this.zSpeed = 0; break; default: this.zSpeed = zSpeed; }

    Read the article

  • Is it possible to repair a Cisco 3500 XL (3548) switch with POST Error messages?

    - by Alex
    I've got an old Cisco 3500 XL, and it seems to have hardware issues. I've loaded the latest IOS and cleared all config. Does anyone have any experience fixing the switch core? I'm a reasonably competent SMD solderer, can I replace/reflow some chips? I've checked the power supply voltages and it's all within tolerance, and no visible signs of any component damage. Some chips are hot to the touch. I understand that these were EOL as of 2007, but should have a lifetime warranty for the electronics. I don't have a Cisco support contract, so I can't file a ticket. What should I do? Console output: switch: dir flash: Directory of flash:/ 2 -rwx 1811584 <date> c3500xl-c3h2s-mz.120-5.WC17.bin 1799680 bytes available (1812992 bytes used) switch: boot Loading "flash:c3500xl-c3h2s-mz.120-5.WC17.bin"...################################################################################################################################################################################### File "flash:c3500xl-c3h2s-mz.120-5.WC17.bin" uncompressed and installed, entry point: 0x3000 executing... Restricted Rights Legend Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the Commercial Computer Software - Restricted Rights clause at FAR sec. 52.227-19 and subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS sec. 252.227-7013. cisco Systems, Inc. 170 West Tasman Drive San Jose, California 95134-1706 Cisco Internetwork Operating System Software IOS (tm) C3500XL Software (C3500XL-C3H2S-M), Version 12.0(5)WC17, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2007 by cisco Systems, Inc. Compiled Tue 13-Feb-07 15:04 by antonino Image text-base: 0x00003000, data-base: 0x00352924 Initializing C3500XL flash... flashfs[1]: 1 files, 1 directories flashfs[1]: 0 orphaned files, 0 orphaned directories flashfs[1]: Total bytes: 3612672 flashfs[1]: Bytes used: 1812992 flashfs[1]: Bytes available: 1799680 flashfs[1]: flashfs fsck took 3 seconds. flashfs[1]: Initialization complete. ...done Initializing C3500XL flash. C3500XL POST: System Board Test: Passed C3500XL POST: Daughter Card Test: Passed C3500XL POST: CPU Buffer Test: Passed C3500XL POST: CPU Notify RAM Test: Passed C3500XL POST: CPU Interface Test: Passed C3500XL POST: Testing Switch Core: Passed Error with Switch Core BIST test Phase 0. Returns: Test Complete Low : 0x0FFFFFFF, Test Complete High : 0xFFFFFFFE Test Phase Low : 0x00000040, Test Phase High : 0x00000000 Test Phase Third : 0x00000000, Test Complete Third : 0x000001F8 C3500XL POST FAILURE: Testing Switch Core: Failed C3500XL POST FAILURE: Testing Buffer Table: Failed C3500XL POST FAILURE: Data Buffer Test: Failed C3500XL POST FAILURE: Configuring Switch Parameters: Failed C3500XL POST FAILURE: Switch Core BIST failed. C3500XL POST FAILURE: Cannot test Modules due to failure of Switch Core POST Del Mar Failure (0th Del Mar): req system failed to init C3500XL POST FAILURE: C3500XL POST FAILURE: ATM: required system failed to init C3500XL POST: Ethernet Controller Test: Passed C3500XL POST FAILURE: MII Test: Failed C3500XL POST FAILURE: Error waiting for Ethernet Controller and SW_PARAMS C3500XL POST FAILURE: Initialization/POST failed C3500XL POST FAILURE: AT: Failing because system POST failed Exception (8192)! Debug Exception (Could be NULL pointer dereference) CPU Register Context: Vector = 0x00002000 PC = 0x000F36F4 MSR = 0x00029200 CR = 0x22000024 LR = 0x000F6964 CTR = 0x001DE46C XER = 0x00000000 R0 = 0x00000000 R1 = 0x004E2580 R2 = 0x00000000 R3 = 0x00000000 R4 = 0x00000001 R5 = 0x00000000 R6 = 0x004E2718 R7 = 0x004E2718 R8 = 0x00000008 R9 = 0x00000000 R10 = 0x0000FFFF R11 = 0x00480000 R12 = 0x42000024 R13 = 0x00000000 R14 = 0x00000000 R15 = 0x00000000 R16 = 0x00000000 R17 = 0x00000000 R18 = 0x00000000 R19 = 0x00000000 R20 = 0x00000000 R21 = 0x00000000 R22 = 0x00000000 R23 = 0x00000000 R24 = 0x00000000 R25 = 0x00000020 R26 = 0x004E2718 R27 = 0x004E2718 R28 = 0x00000020 R29 = 0x00002513 R30 = 0x00000001 R31 = 0x00000000 Stack trace: PC = 0x000F36F4, SP = 0x004E2580 Frame 00: SP = 0x004E25A0 PC = 0x40000016 Frame 01: SP = 0x004E2618 PC = 0x000F6964 Frame 02: SP = 0x004E26A8 PC = 0x000F76DC Frame 03: SP = 0x004E26C8 PC = 0x000E8114 Frame 04: SP = 0x004E26F0 PC = 0x001F5BF8 Frame 05: SP = 0x004E2710 PC = 0x001F5CF4 Frame 06: SP = 0x004E2748 PC = 0x0023F4DC Frame 07: SP = 0x004E2750 PC = 0x0023E650 Frame 08: SP = 0x004E27C8 PC = 0x0023E89C Frame 09: SP = 0x004E27E0 PC = 0x0028AF34 Frame 10: SP = 0x004E27E8 PC = 0x001E38F8 Frame 11: SP = 0x004E2808 PC = 0x001E39A8 Frame 12: SP = 0x004E2820 PC = 0x0014E220 Frame 13: SP = 0x004E28C8 PC = 0x0014E39C Frame 14: SP = 0x00000000 PC = 0x001EB510

    Read the article

  • How do I know if I need a layer 3 switch?

    - by eekmeter
    We currently have a flat network with a bunch of unmanaged switches. I would like to use VLANs to segregate certain users like guests and I would like to use 802.1x. However, I'm not sure if what I need is a layer 3 or a level 2 switch. From what I understand a layer 3 switch does routing between VLANs. I don't think I need this at the moment but as I said I'm not sure since this is all new to me. What else would a layer 3 switch do for me? Our network is relatively small, less than a 100 users. What exactly does a layer 3 switch do that I can't get with a layer 2 switch? When would I need a layer 3?

    Read the article

  • How do I know if I need a level 3 switch?

    - by eekmeter
    We currently have a flat network with a bunch of unmanaged switches. I would like to use VLANs to segregate certain users like guests and I would like to use 802.1x. However, I'm not sure if what I need is a level 3 or a level 2 switch. From what I understand a level 3 switch does routing between VLANs. I don't think I need this at the moment but as I said I'm not sure since this is all new to me. What else would a level 3 switch do for me? Our network is relatively small, less than a 100 users. What exactly does a level 3 switch do that I can't get with a level 2 switch? When would I need a level 3?

    Read the article

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