Sunday, 12 August 2012

Different Ways To Embed A Free MP3 Player On Your Website


Different Ways To Embed A Free MP3 Player On Your Website


Different Ways To Embed A Free MP3 Player On Your Website.

links 

HTML Audio





GOOGLE READER PODCAST PLAYER FOR SINGLE MP3S


The Digital Inspiration blog has the details on embedding MP3 files with the Google Player, but to summarize the article, you just have to insert this code, replacing “MP3URL” with the correct URL of the MP3 file hosted on the web that you want to embed in your index.html file that hosts the main page:

<embed type=”application/x-shockwave-flash” src=”http://www.google.com/reader/ui/3523697345-audio-player.swf” flashvars=”audioUrl=MP3URL” width=”400″ height=”27″ quality=”best”></embed>

While this player is very simple in appearance, it doesn’t carry the Google logo, it even has volume controls and is probably one of the easiest ways to embed an MP3 player working fast.


YAHOO MEDIA PLAYER FOR ANY MP3 URL ON A PAGE

So let’s say you already have a bunch of MP3 files listed on your webpage and you just need a player. Instead of inserting the Google player code for each and every one of those MP3s, you could just use the handy Yahoo Media Player.
As long as you have linked to those MP3 files in your webpage, you can use the following code to include the Yahoo Media Player, which will detect the MP3 files and display the playbuttons next to each MP3 file.
<script src=”http://mediaplayer.yahoo.com/js” type=”text/javascript”></script>
With that one line of HTML, you get a floating media player that can play all the MP3 files in one webpage.

JW FLV PLAYER FOR PLAYLISTS

The JW Player is an open-source player for non-commercial use. You can download the player, which comes with a few more files, namely swfobject.js and player.swf, all of which you’ll upload to the same location where your website is. Having the JW Player for playlists means you’ll need to insert code in your index.html page and also have a separate XML file with the track list, which really isn’t that hard to put together.
First, you’ll need to insert the following code on your index.html page:
<script type=’text/javascript’ src=’URLofSWFOBJECT.JS’></script>
<div id=’mediaspace’>This text will be replaced</div>
<script type=’text/javascript’>
var so = new SWFObject(‘URLofPLAYER.SWF’,’mpl’,’470′,’320′,’9′);
so.addParam(‘allowfullscreen’,'true’);
so.addParam(‘allowscriptaccess’,'always’);
so.addParam(‘wmode’,'opaque’);
so.addVariable(‘playlistfile’,’URLofPLAYLISTFILE.XML‘);
so.addVariable(‘playlist’,'left’);
so.write(‘mediaspace’);
</script>
The items in bold are the ones you need to replace with the correct URLs of the object, player, and XML file (URLofSWFOBJECT.JS, URLofPLAYER.SWF, URLofPLAYLISTFILE.XML). If this code doesn’t show anything on your page, try this code that’s meant to embed MP3 players in blogs and sites like MySpace:
<object classid=’clsid:D27CDB6E-AE6D-11cf-96B8-444553540000′ width=’470′ height=’300′ id=’single1′ name=’single1′>
<param name=’movie’ value=’URLofPLAYER.SWF‘>
<param name=’allowfullscreen’ value=’true’>
<param name=’allowscriptaccess’ value=’always’>
<param name=’wmode’ value=’transparent’>
<param name=’flashvars’ value=’playlistfile=URLofPLAYLISTFILE.XML&playlist=left&dock=false’>
<embed
type=’application/x-shockwave-flash’
id=’single2′
name=’single2′
src=’URLofPLAYER.SWF
width=’470′
height=’300′
bgcolor=’undefined’
allowscriptaccess=’always’
allowfullscreen=’true’
wmode=’transparent’
flashvars=’playlistfile=URLofPLAYLISTFILE.XML&playlist=left&dock=false’
/>
</object>
As for the XML file, all you need to do is to save a file with the XML file extension using Notepad in Windows or any text editor. If you’re using Notepad, make sure in the Save type as field has “All Files (*.*)”. Inside the XML file, paste this and replace bold items with the appropriate entries:
<?xml version=”1.0″ encoding=”UTF-8″?>
<playlist version=”1″ xmlns=”http://xspf.org/ns/0/”>
<title>Your MP3 Playlist</title>
<info>http://YourWebpageHere/</info>
<trackList>
<track>
<title>NAMEofMP3file1</title>
<location>URLofMP3file1.MP3</location>
</track>
<track>
<title>NAMEofMP3file2</title>
<location>URLofMP3file2.MP3</location>
</track>
<track>
<title>NAMEofMP3file3</title>
<location>URLofMP3file2.MP3</location>
</track>
</trackList>
</playlist>
You can add more tracks if you want with the
<track>
tag, just make sure you adjust the height of the player accordingly. This is what the player looks like with the playlist on the left.
To customize the color of the player, head over to the setup page from the official JW Player website. This setup page will also let you input your desired player parameters (e.g. whether to autoplay or not) and preview the results, while you don’t even have to figure out the code as it painlessly spits out the code for you to just copy.
Not only does this awesome, free player take care of an entire playlist, it also can play single MP3 files. You’d only need to insert this code in your index.html file:
<script type=’text/javascript’ src=’PATHtoSWFOBJECT.JS‘></script>
<div id=’mediaspace’>This text will be replaced</div>
<script type=’text/javascript’>
var so = new SWFObject(‘URLofPLAYER.SWF‘,’ply’,’470′,’24′,’9′,’#000000′);
so.addParam(‘allowfullscreen’,'true’);
so.addParam(‘allowscriptaccess’,'always’);
so.addParam(‘wmode’,'opaque’);
so.addVariable(‘file’,’MP3URL‘);
so.addVariable(‘duration’,’DURATION‘);
so.write(‘mediaspace’);
</script>
You should also input the duration of the MP3 file, or you can also omit that line altogether.
If you would rather not mess with codes and would rather just copy and paste embed codes without having to modify them, you can always upload single MP3 to an online storage site, such as 4shared and Box.net, which offer embed codes for MP3 files.
Did I miss an MP3 player that’s available for free? Let us know in the comments!

Increase Import Size of File in phpmyadmin (Ubuntu)


Increase Import Size of File in phpmyadmin (Ubuntu)


Increase Import Size of File in phpmyadmin (Ubuntu)

Increase Size of import File in phpmyadmin

Try these different settings in /etc/php5/apache2/php.ini

Find:
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M
Change the values to your requirements. 
Ex:
post_max_size = 20M
upload_max_filesize = 20M
max_execution_time = 60
max_input_time = 60
memory_limit = 8M

----------->then restart your Apache2
Ex:
----------->service apache2 restart

Android Install in Eclipse


android install in eclipse


Android Install in Eclipse

Step1: download the eclipse from the following link
                                eclipse download
Step2: unZip the elipse and install the following plugin in the eclipse
            ADT- https://dl-ssl.google.com/andr
oid/eclipse/(required)
            

Step3:  download the android sdk from following link
             android sdk download
             
Step4: unzip the sdk folder and configure that in the eclipse

           4.1: In eclipse open window--->preferences--->android--->SDKLocation  to configure the                 unziped folder. and --->ok.

Step5: update the sdk tools. 

            5.1:In eclipse open window--->Android SDK Manager-->
            5.2: check the tools and click the install.

Step6: Install the which version you want select that version Sdk platform  and install.

Step7: Configure the emulator.

           7.1:n eclipse open window--->AVD Manager -->

           7.2:  Select new button to open new window
           
           7.3: give name,select the Target version.
           example:
           
           7.4:  click Create AVD button.
            then select the created AVD and click Start button.
            7.5: click Launch button.

How to insert multiple languages in database


How to insert multiple languages in database


How to insert multiple languages in database

1. create database with the default character set as utf8
example:

CREATE DATABASE `database name ` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
2.create table.
example:
create table `telugunames` (name varchar(100))
3. insert data.
example:
INSERT INTO `japanese`.`telugunames` (`name`) VALUES ('à°…à°ª్పజి');

GWT plugins adding in eclipse


GWT plugins adding in eclipse

GWT plugins adding in eclipse

1.download the eclipse from eclipse link
2.open help--->install new softwares..

ADT- https://dl-ssl.google.com/andr
oid/eclipse/(required)

indigo update- http://download.eclipse.org/
releases/indigo(required)

gwt- http://dl.google.com/eclipse/p
lugin/3.7(required)

GWT Designer Update Site - http://dl.google.com/eclipse/inst/d2gwt/latest/3.7 (required)

svn- http://subclipse.tigris.org/up
date(for svn)

Tuesday, 24 July 2012

Installing Wine on Ubuntu


Adding the WineHQ PPA Repository:

Open the Software Sources menu by launching the Ubuntu Software Center and selecting Edit->Software Sources. Choose the Other Software tab and click Add.

Then, copy and paste the line below.
ppa:ubuntu-wine/ppa

Warning: Beta packages

The 1.5 packages here are beta packages. This means they will periodically suffer from regressions, and as a result an update may break functionality in Wine. If the stable 1.4 Wine version works for you, then you may not want to use these beta packages.

Installing Wine:

Once you have added the WineHQ PPA Repository, you are ready to install.
To get the most recent Wine 1.5 beta, click this link to install the wine1.5 package.
To install the older, stable Wine 1.4 version, click this link to install the wine1.4 package.


Upgrading to a new version of Ubuntu

If you are upgrading the entire system, such as going from Ubuntu 11.10 to 12.04, you will need to come back to this page and add the repository again. The built in update manager will not switch the Wine repository automatically.

Alternative Command Line Instructions for Installing Wine:

It is also possible to add the Wine PPA and install via the terminal. This may be useful on Kubuntu, Xubuntu, and other Ubuntu derivatives.
sudo add-apt-repository ppa:ubuntu-wine/ppa
Then update APT package information by running 'sudo apt-get update'. You can now install Wine by typing 'sudo apt-get install wine1.5'.
If you'd like to browse the PPA manually, you can visit its Launchpad page.

Monday, 23 July 2012

.exe files execution in Ubuntu with Wine


First you need to install wine to get it through:
sudo apt-get install wine

Steps to get Internet Explorer are:

1. Open winetricks (Applications->wine->Winetricks)
2. Choose the option, "Select the default wine prefix" (confusing to me since I don't know what a prefix is and it sounds like I'm doing something that will be the default for everything in wine)
3. Click "OK"
4. Choose option, "Install a Windows DLL or component"
5. Click "OK"
6. Now choose IE6, 7, or 8 from the list and check the checkbox
Note: Choose one option at a time as wine need to restart after each install.
7. Click "OK"

After installation it will ask for "restart", this will not restart your system but restart the "wine".

You also get some error messages, just click on OK.

From now on, if you need to run the installed program then go to Applications -> wine -> Browse C: Drive -> Program Files -> Internet Explorer -> Run "iexplore.exe" with "wine"

So, would you ever say that you can not run Internet Explorer on Linux? :)

                                                                  (OR)

Step:1 Go to Terminal and type for Wine Tricks installation 
             sudo apt-get install wine
                                    
Step:2 ofter install Wine then type for IE8 installation
             winetricks ie8
Step:3 type this for opening IE8 in Ubuntu
             wine 'C:\Program Files\Internet Explorer\iexplore'

Friday, 24 February 2012

Getting Last Thursday of given month,year


public int getLastThursday(int month, int year)
{
Calendar cal = Calendar.getInstance();
   cal.set(year, month, 1, 0, 0, 0);
   cal.set(Calendar.MILLISECOND, 0);
   int daysOfMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
   int firstDay = cal.get(Calendar.DAY_OF_WEEK)-1;
 
int forword[]={4,3,2,1,0,6,7};
int backword[]={3,4,5,6,0,1,2};
int daysforword[] = new int[9];
for(int i=0;i<forword.length;i++)
{
daysforword[i]=29+forword[i];
}

if(daysforword[firstDay]>daysOfMonth)
{
return (29-backword[firstDay]);
}
else if(daysforword[firstDay]==daysOfMonth)
{
return daysOfMonth;
}
else if(daysforword[firstDay]<daysOfMonth)
{
return (29+forword[firstDay]);
}


return 0;

}

------------------------------------------------------------------------------------
logic
---------------------------

28,0,,,sunday,1,7,4,3,33,26,,5,4
29,1,,,monday,2,6,3,4,32,25,,4,5
30,2,,,Tuesday,3,5,2,5,31,31,24,3,6
31,3,,,Wednesday,4,4,1,6,30,30,23,2,7
,,,,Thursday,5,3,0,7,29,29,22,1,1
,,,,Friday,6,2,6,1,35,28,,7,2
,,,,Saturday,7,1,7,2,36,27,,6,3
,,,,,,,forword diff b/w start days and wedensday,,,,,,
,,,,,,,,backword diff b/w start days and wedensday,,,,,
,,,,,,,,,,,,,
,,,,,,,,,29,,,,
,,,,,,,,,29+forword,,,,
,,,,,,,,,,,,,
,,,,,,,,,,,,,
,,,,,,,,,,,29-backword  if <=31 to>=29,,



Date Format Conversion(String to Date)

import java.util.*;
import java.text.*;
public class StringToCalender {
 public static void main(String[] args) {
 try {  String str_date="11-June-07";
 DateFormat formatter ; 
 Date date ; 
  formatter = new SimpleDateFormat("dd-MMM-yy");
  date = (Date)formatter.parse(str_date); 
 Calendar cal=Calendar.getInstance();
 cal.setTime(date);
 System.out.println("Today is " +date );
  catch (ParseException e)
  {System.out.println("Exception :"+e);  } 
 
 }
  




http://www.roseindia.net/java/java-conversion/StringToCalender.shtml


see