Skip to content

Luventas Web Design

A new blog for developers in PHP, Java and mobile Development

General
Wie mache ich meine Webseiten schöner?
28 Oktober 2011
JavaScript
Email address validation check
31 Mai 2011
PHP
Create thumbnail from image with PHP
25 Mai 2011
Genealogy
Create a database from your GEDCOM file
27 Mai 2011
iOS / Objective-C
Remove / Add (Hide) UITabbarItems on the fly
19 September 2012
General
Start of Luventas Web Designs Blog
19 Mai 2011

Apache commons GenericObjectPool

Posted on 8 Mai 2013 By luventas 1 Kommentar zu Apache commons GenericObjectPool
Java, Spring

In a Spring MVC project I have inserted the GenericObjectPool of Apache commons. This library has done what it should for several months, until the visitor counts reached a big number. Since this time, the Jetty server breaks down with heapspace exhausted.

Read More „Apache commons GenericObjectPool“ »

Print Friendly, PDF & Email

Apache commons GenericObjectPool

Posted on 2 April 20135 April 2013 By luventas Keine Kommentare zu Apache commons GenericObjectPool
Java, Spring

In einem Spring MVC Projekt habe ich den GenericObjectPool von Apache commons eingebaut. Dieser hat einige Monate scheinbar getan, was er sollte, bis das Projekt Zugriffszahlen erreicht hat, die ein gewisses Limit überschritten haben. Seit dem ist der Server, ein Jetty, regelmäßig mit Heapspace exhausted abgeschmiert.

Read More „Apache commons GenericObjectPool“ »

Print Friendly, PDF & Email

Problems with BadgeValue text color when overwrites UILabel

Posted on 3 Januar 20133 Januar 2013 By luventas 1 Kommentar zu Problems with BadgeValue text color when overwrites UILabel
iOS / Objective-C

If you overwrite the UILabel in Objective C, for example to get the functionality of VerticalAlign, like I wanted to do, You can get bad side effects.

I used a small code part I found on Internet, to get this functions.

Source code   
@implementation UILabel (VerticalAlign)
- (void)alignTop {
    CGSize fontSize = [self.text sizeWithFont:self.font];
    double finalHeight = fontSize.height * self.numberOfLines;
    double finalWidth = self.frame.size.width;    //expected width of label
    CGSize theStringSize = [self.text sizeWithFont:self.font  constrainedToSize:CGSizeMake(finalWidth, finalHeight) lineBreakMode:self.lineBreakMode];
    int newLinesToPad = (finalHeight  - theStringSize.height) / fontSize.height;
    for(int i=0; i<newLinesToPad; i++)
        self.text = [self.text stringByAppendingString:@"\n "];
}
 
- (void)alignBottom {
    CGSize fontSize = [self.text sizeWithFont:self.font];
    double finalHeight = fontSize.height * self.numberOfLines;
    double finalWidth = self.frame.size.width;    //expected width of label
    CGSize theStringSize = [self.text sizeWithFont:self.font constrainedToSize:CGSizeMake(finalWidth, finalHeight) lineBreakMode:self.lineBreakMode];
    int newLinesToPad = (finalHeight  - theStringSize.height) / fontSize.height;
    for(int i=0; i<newLinesToPad; i++)
        self.text = [NSString stringWithFormat:@" \n%@",self.text];
}
 
- (void)awakeFromNib {
    [super awakeFromNib];
    [self setFont:[UIFont fontWithName:@"KievitPro-Regular" size:12.0]];
}
 
-(id)initWithFrame:(CGRect)frame {
    id result = [super initWithFrame:frame];
    if (result) {
        [self setFont:[UIFont fontWithName:@"KievitPro-Regular" size:12.0]];
    }
    return result;
}
 
@end

Read More „Problems with BadgeValue text color when overwrites UILabel“ »

Print Friendly, PDF & Email

Remove / Add (Hide) UITabbarItems on the fly

Posted on 19 September 20123 Januar 2013 By luventas Keine Kommentare zu Remove / Add (Hide) UITabbarItems on the fly
iOS / Objective-C

Some days ago, I searched for a solution to hide a TabbarItem from my app but select it programmatically. In all forums and blogs was written, that this is not possible. Hiding a TabbarItem means to remove it from the Tabbar or, on other places, hiding means to disable it, but a disabled Item is still visible only not selectable.

What to do now? Is there an intermediate solution? Yes, it is, somehow:

Read More „Remove / Add (Hide) UITabbarItems on the fly“ »

Print Friendly, PDF & Email

Include Facebook „Post to your wall“ in your App

Posted on 7 September 2012 By luventas 1 Kommentar zu Include Facebook „Post to your wall“ in your App
iOS / Objective-C

I’m somhow a newbee in developing iPhone-Apps. This means a lot of searching in iNet, try-and-error and „throwning the mac out of the window“…

My task was to implement social networks in my app.
Twitter: 15 minutes
Mail: 2 hours
Facebook: 8 days (!!)

The examples from facebook, which are delivered with their framework, are somehow really good, but they do to much things for me. I only wanted to post to the users wall, nothing more. So I took the code from their samples, include them in my app -> DAMN, nothing works anymore.

Read More „Include Facebook „Post to your wall“ in your App“ »

Print Friendly, PDF & Email

Repariere deine NVIDEA Notebook GPU / Grafikkarte

Posted on 1 Juni 20123 Januar 2013 By luventas 26 Kommentare zu Repariere deine NVIDEA Notebook GPU / Grafikkarte
General

Wie ich im Internet im Zuge meiner tagelangen Recherche feststellen musste, haben sehr viele das gleiche Problem wie ich es nun hatte. Nach wenigen Jahren sitzen Sie vor einem eigentlich noch hervorragenden mobilen Rechner (in meinem Falle ein Dell Latitude D830, 4 Jahre alt) und können ihn nicht mehr nutzen, da die Grafikkarte, welche onboard mit dem Mainboard verbundelt ist, den Geist aufgegeben hat. Zunächst seht ihr Streifen, Pixel und komische Zeichen im Bild. Dann wird der Bildschirm komplett schwarz.

Read More „Repariere deine NVIDEA Notebook GPU / Grafikkarte“ »

Print Friendly, PDF & Email

Informationen aus mehreren Reihen trotz „GROUP BY“

Posted on 7 November 20117 November 2011 By luventas Keine Kommentare zu Informationen aus mehreren Reihen trotz „GROUP BY“
MySQL

Folgendes Szenario:

Ich habe eine Datenbanktabelle, in der zu einem Benutzer in mehreren Reihen eine Information steht.

Source code   
user_id, date, information_about_user_on_date
1, 2011-11-01, information_1
1, 2011-11-02, information_2
1, 2011-11-03, information_3

Diese Informationen möchte ich in einer Reihe anzeigen, ohne mir alle Zeilen einzeln holen zu müssen. In SQL gibt es zwar die schöne Funktion „GROUP BY“, hier würde ich aber nur noch eine der Informationen erhalten.

Read More „Informationen aus mehreren Reihen trotz „GROUP BY““ »

Print Friendly, PDF & Email

Information from several rows in spite of „GROUP BY“

Posted on 7 November 20117 November 2011 By luventas Keine Kommentare zu Information from several rows in spite of „GROUP BY“
General

Following scenario:

I have a database table, where information about an user is stored in several rows.

Source code   
user_id, date, information_about_user_on_date
1, 2011-11-01, information_1
1, 2011-11-02, information_2
1, 2011-11-03, information_3

This information I want to show in one single line without getting this information row by row. SQL has the nice functionality „GROUP BY“ but by using this normally I’m only getting one information.

Read More „Information from several rows in spite of „GROUP BY““ »

Print Friendly, PDF & Email

Wie mache ich meine Webseiten schöner?

Posted on 28 Oktober 2011 By luventas 4 Kommentare zu Wie mache ich meine Webseiten schöner?
General

Jeder, der schon einemal eine Webseite erstellt hat, kennt folgendes Problem:

Du entwickelts dein Webprojekt lokal auf deiner Maschine. Alles sieht gut aus, genau, wie du es dir vorgestellt hast. Dann lädst du diese Seite auf den Webserver und testest, ob es immer noch so aussieht, wie es soll. Ja, alles ist wunderbar!

Dann ruft dich ein Freund an und fragt: Was hast du denn da gemacht? Sieht ja furchtbar aus! Die Texte sehen ganz furchtbar aus und die Abschnitte sprengen dein Seitendesign!

Wie kann das Sein?! Der Grund ist, dass auf deinem System die Schiftarten, die du verwendet hast, existieren uns somit von Browser geladen werden können. Auf anderen Systemen existieren diese vielleicht nicht. Nur Verdana, Arial und eine handvoll anderer Schriftarten sind Standard auf jedem System und somit verfügbar. Du möchtest aber spezielle Schiftarten verwenden, die besser in dein entwickeltes Design passen.

Read More „Wie mache ich meine Webseiten schöner?“ »

Print Friendly, PDF & Email

How to make your Website texts nicer

Posted on 28 Oktober 2011 By luventas 2 Kommentare zu How to make your Website texts nicer
General

Everybody knows that problem:

You develop your Website on your local system. Everything looks nice and good. Then you upload your code on your Webserver, test, if everything looks like it should and you are happy.

Then a friend calls you and you got to here: What have you done? It looks horrible! The Texts are looking bad and the Paragraphs are breaking the page design!

How can that be? The Reason is, that on your System the Fonts, you are using are existing and can be loaded by the browser. On other Systems maybe that fonts are not existing. Only Arial and Verdana and a hend full of other fonts are installed on every system. But you want to use special fonts for your website that are fitting better in your design.

Read More „How to make your Website texts nicer“ »

Print Friendly, PDF & Email

Beitragsnavigation

1 2 … 4 Nächste

Copyright © 2023 Luventas Web Design.

Theme: Oceanly News by ScriptsTown

Diese Website nutzt Cookies, um bestmögliche Funktionalität bieten zu können. OK, verstanden
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
immer aktiv
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SPEICHERN & AKZEPTIEREN