rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ignorance is bliss...

We were doing continuous integration back in the 1990's where CVS was our source repository. Code that was released into production would automatically be checked out by our make files when system tests were run. Errors in a module would cause it to be pushed back into a development state and dropped back on the "desk" of the developer with a full report of the errors. This rarely happened if the developer had done proper unit tests. If they didn't, they would hear from me, LOUDLY! :-) Of course, sometimes a module that had significant changes would pass unit tests, but cause side-effects that would result in a system regression failure. I would not yell at them in such a case, but work with them to improve their unit tests to cover such conditions.

Some time later, we moved to ClearCase for version control, and incorporated the same methods we used with CVS. Because our make files were very modular, only a couple needed to be altered to work with ClearCase instead of CVS. This was before SVN and LONG before git.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What Moschops said. The call to strdup() is equalevent to malloc(strlen+1)+strcpy. It does the allocation and copy, so it does 2 things: reduce code by one function, and deals with proper string length computations - it may also incorporate other optimizations. Who said it was "evil"? Whoever it was is ignorant and does not understand how it works. Just my (not so) humble opinion. And FWIW, I have been professionally programming C for over 30 years, and C++ for over 20 years, and that includes a patent in adaptive systems engineering plus invited papers at a number of major international software engineering conferences.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. send_string() is not a standard C function unless this is a Windows system, in which case I don't know about it.
  2. Obviously you are trying to control a PIC and UART(s). Most of your code are either defined elsewhere, are macros, or who knows. IE, there is not enough information to help you.
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Good luck. I am done with this thread since you don't seem to be listening to me. I have over 15 years experience with Linux, including kernel module development, and kernel enhancement development and building. It is not uncommon for me to reconfigure a kernel and build/install it from scratch. That's the easy part. Again, good luck, and goodbye.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@danibootstrap - NO YOU CANNOT JUST MODIFY THE IOCTL CALL! This is what I've been trying to tell you. Ioctl is just a user-space function that sends messages to the appropriate kernel module. Changing ioctl will gain you nothing, nada, zip, zero... If you need to do what you say, and there are no means to set to set the GPIOs, then you need to get into kernel module programming, which is a pretty steep learning curve.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Safe mode disables some services (optional ones mostly) that may be causing problems when running in normal mode. FWIW, you do NOT want to always run in safe mode. Have you looked in add/remove programs in the control panel? Also, what version of Windows are you running, and have you tried booting the recovery partition and use that to fix what it may think is wrong?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

(Somewhat sarcastically), have you tried installing Linux on the system? :-) Sorry, but I couldn't help myself! I think Win7 was the last decent Windows distribution.

gyno commented: will be interested in the world of Linux,so help me wit info or links +2
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume you have tried Powerpoint. What about Libre Office (the latest version)? It handles MS Office cruft much better than Open Office does.

Anyway, the pertinent question is why did this happen? Do you have a disc that is starting to fail? Have you run disc analysis and recovery tools on it? What about viruses?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Using the Gregorian calendar for date computations is just so stupid! Any rational date class will use Julian dates (a floating point representation of date + time) which can be used easily in date arithmetic and provide accurate answers, even accounting for leap years, and if done right, leap seconds. No wonder I hate Java and Android (Dalvik)! I like Android devices (I have 3 Android phones, including a Nexus One), but programming them is brain-dead!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What do you mean by "adobe virus"? Yes, there are vulnerabilities in Adobe software, as there are in all software, though their Flash video player is one of the most exploited since so many people and tools are reliant on it. Is that what you mean? Do be more explicit.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You don't need to know where the ioctl function is defined, but just in case you have to know, this is from the stackoverflow forums: "The C library exports the functions, but they are just wrappers for sys calls. The actual socket functions themselves are implemented inside the kernel."

You will need to modify the kernel module source code for the particular ioctl sub-function. IE, you need to start studying up on this stuff because it isn't trivial and you need to get it right, including how the I/O sys_* functions work. Honestly, I don't have the time to teach an entire kernel I/O development course here, and you don't have the $$ to pay me. You can find a lot of stuff on the kernel.org and tldp.org web sites that will get you started.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Other comments. The signature of fun() is this: int16_t fun(char* iaddr); However, you never return anything from the function, which is what the int rc is intended for. Also, you should initialize rc to a sane value when you declare it. Next, the iaddr argument should be a const char* and not a char*. Finally, you can use strdup() instead of malloc()+strcpy() which will take care of the terminating null properly for you.

Moschops is 100% in that once you change the pointer p with p++ it is no longer pointing at an address that free will work with. You need to assign p to another pointer first, and then free that one. To avoid all of this, you can use alloca() + strcpy() which will allocate your memory on the stack, which will automatically cleaned up when the function terminates and the stack unwinds. One major advantage of that is that you don't need to use free().

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If it is on the MB, then it is likely stored in the BIOS flash area. There are tools on the web that can read that data, but it may be encrypted as well, in which case you are SOL.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I don't think this is a repository problem, but a DNS problem since the system cannot resolve ftp.us.debian.org. What happens when you try to ping that, or use nslookup to find it?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I'm not 100% positive, but I think that the active (always on) cooling will only be activated if the device is plugged into mains power - not using the battery.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The version of Linux has zip to do with where the ioctl() function is defined. It is a C function that runs in user space, but sends messages and data to kernel modules. A particular ioctl sub-function will be defined in a kernel module. As I said before, if you want to add another ioctl sub-function to a module, you have to modify the module's source code and rebuild it. If the module is loadable, then that's all you need to do - create a new .ko file and use the insmod system command as user root to load it into kernel memory. If the module is built into the kernel, then you will have to rebuild the entire kernel and install that. Depending upon how many CPU cores and how much RAM your system has, that can take (to build the entire kernel) anywhere from 15 minutes to several hours. On my 8 core system with 8GB of RAM, doing a parallel rebuild my RedHat Enterprise System clone (Scientific Linux) kernel takes 15-20 minutes. If I don't use 8 cores with a parallel build, but just one (the default for the make command), it takes about 2 hours. The speedup is pretty much linear with the number of cores you use with the -j (jobs) option to make. IE: make -j 8 or --jobs=8 will use 8 cores to build the kernel.

FWIW, the ioctl() function is declared in /usr/include/bits/ioctl-types.h and the function signature is this: extern int ioctl …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Are you sure it isn't using the same product key that your old Windows OS used? Have you looked in the registry?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You may be right Jim. If you were running Linux, I could help you PDQ. I think there are Windows tools and management applications that can tell you what applications are using what devices, but I don't remember offhand. Sorry! :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@Nick - you may be right. I don't think it is the drivers, but this application. If you go to the add/remove software page, can you remove this application? If you do, does it also remove the drivers?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The fact that it can shut down properly about 1x out of 5 (20% of the time) tells me that this is probably not a driver problem, but some process or other service that is out of control. Look at the services running and see if there are any that look suspicious. Another alternative is that you have a virus which is causing this problem. What A/V software are you using?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Write the code. Post it here if you have problems or errors. Then we may help you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You may want to contact Adobe tech support for help with this.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

IOCTL is short for IO Control. It is a means to send messages and commands to the system kernel. If you want to add messages to a particular IOCTL then you will have to modify the kernel or kernel module sources and rebuild and reinstall it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What C++ graphics API's are you using?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

To become a creative programmer you first need to get basic programming skills, and then learn how to "think outside of the box". As Thomas Edison once said, invention is 10% inspiration and 90% perspiration. I had an idea years ago on how one could extend classes, both structures and methods, without programming. It took 5 years of thinking and working on it before I was able to work it out. I now have a US Patent for adaptive systems software for that work and it is utilized in software that runs many semiconductor, display, and disc drive plants all over the world!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We don't do your homework for you. Make an effort to solve this simple problem and post your code here. Try working it out on paper first.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to use sane/xsane to scan directly to a file in Linux. That is separate from the CUPS printer driver. I assume that the HPLIP program uses CUPS for actual printer output. I use xsane to scan with my Epson scanner.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Do we get your degree when you graduate?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Huh? Mayan math is not my forte. You might want to contact someone at the National Anthropoligal Museum in Mexico City about this.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you considered that the blockage may originate at the site? Daycare centers have to be careful about who has access to their video feeds. Contact them to find out. If you have a legitimate reason to access the feed, they should be able to allow it (maybe).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If the argument to Fun ()is a reference and not a copy, then that should also work.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We don't do your homework for you. Read the terms of service for these forums. Make an effort and post your code here along with any errors or problems you are having.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One suggestion would be to use the SQL command line and do a query that outputs the data in CSV format. Then you can easily load that into Excel.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to show us the actual errors that you are getting.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It probably isn't Deep Freeze but more likely a hardware problem such as a failing memory chip.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show the actual errors that the linker is generating please.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Come on folks! This thread is over a year old! Start a new one, please!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It depends. Some seem to indicate the percentage of the CPU that the process is using. Others will indicate what percentage of cache hits don't find the data needed in the cache and so require reloading the data from memory (ram). You might want to read the man page for perf-stat for more information.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A USB cable that is more than 10 feet long (3+ meters) is going to be dicey at best. The fact that it worked with your old WiFi gear was luck. 5 meters (15 feet) is already getting to the limits of the tech for unaugmented (non-active) cables.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A VPN is a network connection to a remote network. It will only route traffic that is pointed to endpoints in that remote network. IE, most stuff will not be so routed. IE, if 192.168.1.101 is an endpoint on the remote network that has a web server, then the browser if pointed to that address will use the VPN.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Lots of good answers here! In this particular example, const is not required, but may, as indicated by others, allow the compiler to utilize some optimizations which may (or may not) help performance.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Glad you figured it out. This is very basic Java/C++/C# coding. The type of variable that is passed to an overloaded function (which f1() is) will determine which instance of the function is invoked. Since you passed a double (x1), it invoked public static double f1( double m1 ) and not the integer version.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming perf top is single threaded, then it has to go through the process table linearly, and it may have then found that ComputeDotProduct_ref had reduced its CPU load in the interim, hence listing it again. These tools aren't "exact science", but are for general monitoring purposes. IE, the results will change significantly (usually) from run to run.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I heard back (by phone none the less) from LanGuardian (netfort.com) and their system runs on RedHat based Linux systems such as CentOS, currently at 6.4, though I imagine it will work just fine with 6.6 (the latest 6.x release). I asked about 7.1 support and they will get back to me with that information. If you want to run it under Windows, you will need to install CentOS in a virtual machine such as VMware or VirtualBox.

My guess is that LanGuardian uses pcap to capture packets in promiscuous mode, and then proprietary software to analyze them (source, destination, content, etc).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I have sent them (NetFort) a request for information as to what platforms they support for hosting servers - Windows-only, or Linux as well since that information is not obviously available on their web site. It is quite pricey - $30USD / year / user. So if you have 500 users, you are looking at a $15,000 / year bill for licensing fees. I will look into open source tools that will effectively do the same and report back here.

This site has some interesting links for bandwidth monitoring tools: http://dynacont.net/documentation/linux/network_monitoring/

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried this and seen what it does? That will likely give you a clue.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Note the terms of service for Daniweb. We don't do your homework for you. Make an effort, post your code, and then we may decide to help. Otherwise, don't ask us to help you cheat!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Adobe cruft is not Linux-oriented, though you might be able to use their Creative Cloud versions on Linux via an appropriate Web browser. I haven't tried that, but it may be possible. I worked for Adobe for awhile, but I ran everyting on Windows 7. Never tried it on Linux.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Are you sure you are adding the .jar file to a directory where Eclipse can find it? Have you tried using the precise location in the Eclipse configuration for the ODCB file?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You aren't providing enough information. In any case, why are you conflating queues with a binary tree? A binary tree is only equivalent to a queue when the tree is degenerate. IE, there are no branches, which can happen if you insert data that is already sorted, which is why we have B+, AVL, and Black/White trees, to rebalance the tree automatically on insertion and removal.