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"; | |
// Model. Als toggle gecalled word zal done geinvert worden. Ook word de titel aangepast zodat de view opnieuw rendert. | |
var Todo = Backbone.Model.extend({ | |
defaults: { | |
title: "Something to remember", | |
done: false | |
}, |
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/sh | |
# | |
# ~/.xinitrc | |
# | |
# Executed by startx (run your window manager from here) | |
if [ -d /etc/X11/xinit/xinitrc.d ]; then | |
for f in /etc/X11/xinit/xinitrc.d/*; do | |
[ -x "$f" ] && . "$f" | |
done |
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
from operator import itemgetter | |
mylist = [ | |
["Some", "Data", "30.0", 12.10], | |
["Foo", "Bar", "29.5", 90.00], | |
["Fizz", "Buzz", "29", 13.12] | |
] | |
# Sorting using a field that already has a nice sortable type (for example, a float). | |
my_sorted_list_4 = sorted(mylist, key=itemgetter(3)) |
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
struct Record { | |
name: String, | |
message: String, | |
} | |
// Let's say `record` is an instance of Record, with strings in name and message. | |
// This will work correctly: | |
let message = |
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
var req = new Request.JSON({ | |
method: 'get', | |
url: 'ajax/graphDataRequest.php', | |
initialDelay: 0, | |
delay: 60000, | |
onRequest: function() { | |
// do stuff | |
}, | |
onSuccess: function(json) { | |
// do stuff |
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 | |
namespace VoetbalMoment\FrontendBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* VoetbalMoment\FrontendBundle\Entity\Pagina | |
* | |
* @ORM\Table(name="pagina") |
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
// Find optimal move | |
private Best chooseMove( int side, int[][] board ) | |
{ | |
int opp; // The other side | |
int win; | |
Best reply; // Opponent's best reply | |
int simpleEval; // Result of an immediate evaluation | |
int bestRow = 0; | |
int bestColumn = 0; | |
int bestReply = 0; |
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
jaapz@supergrover:~/Programmeren/Elementary/scratch/build$ gdb scratch | |
GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02 | |
Copyright (C) 2012 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "x86_64-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://bugs.launchpad.net/gdb-linaro/>... |
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
jaapz@ieniemienie:~/Programmeren/Elementary/gdrive/build$ make | |
[ 14%] Generating src/GDrive.c, src/GoaAuthorizer.c, src/Widgets/WebView.c, src/Widgets/FileView.c, build/src/Config.c | |
/home/jaapz/Programmeren/Elementary/gdrive/src/GDrive.vala:165.3-165.21: error: The name `insert_tab' does not exist in the context of `Granite.Widgets.DynamicNotebook' | |
notebook.insert_tab (new Granite.Widgets.Tab (title, new ThemedIcon (icon_name), scroll_view), -1); | |
^^^^^^^^^^^^^^^^^^^ | |
/home/jaapz/Programmeren/Elementary/gdrive/src/GoaAuthorizer.vala:75.24-75.27: warning: Argument 1: Cannot pass null to non-null parameter type | |
soup_uri.set_query (null); | |
^^^^ | |
/home/jaapz/Programmeren/Elementary/gdrive/src/GoaAuthorizer.vala:76.27-76.30: warning: Argument 1: Cannot pass null to non-null parameter type | |
soup_uri.set_fragment (null); |
OlderNewer