I hereby claim:
- I am samandmoore on github.
- I am samandmoore (https://keybase.io/samandmoore) on keybase.
- I have a public key ASDPb_dntgaot_-UkwH9ffIECYnlcW-Njurs5AjRvYebzgo
To claim this, I am signing this object:
| const something = ""; |
| #!/bin/bash | |
| set -e | |
| PROJECT_DIR="${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}" | |
| # Workaround old docker images with incorrect $HOME | |
| # check https://github.com/docker/docker/issues/2968 for details | |
| if [ "${HOME}" = "/" ] | |
| then |
| $ rails c | |
| Loading development environment (Rails 4.2.7.1) | |
| irb(main):001:0> include ActionView::Helpers::OutputSafetyHelper | |
| => Object | |
| irb(main):002:0> raw "foo" | |
| => "foo" | |
| irb(main):003:0> thing = raw "foo" | |
| => "foo" | |
| irb(main):004:0> thing.class | |
| => ActiveSupport::SafeBuffer |
I hereby claim:
To claim this, I am signing this object:
| var PortfolioRoute = BaseRoute.extend({ | |
| prepare: function() { | |
| this.promise = …; | |
| return this.promise; | |
| }, | |
| render: function() { … }, | |
| error: function() { … } | |
| }); |
| // problem | |
| Map<String, List<String>> map = new HashMap<String, List<String>>(); | |
| // -------------------------------------------------- | |
| // Java solution | |
| public static <K, V> HashMap<K, V> newHashMap() { | |
| return new HashMap<K, V>(); | |
| } |
| <table id="posts"> | |
| <thead> | |
| <tr> | |
| <th>ID</th> | |
| <th>Title</th> | |
| <th>Date Created</th> | |
| <th>Published</th> | |
| </tr> | |
| </thead> | |
| <tbody> |
| [Fact] | |
| public void UrlWithinQuotes() | |
| { | |
| //arrange | |
| var message = "This is a sentence with quotes and a url ... see \"http://foo.com\""; | |
| HashSet<string> extractedUrls; | |
| //act | |
| var result = TextTransform.TransformAndExtractUrls(message, out extractedUrls); |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Linq.Expressions; | |
| namespace ConsoleApplication1 | |
| { | |
| class Program | |
| { |
| public static DefaultSort GetDefaultSort<TModel, TProperty>(Expression<Func<TModel, TProperty>> expression, SortDirection direction) | |
| { | |
| return new DefaultSort(EvaluateExpression(expression), direction); | |
| } | |
| private static string EvaluateExpression(LambdaExpression expression) | |
| { | |
| var memberExpression = expression.Body as MemberExpression; | |
| return memberExpression == null ? null : memberExpression.Member.Name; | |
| } |