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 jens($matches) | |
{ | |
$path = ''; | |
$parts = explode(',', $matches[1]); | |
foreach($parts as $match) | |
$path .= '/' . str_replace('\'', '', trim($match)); | |
return $path; | |
} |
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
$.plot($("#chart"), set, { | |
xaxis: { | |
mode: "time", | |
timeformat: "%y-%m-%d" | |
}, | |
yaxis: { | |
tickFormatter: function(v) { return (parseInt(v, 10) / 1000) + " kkr";} | |
}, | |
series: { | |
lines: { show: 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
using System; | |
using System.Xml.Serialization; | |
using System.IO; | |
namespace Scrap | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
using System.Linq.Expressions; | |
using Microsoft.CSharp.RuntimeBinder; | |
namespace Nancy | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Dynamic; | |
public class DynamicDictionary : DynamicObject, IEquatable<DynamicDictionary> |
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 | |
require_once 'outpost.php'; | |
$app = new Outpost; | |
$app->before(function() { | |
echo "Running before filter<br /><br />"; | |
}); | |
$app->after(function() { | |
echo "<br /><br />Running after filter"; |
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 | |
require_once 'lib/Ava.php'; | |
$app = new Ava; | |
$app->using('domain'); | |
$app->enable('diagnostics'); | |
$app->get('/', function($r) { | |
$services = Service::all(); | |
render('index', array('services' => $services)); |
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
Scenario: Index lists active orders | |
Given there are 2 active orders | |
Given there are 1 inactive orders | |
When i go to Index | |
Then i should see 2 active orders | |
Scenario: Requesting a single order | |
Given there are an order with id 1 | |
When i want to show order with id 1 | |
Then i should see order with id 1 |
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
html_data += '<li>'; | |
html_data += '<a title="' + item.text + '" class="twitter item-' + i + '" href="' + item.url + '">'; | |
html_data += '<img src="' + item.thumbnail + '" />' + '<span>' + item.date + '</span>' + item.text; | |
html_data += '</a>'; | |
html_data += '</li>'; | |
Kan bli: | |
<script id="twitter-template" type="text/x-jquery-tmpl"> | |
<li> |
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
table | |
{ | |
width: 100%; | |
} | |
th | |
{ | |
background-color: #EEEEEE; | |
background-image: -moz-linear-gradient(#E6E6E6, #D9D9D9); | |
border-bottom: 1px solid #B4B4B4; | |
padding: 10px; |
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 Storage() { | |
this.isSupported = function () { | |
try { | |
return !!localStorage.getItem; | |
} catch (e) { | |
return false; | |
} | |
}; | |
this.get = function (name) { |
OlderNewer