The Way to Programming
The Way to Programming
You should try to buffer output first. as being a wp theme, headers are already sent, more exactly when u use update_option function.
try:
ob_start("ob_gzhandler"); header("Location: admin.php?page=functions.php&saved=true"); header("Location: themes.php?page=functions.php&saved=true"); exit; ob_flush();
still, I didn’t understood what you want to achieve with this function. GL.
I have some basic knowledge of c++ so if there is a good article out there on this i think i would be able to write it. But if someone is willing to write it for me which should take too long i think it would be perfect. As i sad i am on a project to make a robot so i have a lot of work on hardware and really little time.
Many people will say to you need to follow this path or this other path; use this language or some fancy DRY Principle formulated by Andy Hunt and Dave Thomas or OOP or some other meaningless constructs.
The truth is, there is no one single (one size fits all) paradigm that will work for all programming situations other than the constructs put forth by Edsger W. Dijkstra in the early 80’s that liberated us programmers from the nefarious GOTO statements and spaghetti code of the late 70’s and early to mid 80’s.
Sequence, Decision and Looping statements, assembled correctly, will work for one line program or for 16,000,000 lines of code spanning several different computer architectures.
People involved with programming become almost ‘Religious” in their zeal to promote a certain way of doing things. I remember the ‘wars’ at Stanford between DEC VAX/VMS and UNIX in the early 80’s. DEC had a stellar OS that beat the pants off of UNIX in Real Time processing back then.
But your question is about programming.
Programming is a discipline, and like any other profession, there are many facets that you have to learn. It is part art-form and part science; art-form in the sense that each program, like a painting, is a creative work. Some are elegant, eloquent solutions to problems. Other’s, like Microsoft’s OS offerings, are tedious bloated piles of (you can put in your own imaginative word here).
So what does a programmer do?
Anyone doing this regardless of title is doing Data Processing. We have a task to accomplish, we take input, do some processing (store a few things) and spit out the results with text, pictures, video, music or a combination of all of those things.
We provide solutions. It is critical that you be able to a) Understand the problem you are hoping to solve; be able to take that problem and dissect it into smaller components. c) Create a solution or algorithm and d) Code and Implement the solution. At this point in time of our discussion, the Languages used, the hardware, Source Code generators, or any of the other tools used are, for the moment, irrelevant.
(A decent .pdf file is located here with some good insight to the big picture http://www.uclouvain.be/cps/ucl/doc/ingi/documents/Kellens.pdf)
When we program computers we are, in a sense, giving directions from a map we have created. Directions / steps that the computer must follow to complete the task. Another analogy is following a recipe for making Beef Wellington.
The classical definition of a program is “A set of finite steps necessary to complete a task”
Are all programs alike on the inside? Is there more than one way to “skin a cat”?
When I first started programming more than 36 years ago I really didn’t have a style, I didn’t have that “Signature Dish” that chefs do. Eventually after hundreds of thousands of lines of code hundreds of projects you will settle into comfortable design methodology that works for you. There is really no right or wrong way to write a program.
If the program works and produces the end result then it is correct, by the definition of a program which is a set of finite steps that performs a task.
However, that being said, when I was teaching a College C class in the mid 80’s I thought hmmm, how do I illustrate this concept? One evening, at around 8:00 PM, I had my computer (a UNIX System at the time) some coffee and beer and proceeded to write more than 125 unique and different ways to write a program that displayed the text “Are we having fun yet?”
The printout, on the old continuous impact printer with perforated paper was about 250 pages long. I pulled out all the stops! I mixed Assembler code in with the C; used Inter process communication; Structures; arrays of structures; pointers with 5 levels of de referencing / indirection. One code example was 225 lines long. I named it “Job Security” because only the person who wrote such a mangled mess could understand it.
When I asked the students how many ways they could think of to write this program hands stopped going up after 5 different ways (we were in week five of the semester) I said follow me. I took my “fashionable” black attach case set it on one end of the long hallway and proceeded to walk almost to the other end of the building. I said look at all of these unique and different ways to accomplish this task.
I pointed out the straight forward, easy to understand, easy to modify and easy to maintain examples along with the Job Security examples. Things you should avoid doing.
Programs, they all do the same thing.
What sets them apart is elegance. A good program, one that is elegant, is the almost “perfect” solution. It is easy to understand, it is easy to maintain or modify, it lends itself to being adapted for other uses (unless it is just a weird project) and it can be expanded fairly easily; meaning it is designed with the possibility that more will be expected of it in the future. Programming is a synergy of Science and Art. With Science you have logic and structure and with Art you have Passion and Creativity.
In the mid 90’s when I was looking back at some of the 80’s code I had written and I was very proud, at the time, I wanted to gag! It wasn’t horrible, but it wasn’t pretty either.
Just like playing drums; you practice you get better. Don’t worry about saving the code and macros so much… grow; learn; explore; and gain experience. You will find that stuff will automatically start flowing out of you where you won’t need the old code anymore.
One gift I have always had which helped with drums as well as programming is that I’ve been able to recognize the patterns in software code and I can remember where they are located.
If I’m writing a new program and I need some date handling routines or i need something that will calculate compound interest rates I know where to look for it. I try to write code that is fairly generic in nature so that I can have some re-usability down the road. OOP Object Oriented Programming teaches you to create things that can be used again
Not all people are cut out to be programmers. It requires logic, tenacity, the ability to dissect a problem into small discrete pieces to arrive at a solution.
I have written more than a million and a half lines of programming code (combined) in the last 38 years in RPG, COBOL, ADA, Fortran 77, Basic, BASICA, GW BASIC, Pascal, C, C++, Objective C, Smalltalk, VAX ASSEMBLER, PC ASSEMBLER, Motorola ASSEMBLER, Visual C, Visual BASIC, PHP, Java, .NET, Lisp and a wee bit of Python. Not to forget Unix Shell, DEC DCL, and crappy old DOS Shell Command language.
Each language has strengths and weaknesses. Each language has aspects that make it better for some applications over others. For example, you would not use COBOL for video processing.
I have written some very complex programs (database applications) where the local database is an MS ACCESS database. This database then uploads information to an online MySQL database using a server I wrote in PHP and then I used PHP to construct the website allow users to log in and view the data. All of the data synchronization is automatic and is two way.
I suggest, that in order to learn how to program, that you read a few books on the procedures for programming and then I would use Visual Basic in the MS ACCESS environment. Why? It is a development environment is more forgiving and easer to use while being a little more intuitive than Visual Studio and certainly much simpler than the hideous .NET environment. (Don’t flame me that’s just my opinion!)
Access has a good debugger and allows for a quick and easy environment to learn HOW to program.
If you then decide that programming is what you want to do and you have an aptitude for it, then you can specialize in whatever field interests you and migrate to the language that best suits that field.
For example, if you want to join the project and help develop Linux then C, C++ will and perhaps some ASSEMBLER would be necessary. If you want to program for the iPod then Objective C (my favorite language of ALL TIME) will be necessary.
Programming is telling a computer what to do. The syntax (language specific instructions) varies from language to language, but you’re doing essentially the same things; getting input, doing calculations, storing data etc.
Search out and look at some simple examples in four or five languages. Google the classic “Hello World” program.
Many people look at some languages and also various OS’s as well, with an almost religious context, that some are very superior over others. They get offended easily when someone (like me) says that their favorite OS belongs in the trash bucket. As I mentioned earlier, the battle lines were drawn between the Unix Camps vs the DEC Camps at Stanford and many other places. Not to mention the very caustic arguments that between C and C++ or C++ and Objective C.
It’s a waste of energy to get worked up about these things!
I have no loyalty to anything! To be honest, I’m really partial to the NeXT Operating System. It was the best OS I have ever used to this day.
This picture says it all;
The year is 1993! Two competing OS’s from the same period. The inferior OS (Windows 3.1) is running INSIDE the Superior OS (NeXTSTEP) as a sub process on the left side of the screen; yet, the INFERIOR OS got the most market share and became the dominant OS. This is a case where brute force business tactics wins over Elegance.
Those lucky enough to use this on a daily basis are sad at the turn of events. And we wonder what would the OS of today look like if NeXTSTEP had had 20 years of improvements?
Bill’s crap (Windoze) is just now catching up to where this was 20 years ago!
Well, I recommend, learning programming technics, desing patterns, object oriented programming. Socket programming, Concurrency, Data Persistence. Those are the concepts, if you know context programming language is not a big deal. It is like knowing how to write. If you know how to write, the instrument that you use while writing in this case are programming languages.
Pick a language, and start learning those concepts by practicing with that language, and expand your knowledge. As you progress you will see some programming languages provides alternative methods to most commonly faced problems during development phase.
I strongly suggest you to switch Linux environment. Don’t ask why ask google.
I don’t seem to get it. Where are you getting the number 37 from?
This doesn’t seem as though it’ll be too hard to implement, all you’re really doing for the positive results is calculating the 2nd, 3rd… nth difference.
curl is very simple:
Login
as you can see from the source code, rapidgator uses :
POST
and sends the vars : LoginForm[email] LoginForm[password]
to :
https://rapidgator.net/auth/login
with that information it should be pretty simple for anyone to make a small wee script that takes the text entered into a textbox and pass it to RG , once done, keep the session and request a download using wget or fread or something similar
Moderated Message:
I have developed an app for mac os and I can tell you that Big Nerd Ranch really helped me.
I was completely new to Objective-C but coming from any object-oriented language, you’ll be able to pick it up very quickly. Also, keep in mind you will have to buy a $99/yr developer license from apple to put your app on the app store. Furthermore, be wary of sandboxing (entitlements) your app, it’s a pain in the arse if done in the end. Gradually check that functionality you’re adding step by step can work in a sandboxed environment.
Run it first on the emulator within eclipse for the required android version ie 2.2, 2.3, 4.1. etc then connect you phone to your computer, run it again and eclipse will run it on your phone. All my phones are rooted, but for this is not required. Don’t forget to check “Allow unknown” in your phone settings.
WHY are you using code that is going to be DEPRECATED in the newer PHP versions? I know it’s only an example of code, but this is extremely bad advice:
http://uk1.php.net/manual/en/function.mysql-query.php
Simple. Decide what action you want to trigger the event on, it can be onkeyup, or on blur etc – that’s for you to decide, then bind an event, for example, on blur would be
$("#firstname").blur(function() { getResultsfromajax(); }); function getResultsfromajax() { $.ajax({//options}); OR $.post([url], [data]); OR $.get([url], [data]); }
Of course, you’d want to give your input ID’s to bind them to jQuery like I did above.
(yes, this advice doesn’t give you a complete answer, but I’ve given you enough for you to hopefully research, you’ll learn more this way than just a complete code example.)
thecodingdude is offline View user’s profile Send private message
Accessing the # element that doesn’t exist because of the size() method. Size() method brings the actual size of the heap.
EX: You add 3(a,b,c) items their positions are the following 0 = a, 1 = b, 2 = C. When you heap.get(heap.size()) you are accessing the element in position 3 which doesn’t exist. You must call
heap.set(1, heap.get(heap.size() - 1));
Perhaps its an idea to post the query you’re using. And important in this case seems to be, is the user a unique value ?
Also, Im not fully sure I understand your problem but I think you’re getting more back then you’d like ?
SELECT username FROM Users WHERE User=2
Maybe the above statement would work ? It only returns the username of user2 in the table Users.
In order to access an element within an arraylist, you have to do arraylistname.get(index);
For your instance, what would probably make it work is the following:
listSize = particle_list.size(); for (int i = 0; i < listSize; i++) { particle_list.get(i).attractTo( ourPlayer ); particle_list.get(i).walls(); particle_list.get(i).update(i); particle_list.get(i).drawMe(); }
A website is as secure as YOU make it. Point is, you start with a blank page, that can’t be insecure, so the only reason it’s insecure is because you’ve made it like that. If there are insecurities in your code try find out why. If it’s because of an external script then get rid of it.
And there is no real “ideal” language to learn. It’s what you want to do, if you think your project or learning experience will be smoother with ASPX go with that. PHP is pretty popular so you’ve got a large community to aid you.
asp you gotta pay to use
Not really, Express editions of C# and VB.NET are free and allow for creation of ASP.NET projects.
Sign in to your account