Skip to content

Instantly share code, notes, and snippets.

@allanruin
allanruin / gist:db55fbedc671b3efff593349513f5085
Created August 15, 2017 06:38 — forked from hansmaad/gist:9187633
WPF Flat Combo Box Style
<!-- Flat ComboBox -->
<SolidColorBrush x:Key="ComboBoxNormalBorderBrush" Color="#e3e9ef" />
<SolidColorBrush x:Key="ComboBoxNormalBackgroundBrush" Color="#fff" />
<SolidColorBrush x:Key="ComboBoxDisabledForegroundBrush" Color="#888" />
<SolidColorBrush x:Key="ComboBoxDisabledBackgroundBrush" Color="#eee" />
<SolidColorBrush x:Key="ComboBoxDisabledBorderBrush" Color="#888" />
<ControlTemplate TargetType="ToggleButton" x:Key="ComboBoxToggleButtonTemplate">
<Grid>
<Grid.ColumnDefinitions>
# -- coding: UTF-8
"""
2016年2月15日
读取liblinear的输出文件,形成kaggle格式的提交方案
liblinear 在指明输出概率时,格式类似这样:
head liresult.txt
labels 0 1
0 0.506272 0.493728
/*
可以看到,相当于传递了一个外界环境的引用给内部函数,
故内部函数对外界的改变是可以影响外界的。
*/
var gvalue = 1;
function myfunc1(){
gvalue += 1;
}
package me.irix.service;
import java.util.List;
import me.irix.dao.BaseDAO;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager;
package me.irix.dao;
import java.lang.reflect.*;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager;
import org.hibernate.LockOptions;
package main
import (
"fmt"
"reflect"
)
type Person struct {
Name string
Age int
@allanruin
allanruin / tryIsValid
Last active August 29, 2015 13:56
测试IsValid函数对于未初始化的结构体域是否返回false
package main
import (
"fmt"
"reflect"
)
type Person struct {
Name string
Age int