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
/* | |
* DexAnalyzer.java | |
* Copyright 2016 Thomas Kuenneth | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License version 3 | |
* as published by the Free Software Foundation. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
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 'package:temperatureconverter/src/converter.dart'; | |
import 'package:temperatureconverter/src/model.dart'; | |
main(List<String> args) { | |
if (args.length != 3) { | |
print( | |
"Usage: main2 degreesCelsius|degreesFahrenheit|kelvin value degreesCelsius|degreesFahrenheit|kelvin"); | |
} else { | |
Model model = new Model(); | |
model.inUnit = enumFor(args[0]); |
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
library model; | |
import 'package:temperatureconverter/src/converter.dart'; | |
enum temperatureUnit { degreesCelsius, degreesFahrenheit, kelvin } | |
temperatureUnit enumFor(String str) { | |
for (var v in temperatureUnit.values) { | |
if (v.toString().endsWith(str)) { | |
return v; |
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 'package:temperatureconverter/src/converter.dart'; | |
main(List<String> args) { | |
for (var arg in args) { | |
var d = stringToDouble(arg); | |
print("${celsiusToString(d)} = ${fahrenheitToString(celsiusToFahrenheit(d))}"); | |
print("${celsiusToString(d)} = ${kelvinToString(celsiusToKelvin(d))}"); | |
print("${fahrenheitToString(d)} = ${celsiusToString(fahrenheitToCelsius(d))}"); | |
print("${fahrenheitToString(d)} = ${kelvinToString(fahrenheitToKelvin(d))}"); |
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
library converter; | |
import 'package:intl/intl.dart'; | |
const String unitDegreesCelsius = "\u00B0C"; | |
const String unitDegreesFahrenheit = "\u00B0F"; | |
const String unitKelvin = "K"; | |
final NumberFormat _f = new NumberFormat.decimalPattern("de_DE"); |
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 com.thomaskuenneth.temperatureconverter; | |
import java.text.DecimalFormat; | |
import java.text.NumberFormat; | |
import java.text.ParseException; | |
public class Converter { | |
public static final String DEGREES_CELSIUS = "\u00B0C"; | |
public static final String DEGREES_FAHRENHEIT = "\u00B0F"; |
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 class MagnifierDemoActivity extends Activity { | |
private Handler handler; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
ViewGroup layout = findViewById(R.id.layout); | |
Magnifier magnifier = new Magnifier(layout); |
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 com.thomaskuenneth.counterdemo_compose | |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.compose.Composable | |
import androidx.compose.state | |
import androidx.compose.unaryPlus | |
import androidx.ui.core.Dp | |
import androidx.ui.core.Text | |
import androidx.ui.core.setContent |
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 com.thomaskuenneth.playground | |
import android.content.ActivityNotFoundException | |
import android.content.Intent | |
import android.os.Bundle | |
import android.util.Log | |
import androidx.appcompat.app.AppCompatActivity | |
class LaunchGooglePlayDemo : AppCompatActivity() { |
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 com.thomaskuenneth.playground | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.os.CountDownTimer | |
import android.util.Log | |
class CountDownTimerDemo : AppCompatActivity() { | |
private val tag = CountDownTimerDemo::class.simpleName |
NewerOlder