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
#!/bin/bash | |
cd /home/authenticationService/ | |
dotnet authenticationService.dll |
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
version: 0.0 | |
os: linux | |
files: | |
- source: build_output | |
destination: /home/authenticationService | |
ApplicationStart: | |
- location: scripts/start_service | |
timeout: 300 | |
runas: root |
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
version: 0.2 | |
phases: | |
pre_build: | |
commands: | |
- echo Restore started on `date` | |
- dotnet restore AuthenticationService/AuthenticationService.csproj | |
- echo End of PreBuild | |
build: | |
commands: | |
- echo Build started on `date` |
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
# setting up a windows development environment | |
- reset PC using windows 10 settings | |
- [win] "dev" and launch Developer Settings, tap all the apply buttons | |
- [win-x] Windows Powershell (Admin) | |
- ps> iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
- choco feature enable -n allowGlobalConfirmation | |
- ps> choco install microsoft-windows-terminal | |
- (optional) switch to elevated terminal | |
- ps> choco install git | |
- ps> choco install nodejs.install python2 jdk8 |
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
CREATE OR REPLACE PROCEDURE buildReport (purchaseID IN number) | |
IS | |
FUNCTION GET_TAXRATE (STATE VARCHAR2) RETURN NUMBER IS | |
taxrate NUMBER := 0; | |
BEGIN | |
SELECT TAX_RATE INTO taxrate FROM tax_codes WHERE tax_codes.STATE_CODE = STATE; | |
return taxrate; | |
END; | |
FUNCTION CALC_TAX (AMOUNT NUMBER,taxPercent NUMBER) RETURN NUMBER IS |
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
CREATE OR REPLACE FUNCTION inCart (Product_ID IN VARCHAR2) RETURN BOOLEAN | |
IS | |
doesExist boolean := false; | |
matches number := 0; | |
BEGIN | |
select count(nest.PRODUCT_ID) into matches from SHOPPING_CARTS carts, table(carts.cart) nest; | |
IF matches > 0 | |
THEN | |
doesExist := true; | |
END IF; |
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
CREATE OR REPLACE FUNCTION getPrice (Product_ID IN VARCHAR2) | |
RETURN NUMBER | |
IS price NUMBER(7,2); | |
CURSOR cur_products IS SELECT PRODUCT_PRICE INTO price FROM product WHERE PRODUCT_ID=Product_ID; | |
BEGIN | |
open cur_products; | |
FETCH cur_products INTO price; | |
return price; | |
END; |
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
CREATE TYPE DRIVER_T AS OBJECT ( | |
first_name VARCHAR2(30), last_name VARCHAR2(30), date_of_birth DATE | |
); | |
--Create a DRIVERS_VA VARRAY of the DRIVER_TY abstract data type you created in step 1. | |
CREATE TYPE DRIVERS_VA IS VARRAY(5) OF DRIVER_T; | |
--define what an owner is | |
CREATE TYPE OWNER AS OBJECT( | |
first_name VARCHAR2(30), |
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
DECLARE | |
Cursor donors IS SELECT IDDONOR,FIRSTNAME,LASTNAME from Donor; | |
TYPE typeDonor IS RECORD( | |
IDDONOR donor.IDDONOR%TYPE, | |
FIRSTNAME donor.FIRSTNAME%TYPE, | |
LASTNAME donor.LASTNAME%TYPE | |
); | |
TYPE list_of_donors IS TABLE OF typeDonor INDEX BY PLS_INTEGER; |
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
CREATE TABLE cars ( | |
carID NUMBER(10), | |
carType VARCHAR2(20) | |
); | |
SET SERVEROUTPUT ON; | |
CREATE OR REPLACE PROCEDURE createArray IS | |
TYPE list_of_cars IS TABLE OF cars.carType%TYPE INDEX BY PLS_INTEGER; | |
virtualTableCars list_of_cars; | |
l_row PLS_INTEGER; |
NewerOlder