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
| new Thread() { | |
| @Override | |
| public void run() { | |
| final String result = doHeavyWork(url); | |
| mTextView.post(new Runnable() { | |
| @Override | |
| public void run() { | |
| mTextView.setText(result); | |
| } |
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
| ExecutorService executor = Executors.newFixedThreadPool(5); | |
| for (int i = 0; i < 10; ++i) { | |
| executor.execute(new MyTask()); | |
| } | |
| executor.shutdown(); |
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 MyTask implements Runnable { | |
| @Override | |
| public void run() { | |
| String content = readSomeContentOfNetwork(); | |
| String processedContent = processContent(content); | |
| saveProcessedContentOnDatabase(processedContent); | |
| } | |
| } |
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 br.com.foca.util; | |
| import android.app.ActivityManager; | |
| import android.content.Context; | |
| import android.graphics.Bitmap; | |
| import android.graphics.Color; | |
| import android.os.AsyncTask; | |
| import android.util.LruCache; | |
| import android.view.View; | |
| import android.widget.ImageView; |
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
| $(function(){ | |
| $(".modal-inner").on("click", function(e) { | |
| e.stopPropagation(); | |
| }); | |
| $(".modal-fade-screen, .modal-close, .modal").on("click", function() { | |
| var thisModalId = this.getAttribute("for"); | |
| Modal.close(thisModalId); | |
| }); | |
| }); |
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 br.com.app4y.behavior; | |
| import android.content.Context; | |
| import android.support.design.widget.CoordinatorLayout; | |
| import android.support.design.widget.Snackbar; | |
| import android.support.v4.view.ViewCompat; | |
| import android.support.v4.view.animation.FastOutSlowInInterpolator; | |
| import android.util.AttributeSet; | |
| import android.view.View; | |
| import android.view.animation.Interpolator; |
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
| <div ng-controller="index"> | |
| <table> | |
| <thead> | |
| <tr> | |
| <td>Id</td> | |
| <td>Name</td> | |
| <td></td> | |
| </tr> | |
| </thead> | |
| <tbody> |
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
| #!/bin/sh | |
| set -e | |
| ./gradlew assembleRelease | |
| my_path=$(pwd)/ | |
| me=$(whoami) | |
| echo -n "Entre com o nome do keystore em /home/$me/.android: " |
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
| RESTORE VIEW | |
| APPLY REQUEST VALUES | |
| REQUEST_VALUE = REQUEST.GET_PARAMETER(CLIENT_ID); | |
| SET_SUBMITTED_VALUE(REQUEST_VALUE); | |
| PROCESS VALIDATIONS | |
| SUBMITTED_VALUE = GET_SUBMITTED_VALUE(); | |
| IF(CONSIDER_EMPTY_STRING_NULL && SUBMITTED_VALUE.IS_EMPTY()) { |
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
| $j('table:eq(0)').DataTable().row.add(['<a href="#">NOME DO SUJEITO</a>', 'CPF', 'NIS', 'DATA/DE/NASCIMENTO', 'SIM']).draw(); |