This file contains hidden or 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 (C) 2017 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
// When runnning a Gradle build in the background, it is convenient to be notified immediately | |
// via voice once the build has finished - without having to actively switch windows to find out - | |
// and being told the actual exception in case of a build failure. | |
// Put this file into the folder ~/.gradle/init.d to enable the acoustic notifications for all builds | |
gradle.addBuildListener(new BuildAdapter() { | |
@Override | |
void buildFinished(BuildResult result) { |
This file contains hidden or 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
// Implementasi custom calculator dengan menggunakan algoritma Shunting-Yard | |
// Referensi Algoritma : http://en.wikipedia.org/wiki/Shunting-yard_algorithm | |
// Contoh : http://www.chris-j.co.uk/parsing.php | |
// Custom calculator untuk melakukan conversi rumus menjadi nilai akhir | |
// @param String rumus: Informasi tentang rumus yang ingin dihitung. | |
// Contoh rumus adalah : | |
// - a+b*c | |
// - ((a+b)*c*d/(e+f)) | |
// - a/b/c*d |
This file contains hidden or 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 java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.util.Random; | |
//Changes: constants broken out of algorithm into variables for easy experimentation | |
class JpegGlitch2 { | |
public static final int TOGGLE = 3; |