Skip to content

Instantly share code, notes, and snippets.

View 0xae's full-sized avatar
🏠
Working from home

ayrton 0xae

🏠
Working from home
View GitHub Profile
#ifdef ___cplusplus__
extern "C" {
#endif
/* Description of GNU message catalog format: string hashing function.
Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
[
{
"tg": "input",
"attrs": {
"type" : "text",
"placeholder" : "Your name",
"name" : "user-name",
"class" : "form-control"
}
},

Keybase proof

I hereby claim:

  • I am 0xae on github.
  • I am manofsteel (https://keybase.io/manofsteel) on keybase.
  • I have a public key whose fingerprint is 92E4 6420 AE0B 9A21 E019 EF83 C22F A29B F1D3 1F0B

To claim this, I am signing this object:

app.controller("AlojamentoCtrl", function ($q, $scope, $localForage, $stateParams){
$scope.alojamentos = [];
var id = $stateParams.idEdificio;
$scope.edificio = id;
$localForage.keys().then(
function (chaves){
var prefixo = "RGA::alojamento::" + id + ".";
var ary = [];
for (var i = 0; i < chaves.length; i++) {
// Reset Alojamentos
$localForage.keys().then(function(keys){
keys.forEach(function(k){
if (k.indexOf("RGA::agregado::") != -1 || k.indexOf("RGA::alojamento::") != -1)
$localForage.removeItem(k)
})
})
// Reset Samples
<span class="item-note">
<!-- {{sample.values[5]}} -->
<button class="button button-clear" ng-class="sample.sync ? 'button-balanced' : 'button-assertive'" style="min-height:21px;" ng-click="syncData(e);">
<i class="icon ion-paper-airplane"></i>
</button>
</span>
$scope.save = function (data){
_prepareSectionToSave(data);
var i = data.attr.agregados || 0;
var agregados = parseInt(data.attr.elements[6].attr.value);
$localForage.getItem("51::fields").then(
function (agregadoQuest){
var conf = agregadoQuest[0];
for(; i<agregados; i++){
var agregadoQuestChave = "RGA::agregado::" + edificio + "." + alojamento + "." + (i+1);
MapAttrsToGroups : function (section) {
var defer = $q.defer();
var merged = [];
var cache_groups = {};
var elements = section.attr.elements;
for (var i = 0; i < elements.length; i++) {
var field = elements[i];
if (!field.attr.group.id) {
merged.push(field);
var edificio = $stateParams.idEdificio;
var alojamento = $stateParams.idAlojamento;
var agregado = $stateParams.idAgregado;
var chave = "RGA::agregado::" + edificio + "." + alojamento + "." + agregado;
$localForage.getItem(chave).then(
function (data){
$scope.data = data;
}
);
POST http://inqueritos.ine.cv/survey/object/Q4
{
"errorType":"error",
"errors":[
"Data é invalida 16/12/14 para o campo Data Inicio Ciclo.",
"Data é invalida 29/12/14 para o campo Data Fim Ciclo."
],
"id":0
}