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
const sample = [ | |
[ | |
[ | |
[ | |
[ | |
[ | |
{ | |
foo: [{ rate: 2.18 }], | |
}, | |
], |
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
// Keyboard up event on ios | |
if (application.ios) { | |
// First Event is Catched before the Keyboard Jumps Up | |
// We Save the Height of the Keyboard for the Positioning of the LayoutElement | |
application.ios.addNotificationObserver(UIKeyboardWillShowNotification, (event) => { | |
// console.log('WillShow', typeof event.userInfo, event.userInfo.valueForKey(UIKeyboardFrameEndUserInfoKey).CGRectValue.size.height); | |
// console.log(this.textView.ios.contentSize); | |
this.contentSizeStartValue = event.userInfo.valueForKey(UIKeyboardFrameEndUserInfoKey).CGRectValue.size.height + 10; | |
}); | |
// Second Event is Catched when the Keyboard is Up to Reposition our Element |
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
# http://helpfulsheep.com/2015-03-25-converting-svg-fonts-to-svg/ | |
import sys, re | |
if len(sys.argv) < 2: | |
print 'Usage: python {} webfont-file.svg'.format(sys.argv[0]) | |
sys.exit() | |
with open(sys.argv[1], 'r') as r: | |
lines = r.read().split('\n') | |
glyphs = [x for x in lines if '<glyph' in x] |
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
// https://forums.xamarin.com/discussion/comment/119662/#Comment_119662 | |
public class IconTabbedRenderer : TabbedRenderer | |
{ | |
protected override void DispatchDraw( | |
global::Android.Graphics.Canvas canvas) | |
{ | |
base.DispatchDraw(canvas); | |
SetTabIcons(); |
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"?> | |
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>PUT</AllowedMethod> | |
<AllowedMethod>POST</AllowedMethod> | |
<AllowedMethod>GET</AllowedMethod> | |
<AllowedMethod>HEAD</AllowedMethod> | |
<MaxAgeSeconds>3000</MaxAgeSeconds> | |
<AllowedHeader>*</AllowedHeader> |
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
/** | |
* Simply encode a base js object as {a:2, d:[1,"two"], c: {foo: {bar:1}}} | |
* And returns URL encoded string : a=2&d[0]=1&d[1]=two&c[foo][bar]=1" | |
* | |
* @param {Object} object A base javascript object : {} | |
* @param {String} base Optionnal base notation, should only be used by recursion for internal work | |
* @return {String} URL encoded query string | |
*/ | |
Object.toQueryString = function (object, base) { | |
var queryString = []; |