Tutorial by Examples

/** * Housing. * * @ORM\Table(name="housing") * @ORM\Entity */ class Housing { /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ protected $id...
In a simple case statement, one value or variable is checked against multiple possible answers. The code below is an example of a simple case statement: SELECT CASE DATEPART(WEEKDAY, GETDATE()) WHEN 1 THEN 'Sunday' WHEN 2 THEN 'Monday' WHEN 3 THEN 'Tuesday' WHEN 4 THEN 'Wednes...
It's possible to make a simple lazily-evaluated list using mutable types and closures. A lazily-evaluated list is a list whose elements are not evaluated when it's constructed, but rather when it is accessed. Benefits of lazily evaluated lists include the possibility of being infinite. import Base:...
# encode/decode UTF-8 for files and standard input/output use open qw( :encoding(UTF-8) :std ); This pragma changes the default mode of reading and writing text ( files, standard input, standard output, and standard error ) to UTF-8, which is typically what you want when writing new application...
#include <iostream> #include <vector> #include <string> #include <boost/algorithm/string.hpp> using namespace std; int main() { // String to split string str = "You're supposed to see this!|NOT THIS!!!!!!"; // Line container vec...
boost::replace_all(): #include <iostream> #include <string> #include <boost/algorithm/string.hpp> using namespace std; int main() { // String to replace characters in string str = "Darn you, Darn you to the 5th power!!!"; // Replace "Da...
to_upper(): #include <iostream> #include <string> #include <boost/algorithm/string.hpp> using namespace std; int main() { // String to convert characters to uppercase string str = "ThIS iS SUpPoSEd tO Be UpPeR CAsE."; // Convert characters i...
Detailed instructions on getting networking set up or installed.
The typical Visitor example in Java would be: interface ShapeVisitor { void visit(Circle c); void visit(Rectangle r); } interface Shape { void accept(ShapeVisitor sv); } class Circle implements Shape { private Point center; private double radius; public Circl...
Objective-C NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"Hello. That is a test attributed string."]; [str addAttribute:NSBackgroundColorAttributeName value:[UIColor yellowColor] range:NSMakeRange(3,5)]; [str addAttribute:NSForegroundColorAttrib...
// Create the request. NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://google.com"]]; // Specify that it will be a POST request request.HTTPMethod = @"POST"; // This is how we set header fields [request setValue:@&...
// Create the request. NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://google.com"]]; // Specify that it will be a POST request request.HTTPMethod = @"POST"; // Setting a timeout request.timeoutInterval = 20.0; //...
So you want to add material design to your business or career portfolio.huh? You Just can not resist using a Modal? which pops upon a click on those crisp cards you intend to design, for each of your projects/products! Let us say, for each project, you have done, or for each product you have design...
Note I assume you know Webcomponent Specifications Polymer from Google What if, we could just have one custom element, say <tool-bar></tool-bar> and it magically did everything that messy Modal markup could? Tempting eh! How do you specify which Modal belongs to which project...
So far, we defined how easy it is to write a custom element that hides the messy html behind it and gives the user, an easy to write and brief markup. Time to code it! Our custom element, to display the bar below the hero image should Accept a Link to be shared Accept a Link to the Repo to be ...
<link rel="import" href="../bower_components/iron-icon/iron-icon.html"> <link rel="import" href="../bower_components/iron-icons/iron-icons.html"> <link rel="import" href="../bower_components/iron-icons/social-icons.html"&gt...
On whichever page you want to display your product / project portfolio, invoke the custom element like so: <article id="project-neighbourhood"> <div class="row"> <div class="col-12 hero"> <img src="path-to-hero-image...
In order to emphasize text the command \emph can be used which usually displays the text in an italics font: This is some text with \emph{emphasized words}.
The command \sout of the package ulem strikes through a text: \sout{This text is striked through} The package ulem redefines the command \emph. When you do not want to have this behavior you can use the package ulem with the option normalem: \usepackage[normalem]{ulem}
Empty string Empty string is not null but has zero length: string emptyString = ""; // an empty string is not null... assert(emptyString !is null); // ... but it has zero lenght assert(emptyString.length == 0); Null string string nullString = null; a null string is null (De ...

Page 968 of 1336