background preloader

How to Center Anything With CSS

How to Center Anything With CSS
Recently, we took a dive into the very core concepts behind CSS layout and explored the differences between absolute and relative positioning. We’re going to follow that up with another CSS layout talk, this time based around a fundamental question that almost every new developer asks: how do you center something? There are a bunch of different types of web elements and layout situations, each calling for a unique solution for centering (both vertically and horizontally). Today we’ll go over a bunch of these scenarios so you can wrap your mind around how they work and come away with the confidence to center anything! Who’s This For? I’ve gotten a lot of commenter feedback lately from designers who struggle with the basic methods and concepts of layout in CSS. Having been there quite a few times myself, I know that this is an immensely frustrating period of your professional growth. Horizontally Center an Element As you can see, by default, our div pops up in the top left of the viewport.

PHP Introduction - Online PHP Guide PHP Introduction Tutorial will explain you About PHP, PHP files, Hypertext Preprocessor, Why PHP? With example. Recently more people have been building their own websites and so scripting languages have become more important. And also, scripting languages are becoming easier to learn and PHP is one of the easiest and most powerful yet. About PHP PHP is server side scripting language, capable of generating the HTML pages.PHP stands for "PHP: Hypertext Preprocessor".Syntax based on Perl, Java, and C.Very good for creating dynamic content.If you want to focus on one system for dynamic content, this is a good one to choose.PHP is simple for beginner and also provide lot of functionality to the professionals. Why PHP? PHP involves:Simplicity in scripting (generally using the database).Platform independence.PHP is:Primarily designed for web applications.An open source. PHP File File extension for php are ".php", ".php3", ".phtml".PHP scripts are always enclosed in between two PHP tags: <? Output:

Why Do Monads Matter? « Sententia cdsmithus (A Side Note: I’ve been formulating the final thoughts on this post for about a week now. In an entirely unrelated coincidence, a good friend of mine and fellow Haskell programmer, Doug Beardsley, ended up writing two posts about monads over the weekend as well. Weird! But don’t fret; this isn’t really the same thing at all. Category Theory for Software Development? Match made in heaven? If you’re a software developer, have you heard about monads and wondered what they were? Or if you’re interested in mathematics, have you heard murmurs in the past about how category theory interests computer science people? These are the kinds of questions I begin with. Where category-based intuition and ideas, and monads in particular, come from in computer programming.Why the future of programming does lie in these ideas, and their omission in today’s mainstream languages has cost us dearly.What the state of the art looks like in applying category-based ideas to problems in computer programming.

State Machines – Basics of Computer Science Computer science is what enables programming, but it is possible to do a lot of programming without understanding the computer science concepts underlying the process of computation. This isn’t always a bad thing. When we program we work at a much higher level of abstraction. When we drive a car, we only concern ourselves with two or three pedals, a gearshift and a steering wheel. You can safely operate a car without having any clear idea of how it works. However, if you want to operate a car at the very limits of its capabilities, you need to know a lot more about automobiles than just the three pedals, gearshift and steering wheel. The same is true of programming. The purpose of this article is to provide some fundamental background for computation. Finite State Machine A finite state machine is a mathematical abstraction used to design algorithms. Imagine a device that reads a long piece of paper. As the state machine reads each letter it changes state. Do you see the problem?

Basics of Computational Number Theory Robert Campbell Contents Introduction This document is a gentle introduction to computational number theory. Modular Arithmetic Modular arithmetic is arithmetic using integers modulo some fixed integer N. 7 + 7 = 14 = 2 (mod 12) 5 * 7 = 35 = 11 (mod 12) Further examples can be generated and checked out with the following short programs. Among the basic operations we have missed the division operator. 11 / 5 = 7 (mod 12) as 5 * 7 = 11 (mod 12) 5(-1) = 1 / 5 = 17 (mod 21) as 5 * 17 = 85 = 1 (mod 21) 48 / 31 = 72 (mod 91) as 31 * 72 = 48 (mod 91) 9 / 3 = 7 (mod 12) as 3 * 7 = 21 = 9 (mod 12) As the last example points out, modular division does not always produce a unique result, for other correct answers are 3 and 11 (as 3 * 3 = 9 (mod 12) and 3 * 11 = 33 = 9 (mod 12)). GCD - The Euclidean Algorithm The Euclidean Algorithm solves two problems we have posed: Common Factors - Given two numbers n and m, find any common factors they may have. The algorithm to find gcd(n, m) runs something like this:

A Course of F# Study | craftyThoughts I’ve been tinkering off and on with F# for about two years. Now I plan to dive in and do some serious code writing, so I’m gathering all my resources in one place (here) ready to move forward. For anyone with a beginning to intermediate level of experience with F#, this is my recommended course of study. Development Environment You’ll want to install a couple VS extensions. Core Course You’ll find you have to deliberately write F# one statement at a time. Beyond the Basics Once you finish Awesome Princess’ excellent course, you’ll want to continue your graduate studies along with whatever productive coding you are doing. And then there are the bloggers. Geez this is getting kind of long. Here’s the F# open-source community on GitHub. …and last, but not least FPish – Online community of functional developers, more than a blog… Theory Matters Start getting used to the arrow notation F# uses to describe function signatures. Don’t try to force-feed yourself on monads. OK, enough of monads. Notes

C# Application Integration with Facebook & Twitter with oAuth Introduction This articles describes a simple tutorial explaining: Setting a Facebook status through a C# application Sending a Tweet through a C# application Background Last week i had to do a little proof of concept about integration of Twitter & Facebook with a C# application. This is my first share, so i would appreciate any suggested improvements . Using the code Let's start by first doing the Facebook part of this article. To set a status on Facebook using your C# application, first of all you will need to create an application by going to the following link: Click on the CREATE NEW APP button. Fill in the required information and click Continue Now your application has been created. Now let us move on to the coding. Now we'll move on to authorizing the application. var fb = new FacebookClient(this.AccessToken); dynamic result = fb.Post("me/feed", new { message = "My second wall post using Facebook C# SDK" }); Twitter

Using Asynchronous Methods in ASP.NET 4.5 How Requests Are Processed by the Thread Pool On the web server, the .NET Framework maintains a pool of threads that are used to service ASP.NET requests. When a request arrives, a thread from the pool is dispatched to process that request. This might not be a problem, because the thread pool can be made large enough to accommodate many busy threads. Processing Asynchronous Requests In web applications that see a large number of concurrent requests at start-up or has a bursty load (where concurrency increases suddenly), making web service calls asynchronous will increase the responsiveness of your application. Choosing Synchronous or Asynchronous Methods This section lists guidelines for when to use synchronous or asynchronous Methods. In general, use synchronous methods for the following conditions: Few applications require all methods to be asynchronous. The Sample Application You can download the sample application from on the GitHub site.

Free Classes. Awesome Instructors. Inspiring Community. When does the course begin? This class is self paced. You can begin whenever you like and then follow your own pace. It’s a good idea to set goals for yourself to make sure you stick with the course. How long will the course be available? This class will always be available! How do I know if this course is for me? Take a look at the “Class Summary,” “What Should I Know,” and “What Will I Learn” sections above. Can I skip individual videos? Yes! How much does this cost? It’s completely free! What are the rules on collaboration? Collaboration is a great way to learn. Why are there so many questions? Udacity classes are a little different from traditional courses. What should I do while I’m watching the videos? Learn actively!

Related: