This file contains hidden or 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
# coding: utf8 | |
print [x for x in range(1900, 2201) if x%4 == 0 and x%100 != 0 or x%400 == 0] |
This file contains hidden or 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/env ruby | |
# | |
# Convert blogger (blogspot) posts to jekyll posts | |
# | |
# Basic Usage | |
# ----------- | |
# | |
# ./blogger_to_jekyll.rb feed_url | |
# | |
# where `feed_url` can have the following format: |
This file contains hidden or 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
# SQLite version 3.x | |
# gem install sqlite3 | |
# | |
# Ensure the SQLite 3 gem is defined in your Gemfile | |
# gem 'sqlite3' | |
development: | |
adapter: mysql2 | |
encoding: utf8 | |
reconnect: false | |
database: ut-addventure_development |
This file contains hidden or 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
PImage markers = loadImage("AllBchThinMarkers.png"); | |
int w = 12, h = 12; | |
int w_m = 8, h_m = 8; | |
int r_num = 64; | |
int c_num = 64; | |
int id = 0; | |
for (int ky = 0; ky < c_num * h; ky += h) { | |
for (int kx = 0; kx < r_num * w; kx += w) { | |
PImage marker = createImage(w_m, h_m, RGB); | |
for (int y = ky + h - h_m, _y = 0; y < ky + h; y++, _y++) { |
This file contains hidden or 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
//Modified version of sprite-grid.jsx by Filip Van Tendeloo | |
//Fixed for earlier versions of Photoshop based on guideLine function from | |
//http://www.ps-scripts.com/bb/viewtopic.php?f=9&t=3493&start=0 | |
//None of this code is mine | |
// check for document | |
if(app.documents.length > 0){ | |
// get active document | |
var psDoc = app.activeDocument; |
This file contains hidden or 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
<div class="pagination"> | |
<ul> | |
<?php | |
echo $this->Paginator->prev('«', | |
array( | |
'tag' => 'li', | |
'class' => 'prev', | |
), | |
$this->Paginator->link('«', array()), | |
array( |
This file contains hidden or 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
import java.util.Random; | |
import java.io.*; | |
class Mondai19_3{ | |
public static void main(String[] args) throws Exception{ | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
boolean undone=true; | |
Random rand=new Random(); | |
while(undone){ | |
int my=0; |
This file contains hidden or 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
class Mondai19_2{ | |
public static void main(String[] args){ | |
double b=Double.parseDouble(args[0]); | |
double c=Double.parseDouble(args[1]); | |
double _A=Double.parseDouble(args[2]); | |
double a=Math.sqrt(c*c + b*b - c*b*Math.cos(_A)); | |
double area=b*a/2; | |
System.out.println("b:" + b + "\nc:" + c + "\nA:" + _A + "\narea : " + area); | |
} | |
} |
This file contains hidden or 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
class Mondai19_1{ | |
public static void main(String[] args){ | |
System.out.println(args[0].toUpperCase() + ", and its length is " + args[0].length() + "."); | |
} | |
} |
This file contains hidden or 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
import java.io.*; | |
class Mondai18_2{ | |
public static void main(String[] args){ | |
try{ | |
BufferedReader r = new BufferedReader(new FileReader("siken.txt")); | |
PrintWriter w = new PrintWriter(new BufferedWriter(new FileWriter(args[0]))); | |
String[] t=r.readLine().split(" "); | |
int[] a = new int[t.length]; | |
for(int i=0; i<a.length; i++){ |