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
/** | |
* WIP Simple Todo app | |
* https://github.com/facebook/react-native | |
*/ | |
'use strict'; | |
var React = require('react-native'); | |
var { | |
AppRegistry, | |
ListView, |
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
<string-array name="ufs"> | |
<item/> | |
<item>AC</item> | |
<item>AL</item> | |
<item>AM</item> | |
<item>AP</item> | |
<item>BA</item> | |
<item>CE</item> | |
<item>DF</item> | |
<item>ES</item> |
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
package corporation.view; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.LinearLayout; | |
/** | |
* Created by juliorodrigues on 07/03/15. | |
*/ | |
public class KeyboardAwareLinearLayout extends LinearLayout { |
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
/* | |
* Copyright (C) 2007-2008 OpenIntents.org | |
* | |
* 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 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
import java.io.FileNotFoundException; | |
import android.content.Context; | |
import android.content.res.AssetFileDescriptor; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.net.Uri; | |
public class MediaUtils { | |
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
import android.content.Context; | |
public class ScalingUtils { | |
public static int dpToPx(final Context context, final float dp) { | |
// Took from http://stackoverflow.com/questions/8309354/formula-px-to-dp-dp-to-px-android | |
final float scale = context.getResources().getDisplayMetrics().density; | |
return (int) ((dp * scale) + 0.5f); | |
} | |
} |
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 class DialogUtils { | |
public static ProgressDialog makeProgressWithoutTitleNorMessageDialog(Context context) { | |
ProgressDialog dialog = new ProgressDialog(context); | |
try { | |
dialog.show(); | |
} catch (WindowManager.BadTokenException e) { | |
} | |
dialog.setCancelable(false); | |
dialog.setContentView(R.layout.dialog_progress_no_message_nor_title); |
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
[push] | |
default = simple | |
[alias] | |
co = checkout | |
st = status | |
br = branch |
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
- (void)createThumbImageWithImage:(UIImage*)image | |
{ | |
float radius = 19.0; | |
CGSize originalImageSize = image.size; | |
CGRect newRect = CGRectMake(0, 0, radius*2, radius*2); | |
float ratio = MAX(newRect.size.width / originalImageSize.width, newRect.size.height / originalImageSize.height); | |
UIGraphicsBeginImageContextWithOptions(newRect.size, NO, 0.0); | |
// circular mask |
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
var _ = require('lodash'); | |
var removeDiacritics = require('diacritics').remove; | |
var replaceUnicodeSymbols = function(slug, lang) { | |
if (lang == undefined) lang = 'pt'; | |
var enCharMap = { | |
'☢':"radioactive",'☠':"skull-and-bones",'☤':"caduceus", | |
'☣':"biohazard",'☭':"hammer-and-sickle", '☯':"yin-yang",'☮':"peace", |