Wednesday, December 21, 2016
4 Terror Attacks in 2 Days
Tuesday, December 20, 2016
Election finally over
Friday, December 9, 2016
Reacting to React.js
Wednesday, December 7, 2016
Lorem Ipsum
Thursday, December 1, 2016
How do you backup?
diskcopy a: b:from DOS? My Windows 10's Explorer won't even honor cross drive copying if your folder is more than a Gig or so. (It will just not respond to the drag). But it is cumbersome to have to keep copying as you get more things on drive 1 to want to duplicate in drive 2. There are external drive cloners like you plug in two hard disks (like Atari cartridges) and clone ... but is there anything that duplicates USB external drives? The world needs a device that offers 2 usb slots, a button, and boom, duplicate it for me. (Haven't found this yet) 2) Everyone offers you free storage on the cloud. Google Drive, Microsoft One Drive, dropbox, etc. But it is just a few gigs. You need at least a few hundred gigs if you have a few years of photos. The cost isn't that high but still is some money. See https://www.cnet.com/how-to/onedrive-dropbox-google-drive-and-box-which-cloud-storage-service-is-right-for-you/. But some may not be comfortable to put all your private photos on the web. There are various backup tools out there to automatically sync your computer to the cloud... again, putting everything you have on the cloud? But all at a cost... there are some free tools but I am afraid of malware. How do you backup your stuff?
Monday, November 14, 2016
Windows update: infinite restart
Friday, November 11, 2016
Election Map 2016
Wednesday, November 9, 2016
Most unbelievable election
Thursday, November 3, 2016
Congrats to the Cubs
Tuesday, November 1, 2016
Wifi password difficult math
Thursday, October 27, 2016
Apple: Stop taking away stuff
Monday, October 24, 2016
Spring things
Exercise your right to vote - although outcome won't change
Monday, October 10, 2016
Come on, yahoo
Monday, October 3, 2016
Pascal legacy continues?
Tuesday, September 27, 2016
Who won the first debate?
Wednesday, September 21, 2016
School with no textbooks
Thursday, September 8, 2016
Hopeless American Politics
Iphone7 is more important than anything else?
Monday, August 8, 2016
4th Android phone
1st phone cheap cheap one: just too small too old.
2nd one is Nexus 4: part of the screen stopped receiving tabs
3rd one is Moto G2: nice budget phone but I cracked screen. My fault. and I continued with this for months
My new one is a long waited Moto G4. Supposed to be king of budget phone. The camera has a whopping 13 meg camera. Supposed to be good. Eeew Nope making a bit fuzzy pictures, worse than my Moto 2 versions ago. Not all the time but enough to be annoyed. Ok, sent it back for an exchange with everything in box back. I am supposed to wait 10 days... but nope. waited more than 14 days. Did I get an exchange? I don't know. Look the same to me. 0 explanation of what was done. All I know is the unopened new charger is robbed. Did the quality improve? Not really. So I am putting up with this phone. Other than camera.. this phone works great. Lean and mean. To prevent crack again I bought a great glass cover which supposed to protect it. Phones should come STANDARD with such protection.
Thursday, July 28, 2016
Augmented reality silly gaming
Thursday, July 21, 2016
Java convert time zones
import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Testing { private static String convertTimeZone(String datetime, String fmt, String timeZoneFrom, String timezoneTo) throws Exception { TimeZone defaultTimeZone = TimeZone.getDefault(); // save your default time zone TimeZone.setDefault(TimeZone.getTimeZone(timeZoneFrom)); SimpleDateFormat sdf = new SimpleDateFormat(fmt); Date d = sdf.parse(datetime); sdf.setTimeZone(TimeZone.getTimeZone(timezoneTo)); String result= sdf.format(d); TimeZone.setDefault(defaultTimeZone); // reset default time zone back return result; } public static void main(String arg[]) { try { System.out.println(convertTimeZone("2016-08-21 18:50:00", "yyyy-MM-dd HH:mm:ss","UTC","Asia/Hong_Kong")); System.out.println(convertTimeZone("2016-08-21 06:50:00", "yyyy-MM-dd HH:mm:ss","Europe/London","UTC")); } catch (Exception e) { e.printStackTrace(); } }Check out time zone strings around the world. https://www.mkyong.com/java/java-display-list-of-timezone-with-gmt/.
Tuesday, July 5, 2016
Happy Independence Day
Seen that in probability... That means A and B are independent events.
I am glad this year no one blow their arms off. But I think fireworks should be banned. Go watch professionals handle it in Navy Pier, ok? Do not need to risk blow yourself up.
Tuesday, June 28, 2016
Perfect article about "Perfect Day"
Friday, June 3, 2016
Why Windows Phone not popular?
Friday, May 13, 2016
Differential equations mistaken as terrorist script
Friday, May 6, 2016
Children tale on money
for-looping dates
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); Date startDate = formatter.parse("2010-12-20"); Date endDate = formatter.parse("2010-12-26"); Calendar start = Calendar.getInstance(); start.setTime(startDate); Calendar end = Calendar.getInstance(); end.setTime(endDate); for (Date date = start.getTime(); start.before(end); start.add(Calendar.DATE, 1), date = start.getTime()) { // Do your job here with `date`. System.out.println(date); }..and yes, Java pre-8 date handling is incredibly clumsy. Can't do anything unless you put it into a Calendar. Why can't java.util.Date have the ability to do that?
Wednesday, May 4, 2016
Indiana clears path for Trump
A "viral" math problem
Thursday, April 21, 2016
AWS Summit
Tuesday, March 15, 2016
A pi day problem
Friday, March 4, 2016
A pleasant example of calculus
Thursday, March 3, 2016
Metro bashing (again)
Ideas from the web include:
1) Run some Power Shell script to re-register the apps. See here. Nope didn't help
2)
sfc /scannowSee here. Nope. didn't help either. It just says it can't fix it and tell me to look at some idiot tells-you-nothing log. I thought my bashing of Metro ended with Windows 10. Nope. Microsoft: This. is. RIDICULOUS.
Monday, February 29, 2016
Getting music on speakers
Friday, February 26, 2016
Chicago hopelessness: crime and CPS
Thursday, February 11, 2016
Riot in Hong Kong
My facebook feeds are covered with riot pictures along with words describing the hopeless situation there. The future is quite grim over there.
How come Macau don't seem to have as much issues?
It is unfortunate that really, those with bigger fist rule. Hoping mainland be kinder to Hong Kong please.
Wednesday, February 10, 2016
Outrageous Supreme Court Decision
Just what do these guys want: protect the coal industry? See here: http://www.theatlantic.com/technology/archive/2016/02/the-supreme-courts-devastating-decision-on-climate/462108/
Have these coal pollution point right at these guys' face please.
Yes it hurts the coal industry, but in the long run if right actions not taken now... the world is DOOMED you hear?
Waita minute just how does check-and-balance work again? How do you overturn a Supreme Court Decision to protect humanity? Wait for these guys to die so the president to appoint new ones?
Friday, January 29, 2016
Pretty Print JSON
- Json simple: https://code.google.com/archive/p/json-simple/
- GSON: http://mvnrepository.com/artifact/com.google.code.gson/gson/2.3.1
import java.io.BufferedReader; import java.io.FileReader; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; import com.google.gson.JsonParser; public class JSONPretty { public static void prettyPrint(String jsonString) { JsonParser parser = new JsonParser(); JsonObject json = parser.parse(jsonString).getAsJsonObject(); Gson prettyGson = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyGson.toJson(json); System.out.println(prettyJson); } public static void main(String[] args) { if (args.length!=1) { System.out.println("USAGE: java JSONPretty [data.txt]\nwhere data.txt contains lines of JSON\n"); return; } try { String fileName = args[0]; BufferedReader readbuffer = new BufferedReader(new FileReader(fileName)); String strRead; while ((strRead=readbuffer.readLine())!=null){ prettyPrint(strRead); } readbuffer.close(); } catch (Exception e) { e.printStackTrace(); } } }
Thursday, January 28, 2016
Android: here I come again
Wednesday, January 27, 2016
Google beats Go
Tuesday, January 26, 2016
Most hated programming languages
Thursday, January 7, 2016
CSS unselectable text
<style> .noselect { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } </style>
Selectable text.
Unselectable text. I have class="noselect"
Wednesday, January 6, 2016
Article about 1 (on January 1)
Tuesday, January 5, 2016
7th row of Periodic Table completed
It takes several months to try this smashing experiment roughly 10 quintillion times. And we’re not always successful,” she said. At most, it will work about three times in 10 quintillion tries, she addedAll that work... for a fraction of a second of the new big elements... is there use of those? If there is of any use, better use that in that fraction of a second. This is olympic gold medal for science... but I fail to share the enthusiasm. I never quite understood the periodic table: why is the periodic table not in a perfect box? Why is there 2 extra rows that needs an asterisk... Electron configuration I guess. Chemistry has always been over my head. And of course, there are different world within the proton... the quantum world that only your PhD friends have a clue or so.