Vending machine-vending machine: enter money every time until the money is enough, and then return the excess money.
// Vending machine-vending machine # include
Result:
Enterthemoney:(D-dollar(1),q-quarter(0.25),d-dime(0.10),n-nickel(0.05))Theapplymoneyis3.5,theinsertedmoneyis0DEnterthemoney:(D-dollar(1),q-quarter(0.
main.m//Vending Machine ///* Vending machine system is an unmanned vending system. At the time of sale, the customer put the money into the slot of the machine, 1. The machine checks the characteristics of banknotes or coins, the effective coin is a yuan, five horns, the effective banknotes are 10 yuan, five yuan, other currencies are considered to be counterfei
Problem descriptionAssuming that there are multiple currencies [1,x1,x2,x3,..., xn] in a country, the country's vending machine will follow a principle of finding zero-"The total number of change is the least". So, how to write programs that help the vending machine automaticallyWhere's the change?Problem analysisThe most direct way to solve this problem is to be exhaustive. Suppose you need change Y, then
Figure Description: Moving, backup after the launch of Android virtual machine appears
Solution to the problem of panic:could not open D:\java2\android\android-sdk-windows\.android\avd\test.ini
A few days ago, I am sorting some files, the previously installed on the Android
android. app. backup. backupAgentHelper-keep public class * extends android. prefer Ence. preference-keep public class com. android. vending. licensing. ILicensingService-keepclasseswithmembernames class * {native;}-keepclasseswithmembernames class * {public (android. conte
customize properties used by the ant build system use,# "Build. properties", and override values to adapt the script to your# Project structure.# Project target.Target = Android-9
We can see that proguard. cfg has helped us write the optimization code script.
View plaincopy to clipboardprint?-Optimizationpasses 5-Dontusemixedcaseclassnames-Dontskipnonpubliclibraryclasses-Dontpreverify-Verbose-Optimizations! Code/simplification/arithmetic ,! Field /*,
-dontpreverify # Whether to perform pre-check-verbose -optimizations! Code/simplification/arithmetic ,! Field /*,! Class/merging/* # algorithm used for obfuscation-keep public class * extends android. app. activity # keep classes that are not Obfuscated-keep public class * extends android. app. application # keep classes that are not Obfuscated-keep public class * extends
optimization, you cannot just# Include optimization flags in your own project configuration file;# Instead you will need to point to# "Proguard-android-optimize.txt" file instead of this one from your# Project. properties file.-Keepattributes * Annotation *-Keep public class com. google. vending. licensing. ILicensingService-Keep public class com. android.
not Obfuscated-keep public class com. android. vending. licensing. ILicensingService # Keep classes not Obfuscated-keepclasseswithmembernames class * {# Keep native METHOD not obfuscated native
Ii. obfuscation of instances
1、after configuration obfuscation in proguard-project.txt;
2. Add proguard. config =$ {sdk. dir}/tools/proguard/proguard-android.txt in project. properties: proguard-project.txt
3. Conf
parts you do not need to be confused, because some classes will cause program compilation to fail, as shown below:
-Keep public class * extends android. app. Fragment
-Keep public class * extends android. app. Activity
-Keep public class * extends android. app. Application
-Keep public class * extends android. app. Se
-keep public class * extends android. content. contentProvider-keep public class * extends android. app. backup. backupAgentHelper-keep public class * extends android. preference. preference-keep public class com. android. vending. licensing. ILicensingService # native metho
Mobile phone Bluetooth control relay wireless lock Iot Android source code android development Android WIFI control detailed annotation test stability no bug, android Android
I. functions:
1. Connect and disconnect Android WIFI, a
Android SDK Android NDK android Studio officialIf the download speed is too slow, please use thunder, Baidu cloud offline and other methods to download.For Linux systems, if you cannot upgrade online, see belowsudo vi/etc/hostsAdd to74.125.206.93 dl-ssl.google.comHere are the various.
2014.7ADT BundleHttp://dl.google.com/
First, understand the Android operating system
Android was first founded by Andy Robin (Andy Rubin) and was acquired by Google in 2007, and Google has achieved great success with its Android operating system on smartphones.
1, the characteristics of the Android operating system
The
* extends android. app. activity-keep public class * extends android. app. application-keep public class * extends android. app. service-keep public class * extends android. content. broadcastreceiver-keep public class * extends android. content. contentprovider-keep public
This is my collection of the classic books on Android development, high-definition PDF electronic version, can be downloaded in my Baidu network free of charge, I hope that the need for friends to help. Directory:Android 4 Advanced Programming (full source code included)"Crazy Android Handout""Android App Development (Guo Hongzhi)""
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.