Skip to content

Instantly share code, notes, and snippets.

View novalagung's full-sized avatar
🏠

Noval Agung Prayogo novalagung

🏠
View GitHub Profile

mas Wishnu

1. list semua menu yg ada, masukkan ke collection menu (hari ini)
2. buat back end untuk user (sudah ada, sesuaikan aja jika perlu)
3. buat back end untuk roles

mas Sarif

1. siapkan UI untuk user (mulai ngerjakan ini)
  1. roles
{
"color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme",
"font_face": "Source Code Pro",
"font_size": 12,
"ignored_packages":
[
"Vintage"
],
"theme": "Spacegray Eighties.sublime-theme",
"word_wrap": true
var dataOriginal = db.getCollection('SummaryUtilization').find({
MonthYear: 62016
}).toArray()
var dataGroupedByMonthYearAndEmp = {}
dataOriginal.forEach(function (eachData) {
// ========= calculate percentage
eachData.Percentage = eachData.SumChargeable / (eachData.CoreHours - eachData.PublicHours)
var dataDonut = [{
"category": "CIB",
"data": [{
text: "Sub Segment 1",
value: 35
}, {
text: "Sub Segment 2",
value: 25
}, {
text: "Sub Segment 3",
{
"IsError": false,
"Message": "",
"Total": 0,
"Data": [{
"Name": "India",
"Data": [-31.40778, 109.20522, 27.4362, -17.03341, 0, 0],
"Budget": [42.09632, 41.54066, 44.14146, 44.0145, 0, 0],
"Forecast": 0,
"TooltipData": [ // chart tooltip
var oldFilter = $('#consistencygrid').data('kendoGrid').dataSource.filter()
// ... refresh data get from backend
$('#consistencygrid').data('kendoGrid').dataSource.filter(oldFilter)
$('#consistencygrid').data('kendoGrid').refresh()
function letterCase(text) {
return text.split(" ").map(function (d) {
if (d.length == 0) return d
return d[0].toUpperCase() + d.slice(1).toLowerCase()
}).join(" ")
}
letterCase("LOREM IPsum DOLOT")
db.getCollection('SummaryUtilizationOperationsMarch').aggregate([
{ $match: {
// C_n_u: 1,
} },
{ $group: {
_id: {
"EmpName": "$EmpName",
"EmpServiceLine": "$EmpServiceLine",
"SumChargeable": "$SumChargeable",
"CoreHours": "$CoreHours",
@novalagung
novalagung / AndroidAdMobView.js
Created March 13, 2017 00:45 — forked from kritikinfo/AndroidAdMobView.js
gist showing Admob Banner Ad use within react native. It's not perfect, but it works. Not included: build.gradle which needs dependency on play-services-ads.
var { PropTypes, requireNativeComponent } = require('react-native');
var React = require('react-native')
var {
StyleSheet,
View,
} = React;
var iface = {
name: 'AdmobView',
function fixData(src) {
backup = {}
dest = []
src.forEach(function (d) {
var pos = d.EmployeePosition
var posLower = pos.toLowerCase()
if (!backup.hasOwnProperty(posLower)) {
var beautyPos = pos.split(" ").map(function (e) {
if (e.length == 0) return ""
return e[0].toUpperCase() + e.slice(1)