Azt hittem ilyen már nincs... 

[ 1 hozzászólás ] ( 9 megtekintés ) [ 0 trackbackek ] permalink ( 3 / 124 )
When the CakePHP session does not works 

I have migrated one of my CakePHP based webapplication to an another webhosting provider, and my Session stopeed working. The setFlash messages was not displayed, and the authorization does not worked.

The solution was simple but not obvious.
The Sessionhelper sends a cookie to you browser (CAKEPHP by default) containing your session id and store your session data on the server. This storage method can be selected with the Session.defaults.

At first I have suspected the php builting session which in the default case does the session data storage on the server. After creating some minimal tests the php built in session handling seemed to be working. Later I have realized that my CAKEPHP cookie had been never sent to my browser. I have created a small test to the php's setcookie function. It worked. I have realized the following section of the manual:
Like other headers, cookies must be sent before any output from your script (this is a protocol restriction). This requires that you place calls to this function prior to any output, including <html> and <head> tags as well as any whitespace.


After I have added a newline before my php start tag the test stopped working in the new environment, but worked on my dev box.

And yes after some code ditching I have found the malicious code:
I have left a tab in my UsersController before the php start tag...
[ hozzászólás ] ( 1 megtekintés ) [ 0 trackbackek ] permalink ( 3 / 120 )
Android Studio - Waiting for device @ Ubuntu 

I have started to develop to Android on Ubuntu.
At my first attempt when I have tried run my app on the device, the device shown up as ?????????? in the Android Studio Choose Device dialog.

The problem root cause is the access rights around the device descriptors.

The ADB daemon is started with the user's permissions, so I had created an udev rule to get access to the device:

mm@lapos:/opt/android-studio/bin$ cat /etc/udev/rules.d/51-android.rules
# Concorde tablet (18d1:0003)
ATTR{idVendor}=="18d1",ATTR{idProduct}=="0003" MODE="0666"

[ hozzászólás ] [ 0 trackbackek ] permalink ( 3.1 / 117 )
AVR libc _delay_ms() does not works after upgrading to Ubuntu Raring Ringtail 

After upgrading my system to kUbuntu 13.04 Raring Ringtail the delays in my avr-gcc compiled binaries had been gone.
After reading the #include <util/delay.h> documentation my eyes cached the __DELAY_BACKWARD_COMPATIBLE__ macro. After defining it the delays are working.

Workaround:

#define F_CPU 16000000UL
#define __DELAY_BACKWARD_COMPATIBLE__
#include <util/delay.h>
#include <avr/io.h>

int main(void
{
DDRB = 0xFF;
while (1) {
PORTB = ~PORTB;
_delay_ms(1000);
}
}



[ hozzászólás ] [ 0 trackbackek ] permalink ( 3 / 112 )
Nokia VS JSR-234 FlashControl 

My father have a Nokia 6303i Classic, and he missed one feature from it: to be able to use the camera flash as torchlight.

According to the Device speciications, it supports the JSR-234:
http://www.developer.nokia.com/Devices/ ... i_classic/

1 Contains: CameraControl, SnapshotControl, FlashControl, FocusControl and ZoomControl

i have ditched together a small Midelt, and tried to run it on the device, but I get Flash method not supported exception.

Okay, lets check the getSupportedMethod

And the device have only one supported Flash mode the FlashControl.OFF.

I have not been able to believe it, so I have tried the Nokia C3-01 and the X2-00 at at the NOKIA RDA

But both devices produced the same behaviour.
Come on, why the hell did they implemented this API if it simply useless...
[ hozzászólás ] ( 5 megtekintés ) [ 0 trackbackek ] permalink ( 3 / 138 )

<< <Előző | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Következő> >>

 
számláló