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
@echo off | |
setlocal enabledelayedexpansion | |
set FOLDER_PATH=. | |
set year=%date:~-4% | |
set month=%date:~3,2% | |
set day=%date:~0,2% | |
pushd %FOLDER_PATH% | |
for %%f in (*csv) do if %%f neq %~nx0 ( | |
set "filename=%%~nf" | |
set "postfix=!filename:~-6!" |
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
#Sat, 12 Oct 2013 23:12:10 +0100 | |
major=0 | |
minor=1 | |
build=3 |
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
/** | |
* Gets a list of files in a given directory and all child directories | |
* @param f This is the File representing the root directory | |
* @return A list of File objects, each one representing a File inside f, either directly or in a sub-directory | |
*/ | |
def listFiles(f: File): List[File] = f match{ | |
case f if f.isDirectory => f.listFiles.toList.flatMap(listFiles(_)) | |
case f if f.isFile => List(f) | |
case _ => Nil | |
} |
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
SELECT df.tablespace_name "Tablespace", | |
totalusedspace "Used MB", | |
(df.totalspace - tu.totalusedspace) "Free MB", | |
df.totalspace "Total MB", | |
ROUND(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace)) "Pct. Free" | |
FROM | |
(SELECT tablespace_name, | |
ROUND(SUM(bytes) / 1048576) TotalSpace | |
FROM dba_data_files | |
GROUP BY tablespace_name |
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.awt.Color; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.net.MalformedURLException; | |
import com.itextpdf.text.BaseColor; | |
import com.itextpdf.text.Document; | |
import com.itextpdf.text.DocumentException; |
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 com.jandrewthompson; | |
import java.io.File; | |
import java.net.URL; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.hibernate.cfg.AnnotationConfiguration; | |
import org.hibernate.tool.hbm2ddl.SchemaExport; | |
/** |
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
select substring_index(value, '@',-1) as email, count(*) as frequency FROM emailTable where name="EmailAddress" group by email order by frequency desc; |
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 short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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 net.blerg.oracleToMysql.util; | |
import java.util.LinkedList; | |
import java.util.List; | |
public class PatternReplace { | |
public static String replace (String string, String pattern, String replacement, char wildcard, char escapeChar, boolean ignoreCase) { | |
//tokenise against the pattern |
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.LinkedList; | |
import java.util.List; | |
/** | |
* Provides a way to produce an information box surrounded by a char such as *. To use, add lines by calling {@link #add(String)} and then call {@link #getStringsInBox(char)} to get a String that can | |
* be put into a System.out.println call or used elsewhere that is formatted. | |
* | |
* @author Arthur Embleton | |
* | |
*/ |