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
$.ajax({ | |
url: 'http://127.0.0.1:5984/insightout/_all_docs?include_docs=true&limit=25', | |
type: 'GET', | |
success: function(result) { | |
var result = JSON.parse(result); | |
for(var i = 0; i<result.rows.length; i++) { | |
if(result.rows[i].doc.type == 'DeviceReading') { | |
//console.log(result.rows[i].doc._id) | |
$.ajax({ | |
url: 'http://127.0.0.1:5984/insightout/_design/update_readings/_update/in-place-query/' + result.rows[i].doc._id + '?field=couchDbId&value=19fc40f327d2a154a1c6288089cb7579', |
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
function dynamicSort(property) { | |
var sortOrder = 1; | |
if(property[0] === "-") { | |
sortOrder = -1; | |
property = property.substr(1); | |
} | |
return function (a,b) { | |
var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0; | |
return result * sortOrder; | |
} |
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
protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData) | |
{ | |
try | |
{ | |
int icolumn = dgvCart.CurrentCell.ColumnIndex; | |
int irow = dgvCart.CurrentCell.RowIndex; | |
if (keyData == Keys.Enter) | |
{ | |
if (icolumn == dgvCart.Columns.Count - 1) |
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
curl -s http://getcomposer.org/installer | php | |
sudo mv composer.phar /usr/local/bin/ | |
alias composer='/usr/local/bin/composer.phar' |
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
var checkForNewReading = function () { | |
$.ajax({ | |
url: location.href + '/request', | |
type: 'GEt', | |
dataType: 'json', | |
success: function(data) { | |
if (data) { | |
// DO SOMETHING | |
} | |
checkForNewReading(); |
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
The command line procedure is not simple, but it is the most likely thing to work. | |
When re-formatting the "drive" you're actually only formatting a partition on the drive. You need to use the diskpart utility to remove the partitions and create 1 single partition covering the full volume. | |
diskpart can be a bit dangerous, because if you pick the wrong disk or partition, you can remove data or partitions that are extremely, EXTREMELY important and lose all data on your machine. | |
Proceed with extreme caution! | |
Open up a command prompt as administrator (open the start menu, type cmd and press Enter.) |
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
function toggleFullScreen() { | |
if ((document.fullScreenElement && document.fullScreenElement !== null) || | |
(!document.mozFullScreen && !document.webkitIsFullScreen)) { | |
if (document.documentElement.requestFullScreen) { | |
document.documentElement.requestFullScreen(); | |
} else if (document.documentElement.mozRequestFullScreen) { | |
document.documentElement.mozRequestFullScreen(); | |
} else if (document.documentElement.webkitRequestFullScreen) { | |
document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); | |
} |
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
(function( $ ) { | |
$.ui.autocomplete.prototype.options.autoSelect = true; | |
$( ".ui-autocomplete-input" ).live( "blur", function( event ) { | |
var autocomplete = $( this ).data( "autocomplete" ); | |
if ( !autocomplete.options.autoSelect || autocomplete.selectedItem ) { return; } | |
var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ); | |
autocomplete.widget().children( ".ui-menu-item" ).each(function() { | |
var item = $( this ).data( "item.autocomplete" ); |
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
var app = require('express')(); | |
var server = require('http').Server(app); | |
var io = require('socket.io')(server); | |
var redis = require('redis'); | |
server.listen(8890); | |
console.log('Socket server is now running on port: 8890'); | |
io.on('connection', function (socket) { | |
console.log("new client connected"); |
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
<?xml version='1.0' encoding='utf-8'?> | |
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="com.ionicframework.minibalita361278" xmlns:android="http://schemas.android.com/apk/res/android"> | |
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | |
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true"> | |
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/The |
OlderNewer