Skip to content

Instantly share code, notes, and snippets.

Michael krmao

Block or report user

Report or block krmao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@krmao
krmao / learnDart.dart
Last active Apr 24, 2020
learn dart language
View learnDart.dart
import 'dart:io';
import 'dart:convert';
// Copyright 2015 the Dart project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
void main() {
// 1 var
print("\n变量----------------------\n");
@krmao
krmao / ZipUnzip.groovy
Created Apr 8, 2020 — forked from bitsnaps/ZipUnzip.groovy
Zip and UnZip files using Groovy
View ZipUnzip.groovy
import java.util.zip.*
String zipFileName = "file.zip"
String inputDir = "logs"
def outputDir = "zip"
//Zip files
ZipOutputStream zipFile = new ZipOutputStream(new FileOutputStream(zipFileName))
new File(inputDir).eachFile() { file ->
@krmao
krmao / ZipUnzip.groovy
Created Apr 8, 2020 — forked from bitsnaps/ZipUnzip.groovy
Zip and UnZip files using Groovy
View ZipUnzip.groovy
import java.util.zip.*
String zipFileName = "file.zip"
String inputDir = "logs"
def outputDir = "zip"
//Zip files
ZipOutputStream zipFile = new ZipOutputStream(new FileOutputStream(zipFileName))
new File(inputDir).eachFile() { file ->
@krmao
krmao / colors.xml
Created Apr 24, 2018 — forked from kalehv/colors.xml
Material Design Color Palette Colors.xml Resource file for Android
View colors.xml
<?xml version="1.0" encoding="utf-8"?>
<!--
Google Material Design Color Palette for Android http://www.google.com/design/spec/style/color.html#color-ui-color-palette
Spreadsheet used to create this reosurce - http://bit.ly/mdcolor_spreadsheet
Link to this colors.xml resource file - http://bit.ly/mdcolorsxml
Harshad Kale
https://github.com/kalehv
-->
@krmao
krmao / IMMLeaks.java
Created Nov 20, 2017 — forked from pyricau/IMMLeaks.java
"Fix" for InputMethodManager leaking the last focused view: https://code.google.com/p/android/issues/detail?id=171190
View IMMLeaks.java
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.ContextWrapper;
import android.os.Bundle;
import android.os.Looper;
import android.os.MessageQueue;
import android.util.Log;
import android.view.View;
import android.view.ViewTreeObserver;
You can’t perform that action at this time.