Archive for the ‘Tip’ Category

Posted by Tatyana at 5 September 2011

Category: Dev, Java, Tip

To see all the sqls that your application do during execution, insert the following property in your test xml property file:

<bean id="sessionFactory"
		class="my.class.MyEntitySessionFactory">
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.show_sql">true</prop>
			</props>
		</property>
		<property name="dataSource" ref="dbDataSource" />
</bean>
VN:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
Share

Posted by Tatyana at 31 August 2011

Category: Dev, Java, Tip

/** @deprecated this one must be resolved differently */
@Deprecated
public void setModeChange()
{
   this.mode = Mode.CHANGE;
}
VN:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
Share

Posted by kent at 9 May 2011

Category: Tip

Tags: , ,

open failed: administratively prohibited

Is an error where you are doing circular port forwarding.

This command will generate this error:

# ssh -L 0:1234:localhost:1234 localhost

Connect to localhost:1234 and you get this error in your ssh terminal.

VN:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
Share

Posted by Tatyana at 28 February 2011

Category: Java, Tip

Tags: , , , ,

If an autocomplete stopped working go

Window -> Preferences -> Java -> Editor -> Content Assist -> Advanced ->  check for “Other Java Proposals”

VN:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
Share

Posted by kent at 22 January 2011

Category: Dev, Tip

Tags: , , ,

This code will open Explorer and select the file or folder given.

static void openInExplorer(string path)
{
    string cmd = "explorer.exe";
    string arg = "/select " + path;
    Process.Start(cmd, arg);
}
VN:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
Share

Posted by kent at 7 November 2010

Category: Game review, Tip

Tags: , , , , ,

This is how you gain access to the Nellis Air Force Base in New Vegas.

Once you start entering the area, you’ll get bombarded by the Boomers.

Overview picture:

This is how you enter the Nellis Air Force Base in New Vegas

Click the picture for full size image.

Refill with stimpacks, food, water, doctors bags when necessary.

And remeber to make the bet with George before you enter the area. If you have 60 speech or more you can lie to raise the wager to 700 after you’ve entered Nellis AFB and came back.

When you reach the gate you’ll be let in.

VN:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
Share

Posted by Tatyana at 28 September 2010

Category: Dev, Interessant, Tip

Likte veldig godt dette uttrykket til en av arkitektorene våre:

“Du skal behandle de som skriver kode som du behandler en vakker kvinne eller mann (merk at jeg ikke på noen måte antyder at de som koder kan være nettopp det), hvis du på død og liv må si sannheten så for gudsskyld pakk det inn i fagre ord :)

Espen Dalløkken

VN:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
Share

Posted by Tatyana at 10 April 2010

Category: Tip

Tags: ,


d

VN:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
Share

Posted by kent at 11 June 2009

Category: Dev, Tip

Tags: , ,

mdadm --assemble /dev/md0 /dev/sd[abcd]1
VN:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
Share

Posted by kent at 9 December 2008

Category: Dev, Tip

Tags: , , , , ,

After being puzzled by this error for some time, I finally was able to solve it with lots of help from my friend Simeon. GTK+ ./configure failed both on emerge gtk+ and on a manual source build with these errors.

configure:33559: gcc -o conftest -g -O2 -Wall -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1       conftest.c -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0    >&5
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libcairo.so: undefined reference to `XRenderFindStandardFormat'
/opt/blackdown-jdk-1.4.2.03/jre/lib/i386/libXrender.so.1: undefined reference to `XMissingExtension'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libcairo.so: undefined reference to `XRenderQuerySubpixelOrder'
/opt/blackdown-jdk-1.4.2.03/jre/lib/i386/libXrender.so.1: undefined reference to `XextRemoveDisplay'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libcairo.so: undefined reference to `XRenderSetPictureFilter'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libcairo.so: undefined reference to `XRenderCompositeTrapezoids'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libcairo.so: undefined reference to `XRenderCompositeText32'
/opt/blackdown-jdk-1.4.2.03/jre/lib/i386/libXrender.so.1: undefined reference to `XextFindDisplay'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libcairo.so: undefined reference to `XRenderCompositeText16'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libcairo.so: undefined reference to `XRenderCompositeText8'
/opt/blackdown-jdk-1.4.2.03/jre/lib/i386/libXrender.so.1: undefined reference to `XextAddDisplay'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libcairo.so: undefined reference to `XRenderSetPictureTransform'
collect2: ld returned 1 exit status
configure:33566: $? = 1

While installing cairo, I got these warnings:

/sbin/ldconfig: /opt/blackdown-jdk-1.4.2.03/jre/lib/i386/libXxf86vm.so.1 is not a symbolic link
/sbin/ldconfig: /opt/blackdown-jdk-1.4.2.03/jre/lib/i386/libXxf86misc.so.1 is not a symbolic link
/sbin/ldconfig: /opt/blackdown-jdk-1.4.2.03/jre/lib/i386/libXxf86dga.so.1 is not a symbolic link
/sbin/ldconfig: /opt/blackdown-jdk-1.4.2.03/jre/lib/i386/libXv.so.1 is not a symbolic link
...

I found this:

grep -R VMHANDLE /etc/
/etc/csh.env:setenv VMHANDLE 'blackdown-jdk-1.4.2'
/etc/env.d/20java:VMHANDLE=blackdown-jdk-1.4.2
/etc/profile.env:export VMHANDLE='blackdown-jdk-1.4.2'
/etc/profile.csh:setenv VMHANDLE 'blackdown-jdk-1.4.2'

Opened up /etc/env.d/20java and commented everything. Then I did:

env-update
source /etc/profile

And I did:

emerge -av cairo gtk+

Which resulted in GTK+ being correctly configured, compiled, linked and installed!

VN:F [1.9.13_1145]
Rating: 5.0/5 (1 vote cast)
Share