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
private void updateCheckedTasks() { | |
ListView listView = getListView(); | |
int nrOfTasks = listView.getCount(); | |
Log.i("TODO", "This is the number of tasks = "+nrOfTasks); // This prints the 5 items in the list | |
Task task = null; | |
for(int i = 0; i < nrOfTasks;i++) { | |
task = (Task) listView.getItemAtPosition(i); // This doesn't seem to work | |
Log.i("TODO", "Task = "+task); // This prints that the task is null | |
if(task.isDone()) listView.setItemChecked(i, 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
// Uses line-checking to find all the conflicts(violations) for the given position | |
private static int conflicts(Point position, int[][] board) { | |
int nrOfConflicts = 0; | |
int row = position.x; | |
int col = position.y; | |
// Conflicts below position | |
int runs = 1; | |
for(int i=(row+1); i<board.length; i++) { | |
// Vertical down |
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/bash | |
# Deploy script for Meteor.js to Heroku | |
# | |
# Author: Martin A. Midtsund / martin@iterate.no | |
# | |
# Before running this script, you need to have these tools in your path: | |
# meteor - To install: $ curl https://install.meteor.com | sh | |
# heroku - Install Heroku toolbelt and log in to your user: https://toolbelt.heroku.com/ | |
# git - You'll get this in the Heroku toolbelt, if you don't already have it. | |
# |
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
# Throw Bindings | |
#bind 1:ctrl;alt throw 0 resize | |
#bind 2:ctrl;alt throw 1 resize | |
#bind 3:ctrl;alt throw 2 resize | |
bind 2:ctrl;cmd throw right resize | |
bind 1:ctrl;cmd throw left resize | |
bind 3:ctrl;cmd throw up resize | |
bind 4:ctrl;cmd throw down resize |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="2.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:maven="http://maven.apache.org/POM/4.0.0"> | |
<xsl:output omit-xml-declaration="no" indent="yes"/> | |
<xsl:strip-space elements="*" /> | |
<!-- Identity template, copies every element in source file --> | |
<xsl:template match="node() | @*"> | |
<xsl:copy> |
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
<head> | |
<title>example-chat</title> | |
</head> | |
<body> | |
<h1>Welcome to Meteor!</h1> | |
{{> hello}} | |
</body> |