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.BufferedInputStream; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.net.HttpURLConnection; | |
| import java.net.MalformedURLException; | |
| import java.net.URL; | |
| import java.util.concurrent.ExecutionException; |
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.util.ArrayList; | |
| import android.content.Context; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.BaseExpandableListAdapter; | |
| import android.widget.TextView; |
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
| @csrf_exempt | |
| def seclogin(request): | |
| key_usuario = request.POST['param0'] | |
| cipherpass = request.POST['param1'] | |
| print key_usuario | |
| print cipherpass | |
| aluno = Aluno.objects.get(key_usuario=key_usuario) |
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
| int main(){ | |
| freopen("nome_arquivo.txt","r",stdin); | |
| int matrizes[max_i][max_j]; | |
| int T_s[numero_ts], matriz; | |
| for(int i=0; i<numero_elementos; i++){ | |
| if(i%10 == 0){ | |
| scanf("%d",T_s[i/10]); | |
| } else { |
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
| from uuid import uuid1 | |
| import json | |
| import urllib2 | |
| class Mensageiro(): | |
| def __init__(self,conteudo,devices,delay_while_idle,collapse_key): | |
| self.conteudo = conteudo | |
| self.big_message = False | |
| self.devices = devices | |
| self.number_of_sends = 0 |
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
| <manifest ... > | |
| <uses-sdk | |
| android:minSdkVersion="8" | |
| android:targetSdkVersion="19" /> | |
| <uses-permission android:name="android.permission.INTERNET" /> | |
| <uses-permission android:name="android.permission.GET_ACCOUNTS" /> | |
| <uses-permission android:name="android.permission.WAKE_LOCK" /> | |
| <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> |
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
| <application ...> | |
| <receiver | |
| android:name=".MeuGcmBroadcastReceiver" | |
| android:permission="com.google.android.c2dm.permission.SEND" > | |
| <intent-filter> | |
| <action android:name="com.google.android.c2dm.intent.RECEIVE" /> | |
| <category android:name="br.com.meupacote" /> | |
| </intent-filter> | |
| </receiver> | |
| <service android:name=".MeuGcmService" |
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
| @Override | |
| protected void onCreate(Bundle savedInstanceState){ | |
| //... | |
| if(checkPlayServices()){ | |
| gcm = GoogleCloudMessaging.getInstance(this); | |
| registration_id = getRegistrationId(context); | |
| if(registration_id.equals("")){ | |
| registerInBackground(); | |
| } else { | |
| // não foi encontrato APK Google Play Services |
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
| private void registerInBackground(){ | |
| new AsyncTask<Void,Void,String>(){ | |
| @Override | |
| protected String doInBackground(Void... arg0){ | |
| String msg = ""; | |
| try{ | |
| if(gcm == null){ | |
| gcm = GoogleCloudMessaging.getInstance(context); | |
| } | |
| regid = gcm.register(SENDER_ID); |
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 PostDataNotASync { | |
| /* THIS MUST NOT BE USED IN THE MAIN THREAD */ | |
| private ArrayList<String> data; | |
| private String endereco; | |
| public PostDataNotASync(String endereco, ArrayList<String> data) { | |
| this.data = data; | |
| this.endereco = endereco; | |
| } |
OlderNewer