Push - Strange World (2000 Remake)
Spotted @ #015 Group Therapy Radio with Above & Beyond
Spotted @ #015 Group Therapy Radio with Above & Beyond
When I execute DDL statements to my MySQL database on my Mac installation, every table is converted to lowercase letters - even if the name is in uppercase letters in my script. This leads to errors in ALTER TABLE operations to add foreign keys (because of case sensitive).
According to this page:
How table and database names are stored on disk and used in MySQL is affected by the lower_case_table_names system variable, which you can set when starting mysqld. lower_case_table_names can take the values shown in the following table. This variable does not affect case sensitivity of trigger identifiers. On Unix, the default value of lower_case_table_names is 0. On Windows the default value is 1. On Mac OS X, the default value is 2.
I updated my my.cnf file:
$ sudo nano /private/etc/my.cnf
... by adding the following line:
lower_case_table_names=0
Fonts like Tahoma, Verdana, ... are missing on a standard Ubuntu installation. I was looking to install the Microsoft TrueCrypt fonts so I could open Word documents (created in Microsoft Office) correctly in OpenOffice. Also, I had the issue some of my webpages were not looking ok in Firefox (Linux) - fonts were missing, so pages could look totally different.
$ sudo aptitude install msttcorefonts
$ sudo fc-cache -fv
I came across some issues with processing secured PDF's. These PDF files were encrypted. After reading the following documentation: http://publib.boulder.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com…, I tried securing one of my own PDF's.
Encrypting the PDF so text cannot be copy/pasted and the PDF could not be printed
import java.io.FileOutputStream; import com.itextpdf.text.pdf.PdfReader; import com.itextpdf.text.pdf.PdfStamper; import com.itextpdf.text.pdf.PdfWriter; public class EncryptPDF { private static final String INPUT_FILENAME = "/tmp/test.pdf"; private static final String OUTPUT_FILENAME = "/tmp/test_encrypted.pdf"; private static final String USER_PASSWORD = ""; private static final String OWNER_PASSWORD = "foobar"; public static void main(String[] args) { PdfReader reader = null; FileOutputStream out = null; PdfStamper stamper = null; try { // Define input reader = new PdfReader(INPUT_FILENAME); // Define output out = new FileOutputStream(OUTPUT_FILENAME); // Encrypt document stamper = new PdfStamper(reader, out); stamper.setEncryption(USER_PASSWORD.getBytes(), OWNER_PASSWORD.getBytes(), 0, PdfWriter.STANDARD_ENCRYPTION_128); } catch (Exception ex) { ex.printStackTrace(); } finally { if (stamper != null) { try { stamper.close(); } catch (Exception ex) { ex.printStackTrace(); } } if (reader != null) { try { reader.close(); } catch (Exception ex) { ex.printStackTrace(); } } if (out != null) { try { out.close(); } catch (Exception ex) { ex.printStackTrace(); } } } } }
You can also play with the permissions by providing PdfWriter perms instead of the value "0".
stamper.setEncryption(USER_PASSWORD.getBytes(), OWNER_PASSWORD.getBytes(), PdfWriter.ALLOW_ASSEMBLY | PdfWriter.ALLOW_COPY, PdfWriter.STANDARD_ENCRYPTION_128);
When you boot your Ubuntu installation, a lot of scripts are started. A lot of scripts are superfluous. But how to disable the ones you don't need?
$ sudo aptitude install rcconf
$ sudo rcconf
If you want to format the following XML document:
<?xml version="1.0" encoding="UTF-8"?><ROOT><FOO><BAR>Hello World</BAR></FOO><BAR><FOO>World Hello</FOO></BAR></ROOT>
... you can use Vi in combination with Xmllint to do the formatting
$ vi example.xml :%!xmllint --format -
... the result will be:
<?xml version="1.0" encoding="UTF-8"?> <ROOT> <FOO> <BAR>Hello World</BAR> </FOO> <BAR> <FOO>World Hello</FOO> </BAR> </ROOT>
When building Richfaces 3.3.x from source, you might run into the following error:
richfaces\framework\test\src\main\java\org\ajax4jsf\tests\EnumSupportExpressionFactoryWrapper.java:[32,7] org.ajax4jsf.tests.EnumSupportExpressionFactoryWrapper is not abstract and does not override abstract method coerceToType(java.lang.Object,java.lang.Class) in javax.el.ExpressionFactory
The solution to solve this error:
The problem is that there are different versions of the "el-api-1.0.jar" on the Internet.
The official JAR, with 24432 bytes and SHA1 checksum df8c6ce0406676e70c5d018e5fb988be1bcf1024, is available at the usual locations:
* http://download.java.net/maven/2/javax/el/el-api/1.0/
* http://repo1.maven.org/maven2/javax/el/el-api/1.0/
* http://search.maven.org/#artifactdetails|javax.el|el-api|1.0|jar
RichFaces 3.3.X does not compile when this JAR is used. It needs the "el-api-1.0.jar" from the old Maven 1 repo at http://download.java.net/maven/1/javax.el/jars/ (29309 bytes, SHA1 1e72d5b13b698f99058d35751a29f87ef3066e87).
You don't have to clear the whole local repository or circumvent your Maven proxy. It is just enough to delete all files in %HOME_DIR%\.m2\repository\javax\el\el-api\1.0\ and download http://download.java.net/maven/1/javax.el/jars/el-api-1.0.jar into that folder.
There are many comparison lists to find on the web, but this is one I've created after I tested GIT. I have a lot of experience with Subversion, but I was wondering what the power/advantages of GIT are.
GIT is a free distributed revision control, or software source code management project with an emphasis on being fast. GIT was initially created by Linus Torvalds for Linux kernel development.
Every GIT working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.
Several high-profile software projects now use GIT for revision control, most notably the Linux kernel, Perl, Samba, X.org Server, Qt (toolkit), One Laptop per Child (OLPC) core development[5], Ruby on Rails web framework, VLC, Merb, Wine, SWI Prolog, DragonFly BSD and the Android mobile platform.
This evening, I played a little bit with Oracle JDeveloper 11g (http://www.oracle.com/technetwork/developer-tools/jdev/overview/index.h…). I'm using Eclipse since 2007 as IDE and I'm very happy with it, but I was wondering how JDeveloper works.
I wanted to import some existing Java projects into my JDeveloper workspace. I'm used to run the $ mvn eclipse:eclipse command to create a .project and .classpath file, but I noticed there's no $ mvn jdeveloper:jdeveloper command. However, after Googling, I found that Trinidad developed a custom plugin which does exactly the same.
To let it work, add the following tag in the pom.xml file:
<build> <plugins> <plugin> <groupId>org.apache.myfaces.trinidadbuild</groupId> <artifactId>maven-jdev-plugin</artifactId> </plugin> </plugins> </build>
Then, run the following command:
$ mvn jdev:jdev
This command will create a JDeveloper .jpr project file which you can easily import in JDeveloper.