vendredi, mars 28, 2008

Universal lua tostring

Universal tostring (also available here)


function table_print (tt, indent, done)
done = done or {}
indent = indent or 0
if type(tt) == "table" then

local sb = {}
for key, value in pairs (tt) do
table.insert(sb, string.rep (" ", indent)) -- indent it

if type (value) == "table" and not done [value] then
done [value] = true

table.insert(sb, "{\n");
table.insert(sb, table_print (value, indent + 2, done))
table.insert(sb, string.rep (" ", indent)) -- indent it
table.insert(sb, "}\n");
elseif "number" == type(key) then

table.insert(sb, string.format("\"%s\"\n", tostring(value)))
else
table.insert(sb, string.format("%s = \"%s\"\n", tostring (key), tostring(value)))
end

end
return table.concat(sb)
else
return tt .. "\n"
end

end

function to_string( tbl )
if "nil" == type( tbl ) then
return tostring(nil)
elseif "string" == type( tbl ) then
return tbl
elseif "table" == type( tbl ) then
return table_print(tbl)
else
tostring(tbl)
end
end

Example


print(to_string({"Lua",user="Mariacher",{{co=coroutine.create(function() end),{number=12345.6789}},
func=function() end}, boolt=true}))


This prints

"Lua"
{
{
{
number = "12345.6789"
}
co = "thread: 0212B848"
}
func = "function: 01FC7C70"
}
boolt = "true"

user = "Mariacher"

mardi, mars 18, 2008

"Automatically" test your resume

Catherine Palmiere writes in one of her mail I received: "It is vital to know that automation plays a new role in the hiring process. Companies now use special scanner and software packages and feed through resumes they receive in order to search for keywords and phrases. Spend those extra few minutes to customize your resume and use as much specific verbiage as possible from the ad itself. If they mention international travel, then you mention international travel too, etc."

Here is the opportunity to test your resume: http://jobetic.lingway.info/

The result is in french but it did a pretty good job analyzing mine which is 100% english written.

It understood RTF format much better than pure word/doc format.

dimanche, mars 16, 2008

When LinkedIn search engine is not working, use Spock

When LinkedIn search engine is not working, just use spock . Spock has access to Linkedin profiles and also to other web sites related to this person.

Innovation video and presentations

Video:

Every successful innovation will be taken for granted.

The innovation Radar:


Innovation Strategy
View SlideShare presentation or Upload your own. (tags: business strategy)