Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Monday, February 9, 2015

15 programming languages you need to know in 2015

1. Java


Java is one of the most popular languages for building back-ends for modern enterprise-web applications. With Java and frameworks based on it, web developers can build scalable web apps for a variety of users. Java is also the main language used to develop native Android apps for smartphones and tablets.

2. JavaScript

Every modern website uses JavaScript. It’s the go-to language if you want to create interactivity for your site, or build user interfaces with one of the dozens of popular JavaScript frameworks.

3.C#

C# is the primary language for developing on Microsoft platforms and services. Whether you’re building modern web applications using Azure and .NET, apps for Windows devices or powerful desktop apps for your business, C# is the quickest way to harness all that Microsoft has to offer. Want to play, as well? The popular Unity game development engine also uses C# as one of its primary languages.

4. PHP

Building a web app that needs to work with data? PHP, along with databases like MySQL, are essential tools for building modern web applications. PHP powers a majority of today’s data-driven websites, and is the foundation technology for powerful content management systems, like WordPress, which you can extend to make your site more powerful.

5. C++

Want to get a little lower level with your programming? When you need to connect directly to hardware to get the most out of your processing power, C++ is the perfect choice for developing powerful desktop software, hardware-accelerated games and memory-intensive apps on desktops, consoles and mobile devices.

6. Python

Python can almost do it all. Web apps, user interfaces, data analysis, statistics — whatever your problem, there’s likely a framework for it in Python. Most recently, Python has been used as a key tool for data scientists to sift through giant data sets for any industry.

7. C


Why is the C language still popular? Size. C is small, fast and powerful. If you’re building software for embedded systems, working with system kernels or just want to squeeze every last drop of the resources you have at hand, C is lean, mean and ready to scream.

8. SQL

Data is massive, it’s everywhere and it’s complex. SQL gives you the ability to find the exact information you want in a fast, repeatable and reliable way. Using SQL, you can easily query and extract meaningful data from large, complex databases.

9.Ruby

Want to kickstart your project in record time, or prototype a new idea for your next big web app? Ruby (and Ruby on Rails) can get you there quickly. The Ruby language is straightforward to learn and incredibly powerful, plus it powers tons of popular web apps around the globe.


10. Objective-C


If you're interested in making an app for iOS, you’ll need to know Objective-C. While last year’s hype centered on Apple’s new language Swift, Objective-C is still the foundational language if you want to build apps for the Apple ecosystem. With Objective-C and XCode, the official software development tool from Apple, you’ll be in the App Store in no time.


11. Perl

Is Perl esoteric? Yes. Is it confusing? Yes. Is it a super powerful language, and a key component of anyone’s cyber security arsenal? Also true. Perl has powered the web since its early beginnings, and is still considered a key tool for any IT professional.

12 .NET

Although not a language in itself, .NET is a key Microsoft platform for cloud, service and app development that gets more advanced and valuable with each release. Due to the recent open-sourcing efforts of Microsoft, .NET is now coming to Google and Apple platforms. As a result, you can use .NET today with a variety of programming languages to build apps that easily support multiple platforms.

13. Visual Basic

Visual Basic is the language that gets business done. A key language of the .NET platform, it enables you to build applications to support your business, and automate powerful Office applications like Excel to accomplish super-human feats of computation, as well as streamline your most common tasks.

14. R

R is powering the revolution of big data, and is a must-know language in 2015 for anyone in need of serious data analysis. From science and business to entertainment and social media, R is the language to learn for statistical analysis across nearly every field of interest.

15. Swift

Not even a year old, the Swift programming language has captured the eyes and keyboards of developers worldwide as a new, fast and easy way to develop for Apple’s Mac and iOS operating systems. Swift’s broad power and friendly syntax makes it possible for anyone with a Mac to build the next killer app for iOS or Mac OS X.

according to Mashable.com

Tuesday, May 20, 2014

PHP paging algorithm - Dynamic web programming

PHP mysql database retrieve table to paging dynamic web

Condition before reading the article:
You must know how to connect to the DB.
• You have created a table and the table contains informations to wait ... paging
You create a file list.php has a complete code as follows:
<?php  $page = isset ( $_GET["page"] ) ? intval ( $_GET["page"] ) : 1; 
$rows_per_page = 20; 
$page_start = ( $page - 1 ) * $rows_per_page; 
$page_end = $page * $rows_per_page; 
$sql_query = mysql_query("SELECT * FROM table_name"); 
$number_of_page = ceil ( mysql_num_rows( $sql_query ) / $rows_per_page ); 
if ( $number_of_page > 1 ) 
{ 
$list_page = " <td> Page: </td>"; 
for ( $i = 1; $i <= $number_of_page; $i++ ) 
{ 
if ( $i == $page ) 
{ 
$list_page .= " <td>[ <b>{$i}</b> ]</td> "; 
} 
else 
{ 
$list_page .= "<td><a href=’list.php?page={$i}’> {$i} </a></td>"; 
} 
} 
} 
$i = 0; 
while ( $result = mysql_fetch_array ( $sql_query ) ) 
{ 
if ( $i >= $page_start ) 
{ 
print ""; 
} 
$i++; 
if ($i >= $page_end) 
{ 
break; 
}
} 
print <<<EOF 
<table cellspacing="0" cellpadding="0" border="0"> 
<tr> 
{$list_page} 
</tr> 
</table> 
EOF;
?> 
Explain each paragraph:

• The syntax of this passage is:
Page = check variable page exists or not [?]
If exists, get the value of this variable and use the function filter intval to receive safe values [:]
If not then will have the default value is 1:
 $page=isset($_GET["page"])?intval($_GET["page"]):1;
• Numbers of line on a page:
$rows_per_page = 20;
• Count the number of lines in the opening page based on variable $page:
$page_start=($page-1)*$rows_per_page;
• Count the number of lines in the last page based on variable $page:
$page_end=$page*$rows_per_page;
Example of the opening page and last page according to the above formula:
Suppose the page being viewed is 1, we are 
$page_start=(1-1)*20=0
And 
$page_start = (1 - 1) * 20 = 0 
So we have a value 0 is begin and 20 is end.
Retrieve into table_name: 
$sql_query = mysql_query("SELECT * FROM table_name");
• Count the numbers of page, do by following:
mysql_num_rows($sql_query);
is the table's total number of lines have retrieved [1]
$rows_per_page
is equal to 20 ( above value that we have set) [2]
Getting [1] divided by [2] It will be several pages
To rounding values ​​from (x.1 -> x.9 of 1 + x) we use the function ceil ()
$number_of_page=ceil( mysql_num_rows( $sql_query )/$rows_per_page); 
If the page number is greater than 1 then it will list the pages
if ( $number_of_page > 1 ) 
{ 
$list_page = "<td> Page: </td>";  
for ( $i = 1; $i <= $number_of_page; $i++ ) 
{ 
if ( $i == $page ) 
{ 
$list_page .= "<td> [ <b> {$i} </b>] </td>"; 
} 
else 
{ 
$list_page .= "<td><a href=’list.php?page={$i}’> {$i} </a></td>";  
} 
} 
}  
• Set variable $i equal zero.
$i = 0;
• List all lines in a table.
while ( $result = mysql_fetch_array ( $sql_query ) ) 
{if ( $i >= $page_start ) 
{ 
print $result[content];  
} $i++; 
if ($i >= $page_end) 
{ 
break; 
} 
}
• Above we loaded content to variable $list _ page, now we print it.
print <<<EOF 
<table cellspacing="0" cellpadding="0" border="0"> 
<tr> 
{$list_page} 
</tr> 
</table> 
EOF
Translate from Admin's post <sinhvienit.net>

 

Copyright @ 2014 Guide and share anything relate to Information Technology.

Template by Templateism | MyBloggerLab