PHP: The Right Way CSS reference - CSS style-rule ::= selectors-list { properties-list } ... where : selectors-list ::= selector[:pseudo-class] [::pseudo-element] [, selectors-list] properties-list ::= [property : value] [; properties-list] See the index of selectors, pseudo-classes, and pseudo-elements below. Style rule examples For a beginner-level introduction to the syntax of selectors, see our guide on CSS Selectors.
CSS Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development. HTML5 doctype Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. <! Mobile first With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. To ensure proper rendering and touch zooming, add the viewport meta tag to your <head>. You can disable zooming capabilities on mobile devices by adding user-scalable=no to the viewport meta tag. Bootstrap sets basic global display, typography, and link styles. Set background-color: #fff; on the body Use the @font-family-base, @font-size-base, and @line-height-base attributes as our typographic base Set the global link color via @link-color and apply link underlines only on :hover These styles can be found within scaffolding.less. Normalize.css Containers Use .container for a responsive fixed width container. <div class="container"> ... <!
Ruby in Twenty Minutes What if we want to say “Hello” a lot without getting our fingers all tired? We need to define a method! irb(main):010:0> def hiirb(main):011:1> puts "Hello World!"irb(main):012:1> end=> :hi The code def hi starts the definition of the method. It tells Ruby that we’re defining a method, that its name is hi. The Brief, Repetitive Lives of a Method Now let’s try running that method a few times: irb(main):013:0> hiHello World! Well, that was easy. What if we want to say hello to one person, and not the whole world? irb(main):015:0> def hi(name)irb(main):016:1> puts "Hello #{name}!" So it works… but let’s take a second to see what’s going on here. Holding Spots in a String What’s the #{name} bit? irb(main):019:0> def hi(name = "World")irb(main):020:1> puts "Hello #{name.capitalize}!" A couple of other tricks to spot here. Evolving Into a Greeter What if we want a real greeter around, one that remembers your name and welcomes you and treats you always with respect. The new keyword here is class.
An Introduction to Microservices, Part 3: The Service Registry In this post in the microservices series we will talk about the service registry. In part 2 we discussed the API gateway, where we mentioned that services are registered in a database. The gateway dispatches requests according to the information contained in that database. Below we will explore how that database is populated and in which way services, clients and the gateway interact with it. The service registry The service registry is a database populated with information on how to dispatch requests to microservice instances. Interactions between microservices and the registry (registration) Self-registrationThird-party registrationInteractions between clients and the registry (discovery) Client-side discoveryServer-side discovery Registration Most microservice-based architectures are in constant evolution. Self-registration forces microservices to interact with the registry by themselves. Third-party registration is normally used in the industry. Discovery Example: A registry service
LoopBack Top 12 Ruby on Rails Tutorials | Learning Ruby On Rails A former student asked me a few days ago how I learned Ruby on Rails. The answer was that I simply read alot of great tutorials. So in the spirit of sharing, here are the 12 tutorials that I found most useful: Rolling with Ruby on Rails – Curtis Hibbs of ONLamp.com offers his first excellent introduction to Ruby on Rails. This is the article that got me really excited about RoR.2. Hey, Ruby on Rails Fans! UPDATE, JUNE 2009: Want more up-to-date tutorials on Ruby programming? Happy Rails developing and if you have any other tutorials that you’d like to share, please leave them in the comments! Tagged as: ruby on rails, tutorial
Qu’est-ce que les commentaires conditionnels ? - Alsacréations Les commentaires conditionnels sont un mécanisme propre à Internet Explorer Windows, qui permettent d'inclure dans une page (X)HTML, de manière valide, du code qui ne sera lu et interprété que par Internet Explorer, ou par l'une ou l'autre de ses versions. Techniquement, il s'agit de simples commentaires HTML, qui seront compris comme tels par la plupart des navigateurs. Cependant, le contenu de ces commentaires a une syntaxe spéciale, qui permet à Internet Explorer de savoir s'il doit interpréter le contenu du commentaire ou bien l'ignorer. Les commentaires conditionnels sont compris par Internet Explorer depuis la version 5.0 mais sont officiellement abandonnés à partir d'Internet Explorer 10. Syntaxe de base L'exemple le plus simple de commentaire conditionnel est le suivant: Rappel: un commentaire conditionnel ne peut être inséré que dans un document (X)HTML, et ne peut contenir que des instructions (X)HTML et non CSS. Exemple d'utilisation: Viser une version ou un éventail de versions