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 android.app.AlarmManager; | |
import android.app.IntentService; | |
import android.app.PendingIntent; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.text.TextUtils; | |
import android.util.Log; | |
import java.io.*; | |
import java.net.*; |
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
Message received: {"token":"hybmry9d","bridge":{"id":"1","pairing":0,"serial":"3813","error":0,"fwVer":"19","rfConfig":"US/Europe","bItv":6}, "valves":[{"id":"1","serial":"7936","statusCode":"0","temp":"58","open":"0","flow":"399","bat":"100","fwVer":"6","pulses":"399","rssi":"0"} ]} | |
Message sent to hybmry9d: {"bItv":6,"pairing":0,"updtBr":0,"date":"2018-06-30","event":{"current":0,"next":0},"valves":[{"id":"1","serial":7936,"update":0,"vItv":12,"deleted":0}]} | |
Message received: {"token":"hybmry9d","bridge":{"id":"1","pairing":0,"serial":"3813","error":0,"fwVer":"19","rfConfig":"US/Europe","bItv":6}, "valves":[{"id":"1","serial":"7936","statusCode":"128","temp":"58","open":"0","flow":"399","bat":"100","fwVer":"6","pulses":"399","rssi":"100"} ]} | |
Message sent to hybmry9d: {"bItv":6,"pairing":0,"updtBr":0,"date":"2018-06-30","event":{"current":0,"next":0},"valves":[{"id":"1","serial":7936,"update":0,"vItv":12,"deleted":0}]} | |
Message received: {"token":"hybmry9d","bridge":{"id":"1","pairing":0,"serial":"3813","erro |
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
Verifying my Blockstack ID is secured with the address 1LiUoHQAfVsrGfx4uzaT55r4JAonrmj7rq https://explorer.blockstack.org/address/1LiUoHQAfVsrGfx4uzaT55r4JAonrmj7rq |
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
Charator count: 778 | |
{ | |
"token":"afsadfasf", | |
"bridge": { | |
"id":"10", | |
"pairing":0, | |
"serial":"5551212", | |
"error":0, | |
"fwVer":"100100", | |
"rfConfig":"US/Europe", |
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
//Render script blur | |
layout_content.isDrawingCacheEnabled = true | |
val bitmap = Bitmap.createBitmap(layout_content.drawingCache) | |
layout_content.isDrawingCacheEnabled = false | |
val rs = RenderScript.create(this@FGSimpleRound) | |
val input = Allocation.createFromBitmap(rs, bitmap, Allocation.MipmapControl.MIPMAP_NONE, | |
Allocation.USAGE_SCRIPT) | |
val output = Allocation.createTyped(rs, input.getType()) | |
val script = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs)) |
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
# install bzr and gource | |
# get a branch of Mir's trunk code | |
# create gource video | |
$ sudo apt-get install bzr gource | |
$ bzr branch lp:mir | |
$ cd mir | |
$ gource \ | |
-s .06 \ |
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
[addressBook containersMatchingPredicate:[CNContainer predicateForContainersWithIdentifiers: @[addressBook.defaultContainerIdentifier]] error:&contactError]; | |
NSArray * keysToFetch = @[CNContactEmailAddressesKey, CNContactGivenNameKey]; | |
CNContactFetchRequest * request = [[CNContactFetchRequest alloc]initWithKeysToFetch:keysToFetch]; | |
request.predicate = [CNContact predicateForContactsMatchingName:user.fullName]; | |
NSArray *result = [addressBook unifiedContactsMatchingPredicate:[CNContact predicateForContactsMatchingName:user.fullName] | |
keysToFetch:keysToFetch | |
error:&contactError]; | |
CNContact *unifiedContact; |
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
+ (NSString *) getSortHighlightedField:(NSArray *) fieldList{ | |
NSArray *highlightOrder= @[ | |
@"nickname", | |
@"skills", | |
@"interests", | |
@"group_names", | |
@"birth_date", | |
@"start_date", | |
@"start_date_year", | |
@"email", |
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
[manager enqueueBatchOfObjectRequestOperations:requests | |
progress:^(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations) { | |
NSLog(@"%lu/%lu", (unsigned long) numberOfFinishedOperations, (unsigned long) totalNumberOfOperations); | |
} completion:^(NSArray *operations) { | |
UIApplication *application = [UIApplication sharedApplication]; | |
self.task = [application beginBackgroundTaskWithExpirationHandler:^{ | |
NSLog(@"Took too long!"); | |
[self.syncOperationQueue cancelAllOperations]; |