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
based on https://www.tothenew.com/blog/indoor-positioning-systemtrilateration/ | |
/** | |
* Calculates the distance from Beacon to device. | |
**/ | |
private void calculateBeaconDistance(Beacon beacon) { | |
float txPower = -74.0; // Manufacture set this power in the device | |
if (beacon .rssi == 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
NEW VER utk current | |
+++++ | |
updated 2021-04-14 Guna struktur table baru | |
-- | |
SELECT | |
t.*, | |
b.TarikhWarta , | |
b.DPT, | |
b.Penerangan | |
FROM |
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
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
upstream websocket { | |
server host.docker.internal:8080; | |
} | |
server { |
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
class HashIdCast implements CastsAttributes | |
{ | |
public function get($model, $key, $value, $attributes) | |
{ | |
$hash = new Hashids(); | |
return $hash->encode($value); | |
} | |
public function set($model, $key, $value, $attributes) | |
{ |
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
?php | |
namespace App\Rules; | |
use Illuminate\Contracts\Validation\Rule; | |
/** | |
* check valid Password format | |
*/ | |
class ValidPassword implements Rule |
OlderNewer