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
// Copyright 2017-2018 Pavitra, All rights reserved | |
// Released under the Apache License, Version 2.0 | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
package com.pavitra; | |
import android.content.Context; | |
import android.util.Log; | |
import com.physicaloid.lib.*; |
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 doGet() { | |
getAdReports(); | |
} | |
function getAdReports() { | |
var start = "today-6d"; //one week ago | |
var end = "today"; | |
var clients = AdSense.Adclients.list().getItems(); |
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
FloatingActionButton fab = new FloatingActionButton(context); | |
fab.setId(View.generateViewId()); | |
fab.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
Log.d("DEBUG", "onFabFoo"); | |
}}); | |
fab.setImageResource(R.drawable.btn_plus); | |
fab.setElevation(2); | |
fab.setSize(FloatingActionButton.SIZE_MINI); |
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
package io.kodular; // package of the extension will be "com.kodular.SimpleMaths" | |
// Only these imports are required to interact with Kodular | |
import com.google.appinventor.components.annotations.*; | |
import com.google.appinventor.components.runtime.*; | |
import com.google.appinventor.components.common.*; | |
@DesignerComponent(version = 1, // Update version here, You must do for each new release to upgrade your extension | |
description = "Simple Maths extension created by you", | |
category = ComponentCategory.EXTENSION, |
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
import zipfile, os | |
for file in os.listdir(): | |
if file.endswith('.aar'): | |
print('aar:', file) | |
with zipfile.ZipFile(file) as aar: | |
aar.extract('classes.jar') | |
os.rename('classes.jar', os.path.splitext(file)[0] + '.jar') |
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
@echo off | |
for %%f in (*.jar) do echo %%f && jar tf %%f > %%f.txt |
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
var ws = Blockly.getMainWorkspace() // Get workspace | |
var backpack = Blockly.getMainWorkspace().getBackpack() // get backpack | |
var yail = Blockly.Yail // Access yail generator | |
var repl = Blockly.ReplMgr // Access REPL | |
ws.getAllBlocks // Get all blocks |
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
public String getParentPackageName() { | |
PackageManager pm = context.getPackageManager(); | |
String packageName = context.getApplicationContext().getPackageName(); | |
PackageInfo pi; | |
try { | |
pi = pm.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES); | |
} catch (NameNotFoundException e) { | |
e.printStackTrace(); | |
} |
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
setlocal EnableDelayedExpansion | |
echo Searching for java files... | |
set JAVA_FILES= | |
for %%i in (java\*.java) do set JAVA_FILES=!JAVA_FILES! %%i && echo %%i | |
echo Found Java Files:%JAVA_FILES% |
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
:: This script compiles java files from | |
:: java folder and puts class files into | |
:: classes folder which are then compiled | |
:: into a jar file in build folder. | |
:: FILES HEIRARCHY | |
:: example | |
:: |_ build | |
:: | |_ compiled.jar (generated - Final packaged jar file) | |
:: |_ classes (generated - Contains compiled class files) |
OlderNewer