domingo, 3 de julio de 2016

menues

http://cssmenumaker.com/

posgresql administracion

https://darkchicles.wordpress.com/2009/04/15/cambiar-la-codificacin-de-caracteres-en-postgres/
http://www.postgresql.org.ar/trac/wiki/PreguntasFrecuentes
http://www.postgresql.org.ar/trac/wiki/PgAdmin#HerramientadeRestauración

flushdns, no se puede acceder a webs

http://ilmaistro.com/como-limpiar-dns/
http://www.paneldecliente.com/knowledgebase/5/Que-es-y-como-hacer-un-ipconfig-orflushdns.html
http://www.paneldecliente.com/knowledgebase/307/Como-evitar-dns-usando-archivo-hosts-de-windows.html

https://productforums.google.com/forum/#!topic/chrome-es/11VdI_NxAck

base de datos

CREATE TABLE persona
(
  per_ide serial NOT NULL,
  per_pat character varying(200) NOT NULL, -- apellido paterno
  per_mat character varying(200) NOT NULL, -- apellido materno
  per_nom character varying(200) NOT NULL, -- nombre
  fec_nac date NOT NULL DEFAULT ('now'::text)::date, -- nacionalidad
  pai_ide integer NOT NULL, -- ide del país (FK)
  per_com character varying(200) DEFAULT ''::character varying, -- nombre completo
  per_sex character varying(1) NOT NULL DEFAULT ''::character varying,
  per_doc character varying(20) DEFAULT ''::character varying,
  per_ema character varying(250) DEFAULT ''::character varying,
  tip_doc integer DEFAULT 1,
  per_dir character varying(300) DEFAULT ''::character varying,
  cod_mun integer,
  CONSTRAINT persona_pkey PRIMARY KEY (per_ide),
  CONSTRAINT persona_pai_ide_fkey FOREIGN KEY (pai_ide)
      REFERENCES sogem.pais (pai_ide) MATCH SIMPLE
      ON UPDATE RESTRICT ON DELETE RESTRICT,
  CONSTRAINT persona_per_ide_key UNIQUE (per_ide)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE sogem.persona
  OWNER TO postgres;
COMMENT ON COLUMN sogem.persona.per_pat IS 'apellido paterno';
COMMENT ON COLUMN sogem.persona.per_mat IS 'apellido materno';
COMMENT ON COLUMN sogem.persona.per_nom IS 'nombre ';
COMMENT ON COLUMN sogem.persona.fec_nac IS 'nacionalidad';
COMMENT ON COLUMN sogem.persona.pai_ide IS 'ide del país (FK)';
COMMENT ON COLUMN sogem.persona.per_com IS 'nombre completo';


-- Index: sogem."IX_Relationship78_persona"

-- DROP INDEX sogem."IX_Relationship78_persona";

CREATE INDEX "IX_Relationship78_persona"
  ON sogem.persona
  USING btree
  (pai_ide);

-- Index: sogem.idx_personas_repetidas

-- DROP INDEX sogem.idx_personas_repetidas;

CREATE UNIQUE INDEX idx_personas_repetidas
  ON sogem.persona
  USING btree
  (per_doc COLLATE pg_catalog."default")
  WHERE length(per_doc::text) = 8;


-- Trigger: tr_persona on sogem.persona

-- DROP TRIGGER tr_persona ON sogem.persona;

CREATE TRIGGER tr_persona
  BEFORE INSERT OR UPDATE
  ON sogem.persona
  FOR EACH ROW
  EXECUTE PROCEDURE sogem.fn_tr_persona();

Solucion Algunas paginas no cargan w8, w8.1, w10 solución

Fuente
https://www.youtube.com/watch?v=edV1LgONoq4

viernes, 1 de julio de 2016

Algoritmo de Grafos


Grafo bipartito, coloracion
http://www.codeforces.com/contest/688/submission/18813583
http://www.codeforces.com/contest/688/submission/18801130
http://www.codeforces.com/contest/687/submission/18786960 tourist interesante como codifica las aristas
http://www.codeforces.com/contest/687/submission/18787163
http://www.codeforces.com/contest/687/submission/18830052
http://www.codeforces.com/contest/688/submission/18796883 me fije en el break;

recursos
http://www.geeksforgeeks.org/bipartite-graph/
http://stackoverflow.com/questions/30486784/how-to-find-if-a-graph-is-bipartite
http://codeforces.com/blog/entry/45770
https://jariasf.wordpress.com/
Componentes Conexas
https://codebreakerscorp.wordpress.com/

video
https://www.youtube.com/watch?v=R60jglxhRUQ

Teoria: a Bipartite graph doesn't contain odd-length cycles and is bi-colorable, you can try to bi-colorate your graph in a DFS
**************
Bipartite graph could be found by using DFS or BFS. Just run dfs from any vertex and let's take one more variable curwhich switches each time(such as 1 and 2). And when two vertices have the same "color", then this graph is not bipartite. It is better to show code:
bool bipartite = true;
int a[MaxN][MaxN], color[MaxN];

void dfs(int v, int cur){
  mark[v] = true;
  color[v] = cur; // color this vertex as cur
  for (int i = 0; i < n; i++)
     if (a[v][i] == 1){ // if there is edge between v and i
         if (color[i] == cur) { // if color of vertex i is equal to color of v, that is cur
               bipartite = false; // graph is definitely not bipartite, so return
               return;
         }
         if (!mark[i]) dfs(v, cur==1?2:1); // continue dfs
     }
};

int main(){
...
dfs(0, 1); 
cout << bipartite;
...
}
Then, if graph is bipartite, all vertices colored with 1 are in one group and with color 2 is in another respectively.
Try to debug this program and try to understand and analyze. It is obviously that there is no edge between two vertices from the same group.

Sorry for my poor English)
*************
bool dfs(int node, int c) {
    if(color[node] != 0) {
        if(color[node] == c) {
            return true;
        } else {
            return false;
        }
    }
    color[node] = c;
    for(int i = 1; i <= n; i++) if(gr[node][i] == 1) {
        if(!dfs(i, -c)) {
            return false;
        }
    }
    return true;
}
If you're using an adjacency and the graph is 1-> based, it's just call:

dfs(1, 1);

jueves, 30 de junio de 2016

Series TV



Niños en crecimiento
Me lo contaron en Japon 
ernesto el vampiro
Las Fábulas del Capitán Oso Azul
Nopo y Gonta
La casa voladora
jimbo y el jet set
La Familia Ness