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
#!/usr/bin/env ruby | |
# I have a csv file with some students scores. The data in the file looks like: | |
# Last Name,First Name,EID,Special Codes,Score,Percent | |
# DOE ,JOHN ,JHD123,,92,92 | |
# ... | |
# Total Records Read,352,,,, | |
# I need to add a specific value to the last two columns in each data row. |
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
[Test] | |
public void Should_evaluate_a_Right_function() | |
{ | |
var rightExpression = ExpressionBuilder.Right(); | |
Func<string,int,string> right = Expression.Lambda<Func<string,int,string>>(rightExpression).Compile(); | |
right("Some String", 5).ShouldEqual("tring"); | |
} |
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 Expression Right(string value, int targetLenght) | |
{ | |
var valueConstant = Expression.Constant(value); | |
var targetLenghtConstant = Expression.Constant(targetLenght); | |
var pi = typeof(String).GetProperty("Length"); | |
var mi = typeof(string).GetMethod("Substring", new[] { typeof(int), typeof(int) }); | |
var valueLenght = Expression.Property(valueConstant, pi); | |
var startIndex = Expression.Subtract(valueLenght, targetLenghtConstant); | |
var rightExpression = Expression.Call(valueConstant, mi, startIndex, targetLenght); |
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 string Right(string value, int targetLenght) | |
{ | |
var startIndex = value.Length - targetLenght; | |
return value.Substring(startIndex, targetLenght); | |
} |
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
var contacts = new List<Dto>(); | |
foreach(Employee employee in Employees) | |
{ | |
Dto contact = new Mapper.Map<Employee, Dto>(employee); | |
contacts.Add(contact); | |
} |
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
"Hack Attack! - Finally got the Tab Ordering working per specs , but it's hacky as heck :( There must be a PhD program offered in handling Winform events and tab ordering somewhere... I may need to enroll in it." | |
And now I have to fix it. :( |
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
1. ANALISTA DE GOVERNANÇA DE TI | |
Quantidade: 3 | |
Qualificação Técnico-Profissional | |
Requisitos Obrigatórios: | |
Possuir curso superior completo; | |
Possuir ao menos 10 (dez) anos de experiência em TI; | |
Possuir a certificação ITIL V2 ou V3, nível Foundation; | |
Possuir a certificação COBIT Foundation. | |
2. ARQUITETO SOA |
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
[Environment]::SetEnvironmentVariable("PATH",your_path,"Machine") |
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 class ImageLengthConvention : IPropertyConvention, IPropertyConventionAcceptance | |
{ | |
public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria) | |
{ | |
criteria.Expect(x => x.Property.PropertyType == typeof (byte[])); | |
} | |
public void Apply(IPropertyInstance instance) | |
{ | |
instance.Length(2147483647); |
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 class Foo | |
{ | |
private IContainer _container; | |
public Foo(IContainer container) | |
{ | |
_container = container; | |
} | |
public Bar() | |
{ |