background preloader


Related:  capetrel

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. We don't know which ball is in which box, but do know that each box contains two balls. The objective is to learn the arrangement of balls. 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. 16-3 Saving a log

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. Each will be covered in this text. At the end of this text you will find a list of the CSS properties you can use with SVG. 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. The class Attribute

50 Essential Online Tools For Every Computer Science Student | Computer Science Zone Computer science students need to acquire skills in multiple areas — arguably more so than many other study disciplines. So not surprisingly, they need a large toolbox, for any of several activities encountered in the typical college program. To that end, here is a reference list of 50 essential tools (software and resources) for computer science students. Notes: We’ve left out the typical Web browsers, email clients, most IM/ chat clients, search engines, video sharing sites, etc., and given a sample of tool categories that have numerous options.Some tools listed are free, others follow a freemium model (free with paid upgrade options). Communication and Collaboration Google Hangouts: Free group conversations and live voice and video, from a browser or mobile app.Strike: Create Web-based task lists and share with classmates, colleagues and other collaborators. Data Parsing, Data Conversion, File Retrieval, Format Checking JSONLint: Validate JSON content and convert to prettyprint mode.Mr.

Programming, Software, and Technical Interview Questions - XOR Swap Slim Framework - Slim Framework programming language agnostic - What are the lesser known but useful data structures Demo of a simple CRUD RESTful PHP service used with AngularJS and MySQL <?php require_once(""); class API extends REST { public $data = ""; const DB_SERVER = ""; 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){

Practice and Learn - Google Code Jam On this page you can see results and code from past rounds of Google Code Jam, and you can try the problems for yourself. If you're new to Code Jam, try following the Quick-Start Guide. Where should I start? If you're new to programming contests, we highly recommend starting with the least difficult problems and moving up from there as you get more confident. Beware: the round that has the easiest problem A may have a very difficult problem B! As you get used to the platform, you can check how many people solved each problem in the "Submissions" box to the left of the dashboard, and use that as a rough gauge of difficulty. Here are some choice problems for new competitors: Africa 2010, Qualification Round: Store Credit, Reverse Words. Remember, if you get stuck you can look at someone else's solution (click a "solutions" link below) or join our mailing list and ask for help. Finding Solutions You can click a "solutions" link below, but those aren't really indexed in a helpful way. TopCoder

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

Interview Questions | MyCareerStack A group of N high school students wants to play a basketball game. To divide themselves into two teams they first rank all the players in the following way: Players with a higher shot percentage are rated higher than players with a lower shot percentage. If two players have the same shot percentage, the taller player is rated higher. Luckily there are no two players with both the same shot percentage and height so they are able to order themselves in an unambiguous way. Each team can only have P players playing at a time, so to ensure that everyone gets similar time on the court both teams will rotate their players according to the following algorithm: Each team starts the game with the P players who have the lowest draft numbers. The game has been going on for M minutes now. Input The first line of the input consists of a single number T, the number of test cases. Each test case starts with a line containing three space separated integers N M P Constraints 1 ? Output Example

lorempixel - placeholder images for every case