Skip to content

Instantly share code, notes, and snippets.

View daslicht's full-sized avatar

Marc Wensauer daslicht

View GitHub Profile
@daslicht
daslicht / gist:d9f9a269b06ddc8b0541
Last active August 29, 2015 14:05
F3 Comment Block Wrap - Sublime Text Key Command
{ "keys": ["command+/"], "command": "insert_snippet", "args": {"contents": "{* ${0:$SELECTION} *}"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html", "match_all": true }
]
}
loadAPI(1);
host.defineController("AnSolas", "AnSolas Keyboard", "1.0", "94a53ca0-2c45-11e4-8c21-0800200c9a66");
host.defineMidiPorts(1, 0);
var LOWEST_CC = 1;
var HIGHEST_CC = 119;
function init()
{
@daslicht
daslicht / gist:abda13bb09d2ad881a2c
Created September 1, 2014 15:52
Array-vs-StdObject which do you prefer and why?
Which do you prefer :
$data = [
"foo" => "bar",
"uta" => "baz"
]
~or~
$data = new StdClass();
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="http://panels.scotch.io/dist/scotchPanels.js" ></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[supersized + jPanelMenu WORKING
]" />
<meta charset="utf-8">
<title>JS Bin</title>
<!-- <link rel="stylesheet" href="http://buildinternet.com/project/supersized/slideshow/3.2/css/supersized.css" type="text/css" media="screen" />
--> <link rel="stylesheet" href="http://buildinternet.com/project/supersized/slideshow/3.2/theme/supersized.shutter.css" type="text/css" media="screen" />
<link rel="stylesheet" href=" //maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" type="text/css" media="screen" />
@daslicht
daslicht / gist:1c1817a9098c484ead3f
Created December 1, 2014 12:05
JD800 Main Script 1
on init
set_script_title("init")
{declare ui_label $label (1,1)}
{set_text ($label,"Small Label")}
make_perfview
set_ui_height_px(150)
{ KNOB A ------------------------------------------------------------ }
Mai 17, 2015 12:00:02 PM controlP5.ControlBroadcaster printMethodError
SEVERE: An error occured while forwarding a Controller event, please check your code at controlEvent
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at controlP5.ControlBroadcaster.invokeMethod(Unknown Source)
at controlP5.ControlBroadcaster.broadcast(Unknown Source)
at controlP5.DropdownList.setValue(Unknown Source)
for (int i = 0; i < 4; ++i)
{
ToggleButton* tb = addToList (new ToggleButton ("Radio Button #" + String (i + 1)));
tb->setRadioGroupId (1234);
tb->setBounds (45, 46 + i * 22, 180, 22);
tb->setTooltip ("A set of mutually-exclusive radio buttons");
if (i == 0)
tb->setToggleState (true, dontSendNotification);
//PluginEditor.cpp
NewProjectAudioProcessorEditor::NewProjectAudioProcessorEditor (NewProjectAudioProcessor& p)
: AudioProcessorEditor(&p), processor(p)
{
...
myLabel = new Label("myLabel", text); // here I get: No operator matches theses operands ?
myLabel.setBounds(10, 10, 50, 20);
addAndMakeVisible(&myLabel);
...
<?php
$einheit = $unit;
$inhalt = $productAmount;
$bezugseinheit = 1;
switch ($einheit) {
case "ML":
if ($inhalt <= 250) {
$bezugseinheit = 100;