Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
-- Print contents of `tbl`, with indentation. | |
-- `indent` sets the initial level of indentation. | |
function tprint (tbl, indent) | |
if not indent then indent = 0 end | |
for k, v in pairs(tbl) do | |
formatting = string.rep(" ", indent) .. k .. ": " | |
if type(v) == "table" then | |
print(formatting) | |
tprint(v, indent+1) | |
else |
- (void)showCard:(id)sender | |
{ | |
UIGraphicsBeginImageContext(self.view.window.frame.size); | |
[self.view.window.layer renderInContext:UIGraphicsGetCurrentContext()]; | |
UIImage *screenshot = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
UIViewControllerSubclass *card = [[UIViewControllerSubclass alloc] init]; | |
card.background = screenshot; | |
[self presentModalViewController:card animated:NO]; |
/* | |
Distributed under The MIT License: | |
http://opensource.org/licenses/mit-license.php | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to |
import java.io.IOException; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import android.graphics.Bitmap; | |
import android.graphics.Matrix; | |
import android.os.Build; |
""" | |
formula.py - propositional formulas for Python | |
by Robin Wellner | |
Hereby, I waive all rights to this library, as described at <http://creativecommons.org/publicdomain/zero/1.0/> | |
Examples: | |
foo = Atom('foo') | |
bar = Atom('bar') |
#!/usr/bin/python | |
import sys | |
import argparse | |
import os | |
import re | |
''' | |
A simple script to create lower-resolution Android drawables from higher-resolution ones. |
;; based on core.logic 0.8-alpha2 or core.logic master branch | |
(ns sudoku | |
(:refer-clojure :exclude [==]) | |
(:use clojure.core.logic)) | |
(defn get-square [rows x y] | |
(for [x (range x (+ x 3)) | |
y (range y (+ y 3))] | |
(get-in rows [x y]))) |
:- use_module(library(bounds)). | |
:- use_module(library(clp_distinct)). | |
suudoku(P) :- | |
Rows = [R1,R2,R3,R4,R5,R6,R7,R8,R9], | |
problem(P, Rows), | |
append_all(Rows, Vars), | |
vars_in(Vars, 1, 9), | |
Vars in 1..9, | |
row_constraint(Rows), |
A warning occurred (42 apples) | |
An error occurred |