Blog
- October 21, 2011
- Task Scheduler was not working Social Engine video upload module - Solved
Hi,
Recently I started reviewing SocialEngine (Short desc: create your own social networking site), and I face some issue with video uploading process.
I am using SocialEngine 4.1.7.
By default, user can only embed Video from YouTube and Vemio. But if you want to upload the Video file, you need to allow it by enabling settings from the Administrative area.
- Read More
- By Vikas
- Comments(5)
- September 28, 2011
- Sql Server Rank() v/s Dense_rank()
Hello Friends, Some days before I was googling on sql server's system function and I got one site having sql server query puzzle. The site have very interesting puzzle. I got a puzzle during surfing and it is to find out second highest salary of each department and tie salary should also count. There are inbuilt functions in sql server to give rank as per result set. The Rank() function of sql server returns the position of value within a partition of a result set. Rank() function left ...
- Read More
- By Bharat Patel
- Comments(2)
- September 20, 2011
- Read File line by line in ColdFusion by using Java Classes
HI,
I was having situation where I wanted to read a file and process each line.
I think cffile tag is not much to do it, so I use java classes.
Basically we need two kinds of classes.
1. InputSream
2. Buffer reader
Buffer reader is capable to read any input stream line by line.
Final code will look like:<cfscript> FileName = expandPath('/temp.txt'); objFileReader = createObject("java","java.io.FileReader"); InputStreamReader = objFileReader.init(FileName); objBuffer = createObject("java","java.io.BufferedReader" ); LineIO = objBuffer.init(InputStreamReader); </cfscript> <cfset eof = 0> <cfset cnt = 1> <cfloop condition="not eof"> <cfset currline = LineIO.readline()> <cfif isdefined("currline") eq "no"> <cfset eof = 1> <cfbreak> </cfif> <cfoutput>line #cnt#: #currline#<br/></cfoutput> <cfset cnt = cnt + 1> <cfflush> </cfloop>- Read More
- By Vikas
- Comments(2)
- September 20, 2011
- Complex password strength checking through regular expression
Currently working on project for well non credit card company where they have online registration form. They really want user enter enter strong password for their account and criteria for password listed below..
- Password must length between 8 to 18.
- Password must contain atleast one alpha and on numeric.
- Password must have one special characters from @,#,$.
- Password can not have repeative alpha and numeric.
This is really complex but can be done with four different conditions easily (right?) but I decided to make things more complex and check all four condition with single regular expression. After spending time on this finally figure out regular expression can perform all four condition.
- Read More
- Comments(0)
- September 6, 2011
- Making Paypal standard checkbout more user friendly
Recently working with paypal standard checkout and it so easy to integrate with any application as it will redirect to paypal site and customer login and make all kind of payment stuff at paypal site only. But this task make really tuff for new customer who has limited knowledge of intenernet/paypal.
How this works? Well, paypal has very good documentation here. Basic flow is.
- Customer click on "Paypal" button which redirect to paypal site.
- Customer need to login or enter credit card information.
- Paypal ask for confirmation of payment.
- Thanks page for placing order with link to return original site.
- Read More
- Comments(0)
- September 4, 2011
- Static method implementation in ColdFusion
I found some discussion about static method equivalence in ColdFusion.
In C# we can declare class as static and static class can only have all the static methods and static variables. And we can call static class methods without creating its instance.
In ColdFusion we must need to create an instance of cfc. Then & then we can call it’s method. To avoid creating instance each time, you can create object in Application init() function, and make it at application scope, so you can directly call the methods. But this is still a nasty approach, as we are still creating an object when Application initializes.
Then I remember that ColdFusion is not an Object Oriented Language. We make it look like OOP! It happens mostly when we use ColdBox or Model Glue or any other application framework, where most of the coding is in cfc only. Now a days people are using cfscript tag more as Lots of tags are now available in cfscript. And when we use cfscript tag we, feel like it's an OOP language! But remember ColdFusion is a scripting language as PHP and Classic asp. cfscript tag itself trying to remind us by its name!
Thanks...
- Read More
- By Vikas
- Comments(0)
- August 27, 2011
- sql server(store procedure) mechanism convert empty string date parameter to initial date(1900-01-01)
Hello Friends, It may you know about it but I would like to share this thing with you. We were working on one of project where we faced issue. we are storing data through sql server store procedure using date parameter. As per our logic, the date parameter has not date value it may be empty string. Whenever date parameter has empty string sql server store initial date(1900-01-01) in the date field. We checked our whole logic to find out how the initial date come if date parameter has an ...
- Read More
- By Bharat Patel
- Comments(0)
- August 19, 2011
- Work around ColdFusion local scope
Hi friends,
These days am working as a tester. I never thought that developer can also do that if they really take interest in testing! Infect someone can also learn from the testing, even testing can also test their understanding for knowledge.
While testing I saw one case where I get more variable in the array object other then I defined. Then I again take a look and I came to know that local variable was causing an issue.
Let me give you some examples and exercise. Make sure that before you see the output just think what would be the output. Consider that all following code is written in sample cfml page and we are using ColdFusion 9.
- Read More
- By Vikas
- Comments(1)
- August 17, 2011
- Bug - count() function in ColdFusion query of query
Hi,
It has been a great time since I started working on ColdFusion. I must say that it is the easiest language in the world and yet it is a powerful and can be compared to any major programming language.
In last few days, I was using ColdBox and MockBox framework in our current project. I was using query of query which is very similar to SQL query, and we can use it over query object in ColdFusion.
Count() is a math function, but if we use it with select statement like count(*), it returns a number of rows fetched in select query. I used it query of query, and it was giving me the correct count if my select statement is returning some rows, but if it is not returning any row then ideally it should give 0 as output, but it gives [empty string].
- Read More
- By Vikas
- Comments(0)
- August 8, 2011
- How to use SQLite manager extension in Firefox?
Hi friends,
It was really strange when I installed an extension from Mozilla and I cannot find how to use it!!
Well Then I think there must be an icon, which I don't see on tool bar.
Right click on the top of the Firefox, and choose customize.
Then look for the SQLite icon, drag it to toolbar. Click on the icon to use it.Simple? I can't say, because I find bit difficult!
- Read More
- Comments(7)