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
sin関数の魅力に迫る! | |
これは超ハイテンションでsin関数の魅力に迫るという文章です | |
sin関数は入力された角度(ラジアン)を元に、-1から1までのあいだの値を返却します | |
sin関数は周期的な特徴があって入力する値を増やしていくと... | |
----------------- | |
sin(0) = 0 | |
sin(1) = 0.1 | |
sin(2) = 0.14 | |
... |
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
/* | |
* Property prefix hacks | |
*/ | |
/* IE6 only - any combination of these characters */ | |
_ - £ ¬ ¦ | |
/* IE6/7 only - any combination of these characters */ |
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
function isStrictFunction(fn) { | |
if (typeof fn != 'function') throw "Not a function"; | |
try { | |
fn.caller, fn.arguments; | |
return false; | |
} catch (e) { | |
return e instanceof TypeError; | |
} | |
} |
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
#include "YourProjectName.h" | |
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) { | |
return new YourProjectName(audioMaster); | |
} | |
YourProjectName::YourProjectName(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, 0, NUM_PARAMS) { | |
} | |
YourProjectName::~YourProjectName() { |
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
meter{ | |
display: block; | |
border: 1px outset; | |
height: 20px; | |
width: 100px; | |
overflow: hidden; | |
} | |
meter div | |
{ | |
display: block; |
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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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
(function($){ | |
$.widget("ui.mywidget", { | |
options: { | |
autoOpen: true | |
}, | |
_create: function(){ | |
// by default, consider this thing closed. |
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
function getStyle(el, styleProp) { | |
var value, defaultView = el.ownerDocument.defaultView; | |
// W3C standard way: | |
if (defaultView && defaultView.getComputedStyle) { | |
// sanitize property name to css notation (hypen separated words eg. font-Size) | |
styleProp = styleProp.replace(/([A-Z])/g, "-$1").toLowerCase(); | |
return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); | |
} else if (el.currentStyle) { // IE | |
// sanitize property name to camelCase | |
styleProp = styleProp.replace(/\-(\w)/g, function(str, letter) { |
NewerOlder