Recent programs

booktown

an anonymous user · September 26, 2022 · SQL
-- This table contains all of the authors whose books are being tracked by Booktown.
-- The fields for this table are:
--   > Author_ID  : a unique ID number that identifies the author
--   > Last_Name  : the author's surname
--   > First_Name : the author's given name, possibly including a middle name or middle
--                  initial
-- Note that there is no requirement that an author's full name (First_Name, Last_Name)
-- is unique.
CREATE TABLE Authors(
    Author_ID INTEGER PR

sql template

an anonymous user · September 26, 2022 · SQL
CREATE TABLE employees(id int,name varcahr(60),department_id int);
CREATE TABLE employees_salary(employee_id int,salary int);
CREATE TABLE departments(id int,name varcahr(60));

INSERT INTO employees VALUES (1,'John',1),(2,'Jane',1),(3,'Alan',2),(4,'Amy',2),(5,'Ben',3),(6,'Beth',3);
INSERT INTO employees_salary VALUES (1,500),(2,450),(3,600),(4,750),(5,200),(6,200);
INSERT INTO departments VALUES (1,'Product'),(2,'Sales'),(3,'IT');

SELECT * FROM employees;
SELECT * FROM employees_salary;
SELEC

1

an anonymous user · September 26, 2022 · Python
class Exponentiation():
    def __init__(self):
        self.number = 0
        self.degree = 0
    def read(self):
        self.number = float(input())
        self.degree = float(input())
        return
    
    def exp(self):
        try:

dfsdfdf

an anonymous user · September 26, 2022 · Assembly
section .data
    msg db "Hello world!", 0ah

section .text
    global _start

_start:
    mov rax, 1
    mov rdi, 1
    mov rsi, msg
    mov rdx, 13

sdfs

an anonymous user · September 26, 2022 · TypeScript
const arr = ["Spouse", "Children" ,"Significant other", "Alone", "Mother"
"Siblings", "Father",
"Other:"]

let data =[];
arr.map((val,index)=>{
    data.push({
        i :index+1,
        name : val
    });
})

TESTE

danielle · September 26, 2022 · MySQL
-- create a table
CREATE TABLE students (
  id INTEGER PRIMARY KEY,
  name VARCHAR(30) NOT NULL,
  gender CHAR(1) NOT NULL
);
-- insert some values
INSERT INTO students VALUES (1, 'Ryan', 'M');
INSERT INTO students VALUES (2, 'Joanna', 'F');
-- fetch some values
SELECT * FROM students WHERE gender = 'F';

a

an anonymous user · September 26, 2022 · Assembly
section .data
    msg db "Hello world!", 0ah

section .text
    global _start

_start:
    mov rax, 1
    mov rdi, 1
    mov rsi, msg
    mov rdx, 13

Rows to columns

an anonymous user · September 26, 2022 · Python
# There's a staircase with N steps, and you can climb 1 or 2 steps at a time. 
# Given N, write a function that returns the number of unique ways you can climb the staircase. The order of the steps matters.

# For example, if N is 4, then there are 5 unique ways:

# 1, 1, 1, 1
# 2, 1, 1
# 1, 2, 1
# 1, 1, 2
# 2, 2

Pubf

an anonymous user · September 26, 2022 · TypeScript
gg.setRanges(gg.REGION_C_ALLOC)
gg.searchNumber("620137442967552", nil, nil, nil, nil, nil)
gg.refineNumber("620137442967552")
gg.getResults(510)
gg.editAll("288233678981562368", gg.TYPE_QWORD)
gg.clearResults()
gg.setRanges(gg.REGION_C_ALLOC)
gg.searchNumber("620137442967552", nil, nil, nil, nil, nil)
gg.refineNumber("620137442967552")
gg.getResults(5010)
gg.editAll("288233678981562368", gg.TYPE_QWORD)

shoya ki sql table

an anonymous user · September 26, 2022 · MySQL
CREATE TABLE employee (
  emp_id INT PRIMARY KEY,
  first_name VARCHAR(40),
  last_name VARCHAR(40),
  birth_day DATE,
  sex VARCHAR(1),
  salary INT,
  super_id INT,
  branch_id INT
);

TABLA_19

an anonymous user · September 26, 2022 · SQL
CREATE TABLE IF_SIB_CATALOGO_19 
(
    CODIGO	varchar(50) PRIMARY KEY,
    DESCRIPCION	varchar(300)
);

INTO IF_SIB_CATALOGO_19 (CODIGO, DESCRIPCION, ) VALUES ("1", "ACCIONISTA")
INTO IF_SIB_CATALOGO_19 (CODIGO, DESCRIPCION, ) VALUES ("2", "DIRECTIVO")
INTO IF_SIB_CATALOGO_19 (CODIGO, DESCRIPCION, ) VALUES ("3", "FUNCIONARIO")
INTO IF_SIB_CATALOGO_19 (CODIGO, DESCRIPCION, ) VALUES ("4", "EJECUTIVO")

ECO 3313 9_26_2022

jhuato · updated September 26, 2022 · R
# JH
# This creates a list of numbers (vector):
c(10, 15, 22)

# This assigns the values of a random variable to its symbolic representation:
x <- c(10, 15, 22)
x

# This creates a constant (15) vector of length 6:
rep(15, 6)

sql report vivek

an anonymous user · September 26, 2022 · SQL
-- create a table
CREATE TABLE students (vivek negi )
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL,
  gender TEXT NOT NULL
);
-- insert some values
INSERT INTO students VALUES (1, 'vivek', 'M');
INSERT INTO students VALUES (2, 'vivek1negi', 'F');
-- fetch some values
SELECT * FROM students WHERE gender = 'male';

find new and repeat customers

mrsanketraj · updated September 26, 2022 · MySQL
-- create a table
create table customer_orders (
order_id integer,
customer_id integer,
order_date date,
order_amount integer
);

insert into customer_orders values(1,100,cast('2022-01-01' as date),2000),(2,200,cast('2022-01-01' as date),2500),(3,300,cast('2022-01-01' as date),2100)
,(4,100,cast('2022-01-02' as date),2000),(5,400,cast('2022-01-02' as date),2200),(6,500,cast('2022-01-02' as date),2700)
,(7,100,cast('2022-01-03' as date),3000),(8,400,cast('2022-01-03' as date),1000),(9,600,cast('

firstSQL

an anonymous user · September 26, 2022 · SQL
-- create a table
CREATE TABLE student(
id INT PRIMARY KEY, 
name varchar(20),
gender char(1)
);
INSERT INTO student VALUES (1, "Saurabh", "m");
SELECT*from student

introducacao

an anonymous user · September 26, 2022 · SQL
-- create a table
CREATE TABLE students (
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL,
  gender TEXT NOT NULL
);
-- insert some values
INSERT INTO students VALUES (1, 'Ryan', 'M');
INSERT INTO students VALUES (2, 'Joanna', 'F');
-- fetch some values
SELECT * FROM students WHERE gender = 'F';

P42 Home Task

Rosa · September 26, 2022 · Python
#Task 1: function to split name by spaces

customerName= 'Juan Diego Luis'
print(customerName)

import re;
def SplitName(x) :
    y=x.split()
    print (y);
    
SplitName(customerName);

derive icc point table

mrsanketraj · September 26, 2022 · MySQL
create table icc
(
Team_1 Varchar(20),
Team_2 Varchar(20),
Winner Varchar(20)
);
INSERT INTO icc values('India','SL','India');
INSERT INTO icc values('SL','Aus','Aus');
INSERT INTO icc values('SA','Eng','Eng');
INSERT INTO icc values('Eng','NZ','NZ');
INSERT INTO icc values('Aus','India','India');

TABLA_18

an anonymous user · September 26, 2022 · SQL
CREATE TABLE IF_SIB_CATALOGO_18 
(
    CODIGO	varchar(300),
    DESCRIPCION	varchar(300)
);

INSERT INTO IF_SIB_CATALOGO_18 (CODIGO, DESCRIPCION) VALUES ("1", "PADRE");
INSERT INTO IF_SIB_CATALOGO_18 (CODIGO, DESCRIPCION) VALUES ("2", "MADRE");
INSERT INTO IF_SIB_CATALOGO_18 (CODIGO, DESCRIPCION) VALUES ("3", "HIJO");
INSERT INTO IF_SIB_CATALOGO_18 (CODIGO, DESCRIPCION) VALUES ("4", "HIJA");
INSERT INTO IF_SIB_CATALOGO_18 (CODIGO, DESCRIPCION) VALUES ("5", "ABUELO");
#include <stdio.h>

int main() {
    int n, m;
    scanf("%d %d", &n, &m);
    if(n>0 && m<=1000){
        printf("%d", (n/2 + n%2) * (m/2 + m%2));
    }else{
        printf("%d", 0);
    }