rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

MS keys its system based upon certain hardware parameters. Sometimes if you add new cruft to the system, the key no longer "recognizes" the system. One of the reasons why I NEVER use Windows operating systems... Chances are that if you add a new video adapter, the same thing will happen. MS Windows, the gift that keeps on taking.

CimmerianX commented: Yes - This is the correct answer. +9
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Glad you got it working! Sounds like you have put some real "sweat equity" into this!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Use a std::map<int,double> that maps the student id to their GPA. It will be sorted for you. The implementation I leave to you. Note that you got 2 down-votes, mostly because WE DO NOT DO YOUR HOMEWORK FOR YOU! Make an effort to solve the problem. Post the code and compiler or runtime output. THEN we may help you more concretely... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What are you trying to accomplish? You can set up SSH to only use RSA keys, or to allow logins with user id and password. Automated script? Back to the first question...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Go to zareason.com - lots of great linux-compatible laptops, and can ship without an OS installed if you prefer. Good people. Decent prices. Good options.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Simple: sum all of the data values and divide by the number of nodes in the list. I am guessing that you did not write the functions to add/remove/size the list, etc. We don't do your homework for you. This is very much elementary math... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to study object-oriented design and development a LOT more before you can deal with this. Consider PHP to be C++ for web programming. In any case, the answer to your question would require a 500 page book to cover in detail... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@Suzie999 - you are definitely NOT a noob! In any case, the problem has a couple of components. One is the loading of the DLL in your code - for Linux it is dlopen(), for Windows it is LoadLibrary(). Then there is code to map functions in the shared library to your environment. In most cases, due to name-mangling issues mostly, you can't just use classes in the shared library, but usually only C-style functions. Congratulations, you have just graduated to the next level of software absurdity! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Lesson #1 - never overreact.
Lesson #2 - do a root-cause analysis of your problem(s).
Lesson #3 - go to lesson #1...

I use Windows when I absolutely have to. Example, if I have to develop software that must run in a Windows-only environment, then I run a Windows environment in a virtual machine, otherwise I run Linux exclusively. It is MUCH more forgiving than Windows, and with Wine, I can run 98% of any needed Windows software (including my high-end software engineering tools) without resorting to a VM.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@Shantha_mh - good post. A thumbs up from me, and someone else as well. SIP - Session Initiated Protocol, used for VOIP (voice over internet phone) is very important these days. Good reference links are important to understand what this stuff does.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What is the machine/os you are running audible on? VLC runs on all of them (most likely) and can deal with mp3 files without problems, as can many other audio players. Do you HAVE to use audible?

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

What exactly are you trying to accomplish with the array and ofstream?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And thanks for your post @fallout4player. This may help others as well. I am giving you an upvote for your post.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What @rproffitt said. Also, do you know what a recursive function is?

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

So, what is exactly your problem? You need to make the TempBuffer bigger than 4 chars - you have no room for a terminating null char ('\0') so you are creating a buffer overflow.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Start with a Linux virtual machine. Install VirtualBox on your Win7 system and create a Linux virtual machine. That way, you can experiment with a number of different distributions until you find one that you prefer. You can also use them to learn how to use the OS.

rproffitt commented: I like a test drive. +8
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Inshifter(int size) you are never filling the array. Since it was never initialized, the random number stuff is not only doing nothing, but as far as I can tell it is unnecessary. The loop SHOULD be (to my mind at least) like the following:

    for (int i = 0; i < data.length; i++)
    {
        data[i] = i+1;
    }

That way, your array is initialized to the numbers you want - 1 through 15 sequentially. Next comes the shifting. Take the number of elements to shift (which come off of the tail of the array), allocate a temporary array of the appropriate size, and put those elements in it. Then, move the elements of the array to the right that number of entries, and replace the front of the array with the contents of the new/temporary array. Bingo, you are done. This is as much as you will get from me (no more code) as this is obviously a homework problem. We will help, but we won't do it for you!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Using a shared pointer to an a in class b means in b's copy constructor you don't need to create a new instance of a. You can simply assign the copied object's p member to the new object's. That's the whole point of shared pointers - that you can have multiple references to the object they point to, and until all references go away, the object will not be deleted.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As stated, no two fingerprint scans will generate the same data/image. Intelligent fp scanning tech identifies notable features in a print and develops a hash of that. When the same finger is scanned again, those features are extracted and used to create a hash. The fact is, that only the hash (a numeric value) is stored in the database. Lookups are very fast as you can easily index that data.

Raw image comparisons are notoriously difficult and most of the time some algorithm such as that mentioned above will be used to identify comparable images, such as photographs of peoples' faces. As mentioned by others, there are API's out there that have done this work already - it is not trivial and requires some major software and image analysis chops.

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

@rproffitt has it right. Set a timer after alarm is raised, or set a number of events to process before raising another alarm within some specified (and adaptable) time frame.

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

Most apps for android are written in Java, using the android Dalvik compiler (different byte code than javac produces), but the source is still mostly pure java. You should be right at home! :-) Google has excellent resources, documentation, and other materials to help you with this effort.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. The building systems must be on their own subnet that is not accessible from the tenant subnet.
  2. Each apartment should have its own subnet, but with gateway access to the Internet.

Doing this, they can plug in their own router with a 192.168... local unroutable domain and all the WiFi or hard-wire connections to that will be local. They need to point their router to the building's gateway so the tenants and their guests can get on the Internet.

Note that you should provide detailed instructions to the tenants how to do this, as well as how to setup an SSID for their WAP that also is secured with WPA-2 and appropriate password. Of course they could leave their SSID open so others in the area can use their connection, but then if they do that, neighbors who are into "bad stuff" can mask their location and cause the tenant serious legal issues...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Except at the most fundamental level, chemistry is not math. You can do this with a rules-based language or API that "understands" chemical interactions and can transform your input (left side of the equation) into the output (right side). Not simple, but a very good senior or graduate level (masters degree perhaps) project.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

When you edit a text file, such as a bash script, the changes go into the same physical file (determined by the file's inode). If you want to change it, but not impact the running program, then copy it, edit the copy, and then copy back to the original file name. That will have a new inode and the running program will continue to use the original script until you restart it. At that point, the old one goes away (the inode is freed) and the new one becomes the script that the system sees.

This is how Linux can update programs and shared libraries without restarting the system and programs in question.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The mysql api's in PHP have been deprecated in favor of the mysqli api's. You seriously need to change your code if you are running PHP 5.0 or later. If you are running earlier versions of PHP then you are operating out of the Dark Ages!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. Design
  2. Code
  3. Debug
  4. Re-design
  5. Re-code
  6. Debug
  7. Goto #4 until stuff works as you wish and any idiot can understand the design.
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, in Java, all methods are part of a class, and may declared in an interface class which has to be implemented somewhere before you can use it. If this is a static method of a class, then you can call it as classname.methodname(arglist);

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Since an external display works fine, it is not likely a driver or system problem, other than the fact that the display is probably failing. The controller also handles external displays, so it isn't the video controller.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Posting links like that here is frowned upon as we have no way to know if it will infect our system with a trojan. Please post the requirements, code, and such here directly.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Here are a some links that may help:

http://code.tutsplus.com/tutorials/how-to-send-text-messages-with-php--net-17693
https://www.clickatell.com/developers/scripts/php-library/
http://www.nowsms.com/doc/submitting-sms-messages/send-sms-text-message-with-php

I found these with a simple DuckDuckGo (Google without the ads) search: Sending SMS messages from PHP
There were a bunch more that came back with in the results.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show what you have done. This is a common CS problem and whether you want the consumers in the same process, other processes on the same host, or other processes on other hosts, will change how you deal with the problem. There are tools to do this, such as MPI and various distributed messaging tools such as RabbitMQ, AMQP (which Rabbit is based on), Kafka, etc. that will provide publish/subscribe message bus tools for distributed systems. They also work well on a single host. You need to do your research. Don't just expect us to "solve" your problem for you. If you describe more precisely what your environment is and what you need to accomplish, then we can provide some advice. That said, DO NOT expect us to do your job / assignment for you!

FYI, I have been doing this stuff for 35 years, including writing distributed message bus tools that are used in major commercial manufacturing software systems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Seems that they are taking some visual clues from Mozilla / Firefox. :-)

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

When it crashed, did you get a traceback of the crash? Java (and Dalvik) will provide a nice stack trace to show you where the problem actually occurred. Since you say it only happens when closing the application, then I suspect you have munged something in your code that on exit the system cleanup code can't deal with it. I'm not going to analyze your 350+ lines of provided code to tell you why...

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

Create a separate results array, one element less than the array that contains the numbers. Iterate through the array and store the deltas between each pair to the results array. Then you can easily find which pair(s) are closest, as well as there are any other matches. Let's say that your data array gets the values 0, 1, 4, 5, 6. Your results array should end up with the values 1, 3, 1, 1. Now you can easily see which items have the same distance as you put it.

I will leave the coding for this algorithm in your capable hands. I will help like this with schoolwork, or help you figure out what is wrong with your code, but I won't give you the answers... :-)

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

I have to assume you are running VMware and VirtualBox? In either case, I haven't seen this error. It may be that your OS image that your are trying to install is corrupted. Try another.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Good start Viny. Also, remember the KISS principle - complex code is fragile and difficult to understand or debug. Let each function do one thing perfectly.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One guess is that this is a virus that has embedded itself in the BIOS firmware. You need to reset / clear that, which will probably require that you short out a couple of contacts on the motherboard of all your systems, and reconfigure the bios. Then you need to totally erase the hard drives (including the boot sector) and reinstall the operating system(s). This will not be fun, fast, or easy. It is also why my wife and I do not run Windows systems...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As per andy1973's question, there is no ssh in the provided code. The wget command has nothing to do with ssh.

JeoSaurus commented: I think by "SSH" basketmen just means "shell" +5
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. Don't hijack a 6 year old (or someone else's) thread.
  2. See #1.
  3. Don't point to a web site to show your code. Post it in a code block here instead.