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
# Thanks to this post for showing how to find the current line number and file when called in a script | |
# https://poshoholic.com/2009/01/19/powershell-quick-tip-how-to-retrieve-the-current-line-number-and-file-name-in-your-powershell-script/ | |
# Slightly extented with __WHERE__ to shorten everything up a bit | |
# | |
# Calling __WHERE__ will format the output while still returning the correct values. | |
function Get-CurrentLineNumber { | |
$MyInvocation.ScriptLineNumber | |
} | |
function Get-CurrentFileName { |
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
The objective: write a query that selects all Leagues that a given user has access to. | |
The standard SQL query for a JOIN and a WHERE clause on the table you joined. | |
SELECT * | |
FROM League | |
OUTER JOIN LeagueUser ON LeagueUser.League_Id = League.Id | |
WHERE LeagueUser.User_Id = [passed id] | |
And the proposed EF query. |
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
I'm hosting multiple (near identical) applicaitons under the ./applications/ folder. | |
For this example I'm using [testing] to represent the individual applicaitons. | |
I need to replace this: | |
<cfset variables.employeeObj = CreateObject("component","applications.psctest.includes.employee")> | |
with something less unique to the application. Perhaps basing the string literal: | |
"applications.[testing].includes.employee" | |
with an application setting in application.cfc in the root of each applicaiton? | |
Or creating the instance of these different "variables.employeeObj" objects in the applicaiton.cfc? |
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
internal static string MakeString(int numChars) | |
{ | |
string random = string.Empty; | |
string[] chars = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "*", "!", "<", ">", "^", "$", "@", "+", "-" }; | |
Random rnd = new Random(); | |
for (int i = 0; i < numChars; i++) | |
{ | |
random += chars[rnd.Next(70)]; | |
} |
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
Get number of heats based on LaneCount and RacerCount: totalHeats | |
Add a Race per Den | |
For each Heat found above: | |
Select random racers for the lineup based on a "Chaotic-Rotation Method" | |
Each Racer must race at least 3 times | |
Each racer must race the same number of times | |
Racers should be held in a race through as many heats as possible | |
Racers cannot compete against themselves | |
Racers should compete against as many different opponents as possible |
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
{"given_cipher_suites":["TLS_RSA_WITH_RC4_128_MD5","TLS_RSA_WITH_RC4_128_SHA","TLS_RSA_WITH_3DES_EDE_CBC_SHA","TLS_RSA_WITH_DES_CBC_SHA","Some unknown cipher suite: 0x64","Some unknown cipher suite: 0x62","TLS_RSA_EXPORT_WITH_RC4_40_MD5","TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5","TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA","TLS_DHE_DSS_WITH_DES_CBC_SHA","Some unknown cipher suite: 0x63"],"ephemeral_keys_supported":true,"session_ticket_supported":false,"tls_compression_supported":false,"unknown_cipher_suite_supported":true,"beast_vuln":true,"able_to_detect_n_minus_one_splitting":false,"insecure_cipher_suites":{"TLS_DHE_DSS_WITH_DES_CBC_SHA":["uses keys smaller than 128 bits in its encryption"],"TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5":["uses keys smaller than 128 bits in its encryption"],"TLS_RSA_EXPORT_WITH_RC4_40_MD5":["uses keys smaller than 128 bits in its encryption"],"TLS_RSA_WITH_DES_CBC_SHA":["uses keys smaller than 128 bits in its encryption"]},"tls_version":"TLS 1.0","rating":"Bad"} |