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
thomas@thomas-PBL21:~/Code/Pi-Voice$ python listen.py | |
Recording... | |
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear | |
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe | |
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side | |
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream | |
Cannot connect to server socket err = No such file or directory | |
Cannot connect to server socket | |
jack server is not running or cannot be started | |
* recording |
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
# encoding: utf-8 | |
# authors: jason liu and thomas weng | |
# NORMAL | |
class Normal | |
attr_accessor :result | |
def num_ord(n) | |
if (n.is_a? String) || n.nil? || Integer(n) != n || n <= 0 | |
@result = nil |
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
ActiveRecord::StatementInvalid in ReportsController#update | |
Mysql2::Error: Table 'db/shifts_development.delayed_jobs' doesn't exist: SHOW FULL FIELDS FROM `delayed_jobs` | |
Rails.root: /home/thomas/shifts | |
Application Trace | Framework Trace | Full Trace | |
activerecord (3.2.13) lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `query' | |
activerecord (3.2.13) lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `block in execute' | |
activerecord (3.2.13) lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log' |
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
$(document).ready(function () { | |
$('a[href]').each(function () { | |
var src = $(this).attr('href'); | |
// check that the origin is the same | |
// if (window.location.origin != origin) | |
//query parameter handling needs to be more safe than this | |
src += "?knowledgepreview=true"; |
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
//this.colorBuffer.Lock(); | |
//colorFrame.CopyConvertedFrameDataToIntPtr( | |
// this.colorBuffer.BackBuffer, | |
// (uint)(colorFrameDescription.Width * colorFrameDescription.Height * 4), | |
// ColorImageFormat.Bgra); | |
//this.colorBuffer.AddDirtyRect(new Int32Rect(0, 0, this.colorBuffer.PixelWidth, this.colorBuffer.PixelHeight)); | |
//this.colorBuffer.Unlock(); |
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
String toSave = ""; | |
for (int i = 0; i < numObjects; i++) | |
{ | |
String coords = this.objColorCoords[i].row + "," + this.objColorCoords[i].col; | |
toSave += coords + ";"; | |
} | |
toSave = toSave.Substring(0, toSave.Length - 1); | |
Properties.Settings.Default.ObjectThresholdValues = toSave; | |
Properties.Settings.Default.Save(); |
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
"" General | |
set number " Show line numbers | |
set showmatch " Highlight matching brace | |
set noerrorbells " Use visual bell (no beeping) | |
set novisualbell | |
set hlsearch " Highlight all search results | |
set gdefault " Always sub all matches in a line | |
set incsearch " Searches for strings incrementally | |
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
BitmapSource bitmap = BitmapSource.Create( | |
640, 480, | |
96, 96, pf, null, | |
buffer, rawStride); | |
// save image to stream | |
MemoryStream ms = new MemoryStream(); | |
BitmapEncoder encoder = new PngBitmapEncoder(); | |
encoder.Frames.Add(BitmapFrame.Create(bitmap)); | |
encoder.Save(ms); |
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
Bitmap bmpOrig = new Bitmap(@"C:\Users\Thomas\Desktop\picture.png"); | |
Bitmap bmpResized = new Bitmap(bmpOrig, new System.Drawing.Size(640, 480)); | |
Bitmap bmp = bmpResized.Clone(new Rectangle(0,0,bmpResized.Width,bmpResized.Height), System.Drawing.Imaging.PixelFormat.Format24bppRgb); | |
//byte[] bytes = new byte[bmp.Width * bmp.Height * 3]; | |
//int index = 0; | |
//for (int i = 0; i < bmp.Height; i++) | |
//{ | |
// for (int j = 0; j < bmp.Width; j++) | |
// { | |
// System.Drawing.Color color = bmp.GetPixel(j,i); |
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
OlderNewer