It turns out that a delegate is just an object that others can talk to. The following is an extract from the documentation in apple’s site as they define what the UIApplication is.
The application object is typically assigned a delegate, an object that the application informs of significant runtime events—for example, application launch, low-memory warnings, and application termination—giving it an opportunity to respond appropriately.
Content Management Systems, only provide you with some control over the content. You won’t have the same capabilities of a trained web developer, or graphic artist, or a copywriter. You will just have enough power to do simple things.
It sounds better to pitch to a client that they will be able to modify the content in their website, and that they don’t need to understand HTML or write any code whatsoever, but it is false. No CMS and no Rich Text Editor can do exactly what you want it to do. For instance, say you added an image and you want to position it to the right but say not at the border, maybe 20 pixels to the left.
Most Rich Text Editors will allow you to upload the file, insert it in the document and align right. Hmm, what about the positioning of the image? You didn’t want it to be on the side. Then you move your mouse and try to move it where you’d like it. It doesn’t work. So, there you are scratching your head, about how to position this right. For a second you consider contacting IT, but because it is a bunch of trouble getting to the right people, you give up and say, heck it isn’t that bad.
If you knew CSS and html you could get to some properties of the image and set a style property: “margin-right: 20px”, but you won’t know that.
Without education, you cannot be capable of doing all the things you want to do. So, learn HTML and CSS, not everything, just the basics. Look up tutorials or ask questions in discussion forums, and learn. It will make your life much easier in the long run.
I am learning ActionScript and I have been wanting to simulate a bouncing ball scenario, but this wasn’t that easy. I had to define first the container, ball, direction, reflection and more. Anyway. The code ended up being a little more than I thought originally, but it is very easy to increase the number of balls or define custom containers.
I have been watching “Intervention”, the show, and the more I think about it the more I realize that some people are worth less than the air they breathe. People seeking pitty, who have given up their responsabilities, and only damage others with their presence should be forced to attend a rehabilitation program, live alone in the wild away from others, or jump off a bridge!
There should be a service like Animal Control, that takes care of these people. If they rehabilitate, they can live. Otherwise, they should be imprisoned, so everyone else can live their lives in peace. Arggg… the anger this show provokes in me is staggering. These addicts need to be beaten up with a stick till they are willing to stand up for their selves.
It should be illegal for addicts to live near other people. They talk about it as if addiction is a disease. They also says that everyone in the family is sick because of the sick one (the addict). Then, why on earth are these addicts allowed to be around other people. Mental patients are not allowed to roam free in the society. Why are addicts?
People are imprisoned because they cause damage to the society, so do addicts. They damage the people near them. They should be placed away from the general population, in rehabs. Rehabilitation must be obligatory, not optional. Drug testing must be in place for drug addicts. Imprisonment must follow repeated offenses by an addict. It is only fair for the people around these addicts, whether they think it’s okay or not.
I read this article at Newsweek http://www.newsweek.com/id/174601 and it really depressed me how the government abuses the power given over employees.
When you hold a gun, it is not threatening, but it surely scares the crap out of you when someone points it at you. In the same way, the government with the many offices can be looked at as a powerful gun that is pointed outwards. In such cases, it becomes clear to us how dangerous that gun is.
Responsibility in a bureaucracy is like a hot potato. Everyone throws it to the one next, so that they don’t get burned. Eventually, one takes a stance to protect every one from getting burned, and gets burned in return. In the end to this allegory, everyone stands around the burned person pointing, spitting, and ridiculing him/her for their selfless act. So depressing!
1. Look like a high-shooler even if you are 30.
2. Get a bunch of douches and call yourself something like Clean Tubbies!
3. Convince a company that holds the rights to a popular song that you can make a lot of money for them.
4. Sing the song without many additions.
5. Get what the company gives you and be happy.
if(login_failed()) {
header('Location: /login.php');
}
print "The SSN of the person you inquired is $ssn";
One would reason that since the redirect happened, you don’t need to do anything else. But execution did not stop at the header function.
The HTTP response to the client will contain the following line “The SSN of the person you inquired is …”. You may not see this using firefox plugins but simple use telnet to see that it is actually the case. It is quite dangerous! How to fix it:
if(login_failed()) {
header('Location: /login.php');
} else {
print "The SSN of the person you inquired is $ssn";
}
Personally I like the latter solution. It does what I want the app to do. Terminate all script executions. But, it’s not OO, so you can do a bit better than this.
function redirect_to($url) {
header('Location: /login.php');
exit();
}
and
if(login_failed()) {
redirect_to('/login.php');
} else {
print "The SSN of the person you inquired is $ssn";
}
Now we assume OO is being used through out and you wouldn’t have some other script following this unless it’s in some method.
This is not completely done. If you exit() before the session data is written you will be in trouble. So you have add session_commit (or session_write_close). My preferred way is the function below:
function redirect_to($url) {
header('Location: /login.php');
session_commit();
exit();
}
While driving home I noticed that the van in front of me was making the same turns as I. I started worrying that the driver might think I am a stocker. Then, I started thinking considering whether my actions should be considered that of a stocker or not.
Yes Argument: From the drivers ahead of me perspective I was a stocker, because there are thousands of drivers in town and the likelyhood of someone making the same turns as him/her are extremely low.
No Argument: If we live in the same neighborhood, my turns are very likely to be the same as his/hers.
So, who is right? Actually, both arguments are correct. In terms of probability distributions, the first describes a polynomial distribution function. The no argument, is that of Poisson distribution function. The likelyhood of two people living in the same neighborhood is much larger than that of two drivers making the same turns on the road. But that’s the problem, we weren’t just any two random drivers.
The No argument is a better argument, but most paranoid people would most likely consider the Yes argumetn first. Only after, we endup in the same neighborhood and I split they can rationalize that we live in the same neighborhood.
Javascript speed is almost doubled. Pretty cool!
It actually scored 93/100 on acid3.acidtests.org vs. 71/100 on the 3.0 series. Awesome!
Many addons won’t work in the beta version so be aware if you are a web developer. You might need to hold off for a while. Or just install flock for the time being so you can enjoy the fast browser.
decided to chew my G1 headset and bite off one of the head phone pieces. Buying another headset costs $39.99, and I wasn’t in the mood for more expenditure. So here is how I did it.
I used a soldering iron and soldering material
Then peel off the wires at about half an inch from each side and solder them as shown below:
Make sure the wires don’t touch and that you connect the proper wires together. This is difficult so take your time.
Then get some electrical tape and spread the soldered on opposite sides so that the wires don’t touch.
Cut off a piece of the tape and insulate the wires. I use black tape (mainly because I need to cover up all the blinking blue LEDs in my home).
Alright, finally you should have this result. I cutt off two small pieces of tape to reduce the size of the connection. Voila!
I saved a little dow to waste on a Wireless-N router. Cool!