Skip to content

Instantly share code, notes, and snippets.

//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();
}
}
<html>
<head>
<style>
td{
border: 1px solid #000000;
width:20px;
height:20px;
}
.td_black{
background: black;
#include <stdio.h>
int int_value1,
int_value2;
char char_value1,
char_value2,
char_value3;
/********************************/
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
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;