Skip to content

Instantly share code, notes, and snippets.

View jmoren's full-sized avatar

Jorge jmoren

  • Buenos Aires - Argentina
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jmoren on github.
  • I am jmoren (https://keybase.io/jmoren) on keybase.
  • I have a public key ASBeg_3v-1rqp6huxQb55-JFdZrBYmFOq6uQ7fqytprnMAo

To claim this, I am signing this object:

@jmoren
jmoren / final.cpp
Last active February 16, 2016 23:49
while(!feof(f1)){
Enemigo e;
fscanf(f1, "%i, %i, %f, %i", &e.posx, &e.posy, &e.fuerza, &e.radio );
if(feof(f1)){ break;}
enemigos.push_back(e);
}
while(!feof(f2)){
Personaje p;
p.ciclos = 0;
@jmoren
jmoren / Data.h
Created November 24, 2015 04:06
Data para mensajes
#ifndef _DATA_H
#define _DATA_H
#include <string>
#include <iostream>
#include <vector>
#define MAX_DATA_SIZE 255
enum MSG_TYPE {
@jmoren
jmoren / window.cpp
Created November 24, 2015 04:04
Client read thread
DWORD WINAPI clientReadThreadHandler(LPVOID argument){
Client *client = (Client*)argument;
GameUpdate message;
int result; int total; int size;
char bufferSize[sizeof(int)] = { 0 };
char bufferE[sizeof(ElementStatus)] = { 0 };
char bufferP[sizeof(PlayerStatus)] = { 0 };
char bufferEn[sizeof(EntityStatus)] = { 0 };
formatter.ini
NEW_LINE_FOR_BRACKET=0
SPACES_BEFORE_OPEN_BRACKET=5
SPACING=10
Mismo programa
Resultado:
program
formatter.ini
NEW_LINE_FOR_BRACKET=0
SPACES_BEFORE_OPEN_BRACKET=0
SPACING=6
Progam:
program{
a := True;
@jmoren
jmoren / gist:fc9fb880855f78a21324
Created October 8, 2014 19:13
Esta funcion es la que lee el archivo de configuracion
...
function checkConfig {
echo -e " * Chequeanado archivos de configuracion..."
if [ ! -f $CONFIGFILE ]; then
echo -e "\t> `basename $CONFIGFILE`\t \033[0;31mNO\033[m"
echo -e " * Debe ejecutar el script de instalacion para reparar la instalacion\n"
exit -1
else
echo -e "\t> `basename $CONFIGFILE`\t \033[0;32mSI\033[m"
echo " "
private function dispoBarHandler(evt:MenuEvent):void {
send_cmd_to_server('disconnect','unused');
Application.application.app.contactViewTab.kvDataGrid.editedItemPosition = null;
Application.application.app.contactViewTab.dispoBar.enabled = false;
Application.application.app.contactViewTab.btnAddNote.enabled = false;
Application.application.app.contactViewTab.kvDataGrid.editable = false;
switch(evt.item.selection) {
case 'markAsGoal':
var _log:Log = new Log;
_log.user = _user;
def stats
@ivr = Smrt::Ivr.find(params[:id])
@stats = @ivr.action_flows
@rules_by_containers = Smrt::IvrActionFlow.execute_query('SELECT container_name, name, SUM(case when rule_type = "invalid" then 1 else 0 end) AS invalid_rule, SUM(case when rule_type = "match" then 1 else 0 end) AS match_rule FROM ivr_dev.ivr_action_flows WHERE ivr_id = 2008 GROUP BY name;')
end
ActiveAdmin.setup do |config|
# Don't enfoce mass assignment rules on the admin panel
config.before_filter do
params.permit!
end
# == Site Title
#
# Set the title that is displayed on the main layout
# for each of the active admin pages.