Sunday, January 24, 2010
Basic Stature of CakePHP and rules
1) define data model
2) controller file : here we are writing database queries
3) and query results
Table & field name convention
1)create your database
2) table name : lower case, plural, multi-word tables to be separated by underscore
Example : table name articles
3) Each table must have one primary key to named id ( auto increment not null)
4) filed name : lower case can use under score for separation and multi-word field
4) and related table names
Model name convention
Model class name are camelcased and singular ( like article , MyClass etc) it should be database table name
Model file names are lower case, multi – word class is to be separated by underscore
Model files are saved under app/models folder
Saturday, January 23, 2010
Creating Static Pages and Linking in CakePHP
and on about_us.ctp use bellow php code
< ? php $this->pageTitle = 'About us page';
? >
It use to select custom title and you can browse that about_us.ctp like " http://localhost/cake/pages/about_us " ( * i am using XAMPP )
Note : when you create other page name try to use "_" underscore like about_us.ctp
Creating Links
Syntax of link
< ? php echo $html->link('Link Text', 'Link URL'); ? >
In html we use < href = " http://www.westwideway.com "> West Wide Way < / a > to create links but in cake it is different.
< ? php echo link('West Wide Way', 'http://www.westwideway.com'); ? > but out put will display like above html link
to apply css in link please use bellow syntax
< ? php echo $html->link('westwideway', 'http://westwideway.blogspot.com', array('class'=>'linkstyle')); ?>
and linkstyle css tag we can add tag in our css put style under that
To link in next page
< ? php echo $html->link('westwideway', 'http://westwideway.blogspot.com', array('class'=>'linkstyle','target'=>'_blank')); ? >
To link in next page with a aleart message box
< ? php echo $html->link('westwideway', 'http://westwideway.blogspot.com', array('class'=>'linkstyle','target'=>'_blank'),"Do you want to visit this website?"); ? >
these are the different types of link now i am going to put links on my two pages
in home.ctp added : < ? php echo $html->link('About Us', 'about_us'); ? >
and in about_us.ctp : < ? php echo $html->link('Home', 'home'); ? >
Now links are working fine can browse each pages through that .
To insert image : $html->image()
$html->image('logo.png', array('width' => 500, 'height' => 300));
If you don’t want to type that much there is a little trick: use a string as second parameter. With that trick the previous example can be shortened to:
$html->image('logo.png', 'width="500" height="300"');
Cook a Custom CakePHP Template
Editing this Page
- To change the content of this page, create: APP/views/pages/home.ctp.
- To change its layout, create: APP/views/layouts/default.ctp.
- You can also add some CSS styles for your pages at: APP/webroot/css.
To create a default home we need to create a folder named "pages" under app/view/ and put file name "home.ctp" your can write anything on that page it will display there.
use cake php file extension as .ctp use and text editor and save file as .ctp
Creating layout
under under 'app/views/layouts/' folder create a "default.ctp" file
now it will display a blank page - to see content and to give link do following things
Please copy paste above code to defalut.ctp now you can view layout i marked some things in red mark now , Page title is "First Test"
- $title_for_layout
- $scripts_for_layout
- $content_for_layout
- $cakeDebug
$scripts_for_layout : will come under header part helps you to put scripts
$content_for_layout :that must come under body
$cakeDebug : will put after body
now echo $html->css('style'); : creating a css named style.css file and this file can placed under
APP/webroot/css.
Now you can view bellow layout , and i made it please try your self with differnt design
Framework and CakePHP
Framework and CakePHPAs a programmer I used to develops code in php and many languages but faced lot of security issues in my codes discussed with my friend regarding this he advised me to do codes in framework, ( web application framework is a software framework that is designed to support the development of dynamic websites, Web applications and Web services. )
Architectures of Framework
Model view controller (MVC)
I think most of the framework following MVC ( model view controller ) pattern means data model with business rules from user interface, and it is multiple interface stature.
Advantages
1) Security
2) Data access and mapping
3) URL mapping
4) Web template system
5) Automatic configuration
and i started to learn cake php,
Cake php
CakePHP is an open source web application framework with MVC architecture, you can download frame work from " http://cakephp.org/ " : website .
you will get help notes from : http://book.cakephp.org/ website .
i downloaded from cake php site i am using "XAMPP" for mysql and Apache , and put under "htdocs" folder so i can browse ,

Yellow mark showing errors and green mark showing working fine.
Under yellow mark i got bellow errors
- Notice (1024): Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your application [CORE\cake\libs\debugger.php, line 682]
- Your database configuration file is NOT present.
- Rename config/database.php.default to config/database.php
Under Green Mark
- Your tmp directory is writable.
- The FileEngine is being used for caching. To change the config edit APP/config/core.php
To solve first error : under app /config folder take core.php file we can view a on 165th line bellow code :
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
Plz change 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi' this code 'ADjsdfssd454asdfsdfsdfsdf' i put above code now , first error solved . it is code some what similar to API codes
Next step is database setup for that : for that create a db in mysql i crated "cakeapplication" named database after rename the file to "database.php.default" to "database.php" open that file and fill the details of dbname, dbhost, and password which you created
Now your cakePHP ready for create application
Saturday, December 5, 2009
Adobe Flex
Adobe Flex
Monday, September 14, 2009
Lorem Ipsum
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.Sunday, August 16, 2009
Ruby - Object - Oriented programming language
Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. (Def from : http://www.ruby-lang.org/en/ ). Latest release - 1.9.1-p243/ 2009-07-18;
Typing discipline - dynamic ("duck")
Major implementations - Ruby MRI, JRuby
OS - Cross-platform
License - Ruby LicenseGNU General Public License
Website - http://www.ruby-lang.org/
The first public release of Ruby 0.95 was announced on Japanese domestic news group on December 21, 1995.
Ruby 1.0 - December 25, 1996
Ruby 1.9.1 - anuary 30, 2009, ( support Per-string character encodings )
The TIOBE index, which measures the growth of programming languages, ranks Ruby as #9 among programming languages worldwide. Much of the growth is attributed to the popularity of software written in Ruby, particularly the Ruby on Rails web framework.
Ruby is also totally free. Not only free of charge, but also free to use, copy, modify, and distribute.
In Ruby, everything is an object. Every bit of information and code can be given their own properties and actions. Object-oriented programming calls properties by the name instance variables and actions are known as methods. Ruby’s pure object-oriented approach is most commonly demonstrated by a bit of code which applies an action to a number.
it allows its users to freely alter its parts. Essential parts of Ruby can be removed or redefined, at will. Existing parts can be added upon. Ruby tries not to restrict the coder.
For example, addition is performed with the plus (+) operator. But, if you’d rather use the readable word plus, you could add such a method to Ruby’s builtin Numeric class.
class Numeric
def plus(x)
self.+(x)
end
end
y = 5.plus 6# y is now equal to 11
Ruby’s operators are syntactic sugar for methods. You can redefine them as well.
Ruby has a wealth of other features, among which are the following:
- Ruby has exception handling features, like Java or Python, to make it easy to handle errors.
- Ruby features a true mark-and-sweep garbage collector for all Ruby objects. No need to maintain reference counts in extension libraries. As Matz says, “This is better for your health.”
- Writing C extensions in Ruby is easier than in Perl or Python, with a very elegant API for calling Ruby from C. This includes calls for embedding Ruby in software, for use as a scripting language. A SWIG interface is also available.
- Writing C extensions in Ruby is easier than in Perl or Python, with a very elegant API for calling Ruby from C. This includes calls for embedding Ruby in software, for use as a scripting language. A SWIG interface is also available.
- Ruby features OS independent threading. Thus, for all platforms on which Ruby runs, you also have multithreading, regardless of if the OS supports it or not, even on MS-DOS!
- Ruby is highly portable: it is developed mostly on GNU/Linux, but works on many types of UNIX, Mac OS X, Windows 95/98/Me/NT/2000/XP, DOS, BeOS, OS/2, etc.
Monday, August 3, 2009
Google Latitude

Tuesday, July 28, 2009
Wolfram Alpha
http://www.wolframalpha.com/Wolfram Alpha is an answer engine developed by Wolfram Research ( Wolfram Research is an international company that summarizes its aim as "Pushing the Envelope of Technical Computing". The main product of Wolfram Research is Mathematica, an environment for technical computing. ) and it was released to the public on May 15, 2009.
As of now, WolframAlpha contains 10+ trillion pieces of data, 50,000+ types of algorithms and models, and linguistic capabilities for 1000+ domains. Built with Mathematica—which is itself the result of more than 20 years of development at Wolfram Research—WolframAlpha's core code base now exceeds 5 million lines of symbolic Mathematica code. Running on supercomputer-class compute clusters, WolframAlpha makes extensive use of the latest generation of web and parallel computing technologies, including webMathematica and gridMathematica.
Is WolframAlpha a search engine?
No. It's a computational knowledge engine: it generates output by doing computations from its own internal knowledge base, instead of searching the web and returning links.
The major difference between other seach engine and wolframalpha is others givings the results of site links which included the content but wolframalpha answering your question
Please check bellow examples
the keyword whcih i am searching : doha to newyork
Result link : http://www06.wolframalpha.com/input/?i=doha+to+newyork
It displaying the distance between ny and doha ,flight time , path image view in world map, local times of both city and many more

Another example
if you search some musical notes : C E G Bb D F# A Search link with key word : http://www09.wolframalpha.com/input/?i=C+E+G+Bb+D+F%23+A
It displaying musical notes and can hear the sound ( music ) , keyboard display etc

Click on link to see example by topics : http://www.wolframalpha.com/examples/
Sunday, July 19, 2009
WampServer




- manage your Apache and MySQL services
- switch online/offline (give access to everyone or only localhost)
- install and switch Apache, MySQL and PHP releases
- manage your servers settings
- access your logs
- access your settings files
- create alias
- change WampServer's menu language
- access this page
Monday, July 13, 2009
ColdFusion
Wednesday, July 1, 2009
New Firefox web browser


Friday, June 26, 2009
VeriSign

Thursday, June 18, 2009
Stop Bad ware

There are several important things you can do to help reduce your risk of infection:
Keep your operating system, browser, and anti-virus software up to date
Only download software from websites you trust
Be cautious when clicking on pop-up advertisements
Be skeptical of offers that seem too good to be true
Be wary of clicking links from unknown senders in email and instant messages
Whenever downloading or installing software, read the license agreement and policies carefully
In addition to these measures, you may also want to download and run an anti-spyware program for protection against certain forms of badware that may not be detected by anti-virus software. The links below refer to reviews of anti-spyware applications. As with your anti-virus program, be sure to keep your anti-spyware software up to date.
Please note that we do not endorse these companies or sites and cannot comment on their effectiveness.
AV Comparatives: Independent Comparatives of Anti-Virus Software
Spyware Center at Download.com
MalwareHelp.org
SpywareInfo Forum
Matousec’s firewall tests
PC World security suite rankings
StopBadware.org is coordinated by Harvard Law School’s Berkman Center for Internet & Society, and is supported by several prominent technology companies including AOL, Google, Lenovo, PayPal, Trend Micro and VeriSign. Consumer Reports WebWatch serves as an unpaid special advisor.
StopBadware.org is directed by Harvard Law School professors and Berkman Center for Internet & Society co-directors Jonathan Zittrain and John Palfrey, with the support of a policy-oriented advisory board and a technical working group, which is composed of top experts in the field like Internet pioneers Esther Dyson and Vint Cerf.
Wednesday, June 3, 2009
Bing.com
Wednesday, May 27, 2009
jQuery


src attribute in the script tag to point to your copy of jquery.js. For example, if jquery.js is in the same directory as your HTML file, you can use:Wednesday, May 6, 2009
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent
Wednesday, April 29, 2009
Microsoft Silverlight


Saturday, April 4, 2009
2d and Tablets
2dComputer animation
Like stop motion, computer animation encompasses a variety of techniques, the unifying idea being that the animation is created digitally on a computer.

(image Our(w3infotech) 2d animator using tablet )
Figures are created and/or edited on the computer using 2D bitmap graphics or created and edited using 2D vector graphics. This includes automated computerized versions of traditional animation techniques such as of tweening, morphing, onion skinning and interpolated rotoscoping.
Sunday, March 29, 2009
Yahoo Fire Eagle

Users can turn off tracking at any point, of course, and can also go in and delete any or all stored geo data about themselves. Yahoo says it will be immediately removed from their servers.
Then other applications can take that data with your permission and build it directly into their service.
This is perfect for services like Flickr, which still struggle to get users to add lat/long information to photos (With FireEagle, Flickr could just look at the time stamp on photos and note where you were on FireEagle at that time). FireEagle can also benefit by working with established place-blogging services like Plazes, both by giving and receiving geo information on users.
The service will have open APIs for both adding and taking information. Ismail says they have been working with 50 or so third party developers in secret over the last couple of months, many of whom will have applications using FireEagle ready to go on the official launch date.
I was able to take a few camera phone pictures during a demo of the product last week at Brickhouse. The resolution isn’t great (in fact it’s terrible), but you can get a feel for what the platform will look like. I’ve also included a shot of a Facebook application, below.
I think I can safely say that there are a ton of developers who are going to be extremely excited about FireEagle.


