This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//How to get last 2/5 digit/char from a String | |
static main(args) { | |
String texter = "5793231309" | |
String texter2 = texter[-2..-1] | |
String texter5 = texter[-5..-1] | |
println(texter2) // 09 | |
println(texter5) // 31309 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Calendar; | |
public class JavaCalendarAddSubtractDateMonths { | |
public static void main(String[] args) { | |
int monthsToAdd = 2; | |
int monthsToSubtract = 10; | |
Calendar c = Calendar.getInstance(); // this takes current date |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class EnDecryption | |
{ | |
public static $saltKey = ''; //You Can Change This as Your Own By Calling Constructor | |
function __construct($salt = 'setDefaultSalt') | |
{ | |
//print 'Default Salt : ' . $salt; | |
EnDecryption::$saltKey = $salt; | |
//print '<br/>EnDecryption::saltKey : ' . EnDecryption::$saltKey . '<br/>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yii One Line Command for Windows | |
1. Press [ Windows+r ] command | |
2. Paste/type the line [ d:\xampp\htdocs\framework\yiic webapp d:\xampp\htdocs\project_name ] | |
3. Press Enter.... | |
4. CMD promt will open and ask you for Yes/No | |
5. Type [ Yes ] press enter... | |
6. Finish project created in your htdocs with name [ project_name ] | |
____Thank You |
NewerOlder