rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This board may need a driver from the board manufacturer. Check on their web site.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I haven't installed php on an ubuntu system, but have on my redhat, centos, and scientific linux (all RHEL 6.4 based) systems. I needed php 5.5+ and those systems are still at 5.3.3, so I had to install from source.

I am not necessarily saying that you will have to install from source, but php usually brings along a bunch of sub-packages and you may need to uninstall all of them, clean your repository, and then reinstall 5.3.

One note: I needed 5.5+ (I'm running 5.5.4) because I needed the http server option for php (so I could test code without having it connected up to Appache, TomCat, etc) - earlier versions don't support that.

In case you are interested, I used php to build a web-based cell phone emulator! Of course, it can't make calls, but it can browse the web... Why you ask? It is intended for performance testing our cell phone proxy browsers - http servers running in the cloud that handle the actual web page fetching and rendering for cell phones, reducing phone data overhead by as much as 90%. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most laptops will either go into sleep or hibernate mode when the lid is closed. In either case, it will not be listening for network connection requests. You need to alter your power settings so that the system stays operational when the top is closed. It will drain the battery, however; so when you do that, you might want to be sure the laptop is plugged into wall power.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sigh...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

OOP - Object Oriented Programming. There are tonnes of articles and books on the web about this subject. I have also taught advanced topics on the subject to engineers in Fortune 10 companies. As richieking said (in not so many words), ask some relevant questions, and we will try to help you move forward, but first make an effort to at LEAST understand what you are asking! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please post the contents of the htable1 header file.

Also, have you tried to build it debuggable and it run in a debugger? It should show you where it is corrupting memory, or trying to access invalid addresses, which is what your problem is, fundamentally.

P.S. This does't always work since building a block of code for debugging purposes often does stuff that will keep it from crashing where it did before, but it is always a step you should take.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As JorgeM said, HTTP is a higher-level protocol that runs on top of TCP/IP. TCP/IP is mostly layer 2, and HTTP layer 3. IE, HTTP works with, but not in place of, TCP/IP. Anyone can write their own layer-3 protocol that works with TCP/IP - I write them all the time for specialized purposes, such as sending performance data from our 1000's of servers to our Hadoop database in the Amazon cloud. We need such a protocol in order to deal with a number of reliability issues related to the firewalls and load balancers in place between the networks.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, it connects when wiered, but not wireless? I assume that both connection types are using DHCP to get an IP address from the router? As JorgeM said, connect up both ways (you can do that at the same time) and then post the output of "ipconfig /all" here.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Either of these will handle modern video games at very high resolutions and framerates. It then becomes a matter of preference. Myself I prefer nVidia gear, but that is because I run mostly Linux and they have better drivers for Linux currently than AMD. Also, if you want to do some serious math processing, the CUDA cores of the nVidia cards is totally awesome, and they have very good support for programming them.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Bypass the system? Assuming the system doesn't have a BIOS/UEFA security password (or other security) set, including full-disc encryption, then you can boot a live CD/DVD and mount the file systems on the hard drives. If you didn't know this already, then you are an idiot and should leave well-enough alone!

FWIW, all of my systems require an authorized password to boot... Without such, you can't even get into the BIOS to ask to boot from a USB or other external device. IE, steal my laptop or other systems, and you just have a nice bit of hardware to wipe and start over with (and in the case of the laptop, not even that), but you won't get any of my painstakenly crafted code that I have spent years developing, or other personally interesting files... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are a number of good compression tools out there, but remember that better compression usually == more time and other computer resources (memory, CPU, etc). Also, some files, such as mp3 audio files and most video formats are already compressed, so you won't get much reduction in size. Here is an example: a 1.5GB mkv (Mastroika) video file compressed with bzip2 only resulted in a resulting file of, oh yes, 1.004x larger than the input file, and bzip2 is one of the more efficient tools out there... :-)

Now, for text files, executables, shared libraries and other standard OS files, then these tools can result in very significant reductions in size, sometimes to the 90% you are looking for, but again, it all depends upon the original file format.

FWIW, I use gzip when I make a bit image backup of my system drive. It is almost as good as bzip2 (a little less compressed), but it is much more efficient in terms of time to compress the output. So, my 320GB system drive will compress to 10% or less of the drive size so I can easily store multiple copies on my external Sata-II backup drive (2TB).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What sepp2k said is quite correct, but difficult to understand for noobs. Here is possibly a more understandable example:

int anInt = 5;
int* ptrToAnInt = &anInt;

anInt += 2;
printf("anInt and ptrToAnInt == %d (%d)\n", anInt, *ptrToAnInt);

This should result in the output "anInt and ptrToAnInt == 7 (7)".

Clear as mud yet? :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What comes just before the CALCOR(...) prototype and/or function defintion. Also, do you have the prototype before, or after, the function definition? And if the prototype is to be used by other translation units (.C or .CPP files) then it should be declared as "extern" as in extern int16_t CALCOR(float& Voltage);

One final thing - did you define (typedef or #define) int16_t before the function declaration (prototype or definition)?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

GNU has a fortran compiler as part of the GCC compiler suite. I don't know if it is 2008 compliant or not, but it is usally fairly up-to-date. What OS are you running on?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I suppose the answer would be "it depends". I have a car stereo that can play CD's, thumb drives, or other USB devices (iPods, etc). I suspect that the means by which it determines which is is which is a hardware probe (ie, what port is active).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Having used this pattern (with the macro cruft) much in the past, I can say that it is very efficacious, but it is not easy when debugging... :-) However, I give Mike2k a thumbs up for suggesting it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Usually flex and bison are installed by default on Linux systems. Try the commands "which flex" and "which bison" to see if they are already installed.

And to help your education, Lex is short for "Lexical Analyzer", and YACC is short for "Yet Another Compiler Compiler"... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There is a Windows tool built on top of rsync for Windows - DeltaCopy. Here is a link: http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp

It is also open source, so you can modify it to suit if necessary. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume you are using Windows of some sort? Linux has a tool called rsync which can periodically make backup copies of new or changed files, even across the network.

adil.ghori commented: I'm using windows xp and 7 for this purpose. +1
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

An algorithm consists of the steps required to solve a particular problem. Often they are stated in mathematical terms, but that is not required. You can express an algorithm in pseudo code (examples are how to compute fibonacci sequences, etc). One of the classic volumes on the subject is Niklaus Wirth's "Algorithms + Data Structures = Programs". FWIW, Wirth was the inventor of the Pascal and Modula programming languages. He was also the PhD advisor to my friend Bruce Ravenel who was one of the chief architects of the Intel 8086/8087 processor family (now the basis of the x86 processors that most of our non-ARM computers use). Here is a link to the subsequent volume: http://www.amazon.com/Algorithms-Data-Structures-Niklaus-Wirth/dp/0130220051

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

These days, a 10mbps switch is pretty much outdated. Are you sure you don't mean a 10gbps (10 gigabits / second) switch is what you are looking for? Most are at least fast ethernet (100mbps) or gigabit capable. I think my last 10mbps switch was back in the early 1990s...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

That is what our friends Google, Yahoo!, and Bing are for! :-)

JeffGrigg commented: Quite true. +6
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please explain what you want to do with them, except whether or not you can put them both in 1 computer. The answer to that is "of course". One will be the system/boot drive. The other a data drive, unless you instruct the BIOS to boot from the second drive.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume you refer to the title of this post, "parallel algorithms for IP switches"? What have you found with a google or wikipedia search?

FWIW, here are some of the results of my own Google search on exactly those terms:

  1. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.104.2730
  2. http://www.cs.cmu.edu/~dga/15-744/S07/papers/islip-ton.pdf
  3. http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=830007&url=http%3A%2F%2Fieeexplore.ieee.org%2Fiel5%2F6675%2F17966%2F00830007.pdf%3Farnumber%3D830007
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As an interesting side note, here is a recent TED talk about Fibonacci numbers. :-)

http://www.ted.com/talks/arthur_benjamin_the_magic_of_fibonacci_numbers.html

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One of the rpm files in the set that you got will have the gui components for kde, gnome, or other window managers. Installing that rpm will get you where you want to be. I'll have to tell you later when I get home from work what directory they are in in that set you downloaded.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I have a nice set of small, but powerful Bose speakers for my desktop. It also has dual audio inputs so you can connect more than one computer to them at a time. Bose has a reputation for having about the best sound for small speakers available.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The comments that turboscrew put in your code should help. Computing fibonacci sequences is typically done with a recursive algorithm. IE: fib(x) = fib(x-1) + fib(x-2) with x==1 being the limiting factor that causes the loop to terminate. IE, fib(1) == 1, and fib(0) == 0, so fib(2) == 1 (fib(1) + fib(0)), and fib 3 == 2 (fib(2) + fib(1)), and fib(4) == 3 (fib(3) + fib(2)), fib(5) == 5, fib(6) == 8, fib(7) == 13, etc. ad infinitum... :-)

Here is a link to the wikipedia page about fibonacci numbers: http://en.wikipedia.org/wiki/Fibonacci_number

FWIW, stack overflow is not usually an issue with computing fibonacci numbers, but the usual limiting factor is the size of integer you are using. A 32-bit number will overflow after computing fib(24) or thereabouts (I don't remember exactly - my last coding of fibonacci was almost 30 years ago). A 64-bit value will give you a few more iterations before overflowing, although there are arbitrary precision math packages, such as boost, that will overcome this limitation, at a performance price. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume you are taking a C++ programming class? Is this your first programming class? In any case, we don't do your homework for you, but we will help you fix your problems once you have made a reasonable attempt to write the code in the first place.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It's the difference between a 1960's supercar that doesn't run to a Formula One racer that also doesn't run... :-)

IE, one is an old piece of junk, that doesn't run, and the other is a space-age piece of junk, that also doesn't run!

Just my opinion, of course. I know people who love Win8 (I can barely tolerate Win7, but mostly it stays out of my way), and I have heard good things about Windows 8.1...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can certainly download and build the source for the mysql client, or install it directly (not sure about the Mac), but that is only a command-line interface. In any case, you need to log in, although you can script that easily enough, since the mysql client UI supports the --user=username and --password=pswd options.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

OOo (and, in my opinion, better version of LibreOffice) should install a link in your KDE or Gnome UI menu system. Look in the "Applications->Office" menu. If it wasn't installed by default, the RPM files have an RPM to do that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, the Kindle is basically an Android device, though I'm not sure if it supports the Android Store, which probably has something like what you are looking for. FWIW, I have found a bunch of neuroscience dictionaries on Amazon, some of which have Kindle versions. The $64 question is whether or not you can integrate them into the general operation of the device, such as when you are creating/editing a document and need to do spell-checking, etc. Don't know... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Usually we use nslookup for this. The output of "nslookup google.com" returns this:

Server:     68.94.156.1
Address:    68.94.156.1#53

Non-authoritative answer:
Name:   google.com
Address: 173.194.46.64
Name:   google.com
Address: 173.194.46.71
Name:   google.com
Address: 173.194.46.68
Name:   google.com
Address: 173.194.46.73
Name:   google.com
Address: 173.194.46.65
Name:   google.com
Address: 173.194.46.70
Name:   google.com
Address: 173.194.46.69
Name:   google.com
Address: 173.194.46.72
Name:   google.com
Address: 173.194.46.67
Name:   google.com
Address: 173.194.46.78
Name:   google.com
Address: 173.194.46.66

Whereas, "nslookup mail.google.com" returns this:

Server:     68.94.156.1
Address:    68.94.156.1#53

Non-authoritative answer:
mail.google.com canonical name = googlemail.l.google.com.
Name:   googlemail.l.google.com
Address: 173.194.46.86
Name:   googlemail.l.google.com
Address: 173.194.46.85

The "Server:" and subsequent "Address:" block are specific to your ISP. These will vary. The stuff you need is after "Non-authoritative answer:".

FWIW, nslookup is the normally preferred way to look up DNS names and addresses. You can also use it for reverse name lookups by substituting an IP address, such as 173.194.46.85 for "mail.google.com", though often the name bears no resemblance to the original name, especially for google who swaps IP addresses on a second-by-second basis in order to defeat spammers and DDOS (distributed denial-of-service) attacks.

CoolAtt commented: Ok.Thanks.So its Specific to the ISP +2
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Boot just about any Linux Live CD/DVD. Assuming that the disc is the system drive (/dev/sda), you would do this once you have booted the disc and logged in (as root):
[code]
dd if=/dev/zero of=/dev/sda bs=1M
[/code]
This will erase your drive 1MB at a time until it is totally wiped. You can use greater or lesser values for 'bs', but I have found from experience that 1M (1 megabyte == 1024x1024 bytes) is the "sweet spot" for performance on most current gear.

WARNING! This will totally erase the drive, including the partition table and boot record! Use with caution!!!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What is the make/model of the computer + specs (CPU, RAM, Disc). Also, where did you purchase the copy of Ultimate (Win7, right?), and how did you install/upgrade it?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What Lerner said is basically a version of "we don't do your homework for you"... :-( An array can be expressed as a pointer. IE, this

int intarray[10];
int* pIntArray = intarray;

means that you can use pIntArray as an alias for intarray. Still clueless? Read your text books.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Good programmers don't limit themselves to 1 or 2 programming languages. Those who are most employable are those who know a number of them, and can learn more as needed. I started with 8008 assembler, moved to dBaseII, BASIC, C, SQL and PL/SQL (a dialect of ADA), Dibol, C++, back to 8086 assembler, Java, PHP, numerous scripting languages... and I have been working steadily for 30+ years as a software engineer.

That said, Java is in common use these days, especially for mobile applications. Most mobile phones and tablets use Java or Dalvik (Java with a different virtual machine code, but same source code). Everybody where I work is Java competent since it is the basic programming language for our mobile phones (I work for Nokia) and in many of our server applications. C++, Java Script, and PHP are also in common use here.

My advice is to learn C and C++. Those are the foundations for many other languages. I consider Java as C++ with training wheels, and PHP is C++ with just enough differences to drive one to drink! :-) Employers who are considering you for a programming position will look at the C/C++ skills as fundamental, mostly understanding that being competent in them means that you will be able to get "up to speed" in Java and such quickly.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Right. And "I am sleepy when I go to bed" also is obvious, but we need more than that. What do YOU mean by "losing quality"?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We don't do your homework for you... Please make an effort and then post your work/code here. At that point, we will see if you need more help.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Look at the source code for ffmpeg - the universal / Swiss-Army-Knife of video transcoders. They have code to manipulate just about any video format. FYI, avi files are not a standard - they are containers for other formats. The embedded video can be any one of a number of actual formats including mpeg4, etc. Read this article for more information: http://en.wikipedia.org/wiki/Audio_Video_Interleave

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What deceptikon said about main(). All modern compilers will require the int return type unless (in some cases) you tell the compiler you are building legacy (old) code. The old K&R compilers would allow void return type for main(), but no longer (by default).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry - I coded a bug there! :-( Here is corrected code:

public class ObjectArray {
private vector<Object> myObjects;
.
.
.
    public void deleteObjects(int index, int count)
    {
        for(int i = 0, j = myObjects.size(); i < count && index < j; i++, j--)
        {
            myObjects.remove(index);
        }
    }
};

This should (I hope) work better - untested code! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You also likely need a static IP address associated with the domain name. FWIW, 10.0.n.n addresses are not routable externally from your internal network. You will need to create firewall rules to allow certain ports in your router/firewall to be associated with specific hosts inside your network. So, what exactly are you trying to accomplish?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is very "clunky" code. It does not reset the size (last element) of the array. Use a vector<Object> class and then you can simply call the remove(index) method on it, and all the internal bookkeeping will be done for you. IE, this would be your code:

public class ObjectArray {
private vector<Object> myObjects;
.
.
.
    public void deleteObjects(int index, int count)
    {
        if (index < count){
        for(int i = index; i < index + count; i++)
        {
            myObjects.remove(i);
        }
    }
};

However, if you are trying to emulate how C/C++ would deal with a raw array, then this isn't what you want, although with C++ I would STILL use a vector<type> class these days.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Is there a reason why you are using virtual inheritance for Student and Employee? That should only be necessary if you are inheriting from more than one class that has a common root class. This does not appear to be the case; however, that is not likely the cause of your problem.

That said, StaffST is derived from two classes that have a common root, so it should use virtual inheritance so it only has one instance of the root (Person) class. From my cursory view of your other class definitions, none of the others should be so encumbered, although you might want to define Student and Staff to have virtual inheritence of Person just to be clear. Compilers are picky things. BTW, what system/compiler are you using? Not all are standards-compliant... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but we don't do your homework for you... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What make/model of printer do you have?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You really only need one external static IP that is assigned to your office router-gateway. Then you configure the router to forward the appropriate ports for the database to the machine that is your database server. That machine you want to assign a static IP within your unrouted internal subnet.

This is called "tunneling", or sometimes "pinholing". You do want to make sure that your database server is hardened and running iptables to only allow connections from your remote offices, which should also have static IP addresses assigned to their routers so that you can create the appropriate iptables rules.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please post your solution so that others can learn from it! :-)