rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The integrated Intel GPU is not bad these days, and can handle normal videos quite well, but if you are going to do any serious graphics work, then the Radeon is a good choice. If mostly you are going to do software development, then either will do you well, unless of course you are interested in GPU programming.

As for OS, my preference is to run Linux as the base OS, and then run Windows in a virtual machine under Linux. I user VirtualBox as a virtual machine manager - open source, free, and very reliable. The ability to snapshot your virtual machine means that if your Windows VM gets a virus, you can instantly fix it by reverting to the last snapshot. Ipso-presto! No more virus! I do both Linux and Windows C, C++, and Java programming, mostly cross-platform stuff that has to run on both Linux and Windows. This setup works well for me.

Screens. Well, I have a Lenovo at work w/ 17" HD display. I still use an external 24" display for daily work. My other laptop is a Dell D630 w/ 15" display, which is ok for travel, but I have it connected to ... a 24" external monitor when I am working at home on it, unless I happen to be sitting in my living room easy chair with it in my lap. So, save the money on the screen and get a good external monitor that gives you better resolution and …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Another good place to post is The Linux Forums (www.linuxforums.org/forum). You'll find me there also. Then, you need to visit www.linuxwireless.org - they have drivers (or links to) and installation procedures for just about every wireless device that can run on Linux.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I've had to remove such for clients of mine. I use a Linux system with 2 or 3 different virus scanners when someone has these problems. The virus may have also infected the boot loader. In any case, running a Windows scanner will likely not totally remove this critter. On my Linux system, when I scan a Windows drive (I remove them from the client's system, plug them into a drive dock connected to my Linux system) I scan with ClamAV (good open source scanner), f-prot (industrial strength scanner), and McAfee for Linux. Each will find stuff the others don't. I especially look for things they ALL agree is a virus, and if 2 of the 3 agree, that also gets special consideration. Then, after removing the infected cruft, there is the matter of restoring the system to operational status. This is difficult when the recovery (hidden) partition for Windows has infected components. I keep a clean set available for a number of versions so I can restore the bad parts. As a professional, this is how I deal with these problems, and I have never had a client come back with the system still infected. I usually give them "the talk" about good network browsing habits, and such.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What operating system are you using?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There is no real difference between USB drives and USB data cards, which typically are presented to the operating system as drives as well (solid state). What, exactly, are you trying to accomplish?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

std is a system-level namespace. If you want to set the namespace for a section of code, you can do so with the "using namespace <name>" directive. IE:

using namespace std;

int foo(int value)
{
    cout << "value==" << dec << value << endl;
}

Without the "using" directive, you'd have to do this:

int foo(int value)
{
    std::cout << "value==" << std::dec << value << std::endl;
}

That said, a lot of standard C++ header files will do the "using namespace std;" for you, which is why you often don't see the "std::" part of these elements.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Huh? I don't know what you are talking about, unless you are referring to 7-bit ASCII key codes, which would make sense. I have done complete telnet implementations for real-time operating systems (both client and server side, device drivers, and all the rest of it) back in the early 1990's. According to the DDN Protocol Handbook, the official source repository for all TCP/IP specifications, in the telnet section (RFC 854, Volume 2, page 575) it says this:

Page 5-578: Although a TELNET connection through the network is intrinsically full duplex, the NVT (Network Virtual Terminal) is to be viewed as a half-duplex device operating in a line-buffered mode. That is, unless and until options are negotiated to the contrary.

Nowhere do I find anything that limits it to 7-bits, although that may be implied in that a telnet session can be ascii (7 bits) or binary (8 bits), and that can be negotiated (RFC 856, pages 2-595-598, Telnet Binary Transmission). I think that from what you seem to be saying is that the router expects a telnet connection stream to be non-binary (ascii) only, so you need to set your terminal emulator / telnet client to run in that mode (7-bits / character).

Finally, the entire telnet spec is almost 165 pages in length, and these are 8 1/2 x 11 typewritten pages. :-) FWIW, a telnet client will be able to negotiate all of this when it connects to the server (router in your case), unless …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you use the standard BIOS and boot loader, then you are limited to 4 primary partitions, just like other operating systems. If your system supports EFI/UEFI then you can use a more modern boot loader with much expanded partitioning options. However, even with a standard PC BIOS, Linux can boot from extended partitions, unlike Windows which has to boot (AFAIK) from a primary partition.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, the ultimate question is "Is it fast enough?", and the ultimate answer is "Sometimes!"... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

yes that is the complete code there. i should mention though, that a few weeks ago Visual studio wouldn't work and complained that the compilers and includes were missing. (even though i have he windows sdk installed.) creating anything else works just not the template declarator.

Ok. Important information here! If VS thinks your system is fubar, then you should reinstall Visual Studio! Root cause analysis - something everyone who writes computer software should learn, FIRST! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Yes, the problems always arise when the "rubber meets the road"! That's why I have, in the past, written my own parsers, simply because that was the least painful way to get what I wanted out of the situation.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, this is pretty simple code, and other than the underscore issue, I don't see why you are having this problem. Have you posted your code in its entirety, and altogether?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This all depends upon what you need. There is the DOM approach - read the entire thing and return a composite structure with all the data. Then there is the SAX approach where you set up callbacks to deal with each element type in the document. This may be a better method for you if you need to react in some manner as each element is read. I have written other XML parsers myself in the past in order to minimize memory usage and improve read performance. It's been awhile (about 5 years), but I think that xerces will allow you to use either approach. Here is a page from the saxproject that explains the differences: http://www.saxproject.org/event.html - and after research, yes xerces will provide the ability to deal with either approach.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Just an observation. Using tokens/keywords with leading double underscores, such as __AND, are reserved for the compiler and system library implementer. NEVER (I repeat that - NEVER) use them in your own code, otherwise you are likely to encounter some very weird error situations with names (and macro name) collisions! If you are writing a compiler and the associated support libraries, then that is your choice. If not, then DO NOT DO THIS! Trust me, I have had to deal with a number of these problems in the past, and figuring out why things went sideways was not a fun exercise!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Actually, mazzica1 is not quite correct. Just use the name of the function. You don't need the address operator. IE,

void callTest()
{
    test(add);
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please don't ask us to do your homework for you. In case you haven't figured it out yet, a running program is always in RAM (or possibly virtual memory on modern systems). Google is your friend. The answers to all of these questions can be found in the Wikipedia I think. It is elementary computer science.

Anyway, to sort of answer your question(s) about relocatable code. On some systems, such as embedded systems, you need to specify where in memory space your code will run from, usually in ROM. This is non-relocatable code. On current systems, where you are not running code from Read-Only-Memory (ROM), your code needs to be runable from any memory location, hence the "relocatable" concept - in that the code can be relocated to any suitable place in memory. When the operating system loads such a program into RAM, it decides where it should go, and then "fixes up", or "relocates", the memory addresses in the code to point to the correct memory addresses that it will actually be running from.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

FWIW, in my organization we use Java and C++ extensively, and our server software all runs on Red Hat Enterprise Linux. Our newest stuff runs on 6.1. Older stuff on 5.x. In my opinion, 6.1 has been a major improvement in hardware support, especially WiFi on laptops.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What are the specs for this drive - size, partitions, formatting, etc? What do the modem/router's docs say about plugging in USB drives?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You are confused. Fuse is not a file system. It is a means by which user-space drivers can be installed (fewer restrictions than kernel-space drivers). Your error message means that the file system in question is mounted more than once, probably due to some login script that doesn't have an associated umount command in the logout script. Post the output of the "mount" command (no arguments) here please.

vedro-compota commented: ++++++++++ +3
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

See your other thread. And BTW, please don't post the same question multiple times! It won't get you any more/better answers!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, as the saying goes, if it ain't broke, don't fix it!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sometimes when playing Whack-a-Mole, you do get the right mole! :-) Anyway, I'm glad you sorted this out on your Ubuntu system. Myself, I stopped using Ubuntu after they stopped supporting 9.04 - IMO the last REALLY great Ubuntu distribution! Now I am using RHEL 6.1 and clones (Scientific Linux) mostly.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Do you plan on running Linux on this machine? If so, check out www.zareason.com. With 2.3GHz i5 processor, their Alto unit will set you back $798 USD. The Dell Inspirion 14r at $649 (currently) w/ 2.4GHz i5, 500GB disc, and 6GB of RAM is more for the $$. But then, ZaReason is a small company in the San Francisco / Berkeley California area, and don't have the volumes that Dell does, hence their costs are higher. However, their quality is great, their people give you personal attention, and I do like to support "the little guy" (or woman in this case - their owner/president is Cathy Malmrose). So, if you are going to run Windows on the system, go with Dell. If Linux, go with ZaReason - all their hardware comes pre-installed with Linux (a number of versions available, as well as BSD), and all hardware (audio, cameras, wifi, etc) are guaranteed to work out-of-the-box.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, did you install the libxerces development package? Without that, you won't get the headers you need to build c-xerces code. The basic package will only have the shared libraries and dependencies needed to run existing applications that rely upon it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Building upon your traffic light metaphor, around here we have freeways and there are lights (red/green) on the access ramps that normally, when traffic is light, stay green; however, if the traffic is heavy (during rush hour, for example) then the light stays red for some period, and then green to let one or two cars onto the freeway, and then change back to red for awhile. Effectively, this allows the freeway to attain the maximum throughput and not slow traffic down too much. So, some sort of adaptive metered access is what you are looking for?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As ITG-JM said, IPv4 has been around for decades (since the 1970's and 80's). If you are concerned about IPv6, that is different. The stuff I learned about IPv4 back in the 80's is still relevant today. I still use the DDN White Book as a reference for IPv4 issues, and it was published in 1985.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

School class exercise? So, define your terms. What do YOU mean by "starvation free"? What do you understand to be the relationship between deadlock and "starvation". These are broad terms, and are relevant to the environment, and specific situation in which you encounter them.

FWIW, typically "starvation free" refers to the fact that readers of a resource are not gated (blocked) by the writers of the resource. IE, until the writer has "committed" the changes to the resource, the reader will still be able to access the pre-commit state of the data. In your example, you have described a situation where starvation can occur, in that if the crosser of the bridge does not release the semaphore, no one else can cross, hence "starving" access to the bridge. So, to modify this algorithm to be starvation free, you need to change it so that there are no blockages upon subsequent accesses to the bridge.

This brings up the question, what SHOULD block access to the bridge?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most any current distribution is suitable for learning how to program in Java and/or C/C++. My personal preference (personal, and preference) is to use Red Hat Enterprise Linux, or clones thereof (CentOS or Scientific Linux). In fact, I use all three, and I have used Ubuntu extensively in the past. Unfortunately, my opinion is that Ubuntu started regressing after 9.04, so I don't use it any longer. RHEL 6.1, or a clone thereof, is my preferred system these days, and I do a LOT of serious software engineering. My current position/title is Senior Systems Engineer at Nokia Mobile Phones. I do Java and C++ software engineering for a living.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Yes, it seems that bad capacitors are a frequent source of strange system behavior these days. I think that is one place where system builders are scrimping on costs.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It's not a perfect solution like you think though it works with your requirement. Imagine a case where F grade is for 0-35 score. Then you need some more changes :)

But that was not the question! The answer generated was correct under the conditions set by the teacher.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok ... I don't suppose you have tried another router?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but I'm clueless also! This is when I would start banging my head against the wall... :-(

In any case, SOMETHING is interfering with your connection to yahoo. You say this only happens with the wireless, and not using a wired connection to the router? Or with both?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

That's what is called "thinking around corners". :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Thanks for the info about drivermax.com. That may be helpful for a lot of people to speed up their 3rd party driver update process. So, good post.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I have to agree with WaltP in his assessment of this question, for both parts. In any case, DO NOT use a \n in a C++ output statement, unless you don't mind it getting mixed up with other output to the same device (such as a terminal or log file). That why in C we have to use fflush(stream) after an fprintf(stream, "fmt", args, ...). FWIW, this rule is relaxed somewhat when the output is to cerr (c++) or stderr (c) since they are by design unbuffered.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Can you use inline conditional assignments? IE:

int Grade = (pct >= 85) ? 'A' : ((pct >= 75) ? 'B' : ((pct >= 65) ? 'C' : ((pct >= 55) ? 'D' : 'F')));

No if statements there! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please post the output of route and ifconfig both before and after the disconnect, please, and all of the NICs' IP addresses - I assume they are all static? The router 51.61.71.1 is also the gateway, correct?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Finally, are you using iptables for routing? If so, what is its configuration?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Is this the route information from before, after, or both before and after you disconnect the nic? Also, I notice there is no link-local destination (IE, localhost, 127.0.0.1 the local loopback IP address). And what are the IP addresses of your 4 network ports, as well as your router(s) and internet gateway(s).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most any current distribution will work fine on this, even though the CPU is a bit pokey. Try Linux Mint (derived from Ubuntu, which is in turn derived from Debian). If you want a Red Hat Enterprise Linux (RHEL) system, you can install either CentOS or Scientific Linux (SL), which are free clones of RHEL. I use RHEL 5.4 and 6.1 at work, SL 6.0 and 6.1 at home, and used to use CentOS 5.x, but switched to SL a bit over a year ago because CentOS was slow in adopting RHEL version 6, which has major improvements over 5.x in hardware support, and current software such as audio/video editing tools.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Man, are we fast! Superluminal (faster than light speed) for sure! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, a firmware update won't hurt (probably). I've updated my in the past. And sometimes you just have to bite the bullet and buy a new model... :-( In any case, you can get them for under $50 USD.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So I guess it is something to do with the current wi-fi router's configurations.

I think you are correct, given you have tried all of the rational things. One thing that comes to mind now is that the WiFi router may have some sort of parental control or other filter enabled that be blocking this connection. I know I can do that on my router if I wanted to. You may want to check the router configuration pages to see if there are any such filters or blocks enabled.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What browser do you use on the laptop and desktop? Are you trying to access Yahoo! with http, or https?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, how are you getting IP addresses for your PC and the other devices?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

i'm currently working on it. i recently started this (like 2-3 weeks ago) so i haven't fully completed it yet. the sample was just to show how coding in perfect would look like. I'll post up a BNF list when i have it finished.

Thanks. I'd be interested in seeing it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And if you don't know the meaning of the term "fubar", it means "farked up beyond all repair/recognition"... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry my brain was fried should have been more clear.

What I think I need to do first is a firmware upgrade on the router. It won't answer when I try to access it through a broswer at 192.168.1.1.

I just did a factory reset on the router so it should respond to that IP address.

Ok. You are correct in that the Linksys routers should default to 192.168.1.1 when factory reset. I know that mine does - just checked it out (it is currently configured as a bridge as I also have a router at 192.168.1.254 that provides our gateway to the internet). So, if resetting it (hold the reset button in for at least 10-20 seconds) still doesn't allow you to access the device via a web browser pointed to 192.168.1.1, the router may be (probably is) fubar and will need to be replaced.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Anyway, I have no clue as to the answer for your original question. Sorry. That (previous post) was my sarcastic clone answering... :-)

Though we did really have the VAX, VM 370, and DEC 10/20 manuals around here at one time. I think we finally recycled them some years ago, because they were a big pile of boxes that aren't in the storage room any longer. Anyway, the VM370 docs were mine, and the VAX/DEC docs were my wife's. You know that old saw "If you don't have 36 bits, you aren't dealing with a full DEC"? :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You changed the DNS server address on your computer, or was it on the router? Also, did you set it to the raw IP address, or the name? Finally, what OS is your system running?