use std::net::{SocketAddr, TcpStream};
fn main() {
if let Ok(_stream) = TcpStream::connect("google.com:80") {
println!("Ok");
} else {
println!("Error");
cukup taruh ini pada controller base pada fungsi init:
public function init()
{
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization');
header("Access-Control-Allow-Credentials: true");
Cara menghubungkan 2 node yang berbeda IP Address. misalnya terdapat 2 node yang berbeda 192.168.1.10 dan 192.168.1.20.
caranya dengan menggunakan nama --name
saat terhubung dengan iex.
node 1:
iex --name ali@192.168.1.10 --cookie rahasia
Buka file di neovim kemudian pada mode normal ketikan command ini
:set filetype?
maka neovim akan mencetak tipe file saat ini misalnya typescriptreact
lsusb
akan didapat seperti ini:
Bus 001 Device 013: ID 1a2c:9df4 China Resource Semico Co., Ltd USB Gaming Keyboard
path devicesnya dari perangkat di atas yaitu:
/dev/bus/usb
use std::ffi::OsString; | |
use std::env; | |
use std::sync::{Arc, Mutex, mpsc}; | |
use std::time::Duration; | |
use tokio::{ | |
net::TcpListener, | |
io::{ | |
AsyncReadExt, AsyncWriteExt | |
}, | |
}; |
How to resolve the 1615 MySQL error
Has a MySQL error been causing trouble recently? This is a general error that seems to be a common problem.
Error code 1615 prepared statement needs to be re-prepared mysql
This error pops up due to a MariaDB bug.
According to our Support Engineers, we can resolve this error by adding the following section of mysqlconf file:
{{- use('yii/widgets/Pjax') -}} | |
{{- use('app/components/Utility') -}} | |
{{- use('app/components/widgets/MenuContent') -}} | |
{{- use('app/components/widgets/MenuOption') -}} | |
{{- use('app/components/widgets/Alert') -}} | |
{{- use('themes/gentelella/components/Sidebars') -}} | |
{{- use('themes/gentelella/components/MenuTop') -}} | |
{{- use('themes/gentelella/components/MenuFooter') -}} | |
{{- void(this.beginContent('@themes/gentelella/layouts/default.php')) -}} | |
{{- sidebars_widget() -}} |