rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You are not providing enough information to help you. I assume you are just closing the display, probably putting it into sleep and later hibernate mode. That said, I think you need to be sure you have enabled a hibernate file. If not, then before you shut the cover, shut down the system completely.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A 1.6 GHz Atom processor running a 32-bit OS is not going to get much better, performance-wise. It is probably already doing its best.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Getting a new system will likely be less expensive than fixing this one.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In the future, if you want to run Debian on a Window system then download and install VirtualBox. You can then install Debian or other Linux distributions in a virtual machine, avoiding the problems you incurred, and the wrath of your IT department. That's what I did at my last job since I had to do most of my development work on Linux, yet the company laptop had a security hardened Windows 7 installation with all the company cruft on it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Run it through a sed script to remove the "null" entries.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Anyway, we need to see your code, especially where you take input for the password, and how the input stream is configured.

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

There a built-in open source nVidia driver for Linux called Nouveau. nVidia also has proprietary Linux drivers for their gear which work very, very well. The proprietary drivers are much more efficient than the Nouveau driver. I run Nouveau on my laptop which has an nVidia GPU, and the proprietary driver on my workstation which has an 8800GT video card. I use the proprietary driver on that system because I run multiple HD displays and do quite a bit of video processing so it needs the best drivers available, which happen to be the nVidia proprietary ones.

FWIW, nVidia also has Linux SDKs for using the graphics cores for serious parallel number crunching.

Also, since nVidia is working with the Nouveau team at providing better support for their cards in the open source universe, Linus has withdrawn his extended middle finger from pointing at nVidia... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What operating system/version are you using. According to the Linux man page for fopen, the usage of "a+" is this:

       a+     Open for reading and appending (writing at end of file).  The file is created if it does not exist.  The initial  file position for reading is at the beginning of the file, but output is always appended to the end of the file.

In any case, I have NEVER seen a crash on any Linux or Unix system using this. Windows? Don't know about Win7, but I never had any problems on XP and earlier versions of Windows NT.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

First, what language are you using? Next, why isn't this in the Software Development forum?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What Schol-R-LEA said. For a cross-platform GUI development tool set, use either Qt, or Wx - Qt is preferred. That said, they are C++, not C API's. AFAIK, there are no standard GUI tools that are strictly C based, other than text-based ones such as curses/ncurses.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Still an early C++ learner?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Get a degree in computer science. Learn multiple programming languages. Become competent in graphics development. BTW, Newtonian physics is also helpful for game development.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your post is not clear. Please be more specific. Are you trying to learn how to fix laptops and other computers?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Good luck with that! This is not code for newbies. And if you use the specified configuration, my guess is that your system will be pwnd... Have fun!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If the if($id != ""), try !== instead of != - this is one of the subtle issues that trip up a lot of PHP programmers. See the PHP online documentation about this.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, what you need to do depends upon whether you are running Linux (or other *nix), or Windows. If Windows, it will find and mount the file system automatically, as drive E: or something. If linux, you will probably need to manually mount it on your file system. So, let us know what operating system you are running, and we can better help you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume this is a shell script. When you execute the argument as a command, it has to be found in the system's PATH environment. Try ./$1 instead. That tells the shell to look for the command (argument) in the local directory, where you executed the ss4 command.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you are considering switching into more current web-based programming, then get up-to-speed on PHP and LAMP. PHP is really a web server based version of C++. If you are going to use it properly, you need to understand well the foundations of OOP (object-oriented programming). A lot of currently written PHP code is an abomination and subject to major sercurity issues. Well-written PHP code is clean, debuggable, and secure. Unfortunately, there are more web sites out there with the former kind of PHP coding... :-(

I had to re-write a tool at my former employer (Nokia) that was written in the former (abominable) style - a mish-mosh of intewoven PHP, HTML, and JavaScript code with some complex CSS thrown in for formatting. You could not debug it. I took the good parts and embedded them into real PHP classes and methods. The result ran faster, could be debugged, and was a LOT easier to modify (which I had to do to meet new requirements).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try system("java -jar ./myJar.jar"); assuming that the file is in the same directory as you started your C++ application and it did not change directories before it executed the system() call.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

These days, a 4 CPU system will have from 8 (more likely 16) cores, to as many as 32. More cores == slower clock speeds. You can overclock 4 core high-end Intel CPU's to about 5GHz, and possibly more with agressive liquid cooling.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Then try a new battery or take it in for repair. How old is it?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, if the Hitachi is otherwise working ok, I wouldn't worry too much about the current temperature. Just make sure the drive gets enough cool air flow over it - escpecially the controller circuitry on the drive.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Are you plugging into a wall charger, or is it plugged into a computer USB port? As JorgeM suggested, try an alternate charger. So, if you don't have another wall charger, try a USB connection to a live computer. If it still doesn't get beyond 10%, then it is most likely a bad battery, or a bad charging circuit in the phone.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Load testing is very different from functional and regression testing. The issue is one of being able to access system performance data, such as CPU usage, network saturation and latencies, disc (SD card) I/O rates and latencies, etc. This requires access to the OS, and in some cases may only be accessible via the device's J-TAG hardware interfaces. Each device family will be different. You won't use the same techniques with a Windows phone as you would an Android phone, Symbian, Tizen, etc.

Anyway, as a previous senior performance engineer at Nokia Mobile Phones (now Microsoft), I worked on a lot of this stuff. We didn't have on-phone support for performance analysis other than custom firmware code that would store relevant data in system variables. We had to have the phone collect that data by the browser and send it to our servers to analyze. We would run a new performance test whenever the phone firmware would be updated, and we had 3 experienced engineers who handled the phone-side of stuff. All tools were internal, so I can't discuss much of how they worked in practice - NDA's and all that...

So, if you need load/performance testing tools for a specific model of phone, or phone OS, then I suggest contacting the manufacturer as otherwise you are in for some long nights and weekends reverse-engineering their firmware.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
class Address // Assumes address is in USA
{
private:
    std::string street;
    std::string city;
    std::string state;
    std::string zipcode;
public:
    const std::string& getStreet() const;
    const std::string& getCity() const;
    const std::string& getState() const;
    const std::string& getZipCode() const;
};

class Map
{
.
.
.
public:
    void showLocation( const Address& addr ) const;
    // Alternative implementation:
    void showLocation( const std::string& street,
                       const std::string& city,
                       const std::string& state,
                       const std::string& zipcode ) const;
};

So, the class Map can use the getter methods in Address::showLocation( const Address& ) const to determine where the location is, and then display that. Note that this is a VERY rudementary example, but the point is that passing objects instead of lower-level scalar data can be useful, more terse, and less error prone.

ddanbe commented: Great answer! +15
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Why do you need ultrasurf - "enables its users to bypass Internet censorship and firewalls using an HTTP proxy server, and employs encryption protocols for privacy"?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but without looking at the unit I really can't say what you need to do. Those cases are usually connected together with some plastic bits, which when broken allow the case to come lose. I don't think you can get a new case (front and back covers) for it, but if you don't need to get to the battery, etc. then you might try some super glue. A suggestion would be to take it apart and replace the battery before you do so... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It depends upon the drive. Some manufacturers' drives run hotter than others. On my system, my 2TB WD green drives run about 10C cooler than my 320GB Seagate system drive. They are all healthy, at least according to the SMART interface data that I monitor. That said, I have had Seagate 500GB-2TB drives that ran too hot and failed sooner than they should have. Fortunately, most were under warranty, so I only had to pay for shipping in a couple of cases. The replacements are still running hot, so I have decided to use 7200rpm WD drives for now. They have been much more reliable, have fewer bad sectors, and don't overheat.

As for noises when you copy files, that is probably the head positioning drivers. They do make noise to some extent - which is why I usually stream some music when I am running my system (like right now)... :-)

FWIW, Hitachi has a good reputation, and as a disclaimer, I used to consult with Seagate. I still prefer Western Digital drives.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you are doing C-style allocations, then you can use alloca() which produces data that WILL go away when the function it was called in terminates. This is because the memory is allocated on the stack and not on the heap. If you are programming C++, then you can use this memory blob in a C++ new operator to create an object using this memory space. The major caveat here is that if the C++ object stays around after the function terminates, then it will be using unavailable memory (probably used by other stack data), and "bad things" will occur...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Eclipse is a nice, integrated, IDE (Integrated Development Environment) that has plugins to support most current programming languages - the editor is built in. VIM is a text editor based upon VI, but with additional functionality. Myself, for development, I prefer a good editor (nedit is my preference) - others prefer VIM, gedit, emacs, etc. It is really easy to get into a "editor wars" scenario - try them all and use what is most productive for you. I also prefer to use make instead of an IDE. It doesn't depend upon Java versions, or anything else, and runs on every system known to humankind. IE, I build Java programs with Makefiles instead of Ant/XML... Just call me old-fashioned, but there are times when one size DOES fit all! :-)

Why do I personally prefer nedit?

  1. I know the original creator.
  2. It provides syntax-directed editing for most languages you have every heard of (and some you haven't). It isn't difficult to add additional languages if you want.
  3. It has tabbed editing, and you can detach a tab into its own window.
  4. You have global search and replace, so if you change the name of a class, you can replace all instances of that name with a single gui command, in all files affected.
  5. It has superb regular-expression search/replace capabilities. So does VI/VIM. I think they are both based upon Henry Spencer's work and regex library. I know that nedit's regex tools are. Here is a link to Henry's Wikipedia page: …
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Translation - "Who speaks latin?". :-) My sister and I would speak pig latin around our parents when we were kids and didn't want them to understand us. This was back in the 1950's - hence my comment "It's been awhile." :lol:

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but we don't do your homework for you. Try Google or DuckDuckGo to search for such.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You say you know the basics of Java and are learning Python. Personally, I would doubt that (knowing the basics != being competent). As for using the Google compute engine, you need to read up on the Google documentation for that to determine what is required to effectively use it.

Keep working at it - eventually you will figure it out!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Neural network programming isn't trivial. What other programming experience and training (theory) do you have already? Myself, I had to take a course from MIT to get reasonably up to speed on the subject, and I already had about 15 years of professional software engineering experience.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, try to stop being so "clever" and redefining standard functions like printf, scanf, break. All that does is make your code impossible to read. Obscurity instead of legibility. Not a good tradeoff!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

after compiling,when i run program my 'FTN 95\PLATO' recently showing me black DOS box,only reading "PREES 'RETURN' to cotinue" without executing the program. could u say why is this happening ?

Not without a lot more information. How are you compiling it? Is there a file "PLATO.exe" in the "FTN 95" directory? What is your source code? Post that here please.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please be more specific. How are you trying to run these programs, and why do you think you need to run an "installer wizard". Finally, what Linux distribution are you running?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Huyay eakspay atinlay? It's been awhile... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are C strings (char*) and C++ strings (std::string). Which are you using?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your most obvious issue is this: else if (command == 2);

Since you dont do anything is this branch, you need to remove the trailing semi-colon. Also, since this branch does nothing, why not just remove or comment it out?

Final comment. ALWAYS bracket all conditional statements (branches). It eliminates a lot of problems like this. IE:

 while (active)
 {
    cout << "\n> "; cin >> command;
    if (command == 1)
    {
        add(items); //here is the problem !
    }
    else if (command == 2)  // remove();
    {
        // nothing to do here is obvious.
    }
    else if (command == 3)
    {
        display(items);
    }
    else if (command == 4)
    {
        active = false;
    }
    else
    {
        cout << "bad command...try again";
    }
 }

As for the fact that add(items) is your problem, in that function you do no error testing. In my experience, error testing should be about 50% of your code for reliable system software.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is why we often use "smart pointers" to contain heap allocated objects. When the smart pointer goes out of scope, the contained object will be deleted automatically. There are caveats here, such as when something else takes a reference to the object managed by the "smart" pointer. I had to deal with this in the past. The solution wasn't simple, and basically required the design and development of a reference-counted garbage collector. It did work very well - in 10 million lines of code we had no explicit deletes and zero memory leaks.

The point I'm trying to make is that memory management and garbage collection are not trivial issues for anything other than trivial/simple applications that start, do something, and terminate. For long-running (in our case 24x365) applications, memory management becomes much more critical. At Nokia (my last employer) this was a serious issue, even with our Java servers. Java has automatic garbage collection / memory management, but it does have some problems that can cause severe system failures due to memory management if not directly addressed.

So, all this blather aside, getting to your issue.

  1. You allocate p1 with your allocate(n) function.
  2. You delete p1 in main().

Even though p1 was deleted, the memory that p1 was allocated is reusable, but the data is still available, hence your ability to access that data in your final loop since nothing else has been done that may overwrite that data. Remember, heap allocated data is not automatically removed …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Install Eclipse with the CDA (C/C++) plugins (probably there by default now). Configure it to use your MinGW GNU compiler. That should work just fine. Eclipse is an IDE for Java, C, C++, and many other languages which will work on Windows, Unix, Linux, and other systems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try printf("%lu %lu\n", msizeof(x), sizeof(x));
Note that sizeof(x) returns a size_t value, which is a long integer, hence the error/warning.

Also, do note that it is Sunday morning here in the west. Don't expect answers immediately - most of us are probably still in bed!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Does that file exist on your system? If not, it would seem that your game/application didn't get installed correctly.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I'm just a regular computer users and often use my computer office for personal purposes such as checking my funds in online bank. I want to know how to if my computer is being tapped or not.

Well, I have considered this issue in the past, but when I needed to do stuff without corporate overview, I simply would not do it on the corporate network.

Just remember, corporate systems, or systems connected to the corporate network, are the corporation's resources, and most anything they want to do is legitimate... That doesn't mean they are immune to laws regarding rights to privacy, but it gives them a lot of leeway to monotor what you do and what web sites you visit.

All that said, your personal uses, provided they are allowed by corporate computer use policies, should not be a problem in most cases - caveat user! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume you are using a dual-boot capability from your post. What video hardware does your system have? You need the appropriate drivers. By default, Ubuntu will not install proprietary video drivers, but there is a System (possibly in Preferences) entry that will provide the ability to install the appropriate drivers for your video, giving you full resolution capabilities. If your Linux distribution cannot handle your specific hardware, then it will revert to the VESA api's that most all hardware supports, but that has limited resolution as you have seen. VGA drivers? Those would be limited to 800x600 which you already have. VESA would provide higher resolution, but not suitable for video streams.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Glad to help. Remember, the voltage is key. Amps is the current it can provide, so you want at least as much as the device can draw, otherwise, the power factor staying equal, it will drop the voltage and can damage the device. Basic electricity - high school physics stuff. Here is the wikipedia article on Ohm's Law: http://en.wikipedia.org/wiki/Ohm%27s_law

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

@iamthwee re. web development
One of the pre-eminent web devlopment languages today is PHP, which is a reflection of C++. If you approach it as an object-oriented language, you can do some awesome web development with it. I consider it a weakly typed version of C++ with HTML, JavaScript, CSS capabilities. Used correctly, it is VERY powerful. Used incorrectly, the security vulnerabilities it exposes can be devistating!

Unfortunatly, the latter is too often the case because many PHP developers are clueless about C++. And in case you are interested, I wrote a complete cell phone emulator in PHP, as well as other tools for performance engineering and analysis. It is a very powerful language, but if I knew nothing about C++, these tools and applications would have been impossible!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In Windows, compiled code is stored in *.obj files. In Linux/Unix it is stored in *.o files (same thing, just different extensions). Those files contain the code machine language that the compiler generated and can be linked with other code and libraries to create an executable program.