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
# Elsewhere... | |
newWindow = ChatWindowController.alloc.init(xmppStream, user) | |
newWindow.showWindow(self) | |
# My code | |
class ChatWindowController < NSWindowController | |
attr_accessor :user, :stream | |
def init(stream, user) | |
initWithWindowNibName 'Chatwindow' |
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
using UnityEngine; | |
using System.Collections; | |
public class Example : MonoBehaviour | |
{ | |
// The below references should be populated | |
// by dragging the desired controls from | |
// scene hierarchy onto these variables in | |
// the inspector: |
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
11-05-12 1:20:38 PM Briquette[16341] /Applications/Briquette.app/Contents/Resources/Message.rb:92:in `retrieveUpload': undefined method `[]' for nil:NilClass (NoMethodError) | |
from /Applications/Briquette.app/Contents/Resources/Message.rb:66:in `initialize:' | |
from /Applications/Briquette.app/Contents/Resources/Room.rb:91:in `messageReceived:' | |
from /Applications/Briquette.app/Contents/Resources/Room.rb:172:in `block' | |
from /Applications/Briquette.app/Contents/Resources/Room.rb:171:in `ready' | |
from /Applications/Briquette.app/Contents/Resources/Room.rb:347:in `loaded_user:' | |
from /Applications/Briquette.app/Contents/Resources/rb_main.rb:21:in `<main>' |
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
11-05-12 12:28:26 PM Briquette[16011] /Applications/Briquette.app/Contents/Resources/Message.rb:75:in `retrieveUpload': undefined method `[]' for nil:NilClass (NoMethodError) | |
from /Applications/Briquette.app/Contents/Resources/Message.rb:61:in `initialize:' | |
from /Applications/Briquette.app/Contents/Resources/Room.rb:90:in `messageReceived:' | |
from /Applications/Briquette.app/Contents/Resources/Room.rb:173:in `block' | |
from /Applications/Briquette.app/Contents/Resources/Room.rb:172:in `ready' | |
from /Applications/Briquette.app/Contents/Resources/Room.rb:341:in `loaded_user:' | |
from /Applications/Briquette.app/Contents/Resources/rb_main.rb:21:in `<main>' |
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
Shader "Transparent/ReflectiveVertexLit" { | |
Properties { | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) | |
_Shininess ("Shininess", Range (0.01, 1)) = 0.078125 | |
_ReflectColor ("Reflection Color", Color) = (1,1,1,0.5) | |
_MainTex ("Base (RGB) Gloss (A)", 2D) = "white" {} | |
_Cube ("Reflection Cubemap", Cube) = "_Skybox" { TexGen CubeReflect } | |
} |
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
<?php | |
ini_set("memory_limit","64M"); | |
if(($file = $_FILES['upload']) && $file['name'] != 'none' && $file['size'] && $file['tmp_name']) { | |
include 'class.wave.php'; | |
$wave = new wave($file['tmp_name']); | |
$chunk = $wave->wavechunk(); |
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
<?php | |
class wave { | |
var $fp, $filesize; | |
var $data, $blocktotal, $blockfmt, $blocksize; | |
function __construct($file) { | |
if(!$this->fp = @fopen($file, 'rb')) { |
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
Public Sub Send_MapData(Index As Integer, MapID As String) | |
Dim Xoffset As Integer | |
Dim Yoffset As Integer | |
Dim X As Integer | |
Dim Y As Integer | |
Dim xx As Integer | |
Dim yy As Integer | |
Dim temp As String | |
Let Xoffset = Asc(Mid$(MapID, 5, 1)) |
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
KEY = ['4E', '65', '78', '6F', '6E', '49', '6E', '63', '2E'] | |
def self.decrypt(packet, increment) | |
0.upto(packet.length-1) do |i| | |
packet[i] = (packet[i] ^ (KEY[i % 9].hex)) | |
packet[i] = (packet[i] ^ (i/9) ) | |
packet[i] = (packet[i] ^ increment) | |
end | |
#todo optimize conversion | |
return packet.map {|x| x.to_s(16).hex.chr}.join |
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
Nexus packet decryptor/encryptor function by VIPERZOO. | |
(new version using 32bit xoring for faster operation) | |
IMPORTANT IMPORTANT! - If you are using dynamically generated buffers to hold your packet data for encryption/unencryption, the size of the buffer MUST be AT LEAST the smallest multiple of 4 above the size of your packet plus 1. For example, say you have a packet that is in total 25 bytes large (that is including the AA and size header), you must put it in a buffer that is a MINIMUM of 29 bytes large (28 is smallest multiple of 4 over 25, add 1 = 29) to avoid buffer access page faults. Also, remember the true size of the packet (or just check it from the header) when working with the data after so you don't pull any extra garbage data from having to pad the buffer with extra bytes. | |
Included is the DLL and the source code for the nexus packet decryption/encryption routine. | |
Usage of it is very simple, include the library file in your project and set up a definition of the "crypt_packet" function, |
NewerOlder