This file contains 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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
location /api { | |
proxy_pass http://localhost:5000/api; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
set $cors ''; |
This file contains 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
UC_FIRST Capitalize any given string - This function is a clone of the ucfirst function in PHP. | |
DROP FUNCTION IF EXISTS UC_FIRST; | |
CREATE FUNCTION UC_FIRST(oldWord VARCHAR(255)) RETURNS VARCHAR(255) | |
RETURN CONCAT(UCASE(SUBSTRING(oldWord, 1, 1)),SUBSTRING(oldWord, 2)); | |
UC_DELIMITER Capitalize with a delimiter in between words | |
DROP FUNCTION IF EXISTS UC_DELIMITER; | |
DELIMITER // | |
CREATE FUNCTION UC_DELIMITER( |
This file contains 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
DELIMITER $$ | |
CREATE TRIGGER `MODIFIED_DATE` BEFORE UPDATE ON `TBL_COMPANIES` | |
FOR EACH ROW | |
BEGIN | |
IF (NEW.Operator_name is not null) THEN | |
SET NEW.Modified = CURRENT_TIMESTAMP(); | |
END IF; |
This file contains 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
DELIMITER $$ | |
CREATE TRIGGER `TRIGGER_NAME` BEFORE UPDATE ON `TABLE_NAME` | |
FOR EACH ROW | |
BEGIN | |
IF (NEW.FIELD_NAME is not null) THEN | |
SET NEW.FIELD_NAME = CURRENT_TIMESTAMP(); | |
END IF; |
This file contains 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
Sub request() | |
Dim request As HttpWebRequest = HttpWebRequest.Create("https://www.python.org/ftp/python/3.8.3/python-3.8.3-amd64.exe") | |
request.Proxy = Nothing | |
Dim response As HttpWebResponse = request.GetResponse | |
Dim responseStream As System.IO.Stream = response.GetResponseStream | |
Dim streamReader As New System.IO.StreamReader(responseStream) | |
Dim data As String = streamReader.ReadToEnd | |
streamReader.Close() |