Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Search In

modules in Ruby

For grouping together methods, classes, and constants, we make use of module. Modules give you two major benefits: 1) prevents name clashes. 2) implement the mixin facility. Syntax: module Identifier statement1 statement2 ........... e

User of Recursive in cakephp

It is used where ample data is fetched from the query and there are numerous levels of associations between your models. we use Recursive like this way. $this->Region->find('all', array('recursive' => 0)); These are levels of Recursive f

how to remove action name from URL in cakephp

Current URL is : http://mysite.com/MyController/view/page1 but if you want something like :http://mysite.com/MyController/page1 means you want to hide action name from URL. Then go to app/config/routes.php and type the below code. Router::connect

Parsing the Date in javascript

The Date.parse() method takes a date string, and returns the number of milliseconds since midnight of "November 1, 1997 10:15 AM". if the string is unrecognised or contains illegal date values (e.g. 2015-02-31) Syntax Date.parse(dateVal) datestri

Mapping NULL values onto other values

In database, sometimes we have to insert the record with some NULL values. But at the time of displaying the data to the user, it doesn't make sense to display NULL values. In order to make the data more readable, we have to display values such as un

Sorting

NSSortDescriptor *frequencyDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"" ascending:NO comparator:^(id obj1, id obj

Write text on image

Here is the code to write text on the image:- shell_exec("convert /var/www/html/james/final.png -font /var/www/html/james/tahomabd.ttf -pointsize 85 -density 100 -fill indigo -draw 'text 475,440 JAMES' /var/www/html/james/james1.png"); shell_e

Passing an array to the URL

Sometime you may need to pass the array in the url. You can do this as following: <?php $array["a"] = "A"; $array["b"] = "B"; $array["c"] = "C"; $array["d"] = "D"; $str = serialize($array); $strenc = urlencode($str); print $str . "\n"; print $s

How to use for each in java

Using for each In place of Normal loops in java for each can be used to display the all the elements of the array. Syntax : for(datatype variablename : array) { // Do the work with varialble } example public class Main {

Connection string for connecting Android(java) app to MariaDB

Here is the simple connection string to connect the android with Maria DB on linux. you need to have MariaDB configured to the default port:3306 try { Class.forName("org.mariadb.jdbc.Driver"); Connection cntn = DriverManager.getConnection("jdb

1 84 949
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: