Skip to content

Instantly share code, notes, and snippets.

@wudaown
wudaown / t.sh
Created June 23, 2012 14:53
check amule state
#!/bin/bash
amuleexit=$(ps aux| grep amule | head -n1 | awk '{print $11}')
echo "$amuleexit"
if [ "$amuleexit" == "grep" ]
then
amule
else
echo "fine"
fi
#!/usr/local/bin/python3.2
# _*_ coding:utf8 _*_
def durian():
"""docstring for durian"""
infile=open("test","r").read()
list=infile.split(",")
print(list)
dlist=[]
for i in range(len(list)):
#!/usr/local/bin/python3.2
# _*_ coding:utf8 _*_
def durian():
"""docstring for durian"""
infile=open("test1","r").read()
list=infile.split(",")
# print(list)
dlist=[]
for i in range(len(list)):
__author__ = 'wudaown'
# -*- coding: utf-8 -*-
import urllib.request
import http.cookiejar
import pickle
class opener:
def userAgent(self):
self.head = {
<form method="get" action="https://www.google.com/search">
<input type="text" name="q" size="31" value="">
</form>
<?
print("<table>");
print("<tr>");
print("<td>");
//print("<div id='searchable-form' >"); //
print("<div id='searchable'>Search: <input type='text' id='searchFILE' size='33' autocomplete='off' /></div>");
print("<select name='lktyp' id='lktypSearch' size='10' >");
//Create new SQL object
$db = new NSC_SQL($db2config);
$db->from($bllcust1,"BCUST#,BNAME");
@wudaown
wudaown / js
Created September 5, 2016 08:34
ikuai_login
$(document).ready(function(){
/*div居中*/
function landCenter(){
var land= $('.land_content');
land.css({
"left": ($(window).width() - land.outerWidth())/2,
package org.gp3.moblima.view.moviegoer;
import java.util.ArrayList;
import org.gp3.moblima.model.Movie;
import org.gp3.moblima.view.BaseMenu;
import org.gp3.moblima.view.Quit;
import static org.gp3.moblima.view.IOUtil.printMenuItems;
import static org.gp3.moblima.view.IOUtil.printTitle;
@wudaown
wudaown / ListMovie.java
Created October 20, 2017 15:50
ListMovie.java
package org.gp3.moblima.view.moviegoer;
import java.util.ArrayList;
import org.gp3.moblima.model.Movie;
import org.gp3.moblima.view.BaseMenu;
import org.gp3.moblima.view.Quit;
import static org.gp3.moblima.view.IOUtil.printMenuItems;
import static org.gp3.moblima.view.IOUtil.printTitle;
/*===============================================================*
* File: SWP.java *
* *
* This class implements the sliding window protocol *
* Used by VMach class *
* Uses the following classes: SWE, Packet, PFrame, PEvent, *
* *
* Author: Professor SUN Chengzheng *
* School of Computer Engineering *
* Nanyang Technological University *