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
var forceVersion = '5.3'; | |
var apiVersionRegex = /docs\.unrealengine\.com\/(?<apiVersion>\d+\.\d+)\/(?<languageTag>[0-9A-Za-z\-]+)\/(?<docPath>.*)$/; | |
var url = document.location.href; | |
var match = apiVersionRegex.exec(url); | |
var isVersionForced = typeof forceVersion !== 'undefined' && !isNaN(parseFloat(forceVersion)); | |
if (match !== null) { | |
var apiVersion = match.groups['apiVersion']; | |
var languageTag = match.groups['languageTag']; | |
var docPath = match.groups['docPath']; | |
if (apiVersion !== undefined && languageTag !== undefined && docPath !== undefined) { |
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
function Set-WindowState { | |
<# .LINK https://gist.github.com/Nora-Ballard/11240204 #> | |
[CmdletBinding(DefaultParameterSetName = 'InputObject')] | |
param( | |
[Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)] | |
[Object[]] $InputObject, | |
[Parameter(Position = 1)] | |
[ValidateSet('FORCEMINIMIZE', 'HIDE', 'MAXIMIZE', 'MINIMIZE', 'RESTORE', |
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
"problemMatcher": { | |
"pattern": { | |
"regexp": "^\\s*(\\S+) (\\S+)(?: \\(Line (\\d+): ([^\\)]*)\\))?$", | |
"severity": 1, | |
"file": 2, | |
"line": 3, | |
"message": 4 | |
} | |
} |
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
⋮ | |
final Runnable r = new Runnable() { | |
@Override | |
public void run() { | |
System.out.println("This is an anonymous class."); | |
} | |
} | |
⋮ |
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
static public final Version toVersion(String s) { | |
final long major, minor, patch; | |
try { | |
String[] mainPart = s.split('[' + Pattern.quote(Version.PRERELEASE_PREFIX + Version.BUILD_PREFIX) + ']')[0].split(Pattern.quote(Version.VERSION_SEPARATOR)); | |
major = Long.parseLong(mainPart[0]); | |
minor = Long.parseLong(mainPart[1]); | |
patch = Long.parseLong(mainPart[2]); | |
} catch (NumberFormatException nfe) { | |
nfe.printStackTrace(); | |
return null; |
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
<article> | |
<p> | |
Hello, world! This is a piece of sample text. <em>I</em> | |
think it's pretty cool! | |
</article> | |
</p> |
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
<article id="post"> | |
<p> | |
Hello, world! This is a piece of sample text. <em>I</em> | |
think it's pretty cool! | |
</p> | |
</article> |
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
package com.n1nja.colour; | |
import java.awt.*; | |
import java.awt.event.*; | |
import java.awt.image.BufferedImage; | |
import javax.swing.*; | |
public class Colour implements KeyListener{ | |
public static void main(String[] args) { | |
new Colour(); | |
} | |
private JFrame window; |
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
aJToggleButton.setBackground(new Color(aJPanel.getBackground().getRed(), aJPanel.getBackground().getGreen(), aJPanel.getBackground().getBlue())); //This works. | |
aJToggleButton.setBackground(aJPanel.getBackground()); //This does not. | |
//Any ideas why? I couldn't find anything in the JavaDocs that explains it. |
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
package com.n1nja.utils; | |
/** | |
* Useful classes for manipulating {@link java.lang.String String}s. | |
* @author Colin Haber | |
* @version 0.0.0 | |
*/ | |
public class Strings { | |
/** | |
* The default {@code char} used for padding | |
* {@link java.lang.String String}s. |
NewerOlder