The Way to Programming
The Way to Programming
I cannot believe that what you see wrong with this is that it is “too academic” and “too mathematical” that is the most ignorant thing i have ever heard anyone say in this day and age, where somebody sees order and good practice as a bad thing, if your struggling to understand this just tell me and i will explain it to you , its all good i am here to help you understand, whats bothering you? is it the recursive functions? and this is the difference between self thought programmers and formally educated programmers, namely the clear and scientific approach to code for readability and understanding which everyone would prefer over “hacked code” that comes from lack of understanding of computer science topics such as how memory is stored and how recursion works
again saying that this is a “simple exercise with arrays” once again your ignorance betrays you and is not doing you any favors in the intelligence department, if it was so easy why didnt you write the complete solution to the original question i posted
the project euler questions are all number theory questions that people in the past have worked out without using computers , doing it on a computer is without writing formal mathematical induction methods and even easier because it can test all cases for you , so i dont see how they are of great challenge (up to question 495 is not that difficult to get their solutions), maybe there are a few which are a bit harder but if your know number theory algebra and calculus, euclidean geometry(which all of these topics are thought in 1st year university courses), most of those problems can be dealt with(some very easily which i can see just by looking at the questions)
and i don’t know what your babbling about about size changes, i made this program very much that if changes in size of array, it would still be able to handle any two dimensional array of whatever size and still shift in horizontal and vertical directions, and hence why it appears “academic and mathematical” to you
#include#include #define TRUE 1 #define FALSE 0 #define _Bool int _Bool check_if_prime(int n); int main() { unsigned int nth_prime, number_of_primes; unsigned int test_int; printf("Enter the nth_prime to find: "); scanf("%u", &nth_prime); test_int = 1; number_of_primes = 0; do { test_int++; if (check_if_prime(test_int) == TRUE) number_of_primes++; } while(number_of_primes < nth_prime); printf("The %u Prime Number = %u\n", nth_prime,test_int); return 0; } _Bool check_if_prime(int n) { bool isPrime = TRUE; int divisor; for(divisor = 2; divisor < n; divisor++) { if(n % divisor == 0) { isPrime = FALSE; break; } } return isPrime; }
C is a wonderful place to start. It offers the opportunity to stomp all over memory, to forget about automatic variables, etc. and consequently it instills a level of discipline none of the other hold-your-hand languages require. It is the starting point for most modern programming languages and it doesn’t have a set of classes that will do the work for you. Basically, you have to program when you use C.
You can’t rely on a tutorial for everything. If you don’t know where to start, you may not be ready for this project. Following tutorials is not programming but is copying and pasting and will teach you very little if nothing. Divide the problem in smaller tasks:
Database:
function used by database
how data should be inserted
etc. etc.
Order basket:
add_item
remove_item
buy_item
Having to add users manually is a very bad practice. In every programming job this part is automatic or require only a button press. If you want to learn programming and be a good programmer, you must do the job in the proper way.
After you created a blueprint of the software you can start structuring the program and deciding which library to use and the code will come by itself at this point. We are not good at solving a huge problem at once but we are really good at solving a lot of smaller problems and this is the core concept of programming.
You can create category by adding a tag to items and then displaying only the items which have that tag if you have a little number of entries or you can directly implement the categories in the database.
Step 1:
open notepad
Step 2:
Type this code in the info.php page you created in step 1
phpinfo(); ?>
Step 3:
Upload info.php to your server.
Step 4:
Goto yourserver.com/info.php
Step 5: Success!
Step 6: I have learned this 10 years ago, so it might be outdated by now. Sorry but I don’t have much time to help on today’s stuff.
Did they not teach you how to use debuggers in the class? I found reversing to be extremely difficult and haven’t tried in a long time but hopefully will come back to it. It sounds like you have to figure out what that activator does without actually having it. I’m not very knowledgeable but what I can say is , the activator program has to talk to the main program somehow and what are all the ways 2 programs without internet can talk to each other? The activator could launch the program with command line arguments , it could write something to the registry that the main program can then see, or the activator could inject something into the memory space of the main program, there are also message queues I don’t know much about. If the activator is indeed a patch for the program to give the rest of the functionality, then you are screwed. Here’s some links about inter process communication
http://programmers.stackexchange.com/questions/203149/how-do-i-get-my-programs-to-communicate-with-each-other http://stackoverflow.com/questions/9557631/how-do-programs-communicate-with-each-other
It sounds like to me the .use file might be a cryptographic key possibly I don’t know. You can reverse engineer the .me file format by looking putting breakpoints on all the fwrite calls in the program and then finding where it’s writing to the .me file and see what it’s writing to it and why. I always wished someone would help teach me how to reverse engineer but atlas I think you need to know people or be really really really driven to learn it.
You can do it with HTML and JavaScript.
If you want something more, do as Jangrie said using Ruby or PHP.
One thing to note is that all of these articles are actually written using Latex, with a specific template, e.g. have a look at this fir IEEE articles:
https://www.sharelatex.com/templates/journals/ieee-journal
private static long getTimeSinceStart() { return 0; //mmmm free bytes }
When obfuscated .NET/ISIL and Java are annoying to RE and patch only because no matter how skilled you are you still have to manually do everything unlike PE level protections where worse case there is encryption and VM and a decryption handler.
If you can’t do TAGES, SecuRom, UbiSoft protections you’re pretty much a wannabe in the scene. I can’t do them but it’s because I’m one person and not a team who can spend weeks or months on them.. Oreans is the hardest protector outside AAA game stuff and dongles.
You can get help from below help links
try-catch (C# Reference)
https://msdn.microsoft.com/en-sg/library/0yd65esw.aspx
try-catch-finally (C# Reference)
https://msdn.microsoft.com/en-us/library/dszsf989.aspx
And since you seem to be starting, why jump into a version that is already 10 years old.
There are 2 free editions of Visual Studio 2015. Visual Studio Express, a toned down version that has enough for the amateur programmer, and Visual Studio Community, that is almost equivalent to the Professional edition, but free only for individual programmers or small organisations. If you are a professional programmer, the Community edition offers tools that, in 2005, were offered only in the bigger and very costlier editions of VS.
https://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx
https://www.visualstudio.com/products/visual-studio-community-vs
I wound up re imaging this whole server and thankfully my scrambled attempt at gathering my MySQL databases was successful in helping me restore all of my sites.
I was able to get further in getting this MySQL thing thanks to you guys. Unfortunately it couldn’t go much further, when I uninstalled the MySQL, I noticed that it uninstalled a good deal of my Plesk stuff as well.
Thank you both though for your assistance. I wound up upgrading (great for me really) to CentOS 7 64bit (plesk 12). Now I can have my PHP 5.4.4 and eat it too ;D
Also it turns out that CentOS 6 just was not meant for PHP 5.4.x to run on it for some sad reason (tried on a fresh image and still no dice with it).
If you use Xamarin you can run C# app on Android
My test program that calls execve is simulating the real one in the mail facility. I’ve bolted my finished checkpassword program into the mail stream and it is getting the right info.
The easiest and least flexible way is to use popen():
#define BUFSIZE 1024 #includemain() { char buf[BUFSIZE]; FILE *p = popen("/bin/who","r"); while ( !(feof(p)) ) { fgets(buf,BUFSIZE,p); dowhateverwithdata(buf); } pclose(p); }
Of course you can use fscanf() or whatever you want to get the actual datastream. Obviously this approach is limited in that you can ONLY read OR write to the spawned process, not both.
Another, more flexible way, is (of course) much more complicated. I won’t go in to detail, but you can use a function called pipe() to create a pipe from a 2-element int array (i.e., int thing[2]; pipe(thing);) This makes the array into a pair of file descriptors, 0 is for reading, 1 is for writing. so for two-way communication you would need two pipes pointing opposite ways. Then you can use fork() to create a child process. Then, in the child, you can use dup2() to make the appropriate ends of your pipes into the stdin and stdout of your child. Then you can exec() the process you want in the child, and its stdin and stdout will be your pipes. In the parent, you can read the up pipe and write the down pipe and wait() and stuff like that.
That approach may be a little beyond what you want or need from this thing. If you want code that does that stuff, you can mail me and i’ll throw something together.
BUT!
Have you thought about this? There are a fair number of standard UNIX C functions that do things with the utmp. That’s really what you’re after, isn’t it? Well yeah, since you want to monitor who’s logged in. You can do all sorts of fancy stuff doing direct utmp operations. That would probably also offer more flexibility as far as user monitoring is concerned. You get back cooler data too, as i remember. I once wrote a program like this and all my friends wanted it. Unfortunately shortly after that my account at that school got revoked– they thought i was hacking, just cos i allocated a whole bunch of shared memory and didnt put it back and crashed the system 🙁 But if you’re interested in that approach, look in to the getutent() and related man pages.
Sign in to your account