qanar.be http://www.qanar.be News from qanar.be Best wishes http://www.qanar.be/index.php?page=main&id=14 <center>The crew of <a href='http://www.qanar.be'>qanar.be</a> want to wish you all<br /> A merry Christmas<br /> and<br /> A happy 2010!<br /><br /> <img src='http://www.qanar.be/site/photo.php?id=114' /></center> SOLVING THE SLIDER PUZZLE part 1 - Introduction http://www.qanar.be/index.php?page=main&id=13 This series of articles is based on the <a href='http://thedailywtf.com/Articles/Sliding-Around.aspx'>Sliding Around</a> article on the Daily WTF. In this first part I will tell you more about the modelling of the slider puzzle and how the model discussed here could be extended even further.<br /> <br/> <pre> 1 | 2 | 3 ---+---+--- 4 | 5 | 6 ---+---+--- 7 | 8 | _ </pre> <br/> Used files:<br /> <a href='./programs/slider/PuzzleState.java'>PuzzleState.java</a>: State of a n*n sliderpuzzle.<br /> <a href='./programs/slider/Position.java'>Position.java</a>: small class to keep track of 2 integers that define a position in the grid.<br /> <a href='./programs/slider/Main.java'>Main.java</a>: contains main function and the actual solvers.<br /> <br /> There are several ways you can keep track of where all the pieces in the puzzle are. One way would be to just have 9 integers keeping track of each piece, 0 being the empty square. Another way would be to have a single or multidimensional array or vector. I chose for a one-dimensional array because it allowed me to work not with only puzzles of 3*3 but also 4*4 or any other number of pieces on the side.<br /> <br /> That vector however, is on the inside. What is important in a class are the public funtions and what they do. There 1 constructor. It will create a correctly solved puzzle with a edge-size of n. There is also a static method called <i>createRandom</i>. This function will return a puzzlestate with size n that has had x random moves. Thus this function always creates a solvable puzzle.<br /> <br /> <i>isCorrect</i> will return true when the puzzle is correctly solved.<br /> <br /> <i>getSquare</i> will return the value at the given position. Should the position be out of bounds an assert will trigger. <i>getEmptySquare</i> will return the position of the empty square.<br /> <br /> <i>makeMove</i> returns the puzzlestate following at the moving the piece at the specified direction into the empty space. If a move should not be possible, (being at the edge) the function will return null. <br/> example of the result of a moving the piece to the left of the empty square:<pre> 1 | 2 | 3 ---+---+--- 4 | _ | 6 ---+---+--- 7 | 8 | 5 1 | 2 | 3 ---+---+--- _ | 4 | 6 ---+---+--- 7 | 8 | 5 </pre> <br/> As last function there is <i>getPossibleMoves</i> which will return all possible puzzlestates following a move from this puzzlestate. <i>toString</i> and <i>equals</i> have no special prequisites and do what you expect them to do.<br/> <br/> This was an overview of puzzlestate. In the next part I will discuss how I made 2 solvers for this state and what else I would need for other solution methods. reset.css http://www.qanar.be/index.php?page=main&id=12 Ever wondered why your websites build with perfect HTML and CSS look different in different browers? That is due to the build-in stylesheets of each browers. There is however a solution for this. It's called a reset.css file. Basicly it standardizes cross-browser rendering on common elements, neutralizing browsers' built-in stylesheets. I used it this website too, my implementation is a quite standard one, targetting all basic HTML components. Feel free to use it if you wish. <br /><br /><a href="./reset.css">reset.css</a> News-categories http://www.qanar.be/index.php?page=main&id=11 News/blog now contains categories, so I can order my blog-post items better. Not all categories on main-page have articles linked to it. Should happen soon. I really want to start blogging. Heavy Metal in Games http://www.qanar.be/index.php?page=main&id=10 <p> 13 years after Nine Inch Nails writing the music for Quake, heavy-metal music is again on the uprise in games. Besides all the Guitar Heroes, Singalongs and other playback games there are several RPG's on the way that include metal-tracks. </p><p> <b>Sacred II</b><br/> First up is Sacred II. The title-track for this game, aptly named '<a href='http://www.youtube.com/watch?v=5fakNlghOJY'>Sacred</a>' was composed by Blind Guardian. The band members also appear in an in-game quest and cutscene. </p><p> <b>Chronicles of Spellborn</b><br/> Not all games are success stories. The Chronicles of Spellborn is a MMORPG set in a post-apocalyptic fantasy world. In June 2009, the developers of Spellborn, Spellborn NV, went bankrupt. The publisher, Acclaim, announced the following month that the game would be re-developed as a free-to-play game support by microtransactions. The new version would be released sometime after 2010, and until then the current pay-to-play/limited free-to-play version would remain active. </p><p> The Dutch band <a href=='http://www.tentonhammer.com/node/27156'>Within Temptation</a> wrote two songs for the game: "The Howling" and "Sounds of Freedom". </p><p> <b>Risen</b><br/> There's also <a href='http://www.youtube.com/watch?v=zG5hmNu7Sfw'>Risen</a>. A RPG due to be released on October 2, 2009. Preview-movies for this game include fragments of Nightwish 'Poet and the Pendulum'. </p><p> <b>Brutal Legend</b><br/> And then there's also <a href='http://www.eagames.co.uk/game/brutal-legend/'>Brutal Legend</a>. A game featuring all kinds of metal from <a href='http://gogaminggiant.com/2009/08/09/brutal-legend-tracklist-revealed/'>Ozzy Osbourne over Iced Earth to Motorhead</a>. </p><p> Brutal Legend tells the tale Eddie Riggs, the ultimate roadie. The "roadie's roadie", Eddie is the 1st person anyone calls when they need guitars tuned or stages rigged. With a love for hot rods and a photographic memory for every Heavy Metal album cover, and the lyrics those albums contained, committed to memory, Eddie has always felt out of place, like he should have been born earlier, when the music was real. </p><p> One night a stage accident knocks Eddie unconscious. With his blood dripping into the belt buckle he wears, a gift from his father, his blood quenches an ancient thirst that sucks him into a world that looks very strange yet oddly familiar, a world where every Heavy Metal album cover and lyric Eddie knows has come to life, a world where the evil emperor Doviculus and his demon army, The Tainted Coil, have enslaved the last remaining humans. </p><p> Led by Lars Halford alongside his sister Lita and the mysterious Ophelia, the human resistance is far from helpless. However, what they lack is someone to bring them all together; someone who can organise them and lead them into battle, what they need is a roadie. Under Eddie’s command, this barbaric force of hot-rods, Marshall stacks, leather, and chrome will bring this ancient world into the age of Metal. </p> Blind Guardian at Graspop 2009 http://www.qanar.be/index.php?page=main&id=9 <p>Last week, with the start of the summer came one of the summer festivals I am now going to for about 6 years. Graspop Metal Meeting in Dessel, Belgium. One of my favorite bands '<a href='http://www.blind-guardian.com/'>Blind Guardian</a>' also played a gig there. During their show they played classics like '<a href='http://www.youtube.com/watch?v=p9mh8eALNHQ'>The Bards Song</a>', '<a href='http://www.youtube.com/watch?v=qMxhpmnSoGI'>Mirror Mirror</a>' and '<a href='http://www.youtube.com/watch?v=GJYpQBEh0IQ'>Lord of the Rings</a>'. But they also played new stuff, like their single '<a href='http://www.youtube.com/watch?v=k1nZwsu3kDc'>Sacred</a>', which was created for a computer game (<a href='http://www.sacred2.com/'>Sacred 2</a>).</p> <p>Dont forget to check out <a href='./photoalbum.php?album=11'>my photos</a> of Graspop.</p> <p><i>In my thoughts and in my dreams,<br /> They're always in my mind.<br /> These songs of hobbits, dwarves and men.<br /> And elves come close your eyes.<br /> You can see them, too.</i></p> Sabaton/Hammerfall concert in 013 Tilburg http://www.qanar.be/index.php?page=main&id=7 You might wonder why I didn't go to Antwerp instead of Tilburg. Well that's easy... Antwerp was sold out :-). Plus the fact that I went to Tilburg for Iced Earth too and it isn't really that hard to get to, just a half-hour longer drive then Antwerp. But now to the bands.<br /><br /> <b>Sabaton</b><br /> What is there to say about Sabaton? Only that they are one of the loudest rocking bands in the world. I saw them the first time on Graspop last year and immediatly liked them.<br /><br />This time I did know their songs and they didn't disappoint with songs like 40-1, Ghost division, Panzer battalion an Attero dominatus. <br /><br /> <b>Hammerfall</b><br /> These guys always bring a great show and this one wasn't any different. Joachim (singer), Anders (drums), Fredrik (returned bassguitar) and Oscar (guitar) together with their new guitarplayer Pontus (previously The Poodles) brought alot of songs from their new album including: Punish and enslave, Legion, Hallowed be my name and Any means necessary. Too bad they didn't play Life is now from the new album, that song is rocking.<br /><br />Luckily they also played alot of old song including Bloodbound, Hearts on fire, Natural high, Heeding the call and last but not least Glory to the brave.<br /><br />Another thing Hammerfall is known for are their great stage-setups. This time it wasn't different. A stage with several steps and in the back a enormous flag with the background from the new CD. But that wasn't all. They also had a water-screen between the front-stage and the drums and in the back a laser that displayed text and moving images on this water-screen. Awesome :D<br /><br /> <a href="http://www.hammerfall.net/blog.aspx">Here</a> is what they have to tell about it.<br /> <br /> <i>We've played the O13 in Tilburg many times before, and have had a steady audience increase over the years. Usually, we release an album and then wait a couple of months before we go on tour. This time, it was only a matter of days between release and concert, so we didn't really know if the new songs would have had time to sink in with the fans. Needen't have worried, it would appear, as the response we got on stage was nothing short of fantastic!<br /> <br /> The discharge was enormous tonight, the tour has begun and it seems to be a success (you never know until you're here, do you?), and we have proved we can deliver another great show! The audience was amazing, and that of course infects us on stage. And vice versa, obviously. We celebrated with wine and beer afterwards, and the relief was palpable. The HammerFall train is rolling once again, and we all feel we've got something big going. A great feeling!</i> Hammerfall - No Sacrifice, No Victory http://www.qanar.be/index.php?page=main&id=6 Hammerfall's new CD <b>No Sacrifice, No Victory</b> is out and it's rocking!<ul> <li><a href='http://www.youtube.com/watch?v=vkmlujV-TvU&feature=channel_page'>Any Means Necessary</a></li> <li>Life is Now</li> <li>Punish and Enslave</li> <li>Legion</li> <li>Between Two Worlds</li> <li>Hallowed Be My Name</li> <li>Something for the Ages</li> <li>No Sacrifice, No Victory</li> <li>Bring the Hammer Down</li> <li>One of A Kind</li> <li>My Sharona</li> </ul><br /> Especially 'Life is Now' and 'Legion' bring back that classical hard-rocking Hammerfall style I so love. 'My Sharona' is a wonderfull done cover from 'The Knack'. <br /><br />I'm looking forward to seeing them and Sabaton live in 013 Saturday next week.</p><p> Photoalbum http://www.qanar.be/index.php?page=main&id=5 Yay!<br /><br /> I haven't been lazy and added the entire back-end for the pictures and uploaded alot of pictures from the old site. <a href='./photoalbum.php' >Check them out!</a> Photoalbum http://www.qanar.be/index.php?page=main&id=2 Well... the photoalbum should be up and running. Now if I only started adding some pictures to it :-). Then again... Nothing from the admin part is finished, so I have to add everything with PHPMyAdmin, which is plain annoying.<br /><br />Look for more updates to the renewed website in the coming weeks. No need to send in bugreports for now :-) New website http://www.qanar.be/index.php?page=main&id=1 Well renewed actually... Nothing is working yet and I still have to write the entire backend since I decided to throw away 4 year old code... But throwing away code is always nice they keep telling me at work, so I guess it's a good thing.<br /><br />TODO-list: RSS, Projects, Photoalbum, Backend.<br /><br />Yep... basicly everything except the layout :-)