Skip to content

Instantly share code, notes, and snippets.

View magicshui's full-sized avatar

Magicshui magicshui

View GitHub Profile
#import <Cocoa/Cocoa.h>
#import "CaculatorBrain.h"
@interface CaculatorBrainAppDelegate : NSObject <NSApplicationDelegate>
// the outlet of the label
@property (weak) IBOutlet NSTextFieldCell *display;
@property (assign) IBOutlet NSWindow *window;
@magicshui
magicshui / cx.aspx
Created March 12, 2012 01:55
成绩查询
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeBehind="Default.aspx.cs" Inherits="Chaxun._Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<asp:ScriptManager ID="ScriptManager1" runat="server">
@magicshui
magicshui / move_desktop_to_ddisk.py
Created December 29, 2011 08:29
move the desktop files to D disk
import os,shutil,sys,datetime
org_path=["C:\\Users\\AolneShui\\Desktop"]
des_path=["D:\\MyDesktop\\"+str(datetime.date.today())]
def MoveDirAndFiles(srcPath,dstPath):
allChangeFileList=os.listdir(srcPath)
for changeFileItem in allChangeFileList:
changeFilePath=os.path.join(srcPath,changeFileItem)
if(os.path.isdir(changeFilePath)):
dstAddPath=os.path.join(dstPath,changeFileItem)
@magicshui
magicshui / joinpptfiles.py
Created December 19, 2011 12:05
join the ppt files into one single ppt file
# put all the files into a folder,and change the path var below
import win32com.client , sys , os , glob
Application = win32com.client.Dispatch("PowerPoint.Application")
Application.Visible = True
new_ppt = Application.Presentations.Add()
path = "C:\\"
os.chdir(path)
for files in glob.glob(os.path.join(path,"*.ppt")):
exit_ppt = Application.Presentations.Open(files)
page_num = exit.Slides.Count
@magicshui
magicshui / cx.aspx
Created June 7, 2011 08:53
cx source code
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeBehind="Default.aspx.cs" Inherits="Chaxun._Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<asp:ScriptManager ID="ScriptManager1" runat="server">
@magicshui
magicshui / yjpj.js
Created June 3, 2011 12:19
一键完成教学评估
javascript:
// 取消时间限制
parent.bottomFrame.mainFrame.setFlag();
// 勾选所有选项为“优秀”(默认)
for(i=0;i<parent.bottomFrame.mainFrame.document.StDaForm.elements.length;i++)
{
if(parent.bottomFrame.mainFrame.document.StDaForm.elements[i].type=='radio'
&&parent.bottomFrame.mainFrame.document.StDaForm.elements[i].value=='10_1')
{
parent.bottomFrame.mainFrame.document.StDaForm.elements[i].checked=true;