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
[[[NSNotificationCenter defaultCenter] rac_addObserverForName:NSWindowDidResizeNotification object:nil] | |
subscribeNext:^(id x) { | |
NSLog(@"cambio de tamaño de la ventana"); | |
}]; |
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
-module(nydus). | |
-export([test/0]). | |
-export([listener/1]). | |
-compile(debug_info). | |
test()-> | |
listener(3333). | |
listener(Port) -> | |
spawn(fun () -> {ok, Sock} = gen_tcp:listen(Port, [inet,binary,{active, false}]), | |
mainLoop(Sock) end). |
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
this.cadConexion = System.Configuration.ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString; | |
this.currentSession = Fluently | |
.Configure() | |
//.Database(SQLiteConfiguration.Standard.UsingFile("c:\\rfid.sqlite")) | |
.Database(PostgreSQLConfiguration.PostgreSQL82.ConnectionString(this.cadConexion)) | |
//.Database(MsSqlConfiguration.MsSql2005.ConnectionString(this.cadConexion)) | |
// aca podemos usar el provider de nuestra preferencia | |
.Cache(cache => cache.ProviderClass(typeof(NHibernate.Caches.Redis.RedisProvider).AssemblyQualifiedName).UseSecondLevelCache().UseQueryCache()) | |
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<DominioApp>()) |
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
Handlebars.registerHelper('eachBackbone', function (context, options) { | |
var context1 = context.toJSON(); | |
var fn = options.fn, inverse = options.inverse; | |
var i = 0, ret = "", data; | |
var current; | |
if (options.data) { | |
data = Handlebars.createFrame(options.data); | |
} | |
if (context1 && typeof context1 === 'object') { |
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
S.RESTAdapter.map('App.Aplicacion', { | |
nombre: { key: 'Nombre' }, | |
instancias: { key: 'Instancias', embedded: 'always' }, | |
uid: { key: 'UId' } | |
}); | |
DS.RESTAdapter.map('App.Instancia', { | |
primaryKey:"id", | |
id_ubicacion: { key: 'IdUbicacion' }, | |
base_de_datos: { key: 'BasesDeDatos', embedded: 'always' } |
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 static void LoadAssembliesWithNancyReferences() | |
{ | |
if (nancyReferencingAssembliesLoaded) | |
{ | |
return; | |
} | |
UpdateAssemblies(); | |
foreach (var directory in GetAssemblyDirectories()) |
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
grammar DSL; | |
/* | |
si datos.mensaje contiene "hidrostatica" o "pnd" o "corrosivas" | |
entonces devuelve "formato pruebas 01" | |
sino devuelve "no encontrado" | |
*/ | |
tokens { | |
SI='si'; | |
SINO='sino'; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using NHibernate; | |
using FluentNHibernate.Cfg; | |
using FluentNHibernate.Cfg.Db; | |
using FluentNHibernate.Automapping; | |
using NHibernate.Cfg; | |
using NHibernate.Tool.hbm2ddl; |
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
private void InvokeNancy(NancyRequestParameters parameters, ResponseCallBack responseCallBack, Action<Exception> errorCallback) | |
{ | |
try | |
{ | |
parameters.Body.Seek(0, SeekOrigin.Begin); | |
var request = new Request(parameters.Method, parameters.Url, parameters.Body, parameters.Headers); | |
// Execute the nancy async request handler | |
this.engine.HandleRequest( |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Nancy; | |
using System.IO; | |
namespace Nancy | |
{ | |
public class AttachmentFileResponse : Response | |
{ |