rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I'm not familiar with this architecture, assuming you mean some sort of computer architecture, and not the SAP ERP software system, or Statutory Option Pay, or Resource Letter SAP-1 on Subatomic Particles, or ...

So, please be more specific about what you mean, and provide some links to relevant articles, etc. Example: http://wiki.answers.com/Q/What_is_SAP_1_architecture

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, if it can be read (necessary in order to deliver the product), it can be copied. At $40 per unit, DRM is not cost effective. Commercial DVDs and Blu-ray discs are supposedly uncopyable, but we all know that not to be true as well. The CSS encryption on DVDs was broken by a teenager a couple of months after DVDs hit the mass market. Blu-ray encryption was a bit harder, but hackers broke that in not much longer a time frame. My personal, and professional opinion is that DRM only serves to inconvenience and piss off your customers. Most people are perfectly happy to pay for content, provided it comes at a perceived acceptable cost/benefit ratio.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Two sites to visit:

www.kernel.org
www.tldp.org

The kernel.org site is down presently, since the servers for The Linux Foundation were hacked recently. Hopefully it will be back up soon. The Linux Documentation project (tldp.org) is up, however, and it has a lot of tutorials, articles, how-tos, and such to help you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Usually, protecting such data is more trouble than it's worth. The only practical way is to encrypt the data and provide a custom application to access it that requires registration with your servers in order to get a key to decrypt the data. Even then, it can be hacked, and you still would need a 2 or 3 stage decryption process to make breaking the system "interesting" to a hacker. Unless your data is incredibly valuable and expensive, this is just not worth the cost to develop using rigorous methods, testing, and deployment. My suggestion is to make the data and SD card (or thumb drive) cheap enough so that the temptation to copy or pirate it is greatly reduced. Don't inconvenience (and piss off) your customers should be the first rule.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Side note: You can not get this information unless your custom protocol provides it. They way layer 2 works is that you will only see the MAC address of the previous hop which is generally not the source machine.

Good detail point L7Sqr, but probably more than the poster needs to know right now! :-) They still have a lot of basic learning to do about networking before they are ready to confront their task in a rational manner.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Design it first, then code it to your design. There are a number of database type tools for java that will allow you to store and search the data on disc in a number of ways, but first you need to write out in detail how you want it to work, how it is to be presented to the user, what options the user will have with regard what columns are sorted or in what order, etc.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Basically, a union is a chunk of data that can contain one value of a number of data types. Example: you may have a union with an integer, float, double, or long, declared like this:

union {
int i;
float f;
double d;
long l;
} value;

value.i = (int)1;
value.f = (float)1.1;
value.d = (double)1.11;
value.l = (long)1;

At the end of the assignments, the value item contains a long integer with a value of 1L. Only value.l has any meaning at this point. The size of the value variable will be big enough for the biggest member (properly aligned).

Now, let's consider a structure:

struct valtype {
int i;
float f;
double d;
long l;
};

struct valtype value;
value.i = (int)1;
value.f = (float)1.1;
value.d = (double)1.11;
value.l = (long)1;

In this case, the structure has 4 different members, so each member such as value.i, value.d, value.f, and value.l will have a proper value, and the size of the structure will be the sum of all the member sizes (again, properly aligned and padded). So, the structure variable will be much larger, and contain much more data, than the union. Here is an example of using a union when you don't know in advance what the type it will hold may be:

enum valtype { inttype = 0, longtype, floattype, doubletype };

typedef struct {
    union {
        int i;
        float f;
        double d;
        long l;
    } val;
    enum valtype type;
} valtype_t;

valtype_t …
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This your school exercise. Make an effort - describe the processes needed, write some pseudo-code (or real code if you prefer), and we will be happy to comment on it. However, YOU need to make a good faith first effort at solving the problem.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Here is a search page on buy.com for this battery. Prices range from $23 - $55 USD each. A lot cheaper than from Dell direct. http://www.buy.com/sr/searchresults.aspx?qu=dell+studio+1535+battery

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Depending upon the laptop and cost to diagnose/repair, a new one may be in order. If you do get a new one, get one with an e-sata (external sata) port, so you can plug your old drive into a carrier and connect it to the system in order to save your data. That said, the file system may need to be repaired with chkdsk before you can access your data since it was in use when the laptop died.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to go into the BIOS and reset the IDE/Sata configuration settings so that it sees the IDE drives properly. It is probably trying to boot from the sata drive by mistake.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

1, 2, 3, & 4) No, you can't. A router may have a single IP address (dynamic or static), yet multiple systems with valid accounts may connect via the router. You get the router's IP address, not the connected system's address. Ditto proxy connections.
5) You need to look at the MAC addresses associated with each connection (not always possible without deep-packet inspection, and not always then). Each distinct connection should have a different MAC address, although those can be spoofed. Encrypted connections multiply the difficulty by a large order of magnitude.

At the bottom line, this is not simple. If you are, as you state, new to this networking cruft, then you need to do some serious bootstrap training to get even a basic understanding of what you are facing. I speak as a professional who teaches this stuff.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It sounds like you want to build an LR recursive descent parser. You build a binary tree to represent the equation. Evaluation is a recursive, Left-to-Right operation. There are a large number of texts that describe how to do this. It is your basic applied programming class contents.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One of the features that Solaris have been so proud of are the virtualization of different operating system without the use of VMWare, VirtualBox, etc.

Ok. I haven't used Solaris for some time, other than as a guest OS in a VirtualBox VM in order to update some kernel modules, so I'm not up to date regarding its native virtualization capabilities. I would suggest that the poster ask this question in the Solaris user forums or search on Oracle's web site for documentation about these issues.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It appears to be a UML-based model-driven architecture (MDA) tool. It is not a language (although UML may be considered as such). It will take the model, and turn it into code (.net or java in this case). For complex systems, such tools (I use something similar called Enterprise Architect by Sparx Systems in Australia, but IBM's Rational tools are popular, if expensive) are very useful, and definitely increase productivity, if only by letting you visualize the relationships between entities in the system (class models and use-cases), and their behaviors (state machines, sequence and activity diagrams, etc).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, I don't see that you are actually linking the library. Add the linker directive "-l ssh2" to your LIBS variable. That's a lower-case 'ell'. The upper-case directives are for directories to search for the actual libraries to link.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Huh? I have been using Linux for 10+ years and never heard about this? Are you talking about running Solaris in a virtual machine? If so, what virtual machine manager (KVM, XEN, VirtualBox, VMWare, et al) are you using?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

My laptop screen was black today but it's running. I can see the volume and the wireless thing turned on. I cannot see anything on the screen. It's totally black. And then i just closed it and turned it on after 10 min. Then the screen came up normal. But the battery was low, it was blinking in red. Is it because of the battery that it didnt come up?

That's a good assumption. The back-light for the LCD display is one of the bigger power consumers for a laptop, which is why they are normally dimmed when running on battery power.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried just plugging in the AC adapter to see if it is a battery or battery control problem? Since it works when plugged into the docking bay, that seems a reasonable test to me. BTW, other than the laptop, what else is connected to the docking bay?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You probably need both RAM sticks installed for it to boot. That is pretty normal for dual-channel motherboards. This is assuming that all the other cruft is properly installed and connected (CPU, etc).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I don't find this unit on the Neo web site, and your link has expired, so I just get a 404 "Page not found" error trying to access it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It sounds like you enabled full-disc encryption when you installed the operating system (Linux). If you don't remember the password you selected when you installed it, then you will have to wipe the disc completely (including the boot sector) and re-install the system (worst-case scenario).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

FWIW, you CAN create NTFS or FAT file systems on discs with Linux, which ARE directly accessible by Windows, including for write access.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ubuntu probably formatted it in an ext2 format (or ext3/ext4 which are based on ext2), which is not handled directly by Windows. There are free drivers for windows that will let you read, but not write, to an ext2-based file system.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is a time vs. effectiveness issue. If you can determine the root cause and that it can be resolved with a "quick" fix, then fine. Otherwise, you are likely to 1) waste a lot of time running down blind alleys, and 2) not resolve the basic problem. My solution is radical, but effective. In cases such as you have described, my experience (30+ years) has shown that it is the most conservative in TTR (Time To Repair), and effective is removing the contagion. So, what I do for my clients is to scan the files that they want to preserve for virus infections, cleaning them as necessary and backing them up to an external drive (I do this with a Linux workstation, since repairing such systems that have Windows installed with a Windows system is counter-indicated) after cleaning. Then, I wipe the disc, and install a clean version of Windows. Finally, I reinstall their user files in a location that they can access easily after restoring their user account.

In the past year I have seen infections such as this that have compromised shared libraries in the recovery partion, the boot sector, and operating system files and libraries. There is no cure for such, other than a complete wipe of the drive.

FWIW, doing this has resulted in complete system recovery, and no loss of data for the client.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Too much information. You are probably right in that your computer has become infected with a virus and/or root-kit. It may have infected both the boot sector of the disc, as well as the recovery partition (I have seen both situations on my clients' computers as an IT consultant). 1) erase the ENTIRE drive, including the boot sector. 2) Re-install the operating system from scratch. If you don't have an installation disc, contact the computer manufacturer, purchase one from Microsoft, or switch to a Linux operating system.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are two ways for a computer to connect to a wireless network: 1) dynamic (dhcp) - the router assigns a "temporary" IP address to a specific machine that is connecting to the network, or 2) static, where the computer is configured to use a specific address when connecting to the network. This is often the cause of the types of problems you are expreiencing. You need to verify that your sister's computer is using DHCP addressing instead of static addressing. If not, then go to the computer's TCP/IP settings and change it.

jingda commented: Well said +11
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Re: while (Answer == 'y' || Answer == 'Y') vs. while (Answer == 'n' || Answer == 'N') - that was a bit of a trick to see if you would come up with the correct answer... :-) Good start. As cherrymae.calma said, there are generally 3 types of loop constructs. You have used the do {} while (condition); loop. There are also for (start-condition, test-condition, next-step) and while (condition) {} loops. There is a fourth one, that should cause you to fail a project - a label + goto statement. It is rare for this fourth kind to be needed, though I have seen some kernel and driver code where it may have been appropriate due to behavior of volatile data and hardware event handling. With luck, you will never have to use it. In 30+ years of C and C++ development, I have possibly needed to use the label+goto twice under these conditions (kernel and/or hardware driver support), and the last time was over 20 years ago when developing TCP/IP driver code for a hard real-time operating system.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are a variety of loop constructs. Which to use depends upon a number of factors. In your case, a do {...} while (condition) block would be a reasonable approach. Unfortunately, your control condition statement at the end is bogus. The variable n has not been set, it is a different type than the Answer variable, and you are using an assignment operator instead of a comparison. So change the line

} while ( Answer = n );

to

} while ( Answer == 'n' || Answer == 'N' );

One last issue, is that after you ask the question "Do you want to do it again? (y/n)" you don't take input from the user, so the conditional clause at the end of the loop will not be properly set, at least as per your apparent intent... :-)

skiboy209 commented: Very helpful and not critical +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You are probably at the point when you want to start segregating your network into discrete subnets. That will keep traffic internal to each subnet off of the greater corporate network, and routing rules in the routers/switches can direct necessary traffic to other subnets as needed. So, what are your using for routers and external gateway?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Backing up Blu-ray is not as simple as it is for DVD's. The security is much stronger, though not impossible to get around. The packages that have DVD's you can backup with a lot of available (free or paid-for) software - I use my Linux system's dvdbackup software and the DVDCSS library to decode and rip DVD's. There are also Linux libraries for Blu-ray, but I haven't tried ripping a BD disc since I don't have a Blu-ray player... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming you completed your contract term with the original carrier, you should go to them to unlock it. Myself, I only get unlocked devices. I had a Nokia that I wanted to unlock and tried one of the online services - it didn't work. Fortunately, I was only out about $10-20 USD for the effort. In the USA these days, I think that the carriers have to unlock the phone/modem if you have fulfilled your original contract that subsidized the device.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

They have a WiFi-only model of the Xoom, so you don't need a cell phone contract to use it. It runs Android (a version of Linux), and the Android mail tool allows you to access just about any account that has POP or IMAP connectivity. I'm sure you will enjoy it! I use my android phone for handling email and reading newspaper articles when on the road, including accessing and trading stocks/options on my Fidelity account. A tablet would be a lot easier to do all that, but without a cell phone data plan you will be limited to locations with WiFi access to get internet connectivity. These days that includes just about all coffee shops, many restaurants, most public libraries, and such. In fact, I switch my android phone to WiFi networking when I am somewhere that there is decent WiFi access - it doesn't count toward my data caps and such.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Get new drive, backup data, replace clinking drive. You can get a 2TB drive these days for under $100USD.

As for drive noises, some older MFM or IDE drives had a copper grounding strap that contacted a carbon electrode attached to the rotating disc hub in order to drain static charges that built up in the drive internals which could, if not drained off, damage the electronics of the unit. Sometimes these would make a squeaking or squealing sound. Clinking on the other hand means that something is physically lose, and if internal to the drive, can destroy it when it lets go altogether. That said, it may just be something loose externally to the drive, such as one of the mounting brackets. You should probably take the cover off the system and check that out before going to the extent of replacing the unit. After all, tightening a screw is way cheaper than buying a new drive... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Re. herbert11

1. Overhead - not so much as to make a difference
2. Harder to design and code - huh? Not in my 30 years of experience.
3. Maintenance - not difficult - in fact much easier to maintain well-written OO code than traditional coding constructs.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Narue is right on the money here. The KISS principle is the foundation of good programming.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

int +; // total This is invalid. You can define a + operator in C++, but this is just a variable declaration, and invalid on the face of it. You would be better off to name it 'total' since that is what it represents.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It depends upon the browser. If you are using Firefox with the flash plugin for that, then it will automatically update when you start the browser if necessary. I don't know about IE since I don't use that except to do Windows updates.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming your account is configured to use bash as the shell, then you need to edit ~/.bash_logout

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I've been using Chrome for most of the past year, and generally I like it. It is more stable than FF and others because each tab/window/connection is in a separate process, so if it crashes, only that page is down, not the entire browser. As for speed, the mark 1 eyeball tests tells me that Chrome and Firefox (current versions) are about on par with each other.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Devices are represented in the file system under the /dev directory.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

New motherboards generally support sata drives. Some also have ide ports, but it would not be recommended to use an old/slow ide drive with a new system, given a 2TB 7200 rpm drive is under $100 USD these days.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It depends upon what you want to do. For under $100USD you can get a very good card from nVidia or AMD with 512MB to 1GB of video RAM.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I think that this is going to turn right around and bite apple on the ... Samsung has already sued Apple for violating its own patents, so I can just see Samsung getting the iPad blocked from sales in Europe as well because of patent issues.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, I personally think that Ubuntu peaked at 9.04 and has gone downhill since... :-) Right now I am using Scientific Linux 6 (a clone of RHEL 6 supported by Fermi National Laboratory and CERN) and will be testing 6.1 soon. I have a few (very few) quibbles with it, but for the most part I have been happy using it, and it supports a lot of hardware that older versions of RHEL/CentOS/SL did not. Bear in mind that over the past number of years I have used (actively) Gentoo, Ubuntu, Fedora, RHEL (SL, CentOS), Suse, Debian, Mepis, and other distributions of Linux. None are perfect, but they all share one characteristic - you can tailor/tune all of them to behave as you want. That is not to say it doesn't take some time/work/effort to accomplish that, but it is certainly possible to do so.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. Posting your questions in a clearer manner would be helpful...

1. Demonstrate multi-programming
2. Idle loop

Going in reverse. The idle loop is a no-op process that keeps the CPUs running when they have nothing else to do. It is basically an infinite loop, as in

while (1)
   relinquish_to_whatever_other_process_needs_the_cpu();

As for multiprogramming, there are a number of definitions of this. One is that of multi-tasking - the CPU can handle more than one process at a time, by using time-slicing (allocating some segment of time to each process) to provide even access to the processor resources. Here is a wikipedia article on the subject: http://en.wikipedia.org/wiki/Multiprogramming

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I usually use self-sorting structures so that when an item is added to the list, it is automatically sorted. Getting data out in a sorted manner is then trivial - just walk the list, so to speak.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

My guess is that morecore() is using sbrk() under the covers. In many cases, malloc() implements the allocated heap (locally) as a linked list of allocated parts. When one is freed, then the allocator either merges the freed part with an adjacent free segment in the free list, or it links it into the free list.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Class exercise? At least make a stab at it! In any case, your description of the problem is not complete... What was the purpose of the assignment? Is this a two-part question, or do you need to show each principal in a combined manner?