rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, nobody here is going to analyze 5000+ lines of binary dump code. The first post indicating that a signal 11 (segfault) caused this problem is helpful. It means that the PHP code is either overwriting memory in the wrong places, or has run out of stack space, or has tried to access/write a null pointer.

So, is this PHP code something you wrote, or got from elsewhere?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How are they connected. Also, are they routers, switches, or WiFi access points? If they are all routers, what are their base addresses?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And yes, we had images of the employees stored in the database so they were displayed on the terminal when they clocked in/out and security could verify there were the right person and not someone else substituting for them (not uncommon). FWIW, that was one of the most high-tech stainless steel plants in the country.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I had to write barcode scanning and decoding software back in the mid-1980's so our customers could use barcode scanners to log in/out workers from the plant (a major steel manufacturer). I had to research all of that so that the software could store the data (login/logout times) into the database for each employee. It was a LOT faster than the old way of punching in/out of a timeclock. The company liked it. The employees liked it. Win-win all around. This isn't rocket science, but you need to do your research first.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is when I drop back to C and use realloc() - much easier and sets errno appropriately if you run out of heap (returning NULL for the result of the call). No copying necessary - realloc() will allocate the new memory and copy data as necessary. Programming C++ doesn't mean you have to ignore C. Use the proper tool for the job!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Just to confuse you (bumfuzzle you) a bit, there are also multi-maps... Maps with duplicate keys for one or more values. Here is the cplusplus.com page on them: http://www.cplusplus.com/reference/map/multimap/
Myself, I try to keep away from them - FAR away! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You'll do ok Kasis if you remember that you can find most of your answers on the Internet. Post here when you are totally bumfuzzled (confused). We will be happy to help then.

FWIW, a map is a collection of key/value pairs that is indexed on the key. A hash-map is a map where the keys are hash values of something, possibly the value, but not necessarily. In any case a map consists of unique keys - duplicate keys are not allowed, although duplicate values are allowed if necessary.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, all things considered, it seems that there is progress going on here. Keep us informed about your overall progress it@61... BTW, can't you just use a more user-friendly handle? :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Under the covers, all Java objects are references. When you assign one variable to another, the reference is copied, not the object's data. At that point, both variables hold a valid reference to the the object and the actual object data cannot be garbage-collected until both variables are cleared (set to NULL or another object reference). This is one reason why "dangling references" are such a problem in Java as well as C++. Caveat programmer!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry. No luck so far. I'll try again later. And I am using Mint 18. Didn't try the Jack audio though. Have a bad cold right now so that's as much as I can do for the moment.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Great question! I would think that the output to your speakers should work ok. Have you tried? Ok. I'm going to try my microphone as an input device like are using your cassette player. Hold on a few minutes.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. You have a question? Tell us something we don't already know...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I think ClamAV/ClamWin have such api's. The key thing is that you need a signature for the virus you are scanning for. All A/V tools such as Clam have large databases of virus signatures that they scan for. I suggest Clam because it is fully open source and free.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, please provide as much code as you can.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please show your altered code with the while() loop. One issue with your original code (which is what I assume you are showing here) is that it is infinitely recursive until "quit" is input. Eventually your stack will blow up. I suppose that is why you want a while() loop instead?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I am having trouble actually comprehending the syntax, for some reason I also have trouble applying what we are learning in our text book to the problems that we are assigned.

Class::attributes::methods. For classes, think about things, like cars, animals, etc. For attributes, think about the things that make up those classes, like (for cars) wheels, motor, brakes, seats, transmission, etc. For methods, think about the actions your class can respond to. Again to the car analogy: int shiftGear(int what_gear = 0 / 0 == neutral /) virtual; Getting into virtual methods is another subject, but you need to be aware of them.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Can you please phrase the set of instructions in C++ compatible to my PC performance.

They don't exist. Realtime is a kernel issue, not a compiler or CPU one. Utilizing 75% of your ram? Just allocate (operator new) as much memory as you want to utilize. However, this isn't going to do what you think unless you totally shut down the virtual memory and swap file(s) that your system is using.

It is obvious that you have a lot to learn before you get this deep into the internals of current systems. FWIW, Windows has no realtime extensions for Win7 and such. I think they have a Windows RT version that may give you deterministic timing behavior (more or less), but I doubt that it is hard realtime. More likely soft realtime. IE, you need hard realtime in order to apply a rate monotonic analysis to your process/thread stream to determine computationally that all deadlines will be met. This is the "rocket science" of computer science.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I think that the failing yrange set [:] is failing because you are trying to set the yrange to infinity which gnuplot cannot handle. I'm not a gnuplot expert, so this is just a SWAG.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The "nice" thing about "standards" is that there are so many! GAH!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Each SQL database has its own connection api's and protocols, and they all have a connection api for the C language. You need to refer to the specific database documentation to determine how to do this. IE, MySQL is different from Postgres, is different from SQL Server (Sybase), is different from Oracle, etc...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please show your code performing this computation, and then we can possibly help you. We don't do your homework for you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You will find some useful stuff in http://www.cplusplus.com/
If you plug "recursion" into their search bar you get a lot of articles that cover the subject.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Jim, you really need to turn off or block your webcam before you start playing around! LOL!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume you tried other RSS feeds to be sure it wasn't a configuration issue?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

RTFM? The C Builder documentation should cover what you need to do for a new installation.

rproffitt commented: Or use the prior answers. https://www.daniweb.com/programming/software-development/threads/236961/linker-fatal-error +11
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Yeah. It would be interesting to see just how many viruses and trojans they can infect the system with. LOL. I too find these calls "entertaining" if I have the time. We have no Windows systems in our house. My wife is an iDevice user exclusively, and I am a Linux-only user. :-) I like the idea of starting up a Windows 7 VM though for this experiment. I do have a Win7 installation DVD for such purposes (software testing, etc).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

First, asking us to analyze over 250 lines of code is just disrespectful. Please indicate what errors you are getting, and where they are coming from at the least.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Post a picture of one of the barcodes you are using.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

find has some nice options, like restricting the search to either folders or files, and case sensitivity. Let's say you are just looking for jpeg file: find root-dirname -type f -iname '*.jpg'

You will get a list of jpeg files (including directories they are in) starting in the "root-dirname", such as C:\mydirectory.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Good question! I am not enough an expert with InnoDB to say whether or not it supports row-level locking on reads, or does by default. I know that MySQL itself has a ton of configuration options to set that can impact this. In any case, check into that. If your reads don't require repeatable reads (updates by other processes on some of the same rows), then row-level locking on reads should be disabled, otherwise the update operations will be stalled until the entire read operation(s) are complete and committed.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Did that help with your insert performance issue?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Davy, you are so totally not getting PHP. It is C++ for server-side web development. Treat it as such (you do know C++, right?) and it will quickly become a breeze to work with! I had to remediate about 10K lines of PHP/HTML/JavaScript code at Nokia as a principal engineer there. When I was done, we had about 1K lines of code, it was 10x faster, and no errors!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And no, I am not going to correct your code. This is too simple of a problem, and you should have no problem solving it!

JamesCherrill commented: Not helpful -3
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Simple two-dimensional matrix. First column is the ticket price. Second is the number of tickets were sold at that price. To compute the income, iterate through the matrix, row by row, multiplying the price by number of tickets. Got it? If not, go back to your basic maths.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@Dani - if her network tools show an SSID, then the driver and firmware are working. I don't think that is her problem, at least in my experience. It probably doesn't show any connection at all, but obviously we need more information.

P.S. I also post help on the LinuxForums.org web site, under the same pseudonym of Rubberman.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Dear Aleš_1, you are a new member of these forums, so we will give you a bit of slack. I have over 15 years Linux experience, but just saying "WiFi" in a post is not particularly useful to help you. Many Linux distributions (you don't mention which yours is) don't directly support proprietary WiFi drivers and firmware. They are available, and I have NEVER been unable to get my Linux WiFi working (I only use Linux on my systems). So, please post this information:

  1. Distribution and version of Linux you are trying to use.
  2. Output from lspci and lsusb so we can find out which chip set your system is using.

After that, we can make appropriate recommendations. Thanks.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Another issue is your use of "\n" << endl; for end-of-lines. Leave out the "\n" the endl will deal with that for you. Common beginner mistake with C++ string output. Remember that endl will also flush the output stream. You only need the extra new-line if you want your output to have extra spaces.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Time to read the f***ing manual! You can find the PC BIOS specs online, as well as DOS interrupts. I presume you are running DOS on your system? Or in a virtual machine?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How old is this system? It sounds like a motherboard problem, such as bad capacitors, bad solder joints, etc.

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

Sometimes you need an external bluetooth device that you put into discovery mode so that the PC hardware has a signal to latch onto. However, as rproffitt pointed out, are you SURE this has bluetooth?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What cereal said. Use mysqli instead in any case. The mysql interface has been deprecated for a LONG time!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And anyone who does a join on 5 tables deserves what they get - likely zero results!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And WHAT THE FARK IS ZAKAT? Sorry for my French, but my ignorance of Middle-Eastern acronyms is appallingly bad...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We don't do your homework. Linear is trivial - do it on paper first. Binary search is not hard either. Both subjects are covered in detail in most CS text books.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In this code:

class Gallery_model extends CI_Model {
    public function get_picture($pic_unique_id)
    {
        $query = $this->db->get_where('galleries_pictures',array('pic_id'=> $pic_unique_id));
        return $query->result();
    }
}

So, show where you are creating and initializing Gallery_model. Also show the full structure and definition of CI_Model and Gallery_model. Seems that you aren't initializing the db member variable properly.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Just remember the KISS (Keep It Short and Simple) for your code. Yours is too complex for such a simple operation. Minimize! Minimize! Minimize! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, the question is whether this user folder is a system directory, or something in the database? These are very different things. If a system directory for the user, then select the image from MySQL into PHP, and then simply write it as a file to the appropriate user directory.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Each day you should create a new table with an auto-increment column, otherwise you will have to change your algorithm and use something else for the SN. There are other ways around this problem, but they are too complex to go into here. I've had to deal with them in the past and none of the solutions are simple and require some serious coding (mostly not complex, but careful).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The graph looks ok to me, though there are some of what I would call irrelevant links, such as to the other cars the Naza distributorship handles. Does it matter? Can they handle more than 7 people, after all 1 husband + 2 wives + 7 kids == 10 people - they won't all fit in the Ria.