I hereby claim:
- I am antoniodipinto on github.
- I am antoniodipinto (https://keybase.io/antoniodipinto) on keybase.
- I have a public key ASD_Q19omgGdMEVH-f6CZ-5o8VeX1vzREgxeVp7iz59kggo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
ikisocket "github.com/antoniodipinto/ikisocket" | |
"github.com/gofiber/fiber" | |
) | |
// Basic chat message object |
// Multiple event handling supported | |
ikisocket.On(ikisocket.EventConnect, func(ep *ikisocket.EventPayload) { | |
fmt.Println("fired connect 1") | |
}) | |
ikisocket.On(ikisocket.EventConnect, func(ep *ikisocket.EventPayload) { | |
fmt.Println("fired connect 2") | |
}) |
package main | |
import | |
"github.com/gofiber/fiber" | |
"github.com/gofiber/websocket" | |
) | |
func main() { | |
app := fiber.New() |
<?php | |
/** | |
* Author: Antonio Di Pinto | |
* Email: adp19911229@gmail.com | |
* | |
* @description: A simple class fo CodeIgniter that helps to receive JSON format data | |
*/ | |
class Input_Json extends CI_Input | |
{ |
<?php | |
// Importo le classi del framework | |
use \Psr\Http\Message\ServerRequestInterface as Request; | |
use \Psr\Http\Message\ResponseInterface as Response; | |
// Richiamo il loader del framework | |
require 'vendor/autoload.php'; | |
// Creo una nuova istanza della classe App |
#This query will return the distance between two points | |
SELECT id, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * sin( radians( lat ) ) ) ) | |
AS distance | |
FROM markers | |
HAVING distance < 25 | |
ORDER BY distance LIMIT 0 , 20; |
#This query return the distance between two cordinates | |
SELECT *, | |
(((acos(sin((LATITUDE_VALUE*pi()/180)) * sin(('nome_colonna_latitudine'*pi()/180))+cos((LATITUDE_VALUE*pi()/180)) * cos(('nome_colonna_latitudine'*pi()/180)) * cos(((LONGITUDE_VALUE- 'nome_colonna_longitudine'e)*pi()/180))))*180/pi())*60*1.1515*1.609344) | |
as distance | |
FROM coordinates_table | |
ORDER BY distance ASC; |