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 HackerRankChallenge | |
| { | |
| [TestFixture] | |
| public class CalculateLargestSliceTests | |
| { | |
| [Test] | |
| public void empty() | |
| { | |
| Assert.AreEqual(0, CalculateLargestSlice(new int[0])); | |
| } |
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.ComponentModel; | |
| using System.Runtime.CompilerServices; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| namespace WPF | |
| { | |
| public abstract class ViewModelBase : INotifyPropertyChanged | |
| { |
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 Microsoft.Practices.Unity; | |
| using NUnit.Framework; | |
| namespace UnityDemo | |
| { | |
| [TestFixture] | |
| public sealed class ChildContainers | |
| { | |
| [Test] |
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
| ::Ensure choco up-to date | |
| choco upgrade chocolatey -y | |
| ::Graphics | |
| choco install paint.net -y | |
| ::System maintainance | |
| choco install windirstat -y |
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
| public static int average(int argb1, int argb2){ | |
| return (((argb1 & 0xFF) + (argb2 & 0xFF)) >> 1) | //b | |
| (((argb1 >> 8 & 0xFF) + (argb2 >> 8 & 0xFF)) >> 1) << 8 | //g | |
| (((argb1 >> 16 & 0xFF) + (argb2 >> 16 & 0xFF)) >> 1) << 16 | //r | |
| (((argb1 >> 24 & 0xFF) + (argb2 >> 24 & 0xFF)) >> 1) << 24; //a | |
| } | |
| overflow issues: | |
| public static int average2(int argb1, int argb2){ |
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
| plugins { | |
| id "com.jfrog.bintray" version "1.7" | |
| } | |
| apply plugin: 'com.android.library' | |
| apply plugin: 'maven' | |
| apply plugin: 'maven-publish' | |
| publishing { |
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; | |
| public class Test | |
| { | |
| public static void Main() | |
| { | |
| new MyClass{1, "a", {2, "b"}}; //calls Add(1), Add("a"), Add(2, "a") | |
| } | |
| } |
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
| #include <LiquidCrystal.h> | |
| LiquidCrystal lcd(7, 6, 5, 4, 3, 2); | |
| void setup() { | |
| Serial.begin(9600); | |
| lcd.begin(16, 2); | |
| setProgram(); | |
| compile(); | |
| lcd.setCursor(0,1); |
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
| import android.animation.TimeInterpolator; | |
| import android.view.animation.LinearInterpolator; | |
| /** | |
| * Maps time into another interpolator so that the animation plays, and then reverses. | |
| * i.e. time maps like so: | |
| * [0..0.5, 0.5..1] maps to [0..1, 1..0] | |
| */ | |
| public final class AutoReverseInterpolator implements TimeInterpolator { |
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.vmn.android.me.mappings; | |
| import com.google.common.base.Objects; | |
| import java.util.ArrayList; | |
| import java.util.Iterator; | |
| public final class Filter<T> implements Iterable<T> { | |
| private final Iterable<T> original; |