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 tech.alvarez.myapplication; | |
| import android.support.design.widget.TabLayout; | |
| import android.support.design.widget.FloatingActionButton; | |
| import android.support.design.widget.Snackbar; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.support.v7.widget.Toolbar; | |
| import android.support.v4.app.Fragment; | |
| import android.support.v4.app.FragmentManager; |
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.Scanner; | |
| /** | |
| * @author Daniel Alvarez | |
| */ | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner e = new Scanner(System.in); |
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 LoginActivity extends AppCompatActivity { | |
| private Firebase ref; | |
| private Firebase.AuthResultHandler authResultHandler; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_login); |
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.Scanner; | |
| /** | |
| * Clase para ejecutar el algoritmo para generar una matriz caracol cuadrada | |
| * @author Daniel Alvarez | |
| */ | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner in = new Scanner(System.in); |
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 static void algoritmoHanoi(int n, int origen, int temporal, int destino) { | |
| if (n == 0) { | |
| return; | |
| } | |
| algoritmoHanoi(n - 1, origen, destino, temporal); | |
| System.out.println("Mover " + n + " de la torre " + origen + " a la torre " + destino + "."); | |
| algoritmoHanoi(n - 1, temporal, origen, destino); | |
| } |
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
| IntentIntegrator integrator = new IntentIntegrator(this); | |
| integrator.addExtra("SCAN_WIDTH", 800); | |
| integrator.addExtra("SCAN_HEIGHT", 800); | |
| integrator.addExtra("PROMPT_MESSAGE", "Busque un código para escanear"); | |
| integrator.initiateScan(); |
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 void onActivityResult(int requestCode, int resultCode, Intent intent) { | |
| IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent); | |
| if (scanResult != null) { | |
| System.out.println("Información encontrada"); | |
| System.out.println(scanResult.getContents()); | |
| System.out.println(scanResult.getFormatName()); | |
| } | |
| } |
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
| Bundle bundle = new Bundle(); | |
| bundle.putString(ContactsContract.Intents.Insert.NAME, "Daniel Alvarez"); | |
| bundle.putString(ContactsContract.Intents.Insert.PHONE, "77242424"); | |
| bundle.putString(ContactsContract.Intents.Insert.EMAIL, "[email protected]"); | |
| IntentIntegrator integrator = new IntentIntegrator(this); | |
| integrator.addExtra("ENCODE_DATA", bundle); | |
| integrator.shareText(bundle.toString(), "CONTACT_TYPE"); |
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
| Bundle bundle = new Bundle(); | |
| bundle.putFloat("LAT", 40.829208f); | |
| bundle.putFloat("LONG", -74.191279f); | |
| IntentIntegrator integrator = new IntentIntegrator(this); | |
| integrator.addExtra("ENCODE_DATA", bundle); | |
| integrator.shareText(bundle.toString(), "LOCATION_TYPE"); |
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
| IntentIntegrator integrator = new IntentIntegrator(this); | |
| integrator.shareText("http://alvarez.tech", "TEXT_TYPE"); |