This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Original Sample: http://craftycodeblog.com/2010/05/15/asp-net-mvc-render-partial-view-to-string/ | |
| */ | |
| public class HomeController : Controller | |
| { | |
| public ActionResult Index() | |
| { | |
| string MyModelData = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.myapp.widgets; | |
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.util.AttributeSet; | |
| import android.view.View; | |
| import android.view.animation.Animation; | |
| import android.view.animation.Transformation; | |
| import android.widget.LinearLayout; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Original version by Stephen Toub and Shawn Farkas. | |
| * Random pool and thread safety added by Markus Olsson (freakcode.com). | |
| * | |
| * Original source: http://msdn.microsoft.com/en-us/magazine/cc163367.aspx | |
| * | |
| * Some benchmarks (2009-03-18): | |
| * | |
| * Results produced by calling Next() 1 000 000 times on my machine (dual core 3Ghz) | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| :: normalize folder | |
| SET folder=%~1 | |
| IF %folder:~-1%==\ SET folder=%folder:~0,-1% | |
| :: random number from 8000 to 9999 | |
| SET /a port=(%random%)*1999/32767+8000 | |
| :: start the web server for the random port starting at the passed-in directory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| namespace dotnet_aes | |
| { | |
| public class OpenSslAes | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <title></title> | |
| </head> | |
| <body> | |
| <script data-main="main-with-amd" src="requirejs-1.0.4.min.js"></script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (C) 2010 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace Unplugged | |
| { | |
| public abstract class ListPickerViewModel<TItem> : UIPickerViewModel | |
| { | |
| public TItem SelectedItem { get; private set; } | |
| IList<TItem> _items; | |
| public IList<TItem> Items | |
| { | |
| get { return _items; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <NotepadPlus> | |
| <UserLang name="SLN" ext="sln" udlVersion="2.1"> | |
| <Settings> | |
| <Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> | |
| <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> | |
| </Settings> | |
| <KeywordLists> | |
| <Keywords name="Comments">03 04 00# 01 02</Keywords> | |
| <Keywords name="Numbers, prefix1"></Keywords> | |
| <Keywords name="Numbers, prefix2"></Keywords> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // remove audio + video + stop all the downloadin’ | |
| // assumes $video and $audio are jQuery selectors for <video> and <audio> tags. | |
| var removeMedia = function () { | |
| _.each([$video, $audio], function ($media) { | |
| if (!$media.length) return; | |
| $media[0].pause(); | |
| $media[0].src = ''; | |
| $media.children('source').prop('src', ''); | |
| $media.remove().length = 0; | |
| }); |
OlderNewer