The Way to Programming
The Way to Programming
Simply Reverse-Engineering, lets say you coded an app in C++ and you distribute it on .exe form, if a good Assembly programmer saw your program he can see every single line of your code (in assembly) but if he is good he can see exactly what you doing and can create crack or keygen or whatever he likes
First of all, don’t. become homeless. It’s a horribly difficult situation to get out of. So better to take a job, any job. Call centers are always looking for employees, though it does suck as a job. If you live in a relatively big city, bars are a good choice too.
I the worst case, flip some hamburgers in your local mcdonald’s.
About learning c and c++, if you’ve ever dabbled in any other programming language and you could handle it, learning those two won’t be to big of a problem. But as incognito said, it’s not a guarantee that you’ll find a job.
First of all.. u need IDE and compiler. Many windows user will suggest you microsoft visual C++ (any edition e.g express, professional..etc)
But i SUGGEST “Code::Blocks” which is a free C, C++ IDE (Dont dare you to think something like a free app dont have quality). It comes bundle with GCC compiler and GDB debugger .
Why ? because, codeblock help you to learn easily and systematically with current C/C++ standard. You can used it on any windows …any OS.
Where to learn ? Download or watch the online tutorial, warez-bb has trillion of resources. Just need self effort..
To be a good DBA you have to be able to think like a programmer as well as have DB skills. A DBA will also command a better salary in general (not always, though).
A programmer, on the other hand, has a more varied job although there’s pressure to learn new languages and skills, including those of a DBA (to be able to do DB testing and development).
Neither is “better” than the other: they simply have different skillsets and focus.
you can see i didn’t continue to learn this for a 4 days Sad, i was disappointed and didn’t have a lot of time, without free few hours it is nothing for a learning. Now i am trying to understand but still i am not sure what is happening here. What i miss when i can’t figure it out? Many basic thing in programming (theory) is not so hard to learn it is much more harder to understand when you have a lot of pieces into a task. Look here, look there, that is for that and that, call that here, than create that,.. Sad
Let’s try with while (x < 2) where we get for output 4 and 1
a first true statment 0 < 2 we create a first array object m4a[0] = new mix4(); instance variable counter of class Mix4 counter is now 1 count is now 1 this line count = count + m4a[x].maybeNew(x); count = 1 + m4a[0].maybeNew(0); give us for now 2? 2 = 1 + 0 right? We created first object m4a[x] which in first loop 0 and access to method maybeNew is (0) too which when we increment it will give us +1 to to the count . x is now 1 -------------------- the last true while statement 1 < 2 we have now a new object of array m4a[1] = new mix(); counter is now 2 count is now 3 if up is all ok count = count + m4a[1].maybeNew(1); result 4 = 3 + 1 after 5 times in loop of method maybeNew it wont any more increment x for 2 and here count = count + m4a[x].maybeNew(x); we wont do nothing it will be useless line, count will only increment this line count = count + 1; Am i right? Or return 1; is there to tell put into x number 1 ? These lines Mix4 m4 = new Mix4(); m4.counter = m4.counter + 1; aren't doing nothing and there are only for confusing, how you said. When i comment them i get all the same. I am still confused for return 0; except we must have return value because it is method which is returning something. Is return 0; here when if loop is finished then we will put here count = count + m4a[x].maybeNew(0); for maybeNew(0) right?
It is ok for now because i do not understand this very well? Can we call this smallpox for programming Smile? Sometimes i doubt will i ever learn and become good in programming.
I am learning for a several months but i have pauses sometimes for a week, sometimes for a month. Now i start almost all from beginning to learn.
How about a DB structure like this? (There might be some issues with this structure – I didn’t really spend much time to think about all the scenarios.)
question(question_id, question_desc, subject_id) question_answer(question_answer_id, question_answer_desc, question_id) user_answer(user_answer_id, user_id, question_answer_id)
This can be stored in entity objects in Java. You’d have the same structure from the Database in the entity classes: Question, Question Answer and UserAnswer.
To map it you could use an ORM framework (object relational mapping) like Hibernate, MyBATIS, or map the data back to the entity classes yourself (similar to what you did in your snippet). In this case you wouldn’t use a 2D array/list as the 2nd dimension is described by the entity object.
So you’d use a structure like this when building up a list of questions (using the interface is always preferred over using an implementing class directly):
Listquestions = new ArrayList<>();
In PHP it is advantageous to use single quotes (‘) over double quotes (“) as you can insert variables within single quotes per se
ok the error message is gone but no records were added to my database…
The scaling formula (from your original post) *does* work.
But it will work for the two individual axes – “X” (horizontal) and “Y” (vertical) – individually.
As in, your original point [50,100] really represents an X-value of 50 and an Y-value of 100. To apply the formula, you will have to indicate if these axis share a common scale – in which case, the max value is 100 and min is 50 (or zero) – or if they are separate scales – in which case, for X-axis the max may be 50, whilst for Y-axis may be 100.
Supposing they share a common scale (min=0, max=100): to normalize the X value, apply the formula: (50 – 0) / (100 – 0) » 0.5
Normalizing the Y value, you get 1.0, therefore the point really is [0.5, 1.0]
If you need it to be something else, you will have to muck around with the range values (max and min).
I use firebug when I have up a page in development on one of my sites. Easy to see what tweak is necessary without making the change in the html file, uploading, reloading the browser page and back and forth etc.
The primary key for the bidding table could be the combined fields of bookid&seller&bidder or could be just a unique field.
The bidding table has the seller id and buyer id; so you would just do a ‘join’ to the registered user table using this. You can have as many indexes as you want to help speed the queries.
A unique key is often made the primary key so that you can avoid another index on your table
As for suggestions for visualizing, this one was really easy so I just did it on the fly; however, for complicated ones or when my head just isn’t into it, I grab a piece of paper (yep, real paper) and draw several boxes on it.
From there, I walk-through the process of how the real flow happens and how I would need to process something by hand: so in this example –
– registration of a user: I need a book to keep track of them
– book library: a seller would have a book in his hand and walk up to the front desk wanting to sell it; so I want to log the book somehow; but I know the person doing the logging won’t be impressed if they have to write out the same book 50 times if the seller happens to have 50 copies – so I know that a need a repository for this
– user activity: if a buyer were to come in and put up a paddle in an auction, the auctioneer would need a very fast way to know if the potential buyer has already bid. In a real auction, they would have given you a paddle with a number. So you have the paddle number log, which has the paddle number, and just the buyer number. To record the activity, if you wanted, you would take this log book, and tie it together with the registered bidders, sellers and books. In our electronic world, we can combine the activity with the ‘paddles’ – the only reason the paddle log was kept so small in the paper auction was to allow the bids to be checked against the set of rules.
So after a quick walk through, I find that it is likely that I will have at least 3 log books – translated, 3 tables. Now there could be more, or detailed changes required depending upon the specific requirements.
You have basically flow charted the information flow – so you just can’t be that off the mark!
The professor could take your question and then say “a seller can also sell several books in a group” – make the changes as required. Well, nothing about the information flow has changed now has it? Exactly the same other than I now have to group several books into a bidding lot. Hmmm… do I need a new table? Probably: one containing lot number and book ID. This way I can accomodate a lot having millions of items or just 2. A few tweaks to the bidding table to include the lot number etc …
The basic structure of the tables however, is not changed.
You probably have already realized that 3NF is hardly ever adhered to in the real world.
With the speed of computers and availability of storage, it often is better to have some duplicate info stored to facilitate programming, reducing the number of tables needed to be called (especially when those tables are huge).
3NF is a concept where you don’t store redundant data in a table – you link rather than storing multiple times.
So you would have a table for: registered user, books, and bidding.
The registered user table would have name, userid, password, email
Books would have: title, edition, isbn, bookid, condition
Bidding would have: bookid, selling user (validated against registered user table), initial offering bid, auction start date (with time included), action end date (with time included), current bid, bidding user (also validated against registered user table), and have a unique key comprised of bookid & selling user & bidding user.
Your conditions: a user can sell more than one book: each book added has a unique number therefore the unique key created in bidding allows for a selling user to post more than one book – even he has several copies of the same book to offer
A user may bid on more than 1 book: same as above – the unique key created is based upon the bookid
A user can only bid once on a book: your sql command will check for a duplicate key (bookseller bidder) – if it is a duplicate you bounce them out.
None of the data is stored more than once and can be linked together by simple sql to create a form with validation.
Sign in to your account