Skip to content

Instantly share code, notes, and snippets.

View ponnex's full-sized avatar

Emmanuel Francis Ramos ponnex

View GitHub Profile
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
import { Component, OnInit, ViewChild, ElementRef } from "@angular/core";
import { NavigationService } from "../../services/navigation/navigation.service";
import { Image } from "ui/image";
import { EventData } from "tns-core-modules/ui/page/page";
@Component({
selector: "products",
moduleId: module.id,
templateUrl: "./products.component.html",
styleUrls: ["./products.component.scss"]
<ActionBar title="Products">
<NavigationButton text="Go Back" android.systemIcon="ic_menu_back" (tap)="onTapBack()" tap="goBack()"></NavigationButton>
</ActionBar>
<StackLayout orientation="vertical">
<GridLayout columns="*" rows="auto,*,auto,auto">
<Label text="Which of these SKUs are available in the outlet? (should have atleast 2 bottles to be considered available)" row="0" textWrap="true" class="label-availability" horizontalAlign="center" verticalAlign="center"></Label>
<ScrollView row="1" marginTop="5">
<StackLayout orientation="vertical" [ngSwitch]="consumerOccasions">
<GridLayout [visibility]="consumerOccasions == 'cokeSS' ? 'visible' : 'collapsed'" columns="*,*,*" rows="auto,150,150">
<Label text="Coke Single Serve" class="category-label" colSpan="3" row="0"></Label>
DISCLAIMER: Did not test this code HAHAHA ask lang if ever naay error ;)
// Camera Service
onTakePhoto() {
return new Promise((resolve, reject) => {
requestPermissions().then(
() => {
// Other Codes Here
takePicture(options)
.then((imageAsset: any) => {
@ponnex
ponnex / MeYou release build error logs.txt
Created July 4, 2018 16:12
MeYou release build error logs
07-05 00:15:17.761 6150-6150/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: one.meyou.isbd, PID: 6150
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException:
Error calling module function
Error calling module function
Error calling module function
[native code]: ERROR CONTEXT {
"view": {
"def": {
"nodeFlags": 33669121,
"rootNodeFlags": 33554433,
"nodeMatchedQueries": 0,
"flags": 0,
"nodes": [
{
"nodeIndex": 0,
// generated on 2017-10-10 using generator-webapp 3.0.1
const gulp = require('gulp');
const gulpLoadPlugins = require('gulp-load-plugins');
const browserSync = require('browser-sync').create();
const del = require('del');
const wiredep = require('wiredep').stream;
const runSequence = require('run-sequence');
const wait = require('gulp-wait2');
// requirements for compiling partials
@import '../atoms/mixins/_icon';
/* Stylish left and right navigator */
.months-text .left {
@include render-icon('icon-chevron-left');
background-repeat: no-repeat;
background-position: 0% 50%;
height: 25px;
}
@ponnex
ponnex / truncated-pagination-variable-fixed-length.ts
Created June 29, 2022 06:39
Truncated Pagination with Variable Fixed Length
const MINIMUM_PAGE_SIZE = 5;
const getRange = (start: number, end: number) => {
const length = end - start + 1;
return Array.from({length}, (_, i) => start + i);
};
const clamp = (number: number, lower: number, upper: number) => {
return Math.min(Math.max(number, lower), upper);
}