rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to issue a begin transaction and commit transaction statements before/after the actual SQL update statement. That will protect you from other activities from interfering with your transaction.

That will also guarantee that your update gets written to the database in a serialized fashion. First in, first updated.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Start by writing out the algorithm in non-code terms to be sure you understand it. Then apply the algorithm manually to see if it corresponds to what you can observe directly. Do this for both saturdays and sundays. Once you have verified the algorithm, then you can code it. IMO, you are putting the cart before the horse.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but we don't do your homework for you. Show your work and we can help. FWIW, this is a generic algorithm and the code in php, c++, c, c#, et al would be very similar in content (syntactical differences aside).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can also add a b* extractor method the class a that returns the b* from the a object. Then your assignment would probably work.

operator b* () { return p; }

And change the assignment from obj1=obj2; to obj1=*obj2;
That works on my system.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show your work. Just stating the problem would give us enough information.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. Get a new phone and change all your phone passwords.
  2. Wipe all your systems, including the BIOS flash memory. This would include using an industrial strength disc eraser that will clear the boot / partition sector as well.
  3. Reinstall new / patched operating systems. DO NOT USE WINDOWS!!!!
  4. Virus scan all backed up data.
  5. Use a good hardware hardware router / firewall. Configure it to not allow remote management. Do this BEFORE you connect it to the Internet.
  6. Only open up pinholes in the router for the applications you need, such as your VPN.
  7. Change all your VPN access keys and passwords.
  8. DO NOT use the same passwords on your systems as you did before.
  9. Disable remote root logins to your systems if they don't by default.
  10. Use an industrial strength spam and malware scanner for your email. Gmail is pretty good at this.
  11. Make sure you configure IP Tables and SELinux properly. If the OS you installed doesn't support SELinux, get one that does. Period.

Now you are ready to reconnect to the Internet. I'm sure I forgot a couple of items, but these are the important ones, IMO.

Gribouillis commented: Also use a password manager to generate and store passwords +14
rproffitt commented: For some, this is what it takes. +10
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Lock a mutex?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is not trivial and telling you how to start doing this is not in the scope of these forums. There are open source web-based tools out there that will do this for you, the study of which can help you understand what needs to be done. As for document storage itself, you can either store the entire document, or the deltas between versions (uses less disc space) much like a version control system such as cvs, svn, git, et al (all of which are also open source).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried restarting the server? Did your system crash while SqlServer was running? You also might run a disk check to see if you have disc / file system problems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

No code. No help... Post the relevant code where you are having a problem.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@cereal's link is a good place to start. A bit of background information - PL/SQL is a derivative of the ADA programming language. It can also call into the Oracle JVM if you need to write some Java code to use in your database procedures.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please DO NOT multi-post questions to the forums. I have made some suggestions in your other post. Please delete this one.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This constructor is bad - do NOT initialize in the body of the constructor, but in the initializer block:

// Bad
usman::usman()
{
    root=leaf=NULL;
    count=0;
}

// Correct
usman::usman()
: root(0),
  leaf(0),
  count(0)
{
}

Also, with C++ you can add a constructor to structs, which are just public classes, so you can also automatically initialize their members when you construct one. Much safer than what you do with your construction of node in your code (lines 35 and 36), and reduces the amount of code that you have to deal with and verify for correctness.

There are also a number of problems with usman::input() that you need to correct. I'm not going further, but you need to review your code with a more critical eye and not depend upon us to resolve all of your mistakes.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There is no real reason other than "showing off". That said, toupper(int ch) returns an int, so they may have wanted to force it to return a char, which they could have done with a simple (char) cast which is effectively what static_cast<char> does. IE, a waste of space, and it makes the code more difficult to read and parse.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Initialize even and odd to 0 when you declare them. Don't reset them inside of your loop.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This cruft is why I refuse to use Windows. I run Linux on my systems, even my laptop.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming you have an nfs or samba share mounted on the remote system, this should not be a problem. I have done this frequently in the past.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I use gmail and have my phone automatically sync with my gmail contact list. I can add a contact from my workstation and it will show up on my phone pretty much instantaneously. Ditto the other way around, in that changes made on my phone contact list also show up in my gmail contact list instantaneously.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Are you sure all your related code is up-to-date and/or in sync with the version of grunt that you are trying to install?
Also, you need to make sure that appropriate path environment variables are set correctly so the system can find the associated components required.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is not the forum for that question. I would advise that you consult with your attorney once more about your actual liability.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You haven't written the code to reverse the str1 string. Also, your string variables are being declared as an array, and you are putting the input string in a likely bogus position of that array. To declare them properly, do this: string str1, str2; Next, in your loops you look for a maximum size of 10. This is not correct. Look for the terminating null character instead as the guard. IE: for (i = 0; str1[i] != 0; i++). This will give you the size of the actual string (as i) after all is said and done. You also need to declare i outside of the loop as a sizeof_t and not a char so you can use it in the reversal code for any length of string.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Are these compiler, or are they runtime errors? Please show them. As for passing an array into a function, either the function already knows the size of the array, or you need to pass the size in another argument. Better is to use a C++ vector<type> class, and you can determine the size directly at runtime. As opposed to a C++ array<type> class, it can be resized as necessary if you add/remove elements.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not suer, but try C:\ProgramData\MySQL instead of C:\ProgramsData\MySQL. I only use MySQL on Linux and since it is a standard package installation all of that cruft is taken care of for you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

RTFM. There is a lot of eclipse support on the Internet as well on the Eclipse web site.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show your work (algorithm and/or code) and we can help. We don't do your school work for you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is most likely a command line length problem. I'd use a bash shell for loop and as rproffitt didn't suggest I would use cat to merge each candidate file into the merged.csv file.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What code? This question cannot be answered as is.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Remember, the compiler will by default create default and copy constructors, an assignment operator, and a destructor. It is not recommended to do this, but to implement them expressly to do what you need, or to declare them without implementing them so that use in code will result in a compiler error instead of a runtime error - much easier to fix!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need constructors for Draw that initialize the obj pointer appropriately (null for default ctor, and possibly copy ctor though in that case you may want to clone obj from the copied item - ditto an assignment operator). Then, deleting obj in the destructor will succeed, even if it is null - operator delete in C++ (these days) will ignore a null pointer. Note that you REALLY need an assignment operator as well since the one created by the compiler will happily copy everything from the right-hand-side of the expression, including the obj pointer, so you need to clone that as well, or not set it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Without showing your code, it is very difficult to advise/help you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This unit does not appear to have an integrated video adapter, correct? What video card are you using? Also, does it have one, or two display ports? Have you tried a different video adapter. This unit also has an audio-out connector which if you hook it up with a speaker you may be able to hear the POST beeps.

http://dlcdnet.asus.com/pub/ASUS/mb/LGA1156/P7H55-M_USB3/e5846_p7h55-m_usb3.pdf

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I've had good luck with Buffalo NAS devices. RAID-5 is standard as well as easy access from Windows or Linux.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In linux you would use the "clear" command unless you create an alias for it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I don't see anything atttached here. Also, show your code or we can't help much.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume these are GET arguments from a browser URL? If so, then each of mr1, mr2, and mr3 content strings would be avaliable in your PHP $_GET variables. So $_GET["mr1"] would return '60,60,60,60,60'. Anyway, show your code.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

it should be if (&anA != p). Sorry, my bad. Dagnabbit keyboard! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What you are trying to do is called "single sign-on". It requires that both systems are running a service such as OpenLDAP or YP (Yellow Pages), with one of them being the server that will store the passwords and perform login authentication.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

uint8_t as others of that ilk are not defined by default by c or c++. You either need to include some header that defines them for you, or you need to define them yourself as in:

typedef unsigned char uint8_t;

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can add an assignment operator in class b that takes a reference to an a object:

const b& operator=( const a& anA )
{
    if (&a != p)
    {
        delete p;
        p = new a(anA);
    }
    return *this;
}

Also, your b class copy constructor should return a reference to *this instead of obj.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@CimmerianX - I prefer to name the partitions so I can mount them in /etc/fstab by name instead of UID. Why? Because if I have to clone the drive due to incipient failure of a drive, I can clone it and the system will immediately recognize the partitions, whereas the UIDs will have changed with the new device - at least that has happened to me in the past.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Standard boot/partition sectors (old style DOS ones) cannot handle more than 2.2TB disc sizes. As the warning states, you need to use a GPT partition table type. I don't know if Windows supports that or not. Also, RHEL systems (5.x and later) can handle NTFS file systems just fine. What version of RedHat are you using? FWIW, Windows may ignore the partition table type in this case, but I don't think you can use FAT for a 3+TB file system - NTFS will be required I think.

CimmerianX commented: Correct, You need a GPT +9
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can call C++ methods from C#, but not the other way around, easily... If you have a C# service running (as a server I presume), then you can use tcp/ip to send an RPC (Remote Procedure Call) to the service from C++. The major issues will be formatting the calling message properly, and then decoding the response (if any) in the C++ code. C# manuals should have information about how to deal with that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

std::cout << "beep: " << '\07' << std::endl;

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You probably ran out of RAM and don't have adequate swap space configured. Check memory usage, and increase swap space. The system will run slower as the swap file is in use, but it should run. If it continues to happen in much the same way, then you may have a bad RAM chip.

fallout4player commented: yes, maybe. but im pretty sure that i wasnt short of ram. i have 8gb of ddr3 runing at 1333mhz +1
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I haven't used the PayPal API's before, but looking at the samples provided I don't see that they have an API for shipping/delivery instructions. They have objects for shipping info (address, type, costs, etc). You will likely need to invent that wheel yourself, or find an API that supports it. Do note that you will have the source code for these objects, such as shipping_info_object which you could extend with little work.

FWIW, the PayPal API is very clean and straight-forward.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What do you specifically mean by "rank"? How far down the tree it is?

A couple of things about b-trees - usually less-than values move to the left branch, and greater-than go right. Also, just start at the root and iterate: if key == node value, you are done. If key < node key, go left and continue to search. If key > node key, go right and continue until key == node key value. At each step, you increment the level you have gone (your rank I presume) until you have a match. If you don't find a match, then the rank should be -1 (not found).

In any case, look at Knuth volume 3, sorting and searching algorithms.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

MS keys its system based upon certain hardware parameters. Sometimes if you add new cruft to the system, the key no longer "recognizes" the system. One of the reasons why I NEVER use Windows operating systems... Chances are that if you add a new video adapter, the same thing will happen. MS Windows, the gift that keeps on taking.

CimmerianX commented: Yes - This is the correct answer. +9
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is a situation where multiple threads may be appropriate. Have a thread for handling incoming messages, and another for communicating with the remote server (don't close the socket if possible). You have a mutex that controls access to the outgoing messages - grab the mutex from one thread, post the outgoing message to a queue, and then close the mutex. The thread that handles the outgoing messages will wait on the mutex, and when it gets it, knows that it can read the message from the queue into a local buffer, release the mutex, and send the message.

Try using state-machine diagrams to analyze these scenarios and to be sure you aren't getting into unresolvable race conditions and such.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I never do a software project before I model it in UML, including class design, state machines, work/process flows, etc. The visual components of this provide a very good view of what your system is doing, how stuff is related and interacts, etc. My favorite tool for this is Sparx Enterprise Architect. Not expensive, but very complete, including for the use-case and requirements tracking stuff. FWIW, I have been using Sparx EA for over 10 years now...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One question I have is whether these directories are on the same file system, or other file systems (partitions) or drives? Even if same drive and/or partition, there could be file system corruption or disc issues going on. You need to run your chkdisk tools and check for bad blocks as well.