Want to recommend this?

admin

Welcome to my Blog, which is about me & my experiences as a Consultant. Feel free to add your comments, and I will add my comments, too.

 

I’ve stumbled upon an interesting interview by Ben Kepes, he talked to Lindsay Finch, Senior Global Privacy Counsel for Salesforce and Box.net co-founder and CEO Aaron Levie.

While reading the article, I was surprised to find a transparency report by Google, which contains details about Government Requests for content removal /user data. According to this report, the german law enforcement agencies made 1759 requests for personal data during the 1st half of 2011, compared to 11057 requests made by US law enforcement agencies.

Google also allows to download all data from the report as raw data, which can be useful when preparing a discussion about Privacy related to web-based services such as SaaS.

 

Currently, I’m doing some research about social networks and how to interact programatically with them. In fact, I was looking for some examples besides the well known players such as Facebook, Twitter, etc. and I found them on ProgrammableWeb.

This is probably the most accurate list of available API’s I’ve found so far, though it contains some dead links.

 

Max Schrems, an Austrian law student who has filed dozens of complaints about Facebook became the opportunity to sit down with Facebook’s European director of policy Richard Allen and another unidentified Facebook executive to discuss his concerns, especially about the “right to access”, which is a fundamental aspect of the European data protection law. This law entitles Europeans to know exactly what a company knows about them.

Schrems started to investigate about how Facebook treats privacy after he made a request to Facebook, where he received a file that was over 1,200 pages long, including everyone he had ever friended and de-friended, every event he had ever been invited to (and how he responded), a history of every “poke” he had ever received, a record of who else signed onto Facebook on the same computers as him, email addresses that he hadn’t provided for himself (but that must have been culled from his friends’ contact lists) and all of his past messages and chats, including some with the notation “deleted.”

For more information, read this article on Forbes or visit Schrem’s website Europe vs. Facebook.

 

Today, Marc Benioff announced on Twitter that Salesforce Labs has released a free, open-source but unofficial and yet unsupported Salesforce app for the iPad.

It has been localized in 7 languages and allows to create, edit, clone & delete standard and custom records, all kind of tabs are supported & it can be used with any environment (e.g. Production, Sandbox).

I guess this is going to be a huge success for Salesforce, even though the native Salesforce environment is allready very useful on the iPad.

 

 

 

 

 

I did it! Yesterday I’ve passed the Salesforce Certified Administrator exam (Winter’12 edition), now I’m looking forward to become a certified Developer / advanced Developer ASAP!

 

 

 

A few weeks ago I’ve had trouble with my HP Elitebook 8540p (Windows 7 64bit) - it instantly powered off without warnings.

After restarting the laptop, I did a quick Memory test (I got 8GB), without result. Next, I’ve monitored the behaviour of my laptop for a week and noticed the following:

  • the fan started to spin off for no reason, even if the laptop is in idle mode
  • the temperature of the GPU (Nvidia NVS 5100M) went up to ~80 Celsius (how do I know? Just download a small Desktop Gadget called “GPU Observer“)

It didn’t matter what I did, CPU usage & Memory load was always as expected, but my fan & the GPU went wild!

I decided to have a look at the components, I removed the keyboard (Instructions) & voilà – there was a lot of dust between the fan and the vent! HP offers a manual titled “HP Notebook PCs – Reducing Heat and Fan Noise by Cleaning Air Vents“, but I don’t recommend to follow the procedure exactly as described. The reason is that they just blow compressed air through the vents, and the dust will remain in the laptop.

I bought a can of compressed air (you can get it on eBay, Amazon, etc.) and blowed the air through the vents while the keyboard was removed. I was surprised how much dust came out, it was much more than what you can see when looking at the parts. After I reassembled the keyboard, I turned off  the option “Fan always on with AC” in the BIOS because I blamed this option for the quantity of dust.

The result was amazing: the average GPU temperature dropped by 25%, and even with all the fancy visual features of Windows 7 enabled, my laptop is running smooth, reliable – and silent. I haven’t had any problems since I cleaned my laptop, and I’m cleaning it now every 4 weeks.

 

Sweet, today I realized that I can add any movie based on Microsoft’s *.wmv format to iTunes, and it get’s converted automatically when I synch my iPhone 4! I’m using iOS 4.3.5 – maybe that’s the reason why this works.

I’m going to test other video formats as well, just to see what else I can put onto my iPhone ;-)

 

 

In the coming weeks I will update my blog with some insights about my newest project: a lightweight indexing & search solution for everyones Desktop, using Apache Tika & Lucene - just expect more to come!

 

Yesterday I decided to use a custom formatter for my logfiles. Why? Because I thought it would be nice to have a nicely formatted piece of logfile rather than the old-school, black & white log files we all know:

But wait – there is more than just look & feel, writing your own formatter lets you control how exceptions are beeing logged and you can create Hyperlinks to lookup a solution for a problem directly from the logfile!

And here is what you need:

1. The Formatter

</pre>
package helper;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.Formatter;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.LogRecord;

/**
 * @see CustomHtmlFormatter
 * @author christian.meyer
 * @author stockholmconsulting
 * @version 1.0, November 2010
 */

public class CustomHtmlFormatter extends Formatter
{

 // This method is called for every log records
 public String format(LogRecord rec)
 {
 StringBuffer buf = new StringBuffer(1000);
 buf.append("<tr>");
 //Here we use an alternate background color for every 2nd row
 //(just to improve readability)
 /*if(row%2==0)
 buf.append("<tr>");
 else
 buf.append("<tr bgcolor = #C0C0C0>");*/

 buf.append("<td>");
 buf.append(getFormattedDate(rec.getMillis()));
 buf.append("</td>");
 buf.append("<td>");
 buf.append(rec.getLoggerName());
 buf.append("</td>");
 buf.append("<td>");

// Set the font color for levels >= WARNING to red
 if (rec.getLevel().intValue() >= Level.WARNING.intValue()){
 buf.append("<font color=\"#FF0000\">");
 }

 buf.append(rec.getLevel());
 buf.append("</td>");
 buf.append("<td>");
 buf.append(formatMessage(rec));

 //This happens if we get a throwable: we're iterating through the
 //stacktrace & printing everything nicely formatted
 if(rec.getThrown()!=null){
 buf.append("<font color=\"#FF0000\">");
 buf.append(": " + "<a href=\"http://www.google.de/search?q=" + rec.getThrown() +
 "\" title= \"Search at Google\" target=\"_blank\">" + rec.getThrown() + "</a><br>");

 StackTraceElement[] stackTrace = rec.getThrown().getStackTrace();
 for (StackTraceElement element : stackTrace)
 {
 String exceptionMsg = "at " + element.getClassName() +
 " (" + element.getMethodName() + ":" +
 element.getLineNumber() + ")<br>";
 buf.append(exceptionMsg);
 }
 }

 buf.append('\n');
 buf.append("/td>");
 buf.append("</tr>\n");
 return buf.toString();
 }

private String getFormattedDate(long millisecs)
 {
 SimpleDateFormat date_format = new SimpleDateFormat("HH:mm:ss");
 Date resultdate = new Date(millisecs);
 return date_format.format(resultdate);
 }

// This method creates the basic HTML structure. You can add your own
 // CSS after the <style type="text/css"> tag
 public String getHead(Handler h)
 {
 return "<HTML>\n<HEAD><title>Datamasker logfile</title>\n" +
 "<link rel=\"stylesheet\" type=\"text/css\" href=\"datamasker.css\" />" +
 /*"<style type=\"text/css\">\n" +
 "caption {font-size: 1.7em; color: #F06; text-align: left;}\n" +
 "heading {font-family: Arial; font-size: medium; color: #555; text-decoration:underline; font-weight: bold; text-align: center }\n" +
 "footer {font-family: Arial; font-size: x-small; color: #555; text-align: right }\n" +
 "body {font-family: Arial; font-size: small; color: black; text-align: left }\n" +
 "table {margin: 0; padding: 0; border-collapse: collapse; width: 100%;}\n" +
 "td, th {padding: 1px 4px; border-bottom: 1px solid #EEE;}\n" +
 "td + td {border-left: 1px solid #FAFAFA; color: #999;}\n" +
 "td + td + td {color: #666; border-left: none;}\n" +
 "td a {color: #444; text-decoration: none; text-align: left;}\n" +
 "td a, th a {display: block; width: 100%;}\n" +
 "td a:hover {background: #444; color: #FFF;}\n" +
 "tfoot th {text-align: left;}\n" +
 "th {text-align: left;}\n" +
 "th + th {text-align: left;}\n" +
 "th + th + th {text-align: left;}\n" +
 "th a {color: #F06; text-decoration: none; font-size: 1.1em;}\n" +
 "th a:visited {color: #F69;}\n" +
 "th a:hover {color: #F06; text-decoration: underline;}\n" +
 "thead tr, tfoot tr {color: #555; font-size: 0.8em;}\n" +
 "tr {font: 12px sans-serif; background: repeat-x #F8F8F8; color: #666;}\n" +
 "tr:hover {background: #FFF;}\n" +
 "</style>\n" +*/
 "</HEAD>\n" +
 "<BODY>\n" +
 "<heading>Datamasker Logfile: " + (new Date()) +"</heading><br>\n<br>" +
 "\n<PRE>\n" +
 "<table rules=\"all\"; cellpadding=\"2px\">\n " +
 "<tr bgcolor = #A9A9A9><th>Time</th><th>Source</th><th>Type</th><th>Message</th></tr>\n";
 }

// This method appends the necessary closing tags
 public String getTail(Handler h)
 {
 return "</table>\n</PRE>\n <footer>Copyright Stockholmconsulting 2010</footer> \n </BODY>\n</HTML>\n";
 }
}
<pre>

2. A logger which writes to a file using our formatter

private static final Logger rootLogger = Logger.getLogger(MainClass.class.getName());

rootLogger.setLevel(Level.INFO);

		fileHTML = new FileHandler("Logging.html");

		//Create HTML Formatter
		formatterHTML = new CustomHtmlFormatter();
		fileHTML.setFormatter(formatterHTML);
		rootLogger.addHandler(fileHTML);

rootLogger .info("Starting logfile");
rootLogger.entering(this.getClass().getName(), "theNameOfTheMethod");
rootLogger .severe("Serious information");
Throwable ex = new IllegalArgumentException("Some exception text");
    rootLogger .log(Level.SEVERE, "Some message", ex);
rootLogger.exiting(this.getClass().toString(), "End of method");

Of course you can put the css into a file, there is no need to put everything into the code.
In this case, simply put the following line right after the <Head>:

“<link rel=\”stylesheet\” type=\”text/css\” href=\”nameOfYourCSSFile.css\” />”

As you can see it is pretty simple to create your own formatter, of course it is possible to use your own CSS, Logo, whatever you want – I hope you enjoy it ;-)

 

embedded by Embedded Video

© 2011 Developer's Blog Suffusion theme by Sayontan Sinha