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
| <?php | |
| function quote_smart($db_connection, $value) { | |
| if( get_magic_quotes_gpc() ) | |
| $value = stripslashes( $value ); | |
| $value = mysqli_real_escape_string($db_connection, $value ); | |
| $value = strip_tags($value); | |
| $value = htmlspecialchars($value); | |
| $value = trim($value); | |
| return $value; |
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 Server: query all stored procedures in all databases | |
| DECLARE @sql varchar(1000) | |
| select @sql = 'use ? select | |
| [database name] = db_name() | |
| ,[schema name] = SCHEMA_NAME([schema_id]) | |
| ,name [stored proc name] | |
| ,create_date [create date] | |
| ,modify_date [last modify 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
| <?php | |
| require('vendor/autoload.php'); | |
| use RingCentral\SDK\Http\HttpException; | |
| use RingCentral\SDK\Http\ApiResponse; | |
| use RingCentral\SDK\SDK; | |
| $rcsdk = new SDK(constant('RINGCENTRAL_CLIENT_ID'), constant('RINGCENTRAL_CLIENT_SECRET'), constant('RINGCENTRAL_SERVER_URL')); | |
| $platform = $rcsdk->platform(); | |
| if (isset($_REQUEST['oauth2callback'])){ |
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
| <?php | |
| require('vendor/autoload.php'); | |
| use RingCentral\SDK\Http\HttpException; | |
| use RingCentral\SDK\Http\ApiResponse; | |
| use RingCentral\SDK\SDK; | |
| $rcsdk = new SDK(constant('RINGCENTRAL_CLIENT_ID'), constant('RINGCENTRAL_CLIENT_SECRET'), constant('RINGCENTRAL_SERVER_URL')); | |
| $platform = $rcsdk->platform(); |
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
| <?php | |
| require "vendor/autoload.php"; | |
| $rcsdk = new RingCentral\SDK\SDK(constant('RINGCENTRAL_TWO_LEG_CLIENT_ID'), constant('RINGCENTRAL_TWO_LEG_CLIENT_SECRET'), constant('RINGCENTRAL_TWO_LEG_SERVER_URL'), constant('RINGCENTRAL_TWO_LEG_APP_NAME') ); | |
| $platform = $rcsdk->platform(); | |
| $platform->login(constant('RINGCENTRAL_TWO_LEG_USERNAME'), constant('RINGCENTRAL_TWO_LEG_EXT'), constant('RINGCENTRAL_TWO_LEG_PASSWORD')); | |
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
| const express = require('express') | |
| const app = express() | |
| const port = 3000 | |
| const fs = require('fs'); | |
| const mysql = require('mysql'); | |
| app.get('/', (req, res) => { | |
| res.send('Hello World!') | |
| }) |
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
| const express = require('express') | |
| const app = express() | |
| const port = 3000 | |
| const fs = require('fs'); | |
| const mysql = require('mysql'); | |
| app.get('/', (req, res) => { | |
| res.send('Hello World!') | |
| }) |
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
| WITH EmployeeList | |
| (employee_id, employee_name, manager_id, manager_name, employee_level) | |
| AS ( | |
| SELECT | |
| Boss.employee_id, | |
| Boss.employee_name, | |
| Boss.manager_id, | |
| Boss.manager_name, | |
| 1 AS employee_level | |
| FROM EmployeeRoster Boss |
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
| Const strDbConn As String = "server=myServerName;Database=myDatabaseName;Trusted_Connection=Yes;Driver={ODBC Driver 17 for SQL Server}" | |
| Public Function ImportData(sheet As String) | |
| Dim i As Long | |
| Dim strSQL As String | |
| Dim totalRows As Long | |
| totalRows = HowManyRows(sheet) | |
| strInsertHeader = GetInsertHeader() |
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
| Function removeRowsWithValueOfZero() | |
| ' Sort on the values (Col N) | |
| ' when it comes time to delete, it'll be much faster! | |
| Range("A1").Select | |
| ActiveWorkbook.Worksheets("data").Sort.SortFields.Clear | |
| ActiveWorkbook.Worksheets("data").Sort.SortFields.Add2 Key:=Range("N:N"), _ | |
| SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal | |
| With ActiveWorkbook.Worksheets("data").Sort |