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
//Referencia: http://resources.arcgis.com/en/help/rest/apiref/query.html | |
{ | |
output.statistics: [ | |
{ | |
"statisticType": "count", | |
"onStatisticField": "zona", | |
"outStatisticFieldName": "cantidad" | |
} | |
], |
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
//API.JS | |
const sql = require('mssql'); | |
const fs = require('fs'); | |
var pool; | |
var config = { | |
server: "serverip\\instance", | |
database: "mydatabase", | |
user: "myuser", |
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
//server.js | |
const sql = require('mssql'); | |
var sqlQuery = function(config,query){ | |
var res = {complete: '',results: ''}; | |
var promise = new Promise((resolve,reject)=>{ | |
var pool = new sql.connect(config, err=>{ | |
var request = new sql.Request(pool); |
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
//Ex: We have this var in a state in react. | |
var obj = { | |
obs: "hello", | |
id: 1 | |
} | |
... | |
//To modify "obs" we do: | |
this.setState({ |
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
const path = require('path'); | |
const webpack = require('webpack'); | |
var ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
const reactToolboxVariables = { | |
'color-text': '#444548', | |
/* Note that you can use global colors and variables */ | |
'color-primary': 'rgb(218,41,28);', | |
'button-height': '30px', | |
}; |
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
Source: http://stackoverflow.com/questions/39426819/selecting-a-row-in-react-griddle-and-changing-tr-background-color | |
First: | |
class ComponentWithGriddle extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
selectedRowId: 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> | |
<title>Layer List Dijit</title> | |
<link rel="stylesheet" href="https://js.arcgis.com/3.17/dijit/themes/claro/claro.css"> | |
<link rel="stylesheet" href="https://js.arcgis.com/3.17/esri/css/esri.css"> |
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
Thanks to : JasonM23 | |
<h1>CSS Selector based on attribute</h1> | |
<p data-title="anything2">I'm suddenly something!</p> | |
[data-title='anything2'] { | |
//css here | |
} |
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
git init: inicia el repositorio local en carpeta seleccionada. | |
git status: visualiza la lista de archivos que están disponibles y su estado (stage o no stage) | |
git add --all : coloca en stage todos los archivos | |
git commit -am "message" : una vez hecho un add a un archivo, hace commit con un mensaje para guardar los cambios. | |
git push <mygit> <master> : hace un push a un repositorio (remoto o local). | |
git pull <mygit> <master> : hace un pull (merge) a un repositorio (remoto o local) trayendo los cambios. | |
git stage: te devuelve al ultimo commit realizado. | |
git stage clear: borra todos los stages hechos. | |
Comandos para servidor remoto: |
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
Add the following files: | |
<script src="static/js/vendor/jspdf/jspdf.min.js"></script> | |
<script src="static/js/vendor/jspdf/jspdf.plugin.autotable.js"></script> | |
then make a fx with or w/o parameters, this one works like that just by example: | |
function exportToPDF(){ | |
var columns = ["ID", "Name", "Country"]; | |
var rows = [ | |
[1, "Shaw", "Tanzania"], |
NewerOlder