Santosh's profileSantosh KumarPhotosBlogListsMore ![]() | Help |
Embedding live music through live FM RadioTo embed media into web pages requires a player and a source file that is to be played. Incase of live multi-media resources it has to come through web-services. The code given here is streaming the media from punjabijunction.com and the plug-in is from microsoft.com. To listen the audios just click the play button if you have disabled the autostart features. It will start playing music from Radio City Live. And if you want the same at your web pages put this code into you HTML code. <object id="MediaPlayer" codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" type="application/x-oleobject" height="50" standby="Loading Windows Media Player components..." width="270" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"> <param NAME="filename" VALUE="http://www.punjabijunction.com/ch_radiocity/RadioCity.asx"> <param NAME="autoStart" VALUE="false"> <param NAME="TransparentAtStart" VALUE="false"> <param NAME="AnimationatStart" VALUE="false"> <param NAME="ShowStatusBar" VALUE="true"> <param NAME="ShowControls" VALUE="true"> <param NAME="autoSize" VALUE="false"> <param NAME="displaySize" VALUE="false"> <param NAME="ShowAudioControls" VALUE="true"> <param NAME="ShowPositionControls" VALUE="false"> <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" src="http://www.punjabijunction.com/ch_radiocity/RadioCity.asx" width="270" height="50" transparentatstart="0" autostart="1" animationatstart="0" showcontrols="true" showaudiocontrols="1" showpositioncontrols="0" autosize="0" showstatusbar="1" displaysize="false"></embed> </object> »»»»»»» by Santosh Kumar ? Original @ http://santu4you.spaces.live.com Short Story ... Why are Goals Important?On the best sunny day, the most powerful magnifying glass will not light paper if you keep moving the glass. But if you focus and hold it, the paper will light up. That is the power of concentration. A man was traveling and stopped at an intersection. He asked an elderly man, "Where does this road take me?" The elderly person asked, "Where do you want to go?" The 150 of 150 man replied, "I don't know." The elderly person said, "Then take any road. What difference does it make?" How true. When we don't know where we are going, any road will take us there. Supposing you have the football eleven enthusiastically ready to play the game, all charged up, and then someone took the goal post away. What would happen to the game? There is nothing left. How do you keep score? How do you know you have arrived? Enthusiasm without direction is like wildfire and leads to frustration. Goals give a sense of direction. Would you sit in a train or a plane without knowing where it was going? The obvious answer is no. Then why do people go through life without having any goals? by Shiv Khera { You Can Win } Asp.Net, Most useful binaries for working with .Net 2.0Asp.Net 2.0 Ajax Extensions 1.0 (download attachment | download from original link) Asp.Net Ajax enables developers to choose their preferred method of Ajax development, whether it is server-side programming, client-side programming, or a combination of both for building highly interactive and responsive web applications that work across all popular browsers. The UpdatePanels and a ScriptManager will solve all your partial post-back problems. Asp.Net 2.0 Ajax Validators (download attachment | download from original link) Asp.Net 2.0 Ajax Extensions 1.0 has got some bugs while using validators. At first instant validation control will do its work but thereafter it won’t fire. Here we need the binary validators.dll. It also requires the following configurations in your web.config file. <system.web> <pages> <controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </controls> <tagMapping> <add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CompareValidator, Validators"/> <add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CustomValidator, Validators"/> <add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RangeValidator, Validators"/> <add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RegularExpressionValidator, Validators"/> <add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RequiredFieldValidator, Validators"/> <add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="Microsoft.Web.UI.Compatibility.ValidationSummary, Validators"/> </tagMapping> </pages> ... </system.web> Asp.Net 2.0 AjaxControlToolkit (download attachment | download from original link) If you are not interested to write your own web user controls, this is where your struggle ends. Add a new tab to your toolbox and AjaxControlToolkit.dll will be included to your bin folder and then a number of Ajax control will be yours. FusionCharts for Asp.Net (download attachment | download from original link) FusionCharts Enterprise Edition are really world-class solutions for web based charting solutions. It has been compatible with all the web technology and has got wider usage with PHP, ASP, .NET, JSP, ColdFusion, JavaScript, Ruby on Rails etc. iTextSharp for .Net (download attachment | download from original link) It is the most useful free binary that provides most of the features you aspect for PDF files. Yes creation of PDF file from within a browser and Reading the text from the PDF file like of operations are nicely handled. Winthusiasm HtmlEditor for Asp.Net 2.0 (download attachment | download from original link) If you are looking for an Ajax enable HtmlEditor control then this is an answer to your search. Most of the required functionalities are covered here in this. It is much better than most of the paid version of such type of controls MySql Connector for .Net 2.0 (download attachment | download from original link) MySql is an answer to most of the database related challenges. From its existing MySql 5.1 onward it has been a headache for leading database solution providers. MySql.Data.dll 6.0.4 is the best solutions for your Asp.Net 2.0 applications. You can refer my article on its usage. FlashControl for .Net 2.0 (download attachment | download from original link) Embedding Flash / SWF object to any kind of web page is simple enough, but the challenge is to control these objects through server side scripts. FlashControl is the most useful dll to do such activity. Especially when you want to send some real-time data to flash object to set variables you will find these dll as most useful one. The property called FlashVars will be most attractive for you because you can then set multiple variables by setting values like "var1=value1&var2=value2&var3=value3" etc. »»»»»»» by Santosh Kumar ? Original @ http://santu4you.spaces.live.com Short Story ... Keep your eyes upon the goalOn July 4, 1952, Florence Chadwick was on her way to becoming the first woman to swim the Catalina Channel. She had already conquered the English Channel. The world was watching. Chadwick fought the dense fog, bone-chilling cold and many times, the sharks. She was striving to reach the shore but every time she looked through her goggles, all she could see was the dense fog. Unable to see the shore, she gave up. Chadwick was disappointed when she found out that she was only half a mile from the coast. She quit, not because she was a quitter but because her goal was not in sight anywhere. The elements didn't stop her. She said, "I'm not making excuses. If only I had seen the land, I could have made it." Two months later, she went back and swam the Catalina Channel. This time, in spite of the bad weather, she had her goal in mind and not only accomplished it but beat the men's record by two hours. by Shiv Khera { You Can Win } CSS, Creating Visual Studio editor style of code-block using style-sheet in HTML codeA Cascading Style Sheet (CSS) contains style rules that are applied to elements in a Web page. CSS styles define how elements are displayed and where they are positioned on the page. Instead of assigning attributes to each element on your page individually, you can create a general rule that applies attributes whenever a Web browser encounters an instance of an element or an element that is assigned to a certain style class. There is nothing much descriptive on the following code. It will produce the output provided to next of the code. The output not an image rather it is text formatted through the CSS. Have a look. The HTML Code <html> <head> <title> Santosh Kumar's Tips & Tricks </title> <style> .CssDivOut{ margin:2px;border:1px solid #ACA899;background-color:#f8f8f8;width:100%; font-family:'Courier New',Courier,mono;font-size:12px;overflow:auto;max-height:400px; } .CssDivInn{ background:#FFF none repeat scroll 0 0;border-color:#999;border-style:none solid solid; border-width:medium 0px 0px;margin:0 0 0 0; overflow:auto;padding:.0 0 0 0; text-align:left;width:100%; } ol{ list-style:decimal;list-style:decimal-leading-zero;padding:0; color:#5C5C5C; background-color:#fff;margin:0 0 1px 45px; } li{ border-left:3px solid #6CE26C;margin:0; padding:0; padding-left:10px;white-space:nowrap;background-color:#f8f8f8; } </style> </HEAD> <BODY> <div class="CssDivOut"> <div class="CssDivInn"> <ol> <li>Public Function GetFileContent(ByVal faPath As String) As String</li> <li> Dim vRet As String = ""</li> <li> Dim vStreamReader As StreamReader = File.OpenText(faPath)</li> <li> Try</li> <li> vRet = vStreamReader.ReadToEnd()</li> <li> vStreamReader.Close()</li> <li> Catch ex As Exception</li> <li> vRet = ""</li> <li> End Try</li> <li> Return vRet</li> <li>End Function</li> </ol> </div> </div> </body> </html> The HTML Output »»»»»»» by Santosh Kumar ? Original @ http://santu4you.spaces.live.com Short Story ... What do you seeAn ancient Indian sage was teaching his disciples the art of archery. He put a wooden bird as the target and asked them to aim at the eye of the bird. The first disciple was asked to describe what he saw. He said, "I see the trees, the branches, the leaves, the sky, the bird and its eye.." The sage asked this disciple to wait. Then he asked the second disciple the same question and he replied, "I only see the eye of the bird." The sage said, "Very good, then shoot." The arrow went straight and hit the eye of the bird. Unless we focus, we cannot achieve our goal. It is hard tofocus and concentrate, but it is a skill that can be learned. by Shiv Khera { You Can Win } Retrieving attribute values from Microsoft WMI ClassesWMI stands Windows Management Instrumentation in Microsoft Windows operating systems. It is a set of extensions to the Windows Driver Model that provides Operating System interface to provide information and notification. The following code will retrive the values from each of the properties of Win32_BIOS class This example uses instance of Win32_BIOS class and a list of class deffers dependending upon what is installed in the system. This list commonly includes classes like Win32_1394Controller, Win32_ACE, Win32_Account, Win32_AccountSID, Win32_ApplicationService, Win32_BIOS, Win32_BaseBoard, Win32_BaseService, Win32_Battery, Win32_Binary, Win32_BindImageAction, Win32_BootConfiguration, Win32_Bus, Win32_CDROMDrive, Win32_COMApplication, Win32_COMClass, Win32_COMSetting, Win32_CacheMemory, Win32_ClassInfoAction, Win32_ClassicCOMClass, Win32_ClassicCOMClassSetting, Win32_CodecFile, Win32_CommandLineAccess, Win32_ComponentCategory, Win32_ComputerSystem, Win32_ComputerSystemProduct, Win32_Condition, Win32_CreateFolderAction, Win32_CurrentProbe, Win32_DCOMApplication, Win32_DCOMApplicationSetting, Win32_DMAChannel, Win32_Desktop, Win32_DesktopMonitor, Win32_DeviceMemoryAddress, Win32_Directory, Win32_DirectorySpecification, Win32_DiskDrive, Win32_DiskPartition, Win32_DisplayConfiguration, Win32_DisplayControllerConfiguration, Win32_DriverVXD, Win32_DuplicateFileAction, Win32_Environment, Win32_EnvironmentSpecification, Win32_ExtensionInfoAction, Win32_Fan, Win32_FileSpecification, Win32_FloppyController, Win32_FloppyDrive, Win32_FontInfoAction, Win32_Group, Win32_HeatPipe, Win32_IDEController, Win32_IRQResource, Win32_InfraredDevice, Win32_IniFileSpecification, Win32_Keyboard, Win32_LaunchCondition, Win32_LoadOrderGroup, Win32_LogicalDisk, Win32_LogicalFileSecuritySetting, Win32_LogicalMemoryConfiguration, Win32_LogicalProgramGroup, Win32_LogicalProgramGroupItem, Win32_LogicalShareSecuritySetting, Win32_MIMEInfoAction, Win32_MSIResource, Win32_MemoryArray, Win32_MemoryDevice, Win32_MethodParameterClass, Win32_MotherboardDevice, Win32_MoveFileAction, Win32_NTEventlogFile, Win32_NTLogEvent, Win32_NetworkAdapter, Win32_NetworkAdapterConfiguration, Win32_NetworkClient, Win32_NetworkConnection, Win32_NetworkLoginProfile, Win32_NetworkProtocol, Win32_ODBCAttribute, Win32_ODBCDataSourceSpecification, Win32_ODBCDriverSpecification, Win32_ODBCSourceAttribute, Win32_ODBCTranslatorSpecification, Win32_OSRecoveryConfiguration, Win32_OnBoardDevice, Win32_OperatingSystem, Win32_PCMCIAController, Win32_POTSModem, Win32_PageFile, Win32_PageFileSetting, Win32_PageFileUsage, Win32_ParallelPort, Win32_Patch, Win32_PatchPackage, Win32_PhysicalMemory, Win32_PhysicalMemoryArray, Win32_PnPEntity, Win32_PointingDevice, Win32_PortConnector, Win32_PortResource, Win32_PortableBattery, Win32_PowerManagementEvent, Win32_PrintJob, Win32_Printer, Win32_PrinterConfiguration, Win32_PrivilegesStatus, Win32_Process, Win32_ProcessStartup, Win32_Processor, Win32_Product, Win32_ProgIDSpecification, Win32_ProgramGroup, Win32_ProgramGroupOrItem, Win32_Property, Win32_PublishComponentAction, Win32_QuickFixEngineering, Win32_Refrigeration, Win32_Registry, Win32_RegistryAction, Win32_RemoveFileAction, Win32_RemoveIniAction, Win32_ReserveCost, Win32_SCSIController, Win32_SID, Win32_SMBIOSMemory, Win32_ScheduledJob, Win32_SecurityDescriptor, Win32_SecuritySetting, Win32_SelfRegModuleAction, Win32_SerialPort, Win32_SerialPortConfiguration, Win32_Service, Win32_ServiceControl, Win32_ServiceSpecification, Win32_Share, Win32_ShortcutAction, Win32_ShortcutFile, Win32_ShortcutSAP, Win32_SoftwareElement, Win32_SoftwareElementCondition, Win32_SoftwareFeature, Win32_SoftwareFeatureAction, Win32_SoundDevice, Win32_StartupCommand, Win32_SystemAccount, Win32_SystemDriver, Win32_SystemEnclosure, Win32_SystemMemoryResource, Win32_SystemSlot, Win32_TapeDrive, Win32_TemperatureProbe, Win32_Thread, Win32_TimeZone, Win32_Trustee, Win32_TypeLibraryAction, Win32_USBController, Win32_UninterruptiblePowerSupply, Win32_UserAccount, Win32_VideoConfiguration, Win32_VideoController, Win32_VoltageProbe, Win32_WMISetting. More on this... The Visual Basic Code Sub Get_Win32_Information() Dim vList, vObj On Local Error Resume Next Set vList = GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf("Win32_BIOS") For Each vObj In vList Debug.Print "BiosCharacteristics = " & vObj.BiosCharacteristics Debug.Print "BuildNumber = " & vObj.BuildNumber Debug.Print "Caption = " & vObj.Caption Debug.Print "CodeSet = " & vObj.CodeSet Debug.Print "CurrentLanguage = " & vObj.CurrentLanguage Debug.Print "Description = " & vObj.Description Debug.Print "IdentificationCode = " & vObj.IdentificationCode Debug.Print "InstallableLanguages = " & vObj.InstallableLanguages Debug.Print "InstallDate = " & vObj.InstallDate Debug.Print "LanguageEdition = " & vObj.LanguageEdition Debug.Print "ListOfLanguages = " & vObj.ListOfLanguages Debug.Print "Manufacturer = " & vObj.Manufacturer Debug.Print "Name = " & vObj.Name Debug.Print "OtherTargetOS = " & vObj.OtherTargetOS Debug.Print "PrimaryBIOS = " & vObj.PrimaryBIOS Debug.Print "ReleaseDate = " & vObj.ReleaseDate Debug.Print "SerialNumber = " & vObj.SerialNumber Debug.Print "SMBIOSBIOSVersion = " & vObj.SMBIOSBIOSVersion Debug.Print "SMBIOSMajorVersion = " & vObj.SMBIOSMajorVersion Debug.Print "SMBIOSMinorVersion = " & vObj.SMBIOSMinorVersion Debug.Print "SMBIOSPresent = " & vObj.SMBIOSPresent Debug.Print "SoftwareElementID = " & vObj.SoftwareElementID Debug.Print "SoftwareElementState = " & vObj.SoftwareElementState Debug.Print "Status = " & vObj.Status Debug.Print "TargetOperatingSystem = " & vObj.TargetOperatingSystem Debug.Print "Version = " & vObj.Version Next End Sub The Debug.Print Output BuildNumber = Caption = BIOS Date: 06/05/02 16:58:00 Ver: 08.00.00 CodeSet = CurrentLanguage = enUS Description = BIOS Date: 06/05/02 16:58:00 Ver: 08.00.00 IdentificationCode = InstallableLanguages = 1 InstallDate = LanguageEdition = Manufacturer = Intel Corp. Name = BIOS Date: 06/05/02 16:58:00 Ver: 08.00.00 OtherTargetOS = PrimaryBIOS = True ReleaseDate = 20020605******.******+*** SerialNumber = SMBIOSBIOSVersion = LY84510A.86A.0011.P05.0206051658 SMBIOSMajorVersion = 2 SMBIOSMinorVersion = 3 SMBIOSPresent = True SoftwareElementID = BIOS Date: 06/05/02 16:58:00 Ver: 08.00.00 SoftwareElementState = 3 Status = OK TargetOperatingSystem = 0 Version = BIOS Date: 06/05/02 16:58:00 Ver: 08.00.00 »»»»»»» by Santosh Kumar ? Original @ http://santu4you.spaces.live.com Listing all Microsoft WMI Non Associated Classes with its Methods and PropertiesWMI stands Windows Management Instrumentation in Microsoft Windows operating systems. It is a set of extensions to the Windows Driver Model that provides Operating System interface to provide information and notification. The following code will list the entire non-associated class name and their method name along with property name. This code will help to find those keywords that can be used for further WNI scripting The Visual Basic Code Sub Get_Win32_Classdetail() vStrComp = "." Set vObjWmiService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & vStrComp & "\root\cimv2") For Each vObjAllClass In vObjWmiService.SubclassesOf() vIsAssociated = 0 If Left(vObjAllClass.Path_.Class, 5) = "Win32" Then For Each Qualifier In vObjAllClass.Qualifiers_ If LCase(Trim(Qualifier.Name)) = "association" Then vIsAssociated = 1 Exit For End If Next If vIsAssociated = 0 Then Debug.Print vObjAllClass.Path_.Class Set vObjCurClass = vObjWmiService.Get(vObjAllClass.Path_.Class) Debug.Print vbTab & "Properties" For Each vObjItem In vObjCurClass.properties_ Debug.Print vbTab & vbTab & vObjItem.Name Next Debug.Print vbTab & "Methods" For Each vObjItem In vObjCurClass.methods_ Debug.Print vbTab & vbTab & vObjItem.Name Next Debug.Print End If End If Next End Sub The Debug.Print Output
»»»»»»» by Santosh Kumar ? Original @ http://santu4you.spaces.live.com |
|
|