This file contains hidden or 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 MainPage() | |
| { | |
| InitializeComponent(); | |
| CameraCaptureTask cct = new CameraCaptureTask(); // initalize task | |
| cct.Completed += new System.EventHandler<PhotoResult>(this.PhotoChooserCompleted); // wire up the event | |
| cct.Show(); // launch camera | |
| } |
This file contains hidden or 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
| private void StartOcrConversion(Stream photoStream) | |
| { | |
| byte[] photoBuffer = MainPage.StreamToByteArray(photoStream); | |
| OcrService.RecognizeImageAsync( | |
| HawaiiClient.HawaiiApplicationId, | |
| photoBuffer, | |
| (output) => | |
| { | |
| this.Dispatcher.BeginInvoke(() => OnOcrCompleted(output)); |
This file contains hidden or 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
| private void OnOcrCompleted(OcrServiceResult result) | |
| { | |
| if (result.Status == Status.Success) | |
| { | |
| int wordCount = 0; | |
| StringBuilder sb = new StringBuilder(); | |
| foreach (OcrText item in result.OcrResult.OcrTexts) | |
| { | |
| wordCount += item.Words.Count; | |
| sb.Append(item.Text); |
This file contains hidden or 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 ANSI_NULL ON | |
| GO | |
| SET QUOTED_IDENTIFIER ON | |
| GO | |
| CREATE PROCEDURE dbo.InsertStopTimes | |
| @SerializedData xml, | |
| @NewPartitionKey uniqueidentifier, | |
| @OldPartitionKey uniqueidentifier | |
| AS |
This file contains hidden or 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
| List<StopTime> stopTimes = new List<StopTime>(); | |
| Guid newPartitionKey = Guid.NewGuid(); | |
| foreach (Stop_Time t in GTFSEngine.Stop_Times) | |
| { | |
| StopTime data = new StopTime(); | |
| data.RowKey = Guid.NewGuid(); | |
| data.PartitionKey = newPartitionKey; | |
| data.StopID = t.StopID; |
This file contains hidden or 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
| for /f "tokens=* delims=" %%i in ('dir /s /b /a:d *svn') do ( rd /s /q "%%i" ) |
This file contains hidden or 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
| mount -o rw,remount / |
This file contains hidden or 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
| wget http://github.com/downloads/mbmccormick/hamachi-pogoplug/hamachi-pogoplug.tar.gz | |
| tar -zxvf hamachi-pogoplug.tar.gz |
This file contains hidden or 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
| cp etc/ /etc -r | |
| cp root/.hamachi /root -r | |
| cp sbin/ /sbin -r | |
| cp usr/ /usr -r | |
| cp var/ /var -r |
This file contains hidden or 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
| ln -sf /usr/lib/libstdc++.so.6.0.9 /usr/lib/libstdc++.so.6 | |
| ln -sf /usr/lib/libcrypto.so.0.9.8 /usr/lib/libcrypto.so.0.9.7 | |
| ln -sf /usr/bin/hamachi /usr/bin/hamachi-init | |
| chmod 755 /usr/bin/hamachi | |
| chmod 700 /sbin/tuncfg |