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
.redgradient { | |
font-weight: bold; | |
color: white; | |
background: red; /* For browsers that do not support gradients */ | |
background: -webkit-linear-gradient(left, red , #CD0101); /* For Safari 5.1 to 6.0 */ | |
background: -o-linear-gradient(right, red, #CD0101); /* For Opera 11.1 to 12.0 */ | |
background: -moz-linear-gradient(left, red, #CD0101); /* For Firefox 3.6 to 15 */ | |
background: linear-gradient(to right, red , #CD0101); /* Standard syntax (must be last) */ | |
} |
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
constructor() { | |
this.initializeApp(); | |
} | |
initializeApp() { | |
this.platform.ready().then(() => { | |
this.statusBar.styleDefault(); | |
this.splashScreen.hide(); | |
this.storage.get('isLoggedIn').then((val) => { | |
if (val == 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Blog</title> | |
<%= csrf_meta_tags %> | |
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> | |
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> | |
</head> |
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
test() { | |
this.http.get("https://myapi.com/?question=3", {headers: headers}) | |
.map(res => res.json()).subscribe(data => { | |
this.rcvdpayload = data.data.children; console.log(this.rcvdpayload); | |
}, error => { | |
console.log(JSON.stringify(error.json())); | |
}); | |
} |
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
myApp.controller("ListTicketsCtrl", function($scope, $http) { | |
$http.get('https://example.com/tickets/') | |
.then(function(response){ | |
$scope.tickets = response.data; | |
console.log(response.data); | |
}); | |
$scope.removeItem = function(id){ | |
$http.delete("https://example.com/tickets/" + id) |
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
<div class="page-header"> | |
<h1>List Tickets</h1> | |
</div> | |
<div ng-controller="ListTicketsCtrl"> | |
<ul> | |
<li ng-repeat="ticket in tickets"><b>Name:</b> {{ticket.name}} <b>Phone:</b> {{ticket.phone}} <b>Email:</b> {{ticket.email}} <b>Gym Rep:</b> {{ticket.gymrep}} ID: {{ticket._id}} | <a href ng-click="removeItem()">Delete</a> </li> | |
</ul> | |
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
echo "<p>My Json objects:</p>"; | |
$url="http://jsonplaceholder.typicode.com/posts"; | |
$json = file_get_contents($url); | |
$data = json_decode($json, TRUE); | |
echo $data[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
<?php | |
$response = http_get("http://www.example.com/", array("timeout"=>1), $info); | |
print_r($info); | |
?> |
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($) { | |
$.fn.fixMe = function() { | |
return this.each(function() { | |
var $this = $(this), | |
$t_fixed; | |
function init() { | |
$this.wrap('<div class="container" />'); | |
$t_fixed = $this.clone(); | |
$t_fixed.find("tbody").remove().end().addClass("fixed").insertBefore($this); | |
resizeFixed(); |
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
passport.use('custom-login', new Custom(function (req, done) { | |
var email = req.param('email'), | |
pw = req.param('password'); | |
User.findOne({"local.email": email}, function (err, usr) { | |
if (err){ | |
console.log(err); | |
return done(err); | |
} | |
if (!usr) | |
{ |
NewerOlder