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
Class A{ | |
int A::B(double *x, double *y, double *z){ | |
if(x) *x = 10; | |
if(y) *y = 10; | |
if(z) *z = 10; | |
return 1; | |
} | |
void main(){ | |
double oldX = 1; |
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
if (BT.available()>0){ | |
val = BT.read(); | |
Serial.print(red); | |
if (val>=30 && val<=39) { | |
//如果是數字(0~9),也就是ASCII介於30~39,把值存起來 | |
red = red * 10 + (val - 30); | |
/* example: | |
1 => 0 * 10 + 1 = 1 | |
8 => 1 * 10 + 8 = 18 | |
0 => 18 * 10 + 0 = 180 |
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
#include <stdio.h> | |
int int_value1, | |
int_value2; | |
char char_value1, | |
char_value2, | |
char_value3; | |
/********************************/ |
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
<html> | |
<head> | |
<style> | |
td{ | |
border: 1px solid #000000; | |
width:20px; | |
height:20px; | |
} | |
.td_black{ | |
background: black; |
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
//region [in some funtion] | |
if (keyguardManager.isKeyguardLocked()) { | |
// custom title and some description | |
Intent intent = keyguardManager.createConfirmDeviceCredentialIntent("My Title", "A Custom Description"); | |
if (intent != null) { | |
startActivityForResult(intent, REQUEST_CODE_CONFIRM_DEVICE_CREDENTIALS); | |
}else{ | |
Toast.makeText("Secure lock screen hasn't set up").show(); | |
} | |
} |