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
// source http://stackoverflow.com/questions/5919663/how-does-photoshop-blend-two-images-together | |
#define ChannelBlend_Normal(A,B) ((uint8)(A)) | |
#define ChannelBlend_Lighten(A,B) ((uint8)((B > A) ? B:A)) | |
#define ChannelBlend_Darken(A,B) ((uint8)((B > A) ? A:B)) | |
#define ChannelBlend_Multiply(A,B) ((uint8)((A * B) / 255)) | |
#define ChannelBlend_Average(A,B) ((uint8)((A + B) / 2)) | |
#define ChannelBlend_Add(A,B) ((uint8)(min(255, (A + B)))) | |
#define ChannelBlend_Subtract(A,B) ((uint8)((A + B < 255) ? 0:(A + B - 255))) | |
#define ChannelBlend_Difference(A,B) ((uint8)(abs(A - B))) | |
#define ChannelBlend_Negation(A,B) ((uint8)(255 - abs(255 - A - 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
class plant{ | |
id: string; | |
damage: int; | |
hp: int; | |
attack: int; | |
attkSpeed: int; | |
static final int maxHp = 10; | |
int getSpeed(){ | |
return attkSpeed; |
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
class plant{ | |
id: string; | |
damage: int; | |
hp: int; | |
attack: int; | |
attkSpeed: int; | |
static final int maxHp = 10; | |
boolean getSpeed(){ | |
return attkSpeed; |
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
class plant{ | |
id: string; | |
damage: int; | |
hp: int; | |
attack: int; | |
attkSpeed: int; | |
static final int maxHp = 10; | |
} | |
class zoombie{ | |
id: string; |
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
ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' |
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 java.awt.color.ColorSpace; | |
import java.awt.color.ICC_ColorSpace; | |
import java.awt.color.ICC_Profile; | |
import java.awt.image.BufferedImage; | |
import java.awt.image.ColorConvertOp; | |
import java.io.File; | |
import javax.imageio.ImageIO; | |
/** | |
* |
NewerOlder