Category 'PHP'


2.0 Snipplr code: fragments (snipp) of useful code

Snipplr It was a long time that I wanted to point this valuable service dedicated to programming world. Snipplr (code 2.0) is a veritable font or repository of useful code snippets. You can register for free and send portions of their code and, above all, enjoy the many snipp already on site. I have treated many languages ​​(Actionscript, ASP, C #, MatLab, PHP, Rails, SVN, etc ...), all well-sorted and cataloged. You can also install a handy WordPress plugin can display on our blog a snipp-tails through its unique id.

More ...

How to save images in Flash CS3

With the use of Adobe Flash CS3 Bitmap is so improved that is immediately wanted to create a small Paint. . We have already seen how to make a small Paint (see Paint in Flash CS3 Create a Painter: simple application for drawing in Flash CS3 Pro ) can support a true "eraser" - erase function thanks to a particular use of Layer Shape and Bitmap . Let's say that Flash (unlike Flex) encoding does not allow it (like JPG or PNG) it automatically saves Bitmaps. However you can get around it using a server-side scripting and the ability of Flash to send data in POST.

More ...

Adobe AIR: the misunderstood

Adobe AIR Some, quite rightly, argue about the Adobe AIR, Adobe Integrated Runtime (formerly Apollo) offered by Adobe. What are we talking about? After all AIR is still a beta ( the latest release is 12/12/2007 - the beta 3 ) and its success, including whether we will or not depends on many factors.

More ...

EditArea: a rich Sourcecode Editor in Javascript

EditArea is a different way of using the online editing functions allowed by HTML. This technique, used most times to create WYSIWYG , is exploited in this case to provide a real code editor.

EditArea

A normal TextArea field is transformed into a real editor with the ability to format the text, searching and replacing words and get a color code in real time. Among its features we notice:

  • Simple integration through a single JavaScript script and a single call to a function of patch.
  • Support tab
  • Search and replace with regexp
  • Supports code coloring for: PHP, CSS, Javascript, Python, HTML, XML, VB, C, CPP, Pascal, Basic, Brainf * ck
  • Auto-indenting of new lines
  • Numbering lines of code
  • Multilanguage support: Croatian, Danish, English, French, German, Italian, Japanese, Polish, potoghese)
  • Support for gzip
  • Multiple instances
  • Fullscreen
  • Resizing the window in real time
  • Possibility to extend the features through plugins
  • Save and Load callback
  • Work with prototype and mootools

An example of how to use it:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
editAreaLoader. init ({
// id of the textarea to transform id: "exemple_3" / / id of the textarea to transform
true , Start_highlight: true
"8" , Font_size: "8"
"verdana, monospace" , Font_family: 'verdana, monospace "
"y" , Allow_resize: "y"
false , Allow_toggle: false
"fr" , Language: "fr"
"css" , Syntax: "css"
"new_document, save, load, |, charmap, |, search, go_to_line, |, undo, redo, |, select_font, |, change_smooth_selection, highlight, reset_highlight, |, help" , Toolbar: "new_document, save, load, |, charmap, |, search, go_to_line, |, undo, redo, |, select_font, |, change_smooth_selection, highlights, reset_highlight, |, help"
"my_load" , Load_callback: "my_load"
"my_save" , Save_callback: "my_save"
"charmap" , Plugins: "charmap"
"arrows" , Charmap_default: "arrows"
});

More ...

Flash CS3: communicating with a Web Server

ActionScript 3.0 introduces a number of formidable instruments of communication, some totally new, some revised and improved from previous versions of ActionScript. We begin to see how it changes the way you interact with a Web Server in the case of a simple communication between Flash and a PHP page with a response XML. First of all, the object XML does not exist anymore! In ActionScript 3.0 new classes were introduced, some of which are dedicated to "backward compatibility".

Note: The XML class (along with related classes) from ActionScript 2.0 have been renamed XMLDocument and moved to the package flash.xml. It is included in ActionScript 3.0 to ensure compatibility with previous versions.

usando il metodo sendAndLoad() dell'oggetto LoadVars (vedi: Flash: LoadVars e XML per inviare dati in POST ). In ActionScript 2.0 communication with a Web Server was often resolved by exploiting the combination of objects LoadVars and XML, using the method sendAndLoad() object LoadVars (see: Flash: LoadVars and XML to send data in POST ). Now things are changing, but you just get used to new names and objects. As indicated in the manual, in fact:

More ...

Tunneling and proxy servers, and not only for Ajax

Because of its ability to communicate with the server, the object XmlHttpRequest (XHR), used in the technology Ajax (which stands for Asynchronous JavaScript and XML, which should be pronounced "egiacs" even if we Italians prefer "aiacs"), has a security lock that prevents you from running applications outside the domain in which it operates. This protection is necessary to prevent Javascript Injection (techniques of "injection" extremely dangerous code in order to break the system) of various kinds, with the ultimate objective of "break" in the system.
This limit is now taken into serious consideration and you're thinking, somehow, to solve it - XmlHttpRequest object directly - without compromising security (see also: Third Proposal for cross-site extensions to XMLHttpRequest ).

However, the situation today is as follows:

XHR

More ...

WYSIWYG editor for the Web

TynyMCE 2.1.2 (3.01 alpha)

TinyMCE Now in version 3.01a ( the last stable is 2.1.2 ) TinyMCE supports the following browsers: Supported browsers: Mozilla, MSIE, FireFox, Opera and Safari (experimental) (Mozilla, MSIE, FireFox, Opera and Safari (experimental)).
Thanks to the support of Plugins is fully configurable, both at the level of skins (see PICTURE below for two examples) both at the level of supported features (see Plugins ). Full language pack allows you to customize the output XHTML 1.0. Can be used from PHP / .NET / JSP / Coldfusion GZip compressor also supports Ajax for operaqzioni Load / Save.

More ...

Notes on testing and debugging in Adobe Flash

One consideration, obvious but overlooked during application development in Adobe Flash, the difference between the player used for testing within the Flash IDE and the object (ActiveX or EMBED) used by your browser. Who has the version "Macromedia" Flash MX (version 8 to be clear, but this speech really applies to any version of Flash ...) when developing a movie and try it within the IDE runs the Flash Player linked to development package. Then when you publish your movie on the net and you "test" with the Flash Player browser you may experience some - substantial - differences!

imageimage

More ...

reCAPTCHA: Stop the SPAM

image Some people hate them and who can not do without! The Captcha (c ompletely to utomated p ublic T Uring tests to tell omputers c and h umans in part), ie the systems of "human control", enable in most cases to eliminate much of the SPAM product in the network. reCAPTCHA is a free service that lets you install your own control Captcha to your web site Once registered, you can list on their Web generating two keys (one public and one private: see RSA encryption ) to use in PHP , WordPress , and MediaWiki . .

image

On the site you can also find an email protection service. In practice, a code is released to join its Web so you do not see a clear email address, type "i [...] @ miodominio.com". Clicking it will show a Captcha to solve!

See also:

More ...

Aptana IDE update: 9 Milestones

It is available to update the Aptana IDE , the Web development environment that supports Adobe AIR and Apple iPhone . Among the new improvements in the PHP section by updating the Code Assist functions on both parameters. Also improved the "color" of the code. Added support for latest Ajax frameworks including prototype.js and jQuery . Also improved handling of Javascript.

image

For the complete list of new features click here .

More ...



Stop SOPA