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
$ git branch -r --merged | | |
grep origin | | |
grep -v '>' | | |
grep -v develop | | |
xargs -L1 | | |
awk '{split($0,a,"origin/"); print a[2]}' | | |
xargs git push origin --delete |
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
for (var i = minSqr; sum < max; i++) { | |
if (i.toString() != reverse(i.toString())) continue; | |
sum = i*i; | |
if(sum > min && sum < max ) | |
{ | |
sumStr = sum.toString(); | |
if (sumStr == reverse(sumStr)) { | |
palindromeCount++; |
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
public function get_generate(){ | |
$usermapping = Usermapping::with(array('course_mapping'))->where('user_id','=',Auth::user()->id)->get(); | |
$credit_local = 0; | |
$credit_inter = 0; | |
foreach ($usermapping as $mapping) { | |
$credit_local += $mapping->course_mapping->localcourse->credit; | |
$credit = $mapping->course_mapping->intercourse->intercoursedetail[0]->credit; | |
$credit_inter += $credit; |
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 | |
function rrmdir($dir) { | |
if (is_dir($dir)) { | |
$objects = scandir($dir); | |
foreach ($objects as $object) { | |
if ($object != "." && $object != "..") { | |
if (filetype($dir."/".$object) == "dir") rrmdir($dir."/".$object); else unlink($dir."/".$object); | |
} | |
} | |
reset($objects); |
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
<table> | |
<caption>Caption</caption> | |
<thead> | |
<tr> | |
<th>Code</th> | |
<th>Title</th> | |
<th>Credit</th> | |
<th>Description</th> | |
</tr> | |
</thead> |
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
function getQuerystring(uri, key, default_) | |
{ | |
if (default_==null) default_=""; | |
key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); | |
var regex = new RegExp("[\\?&]"+key+"=([^&#]*)"); | |
var qs = regex.exec(uri); | |
if(qs == null) | |
return default_; | |
else | |
return qs[1]; |
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
## See http:// | |
gem 'base32-crockford', :require => 'base32/crockford' |
NewerOlder