Skip to content

Instantly share code, notes, and snippets.

@MagnusVortex
MagnusVortex / Game.cs
Created February 17, 2012 20:22
Why merges are a headache for me
private void InsertCard(CardModel card)
{
var sb = new StringBuilder();
using (SQLiteCommand com = GamesRepository.DatabaseConnection.CreateCommand())
{
//Build Query
sb.Append("INSERT INTO [cards](");
sb.Append("[id],[game_id],[set_real_id],[name], [image], [alternate]");
sb.Append(") VALUES(");
sb.Append("@id,@game_id,(SELECT real_id FROM sets WHERE id = @set_id LIMIT 1),@name,@image,@alternate");
@MagnusVortex
MagnusVortex / gist:1877259
Created February 21, 2012 16:28
OCTGN - SwitchWithAlternate API
Special optional card attribute: "alternate"
This property is designed to accept the guid of another card.
Special optional card attribute: "dependent" *** Functionality not yet implemented; Subject to change.
This parameter is designed to accept either a boolean value (True/False) or the guid of another card. Exclusively used in the Deck Editor.
Python Changes:
2 new functions
@MagnusVortex
MagnusVortex / gist:1929658
Created February 28, 2012 04:48
LobbyServer console output on a really crappy connection
[LobbyServer] V3.0.0.11
Client[0]:Verifying Token
Client[0]:Token Verified
Client[0]:Getting db User
Client[0]:Starting to Stop and remove by uid=154
Client[0]:Done Stop and remove by uid=154
Client[0]:Login Success
Skylabs.LobbyServer.exe Error: 0 : Timeout expired. The timeout period elapsed
prior to completion of the operation or the server is not responding.
@MagnusVortex
MagnusVortex / gist:1975054
Created March 4, 2012 22:12
crashed Lobby server output
[LobbyServer] V3.0.0.11
Client[0]:Verifying Token
Client[0]:Token Verified
Client[0]:Getting db User
Client[0]:Starting to Stop and remove by uid=154
Client[0]:Done Stop and remove by uid=154
Client[0]:Login Success
[3/4/2012:4:10 PM][ERROR(15)]GetUser:There is already an open DataReader ass
ociated with this Connection which must be closed first.
==========StackTrace==========
@MagnusVortex
MagnusVortex / controlerror
Created March 19, 2012 21:00
Error on take control of card.
+ $exception {"Exception has been thrown by the target of an invocation."} System.Exception {System.Reflection.TargetInvocationException}
+ sender {Name:OCTGN.vshost.exe
There are no context policies.
} object {System.AppDomain}
+ e {System.UnhandledExceptionEventArgs} System.UnhandledExceptionEventArgs
Call Stack:
@MagnusVortex
MagnusVortex / 2014-09-30 Bug Report RW 4.1
Created September 30, 2014 14:14
2014-09-30 Bug Report RW 4.1
Cannot set property 'className' of null
TypeError
TypeError: Cannot set property 'className' of null
at Object.self.on_stop (http://rainwave.cc/static/js4/audio.js:176:21)
at Object.self.stop (http://rainwave.cc/static/js4/audio.js:171:8)
at Array.user_tunein_check (http://rainwave.cc/static/js4/audio.js:101:10)
at perform_callbacks (http://rainwave.cc/static/js4/api.js:262:25)
at XMLHttpRequest.sync_complete (http://rainwave.cc/static/js4/api.js:186:4)
char *change_it(char * inbound)
{
strcat(inbound,"Hello World!");
return inbound;
}
int main()
{
char *stuff[30];
int i;
create (d01:d{id:'D01'})
     , (e01:e{id:'E01'})
     , (e02:e{id:'E02'})
     , (e03:e{id:'E03'})