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
#!/bin/bash | |
# | |
# An init.d script for running a Node.js process as a service using iptables, forever and bouncy | |
# Reference: | |
# 1- https://github.com/nodejitsu/forever | |
# 2- https://www.exratione.com/2013/02/nodejs-and-forever-as-a-service-simple-upstart-and-init-scripts-for-ubuntu/ | |
source /home/kle/.nvm/nvm.sh | |
NAME="Script for all NodeJS apps" | |
NVM_VERSION="v0.10.31" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage | |
xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="ButtonWithImage.MainPage" | |
Title="Button Image Sample" | |
BackgroundColor="White"> | |
<ContentPage.Resources> | |
<ResourceDictionary> | |
<OnPlatform x:Key="RefreshImage" x:TypeArguments="ImageSource"> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage | |
xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="ButtonWithImage.MainPage" | |
Title="Button Image Sample" | |
BackgroundColor="White"> | |
<ContentPage.Resources> | |
<ResourceDictionary> | |
<OnPlatform x:Key="RefreshImage" x:TypeArguments="ImageSource"> |
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
<StackLayout VerticalOptions="End"> | |
<StackLayout IsVisible="{Binding NoConnection}" x:Name="ButtonStackLayout" Orientation="Horizontal" Spacing="10" Padding="10,10,10,10" BackgroundColor="#E3E3E3"> | |
<StackLayout HorizontalOptions="Start"> | |
<Label x:Name="ButtonLabel" BackgroundColor="#E3E3E3" Text="Retry" TextColor="Black" VerticalOptions="Center" /> | |
</StackLayout> | |
<StackLayout HorizontalOptions="CenterAndExpand"></StackLayout> | |
<StackLayout HorizontalOptions="End"> | |
<Image x:Name="ButtonImage" BackgroundColor="#E3E3E3" WidthRequest="24" Source="{StaticResource RefreshImage}" VerticalOptions="Center" /> | |
</StackLayout> | |
</StackLayout> |
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
<StackLayout VerticalOptions="End"> | |
<StackLayout IsVisible="{Binding NoConnection}" x:Name="ButtonStackLayout" Orientation="Horizontal" Spacing="10" Padding="10,10,10,10" BackgroundColor="#E3E3E3"> | |
<StackLayout HorizontalOptions="StartAndExpand"> | |
<Label x:Name="ButtonLabel" BackgroundColor="#E3E3E3" Text="Retry" TextColor="Black" VerticalOptions="Center" /> | |
</StackLayout> | |
<StackLayout HorizontalOptions="EndAndExpand"> | |
<Image x:Name="ButtonImage" BackgroundColor="#E3E3E3" WidthRequest="24" Source="{StaticResource RefreshImage}" VerticalOptions="Center" /> | |
</StackLayout> | |
</StackLayout> | |
</StackLayout> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage | |
xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="ButtonWithImage.MainPage" | |
Title="Button Image Sample" | |
BackgroundColor="White"> | |
<ContentPage.Resources> | |
<ResourceDictionary> | |
<OnPlatform x:Key="RefreshImage" x:TypeArguments="ImageSource"> |
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() { | |
'use strict'; | |
angular.module('app'). | |
factory('authService', ['$http', '$q', '$window', | |
function($http, $q, $window) { | |
const storage = $window.localStorage; | |
let cacheToken = {}; | |
return { | |
getAuthorizationHeader() { | |
if (cacheToken.access_token && cacheToken.expires_on > moment(new Date().getTime()).unix()) { |
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 ng-app="plunker"> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.js"></script> | |
<script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.10.0.js"></script> | |
<script src="angular-round-progress-directive.js"></script> | |
<script src="script.js"></script> | |
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet"> | |
<link href="style.css" rel="stylesheet"> |
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
angular.module('plunker', ['ui.bootstrap', 'angular.directives-round-progress']); | |
var ModalDemoCtrl = function ($scope, $modal) { | |
$scope.launchModalTimer = function () { | |
var modalInstance = $modal.open({ | |
templateUrl: 'modalContent.html', | |
controller: ModalInstanceCtrl | |
}); | |
}; | |
}; |
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
class Program | |
{ | |
private static Func<int>[] GetFunc() | |
{ | |
int SIZE = 5; | |
Func<int>[] func = new Func<int>[SIZE]; | |
for (int i = 0; i < SIZE; i++) | |
{ | |
int j = i; | |
func[i] = () => j; |
NewerOlder