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
<?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'"); |
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
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(); |
NewerOlder