Skip to content

Instantly share code, notes, and snippets.

web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2014
Version 2.9.11-stable+timestamp.2014.09.15.23.35.11
Database drivers available: SQLite(sqlite3), MySQL(pymysql), MySQL(MySQLdb), MySQL(mysqlconnector), PostgreSQL(psycopg2), PostgreSQL(pg8000), MSSQL(pyodbc), DB2(pyodbc), Teradata
(pyodbc), Ingres(pyodbc), MongoDB(pymongo), IMAP(imaplib)
please visit:
http://127.0.0.1:8000/
use "kill -SIGTERM 29002" to shutdown the web2py server
@lubaochuan
lubaochuan / DoubleListTester.java
Created October 3, 2017 21:35
All test cases for the DoubleList class
import java.util.NoSuchElementException;
public class DoubleListTester{
public static void main(String[] args){
//====================================================
DoubleList<String> list = new DoubleList<String>();
System.out.println("\n==test addToFront()==");
// create a list: front-->A<->B<->C<--rear
list.addToFront("C");
public Maze(String fileName) throws FileNotFoundException{
Scanner scan = new Scanner(new File(fileName));
cols = Integer.parseInt(scan.next());
rows = Integer.parseInt(scan.next());
grid = new Square[rows][cols];
// remove line break;
scan.nextLine();

Keybase proof

I hereby claim:

  • I am lubaochuan on github.
  • I am lubaochuan (https://keybase.io/lubaochuan) on keybase.
  • I have a public key ASBuh-v0C1Fhf4QFGG6hjTtrf6Dil655ThFiFJk5xRlnqAo

To claim this, I am signing this object:

CREATE TABLE Classes (
class varchar(20) DEFAULT NULL,
type varchar(2) DEFAULT NULL,
country varchar(20) DEFAULT NULL,
numGuns int(11) DEFAULT NULL,
bore int(11) DEFAULT NULL,
displacement int(11) DEFAULT NULL
);
CREATE TABLE Ships (
public String toString(){
String result = "\n";
if(count != 0){
if (count > 2){
result += print(2, true, "");
}
result += tree[0]+"\n";
if (count > 1){
result += print(1, false, "");
}
public V remove(K key){
//PRE: key is not null
//POS: the mapping with the key is removed
//TO BE IMPLEMENTED
Element<K,V> target = new Element<K,V>(key, null);
Element<K,V> result = tree.find(target);
if(result != null){
tree.removeElement(result);
return result.getValue();
}else{
<!DOCTYPE BankData [
<!ELEMENT BankData (Customer•, Account•)>
<!ELEMENT Customer (Name, SSN, Phone+)>
<!ATTLIST Customer
customerID ID #REQUIRED
owns IDREFS #IMPLIED
>
<!ELEMENT Name (#PCDATA)>
<!ELEMENT SSN (#PCDATA)>
<!ELEMENT Phone (#PCDATA)>
import { Keyboard, Platform } from 'react-native';
import PropTypes from 'prop-types';
import React from 'react';
const INITIAL_ANIMATION_DURATION = 250;
export default class KeyboardState extends React.Component {
static propTypes = {
layout: PropTypes.shape({
x: PropTypes.number.isRequired,
import Constants from 'expo-constants';
import { Platform, StyleSheet, View } from 'react-native';
import PropTypes from 'prop-types';
import React from 'react';
export default class MeasureLayout extends React.Component {
static propTypes = {
children: PropTypes.func.isRequired,
};