rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Line 15, your WINDOW pointer is never allocated, yet you are trying to manipulate it. I would expect that your application would dump core. It would if you initialized it to a null pointer when you declared it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have the script defined in it's own page, and include that just once in anything that needs to use it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, you are calling the detailsmodal() script before it is defined up in index.php.

sahilmohile15 commented: Thanks how can i define it other that including footer.php i can't find a way to do it +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I would have been a bit more snarky if you said you lived on the Ile de la Cite. :-) I don't think Notre Dame has student housing on the island... I spent a month on the Rive Gauche when I was a teen - even climbed to the top of Notre Dame with my father - no hunchback there though! What a dissapointment!

rproffitt commented: Another for balance. +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, you live on the Ile-de-France? Paris is a pretty big place! :-) Where are you going to school?

rproffitt commented: +1 for balance and peas. +8
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming the target is also a wstring type, this should work. IE:
std::wstring newstr = first + L" " + second;

Note that you left off the second colon in your variable definitions. This may be your problem. What error are you getting? The following is a test program that I just wrote to test this on Linux using GCC 4.4.7. It works fine and the output is "John Doe" as expected.

#include <string>
#include <iostream>

int main()
{
    std::wstring first = L"John";
    std::wstring second = L"Doe";
    std::wstring full = first + L" " + second;
    std::wcout << full << std::endl;
    return 0;
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please properly format your code, indendented appropriately. I won't comment on code like this...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

For debugging purposes, output the hash stored in the database and that returned in userLogin(). If they are using a different salt value (based upon date/time by default perhaps), then the hashes may differ. Since I am unfamiliar with the SCryptUtil library I don't know for sure what it is doing. This is a common technique for password hash functions so that two users with the same password don't generate the same hash.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Microsoft has happily turned Win10 into a virus - "whatever is yours is ours" seems to be their attitude these days. Disabling this cruft is a total PITA. My attorney who is a very happy Mac user had to get a Win10 system recently and the first thing that happened to him was an infection of adware/malware making the system almost impossible to use. He was NOT a happy camper!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming the host it is trying to connect to is external to the local network, or is in another subnet, then either the internet proxy or the router (depending upon situation) will need to be reconfigured. You need to have your hosting provider deal with this.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This should be fine, running an ethernet cable through a PVC pipe, although you will want to check with your city to verify whether you need a permit to do it. Also, make sure you get exterior-class cat 6 or cat 7 cable (not cheap) so that the signal will not degrade over that distance. You also need to consider how it will exit the house and enter into the bungalow so as to keep moisture and rodents (and other pests) out of both facilities. All of this is a major PITA, so an alternative may be roof-mounted WiFi antennas. We used that successfully at a school campus in California a few years ago, and using a yagi antenna at the remote site gave us a totally clean connection in all weather. Yagi-Uda antennas are powerful directional antennas that you aim at the other, standard, transceiver antenna. It may even be less expensive than the cable approach.

Here is a link to a yagi wifi antenna at Amazon.com: http://www.amazon.com/Yagi-WiFi-Antenna-2-4GHz-15dBi/dp/B008Z4DNFC/

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The fans are controlled by thermal sensors. If the motherboard and other stuff (power supply, etc) are dusty, this can exascerbate the problem of high internal temperatures. Take the cover off, and vacuum out the system (unplugged preferably). For hard-to-get at nooks and crannies, you can also use some compressed air in a can to blow the detritis out to be vacuumed up.

Sources of heat in a system? CPU, RAM, power supply, disc drives are prime candidates.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are a ton of RMS and POS systems out there, most of which are from small niche software companies, so finding the right one (or a close fit) for your needs will take time. Whatever, you will want a source-code license so you can modify it to meet your actual requirements, such as easy integration with your databases.

Also, don't let a flashy UI blind you. The underlying code base is the critical part. UI's can be crafted with available tools PDQ, but transaction processing frameworks (an area I am an expert in) and secure network interfaces are critical and difficult to get right, especially for a 24x365 operation as yours probably is.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Current versions of PHP (5.x and later at least) use a time-based reference-counted garbage collector. IE, every so often any object with 0 references will be removed from memory. The class is irrelevant. A class may be an object, but it isn't an "object" in the sense of something instantiated for operational purposes. As for "instance" for each connection, it may create a thread. I'm not sure about that, but the php documentation covers this stuff in great detail. Check www.php.net for details. FWIW, I have had to, in the past, dig into and fix php source code bugs, but I never had to deal with its threading/process model.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There has to be a service running on the host that you are telneting to that is listening for connection requests on port 23.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, what is the directory tree for the production site, and your local site? Also, have you made sure that none of the directories are links to elsewhere?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. You aren't saying what/where the errors are.
  2. You are asking us to analyze 400 lines of html/javascript code - get real!
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@ddanbe - how do you convert newton-feet to furlongs-in-a-fortnight? :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In some cases, you want to escalate warnings to errors, or at least warnings over a certain level. Most compilers can do this. If you are building safety/mission-critical systems that should be required. Then there was the missing semi-colon that caused a satellite to crash into the sun instead of orbiting it... Oops!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

No code? No real help. What language is the program written in?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

No code there for cropping the image. What have you tried? Here is the manual page from php.net for imagecrop(): http://php.net/manual/en/function.imagecrop.php

And yes, Google (or DuckDuckGo) is your friend!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is possible, but not simple or trivial. Try some Internet searching for tools that can extract text from photo images. I'm sure they exist - some commercial, and some (possibly) open source (free).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your private keys are typically kept in an encrypted file that uses a key that only YOU know. Yes, if someone has placed a trojan in your system, they can get all this stuff. If that has happened, then you are well and truly pwned and all your secrets are their's. If not, then you are safe and your communications are secure.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Can you boot from CD/DVD/USB drive?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How are you generating your random numbers? Show your code please. Assuming you have assigned a random number (usually using the rand() function if C or C++) to randomnumber1 and randomnumber2, then your computation should be correct. You initialize your random number generator with a seed value - often the local time value, and then each call to rand() will produce a new (independent) value.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So describe precisely what the equations are supposed to do - pseudo code helps - and make some effort to code the algorithms. Also, did you mean to output the value of an unmodified variable D, or did you mean to output the value of DeltaX in main()? In addition, the '\n' is not needed as endl will output a newline for you, as well as flushing the stream.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your code isn't complete the X and Y Diffusion functions do nothing, and you never call them from your base code. Think about what you are doing, and make sure that the code reflects that thinking, algorithmically speaking.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It depends upon the table definition. If a_id is unique, then you need to alter the table structure so that a_id is no longer unique and the primary key is composed of a_id and to_user_id. Then, you can have multiple rows to the same a_id, but each a_id can only have one copy of to_user_id. SQL does not deal well with multiple values like you want unless you do this, or create a secondary table that is linked (joined) to the first one via a_id, and the first table has no to_user_id. Unless your table has other data associated with a_id (such as name, address, whatever), then the first suggestion I made would be optimal. If it does have such info, then my second suggestion would be appropriate.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Time for you to read the Cisco documentation. I'm sure they cover that in the installation/configuration docs for the switches in question.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

HTTPS / ssh encrypt the data stream. There are some issues with that, depending upon the hash and encryption algorithms your particular implementation is using. However, they are mostly pretty secure. As for blocking specific implementations of the game code / data stream, that is up to the implementors. They "own" it, and can allow or disallow what they want. "Legal" has nothing to do with it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, without any error or other output, there isn't much we can do, other than analyze your code. Also, why are you using pascal? That is just such a dead language (no disrespect to Niklas Wirth intended).

And FWIW, I haven't used Pascal in about 35 years...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You probably need single quotes around $userid like what you did with main_image. Next question. What is the definition of this table. IE, what types are user_id and main_image?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@AndrisP is correct. If you use prepared statements with placeholders you are much safer from SQL injection attacks for one thing.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This may help: http://stackoverflow.com/questions/7917905/how-to-use-vlc-live-streams-with-html5-video#7955331

Not a simple solution, but it may work for you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

First, I would construct a simple string variable with the entire SQL statement, and output that to see what it actually generated.

The next thing to realize is that the mysqli...error() functions require an argument which points to the link, such as in your case $insert. IE, the or die (mysqli_connect_error()) should probably be or die (mysqli_error($insert)) or or die (mysqli_connect_error($insert)). Personally, I'd use mysqli_error($insert) since there could be an error that is not related to the connection, but with the statement itself.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also use classes where your constructor or setter methods can set internal variables that can be accessed with a simple getter method. Add to that @tinstaafl's suggestion about array's of strings, you can do something like obj.wbdisplay(); where the wb value is stored in the object when it is constructed. Also, wbdisplay(int) should return a string and not a char just as tinstaafl showed. It would be much more efficient, and do just what you want.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

When I need to do this for clients, I will boot from a Linux live DVD with an external usb drive attached which Linux will auto-mount. Then I use the dd command piped through gzip to get the entire drive image and store the image to the external drive. Example:

dd if=/dev/sda bs=1M | gzip -c >/media/extdrivename/image1.gz

That will get the entire drive, including the boot loader and partition table, compressing it to save space on the external drive. To restore the image to a new system drive (which needs to be of a similar make/size if possible, you go through the boot process again and run this command:

gunzip -c </media/extdrivename/image1.gz | dd of=/dev/sda bs=1M

I have successfully cloned systems this way. As an aside, you will want to disable protected boot (set bios to legacy mode) if your systems have a new UEFI bios (most systems do today) since if it is enabled the installation of Windows 7 and later will write data on installation to the system bios' flash memory. Also, this may not work if you have full drive encryption enabled, but I haven't tried that so I can't say for sure.

rproffitt commented: "This looks like a job for ..." +7
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to study what an insertion sort is. What are you inserting? How are you sorting the array? Also, your for loops in the sorting function is bogus. Didn't the compiler complain, at least about the inner loop? FWIW, EOF is dependent upon the context. Sometimes it means -1. Other times it means something else.

I think you need to go back to the drawing board and rethink this assignment.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Post your proposed code for the swap function. We are not going to give you the solution for this without some effort on your part. :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please format the register form with proper intentation. Also, you don't indicate where your bogus output is being generated. I can't find it anywhere in your example code (either PHP or HTML).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

According the the php documentation, there is no function mysqli_fetch_row. There is mysqli_stmt_fetch. You need to review the documentation more closely. Look here: http://php.net/manual/en/mysqli-stmt.fetch.php

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So far, so good. Try some more web searching, especially studying the ANSI terminal control sequences, which provide just what you need. FWIW, I don't give obvious answers to questions you can deal with yourself with a very little effort!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Yes, what nullptr said. The << operator is the output operator, but cin is an input stream so it won't have an operator<<().

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

float x = 10.0;
float y = 2.0;
float z = x/y;

System.out.printf("x == %f, y == %f, x/y == %f\n", x, y , z);

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can disable tar's removal of absolute paths (including, but not limited to '/' and '../'). It does that so that when you extract the files from the tarball it doesn't overwrite stuff you don't intend it to. It will extract the files, by default, into the local directory where you run the command from - not where the tarball is. Overwriting this default behavior of tar is VERY dangerous can can easily bork your system, permanently! Better to extract stuff to the current directory (and DO NOT do that from the root directory, or as the root user!) and then move it as necessary. If you are the root user, it will preserve ownership and permissions of the extracted files and directories. Again, MAKE SURE you are not in the root (/) directory, or other sensitive places such as /etc, etc... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you just want to learn Linux, then Ubuntu or Mint (a derivative of Ubuntu) are good choices. If you want to learn enterprise linux such as are used in big data centers, then CentOS is the way to go. It is a clone of Red Hat Enterprise Linux, but without the support subscription costs involved. Since you are going to run this in a VM and it appears that you want to run a 64-bit distribution, then you need to boot into your BIOS and make sure that the virtualization options are enabled. I assume you are running a 64-bit version of Windows?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Is there a configure script or Makefile or install script (maybe called "install.sh")? What about read-me files? If there is a Makefile, run "make install", ditto if there is an install script, run that (you may need to set the executable bits on it), ditto a configure script which you should run first if it exists. IE, best to post the contents of the root directory you downloaded to your desktop.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Make an effort to solve this, post your PHP code here, and then we may be able to help.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show a sample of the output please.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A lot of people (including my group at Panasonic) use CSV files to cache data that will be uploaded to the database. You can also use XML files, but they are more verbose, and a lot of databases will require a translater program on the front-end. Most will allow direct import of CSV files if the data is in column order.