background preloader

A computer science portal for geeks

A computer science portal for geeks
Related:  capetrel

SVG and CSS - Cascading Style Sheets It is possible to style your SVG shapes using CSS. By styling is meant to change the looks of the shapes. This can be stroke color and width, fill color, opacity and many other properties of your shapes. There are 6 ways to style the shapes in your SVG images. This text assumes that you are familiar with CSS. CSS Styling Using Attributes Is it possible to style an SVG shape using specific style attributes like stroke and fill. There are a range of styling attributes available. Using the style Attribute and CSS Properties This method doesn't use any style specific attributes. Here is the same circle with the stroke and fill set via the style attribute and CSS properties: Using Inline Style Sheets It is possible to define the styles for your shapes in an inline style sheet, and then have all these styles automatically applied to your shapes. Notice how the style of the circle-element is defined inside the <style>-element. The class Attribute Using External Style Sheets SVG CSS Properties

Stanford CS Ed Library PlantUML PlantUMLis a component that allows to quickly write : Diagrams are defined using a simple and intuitive language. This can be used within many other tools. Images can be generated in PNG or SVG format. It is also possible to generate ASCII art diagrams (only for sequence diagrams). This example is working thanks to the online demo server.

Algo Muse 16-1 In the box There are n identical boxes in which 2n balls are equally distributed. The balls are labelled from 1 to 2n. For any set of balls S ⊆ {1,...,2n} we can ask a query of the form `How many boxes contain the balls in S?'. Prove that we can learn the distribution of balls by asking O(n log n) queries. Note that we cannot tell which ball is in which box. Solution Solution There are n pairs of balls. Lemma. Proof. How many boxes contain the balls in set A? If answers to both the questions are same, then x is paired with one of the balls in set A; else x is paired with one of the balls in set B. 16-2 Evasive Tree We prove the lower bound for the special case when the tree is a path, using an adversarial argument. Assume that the algorithm never asks a query to which it can infer the answer. Analysis. We claim that at least one of the four query arcs shown in P1 must be present. 16-3 Saving a log We are given an undirected unweighted graph G containing n nodes.

Slim Framework - Slim Framework FilePermissions Understanding and Using File Permissions In Linux and Unix, everything is a file. Directories are files, files are files and devices are files. Devices are usually referred to as a node; however, they are still files. To change or edit files that are owned by root, sudo must be used - please see RootSudo for details. If the owner read & execute bit are on, then the permissions are: -r-x------ There are three types of access restrictions: There are also three types of user restrictions: Note: The restriction type scope is not inheritable: the file owner will be unaffected by restrictions set for his group or everybody else. Folder/Directory Permissions Directories have directory permissions. read restricts or allows viewing the directories contents, i.e. ls command write restricts or allows creating new files or deleting files in the directory. Permissions in Action user@host:/home/user$ ls -l /etc/hosts -rw-r--r-- 1 root root 288 2005-11-13 19:24 /etc/hosts user@host:/home/user$ chmod with sudo

CMU Sphinx - Speech Recognition Toolkit Quantitative Reasoning 20 Assignments There will be weekly assignments listed here. They will usually be assigned on Thursday and due the following Friday. Toward the end of the course, the assignments will be a little more challenging and 2 weeks will be allowed to complete them. Assignment 1, to be completed in section week of Feb. 1, but give it a try before then. Assignment 2, due in your TF's assignment 2 drop box by 5PM, Fri., Feb. 12. A statement of the homework grading policy Assignment 3, due in your TF's assignment 3 drop box by 5PM, Fri., Feb. 19. Assignment 4, due in your TF's assignment 4 drop box by 5PM, Fri., Feb. 26. Assignment 5, due in your TF's assignment 5 drop box by 5PM, Fri., Mar. 5. Assignment 6, due in your TF's assignment 6 drop box by 5PM, Fri., Apr 2. verbs.py A module to save you from typing in dictionaries of verb roots and inflectional endings. Assignment 7, due in your TF's assignment 7 drop box by 5PM, Fri., Apr. 9 Assignment 8, due in your TF's assignment 8 drop box by 5PM, Fri., April 16.

Demo of a simple CRUD RESTful PHP service used with AngularJS and MySQL <?php require_once("Rest.inc.php"); class API extends REST { public $data = ""; const DB_SERVER = "127.0.0.1"; const DB_USER = "root"; const DB_PASSWORD = ""; const DB = "angularcode_customer"; private $db = NULL; private $mysqli = NULL; public function __construct(){ parent::__construct(); // Init parent contructor $this->dbConnect(); // Initiate Database connection * Connect to Database private function dbConnect(){ $this->mysqli = new mysqli(self::DB_SERVER, self::DB_USER, self::DB_PASSWORD, self::DB); * Dynmically call the method based on the query string public function processApi(){ $func = strtolower(trim(str_replace("/","",$_REQUEST['x']))); if((int)method_exists($this,$func) > 0) $this->$func(); else $this->response('',404); // If the method not exist with in this class "Page not found". private function login(){ if($this->get_request_method() ! $this->response('',406); $email = $this->_request['email']; $password = $this->_request['pwd']; if(! if(filter_var($email, FILTER_VALIDATE_EMAIL)){ if($id > 0){

Linux File Permissions Tutorial December 14, 2011By Roman Rafacz What we’ll cover in this article is how to identify permissions for files & directories and how to change them, as well as changing ownerships, groups, etc. Depending on what you want to do, you’ll want to make sure you have the appropriate permissions (obviously), so let’s find out how to change them. Let’s start by making a file we can use. I issued the “touch” command to make a file creatively named testfile. Touch will just create an empty file but has all the same attributes as an actual file. Commands: touch test file mkdir workfolder The permisions are broken into 4 sections. chmod – adds and removes permissions If you wanted to add or remove permissions to the user, use the command “chmod” with a “+” or “–“, along with the r (read), w (write), x (execute) attribute followed by the name of the directory or file. chmod +rwx “name of the file” chmod –rwx “name of the directory” chmod +x testfile – this would allow me to execute chmod g+w testfile Examples: 1 = –x

styleguide - Style guides for Google-originated open-source projects Every major open-source project has its own style guide: a set of conventions (sometimes arbitrary) about how to write code for that project. It is much easier to understand a large codebase when all the code in it is in a consistent style. “Style” covers a lot of ground, from “use camelCase for variable names” to “never use global variables” to “never use exceptions.” Our C++ Style Guide, Objective-C Style Guide, Java Style Guide, Python Style Guide, Shell Style Guide, HTML/CSS Style Guide, JavaScript Style Guide, AngularJS Style Guide, Common Lisp Style Guide, and Vimscript Style Guide are now available. If your project requires that you create a new XML document format, our XML Document Format Style Guide may be helpful. These style guides are licensed under the CC-By 3.0 License, which encourages you to share these documents.

Front-end Developer Handbook 2017 · GitBook Written by Cody Lindley sponsored by — Frontend Masters This is a guide that anyone could use to learn about the practice of front-end development. It broadly outlines and discusses the practice of front-end engineering: how to learn it and what tools are used when practicing it in 2017. It is specifically written with the intention of being a professional resource for potential and currently practicing front-end developers to equip themselves with learning materials and development tools. The content of the handbook favors web technologies (HTML, CSS, DOM, and JavaScript) and those solutions that are directly built on top of these open technologies. The book should not be considered a comprehensive outline of all resources available to a front-end developer. The intention is to release an update to the content yearly. The handbook is divided into three parts. Part I. Part one broadly describes the practice of front-end engineering. Part II: Learning Front-End Development

Related: