Skip to content

Instantly share code, notes, and snippets.

View shafiqshams's full-sized avatar
😇
Its ok to fail, everyone fails, failure is not opposite of success, its a part.

Shafiq Shams shafiqshams

😇
Its ok to fail, everyone fails, failure is not opposite of success, its a part.
View GitHub Profile
@cod3cow
cod3cow / location.ts
Last active October 5, 2021 17:23
start external map navigation from ionic 2 app for ios and android; needs cordova-plugin-geolocation
startExternalMap() {
if (this.location.latitude) {
this.platform.ready().then(() => {
Geolocation.getCurrentPosition().then((position) => {
// ios
if (this.platform.is('ios')) {
window.open('maps://?q=' + this.location.name + '&saddr=' + position.coords.latitude + ',' + position.coords.longitude + '&daddr=' + this.location.latitude + ',' + this.location.longitude, '_system');
};
// android
if (this.platform.is('android')) {
public class minHeap {
public int capacity;
public int [] mH;
public int currentSize;
public minHeap(int capacity){
this.capacity=capacity;
mH = new int [capacity+1];
currentSize =0;
}
public void createHeap(int [] arrA){
/* Deleting a node from Binary search tree */
#include<iostream>
using namespace std;
struct Node {
int data;
struct Node *left;
struct Node *right;
};
//Function to find minimum in a tree.
Node* FindMin(Node* root)