rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You might want to read the mount and mount.ext4 man pages for more information about the options available. Some may be useful to you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming this system is 64-bit capable, then it should not be a problem. There are many 64-bit linux distributions you can download for free and install as you wish. FWIW, 1.5GB is not bad for many Linux distributions, but I would NOT want to run a 64-bit Windows system with that little RAM.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Again, it comes down to compiler optimizations. To really see which is faster, you need to disable ALL optimizations, either via a command-line argument, or an IDE configuration option.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Depends upon the optimizer - both execute 100,000 assignments in the end. If the optimizer is good, it will detect that you are assigning x from y without any computation, so it would optimize out the loops and just assign y to x once.

Unimportant commented: Great irony. =) +4
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

BTW, when my sister-in-law read the review, her email response to me was (as in Doctor Who) "It's bigger on the inside!" ... :-) And then "I want one!".

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Disclaimer: I work in the Nokia Mobile Phones division as Senior Systems/Performance Engineer.

  1. I own a Google Nexus One Android phone (personal - gift from Google). I like it, but it is getting old.
  2. I have 3 Nokia phones - one is my main phone, a Lumia 920, one is my previous main phone, a Lumia 900, and the other is a Series 40 "feature" phone for R&D purposes. I also had an N8 phone, but it broke and is now only a WiFi-enabled smart camera that I have "lent" to my sister-in-law who is a professional animation artist and teacher/professor. As a camera, it is quite stunning! :-)

Nokia has some great low-end smart phones with good cameras and a lot of features. Ditto Android phones. Go to the various cell phone stores in your area, and play with them until you find one that fits your budget and needs. Don't pay attention to the sales people - they have their quotas and high-margin devices to flog. If you want to wait, and an awesome camera is your desire, then wait until you can get the new 1020 Lumia phone. Its camera and microphones (for still, video, and audio) are at least a generation ahead of anything else on the market - and it is thinner/lighter than my 920. Here is a review from TheReg: http://www.theregister.co.uk/2013/07/15/nokia_lumia_1020_technical_walkthrough/

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

ok. On linux, the network manager tool will scan for and list the available access points, assuming you have a working wifi device on the computer. In such a case, I recommend that you look at the source code for that - one of the benefits of working with open source software systems! :-) Personally, I don't know what the api's would be... In any case, that's what I'd do, and in about 1/2 hour I would know what they were... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What operating system do you want to use? How you do this depends entirely upon the API's the OS provides. Windows systems will be totally different from Linux or Android systems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Mike2K rocks! Thanks for the post Mike. I haven't pulled myself up to speed on the new standard. This helps, and I WILL do some dilligence on it... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also note that I align the start/end brackets. Some don't like to do that, but I find it a lot easier to scope blocks of code. Style IS important. Readable code generally has a lot fewer errors, in my experience! After all, I only have 30+ years of it, and I still mentor engineers who have "senior" status in my organization... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please indent your code, otherwise it is VERY difficult to read! Example:

int* merge (int *a,int *b)
{
    int *arr;
    int i,k,j;
    int size= MAX1+MAX2;
    arr=(int *)malloc(sizeof(int)*size);
    for(i=0,j=0,k=0; k<size; k++)
    {
        if(a[i]<b[j])
        {
            arr[k]=a[i];
            i++;
            if (i==MAX1)
            {
                for (k++;j<MAX2;j++,k++)
                arr[k]=b[j];
            }
        }
        else
        {
            arr[k]=b[j];
            j++;
            if (j==MAX2)
            {
                for(k++;i<MAX1;i++,k++)
                {
                    arr[k]=a[i];
                }
            }
        }
    }
    return arr;
}

That makes errors a LOT easier to find! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The main difference between vanilla java and Andoid's Dalvik is the byte code generated by the compiler and the virtual machine to execute that byte code, plus the additional API's that Dalvik provides.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Does your laptop's network tool detect the SSID of your router? If the router's WiFi is secured, have you logged into it?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ah! You must have ordered the keyboard for dyslexics... :rolleyes: Sorry, couldn't help myself!

Seriously though, you need to go into the Control Panel / Ease of Access Center and turn on the on-screen keyboard. See if that is also reversed. In Linux you can remap the keyboard pretty easily, but I don't know off-hand how to with the current crop of Windows machines. I remember I could do that back in the Windows 3.1x and Windows 2000 days.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

DarkLightning7 is about 99% correct... :-)

In reality, you need to understand context. When you call a member function of an object, inside that function, "this" refers to the object in context - that the function is operating on. Inside the constructor of SomeClass, "this" is no different than inside the Someclass member function someFunction(). IE, it helps you identify the specific instance of the SomeClass you are operating upon. Confused yet? :-) This is normal.

So, think of it this way. You have a class called Car. You create an instance of a car (make or model not relevant here). You get into the car. In that case "this" refers to the car you are sitting in. Clearer yet? So, you call the Car::start() method. Inside the start() method, "this" refers to the SPECIFIC car you are starting. So...

Car myCar = new Car;
myCar.start(); // Inside start() here, "this" refers to myCar.

Still confused? Keep asking questions. We'll try to get you sorted out! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Are they obviously taken with your computer webcam, or are they from some other source? If you can tell from the backgrounds that your computer webcam was used, then you can assume you have been seriously hacked and someone is monitoring you, possibly in real time!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, if you want some information about SH, go to the source: http://www.safenet-inc.com/
I don't know what app you are using that utilizes this bit of (in my opinion) malware, but you could try removing it from your system (add/remove software) and see what breaks...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The Stroustrup book will help you learn C++ programming, and it gets into classes, methods, member/static variables and all that. The UML Distilled book is pretty thin, page-wise, but it a great overview of the UML modeling language and OOP in general. It is clearly and well-written with a lot of useful diagrams. It was $29.95USD (full price) when I bought it quite a long time ago. The latest edition is $34.01USD on Amazon. Used versions are available for as little as $2.55USD. Also, there are a LOT of OOPS tools/documents/tutorials and free books on the Internet. Remember, Google is your friend!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Thanks for the comment, nitin1. I've been in this business for 30+ years, published articles, contributed to graduate-level text books on large-scale distributed systems, have a US patent for adaptive system software, and was the principal architect/engineer for the software that runs most 300mm semiconductor, flat-panel displays, and disc drive plants in the world today. FWIW, I am an engineer without degree... yet I am titled Senior Systems Engineer for Nokia. If I didn't have the chops, I wouldn't have the title!

I have been doing OOP since the late 1980's. Hold on a second while I grab a few tomes from my bookshelf...

Ok. Here are 4 that I have got a lot out of:

  1. Design Patterns - Elements of Reusable Object-Oriented Software, by Gamma, Helm, Johnson, and Vlissides.
  2. Analysis Patterns - Reusable Object Models, by Martin Fowler
  3. C++ Programming Language, by Bjarne Stroustrup (the creator of C++)
  4. UML Distilled - Applying the Standard Object Modeling Language, by Martin Fowler (forward by Booch, Jacobson, and Rumbaugh)
nitin1 commented: huge respect!! +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Don't give short shrift to "bookish type knowledge". I was giving a paper at the OOPSLA conference in San Jose in 1996 and was in the meeting where Booch, Rumbaugh, and Jacobson announced that they were merging their different, but complimentary, object oriented design methods into a single form, UML, and that they would all be updating Rational Rose to encompass that new modeling paradigm. Booch is a great teacher, and if you really want to get into OOPS, then you need to read such books so you can start to get an intellectual appreciation and understanding of the domain. Students of science first take classes to get the theory, and then they go to the lab...

And, good luck!

nitin1 commented: yoo!! too motivating.idk how you meet all thee people. you once said about some intel person, he was your freind. :p +2
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you installed the wxGTK, wxGTK-gl, and associated development packages?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you want a script or command to run at boot, but not be a service, then it is intended that you add it to the /etc/rc.local script. I do that to start openvpn connections on boot, for example.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, what is your question? Have you written some sample code for us to look at?

In any case, heap management is what you are talking about, and there are a lot of techniques to properlyl manage it. How you do it in C vs C++ are very different, and different techniques can be used with different size objects in either to great effect. One of the big problems is heap fragmentation which happens when you do a lot of allocations and deallocations of small things, such as strings or small structures/classes. This can cause severe memory consumption over time for long running applications, such as servers.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but we don't do your homework for you! Post your approach to the problem, the techniques you would use to optimize the workload amongst the clients, and the math to apply to it. Then we may be able to help you find the errors of your ways... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, look for it in /opt/sqldeveloper/bin, and make sure the shell script has been made executable.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Make a backup copy, install directly, and see how it works. If you have a problem with it, then you still have the original to import from.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I remember when in my mis-spent youth, we would call someone a "nimrod" because they were clueless! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, all great suggestions (even my own...). :-)

In any case, start by decomposing your 1 point statement:

  1. Add a service class to the project named Student. This program will encapsulate the concept of a student, assuming a student has the following attributes (instance variables): a name, a social security number and a GPA (e.g., 3.5). For the Student class you will write the constructors, accessors and mutators, and toString and equals methods. In the client application class you will instantiate student class objects and write statements (method calls) to test the methods in your student service class

To this:

  1. Add a service class to the project named Student.
  2. This program (class) will encapsulate the concept of a student, assuming a student has the following attributes (instance variables): a name, a social security number and a GPA (e.g., 3.5). IE, member variables of name, ssn, gpa, etc.
  3. Implement the methods specified (constructors, assignment methods, getter methods, toString method, etc).
  4. Create an application (he calls this a class, but that can be optional) that creates objects of the Student class with appropriate data, and then manipulates that data, and finally outputs that data (toString) to validate that the actions you took are correct.

My most common bit of advice to my junior colleages is always to "simplify, simplify, simplify"... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Yagi-Uda antennas are truly awesome! Because of their tight directionality, they don't usually interfer with other radio transmitters/receivers. I taught a class once where we used one to link two facilities via WiFi that were over 1/2 mile (a kilometer) apart. The signal loss was negligible, and both facilities have "seamless" connectivity to the internet. One had the physical broadband connection, and the other did not. A colleague of mine uses these antennas to connect his house in Hawaii to a cell tower (with a nano-cell) so he can get cell coverage out in the boondocks where otherwise it would just be "dark country".

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What stultuske said, plus this - the reason I don't use IDE's to generate code, java, c, c++, or other is that when I write code I want FULL CONTROL over what is going on - at least to the extent that the compiler allows me! So, I use make for C/C++ (and sometimes java), and ant/maven for java applications (when forced to). All code is written in my text editor of choice (nedit for Unxi/Linux systems and notepad++ for Windows).

The ant build tool is part of the java distributions. Maven can be found here: http://maven.apache.org/

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can create a sed script that will loop/process all the data in a file. I do this for processing script output into CSV format data. Here is an example from my bash script:

cat >$SEDFILE <<EOF
s/^/"/
# Convert space delimiters to ","
{
 : dospc
 s/ /","/
 t dospc
}
# Convert equal sign to "," to separate tag name from value.
{
 : doequ
 s/=/","/
 t doequ
}
s/$/"/
EOF

Each bracketed block is a "do while true" loop that will loop until the 's/...' condition no longer generates any matches. Normally sed will only match one element on a line. This allows you to match any number of similar elements on any number of lines. FWIW, this process works for input files of 100's of thousands of lines, and quite efficiently!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Processes are assigned "random" (sequential) pids by the operating system when started up. You can determine what PIDs are assigned to which processes with the 'ps' command and then use the 'kill pid' command to kill a specific process. You can also kill a specific named process with the 'killall name' command. The netstat command is useful for determining which ports are in use by which processes. FWIW, a server process will use a pre-defined port to listen on for connection requests, and once it accepts such a request, it will get a socket with a private port (randomly assigned) for the client to communicate on.

So, since it is obvious you are new to this domain, it should be noted that you CANNOT pre-determine the PID assigned to a process, and though a server process can use a pre-defined port to listen on and accept connections on, you cannot pre-define the port that will be used for the client<->server communication channel. Don't try - doesn't work! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

fscanf() -> cin
fprintf() -> cout
void main(...) -> int main(...)

IE, what Ancient Dragon said. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Windows Phone 8 OS will attach via USB to a Linux system and appear as a USB drive, allowing you to copy files from one to the other without problems. If it is an older Windows phone (7.5 or earlier), then it requires a Windows OS to connect with. As I recall, the 720 is a version 8 operating system, so it should not be a problem in getting photos from the phone to your Ubuntu system.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

C# is not particulary portable, even if you use Mono on *nix systems. Convert your code to C++ and it will become much more portable... Or at least compilable.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Each bit of hardware cruft has its own peculiarities - so there is no "one size fits all" book for this stuff. The hardware manufacturer's data sheets and programming guidelines will help. I use embedded ARM processor boards for a lot of projects, and the ones I use support Linux for a board-level OS - mostly Debian distributions. They also provide host-side gnu/gcc compiler tool chains so I can build a new board kernel on my workstation, and then finish by compiling applications on the board itself.

Most direct control of the board's capabilities are via io-in and io-out functions - twiddling low-level i/o ports on the board. You may also have to do some dma programming as well, depending upon the functions required.

Also, if you are getting into embedded hardware, learn about JTAG functionality and tools. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Learning basic C/C++? Better to use GCC compilers and tools rather than MS ones - they are more "standard". You can install MingW or Cygwin on Windows, or a Linux virtual machine (with Virtualbox for example), and learn there. MS Visual Studio is specific to the Windows environment, and does not translate to other systems very well at all.

FYI, I have 30+ years software development experience in Unix/Linux as well as Windows environments. I only program in Windows (Visual Studio) when I have to, because of its "unique" requirements. IE, code developed for Windows ONLY runs on Windows! Whereas code developed for open source systems (posix primarily) will run pretty much anywhere, including Windows.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is called "functional decompisition" - breaking the problem down into understandable chunks. Using pseudo-code is good for this. The approach to solving this problem in particular can be functional, or class-oriented. First, think about the problem domain, and then determine which approach fits best. FWIW, sometimes it is a combination of both! :-) In my 30+ years of software engineering experience, I still find that most problems are best solved with a combination approach.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are a number of problems with your class. One is a lack of initializers in your constructors. Two is that you are using non-const arguments for many functions (copy constructor, assignment operator, and other operators). Not delving into the guts of your method functions, this is a better approach:

class Crowd
{
    int* m_pElement;
    int m_number;
public:
    Crowd();
    Crowd(int number, int* pElement);
    Crowd(const Crowd&);
    ~Crowd();
    Crowd& operator=(const Crowd& m);
    Crowd operator+(const Crowd& m);
    Crowd operator*(const Crowd& m);
    Crowd operator-(const Crowd& m);
    Friend ostream& operator<<(ostream& o, const Crowd& m);
};

Crowd::Crowd()
: m_pElement(0),
  m_number(0)
{}

Crowd::Crowd(int number, int* pElement)
: m_pElement(pElement),
  m_number(number)
{}

Crowd::Crowd(const Crowd& cpy)
: m_pElement(cpy.m_pElement),
  m_number(cpy.m_number)
{}

Do bear in mind that the pointer assigned in the constructors is not a copy, and it isn't protected via a reference count, so if in your class distructor you delete the pointer, it will also no longer be valid for other members of the class that contain it - can you spell core dump? :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, this is connected directly to the xp box? Did you "share" the printer so it can be seen on the local network? Also, as RIK asked, how are you trying to connect to it from the Win7 box?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Personally, I could use a memory upgrade - I keep forgetting stuff! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Mike2K points out a common coding issue - proper scoping of loops. My personal process says "scope everything" - loops, conditionals (if/then/else), etc. IE, place proper brackets around all loops and conditional blocks of code. Then, when you need to add a line to them, they will still be properly constrained! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Myself, I prefer to use an insertion sort that uses a modified binary search (bsearch) algorithm to determine where in the output array to place a candidate key/object. It has the advantages of qsort and bsearch and the only downside (performance wise) is how you grow the target array. If you know the number of elements it will contain in advance, then that is a null-sum game. If you don't (it grows dynamically), then I have found that a binary increase in size (2x increase when needed) works pretty efficiently. The C realloc() function does that rather well... :-) The main overhead of this is to move stuff down when inserting a new element, but that is not too onerous with modern processors and the C memmove() function.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Unimportant's links are good places to start, but you need to think about the process/protocols to communicate from client->server->client.

  1. Server starts and "listens" on a port for connection requests.
  2. Client attempts to "connect" to server on that port.
  3. Server "accepts" the connection request, getting a socket associated with that specific client.
  4. Client sends data to server.
  5. Server responds to client.
  6. Ad-infinitum... :-)

Have fun! This is basic networking 101 in action... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What are you trying to do - 1. connect a Lumia phone to a Linux system, or 2. install Linux on your Lumia? FWIW, I am a senior Nokia engineer so I know a bit about these subjects! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You may need to reset the router to factory settings - there should be a reset button (possibly recessed - needing a small device such as a pin to depress) on the back of the router that when held in for 10 seconds or so will reset it to factory settings. Then, you can use the default http address, admin id, and password to get into it from your computer and then reconfigure it appropriately. NEVER let a neighbor configure your network for you! Take control yourself!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As Mike2K said (but not in so many words), how you install software depends upon the Linux distribution you are using - YUM/RPM for Red Hat derived systems, apt-get/aptitude/synaptics for debian/ubuntu ones, emerge for Gentoo, etc. Every distribution has its favorite! IE, one size fits none... Then, there is installation via source code - an entirely different thread I think! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume you mean Fedora? All Red Hat distributions (RHEL and Fedora) use the YUM package manager. Yes, you can use rpm directly, but it won't deal with missiing dependencies, which yum will do. IE: yum install package-name

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you change the cluster size on an hdd, then you will need to reinstall the os and everything else! Not a good idea if you want to keep your system intact! I think you are fubar until you re-install the OS and all of your data and applications (have backups, do we?)...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try by temporarily disabling McAfee. If you can install it, then you can re-enable McAfee security.