Skip to content

Instantly share code, notes, and snippets.

View BrunoCaimar's full-sized avatar

Bruno Caimar BrunoCaimar

View GitHub Profile
@BrunoCaimar
BrunoCaimar / BatchReconcile.py
Created April 13, 2012 20:14
Batch Reconcile
#http://resourcesbeta.arcgis.com/en/help/main/10.1/index.html#/Reconcile_Versions/00170000015p000000/
# Name: ReconcileVersions.py
# Description: reconciles all versions owned by a user with SDE.Default
# Import system modules
import arcpy, os
from arcpy import env
# set workspace
@BrunoCaimar
BrunoCaimar / gist:2783727
Created May 24, 2012 19:32
Transição Agile
Celso, as primeiras práticas que uso em qualquer transição inicial são:
1. Quadro físico: http://blog.flowkaizen.com/why-physical-card-walls-are-important
2. Sistema Puxado: http://blog.aspercom.com.br/2011/12/11/sistema-puxado/
3. Reuniões Diárias
4. Métricas (CFD, Leadtime, Throughput) / Conhecimento sobre variabilidade
5. Retrospectivas
6. Liderança
Yoshima on scrum-brasil list
@BrunoCaimar
BrunoCaimar / gist:2868637
Created June 4, 2012 14:10
Esri.Android.GetExtent
Envelope env = new Envelope();
map.getExtent().queryEnvelope(env);
double xMax = env.getXMax();
double xMin = env.getXMin();
double yMax = env.getYMax();
double yMin = env.getYMin();
String msg = "xMax:" + xMax + " xMin:" + xMin + " yMax:"
@BrunoCaimar
BrunoCaimar / l10n.cmd
Created July 13, 2012 13:38
l10n with gettext on mono
msgfmt pt_BR.po -o "..\bin\x86\Debug\locale\pt_br\LC_MESSAGES\DojoTimer.mo"
@BrunoCaimar
BrunoCaimar / gist:3858913
Created October 9, 2012 13:46
ORA-01461: é possível ligar um valor LONG apenas para inserção em uma coluna LONG
ORA-01461: é possível ligar um valor LONG apenas para inserção em uma coluna LONG
Esse erro tem ligação com problema de tamanho do campo BLOB
Possível solução/workaround:
(geomParam as OracleParameter).OracleDbType = OracleDbType.Blob;
SELECT sr.auth_srid, sr.srtext, l.table_name, l.*, sr.*
FROM sde.layers l JOIN sde.spatial_references sr ON l.srid = sr.srid
WHERE l.owner = 'PEGASUS'
@BrunoCaimar
BrunoCaimar / gist:3865996
Created October 10, 2012 14:31
Log_ConnectionString
+ var log = Container.Resolve<ILogger>();
+ if (log != null)
+ {
+ var cn = Connection.ConnectionString;
+ var re = new Regex("(Password=)([^;]+)", RegexOptions.IgnoreCase);
+ log.Trace(string.Format("CN: {0}", re.Replace(cn, "$1********;")));
+ }
@BrunoCaimar
BrunoCaimar / Debug.boo
Created October 24, 2012 13:27
Debug Values send to Boo
for r in row:
print r.Key + ":" + r.Value
print "something in the way..."
/// <summary>
///
/// </summary>
/// <param name="input">Input date</param>
/// <param name="inputFormat">Input Format:
/// dd - Day format 00
/// MM - Month format 00
/// yyyy - Year format 0000
/// HH - Hour format 00 (24 hours)
/// mm - Minutes format 00
@BrunoCaimar
BrunoCaimar / Versioning.txt
Created October 29, 2012 19:48
Versioning - .NET
How does the versioning work?
The first thing that I tried was to understand exactly how this magic number works in .NET.
If you go to the online MSDN article, you will find out that the version number of an assembly is composed by 4 numbers, and each one has a specific mean
1. Major = manually incremented for major releases, such as adding many new features to the solution.
0. Minor = manually incremented for minor releases, such as introducing small changes to existing features.
0. Build = typically incremented automatically as part of every build performed on the Build Server. This allows each build to be tracked and tested.
0 Revision = incremented for QFEs (a.k.a. “hotfixes” or patches) to builds released into the Production environment (PROD). This is set to zero for the initial release of any major/minor version of the solution.