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
| rc.zrange(['cust', '0', '-1'], function(err, data) { | |
| if (err) { | |
| rc.quit(); | |
| self.throw500(err); | |
| return; | |
| } | |
| var length = data.length; |
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
| ogr2ogr ProvinsiSimply.shp Provinsi.shp -simplify 0.001 | |
| ogr2ogr -f geoJSON provinsisimplyoutput.json ProvinsiSimply.shp |
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 post(){ | |
| $arraydata = json_decode(file_get_contents('php://input')); | |
| } |
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
| $objarray['tgl'] = date("Y-m-d",strtotime($arraydata->ACT_TGLENTRY)); | |
| $sql="insert into mart_dws_activity (ACT_GPART,ACT_BU_NAME,ACT_ID_ACT,ACT_JNSACT,ACT_PICTELKOM,ACT_TGLENTRY,ACT_RESULT,ACT_TLPRMH,ACT_PICCUST) values ('$gpart', '$bu_name', '$id', '$jns', '$pictelkom', to_date('$tgl','yyyy-mm-dd'), '$result', '$telprmh', '$piccust')"; |
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
| var regMobile = /iPad|iPhone|iPod|Android/g; | |
| if (regMobile.test(controller.req.headers['user-agent'])) | |
| console.log('Is mobile device'); |
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
| framework.route('/login/gplus/', process_gplus,{timeout: 60000}); | |
| function process_gplus() { | |
| var self = this; | |
| var auth = self.module('authorization'); | |
| objgplus = { | |
| client_id:'[yourclientid]', | |
| client_secret:'[yourclientsecret]' | |
| }; |
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
| var timeoutPromise; | |
| var delayInMs = 2000; | |
| $scope.$watch("query", function () { | |
| $timeout.cancel(timeoutPromise); //does nothing, if timeout alrdy done | |
| timeoutPromise = $timeout(function(){ //Set timeout | |
| $scope.loading = true; | |
| returnFactory.query($scope.query).then(function (returns) { | |
| $scope.returns = returns; | |
| $scope.loading = false; | |
| }); |
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
| var a = [1, 2, 3, 45] | |
| var fn = new Function('vars', 'if (vars.length==5){return "benar";}else{return "salah"}'); | |
| fn(a); |
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
| var http = require("http"), server, | |
| redis_client = require("redis").createClient(); | |
| server = http.createServer(function (request, response) { | |
| response.writeHead(200, { | |
| "Content-Type": "text/plain" | |
| }); | |
| redis_client.get('id:'+'value', function(err, idclient) { |
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
| exports.install = function(framework) { | |
| framework.route('/querymysql/', multiplequery,['post','json']); | |
| }; | |
| function multiplequery(){ | |
| var self = this; | |
| var auth = self.module('authorization'); | |
| self.post.newkode = function(){ | |
| return utils.GUID([9]); | |
| } |
OlderNewer