This file contains 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 ExportExcel(table) { | |
if (!table.nodeType) { | |
table = document.getElementById(table); | |
download(table.outerHTML, "ftable.xls", "application/vnd.ms-excel"); | |
}else{ | |
alert('not a tbl'); | |
} | |
} |
This file contains 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
turning off the default log (optional) | |
Properties p = new Properties(System.getProperties()); | |
p.put("com.mchange.v2.log.MLog", "com.mchange.v2.log.FallbackMLog"); | |
p.put("com.mchange.v2.log.FallbackMLog.DEFAULT_CUTOFF_LEVEL", "OFF"); | |
System.setProperties(p); |
This file contains 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
//use manual settings | |
System.setProperty("http.proxyHost", host); | |
System.setProperty("http.proxyPort", port); | |
//use system proxy | |
System.setProperty("java.net.useSystemProxies", "true"); |
This file contains 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 instaweb --httpd=apache2 | |
localhost:1234 | |
git_stats generate | |
git_stats | |
gitstats | |
gitstats generate | |
gitstats generate -o stats | |
gitstats -o stats | |
gitstats -o |
This file contains 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
$query = "SELECT * , | |
@amount:=(SELECT SUM((`ghi_qty`*`g_price`)) FROM `tbl_grn_has_item` ghi WHERE ghi.`idgrn`= grn.`idgrn`) AS amount, | |
(@amount-(@amount*(grn.g_discount/100))) AS `grandtotal`, | |
(@amount*(grn.g_discount/100)) AS `discount` | |
FROM `tbl_grn` grn | |
INNER JOIN `tbl_delivery_note` dn ON grn.`iddelivery_note`= dn.`iddelivery_note` | |
INNER JOIN `tbl_purchase_order` po ON dn.`idpurchase_order`= po.`idpurchase_order` | |
INNER JOIN `tbl_user` tu ON po.`idposition`=tu.`iduser` WHERE grn.`g_status`='0' aND po.`idposition`='{$user_id}'{$querypart}"; |
This file contains 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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package send_sms; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.IOException; |
This file contains 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
var htmlData = $('#detail_div').clone().find("#ipod_sub,tr th:eq(12),tr td:last-child").remove().end().html(); | |
$('#tbl_gin').find("tbody tr:last-child").remove(); |
This file contains 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
***************************************** | |
usual way. only get what you want | |
***************************************** | |
function getMaterial(e) { //call this function @ onclick event, once bind no need to call @ onkey... events. | |
$("#itm_" + e).autocomplete({ //bind to selected element. | |
source: URL + "material_gin/getMaterial_auto", // change url to pass more arguments | |
// "material_gin/getMaterial_auto?from="+$('#from).val()+"&to="+$('#to').val() | |
// then catch them from php as | |
// $from = $_GET['from']; |
This file contains 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
protected function checkConstraints($entity, $key) | |
{ | |
$query = "SELECT TABLE_NAME, COLUMN_NAME | |
from INFORMATION_SCHEMA.KEY_COLUMN_USAGE | |
WHERE REFERENCED_TABLE_SCHEMA = :schema | |
AND REFERENCED_TABLE_NAME = :table | |
AND REFERENCED_COLUMN_NAME = :column"; | |
$stmt = $this->em->getConnection()->prepare($query); | |
$stmt->bindValue('schema', $this->em->getConnection()->getDatabase()); | |
$stmt->bindValue('table', $this->em->getMetadataFactory()->getMetadataFor($entity)->table['name']); |
This file contains 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
Perceptual blocks | |
Detecting what you expect – stereotyping | |
Difficulty in isolating the problem | |
Tendency to delimit the problem area poorly | |
Inability to see the problem from various viewpoints | |
Saturation | |
Failure to utilize all sensory inputs | |
Emotional Blocks | |
Emotion | |
Freud |