rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The actual ethernet frame size is 84-1542 octets (bytes) in size. Here is a wikipedia article about it: http://en.wikipedia.org/wiki/Ethernet_frame

The last 12 bytes is taken up with the interframe gap, so the actual data packet, including the CRC is 1530 bytes in length.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, this is a 3-part problem. Solve each separately, and then see if you need to make some changes to make them all work together. Example of a possible issue to bring up with your professor is #2, "when the numbers are put into the array, are the sums of the rows, columns and diagonals equal to each other?". My question is, when examining the semantics of the question, is whether he/she wants to simply know if they are equal, or does he/she want you to make them equal? Very different things, for sure.

So. Problem #1 - remember each number input and check if any have already been input. Problem #2 - well, this goes back to my previous query about the professor's intent. Problem #3. And after reading #3 about the output, I have to assume that the intent is not so much that you make every row/column/diagonal meet the conditions, but just to test if they do.

So, go back to problem #1 - what would you do, taking one input at a time from a user, to populate a 5x5 array. Consider that the array could be defined as such:

int array[5][5];

And then, what would you do as each item is input to see if it has not been input yet? One way is as follows:

// Make sure we initialize the array to known values NOT >=1 OR <= 25
// Zero is good for this case.
int array[5][5] = {{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0}};

// For …
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Are you looking it up by key, or by value? Do you need to handle duplicates? Does it need to be sorted? What is the average tuple (element) size? How many elements will your collection contain? Before days of the STL (Standard Template Library) I implemented a wide variety of C and C++ collections such as maps, multimaps, hashmaps, hash tables, linked lists (single and double link types), sorted linked lists, circular lists, etc. Now, for C++ at least, one would just select the appropriate type of collection from the STL and be done with it. In Java there are generics (template classes) very similar to the collection template classes in C++.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Do we also get your degree when you graduate?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Yes, in theory you can have a zero-size array, but you cannot do anything with it except get its address! And, even though conformant compilers will deal with it, it may actually have no address since it uses no space! My guess is that the compiler simply eliminates it as unneeded code/data. However, you are taking its address in your printf() functions, so I guess in this case, it does give you an address. However, I think that the address of a and b (both on the stack) will be the same... Anyway, this begs the question - why are you doing this?! :rolleyes:

zeroliken commented: completely agree +9
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It may be a clock syncronization problem. Make sure all your systems are getting clock updates using NTP. You can either use an internet NTP server such as NIST, etc, or you can set up a local server on your LAN which will keep all the PC's updated locally, yet it will keep updated from the Internet - allowing a large LAN installation to minimize the amount of NTP traffic going out of the firewalls.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Back in the day when Ethernet was over coax cables, half-duplex was a necessity (the comment about CSMA-CD is appropriate here). That changed with ethernet over twisted pair when you could have separate channels for sending/receiving data. Back then, before ethernet could run over twisted pair, ethernet was not suitable for real-time control systems. Arcnet and Token Ring could be (and were) used for deterministic realtime systems. Once ethernet was running on full-duplex switched gear, it became capable of real time (deterministic) behavior, so now it is ubiquitous in industrial control systems which previously would have been interconnected via alternative means.

silvercats commented: thanks,good info +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A VPN is the usual way, although if your bandwidth needs are great, you might be better off leasing dedicated bandwidth on the fiber optic cables between point A and B. My company (a tier-one mobile phone manufacturer) has data centers in a number of places all over the world. We have that sort of dedicated "pipe" between our various data centers so we can easily shift load from one to another as necessary. Our major data centers are in the US, Great Britain, Singapore, and China, and more regional ones in India, South America, and elsewhere (not sure where they all are). These are multi-gigabit links. So, depending upon the day and time, a phone user in Brazil that wants to browse their Facebook account may be connected to a data center in any of those locations. To the user, there is a small delta in latency, but overall the end-to-end time is very close to the same.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. I think your logic for push() and pop() is somewhat inverted. In push(), you set the top of the stack to the new element (S(top) = item), and then you set top to the previous entry (top = top + 1). Why line 11 in main() is generating the error (push(s, 5), I am not sure. Let me think on all of this some more, and review my old ADA texts... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Beginning with L7Sqr's comment, there are a lot of resources out there, including the source code for GCC/glibc and other compilers/libraries out there that implement malloc/free which you can study to help understand what is going on. I did a considerable amount of research back in the 1990's into memory management functions and generic garbage collectors. This is not simple, but it is doable.

  1. You need to get memory from the operating system heap. Traditionally the brk()/sbrk() system calls do this.
  2. You need to determine a method of tracking where memory that malloc provides is located.
  3. You need to be able to merge freed memory segments as necessary.
  4. You need to have a method to provide a suitably sized chunk of memory to the user program when asked with malloc(), from the free store you have available.
  5. If a big enough chunk of memory is not available, then you need to know how to ask the operating system to give you more, if available, and tack that onto your free store.
  6. etc. etc... :-)

Remember, Google is your friend! :-) And good luck! FWIW, this is a GREAT assignment! It will teach you a lot by the time you are done!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I am a performance engineer for a tier one mobile phone manufacturer in their web browser division. We run virtual mozilla browsers to fetch, process, render, and scale web pages for our users' mobile phones - millions of users all over the world. This situation (slowdown during peak hours) is not uncommon, and has many contributing causes, from the capacity of the phone company (carrier), to our capacity to process the users' requests efficiently, to the capacity of the web sites being accessed. Needless to say, Facebook, Twitter, and Google are those with the biggest loads (and pipes/capacity). But, all things have their limits! That is why we are studying ways to cache those most commonly accessed pages during busy hours so we can provide our users with the snappiest performance possible. We monitor latencies (time to get service and relevant data) at all links in the chain, from the handset to the carrier, to our data centers, to the target web sites, between our server components, and back to the handset, and we exert a LOT of effort to improve the experience continuously.

So, I think my point is, is that there is no simple answer here. Peak times == peak loads == slowest performance. That's just the way it is, unfortunately... :-( Sorry, but our quantum tunneling, time compression technology is just not yet ready for prime (or any other) time! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It would depend upon the GPS device that you have. Some may support installation of a SIM, others a USB cellular modem, and others perhaps neither. In any case, if your GPS device does not support some variety of external communication service, you are SOL.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Java, python, ruby, javascript. Those are the hot buttons right now. That will change, of course, but having those skills will help with job acquisition.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How you do it depends upon whether you just need serial input/output, or if you need some random access to the data. If you need random access to the data, then as Ancient Dragon said, you need support for files >4GB (maximum a 32-bit offset can handle. Current Linux systems support access to very large files, for both 32-bit and 64-bit systems by defining the type fpos_t appropriately.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You pointed the pointer (sic) to an external variable, which won't go out of scope until the translation unit (source file) terminates. The variable itself will terminate when the function is finished, but the external variable glb1 will retain the value you set inside the call fnCall2().

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you don't have root access, an administrator's account, and are not in the sudoers list (/etc/sudoers) then you are not out of luck, but you are going to need to do several things to get access to the other 130GB of disc space. To do that you will need to

  1. Boot with a live or rescue CD/DVD/USB drive.
  2. Login as root.
  3. Edit the drive partition table with the fdisk command (fdisk /dev/sda) and create a new linux partition.
  4. Create a file system on that partition, such as ext3 or ext4, and give it a label such as "newdata-1".
  5. Mount the system root file system in a temporary location that you create, such as /mnt/oldroot.
  6. Create a mountpoint for your file system in /mnt/oldroot/mnt, such as /mnt/oldroot/mnt/newdata.
  7. Set the permissions on /mnt/oldroot/mnt/newdata to allow users and others full access, as in "chmod ugo+rwx /mnt/oldroot/mnt/newdata"
  8. Edit the file /mnt/oldroot/etc/fstab and add the new file system mount information, such as
LABEL=newdata-1 /mnt/newdata ext4 defaults 1 2

You might want to edit /mnt/oldroot/etc/sudoers and add yourself with all permissions so you can switch to root without knowing the root password. Then you can change the root password and become the new sysadmin. I assume that you have permission/authority to do all this? Anyway, at this point, you can reboot to the system hard drive and you should be in business. You can then create a link in your home directory to /mnt/newdata and drop whatever you want in there.

zeroliken commented: nice +9
mike_2000_17 commented: Very cool! Is that what they call kung-funix? +13
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And I have NO idea what it costs the company! Bear in mind that we are a tier-one mobile phone manufacturer with 100,000+ employees. Compared to my salary, the system is chump change (probably about a week of what I earn).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Gaming-oriented computers tend to have high-end processors, video chip sets, and lots of memory. These are good things if you want a high-end development system. This is kind of what my company provides its software engineers for their laptops, a system with:

  1. An Intel i7 dual core 3.2GHz hyperthreaded CPU
  2. 8GB RAM
  3. Dual Intel/nVidia graphics processors
  4. 320GB HD
  5. 17" 1920x1080 full 1080p HD display

If I were playing games, this would be a really great system. However, since I do major software development on it, running cell phone emulators, multiple Linux virtual machines, and a load of office automation/communication tools, games are not on the menu (except maybe for an occasional Angry Birds session to work out frustrations!).

FWIW, this is a Lenovo laptop.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, you would like us to solve your homework for you? Do we get your degree when you are finished with school? Make an effort to solve this on your own first, and then we might think about helping you!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I use an X-Windows editor for Linux or Cygwin on Windows called nedit. On Windows I use notepad++. The nedit editor will match braces very nicely, and will, if you want, auto-indent everything for you, as well as auto-indent as you type in code. It knows about many programming languages, and will deal with each appropriately - everything from Ada to Yacc, and most stuff in between such as Java, Python, Perl, Make, Matlab, Verilog... It was originally written by a staff member of the Fermi National Accelerator Lab computing division, but has been released into the open source community and is now hosted on SourceForge.net.

zeroliken commented: Thank you +9
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I'd rewrite your signature line to

"Work delivers us from the three great evils: boredom, boredom, boredom. The money work earns delivers us two great benefits: practicing our vices, and fulfilling our wants."

- Rubberman

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, I would still recommend the nVidia drivers. They generally are a generation ahead of the system vendor's version.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As some hippie-era comic character once said, just keep on truckin'! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Remember, with recursion, just as with loops, you need a terminating condition that will ALWAYS be reached (unless you want an endless loop), which we sometimes call a barrier condition. You need to test for when you reach a value less than 10, so change your code for D(int) to something like this:

static int D(int n) 
    {
        if (n < 10)
        {
            return 0;
        }
        return (D(n - 10) + n);
    }
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A modem requires a "powered" usb port. Some only provide enough juice for things like thumb drives, but many laptops only provide 1 port with enough power for things like broadband modems, etc.

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

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

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

Well, the first error is this, the declaration of BST::InsertRecursive: BSTNode * BST::InsertRecursive(std::string * str, BSTNode * n) in that you are calling it with a const string& (reference), yet the function is defined to tak a non-const string pointer... No go. Realize that C++ is VERY strict in type usage. Also, I don't know if the root argument passed for the second argument, defined as a BSTNode* is a pointer or something else.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

G6 - smaller screen and less disc space. However, you don't mention what the screen resolution is on either system, nor do you mention the weight. Besides the screen, disc, and weight, these are pretty comparable systems. So, you need to decide what is more important to you. FWIW, my personal laptop is a 15" Dell (4 years old) w/ hi-res display, 4GB RAM, bluetooth, wifi (a/b/g) and 250GB disc. My company-provided laptop is a Lenovo (new) w/ 17" higher-res display, 8GB RAM, processor of same speed and cores as my Dell, bluetooth, WiFi (a/b/g/n), and 250GB disc. My Dell is lighter, and other than the display is equivalent to the company Lenovo. If I am travelling, the weight of the Dell may be the winner. If I need the highest performance/memory and display resolution/size, then the Lenovo is the winner. In the final analysis, you have to decide what is most important to you. In your case, I suspect you will be happy with either. If all other things are equal, go with the lighter system to haul around. If you are going to use it as a desktop replacement, then in either case get a docking bay and external monitor (24"), usb keyboard and mouse. Then you get the best of both worlds!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can start an ISP service small - a late friend of mine did that in his little town in central Massachusetts, where there was no DSL or cable internet - only dial-up. I think he started with a T1 or fractional T3, and worked out something with the local phone company or cable provider to provide DSL or cable modem services to their customers. His customers included the local schools, library, and the general public.

So, you need the means for people to connect to you, enough bandwidth to handle them (maximum bandwidth / customer != actual bandwidth experienced - make that clear in the user agreements), a DNS and dhcp server, a block of routable IP addresses that can be assigned via the dhcp server. It may be possible to use NAT so that the IP addresses are not routable from the internet, but then if they have their own internal network they would be going through two or more NATs to get on the Internet.

As for an email server, let them use services such as gmail. No one uses their ISP mail any more, or they don't if they are smart. Web browsing server? Why? Are you going to provide hosting services? Finally, you will need a good router/switch. Unless you are hosting servers for your customers, you probably only need 2 router/switches - the primary and a backup.

For power, definitely a heavy-duty UPS is appropriate, and a backup generator (gas powered) …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Yes. Because, since you are discussing best practices, when you test the return code from scanf() you will find all values were not entered and handle the improper input. You do advocate always testing the return values from all functions, don't you? :icon_wink:

Absofragginglutely!

WaltP commented: :-D +17
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. Some comments first (remembering the KISS principal):

1. Initialize ALL variables to sane values (if only 0 or NULL) when you declare them.
2. Be orthogonal in your branches. IE, keep things that are related to yyyy/yyyy2 in the yyyy/yyyy2 branches, the things that are related to mm/mm2 in theirs, and the things related to dd/dd2 in theirs. I'll show what I mean below.
3. Validate ALL input. IE, make sure that the input for month, day, and year are sane, in that the month MUST be >= 1 and <= 12, and use an array for the number of days in a month to validate that. The only glitch here is dealing with leap years, which you do not deal with. As for years, have a valid range of them, and DO check for leap years. There are good algorithms for computing them - including in Wikipedia, so I won't elaborate here. Consider it a study assignment! :-)

Ok, here is what I think would be better:

/*
  Program assignment name: 2_Dates

  Author:Christopher D*****
*/

#include <stdio.h>

int main (void)
{ 
   int mm = 0, dd = 0, yyyy = 0, mm2 = 0, dd2 = 0, yyyy2 = 0;
   
   printf("Enter first date (mm/dd/yyyy): "); 
   scanf("%d /%d /%d", &mm, &dd, &yyyy); 

/* Validate mm, dd, yyyy here. */

   printf("Enter second date (mm/dd/yyyy): "); 
   scanf("%d /%d /%d", &mm2, &dd2, &yyyy2); 

/* Validate mm2, dd2, yyyy2 here. */

   if (yyyy < yyyy2)
   {
      printf("%2d/%2d/%4d is …
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And in case you are wondering why we have so much computer gear? I am a software systems engineer and my wife is a particle physicist. Besides science and technology, our other main love is music - listening and performing. The only thing we have in our house that outnumber and outweigh our tech gear are our musical instruments, most of which we play on a semi-regular basis - guitars from steel dobro to classical to Mexican folk, mandolins from my 100+ year old Gibson that I play bluegrass on to modern ones made with exotic woods, fiddles, a Veracruz harp, 2 bass fiddles, a big collection of ukuleles, banjos, drums, and who knows what else!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Thanks.Is "Prentice Hall - Computer Networks by Tanenbaum" a good one?That is what I am reading currently and I got these questions when I was reading it. So far it didn't explain those stuff yet,just about how protocols work,not where do they actually live stuff .

Tanenbaum is very good. He knows his stuff and writes very well. I am an engineering geek, so I go for the thicker books that are heavy with content. Comer and Stevens are much more thorough, but the Tanenbaum book is a great starting point for you. I don't have that book in my collection, but I have had a sit-down with it at some point. He has written some other very decent computer books. His "Modern Operating Systems", and "Operating Systems Design and Implementation" are excellent. I think I have that last one, but it seems to be hiding from me. One of these days I need to catalog all of my books... Heck, I even have a hand-written set of Feynman's physics class notes for the lectures he gave at CalTech. I inherited them from my father who was a colleague and good friend of his. They have since been reprinted a number of times and are very popular. My home office is in the basement and is in need of a good cleaning. If a mouse got in here, it would starve to death before it found its way out of the maze!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Silvercats, you are asking a lot of really good questions, and it is obvious that you are trying to understand this stuff. It's an investment, but there are some really good books you should have if you want to pursue this subject more thoroughly. I recommend the following (classics in their own right):

Internetworking with TCP/IP by Comer and Stevens, volumes 1 and 2, published by Prentice-Hall. You can get them from Amazon.com. Volume one is "Principles, Protocols, and Architecture", and volume two is "Design, Implementation, and Internals". Start with volume one, and if you are interested in the actual C programming implementation such as used by Unix and Linux, then get volume two later. There is a third volume on application programming, but that can wait unless you are ready for some serious socket programming. The DDN Handbook is strictly for engineers who have to implement this stuff from scratch. And yes, all of these books have places of honor on my 10' x 6' book-wall.

I also have the entire X-Windows set (2 ft of shelf space), two versions of the Java Virtual Machine Specification, the entire distributed database transaction multi-phase commit engineering standard, the ISO C++ Standard document/book. a raft of stuff on neural network and fuzzy logic programming, and of course all of Codd and Date's works on relational database theory (a field I am considered something of an expert in, having taught it at the graduate level). I have been building this library …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Anyway, to answer your 9 questions directly:

1.is it a software(I think it has to be)?
Generally yes. There are implementations of the core stack in firmware on some network boards (NICs).

2.Is it a BIOS level software?
No. The core protocols generally are kernel drivers.

3.Where is the protocol set installed in a computer?(Windows,linux,mac etc..)
Generally, the core protocols are kernel-level drivers for efficiency. Some protocols such as SSH, TELNET, and FTP are dynamically loaded when needed. There is a daemon on Linux/Unix systems called inetd (or xinetd - more current) which will start the SSH, TELNET, FTP, or other servers when a connection is made by the appropriate kind of client.

4.Can we uninstall it like normal software?
Not easily. Practically all networking today is built upon the TCP/IP protocol stack.

5.Can we update it?
Yes.

6.Where do routers and modems have that tcp/ip stack(protocol set)?
Incomplete question. Trying to read into your question, most routers run some sort of embedded Linux software, and the TCP/IP stack are kernel drivers. You can configure a kernel to build the protocols out of the kernel, but then you'd effectively have no networking at all.

7.In which language is it written?
Generally in C. Linux kernels are written almost entirely in C.

8.Will we ever get an update?
Often. When drivers are updated for Windows systems, or when the kernel is updated in Linux/Unix systems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The full specification for the entire TCP/IP protocol suite takes up almost a linear foot of shelf space, is published by the US Department of Defense, and is called "The DDN Protocol Handbook". The DDN stands for Defense Department Network. Because the covers are white, it is sometimes known as "The White Book". From the detailed specifications it contains, it is possible to implement part or all of the TCP/IP protocol suite without recourse to other software. I and a colleague implemented the core TCP/IP functions (in C) for a real-time operating system back in the early 90's because we were contracted to deliver an automated electronics manufacturing line to the US Navy's RAMP project that used the OS, and they required that it could communicate to other TCP/IP network nodes such as control and monitoring systems that were running Unix. I spent a lot of time on a stool in front of a workstation in the middle of a HUGE warehouse structure in Charleston, South Carolina for that gig! But, we delivered and now the US Navy can fix its ships in a fraction of the time it used to take. In case you are interested, RAMP stands for Rapid Acquisition of Manufactured Parts. When a battleship is in drydock, they can't just order most of their gear out of a catalog. Most is manufactured on the spot, to order, including propellers, drive shafts, radar and sonar electronics, etc.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You could use message queues, or shared memory. A class static variable or translation unit static variable could also be used. In any case, there are a lot of ways around this barn, and which may be best for you depends upon a lot of factors, including concurrency, efficiency, and latency.

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

Means unless we are updating or modifying something there is no need to make such methods synchronous?

As long as you are only using local, and not static or global variables in your method, you should be fine. As we have stated however, the storeUser() method should either be synchronous, or a lock applied to the data store. If the storeUser() method does a lot and being synchronous could introduce unnecessary latencies, then use a lock only for access to the data store.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Why use VS to do this? The Intel compiler tools don't really need to be run from there. Myself, coming from a Unix background, prefer a good editor (VS will do that just fine) and make files. Have you looked into the Intel compiler tool documentation to see if it supports VS? If not, what about Eclipse?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you gone to the Matlab web site yet? They have a lot of good documentation, as well as user forums to interact with. In any case, you need the Matlab Builder NE package that provides .NET support for Matlab. I just registered on the site and was able to access the documentation for this. Here is the product overview for Builder NE:


MATLAB Compiler Extension
MATLAB® Builder™ NE lets you create .NET and COM components from MATLAB® programs that include MATLAB math and graphics, and GUIs developed with MATLAB. You can integrate these components into larger .NET, COM, and Web applications and deploy them royalty-free to computers that do not have MATLAB installed.

Using MATLAB® Compiler™, MATLAB Builder NE encrypts your MATLAB programs and then generates .NET or COM wrappers around them so that they can be accessed just like native .NET and COM components.

The builder converts MATLAB functions to .NET methods that encapsulate MATLAB code written by the MATLAB programmer. All MATLAB code to be compiled must take the form of a function. Each MATLAB Builder NE component contains one or more classes, each providing an interface to the MATLAB functions in the MATLAB code.

When you package and distribute the application to your users, you include supporting files generated by the builder as well as the MATLAB Compiler Runtime (MCR). For more information about the MCR, see Installing the MATLAB Compiler Runtime (MCR) in the MATLAB Compiler documentation.

For more information about how …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

1. Test that the incoming node** q argument is not null.
2. Test that after assigning *q to cur, that cur is not null.
3. Test that the data element in the nodes you are comparing is not null.
4. Simplify, simplify, simplify.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please be more explicit as to what this code is supposed to be doing, and what the error is.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Once a system is compromised and an attacker has admin access to your system, there is literally nothing they cannot do. As for what you call "random code", I think you refer to what we know as Captchas. They can certainly mirror or redirect your web pages and then "solve" the question. If this were a banking application, for example, it would allow them to access your bank account, and $$, while appearing to be you for all intents and purposes.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, if you are interested, 50! == 30414093201713378043612608166064768844377641568960512000000000000
and 100! == 9.332621544e+157, or 9,332,621,544 with 148 extra zeros tacked onto the end.

frogboy77 commented: 93326215443944152681699238856266700490715968264381621468592963895217599993229915 608941463976156518286253697920827223758251185210916864000000000000000000000000 +6
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you want to eliminate an entry that is only spaces, then try this:

^[ ]*$
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The structure and syntax of PHP and C++ are very similar. Myself, if I were already proficient in PHP, then C++ won't be that difficult to learn, and more useful than Python if you want to get into systems programming. Python is a great tool for building utilities, but for the really heavy lifting, C++ is, IMHO, hands-down a better choice.

Fbody commented: Would have said the same thing, but I don't know Python. +13
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well if you have a array of 100000 doubles it would only need about 8mb of ram so I'm not sure why you wouldn't be able to create an array of 10000 elements unless they use a lot of memory. What is the error that you are getting and what compiler/IDE are you using?

Actually, an array 100000 doubles would take less than 1MB (800KB @ 8bytes / double).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Simple enough.

1) Reinstall the Windows MBR (master boot record).
2) Use fdisk to remove the Linux partition.
3) Use the Windows disk manager to merge the partitions.

Since this will change the system signature pretty significantly, Windows will have to re-authenticate itself with Microsoft on the next boot.

Narinder Bamrah commented: Very Good +0