rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I have also used unetbootin without problems in the past except that some older thumb drives don't seem to want to boot. I haven't had problems with newer drives. So, are your thumb drives just units that have been sitting around and you thought you'd use them? Or are they new?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One final note. main() returns an int, but you have no return value... Just nit picking! :-) FWIW, the compiler should have complained.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The fact that most of this stuff usually works out-of-the-box in the first place is, in my mind, just FM (Farking Magic)! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried to boot the recovery partition, or a Linux Live CD/DVD disc?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Looking increasingly like b...

Except that spammers usually don't reply quite so quickly. Perhaps the poster (cigala) is still trying to figure out how to use the forum interface? Or is having a difficult time writing his post in English. If that is the case, then try using Google Translate cigala.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

RIK is correct. USB headsets usually are not handled by the usual sound hardware. My bad! Missed that fact in reading the original post. However, if the system does have two output mini-jack plugs, try plugging the speakers, or standard headset, into the other one and see if that works, just as a test.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Agree with Reverend Jim. Given costs, going with a 250GB or bigger drive will be a lot more cost effective than an 160GB drive. The reason is in manufacturing scale. More drives shipped == lower price per unit. Since very few people purchase drives smaller than 250GB these days, those smaller ones will be more expensive. FWIW, the cost to manufacture a 250GB or 500GB drive is just about equal to a 160GB drive. The cost to build only goes up when there are more platters (hence read/write heads).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Good observation caperjack. As he said, the audio subsystem is still functioning. You can use the headphone plug to connect with a PC speaker system. I assume you have two plugs - one on the front for headphones (normally) and one in the rear for speakers (normally). They are usually controlled separately so it may just be that your audio configuration has been messed up.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The output you see is absolutely correct. See AD's advice above. If bit1 was 2 bits instead of one, it would have output the expected answer. IE, an integer value with all bits set == -1 in decimal. That is what you have in your example. This is a good example of "what you say is not exactly what you get". :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Subtracting two pointers returns the difference between the addresses, not another address.

But subtracting an unsigned long integer from an address should result in another address. Whether or not it is a valid address depends... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Do what interests you. There are a gazillion (technical term for a very large number) things you could explore.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This might work in C++, but not C. To copy array data like this from one variable to another in C, you would either do a member-by-member assignment, or alternatively a memcpy() operation. Example:

void copyarray(array var1)
{
    array var2;
    memcpy((void*)&var2, (const void*)&var1, sizeof(array));
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

FWIW, I have found that newer versions of MySQL are pretty well backward compatible with older clients. If you want to install the newer version as the default, then make an external backup of your data and system drive so if it does FU, you can restore to a functioning system. Do that anyway... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, you could build from source and install the updated version of MySQL to /usr/local instead of /usr. When you run the new mysqld daemon you can tell it to use a different port from the default. Then you could point ossec to that version of MySQL via the new port (maybe) instead of the default one.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What OS are you running? Windows of some sort I presume?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Is this for production use, or to test/evaluate? If the latter, then install it on a virtual machine.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. Just reviewed the member() and memberlist() entities in C&M - please post your code here. Your examples are not really helpful.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but I haven't done any Prolog for almost 30 years... I'll have to refer to my copy of Clocksin and Mellish when I get home tonight.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In this code:

double PEmployee :: set_salary(double new_salary) const

{
    double salary = new_salary ;
    return salary ;

}

You are creating a local variable "salary" which will override the class member salary. IE, it won't set the instance member like you think. Remove the "double" declaration. There may be other, similar issues, but I don't have time right now to find them for you. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One way is to encode the strings into an array and pass the index to the switch. However, it would not be particularly efficient unless the array is sorted and you can use a bsearch() to find the index. This is good for reasonably large data sets, but not for small ones.

FWIW, that approach can be useful for compiler lexical analyzers to determine what to do when a keyword is found.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are some execellent books on the subject. Two that I have used are Fischer and Blank "Crafting a Compiler" and Holub's "Compiler Design in C".

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

Sorry, but you have to try first, and then we'll help. How would you approach the problem? Show some work...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming this is a tree structure with one data point per node, then you need a node structure/class that contains an int value and left/right nodes that point to items less than value (left) and those with more (right). So, what you are doing is counting the number of nodes (leafs) in the tree. So, your function should return the count of leaves it traverses. Something like this:

#include "t.h"
struct tnode {
    int value;
    tnode* left;
    tnode* right;
    tnode(int v = 0) : left(0), right(0), value(v) {}
    int countChildren() const;
};
int tnode::countChildren() const
{
    int retval = 1;  // Count self;
    if (left)
    {
        retval += left->countChildren();
    }
    cout << dec << value << endl;
    if (right)
    {
        retval += right->countChildren();
    }
    return retval;
}

By placing the current node's print statement beetween left and right branches, we will end up printing the values in numeric order.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What you propose is essentially what the Hadoop hdfs (hadoop distributed file system) does - it stores your data in chunks of a fixed (configurable) size. Go to the Apache Hadoop web pages and read the design documentation for more ideas. FWIW, you can install hdfs on a single computer. It doesn't need to be distributed per se, except that you lose redundancy and fault resilience.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most scanners generate ascii strings of the code, so basically you only need to open the port and use normal stream I/O to gather the data.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not sure where you can put them, but .aax files are generally encrypted with DRM. Some versions of iTunes can play them, but others cannot. From what I have read, your iPod can play them and deal with the DRM, but you probably need to run iTunes to install them on the device. There are tools out there that can remove the DRM and turn them into mp3 files.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried booting into safe mode, or into the recovery partition?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

These days, most systems will support WebApps apis, which is about as platform neutral as you might get.Javascript is another (and common) platform neutral approach.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Decoder for what? Small domain space here... :rolleyes:

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It depends upon what you want to do. In bash scripts you can assign the output of any other executable to a variable using the back-quote character, as in:

varname=`md5sum filename`
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Knuth, Volume 3, Sorting and Searching, has all the information you need. You should be able to find it in your school library...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It may be a usb power problem. Not all ports on some PC's provide adequate power for such dongles - WiFi devices have a pretty high power cost. Try other ports on your system. At least one probably has a higher power load capability.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Some modems will auto-adapt to the cable configuration. Others won't. I think that for the BT modem you need what is called a patch cable. It has to do with how the wires are cross-connected.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Even if you purchase one (probably about $5 from Best Buy or Office Despot), you should post a complaint with Amazon - they owe you either a cord, or credit. If you don't, then they won't know to review packaging/shipping processes with their providers...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Python has functions that deal with that stuff - in an operating system neutral manner. RTFM... Or do some simple Google searches! I just did, and came up with a bunch of links to stuff that tells me how to do this stuff.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

School assignment - we don't do that. What do you think would be appropriate? In the networking/security domain there are a plethora of issues to deal with. Pick one... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In all honesty, certs really don't mean much. You need hands-on experience. Start with a home network, study, and then apply as an entry-level network operations staff person at a mid to large size company. There is a big need for network operations staff these days. Get your field experience, and then use that to leverage better positions, either at the company you would then be working for, or others that need people with your experience and knowledge.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I've had issues with Win7 losing the ability to see/mount usb drives (thumb drives or other). The solution I have found (works for me and others with this problem) is to remove the USB devices/hubs in your device manager, and then reboot. On reboot, they will be reinstalled and generally the drives will now work. Over the past year and a half, I have had to do this several times on my Win7 laptop at work. The "fix" was suggested by our IT support specialist... and he has to support hundreds of these systems. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And FWIW, I DO prefer C++ to C for my work, but I use C inside my C++ code when it makes sense.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@mike2k "I think most of the cautionary tales about not using C++ for kernel code or other very low-level stuff is mostly a matter of tradition (very dominated by C programmers) and misunderstanding (dominated by programmers with little understanding of C++, and often with a prejudice against it.. cough... Linus Torvald ... cough..). In any case, kernel coding is hard enough as it is, so if those with the competence to write kernel code like the C language better, let them use it."

Agree entirely! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can use a virtual machine and build your OS in that, including using interrupts. In any case, this is not a simple subject, and from your posting you have a lot of studying to do before you start exploring the joys of interrupt tables, jump vectors, interrupt masking, non-maskable interrupts, and all that stuff.

That aside, interrups are generally of two sorts - hardware interrups and software interrups. Hardware interrups are to deal with hardware events, such as data arriving at a port, a keyboard key is pressed, a clock tick has happened (context switch time), etc. Software interrupts are just as they sound, interrupts that allows software to do stuff "out-of-band". An example of this could be the cron task that runs on most systems to run specific programs at specific times.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A bit on the retro side - I vote for APL! Or Prolog? Dibol? Snowbol? Smalltalk (did some good work in that)? Personally, I prefer to work with a mix of C and C++.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you are writing Linux kernel code and drivers (or for Solaris/BSD Unix), it is STRONGLY recommended that you stick with C and not C++. C is often considered a high-level assembler language, whereas though there are C++ implementations that are targeted at real-time applications and possibly kernel development, they remove use of things like virtual functions (including destructors) that cannot be deterministic. RTTI is also deprecated for the same reason.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

File folders are directories. From the Linux getdirentries man page:

GETDIRENTRIES(3)           Linux Programmer’s Manual          GETDIRENTRIES(3)

NAME
       getdirentries - get directory entries in a file system-independent format

SYNOPSIS
       #include <dirent.h>

       ssize_t getdirentries(int fd, char *buf, size_t nbytes , off_t *basep);

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

       getdirentries(): _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION
       Read  directory  entries from the directory specified by fd into buf.  At most nbytes are read.  Reading starts at offset
       *basep, and *basep is updated with the new position after reading.

RETURN VALUE
       getdirentries() returns the number of bytes read or zero when at the end of the directory.  If an  error  occurs,  -1  is
       returned, and errno is set appropriately.

ERRORS
       See the Linux library source code for details.

CONFORMING TO
       Not in POSIX.1-2001.  Present on the BSDs, and a few other systems.  Use opendir(3) and readdir(3) instead.

SEE ALSO
       lseek(2), open(2)

COLOPHON
       This  page  is  part of release 3.22 of the Linux man-pages project.  A description of the project, and information about
       reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.

GNU                               2007-07-26                  GETDIRENTRIES(3)

This will work just fine in C++ as well. Note the reference to opendir(3) and readdir(3). FWIW, the readdir() function has been replaced with the getdents() function. I don't know if any of these work in the Windows environment... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If this is a class project, then don't just copy the code from AD's link - your professor probably knows about that and cheating is generally frowned upon... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It is available in the standard repositories for RHEL and clones, at least for version 6. IE, RHEL 6.x. I have it in my Scientific Linux (RHEL clone) 6.4 standard repository (/etc/yum.repos.d/sl.repo).

So, try running the command yum list 'tkinter*'

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Run the application in the java debugger. That should show you what you need. This may help: http://docs.oracle.com/javase/6/docs/technotes/guides/jpda/

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, AnotherClass has just made the m_int property of SomeClass instances publically available. If you want to restrict that access to just derived classes, then make those access functions protected.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Friends are not inherited. Usually if you are a friend class and you want your derived classes to have access to the friending class' private and protected members, then you will need to add the appropriate functions to access them in yourself (the friend class). Example:

class AnotherClass;
class SomeClass {
private:
    int m_int;
public:
    SomeClass(int value = 0) : m_int(value) {}

    friend class AnotherClass;
};

class AnotherClass {
public:
    AnotherClass() {}
    int getSomeInt(const SomeClass& sc) const { return sc.m_int; }
    void setSomeInt(SomeClass& sc, int value) { sc.m_int = value; }
};