Weird php bug? : “” == 0

Posted by shadow_of__soul | Posted in Uncategorized | Posted on 18-01-2010

0

Hi,

just happened something weird, i have a sentence like this:

if($var!=”"){

}

the thing is that the var sometimes get the value of 0, and for some reason it returned false (something that never happened to me before in 3 years programming in php). anyway i understand that can be considered as normal, but i wondering if is a bug :s (why it don’t happened before )

the solution?

if($var!==”"){

}

i hope has been useful :D

Regards,

Shadow.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Bulkloader: GetDisplayObjectLoader always return null

Posted by shadow_of__soul | Posted in Uncategorized | Posted on 09-01-2010

0

Hi,

something weird that happened to my 2 days ago, i was working in a component that load images in a slideshow gallery, and like can load images from other url’s that are not where the swf is hosted, you can’t access the content of the loader for the security policies of flash, so the only way to show the loaded images is getting the loader (and in bulkloder the Loader-get(ID).loader don’t work also).

the solution was easy, just update your version of bulkloader to the last revision where this bug has been fixed :D

just i wanted to share this tip so someone else don’t lose time searching for it :)

Regards.

Shadow.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Focus on projects: The final challenge

Posted by shadow_of__soul | Posted in Uncategorized | Posted on 17-12-2009

0

Hi,

i going to talk about something that even after several years in this web/programming stuff just now i’m really doing in a effective way, the management/completion of projects.

i know that are a lots of articles on the web talking about freelance techniques, how to not be a lazy developer, how to work with clients etc.. this not pretend to be something like that, is just some personal opinion/tips that i realized based on my experience. also, don’t mean that articles like that are bad, indeed all are helpful in most of the cases but you just know to identify what going to work for yourself and try it.

Dont Waste time, just do it !

Is simply like that, all the people have ideas, maybe are great, maybe other are horrible, but till you try it, you don’t going to know it. the worst thing you can do is to drop an idea before you even started. it happened to my several times, and i learned from that when i see the same idea implemented by other guy and having a great success :) . if you idea is a web/software project, usually only take time and if you need to invest, you maybe need to put some bucks for a designer or for technical resources (as servers, domain etc..) so the risk is minimum if the idea don’t get successful (always talking from the side that you are a developer and you can program the project/idea of course). other times that happened to me a lot, is to never finish/continue the project i started, of course that the project for clients i always complete it, i’m not lazy at work, but i’m talking about personal projects.

Manage the flow of your time

at the beginning, i always see that i losted almost all the day and i didn’t completed anything, that usually happened why i get ditracted doing other things. a great aplication that helped me with this was WorkRave. basically let you set period of time to work and force you to rest  after each round of time. personally i have configured it with rounds of 40 minutes and rest of 5 in each, why rounds of 25 minutes and rest of 15 don’t wasn’t enough :P

The social media need to be a tool, not a distraction

when i started using the social media (like facebook, twitter, forums etc..), more than anything to know it how it work and use it in my benefit, they consume a lot of time, was a distraction why every notification i followed  to know what happened, commented etc.. if you use facebook/twitter as a enjoyment and a media tool, try to use it in your free time and try to put a limit of time per day/week so you don’t waste too much time and can use it in your projects.

You can be a nice person and say NO anyway

when i started to join in forums, more than anything to meet people who know more than me and learn from them and get more knowledge about programing and the web, was a nice decision, but also i meet people that know less than me, and that finally converted in a problem. i always been pro-active to help the people. i always tried to cheer them up when something get wrong, trying to solve code problems etc.. but i realized that help other people (and i even made work for free for them, yes i know, i’m a asshole :P ) take a lot of your time and you don’t get anything in return. for that i decided to focus that time in this blogs and do not help “personally” anymore, writing useful posts so i can reach more people, be more helpful and waste less of my time. maybe this sound some egoist, but is the truth :P

i hope this tips will help in some way, they are made from the pain of my ass after years working at this :P

Regards,

Shadow.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Actionscript: ExternalInterface

Posted by shadow_of__soul | Posted in Uncategorized | Posted on 16-12-2009

0

Hi,

today in this post i going to explain how to use this helpful class that have the purpose to call and receive the return of javascript functions from the flash enviorment.

Basically the function that make the trick is call(), this static function let you call any existent javascript function in the current document and get the returned value if exist.

in an example:

Flash side:

import flash.external.ExternalInterface;

var result:String=ExternalInterface.call(“alertFunction”,”Hello World”);

trace(result);

Javascript Side:

function alertFunction(message){

if(alert(message)){

return true;

}else{

return false;

}

}

As you see, in the flash part we are calling statically the call functions and passing as first parameter the name of the javascript function and secondly and string, that are the parameter required by the javascript function. there is no limit in the amount of parameter that can be passed to the call function and going to be passed to the javscript function when is called. also as you see, we are storing the value returned by the javascript function in a variable also to use it later.

it’s useful method to manipulate html info or elements from the flash using this function as a bridge.

as far as i know, it work also on actionscript 2 but i’m not sure. also this work on the major browser that have javascript supported but again, i’m not sure if it work in all (example: IE6, IE7 etc..)

i hope it help you to use this function and if you need more reference, just look at the adode docs :D

Regards,

Shadow.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Fotos EVA 2009

Posted by shadow_of__soul | Posted in Uncategorized | Posted on 07-12-2009

3

Fotos de la EVA 2009 :D

Google Wave Invitations Available !

Posted by shadow_of__soul | Posted in Uncategorized | Posted on 22-11-2009

5

Hi,

yep, i’m giving away 10 google wave invitations, leave here a comment and i going to make a lottery in a few days to decide the winner’s :)

be sure to leave your email in the comment or in the email field in the comment form :)

also, if you already have a google wave account, add me at shadow.of.soul08[at]googlewave.com :D

Regards,

Shadow.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

EVA Widget

Posted by shadow_of__soul | Posted in Uncategorized | Posted on 07-11-2009

0

Hi,

queda menos de 1 mes para el mega evento (?) para la industria de los VJ en argentina, y como para darle mas difusion hice este pequeño widget con el countdown con tal de que lo puedan agregar en sus blogs, sites, etc..

para ponerlo en su sitio, simplemente copien elcodigo debajo:

<object width="200" height="179">
<param name="movie" value="http://ipsilon-games.com.ar/eva.swf">
<embed src="http://ipsilon-games.com.ar/eva.swf" width="200" height="179">
</embed>
</object>

Regards,

Shadow.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

New Site: randgame.info

Posted by shadow_of__soul | Posted in Uncategorized | Posted on 11-10-2009

0

Hi,

the other day i was thinking to make a site where you play a random game each time you visit.

so, i have registered a domain and set it up:

Rand Games

need to do a lot of more work on it, i’m still thinking some features i can add and a proper design for it (that need to be light and at the same time, look nice)

As soon i make some changes, i going to post it here :)

Regards,

Shadow.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Change of design

Posted by shadow_of__soul | Posted in Uncategorized | Posted on 09-10-2009

0

Hi,

as you see, i changed the style of the blog, i hope you like it :D

Regards,

Shadow.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

OAuth and REST with AJAX or FLASH

Posted by shadow_of__soul | Posted in Uncategorized | Posted on 06-10-2009

0

Hi,

the last days i was working on a API for project. for that, i was needed to set a OAuth system. all went perfect but i have a problem when i wanted to use the API in a AJAX app.

as you already know, AJAX it’s a technique where you use javascript to request info to a page and show it to the user. as you also know, javascript it’s executed in the user machine, and for OAuth it’s a problem :s

no matter what how it’s implemented the OAuth system in the API that you need to use, you need always to send the $consumer_key and the $consumer_secret encrypted in the signature, also depending of the type of request, also need to send the $token and $token_secret, for that, you can’t include in any javascript way (or in a swf) any of this vars why compromise the security of the consumer, why any with this data can access to the protected resources as you.

for that, the solution it’s to create a bridge between your AJAX/FLASH app and the API/OAuth server.

the process it’s simple, create a php with a code like this:

<?php

//check if the one who are making the call to the bridge it’s trusted

//for that you can use a filter ip, an authenticated session or any method that fits your needs

$consumer_key=”lalala”;

if($trusted){

//making the request

$result=$OAuth->request($url_of_the_server.$_GET['service'],

$consumer_key,$consumer_secret,$_SESSION['token'],$_SESSION['token_secret']);

echo $result;

}

?>

of course the code can be diferent depending of your client library and stuff, but basically that are the steps to make the bridge:

1)check that the one who call the bridge it’s trusted or ahiterized, checking a sesssion var or anything what you have

2)make the request using the $service var that define the service to call to the service

3)print the result of the call and it’s done :D

i hope this give you some help at the time to use OAuth and REST with ajax and flash

Regards,

Shadow.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]