Skip to content

Instantly share code, notes, and snippets.

@1000copy
1000copy / multicast.js
Last active April 28, 2020 10:09
multicast.js
const PORT = 20000;
const MULTICAST_ADDR = "233.255.255.255";
/*Here, choose the port that we will bind the socket to and the multicast address we will use. The multicast group address must be within the appropriate multicast address space. Much of the space is reserved, but you can still find some unassigned ad-hoc space such as 233.252.18.0-233.255.255.255.*/
const dgram = require("dgram");
const process = require("process");
const socket = dgram.createSocket({ type: "udp4", reuseAddr: true });
socket.bind(PORT);
const PORT = 20000;
const MULTICAST_ADDR = "233.255.255.255";
/*Here, choose the port that we will bind the socket to and the multicast address we will use. The multicast group address must be within the appropriate multicast address space. Much of the space is reserved, but you can still find some unassigned ad-hoc space such as 233.252.18.0-233.255.255.255.*/
const dgram = require("dgram");
const process = require("process");
const socket = dgram.createSocket({ type: "udp4", reuseAddr: true });
socket.bind(PORT);
<style>
.d1{
width: 300px;
height: 300px;
background:blue;
position: absolute;
left: 50%;
transform: translate(-50%,0);
}
</style>

note from :

https://wiki.freeradius.org/guide/Getting%20Started

What is FreeRadius Server?

FreeRADIUS is a modular, high performance and highly customizable open source RADIUS server.

We will now install freeRADIUS on CentOS 7 Linux Server. We will install freeRADIUS from YUM repository. So, before going to start freeRADIUS installation, you should have CentOS 7 ready so that it can access CentOS Yum repository.

note from :

https://wiki.freeradius.org/guide/Getting%20Started

What is FreeRadius Server?

FreeRADIUS is a modular, high performance and highly customizable open source RADIUS server.

We will now install freeRADIUS on CentOS 7 Linux Server. We will install freeRADIUS from YUM repository. So, before going to start freeRADIUS installation, you should have CentOS 7 ready so that it can access CentOS Yum repository.

var ref = require('ref')
var ffi = require('ffi');
var gdi32 = ffi.Library('gdi32', {
'GetDeviceCaps': [ 'int', ['int32', 'int' ] ]
});
var user32 = new ffi.Library("user32", {
"GetDC": ["int32", ["int32"]],
"ReleaseDC": ["int32", ["int32", "int32"]],
});
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
Widget b(BuildContext context) {
return Center(
child:Column(
crossAxisAlignment: CrossAxisAlignment.center,
//add image https://stackoverflow.com/questions/50903106/how-to-add-image-in-flutter
// add button:FlatButton
// layout column
// color
// button radius rect
// set button width
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
https://press.one/p/v?s=bb5688b9bf55dd5e25b5eb7b212577c82592125d6539f78e1f69972290040cb84e7a5b03557d6f3353f765f894fed90df8fe61527b891076aa463e5a38de374600&h=fc66fe9721db4c3d8c7af84b4beff5d9cac23865c55660877c43025d32b73645&a=8da525c3716bf5abecab7b8c2bf5c341f9cdebe8&f=P1&v=3
var mysql = require('mysql');
var con = mysql.createConnection({
host: "localhost",
user: "root",
password: "root1234",
database:"pph"
});
con.connect(function(err) {
if (err) throw err;