Skip to content

Instantly share code, notes, and snippets.

View DonDebonair's full-sized avatar

Daan Debie DonDebonair

View GitHub Profile
@DonDebonair
DonDebonair / export-comments-for-disqus-xml.php
Last active July 30, 2019 08:10
Convert Comments in a MySQL database (in this case from the Diem CMS) to a Wordpress WXR file that can be imported by Disqus
<?php
/*
Convert Comments in a MySQL database (in this case from the Diem CMS) to a Wordpress WXR file that can be imported by Disqus
usage: $ php export-comments-for-disqus-xml.php > comments.xml
*/
$connection = mysql_connect('localhost', 'username', 'password') or die(mysql_error());
$db = mysql_SELECT_db('databasename', $connection);
db_query("set character_set_client='utf8'");
db_query("set character_set_results='utf8'");
import java.math.BigInteger;
public final class IbanTest {
public static final int IBANNUMBER_MIN_SIZE = 15;
public static final int IBANNUMBER_MAX_SIZE = 34;
public static final BigInteger IBANNUMBER_MAGIC_NUMBER = new BigInteger("97");
public static boolean ibanTest(String accountNumber) {
String newAccountNumber = accountNumber.trim();