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
package main | |
import ( | |
"fmt" | |
"os/exec" | |
"io" | |
"bufio" | |
"os" | |
) |
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
# views.py - django app called ajx | |
from django.shortcuts import render, get_object_or_404, redirect, HttpResponse, render_to_response, HttpResponseRedirect | |
from django.core.urlresolvers import reverse | |
from django.contrib.auth import authenticate, login | |
import json | |
def mygetview(request): | |
if request.method == 'GET': |
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
/* | |
FCECP -> FCADUANA as ecp-aduana | |
FCADUANA -> FCARRIBADO as adu-arribado | |
FCADUANA -> FCPAGPED as aduana-pagped | |
FCADUANA -> FCSOL as aduana-sol | |
FCARRIBADO -> FCGONDOLA as arribado-gondola | |
FCPAGPED -> FCGONDOLA as pagped-gondola | |
FCSOL -> FCGONDOLA as sol-gondola | |
FCARRIBADO -> FCPENTACO as arribado-pentaco | |
FCPAGPED -> FCPENTACO as pagped-pentaco |
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
sql2 = "Select DATEPART(week,MIN(FechaEntrega)) as SemanaDelYear from Compra where Mov in('Pedido', 'Pedido Excedente') and Estatus='PENDIENTE'" | |
cursor = connection.cursor() | |
cursor.execute(sql2) | |
minsql = cursor.fetchall() | |
minsql = minsql[0].SemanaDelYear | |
maxsql = maxsql[0].SemanaDelYear | |
my_list = list(range(minsql, maxsql)) |
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
<! DOCTYPE> | |
<html> | |
<head> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
<style> | |
/* The heart of the matter */ | |
.testimonial-group > .row { | |
overflow-x: auto; | |
white-space: nowrap; | |
} |
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 not found: Error: Can't resolve 'promise-polyfill' | |
Had the same issue, this solved it: | |
npm install promise-polyfill --save-exact |
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
# install pip install xlwt | |
from django.shortcuts import render | |
from django.db import connection | |
# Create your views here. | |
import xlwt | |
from django.http import HttpResponse |
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
import { Component, SimpleChange } from '@angular/core'; | |
import { NavController,} from 'ionic-angular'; | |
@Component({ | |
selector: 'page-home', | |
templateUrl: 'home.html' | |
}) | |
export class HomePage { | |
greeting: string; | |
toggleStatus:boolean; |
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
sql = "Select Referencia, Agente from Compra where Mov='PEDIDO' and Referencia='898-76' " | |
cursor = connection.cursor() | |
cursor.execute(sql) | |
todo_items = cursor.fetchall() | |
result = [] | |
keys = ('Referencia','Agente',) | |
for row in todo_items: | |
result.append(dict(zip(keys, row))) | |
#todo_items = ['Mow Lawn', 'Buy Groceries', ] | |
data = json.dumps(result) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | |
<!-- Optional theme --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> | |
<!-- Latest compiled and minified JavaScript --> |