rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

PHP is good for web applications - it is similar to C++ in terms of classes, inheritance, etc; however, it also allows embedded html code. It is also a web server-side tool. Unless you run a 5.5.x or later version, it cannot be run as a server on its own. I have recently used it to emulate a cell phone web browser, as well as to allow web-based access to MySQL databases.

My advice is that if you already have HTML and C++ skills, then PHP is not going to be difficult to deal with. If you don't, then you have some serious studying to do.

PS: my current work project is PHP-based. I will be pushing data from a MySQL database into Google's graphics tools to provide real-time (sort of) views into performance data from our cell phone browsers.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not enough information... You say that IE works, but not other browsers. What about other stuff?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is an addendum about "Applied Cryptography" by Bruce Schneier - this was posted in his "Schneier on Security" blog yesterday - a link to an online copy of the 2nd edition of the book. Since he posted the link, I have to think it is ok with Bruce to repost in forums like this... :-)

https://skydrive.live.com/view.aspx?resid=FACF17652686C5B3!157&cid=facf17652686c5b3&app=WordPdf&wdo=2

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Don't purchase anything. Either get Apache (FOSS - free, open source), Tomcat (ditto), or Nginx (also FOSS). Also, run your server on Linux - it is much more secure for this sort of purpose than Windows of any sort.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Between the time it worked, and the time it didn't, did you change anything on the computer, such as install new software, make configuration changes, etc? Also, are you sure the flatscreen works ok? Have you tried connecting it to another computer?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you want to understand this stuff, you need to study formal logic! Boolean predicate logic for sure! In my engineering studies in the mid-1960's I had to take a philosophy class as a requirement. I took the formal logic course (part of the philosophy dept), which has stood me in good stead for a 30+ year career in software engineering... :-) There are good links for learning this stuff on the internet, but you need to do some serious Google searching to find them. Start with Wikipedia: http://en.wikipedia.org/wiki/Predicate_logic

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Did you follow the instructions in the link I provided? You may have to reboot after you install the library and key file.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you have a 230v main power and the system was switched to 115v, then the increased amperage required to deliver the required load can have caused serious damage to the system, although many power supplies have limiter circuitry (fuse or circuit breaker) that can limit the damage to the system. As Mike suggests, a new power supply may work, but there are no guarantees. I have seen this situation fry motherboards in the past. :-( Anyway, voltage drops, current goes up, the magic smoke is let out...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Gah! If you are getting that far along in your "education" and can't think of a project that gets your juices flowing, then you don't deserve to graduate! Just my humble opinion... :-(

So, what do you know or have done with web design? What about working with Android (Dalvik/Java)? What about WebApps (Javascript based applications)?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What about header files? They declare the functions that are in the shared libraries. If this is linux (which I assume since you say you are using .so files), then you need the developer package for the library, which will install the headers for you. Then, as AD asked, are you linking with both? FWIW, you can extract the object files from the first .so and link them into the second one so you don't need to link both to an executable. Actually, I think what you did is ok, but when creating libsecond.so you may want to re-link libfirst.so to it because of possible recursive dependencies. This has bitten me in the nether regions all too frequently in the past! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Do some research (google search) on Eliza! Here is a link to get you started: http://en.wikipedia.org/wiki/ELIZA

Natural language processing is very difficult - companies like Google, Microsoft, and others are doing serious work on these problems, but they are PhD-level ones. Here is another link to ACM articles and papers on the subject by an old friend, George White, with whom I worked closely in the 1980's: http://dl.acm.org/author_page.cfm?id=81337494364&coll=DL&dl=ACM&trk=0&cfid=285055344&cftoken=24851706

FWIW, George developed the first PC touch tablet in the early 1980's, and hired me to write drivers and tutorial software to help developers use it. I developed the anti-bounce algorithms that are (I think) still in use in current touch pads as a work-for-hire for his company in the Silicon Valley. That was 1984 (a hat-tip to George Orwell!).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not enough information. What kind of "certificates"? How are they formatted? Is this a public/private key certificate? Are you using PGP keys? Show your work.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There is also (on some systems) a long double which should be 128 bits (16 bytes) in size. In a C or C++ program, you can tell how big each type is by using the sizeof(type) function/macro. It will return the number of bytes the type occupies.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Very much different. Android runs stuff in a virtual machine that takes java code and compiles it into Dalvik virtual machine code. Apple apps are more machine-level and use (I think) Objective-C (an object-oriented language similar in some respects to C++) which is then compiled into native code. IE, if you have an application or game that you want to run on both systems, you will have to port it from one to the other. There is a tool called webapps (I think it is Javascript) that both may support, but I'm not sure. If so, then that may be your best option. In any case, webapps is a browser-based language. It will only run in the confines of your mobe's web browser.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, I was going to suggest a VM, like VirtualBox, that can run old 16bit versions of MS-DOS and Windows (3.x).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

See my reply to D Ray about his power problem. Likely similar situation.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can use VLC (one of the best open-source media players available) on your Mac. Here is a link to what you need to get it to play commercial (encrypted) BD discs: http://vlc-bluray.whoknowsmy.name/

Do bear in mind that you may need to update the keys file from time to time since BluRay will change them occasionally.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The power circuitry in the laptop may be bad. Often it is caused by damaged capacitors. See if you can see any that seem swollen or leaking electrolyte. This is the most common cause of this sort of failure. Repair isn't hard, but you need really good soldering skills to replace the caps. Myself, I would not try (I am a fair-to-middling solderer) - I'd take it into a repair depot or preferably send it to HP for repair. At least that way the repairs will be waranteed.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not enough information. What database API's are you using? What functions? Is this a command-line program, or GUI? FWIW, SQL is its own language, and is passed to a database front-end to be parsed and executed. For example: select * from table_name where column=value;

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What deceptikon said. Don't ask us to do your homework for you. If we were to solve it for you, what would you learn? How to cheat? :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Myself, when processing textual data I usually read a complete line, and then parse it for tokens of interest using string functions such as strstr(). I process lots of log files efficiently this way.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I admire someone who is planning ahead, but the point of school (you are in your 1st year) is to explore the options, and not lock yourself into a path that may not be what you want later in your studies. IE, take this opportunity to explore! When you find something or a subject that really gets your juices flowing, then go for it!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you need portability, get a Macbook Pro - prices start at $1199. If you have a nice monitor and don't need portability, get a Mac Mini - prices range from $599 to $999. Then there is the integrated iMac - 21" models start at $1299. Here is a link to the Apple Store: http://store.apple.com/us?cid=oas-us-domains-applestore.com

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most systems have some sort of I/O ports, and pi is certainly likely to have such. You should be able to write software to monitor the port(s) that the switch is connected to (how are your soldering skills?) and trigger an interrupt handler as needed. This is not "junior grade" programming. You will need to write a device driver, or use one that is already on the system to do this. It may be possible to write a user-space program to monitor the I/O ports you use, but it will be likely necessary to poll the port states continuously, a major performance hit to be sure. Hardware interrupt handlers have much less impact upon system performance since they are hardware event triggered. No push == no event... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If this is a 64-bit machine, why install a 32-bit OS? In any case, the installation was probably a failure, hence the cyclical reboot symptom. Try re-installing the OS at the least.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Jason, I know what you mean, though I do some of my best work at stupid o'clock, after a couple of shots of good scotch. My head hits the keyboard, and it finishes the task for me! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I think the problem is that the tasks are running as threads, hence simultaneously. Rather than as runnables they should just be normal functions with a wait at the end of them. Since they are running inside another thread, it should not interfer with other processes/threads running in the environment.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Go on their web site and find out...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try to work out some sort of deal with her that if you succeed at your end of the deal, she will help you buy a new Mac.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You should be able to find the appropriate switch at an electronics component supply house. Then you will need to unsolder the old switch and solder in the new one. If you aren't an experienced solderer, or the device is wave-soldered directly to the circuit board, then you need someone with a lot of experience. I couldn't do it well, but my grandson does that sort of stuff all the time. Experience is the key here.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Is there an audio icon in the docking bay of the task bar?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, general pointers-to-functions is useful for what we call jump tables - functions to call based upon some index value. It is used a lot in Linux kernel programming - you get one input and you call one function. You get another input and you call something else. This can be done much more efficiently (and dynamically) than hard-coded if/else or switch statements.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, pointers to functions is useful stuff. It can be especially useful in complex polymorphic stuff. We use pointers to member functions for this sort of stuff, so you can change the behavior of classes dynamically at runtime. An example would be to enable different callback functions for event handlers depending upon differing criteria, without having to depend upon derived classes for each type. This is one of the more obscure areas of C++ programming, but I have found it useful in the past. That said, the last time I used pointer-to-member-functions was about 10 years ago. I generally try to keep stuff simpler than that since it tends to give one a headache trying to determine what is going on! Testing is a real PITA... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Exactly what Moschops said. Here is a proper implementation, but still pretty useless... :-)

void* aFunction(int* pToInt)
{
    cout << "something" << endl;
    return (void*)pToInt;
}
void f_voidFct()
{
    void *(*voidPtr)(int *);
    voidPtr=aFunction;  // here I get the error
    int a=5, *ptr_a=&a;
    void* p = voidPtr(ptr_a);
    // p should have the same value as (void*)&a or (void*)ptr_a
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The extern keyword declares that a variable or function is implemented elsewhere, likely in another translation unit (source file). The static keyword is another beast, and depends upon whether it is declared such in a header or in a source file. If in a source file, then that is a local variable or function. If in a header, then a unique instance of that item will be created in each source file that includes the header. In such a case, if it is a function declaration, then each affected source file will have to implement the function. In such a case, it is better to implement the function in the header as an inline function, unless you want differnt implementations for different sources.

Do note that the above does NOT apply to static member functions or variables of classes. In any case, there is a good discussion of these issues here: http://stackoverflow.com/questions/558122/what-is-a-static-function

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You may also have to blacklist the default nouveau driver.

To do that, edit the file /etc/modprobe.d/blacklist.conf and add the line:

blacklist nouveau

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Which OS is it running? If Windows 8, then you may be out of luck as yet. If Windows 7, then you are more likely to find a suitable driver on the drive manufacturer's web site.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Look for the command "split". The man page tells you exactly how to do what you want, and it will do it all at once.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Some VPN services are quite efficient, using hardware engines that have specialized chips to decode/encode the data on their end. The only encoding/decoding in software is going to be on your desktop end of the tunnel. I use VPN connections for work daily and the speed is pretty decent. It helps when the network pipes are big... :-) Anyway, I have a 5-6mbps dsl line at home, and I get a good fraction of that in throughput.

TOR is really quite incredible, but most of the gateway nodes are managed by volunteers and likely few of them have hardware acceleration for the encryption work.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Good exercise! Get started, and then we may help you. We don't do your homework for you. Think about the problem. Your professor has already broken the work down into manageable chunks. Look at each first in isolation, and then as a gestalt of all the parts. Thats how real software works. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Was the ink you purchased from the printer manufacturer? Also, what is the make/model of your printer? Some manufacturers these days are embedding chips into their ink cartridges in order to block other ink manufacturers from selling product for their printers - so if you get an aftermarket product, it may "brick" your printer.

The biggest problem are people that sell manufacturer-branded inks, but that aren't - sometimes they don't even know! Then you are stuck with a non-function printer. Lexmark is (in)famous for this, and have been sued for this activity - making it impossible for legitimate after-market ink vendors to provide functional ink cartridges for their printers. It is (in my opinion) an illegal monopoly!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Pick your poison! Both are hot topics these days, though web security is probably hotter. However, do bear in mind that if you do present a paper at such a conference, you better know your subject!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

First, take each point that he wants you to consider, and state what that means to you in simple terms, as well as how you migh accomplish that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Since this system has, in modern terms, a slow running CPU (1GHz IS slow, even with 2 cores). I would advize experimenting with a lower-impact GUI such as xfce or ice. There are a lot of options. The neat thing about Linux is that you can play with your system until it is JUST right (sort of like the 3 bears and Goldilocks). My first real personal Linux system was a Gentoo system I installed on my Dell D600 laptop. It took me a month of Sundays to get it properly configured, but once I did, it was a monster - ultra reliable, fast, and a pleasure to use! And, it ONLY had installed on it what I wanted - no extra performance-sucking cruft... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The terms of use for these forums is that we don't do your homework for you. Make a reasonable attempt and we will try to help you understand where you went wrong, but YOU have to start the process.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried one of the other php mysql libraries, such as the mysqli class? I have had good results with that connecting to remote servers. Here is some code, the class I use to connect with mysql servers from my php applications:

<?php

// php_flag register_globals on
// Some includes here.

/**
 * Encapsulates the mysql connection to the application database.
 * @author zippy
 * @version 1.0
 * @updated 23-Sep-2013 3:56:25 PM
 */

class MyAppDbConnection
{

    private $m_DbHost = NULL;
    private $m_DbPort = NULL;
    private $m_DbName = NULL;
    private $m_DbUser = NULL;
    private $m_DbPassword = NULL;
    private $m_DbConn = NULL;


    /**
     * 
     * @param host
     * @param port
     * @param dbname
     * @param dbuser
     * @param dbpass
     */
    public function __construct($host = "localhost", $port = 3306, $dbname = "whatever", $dbuser = "zippy", $dbpass = "")
    {
        if (is_null($this->m_DbHost))
        {
            $this->m_DbHost = new String('p:'.$host);
            $this->m_DbPort = (int)$port;
            $this->m_DbName = new String($dbname);
            $this->m_DbUser = new String($dbuser);
            $this->m_DbPassword = new String($dbpass);
        }
    }

    public function __destruct()
    {
    }

    public function connect()
    {
        if (is_null($this->m_DbConn))
        {
//            print 'Connecting to MySql<br/>';
            $this->m_DbConn = new mysqli($this->m_DbHost . ':' . $this->m_DbPort,
                                        $this->m_DbUser,
                                        $this->m_DbPassword,
                                        $this->m_DbName);
            if ($this->m_DbConn->connect_errno)
            {
                print 'Unable to connect to MySql: ' . $this->m_DbConn->connect_error . '<br/>';
            }
            else
            {
                print 'Connected to MySql<br/>';
            }
        }
    }

    public function disconnect()
    {
        $this->m_DbConn = NULL;
    }

    public function fetch(String $stmt)
    {
        return $this->m_DbConn->query($stmt);
    }

    public function prepare(String $stmt)
    {
        return $this->m_DbConn->prepare($stmt);
    }
}
?>

Note that I do build my php from source and …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How big is the file? FAT partitions have a limit on the size of a file that can be saved. For FAT32 that is 4GB (gigabytes), so most DVD images cannot be saved on a FAT partition for example.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Just one line of each, or lots? It could be the display card, but it could also be the internal controller hardware of the display, or even the video cable! I am assuming here that the monitor is not the display of a laptop? Here is the workflow to determine the root cause:

  1. If it is a laptop, stop and take it in for repair.
  2. If it is a stand-alone monitor, first make sure the cable is properly attached to both ends, and that it isn't damaged.
  3. The next thing to do is attach the monitor to another computer (using a different cable) and see if the problem persists.
  4. If it does, you know the problem is with the monitor - get it fixed.
  5. If it doesn't, then it is either the cable or the display adapter.
  6. Swap out the cable first, and if the problem persists, you have a bad adapter.
  7. If it is a bad adapter, then are you using a built-in video controller, or a separate card?
  8. If built-in video, take computer in for repair.
  9. If separate card, get a new one.
  10. Done.
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Thanks - we like to think so! After all, in the mobile phones and services division (just bought by Microsoft), we have 32000 employees focussed on just that! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You use software development processes to build any software, including display (GUI) applications. You need to do some serious reading before you go any further, especially in this day and age of security exploits and malware. One good text on software engineering/development (very dated, but still a good foundational text) is Niklaus Wirth's "Algorithms + Data Structures = Programs". Here is a link to a free pdf copy of it: http://pdfbooks-collection.blogspot.com/2012/05/algorithms-data-structures-programs.html