This was tested on the Raspbian wheezy (2014-01-07)
apt-get update --fix-missing
apt-get upgrade
apt-get dist-upgrade
public static System.Drawing.Bitmap ToBitmap(this BitmapSource bitmapsource) | |
{ | |
System.Drawing.Bitmap bitmap; | |
using (var outStream = new MemoryStream()) | |
{ | |
// from System.Media.BitmapImage to System.Drawing.Bitmap | |
BitmapEncoder enc = new BmpBitmapEncoder(); | |
enc.Frames.Add(BitmapFrame.Create(bitmapsource)); | |
enc.Save(outStream); | |
bitmap = new System.Drawing.Bitmap(outStream); |
This was tested on the Raspbian wheezy (2014-01-07)
apt-get update --fix-missing
apt-get upgrade
apt-get dist-upgrade
obj-m += tcp_svr_sample.o | |
all: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
clean: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clea |
#!/bin/sh | |
# | |
# git-submodules.sh: add, init, update or list git submodules | |
# | |
# Copyright (c) 2007 Lars Hjemli | |
USAGE="[--quiet] [--cached] \ | |
[add <repo> [-b branch] <path>]|[status|init|update [-i|--init]|summary [-n|--summary-limit <n>] [<commit>]] \ | |
[--] [<path>...]|[foreach <command>]|[sync [--] [<path>...]]" | |
OPTIONS_SPEC= |
# define static profile | |
profile static_eth0 | |
static ip_address=192.168.250.5/24 | |
static routers=192.168.250.4 | |
static domain_name_servers=192.168.250.4 | |
# fallback to static profile on eth0 | |
interface eth0 | |
fallback static_eth0 |
'use strict'; | |
angular.module('app.api.entities.task', ['app.api.rest.task']) | |
.factory('Task', ['$rootScope', '$q', 'TaskApi', 'Socket', function($rootScope, $q, TaskApi, Socket) { | |
// here we use a simple in memory cache in order to keep actual data | |
// you can make it in any other way | |
var cache = {}; | |
var initObject = function(data) { | |
if (cache[data._id]) { |
'use strict'; | |
angular.module('app.api.entities.task', ['app.api.rest.task']) | |
.factory('Task', ['$rootScope', '$q', 'TaskApi', 'Socket', function($rootScope, $q, TaskApi, Socket) { | |
// here we use a simple in memory cache in order to keep actual data | |
// you can make it in any other way | |
var cache = {}; | |
var initObject = function(data) { | |
if (cache[data._id]) { |
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
// Somewhere in your controllers for this given example | |
// Example functions | |
$scope.itemOnLongPress = function(id) { | |
console.log('Long press'); | |
} | |
$scope.itemOnTouchEnd = function(id) { | |
console.log('Touch end'); | |
} |