Madmike's Blog

November 27, 2010

php frameworks

Filed under: php — Florescu Radu @ 20:28
Tags: , ,

Just tested the second framework for php. The first was Smarty and the second was is Symfony.
The first one was rather harder to use and you had to do a lot of work by hand and was very buggy.
The second one is rather good comparing to the first.It offers MVC architecture and support for developing an application with this profile.
On the developers site is a very good tutorial which constructs a new fully functional site from scratch in 21 days.

Just reached the 8th day and until now , everything works like clock-work.

Maybe you should try it!

December 4, 2009

Another good thing developed by Microsoft

There was always a time when you needed to make an application that used videos and music ,and you needed to make a player from scratch , you needed to download lots of libraries and many dll for your project.
But now I’ve discovered an useful namespace made by Microsoft : Microsoft.Directx.AudioVideoPlayback.
These library is found in DirectX SDK and the latest version until now can be found here : Download here.

I will include some examples of how easy to use are this libraries:


string filePath=”the location where is your file , including file name and extension”;
Audio audio=new Audio(filePath);

For the 3 state a music and movie could have : Play , Pause and Stop are made 3 methods
audio.Stop(), audio.Play() , audio.Pause() and also 3 states illustrated by 3 properties audio.Paused, audio.Stopped , audio.Playing (all 3 boolean).

Example of music player panel in C#:

public partial class MusicContainer : UserControl
public MusicContainer()

public string Path { get; set; }
public Audio audio=null;
//control loaded and we try to load a movie from disk
private void MusicContainer_Load(object sender, EventArgs e)
if (audio == null)
audio = new Audio(Path);
label1.Text = Path;
//we use the timer to show music/movie progress
//button used for Play
private void button1_Click(object sender, EventArgs e)
if (audio != null)
if (audio.Paused || audio.Stopped)
//button used to pause
private void button2_Click(object sender, EventArgs e)
if (audio != null)
if (audio.Paused)
//buton used for stopping
private void button3_Click(object sender, EventArgs e)
if (audio != null)
if (audio.Paused || audio.Playing)
//show the movie/music progress during playing every second
private void timer1_Tick(object sender, EventArgs e)
trackBar1.Value = (int)(audio.CurrentPosition / audio.Duration*100);
//navigate forward/backward in the movie/music
private void trackBar1_Scroll(object sender, EventArgs e)
audio.CurrentPosition = trackBar1.Value * audio.Duration / 100;

For the movie part is the same as music , but this one has more features.

Movie movie=new Movie(filePath);
Control control="a control that will be the video showing surface";
//or null if you want to take the full form of the container in which movie resides

movie.Fullscreen=true; // if you want to make it full screen

I found this namespace and used it , there are many examples of different players all over the MSDN and I was impressed of the quality of the playback and the useful and easiness to use it.

Have fun making your own player

November 1, 2009

Interesting thought about C# 4.0

Filed under: C# — Florescu Radu @ 20:13

September 26, 2009

How should you make a Currency Convertor?

Filed under:,C#,Java,Programming,Webservice — Florescu Radu @ 13:11
Tags: , , ,

A smart guy made a very good web service that gives you all the values you need from the BNR (National Bank of Romania) , you can use it like I did.
Include e web service reference in your Visual Studio project , then you use a code like this to get all the info you need ,for your project.`
Link to your web service here
The code to get the currency is down here:
Curs c = new Curs();
double d=c.getlatestvalue(“eur”);

Have fun using it

September 8, 2009

How to generate Sequences in Mysql 5.1+ part 2

Filed under: Java,Mysql — Florescu Radu @ 19:40
Tags: , , ,

Second option is to use an orm for java :Hibernate with Spring or not .

There are some options you can use:

Use this node in your xml configurations file for your mapped table from database.

<generator class=”name”/>

Where class may be increment with the usual meaning, identity (the identity column of one table), hilo (a generator of random HiLow long with a complicated algorithm).
Soon I will post a working example here.

More informations you could find on RoseIndiaTUTORIALS

Next Page »

Blog at