software

Setting up BlazeDS with Flex

Posted on March 2, 2008. Filed under: adobe, flex, java, open source, software, tomcat, user interface |

 

Let me give some introduction first.

BlazeDS is a server-based Java remoting and web messaging technology that allows to connect to back-end distributed data and push data in real-time to Adobe Flex and Adobe AIR rich Internet applications (RIA). Because of its open licensing, BlazeDS is not precluded from being used with other client platforms, such as JavaScript/AJAX. (wikipedia)

Adobe Flex is a collection of technologies released by Adobe Systems for the development and deployment of cross platform, rich Internet applications based on the proprietary Adobe Flash platform. The initial release in March 2004 by Macromedia included a software development kit, an IDE, and a J2EE integration application known as Flex Data Services. Since Adobe acquired Macromedia in 2005, subsequent releases of Flex no longer require a license for Flex Data Services, which has become a separate product rebranded as LiveCycle Data Services. (wikipedia)

(more…)

Read Full Post | Make a Comment ( 8 so far )

Amarok 2: now with 100% more audio playing on Windows – Amarok Blog

Posted on December 8, 2007. Filed under: amarok, open source, software, windows |

Amarok 2: now with 100% more audio playing on Windows – Amarok Blog

Here is come great news for windows users. The great linux music player is being ported to the windows platform. Here is a screenshot of amarok playing on windows.

image

But as the site says that it is still an alpha software so somewhat unstable. I am eagerly waiting the first version to come. I hope it comes out soon.

Read Full Post | Make a Comment ( None so far )

Sudo for Vista

Posted on November 28, 2007. Filed under: ruby, security, software, vista |

The following ruby script when given any executable file path as the argument runs it in administrative mode.

   1: require 'Win32API'
   2:  
   3: def shell_execute(process_name)
   4:     process = ''
   5:     process.replace(process_name)
   6:     se = Win32API.new("shell32", "ShellExecute", ['P','P','P','P','P','I'], 'I')
   7:     se.Call(nil,"runas",process,nil,nil,5)
   8: end
   9:  
  10: shell_execute(ARGV[0])

 

In Vista you can do the same by right clicking on the file and selecting “Run as Administrator” but this script allows you to run a process in admin mode using the command line.

The ShellExecute function resides in the shell32.dll and is documented here.

By just giving “runas” as the second parameter to the function the process is executed in the administrative mode.

Read Full Post | Make a Comment ( 1 so far )

Periodically changing desktop wallpaper using Ruby

Posted on November 27, 2007. Filed under: ruby, software, vista, windows, XP |

Here is small ruby script that picks up a random image from a given folder and sets it as the desktop wallpaper.

   1: require 'Win32API'
   2:  
   3: SPI_SETDESKWALLPAPER = 20
   4: SPIF_SENDCHANGE = 0x2
   5: SOURCE_FOLDER = "C:\\Users\\Gaurav\\Pictures\\Best\\"
   6:  
   7: files = Dir.entries(SOURCE_FOLDER) - [".", ".."]
   8: file = files[rand(files.length)]
   9:  
  10: systemParametersInfo = Win32API.new("user32","SystemParametersInfo",["I", "I", "P", "I"],"I")
  11: p systemParametersInfo.call(SPI_SETDESKWALLPAPER, 1, SOURCE_FOLDER + file, SPIF_SENDCHANGE)
 

The constant SOURCE_FOLDER can be changed to point at the folder which contain all your wallpaper and the script then randomly chooses a wallpaper from the collection.

You can also set your task scheduler to run this script automatically after a fixed interval so that your desktop wallpaper keeps changing.

Here is the pastie.

Read Full Post | Make a Comment ( 2 so far )

Renaming MP3 files based on ID3 tag information

Posted on November 27, 2007. Filed under: ID3, ruby, software |

Here is a neat little trick that I often find useful for renaming mp3 files with wrong names and correct tag titles. Just run this ruby script in the directory where you have stored your songs and it will read the tag title and rename the current file using it.

   1: require "rubygems"
   2: require "id3lib"
   3: require "fileutils"
   4:  
   5: files = `dir /s /b *.mp3`
   6:  
   7: files.split("\n").each do |file|
   8:   dir = File.dirname(file)
   9:   tag = ID3Lib::Tag.new(file)
  10:   new_name = tag.title.gsub("00",'') if tag.title
  11:   FileUtils.move(file, File.join(dir, new_name + ".mp3")) if new_name and !new_name.empty? rescue nil
  12: end

This script requires id3lib gem for ruby which can be installed simply by running the command:

gem install id3lib-ruby

One thing to notice in the script is that currently it works only on windows, but only with a little modification it can be made to work on other OSes as well (The only change I guess will be in the 5th line).

Here is the pastie link for this code.

del.icio.us Tags: ,,
Read Full Post | Make a Comment ( 4 so far )

« Previous Entries

Liked it here?
Why not try sites on the blogroll...