Skip to main content

Posts

Showing posts from 2014

Simple tip for OOP MySQLi in PHP

The purpose of this tutorial is to show you how I use PHP's OOP MySQLi in larger projects. For larger projects, I like to separate out the connection to the MySQLi in another file. We'll call the class db_connect.php since that's what most books seem to reference it as. db_connect.php -- I'll take it another step further and create a class that's going to make it simple for me to call other classes. I'll call it  ClassInitialization.  This class will only contain one method  className()   and it's purpose will be to initialize other classes. class_initialization.php -- As is evident from the above code, the className() method requires 2 parameters: the name of the class that you want initialized and an optional file location parameter. It'll then require_once() the file and return the new  ClassName object. To put the 2 classes that we've created together, you'll need to create a third class that will do something spe

Text Message Reminders

Sientists from Queen Mary University of London have found text messaging prevents one in six patients from forgetting to take, or stopping, their prescribed medicines. Perfect example of how technology continues to shape and extend our lives. I don't think it'll work particularly well in patients over a certain age group, but the younger generation could definitely benefit.  A simple calendar application on your phone has the ability to remind you about anything at any time at any frequency.

First Step to Mars

After an anticlimactic day on December the 4th, 2014, NASA regrouped, fixed the issue on the Orion and it launched successfully today. The unmanned spacecraft was NASA's attempt at testing some key components for the manned deep space exploration program that will occur in 2030 if everything goes according to plan. The shuttle was in orbit 3600 miles above Earth for four and a half hours after which it successfully splashed into the Pacific Ocean off of the coast of Baja, California. Deep Space exploration and hopefully colonization is key to our survival as a species. It's exciting to know that we're going to be alive to witness the beginning of such efforts. Everyone has a plan B, and we as a species need to have one too.

Artificial Intelligence is a risk to humanity

Artificial intelligence is a risk to humanity says astrophysicist Stephen Hawking. The guy is undeniably brilliant. I'm not sure why he believes that speaking about AI currently is of importance but I still value his opinion. It could be simply that he himself doesn't know how much longer he has left and is prepping the future generations from making a mistake that they won't be able to correct. I think we're still a good ways from having to worry whether our creations will turn against us, but I do believe it's coming. Just like anything else, there will come a point in time where our ability to share information will completely surpas our ability to dignose and comprehend the vast knowledge effectively. We'll naturally strive to create machines that will evaluate that information in a time-frame that would be impossible or impractical for the human race to compute it in. I know that currently we have vast machines that do this already, however there will com

Future Scientists

According to George Mason University, p arents and family make all the difference in creating the next generation of scientists, engineers and mathematicians. The research team surveyed 149 participants in the Aspiring Scientists Summer Internship Program from classes from 2007 to 2013. This competitive internship attracts top high school and undergraduate students who work on real-world research. It's almost humorous that research had to be conducted for such a common sense topic; but I guess if scientists want to receive a federal grant they need to show some sort of research regardless of how nonsensical it may seem. This is not to downplay the situation where parents without a doubt need to take a serious approach in guiding their children towards an academic lifestyle. Parents need to expose their children to a cornucopia of topics and monitor which of those the child tends to favor. More effort should then be placed to expose that child to said topic as frequently as poss

Obama vows action

President Barack Obama made a forceful pledge on Monday to use his last two years in office to address the "simmering distrust" between police and minority communities as he requested $263 million for the federal response to the civil rights upheaval triggered in Ferguson, Missouri. Obama in my opinion is not doing a good job with addressing these situations. After the verdict was released, Obama instantly failed. First he appeared on television moments after the decision was announced : there have been other more pressing issues in which he chose to wait before deliberating. If he wanted to say anything it should have been in passing. Second, he unknowingly told the people to get up and let themselves be heard. "Protest peacefully," He knew exactly what was about to happen. If he wanted to appear on television he should have said, "people, go home. This is a nation built on laws. You may or may not agree with those laws but they're in place. If you hav

Will we ever learn?

The Obama administration has said that empowering Sunni tribes in Iraq and the mostly-Sunni opposition in Syria is crucial to their strategy to degrade and destroy ISIS. This is honestly starting to get old. Lets empower and train extremists in the Middle East to help with the fight against Russia: created Al Qaeda. Al Qaeda turns against it's creators. Let's help with the fight in Syria by training the rebels there: created ISIS. ISIS turns against it's creators. What's next ? How many more times will they do this before they learn? It just seems that there is profit in fighting in the Middle East for all sides. Funding from the US for one side. Funding from Russia for the other side. Funding from Iraq, which is funded by Russia for the other other side. And of course, the indirect attempt at destabilization geared towards Russia from the US and US from Russia.

Powering Africa

When Obama visited the poorest nations in the poorest continent (Africa) and promised to double electricity output by pledging $7 billion to "Power Africa," I instantly knew how that money was going to be utilized: It wasn't. 1.7% of the $7 billion has been utilized to date! WOW! You can't invest a nation with the kind of corruption that's plaguing their government and expect these corrupt individuals to spend the $7 billion appropriately! What the US did is give Africa's cor rupt a $7 billion check. "Here you go. Spend it wisely!" I'm all for helping the underprivileged, but do so in a responsible manner. Pledge $7 billion but send in your own team, your project managers, to recruit and build a team in Africa which will carry out the build; then send your accountants to keep track of every last penny spent. Once that's done, more money can and should be invested in helping out a nation that desperately needs it. On the other hand, it&#

Pre-Geo-Engineering

Geo-engineering is right around the corner. There are numerous projects that scientists are currently working on. One of the touted projects includes spraying low-level clouds with sea salt to make them reflective to the sun; another would pump aerosols or sulfur particles into the atmosphere to disperse sunlight; and others would see greenhouse gases such as carbon dioxide sucked out of the air to reduce global warming. Instead of focusing on eradicating the issue before it b ecomes a full-fledged problem, we're focusing on fixing the aftermath. Countless have turned to our leaders in vain for help with common-sense problems; time and time again they continue to disappoint. Why? Simple: Greed. We as individuals (collectively as a race) have the power to persuade the politicians to take us seriously. We wont get rid of the lobbyists but we can change who the more powerful lobbyist is working for. Just like we've pumped countless income into the oil companies, we can do the

High Intelligence through Warfare

Warfare not only hastened human technological progress and vast social and political changes, but may have greatly contributed to the evolutionary emergence of humans' high intelligence and ability to work together toward common goals. Finally, an explanation that sheds some light to why we still have war. Of course there are numerous other reasons, but I tend to lean to the species development of high intelligence as my personal favorite. It almost seems like evolution has constantly pushed us unknowingly towards conflict. One reason being to further develop the winner's mind thus solidifying the existence of our species and the other to rid us of the non-beneficial herd. I know this seems insensitive but evolution is just that. 

Da Vinci's Drapery for a Seated Figure

Drapery for a Seated Figure is a painting done by Leonardo di ser Piero Da Vinci in 1470. It's currently displayed in  Musée du Louvre in Paris, France. The painting was done in Italy. The style portrayed is High Renaissance on Canvas material. Although called Drapery for a Seated Figure , to me it almost looks like a person crouching down, his right hand on top of his knee and close to his face. Possibly even crouching over somebody that's laying down on the ground. To me a head-shape figure emerges on the bottom-left of the canvas. The shadows of the painting are superb making the painting almost seem like a photograph.