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
Marcador: Significado | |
TODO: Elementos ainda não implementados | |
FIXME: Código que sabidamente apresenta problemas | |
HACK: Solução admitante deselegante para um problema | |
XXX: Perigo! Há um grande problema aqui |
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
(string)StringObjectIdGenerator.Instance.GenerateId(null, null) |
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 BaseController : Controller | |
{ | |
protected override void Initialize(RequestContext requestContext) | |
{ | |
base.Initialize(requestContext); | |
ViewBag.Title = "SpedStock"; | |
ViewBag.Footer = "<p class='pull-right'>Designed by <a href='http://arcnet.com.br/' target='_BLANK'>ARCNET</a></p>" + | |
"<p>SPEDSTOCK® " + DateTime.Now.Year + ". Todos os direitos Reservados.</p>"; | |
} |
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 FileContentResult MostraImagem(string id) | |
{ | |
var imagem = FileService.BuscarPorId(id).OpenRead(); | |
byte[] imagemEmBytes = new byte[imagem.Length]; | |
using (BinaryReader leitor = new BinaryReader(imagem)) | |
{ | |
imagemEmBytes = leitor.ReadBytes((int)imagem.Length); | |
} |
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
Repository.Update(Query<Ecf>.EQ(x => x.Id, id),Update<Ecf>.Push(x => x.Totalizadores, totalizador)); | |
Repository.UpdateById(id, Update<Ecf>.Push(x => x.Totalizadores, totalizador)); |
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 DecimalModelBinder : IModelBinder | |
{ | |
public object BindModel(ControllerContext controllerContext, | |
ModelBindingContext bindingContext) | |
{ | |
ValueProviderResult valueResult = bindingContext.ValueProvider | |
.GetValue(bindingContext.ModelName); | |
ModelState modelState = new ModelState { Value = valueResult }; | |
object actualValue = null; | |
try |
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 controller = angular.element('[ng-controller="CatController"]').scope(); | |
controller.CarregaEcfs(); |
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
int newHeight = 110; | |
int newWidth = 110; | |
//REDIMENCIONA A IMAGEM PARA 110X110 EM PNG | |
if (!string.IsNullOrEmpty(avatarIdAntigo)) _fileService.ExcluirPorId(avatarIdAntigo); | |
Image streamToImage = Image.FromStream(imagem.InputStream); | |
Bitmap newImageResized = new Bitmap(newWidth, newHeight); | |
using (Graphics gr = Graphics.FromImage(newImageResized)) | |
{ | |
gr.SmoothingMode = SmoothingMode.HighQuality; |
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
@-moz-document url-prefix() { | |
.selector { | |
color:lime; | |
} | |
} |
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
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs |