martes, 4 de febrero de 2020

CREACION DE BASE DE DATOS SQL SERVER

CREACION DE BASE DE DATOS DE UNA BIBLIOTECA
===============================================





USE MASTER
GO

CREATE DATABASE bdPrueba
ON PRIMARY
(NAME =  'bdPrueba', FILENAME = 'E:\BD\bdPrueba.mdf', SIZE = 10MB, MAXSIZE = Unlimited, FILEGROWTH = 2MB)
LOG ON
(NAME = 'bdPrueba_log', FILENAME ='E:\BD\bdPrueba_log.ldf', SIZE = 10MB, MAXSIZE = 30MB, FILEGROWTH = 10%)
 GO

 USE bdPrueba
 GO

CREATE TABLE Lector(
IdLector int identity(1,1) not null,
ApellidoLector varchar(80) not null,
NombreLector varchar(80) not null,
TelefonoLector varchar(30) not null,
CONSTRAINT PK_IdLector Primary key (IdLector)
 )
GO

CREATE TABLE Prestamo(
NroPrestamo int identity(1,1) not null,
CantLibrosPrestados int not null,
FechaPrestamo datetime not null,
IdLector int not null,
CONSTRAINT PK_Prestamo PRIMARY KEY(NroPrestamo),
CONSTRAINT FK_IdLector FOREIGN KEY (IdLector) REFERENCES Lector(IdLector)
)

CREATE TABLE Autor(
IdAutor int identity(1,1) not null,
ApellidoAutor varchar(60) not null,
NombresAutor varchar (60) not null,
PaisAutor varchar(30) not null
CONSTRAINT PK_IdAutor PRIMARY KEY (IdAutor)
)

CREATE TABLE Editorial(
IdEditorial int identity not null,
NombreEditorial varchar(80) not null
CONSTRAINT PK_IdEditorial PRIMARY KEY (IdEditorial)
)

CREATE TABLE Libro(
IdLibro int identity not null,
PrecioRef money null,
Titulo varchar(80) not null,
IdEditorial int not null,
CONSTRAINT PK_Idlibro PRIMARY KEY (IdLibro),
CONSTRAINT FK_IdEditorial FOREIGN KEY (IdEditorial) REFERENCES Editorial(IdEditorial)
)

CREATE TABLE Libro_Autor(
IdLibro int not null,
IdAutor int not null,
Capitulos int not null,
CONSTRAINT PK_Libro_Autor PRIMARY KEY (IdLibro,IdAutor),
CONSTRAINT FK_IdLibro FOREIGN KEY (IdLibro) REFERENCES Libro(IdLibro),
CONSTRAINT FK_IdAutor FOREIGN KEY (IdAutor) references Autor(IdAutor)
)
go

sp_helpconstraint Libro_Autor

CREATE TABLE Detalle_Prestamo(
IdLibro int not null,
NroPrestamo int not null,
NroCopia int not null,
CONSTRAINT PK_IdLibro_NroPrestamo PRIMARY KEY (IdLibro,NroPrestamo),
CONSTRAINT FK_IdLibro_DetallePrestamo FOREIGN KEY (IdLibro) REFERENCES Libro(IdLibro),
CONSTRAINT FK_NroPrestamo FOREIGN KEY (NroPrestamo) REFERENCES Prestamo(NroPrestamo)
)
GO

-- Añadir Campo a tabla lector
ALter table Lector
ADD DNI char(8) not null,
Direccion varchar(80) not null
GO

-- Añadir Constraint UNIQUE a tabla Lector
ALTER TABLE Lector
ADD CONSTRAINT UNQ_DNI
UNIQUE (DNI)
GO

SP_HELPCONSTRAINT Lector
GO

martes, 28 de enero de 2020

Descargar Google Chrome Y Firefox Offline

Descargar FIREFOX Offline
========================
Para 64 bit  --> https://download.mozilla.org/?product=firefox-72.0.2-SSL&os=win64&lang=es-ES
Para 32 bit --> https://download.mozilla.org/?product=firefox-72.0.2-SSL&os=win&lang=es-ES
Elegir Idioma y S.O --> https://www.mozilla.org/es-ES/firefox/all/?q=Spanish%20(Spain),%20Espa%C3%B1ol%20(de%20Espa%C3%B1a)#product-desktop-release

Descargar GOOGLE CHROME offline
=================================
Para 64 Bit --> http://www.google.com/chrome/eula.html?standalone=1 
Para 32 bit --> https://dl.google.com/tag/s/appguid%3D%7B8A69D345-D564-463C-AFF1-A69D9E530F96%7D%26iid%3D%7B126B12CB-92A4-59CC-C453-BB8C2CD640F9%7D%26lang%3Des%26browser%3D4%26usagestats%3D0%26appname%3DGoogle%2520Chrome%26needsadmin%3Dprefers%26ap%3Dstable-arch_x86-statsdef_1%26installdataindex%3Ddefaultbrowser/chrome/install/ChromeStandaloneSetup.exe

domingo, 26 de enero de 2020

Instalar Wine en Ubuntu 14.04 LTS

Instalar Wine en Ubuntu 14.04 LTS
=============================

Abrir la terminal con cntrl + alt+ T y agregar el ppa:
$> sudo add-apt-repository ppa:ubuntu-wine/ppa

Ejecutar:
$> sudo apt-get update

Instalar Wine:
$> sudo apt-get install wine1.6

viernes, 24 de enero de 2020

Instalar BeeBEEP en Ubuntu 16.04
=============================

$> sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu $(lsb_release -sc)-getdeb apps" >> /etc/apt/sources.list.d/getdeb.list'
$> sudo wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
$> sudo apt update && sudo apt install beebeep

jueves, 23 de enero de 2020

Atajos de teclado en Visual Studio Enterprise

Atajos de teclado en Visual Studio
============================================
       F5                   ->   Ejecutar Aplicación
   CTRL + F5         ->   Ejecutar Aplicación Sin depuración
Shift + Suprimir   ->   Eliminar la línea actual 
Ctrl+D      ------------>   Duplica la línea actual en la línea inferior
Ctrl+K + Ctrl+C    ->   Comentar con /
Ctrl+K + Ctrl+U    ->   Descomentar con / 
Alt+↑      ------------->    Intercambiar línea actual con la superior
Ctrl+Alt+↓   --------->   Multicursor 
Ctrl+Shift+U        ->    Poner Mayúsculas
Ctrl + U    ----------->    Poner Minúsculas 
Ctrl+Shift + N       ->   Crear Proyecto
Ctrl+K + Ctrl+D    ->   Formatear Código



Ajuste Automático de Linea
-----------------------------------------
Ir a Herramientas o tools -> Opciones
                                              Text Editor -> All Languages
                                               General
                                               Activar Word wrap 

miércoles, 1 de enero de 2020

Configuración Personal de Intellij idea

Configuración de Intellij idea
============================
Font: Consolas
Size: 17
Line Spacing: 1.0

Font: JetBrains Mono
Size: 16.5
Line Spacing: 1.1
Main weight: Medium

Font: JetBrains Mono
Size: 16.7
Line Spacing: 1.0
Main weight: Medium


Ir a Editor --> Color Scheme
                         -> General
                               -> Code  -> Line number on Caret row --> #fff  
                                                   Matched brace ->   Foreground:#FFEF28  
                                                                                   Background:#373E4A ó #3B514D
                              -> Editor  -> Breadcrumbs 
                                                  -> Caret -> Foreground: #548AF7 -->Cursor
  -> Caret row ----> Background:  #2B2B2B
                                               -> Guides -> Gutter background ----> Background: #1E1E1E
  Selection background ----> Background: #3C3F41 ó #214283
                              -> Text -> Default Text -> Background:  #1E1E1E ó #282C34


Desactivar spell checking en IntelliJ IDEA

Elegir Perfil: Default
File >> Settings >> Editor >> Inspections -> Proofreading -> Desactivar Typo
File >> Settings >> Editor >> Natural Languages -> Add Español

Desactivar sugerencias
Editor > Inlay Hints > Code Vision > Desactivar Usages


Configurar Apariencia
Appearance & Behavior -> System Settings
Desactivar Reopen projects on startup
Project -> Activar New Window

Cambiar ancho del cursor
Ctrl + Shift + A -> Actions
Buscar ir a Registry -> Seleccionar editor.caret.width -> Cambiar el valor a 3

Keymap
Comment with line   -> Crtl +7
Comment with block ->Ctrl + Shift + 7

Path Gitbash
C:\Program Files\Git\bin\bash.exe

Plugins
------------
One Dark Theme
Atom material Icons
Save Actions
Rainbow Brackets
GitHub Copilot


martes, 31 de diciembre de 2019

Atajos de Teclado Intellij idea

Atajos de Teclado Intellij-idea
=========================
Formatear Codigo:                     Ctrl + Alt + L
Comentar/Descomentar :           Ctrl + /
Duplicar linea :                            Ctrl + D
Mover linea :                                Ctrl + Shift + ↓
Documentos Recientes:              Ctrl + E
Buscar Configuracion:               Ctrl + Shift + A
Settings:                                       Ctrl + Alt + S
Buscar siguiente coincidencia:  Alt + J
Remove occurrence:                  Shift + Alt + J
Buscar todas las coincidencia:  Ctrl + Alt  + Shift+ J
Reemplazar texto:                      Ctrl + Shift + R
Eliminar Fila:                             Ctrl + x
Eliminar imports no usados:     Ctrl + Alt + o


Navegar por el project:                  Alt + 1
Crear clase o paquete                     Alt + Insert
Renombrar Atr, Métodos,Clases: Shift + 6
Buscar Clases                                  Ctrl + N
Eliminar método:                           Ctrl + Alt + N
Eliminar clase:                                Alt + Delete

Crear Atajos
Crear Nuevo Proyecto:   --->     Ctrl + Shift + F1 
Abrir proyecto:                --->    Ctrl + Shift + F3

Actualizar TailwindCSS a la version 4 en Laravel

Actualizar TailwindCSS a la version 4 en Laravel npx @tailwindcss/upgrade En el archivo vite.config.ts Agregar el plugin de tailwindcss impo...