PHP testdummy

public function testdummy ( $value=\'\' ) {
/*** Description ***/
	# code...
}

Other growlnotify用法

growlnotify usage:

growlnotify -s -t \'Title\' -m \'Message\'

-s Sticky 
-m Message
-t Tilte
-p Priority
-H, -host Network

Other 缓冲协议

@protocol BufferSaveFilterProtocol : NSObject
- (NSFileHandle*)buffer:(Buffer*)aBuffer willSaveFile:(NSFileHandle*)aFileHandle;
@end

HTML OSCommerce表宽度

Change

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->

To

<!-- body //-->
<table border="0" width="770" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->

All of the files in the catalog folder plus the catalog/includes/header.php and catalog/includes/footer.php files will need to be changed. A quick find and replace in your editor will replace all the pages that have the same code as above in the catalog folder. The header.php and footer.php files have a little different code and would need to be manually changed.

C++ 加入c desde c

extern \"C\" {
    #include \"header.h\"
}

JavaScript 修复IE Hi-Res Bug

function fnScaleFactorX() {
   nScaleFactor = screen.deviceXDPI / screen.logicalXDPI;
   return nScaleFactor;
}
if (fnScaleFactorX() > 1) {
   document.getElementById("block_1").style.marginBottom = "-26000px";
}

Other tar命令

tar -czvf file.tar.gz dir/*

PHP PHP:打印html标题

function print_header( $title ) {
		echo 	\"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.01//EN\\\" \\\"http://www.w3.org/TR/html4/strict.dtd\\\"><html lang=\\\"de\\\"><head><meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=utf-8\\\" /><title>\" . $title . \"</title><link rel=\\\"shortcut icon\\\" href=\\\"favicon.ico\\\" type=\\\"image/x-icon\\\"><link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"corax.css\\\"></head><body>\";
	};

Objective C AñadeuncÃrculorojo con un texto en blanco al icono delaaplicaciónenel dock

-(void) updateApplicationIcon:(int) theNumber:(NSRect) theRect{
	// get the current app icon
	NSImage *appImage = [NSImage imageNamed:@"NSApplicationIcon"];
	
	// create a new image and draw the app icon onto it
	NSImage *image = [[NSImage alloc] initWithSize:[appImage size]];
	
	// lock focus on the new image and draw the app icon onto it.
	// you'll want the image flipped so text shows up correctly
	[image setFlipped:TRUE];
	[image lockFocus];
	NSSize appSize = [appImage size];	
	[appImage compositeToPoint:NSMakePoint(0, appSize.height) 
					 operation:NSCompositeSourceOver];
	
	// draw red circle
	NSBezierPath *redCircle = [NSBezierPath bezierPathWithOvalInRect:NSMakeRect(8,43,45,45)];
	[[NSColor redColor] setFill];
	[redCircle fill];
	
	// draw whatever else you want onto the image
	NSArray *values = [NSArray arrayWithObjects:[NSColor whiteColor], [NSFont fontWithName:@"Tahoma" size:32], nil];
	NSArray *keys = [NSArray arrayWithObjects:NSForegroundColorAttributeName, NSFontAttributeName, nil];
	
	NSDictionary *attrs = [NSDictionary dictionaryWithObjects:values forKeys:keys];
	NSString *caption= [NSString stringWithFormat:@"%d", theNumber];
	NSAttributedString *text= [[NSAttributedString alloc] initWithString:caption attributes:attrs];
	[text drawInRect:theRect];
	
	// unlock focus and set the new image as the dock icon
	[image unlockFocus];
	[NSApp setApplicationIconImage:image];
}

Objective C Limpiar el icono delaaplicaciónenel dock

-(void) initApplicationIcon{
	// empty application icon
	NSImage *appImage = [NSImage imageNamed:@"NSApplicationIcon"];
	[NSApp setApplicationIconImage:appImage];
}