background preloader

PL

Facebook Twitter

PHP Manual: Language Reference. PHP coding standards - tech.tmw.co.uk. Coding Standards and Best Programming Practices for PHP Contents Naming Conventions and Standards Code Indentation Generally you should use the Allman style ( of indenting code. This puts opening braces onto a new line of their own, such that they line up vertically: <? Phpif(expression){ // statements} This will differ slightly from the indentation style mainly used for Javascript (like K&R), but there are valid cases where the Allman style would cause syntactic differences in code execution (such as implied return values in Javascript because the semicolon is optional). <? Also, tabs should be used to indent code rather than spaces. Brace Usage If your if() or loop only contains one executable statement, the containing braces are optional, and should be omitted: <?

The statement should still be indented as usual, and kept on a separate line for readability. Trailing Whitespace Avoid this if you can. Naming Conventions <? <? <? Code Commenting <? <? PHP Live Regex. PHP 5 Sessions. Python 2.7.9 documentation. Votre Python aime les pip. A partir des versions 2.7.9 et et 3.4, pip est fournit automatiquement avec Python. Si c’est votre cas, vous pouvez sauter la partie installation et aller directement à la partie usage de cet article. Pip install par-ci, pip install par là. “Pour installer cette lib, il vous suffit de faire pip install”.

Mais merde, c’est quoi pip ? Python et les libs externes La beauté avec Python, c’est qu’on peut prendre une lib, la balancer dans le répertoire courant, et l’importer. Mais. Car oui, il y a toujours un mais (souvent après le mois de mars). Quand il faut mettre à jour ses libs, c’est chiant. Mais surtout, quand on a une lib qui a des parties en C à compiler comme les libs de crypto, d’accès à la base de données, de traitement XML, de parsing ou de sérialisation, de calculs scientifiques, etc. ça ne marche tout simplement pas. Là, il y a deux écoles. Et les mecs qui utilisent setuptools (et qui se retrouvent avec encore d’autres problèmes, mais c’est mieux parce que je le dis).

Setting up Django and your web server with uWSGI and nginx — uWSGI 2.0 documentation. This tutorial is aimed at the Django user who wants to set up a production web server. It takes you through the steps required to set up Django so that it works nicely with uWSGI and nginx. It covers all three components, providing a complete stack of web application and server software. Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. nginx (pronounced engine-x) is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server.

Some notes about this tutorial¶ Note This is a tutorial. Nginx and uWSGI are good choices for Django deployment, but they are not the only ones, or the ‘official’ ones. The way we deploy Django here is a good way, but it is not the only way; for some purposes it is probably not even the best way. This tutorial makes some assumptions about the system you are using. Concept¶ A web server faces the outside world. A Web Server Gateway Interface - WSGI - does this job. Try: How to Deploy Python WSGI Applications Using uWSGI Web Server with Nginx. Introduction As introduced in our Python Web Server Comparison article, uWSGI is a vast project, capable of doing much more than serving web applications alone. However, its wide array of functionality, combined with relative ease of configuring it, make it an excellent choice for many deployment needs– especially when it is coupled with Nginx.

In this DigitalOcean article, we aim to discuss uWSGI in depth and go over the necessary steps for not just installing the server, but actually deploying Python applications based on various frameworks, covering every important step for small, midsize, and even relatively large ones for production. We will also discuss using Nginx (and why) with this set up, as Nginx and uWSGI are built natively to work with one another, forming the perfect stack for most deployments. Glossary 1. uWSGI in BriefWeb Application Deployments with NginxUsing Nginx as Reverse-Proxy with uWSGI 2. 3. 4. 5. 6. Understanding uWSGI and Using Nginx uWSGI is an ambitious project. Gui2py - Simple and powerful GUI framework for agile development. InformacionGeneral - GuiaInstalacion (Español) gui2py is a GUI framework for building cross-platform "visual" desktop applications on Windows, Mac OS X, and Linux, using the Python language and the wxPython toolkit.

Its objetive is to evolve PythonCard with web2py's phylosophy and facilities with the following goals: KISS compact structure: easy to learn, complete and powerful GUI Framework for Rapid Application Development Visual Tools: designer, inspector and property editor, embeddables into IDEs (see rad2py screenshot) HTML/Javascript-like capabilities (i.e. events, layout): reusing and/or adapting gluon (web2py framework) + automatic flow mechanism Features Currently, gui2py supports the following components: Visual Tools For quick Point-and-Click visual design of user interfaces, gui2py includes: a designer, a toolbox, an inspection tool and a property editor: Screenshots For more screenshots, browse the screenshots folder in the repo.

Compatibility Notes: Installation News. Ruby. Ruby-Doc. Bbatsov/ruby-style-guide. Ruby User's Guide. Try Ruby: learn the basics of the Ruby language in your browser. Lua. The Java™ Tutorials. The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available. See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases. See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases. The Java Tutorials are practical guides for programmers who want to use the Java programming language to create applications.

They include hundreds of complete, working examples, and dozens of lessons. Trails Covering the Basics These trails are available in book form as The Java Tutorial, Sixth Edition. Creating Graphical User Interfaces Creating a GUI with Swing — A comprehensive introduction to GUI creation on the Java platform. Specialized Trails and Lessons These trails and lessons are only available as web pages.

Trails Covering the Basics. The Go Programming Language.