Follow these steps to disable that feature and fix Shush:
Go to the Settings app.
Further details are on the MIUI forums.
Go to the Settings app.
Shush installs were flat until March 12, 2011
"Probably the best app ever, should come standard w/ every phone!"I feel obliged to paste some constructive reviews to balance those:
"Amazing app. Recommend it to everyone."
"This ap is just too awesome to be free! It's perfect, and so simple a cave-man..... well, u get the picture. LOL"
Does yours turn off and on at random? Mine does. :-(Some people are having genuine problems with Shush. I know there are interaction problems when some apps invisibly mute the ringer. It seems like some camera apps mute the ringer when they intend to mute only the shutter sound; I need to get in touch with the authors of those apps.
Didn't play well with my EVO. Uninstalled.
TypeListeners to host other containers. I think the SPI benefits by staying out of your way when you aren't using it. public Reader inputStreamToReader(InputStream in) throws IOException {
in.mark(3);
int byte1 = in.read();
int byte2 = in.read();
if (byte1 == 0xFF && byte2 == 0xFE) {
return new InputStreamReader(in, "UTF-16LE");
} else if (byte1 == 0xFF && byte2 == 0xFF) {
return new InputStreamReader(in, "UTF-16BE");
} else {
int byte3 = in.read();
if (byte1 == 0xEF && byte2 == 0xBB && byte3 == 0xBF) {
return new InputStreamReader(in, "UTF-8");
} else {
in.reset();
return new InputStreamReader(in);
}
}
}
"?gwt.codesvr=127.0.0.1:9997" URL suffix that makes dev mode work.Next time your devmode isn't working, just click the bookmarklet!
ArrayList is faster for empty lists because neither a move nor an allocation is required. I'll also assume that ArrayList is slower for large lists since that'll require a large number of elements to be moved. public final class ListAsQueueBenchmark extends SimpleBenchmark {
@Param({"0", "10", "100", "1000"}) int size;
private final ArrayList<String> arrayList = new ArrayList<String>();
private final LinkedList<String> linkedList = new LinkedList<String>();
private final Deque<String> arrayDeque = new ArrayDeque<String>();
@Override protected void setUp() throws Exception {
for (int i = 0; i < size; i++) {
arrayList.add("A");
linkedList.add("A");
arrayDeque.add("A");
}
}
public void timeArrayList(int reps) {
for (int i = 0; i < reps; i++) {
arrayList.add("A");
arrayList.remove(0);
}
}
public void timeLinkedList(int reps) {
for (int i = 0; i < reps; i++) {
linkedList.add("A");
linkedList.remove(0);
}
}
public void timeArrayDeque(int reps) {
for (int i = 0; i < reps; i++) {
arrayDeque.addLast("A");
arrayDeque.removeFirst();
}
}
}I ran the benchmark and the results surprised me: HotSpot's allocator and concurrent GC are fast! It takes only 10 elements for the LinkedList to pay for its extra allocations. And at 1000 elements, LinkedList is 20x faster than ArrayList for queue-like access.ArrayDeque is really the champion in this case. It performs neither allocations nor moves and beats both ArrayList and LinkedList for all inputs.... I discovered software I could find no way to uninstall; programs which hung around after I was done with them with no way to quit I could find; interfaces which featured tiny poorly placed buttons near impossible to click without concentration; inconsistent search functionality where the “it’s right there on the phone” search button worked or didn’t work or did work but not as you’d think it’d work.These are legitimate problems that should be addressed in Android. But this isn't some damning, intractable systematic problem. It's a handful of papercuts.
Papercuts like these exist in all shipping operating systems; mobile and otherwise. Android users react similarly when they use iPhones. "Holy fuck! There's no back button!" was my own first reaction.
I just posted the first major update to Shush! Ringer Restorer.ListView to pick a duration. The scrollable control wanted fewer options, but users wanted more options. My goal was to make Shush feel fast & simple, but scrolling interfered.ListView with something new: a circular slider that operates like the hour hand of a clock. It's fun, compact, and pink! Using Android's view and canvas APIs to implement ClockSlider.java was straightforward, despite the necessary trigonometry!For me, this was a fun Saturday project. Have you written an Android app yet?Scan this to get Shush from the Android Market!
.java file, and it runs it:$ cat Foo.java
package foo;
public class Foo {
public static void main(String[] args) {
System.out.println("potato");
}
}
$ ./vogar --stream Foo.java
Actions: 1
Action foo.Foo
potato
OK (SUCCESS)
Outcomes: 1. All successful.The representation of numbers is similar to that used in most programming languages. A number contains an integer component that may be prefixed with an optional minus sign, which may be followed by a fraction part and/or an exponent part.Despite the spec claiming the opposite, this is unlike most programming languages. Formal languages specify ranges for values or defer to standards like IEEE 754.Octal and hex forms are not allowed. Leading zeros are not allowed.
A fraction part is a decimal point followed by one or more digits.
An exponent part begins with the letter E in upper or lowercase, which may be followed by a plus or minus sign. The E and optional sign are followed by one or more digits.
Numeric values that cannot be represented as sequences of digits (such as Infinity and NaN) are not permitted.
public class Hello {
public static void main(String... args) {
System.out.println("yippee!");
}
}
class Impossible {
public Impossible() {
throw new AssertionError("you cannot instantiate me");
}
public void foo() {
System.out.println("The impossible is possible!");
}
}I think all-in-one toolchains (eg: IDEs) are actually part of the reason Java has both not enough magic (like Rob says) and also the wrong kind of magic (runtime reflection). If there was a standard way to plug code generators into Java (or better yet: a Common Lisp-like macro system) then the vast majority of places where people use runtime-magic (reflection) today could be replaced by compile-time magic, and your static analysis tools (ie: compile-time type checking, code navigation tools, refactoring tools, etc.) would actually still work.Java has a standard way to generate code: the annotation processing tool. Laurence acknowledges APT, but claims it it's useless for his purposes:
[...] I have to say that annotation processors are like lobotomized macros. I did some experiments wit them a few years ago (when Java 5 first came out), and it was pretty difficult to do any useful metaprogramming with them without doing really nasty things.Among others, one core claim Laurence makes is that refactoring still works if there's a standard way to generate code. I disagree.
{
"name": "Jesse Wilson",
"age": 28,
"favorite taco flavors": [ "fish", "steak" ]
}...and generates a Java class:/* GENERATED FILE! DO NOT EDIT */
public class TacoCustomer {
private final String name;
private final double age;
private final ImmutableList<String> favoriteTacoFlavors;
public String getName() {
return this.name;
}
public double getAge() {
return age;
}
public ImmutableList<String> getFavoriteTacoFlavors() {
return favoriteTacoFlavors;
}
public static TacoCustomer parseJson(String jsonText) {
...
}
}This looks fine enough, almost like code a human would write. But when I exercise my refactoring tool to rename getFavoriteTacoFlavors to getFavoriteTacos, I face one of two ugly situations:public interface TacoCustomer {
@JsonProperty("name");
String getName();
@JsonProperty("age");
double getAge();
@JsonProperty("favorite taco flavors");
ImmutableList<String> getFavoriteTacoFlavors();
}Exercise the runtime-generated code with a shared, type-safe entry point. It might be invoked like this: String jsonText = ...
TacoCustomer jesse = new JsonToJava().parse(TacoCustomer.class, jsonText);Refactoring this interface just works, and I can even attach meaningful Javadoc to its methods. The interface can be an inner-interface of another class. And it can host a manually-coded inner classes.Our type-unsafety-is-okay precedent is Collection.clear(), JJB's infamous optional method. Type safety advocates see @throws UnsupportedOperationException and claim that it's damning of either the collections framework or the type system. But I claim that each new type (or type parameter!) has a complexity cost and that it may occasionally be better to have fewer types than a perfectly typesafe API.
The tricky bit is deciding where to draw the line. Dynamic language folks ("liberals") think that type safety is overpriced and will prefer fewer types and more possibility for runtime errors. Type safety junkies ("conservatives") want to model the universe as it truly is and must accept a world with type variables, covariance, and wildcards.
What isn't productive is going against the grain of the type system. If you find yourself copying & pasting class declarations to work around a language limitation, you may be trying to use more type safety than the language will bear. Type safety can be unintrusive like a seatbelt. But using APIs with more than two type parameters feels like driving to work in Lancelot's armor.
The opposite end of the spectrum is also quite terrible. An old billing system I worked on used Map<String, Object> as its preferred datatype. We'd live in fear that using an equals() where equalsIgnoreCase() was necessary would cause the next million dollar bug. To use this API was to vomit null checks and casts until simple business logic became complex.
Our jobs as software engineers is to make tasteful decisions about how much type safety is appropriate.