Tuesday, June 26, 2012

Warning: Parameter 1 to IcemodMainMenuHelper::IcebuildXML()



For few days i had headache because of icemod menu which was installed in web site which i got zipped by Akeeba Backup tool based on Joomla.

Finally after many restores, i got notification in place where error appeared:
Warning: Parameter 1 to IcemodMainMenuHelper::IcebuildXML() expected to be a reference, value given in blah...blah...\libraries\joomla\cache\handler\callback.php on line 99
Googling the error i found solution for it:
1. Go to your Joomla files
2. Go to this directory \templates\...template name...\html\mod_mainmenu ( ...template name... - your template name )
3. Open to edit helper.php
4. Find line 31 with this code:
function IcebuildXML(&$params)
5. Delete "&" sign or replace the line with this one:
function IcebuildXML($params)


It helped me. Good luck you.

Source: http://www.icetheme.com/Forums/Feedback-regarding-IceTheme-Website/37034-the-problem-with-the-main-menu.html

Monday, June 25, 2012

Multiple mysql insert quiery

i was trying to insert a lot ( 1.000.000 ) values into single table with single query, because inserting each value takes much longer time.

table looks like:

id , value

so solution is to create array with php of the values:

code:
    $insert = array();
    for($i=0;$i<=950000;$i++)
    {
      $insert[] = "('".md5(rand(0,1000))."')";
    }

and then executing the query:

$sql = "INSERT INTO `skelbimai` ( `value` ) VALUES ".implode(",",$insert)." ";
ALSO

You might have problem with time limit. so i set up this limit:

set_time_limit(1800);
Also you might have problem with memory_limit, so use it:
ini_set('memory_limit', '150M'); 

Good luck. 

Wednesday, June 13, 2012

Blockly - Google's programming language

Blockly is a web-based, graphical programming language. Users can drag blocks together to build an application. No typing required.
Blockly is currently a technology preview. We want developers to be able to play with Blockly, give feedback, and think of novel uses for it. All the code is free and open source. Join the mailing list and let us know what you think.
You can try to programm with Blockly by your self.
  • Maze - Use Blockly to solve a maze.
  • Code - Export a Blockly program into JavaScript, Dart, Python or XML.
  • RTL - See what Blockly looks like in right-to-left mode (for Arabic and Hebrew).
 
My result for Maze:

Saturday, June 2, 2012

Portal fan film



http://facebook.com/syntheticph
http://facebook.com/Aperture.A.TriumphofScience
http://syntheticph.com

Click to tweet: http://clicktotweet.com/3XuMG

Aperture: Lab Ratt is a live action interpretation of VALVe's web comic 'Portal 2: Lab Rat' and follows the story of the schizophrenic hero behind the walls; Doug Rattmann.

Buy the Lab Ratt shirt here!
http://redbubble.com/people/ryanoxerous/works/8919701-aperture-lab-ratt

Aperture Science Radio by Ace Replicas
http://www.facebook.com/pages/Ace-Replicas/115418035213077

Music
"In A Dream"
"I'm Not Here"
"SFHK (Mental Breakdown)"
"Back To The Start"
& "Halls Of Science 4 Cover" (bit.ly/Kybvs2)
By johnny_ripper
http://johnnyripper.bandcamp.com
http://soundcloud.com/johnny_ripper

"Something Strange"
& "And The Sky Opened Up"
By Matthew Mercer
http://mattmercer.com

Impress your friends! Get your very own Aperture Science Employee Identification Badge here etsy.me/LEgsvU

If you need to be caught up to speed, watch this,
http://www.youtube.com/watch?v=dteP3QK7JKA
read this,
http://www.thinkwithportals.com/comic/
& enjoy.

Created by Synthetic PictureHaus (Nick Celentano & Ryan Anthony Martin). 2012.
http://syntheticph.com