rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please show ALL of your PHP code!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What does MVC mean to you? To me it is Model-View-Controller. This wikipedia article does a pretty decent job of helping one understand the concepts: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller

What you are describing doesn't say MVC to me.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Flash itself is being deprecated in favor of HTML5 for video applications. As you should know, PHP is server-side code whereas javascript, etc are client-side tools. If you want this to be a client-server application, then use PHP on the server to build/send javascript, jquery and such as strings to the client. They can be a browser on the mobile device, or on any system. Doing that, making it a brower-based application, you don't need to put your app in any mobile device "store". If you do want to run it as a "native" app on devices, then you will need to port it to the preferred languages/apis for the devices you are going to support. That will be a lot of work.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I think something munged your system. Do the following:

  1. Run the disc check tool to see if the file system is ok. If it is, go to #2 (which will require a reboot).
  2. Schedule the sector check tool to run on reboot.
  3. Run a virus scanner on your file system.

These will verify that the disc and file system are ok, and try to fix them if not. If the disc and file system are ok, then if you have a recovery partition on the disc, boot from that and run the recovery tool to replace lost dll's and such. I assume you have a good virus scanner? If not, you can download and run the open source scanner ClamWin.

DDoerschuk commented: All three suggestions were correct and diagnosed problems! +1
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Go to the Services page in the Control Panel and see if the spooler is listed there. If it is running then try to restart it. If not running, then start it and click on the autostart icon so it will start on next reboot of the OS. If it isn't showing up at all, then go to the add/remove software page. On the left side of the screen should be a panel showing what Microsoft services and applications have been installed. There should be an Add button which would show available applications and services - the print spooler should show up there.

rch1231 commented: Excellent answer and what I was just about to suggest. +11
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Remove it. DO NOT OPEN IT! It may well be malware, ready to infect your system if you open it. I don't know, but as the saying goes, better safe than sorry!

happygeek commented: Absolutely agree - especially considering that we are talking about a PDF here! +13
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most open-sourced binaries and sources have been digitally signed with md5, or preferably sha-256 signatures, making it difficult for malware writers to create alternative versions of this code. This is not a perfect solution (no such exists in my opinion), but it does move the bar much higher.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

When proprietary software is hacked, you are SOL in terms of fixing it since you do not have access to the source code. FOSS is not such, and since you can access the source code, you can analyze and fix it as necessary. So, in relative terms, Open Source software is MUCH more secure than proprietary code. I do not run proprietary code any longer. No malware on my Linux systems!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

No terminating semicolon?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I think you posted this question previously. What responses did you get?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, I think that line 8 should just be system.out.println(c);
The compiler will probably complain about the (sum c)-> - it is non-terminated (no semicolon) and there isn't some value or method that the "pointer-to" operator references.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, please DO NOT post multiple copies of your issue. That is just bad and improper etiquete...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Read each line separately (see man page for getline), and then process the contents of the string read for the line. You really do not want to use fscanf() for this purpose. After you have read the line into a string buffer, you can sscanf() instead to read the contents of that line.

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

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

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

"BTW one more question are the max memory bandwidth of the processor and peak transfer rate of the RAM is related?"

The short answer is yes. Also, the CAS is related. That indicates the number of wait states that the memory will apply in order to properly handle the load. This wikipedia article explains it pretty well: https://en.wikipedia.org/wiki/CAS_latency

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Since the DDR3-1600 CAS 11 worked, my guess is that it is compatible with the DDR-3 1066/1333, but it will only run at the 1066 speed of the memory bus that the computer provides. IE, you can use a faster RAM, but it won't run any faster than the computer does.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As per Moschops. In my opinion, this is a textbook exercise to teach you the perils in performing evaluations (functions) on arguments in another function. This problem, caused by others, has caused me many sleepless nights living inside a debugger!

In any case, some compilers will evaluate arguments left-to-right, and others right-to-left. IE, this is one of those "we left it up to the compiler writers to decide" things that the C/C++ standards committees agreed on. IE, they couldn't decide to agree, so they left it up to someone else! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you really analyzed the original qsort algorithm? Read Knuth's volume 3, Sorting and Searching? If you haven't adsorbed that, then you don't know what the fark you are doing!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. Don't use C#.
  2. See #1.
  3. See #2...

Snark aside, I don't use C# and .NET tools because MS can change the rules for them any time they want.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you are running 64-bit firefox, you need the 64-bit flash player, and vice versa with 32-bit versions. I don't have any problem with flash on my system running 64-bit Firefox 38.0. I am running the flash-plugin.x86_64 v.11.2.202.460 (latest from Adobe for RHEL 6.x systems).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Do you smell that crispy odor and hear sizzling? That's your power supply getting toasted... :-) It should trip a breaker or fuse, but don't depend on that!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Look at your power profile. It is likely that the system is set to turn off or hibernate if the lid is closed, or there is no input, for some period of time. These parameters can be adjusted, so when you are plugged into wall power it won't shut off, sleep, or hibernate.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Thanks cis7850 for the lead. It sounds like this is a dedicated device that would do what I suggested "in the raw". :-) Ain't tech great? To quote some wag or other, "Never do yourself what someone has already built and sells at Best Buy."!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are issues with SSD's that most people are not aware of, such as the loss of data when the power is off for extended periods of time (recently reported information). A 7200 rpm drive will provide faster raw access speeds to data, but the overall speedup will depend upon whether you are accessing recently used data, or not. Most modern operating systems cache recently accessed disc data so that if you want to re-read that file, it will already be in memory so access is at RAM speeds - far faster than SSD's or getting it off of the spinning media once again.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need a number of tools for this, including a harness that will provide a load similar to what the system would generate. In addition, you need diagnostic tools such as a volt-ohm-ampmeter and possibly a scope. Not a job for the inexperienced or the ill-prepared.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. All of them.
  2. See #1

Yes, PhP is programmed primarily in C++. Have you looked at the code? It is not trivial, and there are security issues there, I'm sure. I have delved into it to some extent in order to fix some HTTP bugs, and it wasn't fun!

In any case, these questions are at a Masters or PhD level of investigation/research. None are trivial, and require deep understanding of the source code for each system, such as MySQL. Also, WHICH version of MySQL? Which version of PHP? Which libraries that are used by Apache and MySQL?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

My laptop has an eSata port. I can connect an array with 8+TB of space to it without problem. Unfortunately, a lot of current laptops are moving exclusively to USB 3.0 ports and removing the eSata ones. Pisses the heck out of me! I need to get a net laptop, but none of the ones I am interested in have eSata ports without a USB -> eSata adapter.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The dd application is running in memory, so it is altering it as you dump it. You might want to look into how the open source ClamWin virus scanner handles this issue when scanning memory for viruses.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One common method is to create a bunch of virtual machines, each with its own IP, and partition the job to those. That is basically how we did it for Adobe's Email Campaign software, used by many major vendors for email campaigns - and no, they aren't spam, per se! And users can easily opt out of receiving those emails. So, if you are a Barnes and Noble customer, this is the technology they use to send out information about sales, coupons, and such to their many millions of registered customers.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I don't think there is any current HDD over 2TB that will fit into a laptop. There are 3 and 4TB units, but they are 3 1/2" and thus too big to fit in a laptop.

Anyway, to paraphrase Star Trek - disc space, the final frontier!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are no discs of that size, but some file systems can support that size of array or multi-disc volume, such as zfs which can handle file systems of 256 zetabytes, and single files of 16 exabytes. Currently, the biggest single disc I know of is about 4TB, but I think that is in a format that won't fit into a laptop.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

That code works except for the initialization of total and the loop limiter. An accumulator in this case is simpler than keeping a register of all the results, but there may be times when you want that information for more complex calculations.

This should work for you:

    Scanner Keyboard = new Scanner(System.in);
    System.out.print("Please enter your number: ");
    double userNum = Keyboard.nextDouble();
    double total = userNum;

    // Only do 4 iterations - the input userNum is the first item.
    for(int i = 1; i < 5; i++)
    {
        // Print previous userNum amount.
        System.out.println(userNum);
        userNum = (userNum/2.0);
        total += userNum;
    }
    // Print final userNum.
    System.out.println(userNum);
    System.out.println("your total is " + total);
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You really don't need to downvote a person who is trying to help you "learn to fish". What about my post didn't you understand? Downvoting should be used only when you think someone is totally out of line. I don't think I was.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Add each new result to a vector (array) and then after the division loop, loop over the vector, and add each result for a final value. I leave the coding to you as a simple exercise.

noobjavacoder commented: sorry, but i cant seem to follow your directions. they're not clear. +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Services can be disabled from autostarting in the control panel, and you can remove other auto-started applications by removing them from the Start menu's All Programs Startup folder.

cambalinho commented: thanks +3
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What diafol said. Mixing html and php like that is just asking for trouble. First, build up your output html in php classes and variables. Then when you are ready, output the data. You can take the data/age input from another page, and call this one with the data you need for display and other purposes. This may help: https://www.daniweb.com/web-development/php/tutorials/484310/why-you-dont-want-to-mix-php-and-html-directly-

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I think your table name is incorrect. You are using "item" for the table name and "ITEM" for the column name. MySQL doesn't care if a column name is upper, lower, or mixed case, so you have the same name for your table and column. Are you sure the table name isn't "items" plural? If not, then you probably need to rename the table.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. Sort the array (qsort works well for this).
  2. Iterate through the sorted array and keep the pointer and incremented count in a separate array (one entry for each string). When the string changes, add the new one to the counter array with a count of 1 and then increment for each copy until a new string is encountered.

You will end up with a sorted array of strings, with the count of instances found for each. You can do this without sorting the original array, but then you will have to look up each element in the counter array which is much more expensive time-wise than sorting the original array in the first place, especially if it is quite big.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The more WiFi connection on your local network, the slower things get. A hard-wired connection will be the most stable, internet lags and such notwithstanding. Those you cannot control, but on the LAN side, you can have some control.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Never pay these thieves a penny! It's like leaving cheese out for the rats. They won't leave you alone! There are some of these malware encrypted systems that can be decrypted. Do a Google search to find out if there is a means to determine the code for the system in question. If not, cut your losses, wipe the system, and restore from backup - you do have backups, right?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If the PracticeTest class inherits from Task, then you can use it to initialize a Task variable. However, you won't be able to use PracticeText methods unless they were also inherited from Task. This is where interface classes can be useful.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most routers have 100mbps ethernet links, so if your WiFi is 802.11n, it will have close to that speed. The advantages of a wired connection are these:

  1. More reliable and stable data stream.
  2. No radio interference (w/ accompanying speed degradation) from neighbors' access points (AP).
  3. If someone connects to your AP/router with a slower connection type, such as 802.11b, then you won't be impacted.
  4. Less chance of being "hacked" by a drive-by road warrior.
JorgeM commented: +1 yes, exactly.. +12
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It depends upon the system. Usually you need to access the computer manufacturer/vendor's website and support page for such information. In some systems, you can do that by removing the external power, remove the battery, and hold the power button on for some period of time (30 seconds usually will work) - a lot of Toshibas work this way. Others require that you remove the power (and battery if a laptop), and short a couple of contacts on the motherboard for some number of seconds. A lot of HP laptops require this latter technique. My attorney gave my grandson an HP laptop that had the BIOS locked with his fingerprint. My grandson, who is an engineering genius, removed the keyboard cover, shorted the required contacts, and had Windows 7 installed, all in less than an hour! I gave him the system, sat down to talk with my daughter, and after a bit he brought the system into the living room, which proviously was running XP, to show it running Win7. Heck, it would have taken me at least 2-3 hours to do the same! :-)

cambalinho commented: thanks for all +3
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How did you format the laptop? Also, did you clear/reset the BIOS flash memory as well, and as part of the refomatting, include the boot sector, or just the NTFS partitions?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Switch to Linux? Not an option I suppose... Back up data to external drive. Scan and clean the drive for malware by another (uninfected) system. Wipe your system drive. Reinstall the system from DVD. Reinstall all your necessary applications. Copy data back to system from backup drive.

And when I say to wipe the system drive, that includes the boot sector, and you also might want to reset (wipe) the BIOS flash area. It keeps getting more and more difficult to get rid of this cruft!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Read this tutorial on random number generators and you will understand better how all this works: http://www.phy.ornl.gov/csep/CSEP/RN/RN.html

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Read this tutorial on random number generators and you will understand better how all this works: http://www.phy.ornl.gov/csep/CSEP/RN/RN.html