Skip to content

Instantly share code, notes, and snippets.

@xinmeng1
xinmeng1 / dynamicl_control_DOM_by_event.ts
Created February 23, 2017 10:48
dynamicl_control_DOM_by_event
setCssDynamical($event) {
console.log($event);
$event.source.trigger.nativeElement.childNodes[0].setAttribute("style", "font-size: 20px;font-weight: bold")
//mat-select-trigger
//mat-select-placeholder
//let elt = document.getElementsByClassName("mat-select-placeholder").item(0);
//elt.setAttribute("style", "font-size: 20px;font-weight: bold");
}
atom sync xin
atom sync setting
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@xinmeng1
xinmeng1 / thread dump files
Created August 17, 2016 13:44
webstorm hang thread dump files
"AWT-EventQueue-0 2016.2.1#WS-162.1447.27 WebStorm, eap:false, os:Linux 4.4.0-34-generic, java-version:JetBrains s.r.o 1.8.0_76-release-b216" prio=0 tid=0x0 nid=0x0 waiting on condition
java.lang.Thread.State: WAITING
on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2e970c27
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at sun.awt.SunToolkit.awtLockWait(SunToolkit.java:267)
at sun.awt.X11.XToolkit.getCurrentServerTime(XToolkit.java:1462)
at sun.awt.X11.XClipboard.setContentsNative(XClipboard.java:93)
at sun.awt.datatransfer.SunClipboard.setContents(SunClipboard.java:106)
@xinmeng1
xinmeng1 / Grial_icon.xml
Last active April 12, 2016 11:47
Xamarin Develop Gist
<Label Grid.Column="1"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" >
<Label.FormattedText>
<FormattedString>
<FormattedString.Spans>
<Span
Text="&#xf075; "
FontSize="{StaticResource BaseFontSize}"
ForegroundColor="{StaticResource AccentColor}"
@xinmeng1
xinmeng1 / genymotionwithplay.txt
Created March 16, 2016 12:01 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
@xinmeng1
xinmeng1 / WekaProcessUnknownInfect.java
Last active February 27, 2016 23:57
WEKA tipAdd value to an attribute in instances.For example:you create a instances from a csv. One of the attribute is name "Label" which is nominal type(maybe infect and normal).However the csv file only have normal label data. So when the instance created by the csv, the attribute only contain normal.@Attribute label {normal}.You need to add in…
Instances normalFullData = normalFullLoad.getDataSet();
normalFullData.setClassIndex(normalFullData.numAttributes()-1);
//Add value "infect" to class attribute
AddValues filter = new AddValues();
filter.setLabels("infect");
boolean x = filter.setInputFormat(normalFullData);
normalFullData = Filter.useFilter(normalFullData, filter);
@xinmeng1
xinmeng1 / introrx.md
Created January 12, 2016 22:32 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing