The Countdown to Fedora 11 Begins

Filed Under (Releases, Software, Tech News) by Affix on 12-05-2009

Fedora 11 is less than two weeks away. The excitement is in the air and we all can’t wait to see the product of more than a few long months of hard work. It’s prime time to start talking about what users can expect to see, highlight new features and describe some of the enhancements that we can all look forward too. As part of a series of podcast and print interviews, Today, I would like to present the first podcast in the Fedora 11 Podcast series, an interview with long time Fedora contributor and Fedora Release Engineer Jesse Keating. The audio can be found here:

“Fedora 11 General Overview with Fedora Release Engineer Jesse Keating”

In the interview, Jesse talks to us about the achievement milestone of putting together 11 releases, the process of planning and putting together a Fedora release, how it was done for F11 and also some of the tools, which he helped create which are used to put together the Fedora distribution. He talks about Pungi [https://fedorahosted.org/pungi/] and Revisor [http://revisor.fedoraunity.org/] which are tools used to compose the Fedora tree and create a custom remix or re-spin, respectively. He also talks about some of the changes which have taken place under the hood to enable Fedora’s new faster and improved boot up. Jesse takes us on a whirlwind tour of some of the greatest enhancements we can look forward to in F11, including changes to PackageKit and a new upstream version of RPM, the new default ext4 filesystem, enhanced fingerprint support for authentication and what we can look forward to in the future releases of Fedora.

The Full Fedora 11 Feature list can be found at http://fedoraproject.org/wiki/Releases/11/FeatureList and you can look forward to more in depth coverage of some of those features and of the upcoming release in the days to come. Fedora 11 is sure to prove a highly innovative and technologically advanced release.

Fedora 11. Get ready. There’s reason to be excited!

Useful HTMLParse Class for PHP

Filed Under (Code) by Mystalia on 11-04-2009

Tagged Under : , , , , , , ,

class HTMLParse
{
  // the missing InnerHTML function!
  function innerHTML($node){
    $doc = new DOMDocument();
    foreach ($node->childNodes as $child)
    {
      $doc->appendChild($doc->importNode($child, true));
    }
    $result = $doc->saveHTML();
    return $result;
  }
  // Get the inner html of all elements inside tag from the source (input).
  function GetInnerArray($tag, $input)
  {
    $doc = new DOMDocument();
    @$doc->loadHTML($input);
    $dataset = $doc->getElementsByTagName($tag);
    $stringarr = array();
    foreach( $dataset as $row )
    {
      array_push($stringarr, trim($this->innerHTML($row)));
    }
    return $stringarr;
  }
  // Get the inner html of all elements inside tag where an attribute exists with the value.
  function GetInnerArrayFilter($input, $tag, $attribute, $value)
  {
    $doc = new DOMDocument();
    @$doc->loadHTML($input);
    $dataset = $doc->getElementsByTagName($tag);
    $stringarr = array();
    foreach( $dataset as $row )
    {
      if($row->getAttribute($attribute) == $value)
      {
        array_push($stringarr, trim($this->innerHTML($row)));
      }
    }
    return $stringarr;
  }
  // Get attribute of tags.
  function GetTagAttribute($input, $tag, $attribute)
  {
    $doc = new DOMDocument();
    @$doc->loadHTML($input);
    $dataset = $doc->getElementsByTagName($tag);
    $stringarr = array();
    foreach( $dataset as $row )
    {
        array_push($stringarr, $row->getAttribute($attribute));
    }
    return $stringarr;
  }
  // Get attribute of tags where the tag attrib has the value.
  function GetTagAttributeFilter($input, $tag, $attribute, $qattrib, $value)
  {
    $doc = new DOMDocument();
    @$doc->loadHTML($input);
    $dataset = $doc->getElementsByTagName($tag);
    $stringarr = array();
    foreach( $dataset as $row )
    {
      if($row->getAttribute($qattrib) == $value)
      {
        array_push($stringarr, $row->getAttribute($attribute));
      }
    }
    return $stringarr;
  }
}
?> 

Mostly written by me.

How to restore the Show Desktop Icon to QuickLaunch.

Filed Under (Code) by Mystalia on 04-04-2009

Tagged Under : , , , , , , ,

Run This Batch File and it will automatically place the icon in the QuickLaunch bar, remember if you don’t see it even after running the tool, it’s likely you need to click the double arrows on the right of the bar as it can only show 3. Just drag and drop it onto the 3 there.

Visual Studio Custom Skins (Without Paying)

Filed Under (Code, Learn C#) by Mystalia on 27-03-2009

Tagged Under : , , , , , , , ,

It’s a nightmare to get custom skins without paying an arm and a leg for such a simple part of your program. Some companys ask for hundreds of dollars for simple .NET classes, it’s crazy, anyway, here’s a workaround that is 100% legal and 100% free.

This screenshot is VERY easy to achieve, no fancy software just 1 class, one dll, one msstyle and a few lines of code.

Below are the class file and dll, and i’ve thrown in a couple of msstyles to get you going, theres plenty more on the internet, theres a few on SkinBase.org. We are using USkin (Homepage) its the classes that do all the work, the documentation and examples are terrible but after trial and error I have figured it out and will explain in this article.

Download Uskin easy pack here

Right click the solution explorer, add an existing item (”USkinSDK.cs” and “USkin.dll”).
Make sure the dll properties are set to “Content” and “Copy Always”.
Make sure the class properties are set to “Compile” and “Never Copy”.

The code is simple.

using USkin; // declare it.
 
        private void Form1_Load(object sender, EventArgs e)
        {
            Size presize = this.Size; // Get the correct form size before the GUI mucks it up.
            USkinSDK.USkinInit("", "", "GUI.msstyles"); // Replace the text accordingly with your msstyles file.
            USkinSDK.USkinLoadSkin("GUI.msstyles"); // And again here.
            this.Size = presize; // Re-establish the form size.
        }

Simple and effective to make your applications look more professional. I will note however that you should get prior permission from the skin creator before using your application commercially, or just create your own, that’s easy too.

Hope this helps!

Basic C#.NET Syntax

Filed Under (Learn C#) by Mystalia on 15-03-2009

Start a new windows form application like in the previous tutorial.

Drag a new button in the middle and set the text to “Off”.
Now over in the Solution explorer, right click “Form1.cs” and click View Code.

You will see a bunch of Statements, and these are lines of code. Each statement as you can see, finish with a semi-colon (;).
The code is organised into .NET Libraries, namespaces, classes and methods or functions.

The using statements at the top are .net libraries that are included, for this tutorial we won’t need any more then this, but later on we can go into special libraries to include.

A namespace is a collection of classes.
A class is a collection of methods and functions.
A method or function simply completes a task.

The advantage of being a visual studio is that we don’t have to program any user interface, we can just paint it on. At the top there are tabs (Form1.cs, start page, Form1.cs [Design]). Click the Design tab to return to the design view for this application.

Double click the button you made earlier and notice it automatically creates a new function for this button.

private means that the code can only be accessed in the current class.
void means the code will not return anything but only complete a task.
button1_Click is just a name given to associate the button to that task.

Inside the brackets below ({ and }) we will perform a task when the user clicks the button. Type “button1” and then press put a full stop, notice a window appears giving you suggested options for the button. Type “Text” (case sensative) and then press Space. We will now set the button text to something else by pressing the Equals button and then in quote marks type “Goodbye” and finish the statement with a semi-colon.

button1.Text = "Goodbye";

Now click the test button and then your new button and see what happens!

In the next tutorial we will see how statements can contain other statements.

Visual C#.NET – Setting Yourself Up!

Filed Under (Learn C#) by Mystalia on 15-03-2009

This is a tutorial for those who know a little about the concepts of programming and want to design windows applications in C#.

In this tutorial we will:

  1. Learn about what the .NET framework is and why C# is worth the effort.
  2. Download and Setup the software needed to make C# applications.
  3. Get used to the Interface.

.NET Framework
The .NET Framework is needed to run any C#.NET application, fortunately anyone with vista should already have it installed. Some xp systems don’t have it and it can be downloaded and installed here. It is basically a library of code that exists so you don’t have to manually write it all yourself.

C#.NET
C#.net is comparable to PHP in style, if you know PHP then you will get on well with C#. If you want to program games, C# is a really easy way to go about it because of microsofts XNA Framework, which is a library full of game related code. C# is great to learn and you can get results quickly without too much effort.

Visual Studio 2008 Express Edition
This version of visual studio is absolutely free and downloadable from here. There are different types, so make sure you get Visual C#.NET 2008. You will also obviously need the .NET Framework installed if you don’t have it already.

The Interface
When you start up Visual C# 2008 express you will be greeted with the start page from which you can start a new project or continue one that you already have on the go. If it is your first time, go to File -> New Project. Select Windows Forms Application and name it Test, then click OK.

After it has loaded up, you will see a blank windows form and a bunch of tools down the left hand side. Over on the right you have the solution explorer and the properties menu. At the bottom there should be an error list (for debugging). Don’t worry about any of this right now, they will be covered later on.

Click the Button control in the Toolbox and click and drag a button on the windows form. Notice the Properties menu is now full of options. Change the Text option to “Hello” and then press Enter. Notice the text on the button has changed!

At the top there is a Green Triangle on its side, like a play button. Click this and test the application. Pretty easy right? Play with other controls and options and read the tooltips that appear when you hover your mouse over options and tools etc.

The next tutorial will cover some basic C# Syntax.

HDHoover

Filed Under (Releases) by Mystalia on 04-03-2009

Tagged Under : , , , , , , , ,

This program I wrote about a year ago has been hanging around for too long and i’d like to get it up onto the site.

Screenshot of HDHoover

Screenshot of HDHoover

It’s a simple application – you just select what you want to get rid of and then click hoover. The program will scan through all your computer files and remove anything deemed to be useless. I give no guarantees with this program as it’s a brute force method of sifting out the crap that windows likes hanging about your hard drive.

Download HDHoover

Remember, you will need the .NET 2.0 framework for this program to work for you.

Floating Image or HTML over an iframe using CSS.

Filed Under (Code) by Mystalia on 03-03-2009

Tagged Under : , , , ,

You can see on http://fileblip.com/4fb26ed7! after clicking the continue button they have a floating
panel over the top of an iFrame.
Take a look at the code here they use, the trick is simply to use position: absolute and
then toy with the left and top values until it is positioned correctly. You must also make
sure the object is floating left or right, but you may have issues on the right.

4b7115ef17bd41_

Useful PHP class for parsing HTML

Filed Under (Code) by Mystalia on 03-03-2009

Tagged Under : , , , , , , ,

I’m hoping this is commented well enough.

01
class HTMLParse
02
{
03
  // Missing InnerHTML function!
04
  function innerHTML($node){
05
    $doc = new DOMDocument();
06
    foreach ($node->childNodes as $child)
07
      $doc->appendChild($doc->importNode($child, true));
08
 
09
    return $doc->saveHTML();
10
  }
11
 
12
  // Get the inner html of all elements inside tag from the source (input).
13
  function GetInnerArray($tag, $input)
14
  {
15
    $doc = new DOMDocument();
16
    @$doc->loadHTML($input);
17
    $dataset = $doc->getElementsByTagName($tag);
18
 
19
    $stringarr = array();
20
    foreach( $dataset as $row )
21
    {
22
      array_push($stringarr, trim($this->innerHTML($row)));
23
    }
24
    return $stringarr;
25
  }
26
 
27
  // Get the inner html of all elements inside tag where an attribute exists with the value.
28
  function GetInnerArrayFilter($input, $tag, $attribute, $value)
29
  {
30
    $doc = new DOMDocument();
31
    @$doc->loadHTML($input);
32
    $dataset = $doc->getElementsByTagName($tag);
33
 
34
    $stringarr = array();
35
    foreach( $dataset as $row )
36
    {
37
      if($row->getAttribute($attribute) == $value)
38
      {
39
        array_push($stringarr, trim($this->innerHTML($row)));
40
      }
41
    }
42
    return $stringarr;
43
  }
44
 
45
  // Get attribute of tags.
46
  function GetTagAttribute($input, $tag, $attribute)
47
  {
48
    $doc = new DOMDocument();
49
    @$doc->loadHTML($input);
50
    $dataset = $doc->getElementsByTagName($tag);
51
 
52
    $stringarr = array();
53
    foreach( $dataset as $row )
54
    {
55
        array_push($stringarr, $row->getAttribute($attribute));
56
    }
57
    return $stringarr;
58
  }
59
 
60
  // Get attribute of tags where the tag attrib has the value.
61
  function GetTagAttributeFilter($input, $tag, $attribute, $qattrib, $value)
62
  {
63
    $doc = new DOMDocument();
64
    @$doc->loadHTML($input);
65
    $dataset = $doc->getElementsByTagName($tag);
66
 
67
    $stringarr = array();
68
    foreach( $dataset as $row )
69
    {
70
      if($row->getAttribute($qattrib) == $value)
71
      {
72
        array_push($stringarr, $row->getAttribute($attribute));
73
      }
74
    }
75
    return $stringarr;
76
  }
77
}
78
?> 

If you would like help with this class, please comment!
If you have an idea to improve this class, please comment!

Drumz0r

Filed Under (Software) by Affix on 12-01-2009

Tagged Under : , , ,

What is Drumz0r?

Drumz0r is an XNA Application that shows how to control a system using the Harmonix Drumkit provided with Rockband.
Read the rest of this entry »