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
ev.size = size; /* total size */ | |
ev.iov = ivp; | |
ev.binv = bvp; | |
fpe_was_unmasked = erts_block_fpe(); | |
(*drv->outputv)((ErlDrvData)p->drv_data, &ev); | |
erts_unblock_fpe(fpe_was_unmasked); | |
if (ivp != iv) { | |
erts_free(ERTS_ALC_T_TMP, (void *) ivp); | |
} | |
if (bvp != bv) { |
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
/* | |
** Everything ok, patch the beam code with op_call_nif | |
*/ | |
mod->nif = lib; | |
for (i=0; i < entry->num_of_funcs; i++) | |
{ | |
Uint* code_ptr; | |
erts_atom_get(entry->funcs[i].name, sys_strlen(entry->funcs[i].name), &f_atom); | |
code_ptr = *get_func_pp(mod->code, f_atom, entry->funcs[i].arity); | |
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
Package: webmachine | |
Architecture: all | |
Depends: erlang-otp | |
Section: misc | |
Priority: extra | |
Description: webmachine | |
webmusheen is a transcription of justin sheehy's brain into erlang. ponytail optional. |
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
split_binary(Bin, Char) -> | |
split_binary(Bin, Char, 0, []). | |
split_binary(Bin, _, Pos, Acc) when Pos >= byte_size(Bin) -> | |
lists:reverse([Bin|Acc]); | |
split_binary(<<Char:8, Rest/binary>>, Char, Pos, Acc) -> | |
split_binary(Rest, Char, 0, [<<>> | Acc]); | |
split_binary(Bin, Char, Pos, Acc) -> |
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
abstract class CCTherm { | |
val description: String | |
val yearMade: Int | |
def toXML = | |
<cctherm> | |
<description>{description}</description> | |
<yearMade>{yearMade}</yearMade> | |
</cctherm> |
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
static char blank[] = { 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, | |
0x0D, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x02, | |
0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xDE, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, | |
0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, | |
0x0B, 0x13, 0x00, 0x00, 0x0B, 0x13, 0x01, 0x00, 0x9A, 0x9C, 0x18, 0x00, 0x00, 0x00, 0x07, | |
0x74, 0x49, 0x4D, 0x45, 0x07, 0xD9, 0x05, 0x0D, 0x10, 0x39, 0x1E, 0x2B, 0xC2, 0xA3, 0x43, | |
0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6F, 0x6D, 0x6D, 0x65, 0x6E, 0x74, | |
0x00, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, | |
0x49, 0x4D, 0x50, 0x57, 0x81, 0x0E, 0x17, 0x00, 0x00, 0x00, 0x0C, 0x49, 0x44, 0x41, 0x54, | |
0x08, 0xD7, 0x63, 0xF8, 0xFF, 0xFF, 0x3F, 0x00, 0x05, 0xFE, 0x02, 0xFE, 0xDC, 0xCC, 0x59, |
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
if (MagickFalse == MagickResizeImage(magick->wand,resize_width,resize_height,LanczosFilter,1.0)) { | |
send_error(magick->wand, magick->port); | |
return; | |
} | |
pixel = NewPixelWand(); | |
PixelSetRed(pixel, red); | |
PixelSetGreen(pixel, green); | |
PixelSetBlue(pixel, blue); | |
PixelSetOpacity(pixel, opacity); |
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
val name = "fuck" | |
val balls = "balls" | |
balls match { | |
case name => "fuck you" | |
case _ => true | |
} |
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
def __byteConversion(v : Long) : Array[Byte] = { | |
val ba = new Array[Byte](8) | |
ba(0) = (0xff & (v >> 56)).toByte | |
ba(1) = (0xff & (v >> 48)).toByte | |
ba(2) = (0xff & (v >> 40)).toByte | |
ba(3) = (0xff & (v >> 32)).toByte | |
ba(4) = (0xff & (v >> 24)).toByte | |
ba(5) = (0xff & (v >> 16)).toByte | |
ba(6) = (0xff & (v >> 8)).toByte | |
ba(7) = (0xff & v).toByte |
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
8===================D~~~~~~ ( ¡ ) |