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
| #http://stackoverflow.com/questions/13073281/how-to-mock-pythons-datetime-now-in-a-class-method-for-unit-testing?rq=1 | |
| from mock import patch | |
| from mock import Mock | |
| import unittest | |
| class MyCalc(object): | |
| def add(self,x ,y): | |
| return x+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
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.preference.Preference; | |
| import android.util.AttributeSet; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.LinearLayout; | |
| import com.google.ads.AdRequest; | |
| import com.google.ads.AdSize; |
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
| <appSettings> | |
| <add key="log4net.Internal.Debug" value="true"/> | |
| </appSettings> | |
| <system.diagnostics> | |
| <trace autoflush="true"> | |
| <listeners> | |
| <add | |
| name="textWriterTraceListener" | |
| type="System.Diagnostics.TextWriterTraceListener" | |
| initializeData="C:\log4net.txt" /> |
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.Security.Cryptography; | |
| using System.Text; | |
| namespace Snippets | |
| { | |
| public static class SHA1Util | |
| { | |
| /// <summary> | |
| /// Compute hash for string encoded as UTF8 | |
| /// </summary> |
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 NUnit.Framework; | |
| [TestFixture] | |
| public class SomeTest | |
| { | |
| [SetUp] | |
| public void Setup() | |
| { | |
| } |
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 MyNustache.Properties; | |
| using Nustache.Core; | |
| namespace MyNustache | |
| { | |
| class Name | |
| { |
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> | |
| <head> | |
| <title>2 - Responsive image</title> | |
| <style> | |
| img { | |
| max-width: 100%; | |
| min-width: 500px; | |
| height: auto; | |
| } |
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
| { | |
| "title": "转专讙讜诐 砖驻讜转", | |
| "link": "注讘专讬转", | |
| "footer": { | |
| "disclaimer": "诇讛转专讗讜转" | |
| } | |
| } |