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 visu = jQuery('.conteneur img'); | |
| visu.stop( true, true ).fadeOut(100, function(){ | |
| visu.one("load", function(){ | |
| visu.fadeIn(100); | |
| }).attr('src', url); |
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
| // This factory is only evaluated once, and authHttp is memorized. That is, | |
| // future requests to authHttp service return the same instance of authHttp | |
| servicesModule.factory('authHttp', function($http, Authentication) { | |
| var authHttp = {}; | |
| // Append the right header to the request | |
| var extendHeaders = function(config) { | |
| config.headers = config.headers || {}; | |
| config.headers['Authorization'] = Authentication.getTokenType() + | |
| ' ' + Authentication.getAccessToken(); | |
| }; |
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
| <h1><a ng-click="changeRoute()">Change route</a></h1> |
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
| <!doctype html> | |
| <html > | |
| <head> | |
| <link rel="stylesheet" type="text/css" href="bootstrap.css"> | |
| </head> | |
| <body> | |
| <div ng-app="myApp"> |
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
| <!doctype html> | |
| <html > | |
| <head> | |
| <link rel="stylesheet" href="bootstrap.min.css"> | |
| </head> | |
| <body> | |
| <div ng-app="myApp"> | |
| <div ng-controller="EnterCtrl"> |
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 app = angular.module("app", []) | |
| app.directive("dumbPassword", function () { | |
| var validElement = angular.element('<div>{{ model.input }}</div>'); | |
| var link = function (scope) { | |
| scope.$watch("model.input", function (value) { | |
| if(value === "password") { | |
| validElement.toggleClass("alert-box alert"); | |
| } |
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
| function addMethod(object, name, fn) { | |
| var old = object[name]; | |
| object[name] = function(){ | |
| if (fn.length == arguments.length) | |
| return fn.apply(this, arguments) | |
| else if (typeof old == 'function') | |
| return old.apply(this, arguments); | |
| }; | |
| } |
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> | |
| <title>Test Suite</title> | |
| <script> | |
| (function() { | |
| var results; | |
| this.assert = function assert(value, desc) { | |
| var li = document.createElement("li"); | |
| li.className = value ? "pass" : "fail"; | |
| li.appendChild(document.createTextNode(desc)); |
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
| val firstOccurence: Future[Int] = future { | |
| val source = scala.io.Source.fromFile("public/myText.txt") | |
| source.toSeq.indexOfSlice("tata") | |
| } | |
| firstOccurence.onComplete{ | |
| case Success(intVal) => println("future. first occur :" + intVal) | |
| case Failure(t) => t.getMessage | |
| } |
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
| /** | |
| * Trait décrivant l'action protègée' | |
| **/ | |
| import play.api.mvc._ | |
| import play.api.mvc.AnyContent | |
| import play.api.mvc.Result | |
| import play.api.mvc.Security._ | |
| /** | |
| * User: fblarel |
NewerOlder