Skip to content

Instantly share code, notes, and snippets.

import java.util.ArrayList;
interface Perimeter<T> {
double getPerimeter(T s);
}
interface Area<T> {
double getArea(T s);
}
public class Picture implements Cloneable{
private ArrayList<Shape> sps;
import java.util.Scanner;
class Matrix {
private static int row;
private static int[][] matrix;
private static int[][] temp;
public static void main(String[] args) {
System.out.println("Enter the number of rows in the square matrix: ");
Scanner input = new Scanner(System.in);
row = input.nextInt();
matrix = new int[row][row];
@r2dev
r2dev / App.java
Created January 29, 2016 02:06
lol i dont understand 100% but almost 80%, but whatever
public class App {
private static int fieldWidth, fieldSize;
private static long[] result;
private static int[] fieldCheck, fieldCheckR;
private static int[] rotationOffset = new int[8],
rotationX = new int[8],
rotationY = new int[8];
private static int linkData[] = new int[4];
public static void main(String[] args) {
int cell = 8;
@r2dev
r2dev / form.html
Last active January 8, 2016 12:06
Fail of the day i guess
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>form</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.5/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.5/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
</head>
@r2dev
r2dev / main.js
Created December 27, 2015 03:46
bookmark interface using reactjs, based on the quick start in react official website
var BookmarkCollection = React.createClass({
loadBookmarksFromServer: function() {
$.ajax({
url: this.props.link,
dataType: 'json',
cache: false,
success: function(data) {
this.setState({data: data.bookmarks})
}.bind(this),
error: function(xhr, status, err) {