rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, what is your problem?

rproffitt commented: So far, it looks like they are new to asking the questions. +10
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Don't just start by writing code. Yes, that is important, but more important is analysis, design, and systems modeling. Know what you want to do, in detail (analysis). Model it so that what you are thinking is expressed in concrete terms. Then, design of the system components, using the model to understand their relationships and interactions. I find visual tools very useful for this. Myself, I use Enterprise Architect (Sparx Systems) since it is a full life-cycle engineering tool that lets you turn models into code, and vice-versa, and is not too expensive (about $200USD for the professional version). It will generate and reverse engineer C, C++, C#, Java, and other language sources as needed.

And no, I am not a Sparx representative! I have been using it for about 10 years now though.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to redo lines 59-65 - the input is only taken once. It then becomes an endless loop unless you input 2 in the first place.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Read Niklaus Wirth's seminal CS text "Algorithms + Data Structures = Programs". It has had an honored place on my bookshelf for many years.

pritaeas commented: And mine! +15
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You don't indicate what hash algorithm(s) you are using. Most generate hash values as hexadecimal strings which you should be able to compare. I'm sure VB.net supports md5 as well as sha256 algorithms. md5 is much faster and is generally good for this purpose. sha256 is more commonly used for crypto systems and for signing program packages and source code to detect hacking.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One suggestion is that you always put the numeric value on the left side of the expression. That way, if you accidentally use '=' instead of '==', the compiler will complain. IE:
else if (0.00 = grade && 64.99 >= grade)
This will generate a compiler error for the first term. Also, I think you want to use an 'OR' instead of 'AND' as in
else if (0.00 == grade || 64.99 >= grade) because the grade cannot be both 0.00 and <= 64.99 at the same time (unless it is actually 0.00). Anyway, you really need to re-analyze your code. I don't think it is working the way you want.

Reverend Jim commented: Ah yes. The Yoda conditional. +14
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You aren't providing enough information. Please post both pages here in their entirety.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What does the IDE log file tell you? Your post doesn't have enough information to help you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. What OS and version are you using?
  2. What programming language do you want to use?
  3. How is the modem attached to the computer? Is it a serial modem, or USB?
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We don't do your homework for you. You need to analyze the problem and provided code and then decide upon an approach. Until you do, and make the code enhancements needed to fulfill the assignment, don't ask us to help. Once you do, and post your errors (compiler or runtime) here along with your code, then we can help point you in the right direction.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As long as the PDF is not locked, there are a number of free editors. Try a Google search to find one that suits you. You can also do a short-term subscription to the cloud-based Adobe Acrobat PDF editor which for a month or so isn't too pricey.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Like James, I also did a considerable amount of Smalltalk development in the early 1990's. We were in the process of deciding whether to use ST or C++ for the development of FACTORYworks, a major semiconductor factory MES. We did a lot of prototyping in Smalltalk to prove our concepts, but in the end went with C++ for the production software. Because ST is so well designed as an object-oriented language, it was not difficult to take those prototypes and implement them in C++, though we had a LOT of framework stuff to do that ST supported out-of-the-box, such as reference-counted garbage collection, inter-object and inter-process message passing, etc. I managed the design and development of that framework. In the end, we had 10 million lines of production code, not one delete statement, and zero memory leaks. We could also plug in a shared library and voila, instant support for another relational database!

I will always have a tremendous respect for the inventors of the language at Xerox Parc - a place that was home to many of the technical innovations that we now take for granted.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

BTW, what version of PHP are you using for this project? And did you install as a package, or build it from source?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, a lot of web sites use multiple servers behind a "load balancer", most of which such as F5 devices, are round-robin and it is entirely possible for one request to get passed to a server under low-load, but the next to a server that is grinding away on other jobs. We certainly had this issue at Nokia with our proxy servers. You might also want to consider Cereal's suggestion about the array encoding.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried to convert the hex string to bin (hex2bin()) and then to base-36? Or the binary string to base-36. In any case, it must be a pretty big number to need the base-36 conversion to compress it. Some more information, and the original binary or hex string would help to sort this out. We could try some different approaches to see what works best.

Final question, which version of PHP are you using? I know that with 5.4 I had to do a lot of bug fixing in a number of areas where it was just wrong in order to do my work with Nokia.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. Show work! At least the function 'probsPerSet' has an argument signature that you can mutate to get different return types, such as:
void probsPerSet(int& result); - your initial function.
void probsPerSet(double& result); - an alternative function.
etc.
The compiler will happily sort these out for you, so if you pass a variable of the correct type (int or double) to the function, the proper function will be called. How does it do this? With something called 'name mangling'.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is standard stuff. The main things are these: security, accessibility, security, security, security... :-) IE, don't try to do this if you are inexperienced in setting up internet network accessible servers in a secure manner. Accessibility is not so much a problem. You can either make your server fully internet accessible (not a good idea), or poke a hole in your firewall for the ports you need to make your system accessible. In any case, you will start getting probes almost immediately to find weaknesses in your network and server that will allow malware criminals unfettered access to your systems, data, and other resources. These are reasons why using hosting services with good security practices is a great idea when starting out. Trust me, I do this for a living! And the game changes so quickly that even if I were setting up an internet-accessible network server myself, I would use a reliable service provider. When I was at Nokia, we had thousands of servers that were internet accessible, and we had an entire IT security team to deal with this cruft. Even when we migrated from our proprietary server farms to Amazon EC2 systems, our security team worked closely with Amazon experts to secure access to our servers that supported over 100 million customers.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not a good approach. Set up a Sieve of Aristhostenes array (I usually hard code a 10K array) for initial lookup - remembering that a%2 == 0 indicates the number is even, hence not prime. You only have to deal with odd numbers. If the number you are looking at 'a' is bigger than the 10K array limit, then you can easily find with a recursive algorithm that will minimize the number of divisions you need to perform. This is a pretty good article on the subject: https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes

I coded the solution to this many years ago and could determine if a number was prime up to 15 digits on an old 80286 / 80287 processor computer in a few milliseconds. With current infinite precision libraries such as Boost these days, you can go to any number of digits in a very short time.

rproffitt commented: Some folk find it odd to use prior works. I think this makes us even. +10
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What AssertNull isn't saying (directly) is that you are breaking the KISS principal. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I think you are also missing a terminating brace for the server while (1) loop. You are also missing a return value in server main. Even though the server never terminates, this should cause all current compilers to complain.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What host OS are you running? I have run XP and Win7 on my CentOS 6 Linux system without problems. Haven't tried Win8.x yet.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This entire situation has gone way out-of-hand. Fix your iPhone with non-apple parts? Oops - it's now a brick. Fix your car or have it fixed at an independent shop? Sorry, but our (the car company's) gear and software are proprietary. Only the official factory dealership can do that! What dren! What if it (what/which ever 'it' is) breaks when I am out of the country, or somewhere that an "official" dealship or repair facility is not available? If it keeps on like this, even bicycles will have proprietary nuts and bolts!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The simplest solution is to change your network's ssid to some unique name that will not likely be replicated somewhere else. You can keep your password.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you looked into Amazon's S3 storage service?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As are 5 and 7 (primes). Post your code please. RSA algorithms are covered thoroughly in a lot of open source documents and code.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming that line 4 is the contents of the function on line three, then your code is totally bogus. Is 'a' an instance of some class, and getdetail() a member function of that class? SHOW YOUR CODE!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. Leave the loop out of getDescription() for Arrow derived classes.
  2. Don't derive ArrowBundle from the Arrow class.
  3. In main() for your choices, the arrow types should not be ArrowBundle types (see #2 above), but should be of the appropriate type (FireArrow or StandardArrow) added to the arrow bundle. Also, you might want to rename the arrow instance to arrows to better describe that it is a set of arrows (Fire and Standard).
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please do not double-post here. If it was a mistake, you can delete one of them.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You cannot do what you want in the matter of what you want. However, if your classes have factory methods, and are registered with a "global" factory, then you can create an instance of these derived classes by calling the factory construction methods with the name. Something like ClassFactory.create("derived1") assuming that "derived1" is a registered class name with the factory. Then ClassFactory can look up the actual class default constructor and make one for you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but we don't do your school work for you. Make an effort. Post your code and errors/problems you are having here and we may be able to help.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Heap memory management is not a simple issue. If you are using C++11 then look into shared_ptr, weak_ptr, and unique_ptr classes for memory management of them. For C++ reference on this subject see http://www.cplusplus.com/reference/memory/

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You don't show the code in your Territory destructor. Are you throwing an exception there? If so, then you need to declare that in the header.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Much better. Here is a link to the libxml2 documentation. You may find xpath of use.

http://www.xmlsoft.org/html/index.html

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What is your time worth (being self-employed it is worth more than if you were an employee with benefits, etc)? Multiply that by 475. Require half on delivery, and half on acceptance (they will need to test it out). Any changes that they require will add to the 475 hours, and that needs to be spelled out in the terms of your contract. You did get a contract of some sort? Or an accepted statement of work (SOW)?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In this code

    <?php
         foreach($currencies as $m => $value) {
      ?>
       <p><a href='#' type='submit' data-toggle='modal'
                      data-target='#currencyModal'><?= $m; ?></a></p>
               <?php
                       }
                 ?>"    

You iterate through the entire array, so naturally you get the last $m and $value read. If you display all the keys and let the user choose which they want, then you can access the value part directly. I know that's what you think you are doing with the form submit code but I'm not sure it is doing what you want.

In any case, this is a good example of improper use of php on a web page. It is basically impossible to debug and side effects are massive.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Do you really expect us to analyze and comment on almost 1000 lines of code? I'd be happy to for my normal consulting rate of $200 USD per hour... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are plenty of books, including online, which will cover those subjects for you. This forum is not a classroom.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The goggles look totally dorky! The concept is good. If it had a display something like Google Glass it wouldn't be so bad.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is a classical symptom of an underpowered power supply. Rule of thumb is to get a power supply with twice the wattage as you figure you will need.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show your output.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but we don't do your homework for you. Code the problem and when you are having trouble post the code with errors and an explanation of when you get them here.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Neither are good code. A string is not an integer. The length may be. Any character of the string can be considered an integer, but the string itself is not. What are you trying to accomplish here?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please put your xml in code blocks and make sure they are properly indented and nodes are on separate lines. No one wants to analyze this as is.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to use a good graphics library that may have downloadable extensions to do what you want. Check out Qt. There are also some good gaming development platforms, but not being a game developer I can't personally recommend any. The good thing about Qt is that it is fully cross-platform and open source.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What happens if you boot from a Windows install CD/DVD?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I would try dropping the share, reboot, and reestablish the share. Also, when you try to log in again from the laptop, make sure the displayed workgroup is correct. If not, then use workgroupname\username instead of just the user name.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Simple. The farmer secures the duck under his hat - now there is only the farmer, the wolf, and the bag of corn which the wolf won't be interested in. BTW, how does the farmer keep the wolf from eating him? :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. Please indent your code.
  2. It is not polite to ask people to analyze almost 300 lines of code in a forum like this.
  3. Isolate your problematic code and tell us what is going on.
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Study and work in the subject for about 5+ years and you might get a clue. FWIW, VBA and other Visual Basic versions are NOT used for enterprise class software, other than for writing user interface components. They then will typically send transactions to an application server (typically written in C++) to be processed, with the results returned to the VB application.

සශික commented: Thank You Sir :) +1
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

NEVER allow direct SQL code to be passed to your application. I always use stored procedures in the database and data binding to eliminate SQL injection altogether. You can write some php functions that take user input for data modifications and such and those can in turn parse the data to avoid "bad stuff", then calling the stored procedures with the required arguments in turn.