Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
const stringfy = (value) => JSON.stringify([value]); | |
const stringfyAndTransformToObject = (value) => ({ object: stringfy(value) }) | |
const makeRequest = () => { | |
const context = arguments[0] || this; | |
const post = (url, data, options) => context.$http(url, stringfyAndTransformToObject(data), options); | |
return { post }; | |
}; | |
const install = (VueInstance) => { |
<template> | |
<root-header></root-header> | |
<!-- BEGIN CONTAINER --> | |
<div class="page-container"> | |
<root-sidebar></root-sidebar> | |
<!-- BEGIN CONTENT --> | |
<div class="page-content-wrapper"> | |
<!-- BEGIN CONTENT BODY --> | |
<slot></slot> | |
<!-- END CONTENT BODY --> |
// This is from my comment here: http://wolfram.kriesing.de/blog/index.php/2008/javascript-remove-element-from-array/comment-page-2#comment-466561 | |
/* | |
* How to delete items from an Array in JavaScript, an exhaustive guide | |
*/ | |
// DON'T use the delete operator, it leaves a hole in the array: | |
var arr = [4, 5, 6]; | |
delete arr[1]; // arr now: [4, undefined, 6] |
# Primo: | |
# Exceto 2, não pode ser par. | |
# Deve ser divisivel somente por 1 e por ele mesmo. | |
# Não pode ter outro divisor. | |
def ehPrimo(n): | |
divisivel = 0 | |
x = 2 | |
while x <= n: | |
#print("Dividindo", n, "por", x) | |
if (n % x == 0): |
/* global ReactRedux, Redux, ReactDOM */ | |
// "Getting Started with Redux" (by Dan Abramov) | |
// https://egghead.io/series/getting-started-with-redux | |
// This file on JSBin (by Jesse Buchanan): | |
// http://jsbin.com/wuwezo/74/edit?js,console,output | |
//////////////////////////////////////////////// | |
// |