Currently browsing category

Computers, Page 61

NSTimer:timerWithTimeInterval:target:selector:userInfo:repeats:

+(NSTimer *) timerWithTimeInterval:(NSTimeInterval)seconds    target:(id)target    selector:(SEL)aSelector    userInfo:(id)userInfo    repeats:(BOOL)repeats ## example #import “MyObject.h” @implementation MyObject NSTimer *timer; – (IBAction)myAction:(id)sender { timer = [NSTimer timerWithTimeInterval:1 …

linux notes – su only for someone

##### /etc/pam.d/su #%PAM-1.0 auth sufficient /lib/security/$ISA/pam_rootok.so # Uncomment the following line to implicitly trust users in the “wheel” group. #auth sufficient /lib/security/$ISA/pam_wheel.so …

ls in Cocoa

//Launch “ls -l -a -t” in the current directory, and then read the result into an NSString: NSTask *task; task = [[NSTask …

Wiki error 1034

from within function “SearchUpdate::doUpdate”. MySQL returned error “1034: Incorrect key file for table ‘searchindex’; try to repair it (localhost)”. REPAIR TABLE searchindex

searchindex.MYI = errno: 145

[root@mysql wiki]# myisamchk -r /var/lib/mysql/wikidb/wikidb_searchindex.MYI – recovering (with sort) MyISAM-table ‘/var/lib/mysql/wikidb/wikidb_searchindex.MYI’ Data records: 212 – Fixing index 1 – Fixing index 2 …

linux notes – mrtg cisco switch

[root@mrtg ~]# cfgmaker –global “WorkDir: /var/www/mrtg/cisco1” –global “RunAsDaemon: Yes” –output=/etc/mrtg/cisco1.cfg public@cisco1 [root@mrtg ~]# env LANG=C /usr/bin/mrtg /etc/mrtg/cisco1.cfg [root@mrtg ~]# indexmaker –output=/var/www/mrtg/cisco1/cisco1.html /etc/mrtg/cisco1.cfg

linux notes – mrtg apc temperature

[root@mrtg ~]# snmpwalk -v 1 -c public 192.168.1.x SNMPv2-MIB::sysDescr.0 = STRING: APC Web/SNMP Management Card (MB:v3.6.4 PF:v2.5.0 PN:apc_hw02_aos_250.bin AF1:v2.5.1 AN1:apc_hw02_sumx_251.bin MN:AP9619 HR:A10 …