Skip to content

Instantly share code, notes, and snippets.

@aurelianonava
Created September 28, 2017 19:40
Show Gist options
  • Select an option

  • Save aurelianonava/0d1011c462369e4001eec67464be5095 to your computer and use it in GitHub Desktop.

Select an option

Save aurelianonava/0d1011c462369e4001eec67464be5095 to your computer and use it in GitHub Desktop.
[add your bin description] // source http://jsbin.com/wadojuh
<!DOCTYPE html>
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<head>
<meta name="description" content="[add your bin description]">
<Title> Using random(); </Title>
<script data-require="p5.js@*" data-semver="0.5.7" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.7/p5.min.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body>
<h1>The <em>for()</em> repetition loop:</h1> </br>
<p>Probably the most used, and powerful, way to repeat
code many times is by using the <em>for()</em> loop repetition
control structure.
</p>
<p>Take a look at this ellipse repitition:</p>
<div>
<div class="container" >
<div class="row">
<div class="col-sm-4">
<h3>Column 1</h3>
<p>Lorem ipsum dolor..</p>
<p>Ut enim ad..</p>
</div>
<div class="col-sm-4">
<h3>Column 2</h3>
<p>Lorem ipsum dolor..</p>
<p>Ut enim ad..</p>
</div>
<div class="col-sm-4">
<h3>Column 3</h3>
<p>Lorem ipsum dolor..</p>
<p>Ut enim ad..</p>
</div>
</div>
</div>
This is a div element....
</div>
<div class="container">
<h1>h1 Bootstrap heading <small>(36px)</small></h1>
<h2>h2 Bootstrap heading <small>(30px)</small></h2>
<h3>h3 Bootstrap heading <small>(24px)</small></h3>
<h4>h4 Bootstrap heading <small>(18px)</small></h4>
<h5>h5 Bootstrap heading <small>(14px)</small></h5>
<h6>h6 Bootstrap heading <small>(12px)</small></h6>
</div>
<div class="container">
<h2>Button</h2>
<p>The .btn class adds basic styling to a button:</p>
<button type="button" class="btn">Basic Button</button>
<button type="button" class="btn-default">Basic Button</button>
<button type="button" class="btn-primary" a href="https://aurelianonava.github.io">Train Mind, Code Brain---></button>
<!-- Indicates a successful or positive action -->
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-link" a href="https://aurelianonava.github.io">Train Mind, Code Brain</button>
<a href="https://aurelianonava.github.io" class="btn btn-info" role="button">Link Button ( Works )</a>
</div>
<script id="jsbin-javascript">
// code goes here:
var r;
function setup () {
createCanvas(480, 400);
}
function draw() {
r = random(0, 255);
background(200);
for(var i = 0; i < 100; i++) {
// fill(random(0,255), random(0,255), random(0,255) );
fill(r, r, r);
ellipse(random(width/2, 100), random(length/2, 200), 20, 20);
}
}
</script>
<script id="jsbin-source-javascript" type="text/javascript">// code goes here:
var r;
function setup () {
createCanvas(480, 400);
}
function draw() {
r = random(0, 255);
background(200);
for(var i = 0; i < 100; i++) {
// fill(random(0,255), random(0,255), random(0,255) );
fill(r, r, r);
ellipse(random(width/2, 100), random(length/2, 200), 20, 20);
}
}</script></body>
</html>
// code goes here:
var r;
function setup () {
createCanvas(480, 400);
}
function draw() {
r = random(0, 255);
background(200);
for(var i = 0; i < 100; i++) {
// fill(random(0,255), random(0,255), random(0,255) );
fill(r, r, r);
ellipse(random(width/2, 100), random(length/2, 200), 20, 20);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment