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
import requests | |
from pyquery import PyQuery | |
import settings | |
if __name__ == '__main__': | |
# Log in to Alarm.com page | |
payload = { | |
'JavaScriptTest': '1', | |
'cookieTest': '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
CREATE FUNCTION [dbo].[CalculateDistanceBetweenGPSCoordinates]( | |
@Latitude1 float, | |
@Longitude1 float, | |
@Latitude2 float, | |
@Longitude2 float, | |
@ReturnUnits char(2) = 'MI' | |
) | |
RETURNS float | |
AS | |
BEGIN |
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 azure = require('azure'); | |
function del(id, user, request) { | |
var accountName = 'accountname'; | |
var accountKey = 'accountkey'; | |
var host = accountName + '.blob.core.windows.net'; | |
var blobService = azure.createBlobService(accountName, accountKey, host); | |
blobService.deleteBlob(request.parameters.containerName, |
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
public void PutBlob(String containerName, String blobName) | |
{ | |
String requestMethod = "PUT"; | |
String urlPath = String.Format("{0}/{1}", containerName, blobName); | |
String storageServiceVersion = "2012-02-12"; | |
String dateInRfc1123Format = DateTime.UtcNow.ToString("R", CultureInfo.InvariantCulture); |
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
// book keeping so that we can easily animate the two hands for the watchface | |
// .scale/.angle are updated by tween/event handler (see below) | |
var renderState = { | |
minute: {style: 'white', scale: 0.80, angle: 0}, | |
hour: {style: 'red', scale: 0.51, angle: 0} | |
}; | |
// helper function for the draw function (see below) | |
// extracted as a standalone function to satisfy common believe in efficient JS code | |
// TODO: verify that this has actually any effect on byte code level |
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
package com.example.scalpeldrawer; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.support.v4.widget.DrawerLayout; | |
import android.util.AttributeSet; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.CheckBox; |
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
public static void printPermissions(Context context) { | |
PackageInfo android; | |
try { | |
android = context.getPackageManager().getPackageInfo("android", PackageManager.GET_PERMISSIONS); | |
} catch (PackageManager.NameNotFoundException e) { | |
e.printStackTrace(); | |
return; | |
} | |
PermissionInfo[] permissions = android.permissions; |
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
/* | |
* Copyright (C) 2014 Antonio Leiva Gordillo. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
package com.example; | |
import android.content.Context; | |
import android.graphics.*; | |
import android.graphics.drawable.Drawable; | |
import android.graphics.drawable.NinePatchDrawable; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.widget.ImageView; |
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
/* | |
* ATTENTION: | |
* | |
* This layout is now maintained in the `iosched' code.google.com project: | |
* | |
* http://code.google.com/p/iosched/source/browse/android/src/com/google/android/apps/iosched/ui/widget/DashboardLayout.java | |
* | |
*/ | |
/* |
OlderNewer