Skip to main content

Posts

Showing posts from May 8, 2012

Can"t understand why Zend_Mail::addHeader() strips newlines

(Since this is my first SO question, let me just say I hope it's not too Zend-specific. As far as I can tell this shouldn't be a problem. Although I could have posted it in a Zend-specific forum, I feel like I'm at least as likely to get a good answer here, especially since the answer might involve MIME-related issues that transcend Zend Framework. I'm basically trying to understand whether the issue I'm facing should be considered a ZF bug, or if I'm misunderstanding something or misusing it.)

How to use Turtle sparql php

I'm trying to filter this database written in Turtle @prefix : <http://www.essepuntato.it/resource/> . @prefix vcard: <http://www.w3.org/2006/vcard/ns#> . @prefix cs: <http://cs.unibo.it/ontology/> . :pt0001 vcard:category "Poste e Telegrafi" ; vcard:fn "Ufficio Bologna 1" ; vcard:extended-address "Via Cairoli 9, Bologna BO, Italy" ; vcard:latitude "44.504192" ; vcard:longitude "11.338661" ; vcard:tel "051 243425" ; vcard:fax "051 244459" ; cs:opening "Mon, Tue, Wed, Thu, Fri: 0800-1330. Sat: 0800-1230." ; cs:closing "01-01, 01-06, P, LA, 04-25, 05-01, 06-02, 08-15, 11-01, 12-08, 12-25, 12-26: .".

Multiple models vs single model

I have a question about MVC. Particularly about models. Suppose that I have a category table in my database. Now I would like to get results both for a single category for detailed view and multiple categories for a listing. Also I may need to query a number of categories for different purposes.

How to layout widgets using DockLayoutPanel and UiBinder in GWT 2.0?

I'm trying to get a simple layout working under GWT 2.0 using UiBinder. The layout I'm trying to get is one that mimic Java's BorderLayout in where you can specify different panels in the north, south, east, west and center directions; for that I'm using DockLayoutPanel. I would like to get a header and footer, both with fixed width. The remaining viewport space would be occupied by the widget assigned to the DockLayoutPanel center slot.

Good tutorials on Bitwise operations in Java

Can anyone please point me to good online tutorials on Bitwise Operations (preferably in Java)? Before anyone write LMGTFY, I've already Googled it but couldn't find one with good examples. Java's own tutorial is also not that extensive and doesn't clearly explain what is going under the hood. I'm a visual learner; so, if there are any resources with good 'working' examples, that would help me a lot. Thanks.

When should I create a new Exception class

I notice that a number of Java exception classes differ only in the name of the class and do not add any new functionality. Most exceptions for example just seem to override Exception() or Exception(String message) . This goes against the tenets of inheritance ie:- inherit to add new functionality.

Problem unmarshalling parcelables

I've got a few classes that implement Parcelable and some of these classes contain each other as properties. I'm marshalling the classes into a Parcel to pass them between activities. Marshalling them TO the Parcel works fine, but when I try to unmarshall them I get the following error: