This file contains 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
Hello World |
This file contains 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 | |
/* | |
* Transform coordinates in a geojson from (long,lat) to (lat,long) | |
* | |
* TOOLS: geojsonlint.com to validate geojson | |
*/ | |
$file = file_get_contents("pipeline (1).geojson"); | |
$file = json_decode($file); |
This file contains 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
#!/usr/bin/env python | |
# coding: utf-8 | |
# This calculates the area of a raster by summing the squares | |
# of all pixel grids and grouping similar grids based on their rgb value | |
import rasterio | |
import os, sys |
This file contains 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 | |
function convertUtmToLatLong($north, $east, $utmZone){ | |
// This is the lambda knot value in the reference | |
$LngOrigin = Deg2Rad($utmZone * 6 - 183); | |
// The following set of class constants define characteristics of the | |
// ellipsoid, as defined my the WGS84 datum. These values need to be | |
// changed if a different dataum is used. |
This file contains 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 | |
$path = "c:/emmetblue/src/condra-setup"; | |
$fileServer = "https://emmetblue.org.ng:702"; | |
$globalsLocation = "c:/emmetblue/src/condra-setup/globals"; | |
$apiPath = "c:/emmetblue/src/condra-setup/api"; | |
$elasticSearchEndpoint = "http://35.227.118.101:9200"; | |
$options = [ | |
"dbconfig"=>[ |
This file contains 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
BEGIN | |
DECLARE @sql TABLE(DispensationID INT, Patient INT, ItemID INT, DispensedQuantity INT, BillingTypeItemPrice MONEY, TotalPrice MONEY) | |
INSERT INTO @sql | |
SELECT a.DispensationID, a.Patient, b.ItemID, b.DispensedQuantity, c.BillingTypeItemPrice, | |
(b.DispensedQuantity * c.BillingTypeItemPrice) AS TotalPrice FROM Pharmacy.Dispensation a | |
INNER JOIN Pharmacy.DispensedItems b ON a.DispensationID = b.DispensationID | |
INNER JOIN Accounts.BillingTypeItemsPrices c ON b.ItemID = c.BillingTypeItem | |
INNER JOIN Accounts.BillingTypeItems d ON b.ItemID = d.BillingTypeItemID | |
WHERE d.BillingType = 7 |
This file contains 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 | |
try { | |
//send request to cardinity's server the normal way | |
} | |
catch(GuzzleHttp\Exception\ClientException $e){ | |
//do something nice with $e. var_dump it to see its beauty | |
} |
This file contains 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
USE [EmmetBlue] | |
GO | |
/****** Object: StoredProcedure [dbo].[CleanUpSchema] Script Date: 9/27/2016 8:07:51 PM ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO |
This file contains 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 | |
require "vendor/autoload.php"; | |
$acl = new Samshal\Acl\Acl(); | |
/** | |
* Create the roles and add them to the registry | |
*/ | |
$acl->addRole("doctor"); |
This file contains 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
function getNgrams($match, $n=3) | |
{ | |
$ngrams = array(); | |
$len = strlen($match); | |
for ($i = 0; $i < $len; $i++) | |
{ | |
if ($i > ($n - 2)) | |
{ | |
$ng = ''; | |
for($j = $n - 1; $j >= 0; $j--) |