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
// Ultrasonic - Library for HR-SC04 Ultrasonic Ranging Module. | |
// Rev.4 (06/2012) | |
// J.Rodrigo ( www.jra.so ) | |
// more info at www.ardublog.com | |
#include <Ultrasonic.h> | |
Ultrasonic ultrasonic(12,11); // (Trig PIN,Echo PIN) | |
void setup() { |
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
public class ItemList { | |
String title, subtitle; | |
int img; | |
public ItemList(String title, String subtitle, int img) { | |
this.title = title; | |
this.subtitle = subtitle; | |
this.img = img; | |
} |
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
package com.gorrotowi.listandgrid; | |
public class ItemGrid { | |
String title; | |
int img; | |
public ItemGrid(String title, int img) { | |
this.title = title; | |
this.img = img; |
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
jsonRequest.setRetryPolicy(new DefaultRetryPolicy(12000, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT)); | |
rq.add(jsonRequest); |
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
private final static Pattern EMAIL_ADDRESS_PATTERN = Pattern | |
.compile(/*"^(([\\w-]+\\.)+[\\w-]+|([a-zA-Z]{1}|[\\w-]{2,}))@" | |
+ "((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?" | |
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\." | |
+ "([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?" | |
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|" | |
+ "([a-zA-Z]+[\\w-]+\\.)+[a-zA-Z]{2,4})$"*/ | |
"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}"); | |
public static boolean isMail(String email) { |
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
package com.gorrotowi.btsendreceive; | |
import android.bluetooth.BluetoothAdapter; | |
import android.bluetooth.BluetoothDevice; | |
import android.bluetooth.BluetoothSocket; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.os.Message; | |
import android.support.v7.app.AppCompatActivity; |
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
func _Dash(text:String) -> String { | |
var modifiedText = "" | |
let textArr = text.componentsSeparatedByString(" ") | |
var repleacetxt = "" | |
for word in textArr { | |
if word != "" { | |
let character = word[word.startIndex] | |
let scalar = String(character).unicodeScalars | |
let unicode = scalar[scalar.startIndex].value | |
if unicode >= 97 && unicode <= 122 { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Cumpleaños</title> | |
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/css/bootstrap.css" integrity="sha384-XXXXXXXX" crossorigin="anonymous"> | |
<script src="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/js/bootstrap.js" integrity="sha384-XXXXXXXX" crossorigin="anonymous"></script> | |
<link href="assets/css/bootstrap/css/bootstrap.min.css" rel="stylesheet"> | |
<link rel="stylesheet" type="text/css" href="assets/css/estilo.css" > | |
<meta charset="UTF-8"> |
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
//Global Objects and variables | |
ImageView imgBarcode; | |
private static final int WHITE = 0xFFFFFFFF; | |
private static final int BLACK = 0xFF000000; | |
Bitmap bmp; | |
//Implementation | |
bmp = encodeAsBitmap("1234567890", BarcodeFormat.CODE_128, 800, 200); | |
imgBarcode.setImageBitmap(bmp); | |
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
Intent intent = new Intent(theContextClass.this, YourClass.class); | |
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); | |
startActivity(intent); | |
finish(); |
OlderNewer