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 Output(A::Float64, L::Float64, K::Float64, b::Float64) | |
return A * K^b * L^(1-b) | |
end | |
function Invest(O::Float64, s::Float64) | |
return s * O | |
end | |
function Machines(M::Float64, I::Float64, d::Float64) | |
return M + I - d*M |
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
define(function(require, exports, module) { | |
'use strict'; | |
var View = require('famous/core/View'); | |
var Surface = require('famous/core/Surface'); | |
function TheView() { | |
View.apply(this, arguments); | |
var surface = new Surface({ |
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
describe('Testing directive', function () { | |
var element, scope, serviceMock; | |
beforeEach(function() { | |
angular.module('ngMyPackageMocks', []) | |
.service('Service', function() { | |
serviceMock= this; | |
}); | |
angular.module('Test', ['ngMyPackage', 'ngMyPackageMocks']) | |
}); |
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
mod.directive('', function() { | |
return { | |
restrict: 'AE', | |
priority: , | |
template: '', | |
templateUrl: '.html', | |
replace: , | |
transclude: , | |
scope: , | |
controller: function($scope, $element, $attrs, $transclude, INJECTABLES) { }, |
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('').factory('', function() { | |
var service = { | |
}; | |
return service; | |
}); |
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
### Keybase proof | |
I hereby claim: | |
* I am mg on github. | |
* I am mg (https://keybase.io/mg) on keybase. | |
* I have a public key whose fingerprint is 0466 113F C1EA EAE6 0FC2 FFB2 0D69 E072 E71D BA75 | |
To claim this, I am signing this object: |
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
items := make(map[string]interface{}) | |
items["Sources"] = ghsources | |
items["SourcesIndex"] = sourceindex | |
items["UserName"] = u.String() | |
items["UserLogoutUrl"], _ = user.LogoutURL(c, "/") | |
if err = t.ExecuteTemplate(w, "admin.thtml", items); err != nil { | |
http.Error(w, err.Error(), http.StatusInternalServerError) | |
} |
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
func NewSetFromSlice(s interface{}) Set { | |
a := NewSet() | |
slice := reflect.ValueOf(s) | |
for i := 0; i < slice.Len(); i++ { | |
a.Add(slice.Index(i).Interface()) | |
} | |
return a | |
} |
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($) { | |
window.LI = $.extend(window.LI || {}, {exec: function(m, a, s, e) { | |
jQuery.when(jQuery.ajax({type: 'POST',url: '/Services/MethodProxy.asmx/Execute',data: '{"methodName":"' + m + '","args":' + (a.toJSON ? a.toJSON() : JSON.stringify(a)) + '}',contentType: 'application/json;charset=ISO-8859-1',dataType: 'json') | |
.then( | |
function(r) { s(r.d); }, | |
function(r) { | |
if (r.responseText == '') | |
return; | |
var x = JSON.parse(r.responseText); | |
if (x.Stacktrace) { |
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
#!/usr/bin/perl | |
sub sos_as_string ($;$) { | |
my ( $set, $string ) = @_; | |
$$string .= '{'; | |
my $i; | |
foreach my $key ( keys %{ $set } ) { | |
$$string .= ' ' if $i++; | |
if ( ref $set->{ $key } ) { |
NewerOlder