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
| <html> | |
| <head> | |
| <style> | |
| /* CSS RESET to reduce browser disparities */ | |
| /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) */ | |
| html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0} | |
| </style> | |
| <style> | |
| /* AUR |
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
| // from random SO answer | |
| var params = {}; | |
| var url = location.search; | |
| var parts = url.substring(1).split('&'); | |
| for (var i = 0; i < parts.length; i++) | |
| { | |
| var nv = parts[i].split('='); | |
| if (!nv[0]) continue; | |
| params[nv[0]] = nv[1] || true; |
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
| 'use strict'; | |
| /** | |
| * The ng-thumb directive | |
| * @author: nerv | |
| * @version: 0.1.2, 2014-01-09 | |
| */ | |
| /* | |
| made responsive by Lucas - 2017 | |
| */ |
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
| /** | |
| @name processArray | |
| @description chain promises IN ORDER. | |
| @public | |
| */ | |
| function processArray(array, fn) { | |
| var index = 0; | |
| return new Promise(function(resolve, reject) { | |
| function next() { |
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
| // Ajax function with no jQuery - directly ripped from jQuery, but without the jQuery. | |
| // this function is always handy and boring to rewrite everytime needed | |
| // from StackOF user Hors Sujet | |
| function ajax(option) { // $.ajax(...) without jquery. | |
| if (typeof(option.url) == "undefined") { | |
| try { | |
| option.url = location.href; | |
| } catch(e) { | |
| var ajaxLocation; | |
| ajaxLocation = document.createElement("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
| Options +Indexes | |
| Options +FollowSymLinks | |
| RewriteEngine on | |
| #smth like this | |
| #RewriteRule ^(.*/.+\.)[0-9]{12}\.(js|css)$ $1$2 [L] |
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
| /* Static Include | |
| * same as ng-include w/o creating a child scope. | |
| * usage : <div static-include="mypath.html"/> | |
| */ | |
| app.directive('staticInclude', fnStaticIncludeDirective); | |
| function fnStaticIncludeDirective($http, $templateCache, $compile) | |
| { | |
| return function(scope, element, attrs) |
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
| // Credits: Adam's answer in http://stackoverflow.com/a/20786262/69362 | |
| // Paste this in browser's console | |
| var $rootScope = angular.element(document.querySelectorAll("[ui-view]")[0]).injector().get('$rootScope'); | |
| $rootScope.$on('$stateChangeStart',function(event, toState, toParams, fromState, fromParams){ | |
| console.log('$stateChangeStart to '+toState.to+'- fired when the transition begins. toState,toParams : \n',toState, toParams); | |
| }); | |
| $rootScope.$on('$stateChangeError',function(event, toState, toParams, fromState, fromParams){ | |
| console.log('$stateChangeError - fired when an error occurs during transition.'); |
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
| // static float Fe = 100; | |
| // static float h = 1; | |
| h = (float) (1. / Fe); | |
| float alpha = 0.01f; | |
| float k = alpha * Fe * Fe; | |
| float z = (float) (alpha/10. * Fe); /*alpha / 10 = beta*/ |
NewerOlder