tag:blogger.com,1999:blog-80830718405155166712024-03-13T09:53:41.494-07:00TEC|RocksPrograming Tips and Samples in Flex, Java and other latest web technologiesUnknownnoreply@blogger.comBlogger40125tag:blogger.com,1999:blog-8083071840515516671.post-32449780980342421612023-03-17T12:53:00.004-07:002023-03-17T12:54:54.642-07:00Installing XAMPP on LinuxDetailed steps for installing XAMPP on Linux using the terminal(Here i have installed in Ubuntu 20):Open a terminal window by pressing "Ctrl+Alt+T" on your keyboard.Change to your home directory by running the following command:bashcd ~
Download the XAMPP installer for Linux from the official Apache Friends website by running the following command:bashwget https://www.apachefriends.org/Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-73632891348092769442023-03-09T11:55:00.015-08:002023-03-17T12:58:50.214-07:00Linux commands to control the LAMPP (XAMPP) services Linux commands to control the LAMPP (XAMPP) services:To start the LAMPP services, run the following command:bashsudo /opt/lampp/lampp start
This command will start all the LAMPP services, including Apache and MySQL.To stop the LAMPP services, run the following command:bashsudo /opt/lampp/lampp stop
This command will stop all the LAMPP services, including Apache and MySQL.To restart the Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-7726841722531834422023-02-06T13:19:00.001-08:002023-02-18T13:30:19.387-08:00Update Docker to new ROOT DirectoryTo relocate the Docker root directory, complete the following steps as root or a user with “sudo all” authority:1. Stop the Docker services: sudo systemctl stop dockersudo systemctl stop docker.socketsudo systemctl stop containerd2. Create the necessary directory structure into which to move Docker root by running the following command. This directory structure must reside on a Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-27667350020475319692023-01-31T13:10:00.002-08:002023-02-18T13:18:23.202-08:00Instruction for Installing Docker in Ubuntu linux OSUpdate the apt package index and install packages to allow apt to use a repository over HTTPS:
sudo apt-get updatesudo apt-get install ca-certificates curl gnupg lsb-release Add Docker’s official GPG key:sudo mkdir -m 0755 -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpgSet up Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-23537992158685122342020-01-29T00:52:00.001-08:002020-01-29T00:52:59.447-08:00Find MongoDB Version in Windows / Linux
Installed Mongodb version in Windows/ Linux system can be identified by using the mongod command with --version option.
To check MongoDB Server version, Open the command line via your terminal program/ putty and execute the following command:
mongod --version
To get the MongoDB Shell version, Use the below command:
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-9047118407974155752017-01-05T21:33:00.000-08:002017-01-05T23:39:38.966-08:00Clear saved password from Tortoise SVN
Sometimes we need to access the Tortoise SVN for another user, on that time we don't have option to enter the second username and password details we want to use.
Using below method we can clear the previously cached user credentials from Tortoise SVN client, so that we can login with new credentials.
Remove the contents from below folder
%APPDATA%\Subversion\auth
when you Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-10133545177843765432017-01-04T05:36:00.000-08:002017-01-04T05:38:14.831-08:00Set percentage sign in Vertical axis of in Google Visualization Chart API charts
Using the below line set the vertical axis to display percent but with that it also multiply the original data value by 100. i.e if your current vertical axis for your data value is 10,20,30.
applying the below option will make that as 1000%, 2000%, 3000%.
To overcome this you need to divide each data value for the vertical axis by 100.
chart.draw(data, {vAxis: {format:'#%'} } );
To Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8083071840515516671.post-64189181041754066472016-09-21T00:28:00.000-07:002016-09-21T00:30:50.270-07:00Programmatically adding Labels in TFS
Using C# code we can Label the files in particular changeset. Below is the code snippet for labeling all files in given changeset.
private void LabelChangeset(string fileLabel, Changeset changeset)
{
VersionControlLabel vcl = new VersionControlLabel(vcServer, fileLabel, null, cbProjects.SelectedItem.ToString(), "Autogen label.")Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-39522748651636096972013-09-16T00:27:00.001-07:002013-09-16T02:33:07.507-07:00Search Oracle procedure by its inner text content
In Oracle one can search for name and the content of any stored procedure where "YOUR_SEARCH_KEY" is is referenced within the stored procedure.
The following query will fetch the details those having the "YOUR_SEARCH_KEY"
SELECT * FROM ALL_SOURCE WHERE LOWER(text) LIKE LOWER('%YOUR_SEARCH_KEY%')
Where,
ALL_SOURCE - Describes the text source of the stored objects accessible to the Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-26296834937917541052012-05-09T21:55:00.000-07:002012-05-09T22:28:17.564-07:00Text Wrapping in Html Pre tag
When using "PRE" tag to show the values in page , if the lines is two it won't wrap in the page it will lead to a page alignment problems.
here is the fix to overcome this problem. i tried this code and checked in major browsers. it works for me
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /*Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-8083071840515516671.post-50210110939865228772011-05-27T04:14:00.000-07:002011-05-27T04:33:33.757-07:00Error in Struts2 OGNL expressions when migrating to Netbeans 7Encountered ":" at line 1, column 9.
Was expecting one of:
"}" ...
"." ...
"]" ...
">" ...
"<" ...
Netbeans 7 will show the above error in jsp pages when migrating to Netbeans 7.0 from lower version for the following type of syntax.
list="#{true:'On',false:'Off'}"
But it will not affect the output of the JSP Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-8083071840515516671.post-67174508596145499842011-05-24T03:10:00.000-07:002011-05-24T03:15:35.355-07:00Apache commons methods for generating random numbers in JavaNew class is introduced in apache.commons for generating random numbers by calling a method. These methods can be accessed by importing
import org.apache.commons.lang.math.RandomUtils;
These methods can be accessed by
double rnddouble= RandomUtils.nextDouble();
float rndfloat= RandomUtils.nextFloat());
int rndfloat= RandomUtils.nextInt());
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-24016609746541995202011-05-20T02:24:00.000-07:002011-05-20T02:27:55.953-07:00Adobe Released Flash Player 10.3 for Android mobilesAdobe released new Flash player version 10.3 for android based mobile phones.
In Adobe Flash Player 10.3 for Android mobiles Adobe fixed more security holes and introduced additional enhancements to their Adobe Flash Player on the Android platform.
On Android 3.1 devices, Adobe Flash 10.3 now supports hardware-accelerated videos to deliver smoother video playback.The latest version of Adobe Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8083071840515516671.post-33150150620037914322011-05-11T00:50:00.000-07:002011-05-11T00:50:00.579-07:00Greater than comparison in Freemarker tagsIn Freemarker we can test the lesser than condition directly .
<#if value1 < valu2>
value1 is less than value2
</#if>
But we can't do the same for greater than (>) in freemarker tag like
//Wrong method
<#if value1 > valu2>
value1 is greater than value2
</#if>
The above one is wrong because the first occurrence of > sign will Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-8083071840515516671.post-71133312187280420702011-05-04T01:03:00.000-07:002011-05-04T01:03:00.218-07:00JSP Error : Attribute qualified names must be unique within an element
Today i have upgraded my Netbeans IDE and Tomcat to latest versions ie Netbeans 7.0 and Apache Tomcat to Tomcat 7.0.12 . After successful migration of Netbeans and Tomcat to latest versions, i try to import and run my existing application but it fails to compile some JSP files. It throws the following errors.
SEVERE: Servlet.service() for servlet jsp threw exception
Unknownnoreply@blogger.com8tag:blogger.com,1999:blog-8083071840515516671.post-19144330170208963252011-05-03T00:03:00.000-07:002011-05-03T00:03:01.136-07:00Training video in Adobe site to learn Flex in a weekAdobe proving the video tutorials in adobe site to learn Flex technology.
Quote from the website:
"Learn Flex in a week by going through this video training course. To maximize your learning, we recommend that you view the videos and complete the exercises in the order that they are listed. If you run into problems and have questions, you can ask a question on the Flex in a Week forum."
Day 1Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8083071840515516671.post-3385634179916253402011-05-02T01:47:00.000-07:002011-05-03T03:04:10.454-07:00ORA-06575 Package or function is in an invalid state in Oracle Stored procedureNormally this "ORA-06575 Package or function is in an invalid state" error come when the stored procedure in invalid state.To make the stored procedure to valid state we need to recompile the particular stored procedure once again.
To recompile the oracle procedure run this,
SQL> alter procedure Procedure_Name compile;
SQL> show errors
This will give if any error in stored procedure Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-7026614246425759782011-05-01T01:10:00.000-07:002011-05-01T23:53:18.885-07:00Access Java Static Methods in Struts2 Using OGNLWe can access static methods and static constants of java class using OGNL tags in struts2 , as we do in normal jsp scriptlet.
In OGNL @ tag is used to access static methods and varibles, here is the syntax toaccess the static method.
@classname@methodname(arg)If using Struts 2.1.x means that you need additional parameter in struts.xml. You need to define the following parameter in struts.xml
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-64329551490255043932011-04-30T01:56:00.000-07:002011-04-30T01:57:46.683-07:00Replace all characters with in two tags using Regular expressions in JavaWe can do the string functions like replace and find using simple regular expressions easily.Regular expression is easier to use with javascript replace function. Here are the regular expressions to replace the entire contents occur between two tags in Java. Here, for example the regular expression removes the content in <-! Tag -> and <-! End Tag ->. In java we need to use Pattern Unknownnoreply@blogger.com6tag:blogger.com,1999:blog-8083071840515516671.post-64511338817029637382011-01-12T23:40:00.000-08:002011-01-12T23:46:51.888-08:00Adding date in Flex using Flex datepartBy using Datepart in flex we can increase or decrease the particular part of the date in flex , Gareth suggested a dateAdd method to do this date addition in simple steps, using datepart we can add or subtract particular part of the date easily.
By using datepart, adding 1 to datepart["date"] we get the next day date,datepart["week"] we get the next week date.
Source Code :
public static Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-43336695626811800902011-01-05T21:19:00.000-08:002011-01-05T21:20:40.873-08:00VRule and HRule controls in FlexThe VRule and HRule controls in Flex are act as a divider(separator) in a container.
VRule control helps to draw a vertical line, this control creates a single vertical divinding line within a container.
VRule controls are defined in flex in mxml tag
Here is the example code for VRule control.
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-50509128562754166052010-12-19T22:11:00.000-08:002010-12-19T22:11:25.296-08:00Flex sample applications from FlexDenFlexDen providing sample applications for the flex developers. They have many interesting application in their website. Here is the some of the applications from that. You can download source codes of these applications also if you like. i have given links to some applications, you can find more applications by searching in website.
Free Flash Catalyst Flex 4 Custom Buttons
http://www.flexden.netUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-63619053664493182922010-11-09T10:26:00.000-08:002010-12-20T23:15:50.634-08:00Flex- Optimize web content for mobile delivery
Download Flash Player 10.1 for AndroidAs the first runtime release of the Open Screen Project and a core component of the Adobe Flash Platform, Adobe Flash Player 10.1 allows you to make your web content contextually relevant and reach more users across a wide spectrum of Internet-connected devices, including smartphones, netbooks, and PCs. New mobile-ready features Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-26800935291129590252010-10-25T22:38:00.000-07:002010-12-20T23:17:34.972-08:00Adobe AIR SDK for PlayBook tablet
Research In Motion (RIM) announced the availability of AIR SDK for its QNK PlayBook tablet.
The PlayBook offers many advanced features in a small form factor, including dual high-definition cameras that could be used for video conferencing, and is enterprise ready
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8083071840515516671.post-77469916973106991302010-06-03T00:51:00.000-07:002010-06-03T00:51:00.448-07:00Displaying Video length in DisplayWe all know that using VideoDisplay in flex we can play FLV videos in flex. its good to show the duration of the video in screen when the video are loading . for that we can use one attribute in VideoDisplay component called "totalTime".It will return the how long the video will play to the user before it actually bufferd it.its good to know the time before it loads.This can be accessed by Unknownnoreply@blogger.com0