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 |
'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'); | |
} |
// config/passport.js | |
// load all the things we need | |
var LocalStrategy = require('passport-local').Strategy; | |
var mysql = require('mysql'); | |
var connection = mysql.createConnection({ | |
host : 'localhost', | |
user : 'root', |
import { Subject } from 'rxjs/Subject'; | |
import { Store } from '@ngrx/store'; | |
import { Component, OnInit, OnDestroy, AfterViewInit } from '@angular/core'; | |
import { AppState } from '../../../root.reducer'; | |
@Component({ | |
selector: 'my-map-example', | |
template: ` | |
<sebm-google-map |