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 class DrawingFeature : Feature { | |
public ReactiveProperty<Drawing> Drawing = new ReactiveProperty<Drawing>(this.OnFeatureChanged); | |
} | |
// use: theDrawingFeature.Drawing.It = ...; | |
// theDrawingFeature.Drawing.Change += new EventHandler( ... ); | |
public class ReactiveProperty<T> |
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
[D-BUS Service] | |
Name=net.watte.robots.voltmon | |
Exec=/usr/local/src/voltmon/voltservice.py | |
Path=/usr/local/src/voltmon | |
User=pi |
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
#!/usr/bin/python2 | |
import gtk | |
import dbus | |
import dbus.service | |
import dbus.mainloop | |
import dbus.mainloop.glib | |
import spivolt | |
from dbus.mainloop.glib import DBusGMainLoop |
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
import dbus | |
class DBusVolt(object): | |
def __init__(self): | |
self.bus = dbus.SystemBus() | |
self.svc = self.bus.get_object('net.watte.robots.voltmon', '/net/watte/robots/voltmon') | |
self.readfn = self.svc.get_dbus_method('read', 'net.watte.robots.voltmon') | |
self.offfn = self.svc.get_dbus_method('off', 'net.watte.robots.voltmon') | |
def read(self): | |
return self.readfn() |
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
<!DOCTYPE busconfig PUBLIC | |
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | |
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | |
<busconfig> | |
<policy context="default"> | |
<allow own="net.watte.robots.voltmon"/> | |
<allow send_destination="net.watte.robots.voltmon"/> | |
<allow send_interface="net.watte.robots.voltmon"/> | |
</policy> | |
</busconfig> |
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
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" | |
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | |
<busconfig> | |
<servicedir>/usr/local/src/voltmon</servicedir> | |
<policy user="root"> | |
<allow eavesdrop="true"/> | |
<allow eavesdrop="true" send_destination="*"/> | |
</policy> |
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 "All.h" | |
#include <VG/openvg.h> | |
#include <VG/vgu.h> | |
#include <EGL/egl.h> | |
#include <GLES2/gl2.h> | |
#include <bcm_host.h> | |
#include <assert.h> | |
#include <stdlib.h> | |
#include <stdio.h> |
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 1 column, instead of 3 in line 2.
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
Raw data: | |
========= | |
1,2,5\n | |
3,4,9 | |
Expected: | |
2,3,7 | |
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
#!/bin/bash | |
trap "rm /var/tmp/foo.wav" EXIT | |
mpg123 -w /var/tmp/foo.wav "$1" >/dev/null 2>/dev/null | |
echo -n "$1 ; " | |
bpm=`soundstretch /var/tmp/foo.wav -bpm 2>&1 | grep "Detected BPM rate" | sed -e "s/Detected BPM rate //"` | |
echo "$bpm" |
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
-- AUTO-GENERATED, DO NOT EDIT !!! | |
data CampaignTemplateMaybe = CampaignTemplateMaybe | |
{ maybe_name :: !(Maybe Text) | |
, maybe_kind :: !(Maybe Text) | |
, maybe_definition :: !(Maybe Text) | |
, maybe_saved :: !(Maybe Bool) | |
, maybe_hidden :: !(Maybe Bool) | |
, maybe_last_active :: !(Maybe UTCTime) | |
} | |
deriving (Show, Read, Ord, Eq) |
OlderNewer