Friday, December 14, 2012

Transitive and Intransitive Verbs


Read the following sentences.
The batter hit the ball.
The bird sang.
What is the difference between the two verbs in the above sentences? At first thought, you may say the definition but forget about the meaning. Instead, concentrate on the grammar. How do the verbs differ grammatically?
Notice that the first sentence has two words following the verb hit. The second sentence doesn’t have words after the verb sang. These two facts lead us to a discussion on transitive and intransitive verbs.

What are transitive verbs?

Transitive verbs are action verbs that have an object to receive that action. In the first sentence above, the direct object ball received the action of the verb hit.
Here are some more examples of transitive verbs:
I baked some cookies.
I rode the bicycle.
I moved the chair.
I stitched a quilt.
All of the verbs in the above sentences are transitive because an object is receiving the action of the verb.
But what about the sentence “The bird sang.” Is the verb in that sentence a transitive verb? No, in this case the verb sang is an intransitive verb.

What are intransitive verbs?

Intransitive verbs are action verbs but unlike transitive verbs, the do not have an object receiving the action. Notice there are no words after the verb sang.
More examples of intransitive verbs:
I laughed.
I cried.
The book fell.
The horse galloped.
The sun set.
In all of the above cases the subject is performing the action of the verb and nothing is receiving the action.
What about this sentence?
I walked to the park today.
Is walked transitive or intransitive? Think about the rules. Since walked has words coming after it, the verb must be transitive, right? WRONG! The phrase to the park is a prepositional phrase andtoday is an adverb. There is no object receiving the action of the verb walked so the verb is intransitive.
To recap, a transitive verb must be an action verb plus there must be an object to receive that action.

How to Prevent a SQL Injection Attack



A SQL injection is a common programming error the consequences of which can be really devastating. Many successful hacking attacks start when a hacker discovers a vulnerability that gives an opportunity to inject SQL code.
When an SQL injection occurs, the structure of an SQL query is compromised and as a result you are left at the mercy of the potential hackers. If there is a vulnerability found, hackers can exploit it to gain access not only to your site and database but in extreme cases also to your corporate network. When hackers can inject their code in your code, they can do what they want.


Why do SQL injections happen so often?

The shortest answer is that SQL injections are so popular because of poor programming. Hackers know about the potential of a successful SQL injection attack and they search for vulnerabilities. Unfortunately, very often they don’t have to search hard – vulnerabilities pop right in their face. On the other hand, the risk for a hacker from executing an SQL injection is minor, while the potential rewards are lucrative. What else could a criminal ask for?
Therefore, don’t rely that hackers won’t bother with your site and don’t leave the door widely open. Nobody says that each vulnerability of this type will turn into an attack but it’s not wise to take any chances. The good news is that fortunately, SQL injections are also relatively easy to prevent.

Steps to prevent a SQL injection attack

Basically, there are two fire-proof ways to make an SQL injection impossible:
  1. Don’t use dynamic database queries.
  2. Don’t accept user input in queries.
However, obviously these two steps can’t be done because if you follow them, then the sites you can create will be very static and in today’s Web this is not a solution. What you can do, is minimize the risks when using dynamic queries and user input. Here are some basic principles that apply to any programming language:

1. Patch your SQL server regularly

Before we get into the coding part of the advice how to prevent an SQL injection, we need to start with the fundamental issues. SQL injections might be a frequent programming error but they aren’t the only way for a hacker to break into. If your underlying software – i.e. the database and the operating system have vulnerabilities, then your efforts to secure your code become obsolete. This is why you should always patch your system, especially your SQL server.

2. Limit the use of dynamic queries

As I already mentioned, dynamic queries are the door to SQL injections. Of course, it might not be realistic to expect that all dynamic queries can be trashed right away but some of the ways out are stored procedures, parameterized queries, and above all – prepared statements. The exact approaches vary from one programming language to the other but basically any programming language offers good substitutes of dynamic queries.
For instance, the PreparedStatement() with bind variables in Java, or the SqlCommand() and OleDbCommand() with bind variables in PHP, or strongly typed parameterized queries with bindParam() in PHP are all possibilities to explore.

3. Escape user input

The second biggest evil for SQL injections is user input. While you can’t always avoid user input completely, the next best thing is to escape it. Escaping user input doesn’t do as good job as limiting dynamic queries but still it can stop many SQL injection attacks. For instance, if you are using PHP, for GET and POST, use htmlspecialchars() to escape XSS characters and addslashes(), in case you using database. Alternatively, you can escape user input from inside your database but since the exact code varies from one database to the next, you should check with the docs of your database for the exact syntax to use.

4. Store database credentials in a separate file

In order to minimize the damage in case of an SQL injection attack, always store database credentials in a separate file. This way even if a hacker manages to break in, he or she won’t benefit much.

5. Use the principle of least privilege

The principle of least privilege is a security cornerstone and it applies to SQL injections as well. For instance, when you grant a user access only to the tables he or she needs rather to the whole database; this drastically reduces the damage potential.

6. Turn magic quotes off

Turning the magic_quotes_gpc variable off can also stop some SQL injection attacks. Unfortunately, this isn’t always a reliable measure because sometimes magic quotes might be off and you are unaware of this but still it is better than nothing. In any case, you need to have code to substitute quotes with slashes. Here is the simplest way to do it:
if (!get_magic_quotes_gpc()) {
$username = addslashes($username);
$password = addslashes($password);
}

7. Disable shells

Many databases offer shell access which essentially is what an attacker needs. This is why you need to close this door. Consult your DB’s documentation about how to disable shell access for your particular database.

8. Disable any other DB functionality you don’t need

In addition to the shells there are many other functions in a database you don’t need. While not all of them are a security risk, the general rule here is that less is more. Just remove or at least disable any functionality you can do without.

9. Test your code

Finally, the last step to ensure your code is SQL injections-proofed is to test it. There are automated tools you can use to do this and one of the most universal is the SQL Inject Me Firefox extension. This tool has many options and many tests the best is if you have the time to run all of them.
All these steps to prevent an SQL injection are relatively easy to implement but failing to do so could make a huge difference. If you stick to these rules, you will drastically reduce the risk of your site being compromised via a SQL injection. Still, you can never be 100 per cent sure that you are completely protected against such an attack (or any other type of attack, to be more precise) and this is why you need to keep an eye on your logs so if a breach occurs, you will know it right away and react appropriately to minimize the damage.

Thursday, September 20, 2012

Apple delivers iOS 6

Apple's latest mobile operating system is being pushed out to devices. The company claims the software adds over 200 new features.


As expected, Apple today began pushing out iOS 6 to iPods, 
iPhones and iPads. The update began going out to users this morning. Users can get it by plugging their device in and launching Apple's iTunes software, or -- if they're running iOS 5 -- over the air from within the settings menu.

According to Apple, the update adds "over 200 new features," to iOS 5, which was released last October. Chief among them is an entirely new maps application that uses Apple's own data, changes to Siri that add more information about movies, restaurants, and sports scores, as well as deep integration with Facebook. Read more

Tuesday, September 18, 2012

Create Mailbox in Ms Exchange 2007


iPhone 5 line sitters: Give us $40-$150 a day

Those are the market rates charged by people willing to wait in an iPhone 5 line for anyone who pays them. If you really want the phone and you really don't want to wait, these people will do the heavy lifting.

Some of the people camping out in line for the iPhone 5 at Apple's flagship Manhattan store try to grab some shut-eye. They could have paid someone as little as $70 a night to do this for them.


Apple isn't the only one making money on the iPhone 5.
Not only are marketers trying to piggyback on the media interest that the iPhone 5 is generating but some people are advertising their services as surrogate line sitters as well.
They offer to pinch-hit for people who really want the phone but who really don't want to wait in line.
The iPhone appears to be once again the hot item to own. On Friday at 8 a.m., Apple Stores are scheduled to begin offering the iPhone 5 to the public all across the country. Some are speculating that the lines for the latest generation of Apple's iconic cell phone will be longer than they've ever been. Meanwhile, some people see an opportunity to make a little money off the public's interest in the device.

Peanor site is being shutted down for a while

The Peanor site, www.peanor.com, is fixing since it has been transferred to another server to speed up its performance adapting the current marketing. However, it will perfectly appears again in the following weeks in order to demonstrate people with a professional design.


Monday, September 17, 2012

Google Map Pre-Competition Training at U.S Embassy Phnom Penh, Cambodia



A presentation about Google Map Maker & Cambodia Mapping Competition at U.S Embassy Phnom Penh on 21 September 2012 from 10.00 - 11.30 AM.

You need to email for RSVP in advance:
Email to wfr@state.gov with title of “Google Maps and Google MapMaker training RSVP”
With your Full Name and Phone Number.
***Laptop & Cellphone & Tablet is not allowed to take inside the embassy

Yahoo's free phone offer snubs RIM's BlackBerry


Research In Motion is getting no respect from Marissa Mayer.
Yahoo's new CEO informed employees yesterday that they would be getting the new smartphone of their choice from Apple, Samsung, Nokia, or HTC. Through the program, Yahoos will have access to the industry's newest and hottest phones, including the iPhone 5, Samsung Galaxy S3, HTC Evo 4G LTE, and Nokia Lumia 920.
In addition to purchasing the phones, Yahoo will also pay employees' voice and data bills.
But what they won't pay for is a BlackBerry. Once the de rigueur instrument of business communications, RIM's smartphone was left off the list.
While the offer will likely go a long way toward boosting morale at the beleaguered Web pioneer, it's not likely to please employees at RIM, which has been struggling to regain lost market share and sales of its once-popular BlackBerry devices in an industry now ruled by Apple and Android.
Understandably, Mayer is placing her faith in market leaders iOS and Android. But by choosing Windows Phone 8 -- a platform that hasn't even landed in consumers' hands -- over BlackBerry, she is essentially declaring RIM's platform obsolete and dead. And that pretty much reflects consumer opinion; RIM's market share has plummeted from 25 percent in September 2011 to just barely 1 percent in July, according to a recent Chitika study.

India’s youngest CEO Shravan and Sanjay Kumaran


This is an incredible achievement by two brothers Shravan and Sanjay Kumaran as they have launched their own mobile applications firm. Aged only 12 and 10 respectively, Shravan is the Co-Founder and President of Go Dimensions while his brother is Co-Founder and CEO. The two brothers are the youngest chief executives of India and also youngest promoters of a company who are studying in Class VIII and Class VI at a Chennai school.
When most adults have trouble understanding Java code, these two kids have used the code to build mobile applications. The brothers have together developed four apps for the Apple Store, which have been downloaded more than 10,000 times from 20 countries. Read more

On the way with windiws 8 metro style to the edge of the world

Windows Store apps are the focal point of the user experience on Windows 8, and great Windows Store apps share an important set of traits that provide a consistent, elegant, and compelling user experience. Here you learn about the 8 traits of great Windows Store apps. Read more

Friday, August 24, 2012

Facebook launches new iOS app


Today, Facebook released an updated iOS app, Facebook 5.0, that was rebuilt from the ground up to be optimized for iOS devices like iPhone and iPad.
The original version of Facebook's iOS app was essentially the site's HTML5 website wrapped around a mobile application. It took forever to launch, was difficult to navigate and was also generally very slow.
Facebook 5.0 runs smoother, launches quickly and, most importantly, is slightly more organized. Pages also scroll more quickly and a banner at the top of the page lets the user know when their friends have made new posts. Tapping this update banner once also reveals the latest posts chronologically instead of the old method that tried to guess what would be most relevant to you.
Photos also now load instantly and tapping on them now launches them right away.
Most of the changes have been made to the application's back end and esthetically it looks nearly identical to Facebook's old iOS app.
There is no word yet on if the company plans to revamp Facebook's Android application.
Facebook's stock was up slightly on Thursday after hitting an all-time low on Wednesday morning. Facebook acknowledged in their IPO filing that mobile presents a significant threat to the company's business model since ads could not be displayed on the old version of the mobile application. While the updated iOS application doesn't currently carry any advertising, it could be a move on the company's behalf to finally begin to monetize the mobile experience.
The updated app can be found on Apple's App Store or through the software update function on iPhones and iPads.

Thursday, January 19, 2012

Links

World Date and Time
http://www.timeanddate.com/

​អ្នក​និពន្ធ​វ័យ​ក្មេង​
http://archphkai.wordpress.com/

Wordpress Rock
http://wprocks.com/