This file contains 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
// | |
// ContentViewController.m | |
// | |
// Created by Johnnie Walker on 07/06/2013. | |
// | |
#import "ContentViewController.h" | |
@interface ContentViewController () <UITableViewDataSource, UITableViewDelegate> | |
@property (nonatomic, weak) UITableView *tableView; |
This file contains 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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillShow:) | |
name:UIKeyboardWillShowNotification | |
object:nil]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillHide:) |
This file contains 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
@implementation UIView (KLCPopupExample) | |
- (UITableViewCell*)parentCell { | |
// Iterate over superviews until you find a UITableViewCell | |
UIView* view = self; | |
while (view != nil) { | |
if ([view isKindOfClass:[UITableViewCell class]]) { | |
return (UITableViewCell*)view; | |
} else { |
This file contains 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
#!/bin/python | |
import os | |
import sys | |
import shutil | |
import multiprocessing | |
'''os.system("cleartool setview elqstux_ki_ppb")''' | |
ftPath = "/vobs/mgwblade/PPB/SBG_HSD10196_1/test/auto" | |
sgcPath = "/vobs/mgwblade/SGC/SGC_CSA10105_4/SGC_CRA1190962" |
This file contains 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 "fmt" | |
// fibonacci 函数会返回一个返回 int 的函数。 | |
func fibonacci() func() int { | |
a := -1 | |
b := 1 | |
return func() int { | |
a, b = b, a+b | |
return b | |
} |
This file contains 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
from Tkinter import * | |
import time, string | |
import Pmw | |
class EntryValidation: | |
def __init__(self, master): | |
now = time.localtime(time.time()) | |
self._date = Pmw.EntryField(master, labelpos='w', label_text='Date (mm/dd/yy):', value = "%d%d%d" % (now[1], now[2], now[0]), | |
validate={'validator':'date', 'format':'mdy', 'separator':'/'}) |
This file contains 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
var path = require('path'); | |
var fs = require('fs'); | |
var tarball = require('tarball-extract'); | |
var rimraf = require("rimraf"); | |
var srcDir = "C:\\Users\\elqstux\\Desktop" | |
var dstDir = "C:\\Users\\elqstux\\Desktop\\SBG Code\\src"; | |
var files = ["SOM_CRA1190221.tar.gz", "SYF_CRA1190070.tar.gz", "auto.tar.gz", "SGC_CRA1190962.tar.gz"]; |
This file contains 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
#!/vobs/ims/common/tools_root/cdfrt/dist/unitprep/TDP-Python-CXS1040058-R2A01/contained/DT_Python/bin/python | |
import os | |
from subprocess import Popen, PIPE | |
import traceback | |
import threading | |
import time | |
import sys | |
AIT_DIR = r"/vobs/ims/sbg/src/delivery/sgcPSR/SiteConfigurationPackage/AIT" |
This file contains 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
var express = require('express'); | |
var app = express(); | |
var Waterline = require('waterline'); | |
var sailsMongoAdapter = require('sails-mongo'); | |
var orm = new Waterline(); | |
var bodyParser = require('body-parser'); | |
var bcrypt = require('bcrypt'); | |
app.use(bodyParser.urlencoded({ extended: false })); | |
app.use(bodyParser.json()) |
This file contains 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
-module(tcp_server). | |
-compile(export_all). | |
start(Port) -> | |
Pid = spawn_link(fun()-> | |
{ok, ListenSocket} = gen_tcp:listen(Port, [binary, {active, false}]), | |
spawn(fun() -> acceptor(ListenSocket) end), | |
timer:sleep(infinity) |
OlderNewer