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
//factory | |
app.factory('dataLoad', function($http) { | |
return { | |
getData: function() { | |
return $http.get('data-json.php'); | |
} | |
} | |
}); | |
//controller |
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
//npm install b64url | |
//A signed_request for testing: | |
//WGvK-mUKB_Utg0l8gSPvf6smzacp46977pTtcRx0puE.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImV4cGlyZXMiOjEyOTI4MjEyMDAsImlzc3VlZF9hdCI6MTI5MjgxNDgyMCwib2F1dGhfdG9rZW4iOiIxNTI1NDk2ODQ3NzczMDJ8Mi5ZV2NxV2k2T0k0U0h4Y2JwTWJRaDdBX18uMzYwMC4xMjkyODIxMjAwLTcyMTU5OTQ3NnxQaDRmb2t6S1IyamozQWlxVldqNXp2cTBmeFEiLCJ1c2VyIjp7ImxvY2FsZSI6ImVuX0dCIiwiY291bnRyeSI6ImF1In0sInVzZXJfaWQiOiI3MjE1OTk0NzYifQ | |
function parse_signed_request(signed_request, secret) { | |
encoded_data = signed_request.split('.',2); | |
// decode the data | |
sig = encoded_data[0]; | |
json = base64url.decode(encoded_data[1]); | |
data = JSON.parse(json); // ERROR Occurs Here! |
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
// Controller | |
Insc.findById('55db841e16f87bd00bfec6df').populate('orderInsc.items.insc').exec(function(err, insc){ | |
console.log('insc', insc); | |
}); | |
// Models | |
var InscSchema = new Schema({ | |
orderInsc: { | |
type: Schema.Types.ObjectId, | |
ref: 'Order' |
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 calculo() { | |
var total1 = 0, total2 = 0, total3 = 0, total4 = 0; | |
if (document.cel1.Locar1.checked == true) { | |
total1 = 3999; | |
if (document.cel1.cel1d == "Dummy") { | |
total1 = 3799.05; | |
} | |
else if (document.cel1.cel1n == "Normal") { | |
total1 = 3599.1; |
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
<html> | |
<head> | |
<title>mwss Project</title> | |
<link rel="stylesheet" href="Style.css"/> | |
<script src="jquery-1.12.3.js"></script> | |
</head> | |
<body> | |
<div class="divzin"> |
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
storeFile=/path/to/key | |
keyAlias={key-alias} | |
storePassword={store-pass} | |
keyPassword={key-pass} |
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
let _ = require('lodash'); | |
let games = [ | |
{ | |
name: 'Street Fighter', | |
year: 1990 | |
}, | |
{ | |
name: 'Mortal Kombat' , |
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
$breakpoint-alpha: 800px; | |
.table-search { | |
display: flex; | |
padding: 1.3em 1.6em; | |
input { | |
font-size: 14px; | |
flex: 1 1 100%; | |
box-sizing: border-box; | |
-webkit-box-flex: 1; | |
border: none; |
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
::-webkit-scrollbar { | |
height: 16px; | |
overflow: visible; | |
width: 12px; | |
} | |
::-webkit-scrollbar-button { | |
height: 0; | |
width: 0; | |
} |
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
// An autoresize directive that works with ion-textarea in Ionic 2 | |
// Usage example: <ion-textarea autoresize [(ngModel)]="body"></ion-textarea> | |
// Usage example: <ion-textarea autoresize="100" [(ngModel)]="body"></ion-textarea> | |
// Based on https://www.npmjs.com/package/angular2-autosize | |
import { Directive, HostListener, ElementRef, Input } from "@angular/core"; | |
@Directive({ | |
selector: "ion-textarea[autoresize]" // Attribute selector | |
}) |
OlderNewer