While fighting some more problems with Sharepoint 2007 Variations "System" I had to write this comment in my code today:
// note: there is a bug in Sharepoint 2007 when using ", " within a page name - "foo, bar.aspx" for instance. // note: This will render the relationship list entry useless. A healthy object id attribute in a // note: relationship list's entry looks like this: // note: ows_ObjectID='http://mucskysp04:4711/DE/Seiten/Seite mit Sönderzeichen.aspx, /DE/Seiten/Seite mit Sönderzeichen.aspx' // note: once "broken" using the naming-"exploit", the relationship will be represented as: // note: ows_ObjectID='http://mucskysp04:4711/DE/Seiten/variationsseite, mitkommaundleerzeichen.aspx' // note: note the missing relative path. There is no reason to work around this bug in this tool since the original // note: entry in Sharepoint won't be functional anyway (no entries will be shown in the variations dropdown)
So, here it is. Thanks to http://isitdarkoutside.com you will never have to trouble yourself with the question "is it dark outside?" anymore. This super-advanced Android application will let you focus on more important questions such as "which shoe goes on which foot?" from now on. Thank us later.
You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.
Version 0.1 - 2010-02-07,
Version 0.0.1 - 2010-02-05,
Version 0.0.0 - 2010-02-05
N/A - Dev-Snapshot, link removed
It's actually pretty simple, but many small things can go wrong. So, here is your small boilerplate code for a XUL overlay which renders a small canvas area in the status bar:
<?xml version="1.0"?> <overlay id="myOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> <statusbar id="status-bar"> <statusbarpanel> <box> <html:canvas id="myCanvas" width="15" height="15" style="border:1px solid black;"/> </box> </statusbarpanel> </statusbar> </overlay>
and some simple painting in JS:
var canvas = window.document.getElementById("myCanvas"); var ctx = canvas.getContext("2d"); ctx.fillStyle = "red"; ctx.fillRect(5,5,5,5);
If done right, you will get a result like this
CANVAS in XUL
dojo.provide("myWidgets.Dialog"); dojo.declare ( "myWidgets.Dialog", [dijit.Dialog], { // summary: // extended version of the dojo Dialog widget with the option to disable // the close button and supress the escape key. disableCloseButton: true, /* *********************************************************** postCreate */ postCreate: function() { this.inherited(arguments); this._updateCloseButtonState(); }, /* *************************************************************** _onKey */ _onKey: function(evt) { if(this.disableCloseButton && evt.charOrCode == dojo.keys.ESCAPE) return; this.inherited(arguments); }, /* ************************************************ setCloseButtonDisabled*/ setCloseButtonDisabled: function(flag) { this.disableCloseButton = flag; this._updateCloseButtonState(); }, /* ********************************************** _updateCloseButtonState */ _updateCloseButtonState: function() { dojo.style(this.closeButtonNode, "display",this.disableCloseButton ? "none" : "block"); } } );
Just in case you run into OutOfMemory Exceptions while requesting a large data chunk from the MySQL: the JDBC driver will load ALL (yes, ALL) rows before passing it to your fancy, agile and low-footprint routine. Tweaking the fetchSize property of a statement won't do any good either... well, not without some voodoo. So, here is how you can get the JDBC driver to get you a nice and tight StreamingResultSet:
st.setFetchSize(Integer.MIN_VALUE); // Inter.MIN_VALUE <- and ONLY this value, 1,5 or 100 won't fix your problem.
Reflection and me? Big friends. With all the love and hate a good friendship should have. A few days ago it was all about hate again. I had a bunch of service classes, some of them would implement a generic interface... Let's call it IHasAdorable - so a Service-Implementation could look like this:
public class MarketMerchant : IHasAdorable<CheeseBurger>, IProductSeller { // defined in IHasAdorable CheeseBurger BuyAdorable() { } // defined in IProductSeller IProduct Buy(String eanCode) { if (eanCode.equals("12345")) return this.bigStackOfSmellyFishburgers.Pop(); else } }
Now lets assume we want to browse through ALL market merchants and have a look if they have any adorable products. Let's skip the iteration process and pay attention to the probing of all market merchants in order to buy a adorable product from each of them. First attempt might be to use "is":
IProductSeller merchant; // iteration goes here { // this wont work. We are selling something very special, not just a stupid object! // Casting to IHasAdorable<> won't even compile. }
// `1 means there is 1 Generic parameter Type adorableInterfaceType = merchant.GetType().GetInterface("IHasAdorable`1"); if (adorableInterfaceType != null) { // yay, the merchant has adorable products, what whould those be!? Type adorableProductType = adorableInterfaceType.GetGenericArguments()[0]; // here is the magic we need to get the correct IHasAdorable Type // with "filled in" generic type. Type genericAdorableInterfaceType = MethodInfo mi = genericAdorableInterfaceType.GetMethod("BuyAdorable"); myBagOfAdorableProducts.Add(mi.invoke(merchant,null)); }
If you run into the same issue, disable IPv6 support in Firefox:
about:config -> network.dns.disableIPv6 -> true
Apparently Firefox and Microsoft Internet Information Server do not like to play together nicely on Vista without human intervention.
public static IDictionary<RequestTypeEnum, RequestGroupEnum> { {RequestTypeEnum.RegisterAccount, RequestGroupEnum.Account}, {RequestTypeEnum.UnregisterAccount, RequestGroupEnum.Account}, {RequestTypeEnum.RegisterInetAccess, RequestGroupEnum.InetAccess}, {RequestTypeEnum.UnregisterInetAccess, RequestGroupEnum.InetAccess}, {RequestTypeEnum.RegisterMailbox, RequestGroupEnum.Mailbox}, {RequestTypeEnum.UnregisterMailbox, RequestGroupEnum.Mailbox}, {RequestTypeEnum.RegisterRLA, RequestGroupEnum.RLA}, {RequestTypeEnum.UnregisterRLA, RequestGroupEnum.RLA} };
Atomic RouterThis issue has been puzzling me for some time. I have this Atom based home-brew router sitting on the shelf with a 2TB drive attached to it. So yes, it does also serve as a NAS, Meda-Server etc. All the good stuff. So theoretically it should be also a good place to backup my data to – in case one of the workstation harddrives fails – been there, done that. No IBM drives for me since that incident.
So, where is the catch? Backing up private and sensitive data to that device would be almost insane, this nice piece of hardware is directly connected to the internet and thus exposed to a variety of break in attempts. What if one of these is successful? Riiiite, I would be fu***. Properly.
The solution is very obvious; encrypt your data before you move it onto the server. But how would one do that using a windows client and free software only? There are several ways to achieve that. You could choose to write a batch script, use 7zip or something to compress / password protect that data and copy it over to the other side.
Since I don’t really like batch scripting and prefer doing fancy stunts using bash, I choose cygwin, cron (running as NT service, @see /usr/share/doc/Cygwin/cron-4.1-7.README) and openssl to encrypt that data. So, here is the one-liner doing all the work:
tar cz MyImportantDataDirectory | openssl des3 -salt -pass pass:SECRET | ssh pulsar@router "cat > /mnt/backups/documents-daily.tar.gz.des3"
Go crazy now! Use the week-number to create a series of backups instead of the daily snapshot, remove old backup sets etc. Once you have that script, schedule it using the cron (crontab –e) and watch your sensitive data being backed up automagically. /me likes!
Here is a small application I wrote from pure boredom and curiosity.
It is a pathetic attempt to simulate a dream machine. It is supposed to
provoke hallucinations by stimulating the optical nerves with a specific
frequency. That simulation can alter the brainwaves and make you see
complex patterns of color behind your closed eyelids.
Did not work for me – might work for you.
I’ve read an article on this topic some time ago and got curious. I made this stupid application to give it a try.
Do you? Head over to http://en.wikipedia.org/wiki/Dreamachine