Saturday, April 28, 2012

Akaros - Operating system for manycore architectures

Akaros is an open source, GPL-licensed operating system designed for many-core architectures and large-scale SMP systems, with goal of

* Provide better support for parallel and high-performance applications

* Scale the operating system to a large number of cores

More information about Akaros is available here.




Ruby 1.9.2-p320 released!

Ruby development team released it's latest release Ruby 1.9.2-p320. More information about release notes and download are available here.

PHP 5.3.11 & PHP 5.4.1 Released!

PHP development team announced intermediate release of PHP 5.3.11 and  PHP 5.4.1
For a full list of changes in PHP 5.3.11 and PHP 5.4.1, see the ChangeLog.

Sources are available here for download.

Sunday, April 22, 2012

JBoss Application Server 7.1.1.Final!

JBoss Application Server 7.1.1.Final is available,Download it from here.

Release notes  - Information about bugs, enhancements and features,etc.




Saturday, April 21, 2012

An error occured while installing pg (0.13.2), and Bundler cannot continue - Rails 3 & PostgreSQL issues


"An error occured while installing pg (0.13.2), and Bundler cannot continue.
Make sure that `gem install pg -v '0.13.2'` succeeds before bundling"

Reason for this error could be "failed to build gem native extension", so make sure you have installed PostgreSQL headers properly.

For Ubuntu/Linux flavor, Use following command to install PostgreSQL client and development package

sudo apt-get install libpq-dev

Hope it may helpful to rectify you're problem with rails 3 application with PostgreSQL.

An error occured while installing mysql2 (0.3.11), and Bundler cannot continue

"An error occured while installing mysql2 (0.3.11), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling."

Reason for this error could be due to lack of mysql header, so make sure you have installed mysql headers properly.

For Ubuntu/Linux flavor, Use following command to install MySQL client and development package

sudo apt-get install mysql-client libmysqlclient-dev

Hope it may helpful to rectify you're problem.


Thursday, April 19, 2012

Scala 2.9.2 final released

Scala has been released new stable version which is 2.9.2 final, it has addresses several bug fixes and additional improvements

You can find out more information about release 2.9.2 here

Tuesday, April 17, 2012

sqlite3 - SQL commands

I believe you have installed sqlite3 on your machine.Here are some of the basic sqlite3 commands.

Create a database file/Run sqlite3
$ sqlite3 /home/developer/development.sqlite3 SQLite version 3.7.4 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite>

This command creates sqlite database file and connect sqlite3 shell.

Help command to get list of all available commands
sqlite> .help .backup ?DB? FILE Backup DB (default "main") to FILE .bail ON|OFF Stop after hitting an error. Default OFF .databases List names and files of attached databases .dump ?TABLE? ... Dump the database in an SQL text format If TABLE specified, only dump tables matching LIKE pattern TABLE. .echo ON|OFF Turn command echo on or off .exit Exit this program .explain ?ON|OFF? Turn output mode suitable for EXPLAIN on or off. With no args, it turns EXPLAIN on. .header(s) ON|OFF Turn display of headers on or off .help Show this message .import FILE TABLE Import data from FILE into TABLE .indices ?TABLE? Show names of all indices If TABLE specified, only show indices for tables matching LIKE pattern TABLE. .load FILE ?ENTRY? Load an extension library .log FILE|off Turn logging on or off. FILE can be stderr/stdout .mode MODE ?TABLE? Set output mode where MODE is one of: csv Comma-separated values column Left-aligned columns. (See .width) html HTML code insert SQL insert statements for TABLE line One value per line list Values delimited by .separator string tabs Tab-separated values tcl TCL list elements .nullvalue STRING Print STRING in place of NULL values .output FILENAME Send output to FILENAME .output stdout Send output to the screen .prompt MAIN CONTINUE Replace the standard prompts .quit Exit this program .read FILENAME Execute SQL in FILENAME .restore ?DB? FILE Restore content of DB (default "main") from FILE .schema ?TABLE? Show the CREATE statements If TABLE specified, only show tables matching LIKE pattern TABLE. .separator STRING Change separator used by output mode and .import .show Show the current values for various settings .stats ON|OFF Turn stats on or off .tables ?TABLE? List names of tables If TABLE specified, only list tables matching LIKE pattern TABLE. .timeout MS Try opening locked tables for MS milliseconds .width NUM1 NUM2 ... Set column widths for "column" mode .timer ON|OFF Turn the CPU timer measurement on or off sqlite>

DATABASE LIST - To list all database and it's file
sqlite> .databases seq name file --- --------------- ---------------------------------------------------------- 0 main /home/developer/tester.sqlite3 1 temp

SHOW ALL TABLES - To list all tables of database
sqlite> .tables products

SCHEMA - view schema of the table
sqlite> .schema products CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" text, "image_url" varchar(255), "price" decimal, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL);

CREATE TABLE - To create a table
sqlite> CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" text, "image_url" varchar(255), "price" decimal, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL);

Saturday, April 14, 2012

Django 1.4

Django has been announced its release 1.4.

It contain interesting stuff, For more information see release notes and downloads page.

Friday, April 13, 2012

PHP 5.4.0

PHP 5.4.0 has been released, it will available for different OS distributions.

All distribution's downloads are available here.

Twitter MySQL 5.5

Twitter use MYSQL as persistent storage technology for it's twitter data(the interest graph, timelines, user data and the Tweets themselves)

Twitter open sourced their development of MySQL 5.5 which includes works in internals of InnoDB,NUMA system,etc

For more information, see change history and documentation. Source code is available here.


Tuesday, April 10, 2012

Twemproxy

Twitter open sourced Twemproxy on Feb, 2012. It's a fast, light-weight proxy for the memcached.

In twitter announcements, Twemproxy primarily developed to reduce open connections(front-end application servers) to twitter's cache servers.

More information about Twemproxy is available on GitHub, You can contribute if you can.

Monday, April 9, 2012

Cassovary - Big Graph-Processing Library

Twitter open sourced Cassovary, it's a big graph-processing library for the Java Virtual Machine (JVM) written in Scala.


As per twitter blog,It's used twitter's graph-based features such as "Who to Follow" and "Similar to",etc.


If you have any queries, raise it on mailing list or issues on GitHub.

Sunday, April 8, 2012

HipHop: PHP => C++

Facebook unveiled HipHop to the public in 2010 and began distributing it under an open source software license,the company converts PHP into heavily optimized C++ code.

More information about HipHop and install instruction available here.

How reset MySQL 5.x server root password - Ubuntu 11.10

Earlier blog, explained about MySQL 5.x Server install. If you would like to reset root password of MySQL server, You can use this command

$ sudo dpkg-reconfigure mysql-server-5.1

Install MySQL 5.x on Ubuntu 11.10

Simple steps to install MySQL 5.x Relational Databases on Ubuntu 11.10

1. Make sure you're system package repositories up to date by executing/running following updates commands
$ sudo apt-get update
$ sudo apt-get upgrade --show-upgraded

2. Install MySQL 5.x Server by following command, it will install with dependencies and client libraries.
$ sudo apt-get install mysql-server

Executing this command, You will be promoted to set root password for MySQL server.

Once MySQL server installed, you can start/stop/restart service by these commands

$ sudo service mysql start
$ sudo service mysql stop
$ sudo service mysql restart

I hope you may install MySQL 5.x on you're server. Following to this topic, i'll explain about MySQL secure install and configuration.

Saturday, April 7, 2012

Scala Basics - Simple Class

Simple class definition
scala> class User {
   val userName:String ="Steve Kent"
   def getUserName(firstName: String, lastName:String): String = firstName + " " + lastName
 }  
 defined class User

Define object of the Class
scala> scala> var user = new User
user: User = User@1fce2f2

Access Class members through Object
scala> scala> scala> user.getUserName("sam","anderson")
res1: String = sam anderson

Wednesday, April 4, 2012

Scala 2.9.2 RC2!

Scala 2.9.2 RC2 is available for testing purpose. It has lots of bug fixes and changes.

You can download it here.

Tuesday, April 3, 2012

Scala Basics - Anonymous Functions

Simple way to create anonymous functions on Scala

scala> (result: String) => "Hello " + result
res0: String => java.lang.String = <function1>
It adds "Hello" to an String result, so we call this function like this
scala> res0("Scala")
res2: java.lang.String = Hello Scala

Pass anonymous functions into vals
scala> val welcome = (result: String) => "Hello " + result
welcome: String => java.lang.String = <function1>

scala> welcome("Scala")
res3: java.lang.String = Hello Scala

Expressions - {}
You can define expressions like this
scala> def welcome(message: String): String = {
    "Hello " + message
}
welcome: (message: String)String

scala> welcome("world")
res4: String = Hello world


scala> def addition(i: Int): Int = {
     i + 10
}

Real anonymous function
scala> { message: String =>
       "Hello " + message
 }
res5: String => java.lang.String = <function1>
scala> res5("Anonymous function")
res6: String = Hello Anonymous function

Ubuntu 11.10 - Security Updates

To make security updates on ubuntu, you should run these commands as sudo user
$ sudo apt-get update
$ sudo apt-get upgrade --show-upgraded

Monday, April 2, 2012

Linux commands - To find number of files on a folder

$ ls -al target_folder | grep '^-' | wc -l
$ 90

This is one of the command return number of files on a folder, Suppose target folder contains 90 files. This command output will be  "90"

If you want to find out number of files of specific extension for example .jar


$ ls -al target_folder | grep '^-' | grep 'jar$' | wc -l
$ 40

If target folder contains 40 jar files then result of above command would be 40