Skip to content

Instantly share code, notes, and snippets.

using Xamarin.Forms;
namespace ImagesDemo
{
public partial class ImagesDemoPage : ContentPage
{
public ImagesDemoPage()
{
InitializeComponent();
btn.Image = (FileImageSource) ImageSource.FromFile("clock.png");
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:ImagesDemo"
x:Class="ImagesDemo.ImagesDemoPage"
>
<Button Image="clock.png" />
</ContentPage>
module.exports = function () {
this.Given("the ATM has $cash", function (cash, done) {
this.ATM().cashAvailable(Number(cash), done);
});
this.When("the user asks the ATM for $cash", function (cash, done) {
this.ATM().requestCash(Number(cash), done);
});
this.Then("the user's account will have $cash",
<div id="pagecontent" class="pagecontent"
itemscope="" itemtype="http://schema.org/Movie">
<span itemprop="director"
itemscope="" itemtype="http://schema.org/Person">
<a href="/name/nm0001104/" itemprop="url">
<span class="itemprop" itemprop="name">
Frank Darabont
</span>
</a>
</span>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Movie",
"name": "The Shawshank Redemption",
"director": {
"@type": "Person",
"name": "Frank Darabont",
"sameAs": "http://www.imdb.com/name/nm0001104/"
}
@hustKiwi
hustKiwi / dabblet.css
Created May 11, 2017 10:00 — forked from anonymous/dabblet.css
Untitled
.nav { display: flex; font-family: Helvetica; }
h2 {
color: white; width: 130px; box-sizing: border-box;
position: absolute; margin: 0; font-size: 22px;
}
a {
position: relative; width: 240px; height: 240px;
text-decoration: none; background-size: 240px !important;
}
.current {
{
"scoreOfSatisfied": 7.48, // 根据第8题算得,10分满分,平均满意度得分7.48分
"maleScoreOfSatisfied": 7.15, // 男性用户平均满意度得分
"femaleScoreOfSatisfied": 7.83, // 女性用户平均满意度得分
"rankingDistribution": { // @Flora, 满意度 / 不满意度分布相关数据
"fs-location": [ // fs前缀的数据代表满意度因子相关的数据,fs是factors of satisfaction的缩写。fd是不满意因子的缩写。后同。
6, // 选not important的人数
21, // 选somewhat important的人数
42, // 选important的人数
31 // 选very important,后同,再次注意,fs前缀的是满意度,fd前缀的是不满意度
@hustKiwi
hustKiwi / draftToHTML.js
Created August 9, 2016 12:25 — forked from davisml/draftToHTML.js
DraftJS block data to HTML
// AttributedString class from https://github.com/cohitre/attributedString.js
// Modifications made to support html tags & remove span wrapper from unstyled blocks
var AttributedString = (function () {
var aString
, StringRange
, RangesList
, HtmlSerializer
, plainStringSerializer
, _ = {}
, entityMap = {

前端试题

扩展 reduce

设计一个对数组的特殊 reduce 函数。它的参数表:

  • 数组
  • 回调函数
  • 初始值
@hustKiwi
hustKiwi / ffmpeg.md
Last active August 29, 2015 14:14 — forked from v5tech/ffmpeg.md

使用ffmpeg合并MP4文件

ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"