This file contains 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 uint Stein(uint value1, uint value2) | |
{ | |
if (value1 == 0) return value2; | |
if (value2 == 0) return value1; | |
if (value1 == value2) return value1; | |
bool value1IsEven = (value1 & 1u) == 0; | |
bool value2IsEven = (value2 & 1u) == 0; | |
if (value1IsEven && value2IsEven) |
This file contains 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
Recentemente enfrentei problemas em um aplicativo Android que desenvolvi, o qual se comunica com o banco de dados de um dos sistemas da empresa, codificado em ISO-8859-1 (Firebird) através de um web service. | |
Os dados eram gravados de forma errada, muitas vezes truncavam e as vezes apareciam caracteres estranhos. | |
Depois de algumas tentativas, cheguei até a seguinte solução: |
This file contains 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
# -*- coding: utf-8 -*- | |
from datetime import datetime | |
import sublime_plugin | |
class TimestampCommand(sublime_plugin.EventListener): | |
"""Expand `isoD`, `now`, `datetime`, `utcnow`, `utcdatetime`, | |
`date` and `time` | |
""" |
This file contains 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
Nuget command line – uninstall package from all projects | |
> Get-Project -All | Uninstall-Package <package name> |
This file contains 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
// testar cores em javascript | |
function shuffle(array) { | |
var currentIndex = array.length, temporaryValue, randomIndex; | |
// While there remain elements to shuffle... | |
while (0 !== currentIndex) { | |
// Pick a remaining element... | |
randomIndex = Math.floor(Math.random() * currentIndex); | |
currentIndex -= 1; |
This file contains 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
## Ignore Visual Studio temporary files, build results, and | |
## files generated by popular Visual Studio add-ons. | |
## | |
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore | |
# User-specific files | |
*.rsuser | |
*.suo | |
*.user | |
*.userosscache |
This file contains 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
#tool nuget:?package=NUnit.ConsoleRunner&version=3.4.0 | |
//#addin nuget:?package=Cake.ClickTwice | |
#addin nuget:?package=Cake.Powershell&version=0.4.7 | |
#r "C:\Users\lukia\source\repos\Cake\ClickTwice\src\Cake.ClickTwice\bin\Debug\Cake.ClickTwice.dll" | |
#r "C:\Users\lukia\source\repos\Cake\ClickTwice\src\Cake.ClickTwice\bin\Debug\ClickTwice.Handlers.AppDetailsPage.dll" | |
////////////////////////////////////////////////////////////////////// | |
// ARGUMENTS | |
////////////////////////////////////////////////////////////////////// |
This file contains 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
# SetAssemblyInfoVersion.ps1 | |
# | |
# Set the version in all the AssemblyInfo.cs or AssemblyInfo.vb files in any subdirectory. | |
# | |
# usage: | |
# from cmd.exe: | |
# powershell.exe .\SetAssemblyInfoVersion.ps1 2.8.3.0 | |
# | |
# from powershell.exe prompt: | |
# .\SetAssemblyInfoVersion.ps1 2.8.3.0 |
This file contains 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
/// <binding AfterBuild='default' Clean='clean' /> | |
/* | |
This file is the main entry point for defining Gulp tasks and using Gulp plugins. | |
Click here to learn more. http://go.microsoft.com/fwlink/?LinkId=518007 | |
*/ | |
var gulp = require('gulp'); | |
var del = require('del'); | |
var plumber = require('gulp-plumber'); | |
var concat = require('gulp-concat'); |
OlderNewer