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
<meta http-equiv="refresh" content="0; url=http://www.brighton.ac.uk/studying-here/activate-your-user-account.aspx" /> |
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
.navbar .container-fluid { | |
min-height: 83px; | |
background-color: #555555; | |
} |
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
("/^[_a-z0-9-]+(\.[_a-z0-9+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/i", $email) |
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
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
//or import java.util.regex.*; | |
Pattern pattern = Pattern.compile("INSERT REGULAR EXPRESSION"); | |
Matcher matcher = pattern.matcher("INSERT INPUT STRING TO SEARCH"); | |
boolean found = false; | |
while (matcher.find()) { | |
...do something... |
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
package unit4s5452; | |
import java.util.List; | |
import java.util.ArrayList; | |
/** | |
* | |
* @author rob_work | |
* Store the numbers from 1 to 100 in an ArrayList. | |
* | |
* Write some code to double every number in the list; | |
* you should use a standard for loop here, |
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 two sets of numbers. | |
The first set will contain all the numbers from 2 to 100. | |
The second set will contain all the even numbers greater than 2 | |
(i.e. 4, 6, 8, ...). | |
By using a single set operation, remove all these even numbers | |
from the first set. | |
Repeat the process to remove all multiples of 3 (i.e. 6, 9, 12 ...), | |
5, and 7 from the original set. | |
(Use the principle of DRY to make this process use a common set of methods.) |
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
public String plusOut(String str, String word) { | |
return str.replaceAll( | |
"(?<!(?=word).{0,M})." | |
.replace("word", java.util.regex.Pattern.quote(word)) | |
.replace("M", String.valueOf(word.length()-1)), | |
"+" | |
); | |
} |
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
import java.io.Console; | |
import java.util.regex.Pattern; | |
import java.util.regex.Matcher; | |
public class RegexTestHarness { | |
public static void main(String[] args){ | |
Console console = System.console(); | |
if (console == null) { |
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
package tempconverttofile; | |
import java.io.*; | |
import java.math.BigDecimal; | |
/** | |
* @author rob_work | |
*/ | |
public class TempConvertToFile { | |
/** | |
* Method to create a table of temp conversions given start, end and step |
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
package exercise241; | |
import java.io.*; | |
/** | |
* | |
* @author rob_work | |
* Write a program to read each line of a file | |
* and store it in an array of strings. | |
* You will need to make two passes through | |
* the file: the first to find the number of lines. | |
* |