Skip to content

Instantly share code, notes, and snippets.

View Natgho's full-sized avatar
🐍
Dreaming

Sezer Bozkır Natgho

🐍
Dreaming
View GitHub Profile
@Natgho
Natgho / location.ux
Created October 30, 2020 13:42
QuickApp with HMS Location Kit
<template>
<!-- Only one root node is allowed in template. -->
<div class="container">
<text class="title">Location Finder</text>
<text>To find your place in the application, firstly press the "Obtain the geographical location" button. Then click the "show my location" button.
After your location is determined, "Get information" will be automatically called for information about the location.
</text>
<input type="button" class="mybutton" onclick="getGeolocation" value="Obtain the geographical location." />
@Natgho
Natgho / location.ux
Created October 30, 2020 13:41
QuickApp with HMS Location Kit
<script>
import geolocation from '@system.geolocation'
import prompt from '@system.prompt';
module.exports = {
data: {
information: {},
received_data: "",
lat: 41.029032,
lon: 29.117621
},
@Natgho
Natgho / location.ux
Created October 30, 2020 13:10
Geolocation calling into main page
import geolocation from '@system.geolocation'
@Natgho
Natgho / location.ux
Created October 30, 2020 13:05
QuickApp with HMS Location Kit
<template>
<!-- Only one root node is allowed in template. -->
<div class="container">
<text class="title">Location Finder</text>
<text>To find your place in the application, firstly press the "Obtain the geographical location" button. Then click the "show my location" button.
After your location is determined, "Get information" will be automatically called for information about the location.
</text>
<input type="button" class="mybutton" onclick="getGeolocation" value="Obtain the geographical location." />
@Natgho
Natgho / manifest.json
Last active October 30, 2020 12:56
Quick App with Location Kit Manifest.json
{
"package": "com.sezerbozkir.quickappwithlocationkit",
"name": "QuickAppwithLocationKit",
"versionName": "1.0.0",
"versionCode": 1,
"icon": "/Common/logo.png",
"minPlatformVersion": 1075,
"features": [
{
"name": "system.geolocation"
@Natgho
Natgho / hms-push-kit-off.js
Created September 24, 2020 07:11
hms-push-kit-off
push.off();
@Natgho
Natgho / hms-push-kit-data-message-handling.js
Created September 24, 2020 07:10
hms-push-kit-data-message-handling
push.on({
callback: function (ret) {
console.log("received pass through message, ret=" + JSON.stringify(ret));
},
complete: function () {
console.log('push.on completed');
}
});
@Natgho
Natgho / notification-handle.js
Created September 24, 2020 06:51
quick-app-with-push-kit-notification-handler
push.subscribe({
success: function(data) {
console.log("push.subscribe succeeded, result data=" + JSON.stringify(data));
},
fail: function(data, code) {
console.log("push.subscribe failed, result data=" + JSON.stringify(data) + ", code=" + code);
},
complete: function() {
console.log("push.subscribe completed");
}
@Natgho
Natgho / main.js
Last active September 24, 2020 06:49
quick-app-service-import
import push from '@service.push'
@Natgho
Natgho / hangman.py
Created November 18, 2019 21:11
hangman
import random
from time import sleep
import os
def clear_screen():
if os.name == 'nt':
os.system("cls")
else:
os.system("clear")