A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 1

Filename: geshi/geshi.php

Line Number: 3469

Backtrace:

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3469
Function: _error_handler

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 2547
Function: parse_non_string_part

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/Process.php
Line: 45
Function: parse_code

File: /www/wwwroot/pastebin.vip/stikked/application/models/Pastes.php
Line: 430
Function: syntax

File: /www/wwwroot/pastebin.vip/stikked/application/controllers/Main.php
Line: 592
Function: getPaste

File: /www/wwwroot/pastebin.vip/stikked/index.php
Line: 284
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 2

Filename: geshi/geshi.php

Line Number: 3469

Backtrace:

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3469
Function: _error_handler

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 2547
Function: parse_non_string_part

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/Process.php
Line: 45
Function: parse_code

File: /www/wwwroot/pastebin.vip/stikked/application/models/Pastes.php
Line: 430
Function: syntax

File: /www/wwwroot/pastebin.vip/stikked/application/controllers/Main.php
Line: 592
Function: getPaste

File: /www/wwwroot/pastebin.vip/stikked/index.php
Line: 284
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 1

Filename: geshi/geshi.php

Line Number: 3469

Backtrace:

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3469
Function: _error_handler

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3043
Function: parse_non_string_part

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/Process.php
Line: 45
Function: parse_code

File: /www/wwwroot/pastebin.vip/stikked/application/models/Pastes.php
Line: 430
Function: syntax

File: /www/wwwroot/pastebin.vip/stikked/application/controllers/Main.php
Line: 592
Function: getPaste

File: /www/wwwroot/pastebin.vip/stikked/index.php
Line: 284
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 2

Filename: geshi/geshi.php

Line Number: 3469

Backtrace:

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3469
Function: _error_handler

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3043
Function: parse_non_string_part

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/Process.php
Line: 45
Function: parse_code

File: /www/wwwroot/pastebin.vip/stikked/application/models/Pastes.php
Line: 430
Function: syntax

File: /www/wwwroot/pastebin.vip/stikked/application/controllers/Main.php
Line: 592
Function: getPaste

File: /www/wwwroot/pastebin.vip/stikked/index.php
Line: 284
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 1

Filename: geshi/geshi.php

Line Number: 3502

Backtrace:

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3502
Function: _error_handler

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3043
Function: parse_non_string_part

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/Process.php
Line: 45
Function: parse_code

File: /www/wwwroot/pastebin.vip/stikked/application/models/Pastes.php
Line: 430
Function: syntax

File: /www/wwwroot/pastebin.vip/stikked/application/controllers/Main.php
Line: 592
Function: getPaste

File: /www/wwwroot/pastebin.vip/stikked/index.php
Line: 284
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 1

Filename: geshi/geshi.php

Line Number: 3469

Backtrace:

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3469
Function: _error_handler

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3043
Function: parse_non_string_part

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/Process.php
Line: 45
Function: parse_code

File: /www/wwwroot/pastebin.vip/stikked/application/models/Pastes.php
Line: 430
Function: syntax

File: /www/wwwroot/pastebin.vip/stikked/application/controllers/Main.php
Line: 592
Function: getPaste

File: /www/wwwroot/pastebin.vip/stikked/index.php
Line: 284
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 2

Filename: geshi/geshi.php

Line Number: 3469

Backtrace:

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3469
Function: _error_handler

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3043
Function: parse_non_string_part

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/Process.php
Line: 45
Function: parse_code

File: /www/wwwroot/pastebin.vip/stikked/application/models/Pastes.php
Line: 430
Function: syntax

File: /www/wwwroot/pastebin.vip/stikked/application/controllers/Main.php
Line: 592
Function: getPaste

File: /www/wwwroot/pastebin.vip/stikked/index.php
Line: 284
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 1

Filename: geshi/geshi.php

Line Number: 3502

Backtrace:

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3502
Function: _error_handler

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/geshi/geshi.php
Line: 3043
Function: parse_non_string_part

File: /www/wwwroot/pastebin.vip/stikked/application/libraries/Process.php
Line: 45
Function: parse_code

File: /www/wwwroot/pastebin.vip/stikked/application/models/Pastes.php
Line: 430
Function: syntax

File: /www/wwwroot/pastebin.vip/stikked/application/controllers/Main.php
Line: 592
Function: getPaste

File: /www/wwwroot/pastebin.vip/stikked/index.php
Line: 284
Function: require_once

Go language calculates the distance between two longitudes and latitudes - Pastebin.vip - paste tool since 2022!

Go language calculates the distance between two longitudes and latitudes

From , 5 Years ago, written in Go, viewed 111 times.
URL https://pastebin.vip/view/5eb2a86c
  1. package main
  2.  
  3. import (
  4.         "fmt"
  5.         "math"
  6. )
  7.  
  8. func main() {
  9.         lat1 := 29.490295
  10.         lng1 := 106.486654
  11.  
  12.         lat2 := 29.615467
  13.         lng2 := 106.581515
  14.         fmt.Println(EarthDistance(lat1, lng1, lat2, lng2))
  15. }
  16.  
  17. func EarthDistance(lat1, lng1, lat2, lng2 float64) float64 {
  18.         var radius float64 = 6371000 // 6378137
  19.         rad := math.Pi / 180.0
  20.  
  21.         lat1 = lat1 * rad
  22.         lng1 = lng1 * rad
  23.         lat2 = lat2 * rad
  24.         lng2 = lng2 * rad
  25.  
  26.         theta := lng2 - lng1
  27.         dist := math.Acos(math.Sin(lat1)*math.Sin(lat2) + math.Cos(lat1)*math.Cos(lat2)*math.Cos(theta))
  28.         return dist * radius
  29. }
  30. //go/9043

Reply to "Go language calculates the distance between two longitudes and latitudes"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website