rkzoltan sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 586 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
rkzoltan sends brownie points to @chinuxparibus :sparkles: :thumbsup: :sparkles:
:cookie: 307 | @chinuxparibus |http://www.freecodecamp.com/chinuxparibus
vasiljevs sends brownie points to @rkzoltan :sparkles: :thumbsup: :sparkles:
:cookie: 119 | @rkzoltan |http://www.freecodecamp.com/rkzoltan
<style>
.blue-text {
color: blue;
font-size: 60px;
}
.red-text {
color: red;
font-size: 35px;
}
.thick-red-border {
color: red;
border-width: 10px;
border-style: solid;
border radius: 50%;
}
</style>
<h1 class="blue-text text-center">Bill Gates</h1>
<h2 class="red-text text-center">The Founder of Microsoft</h2>
<center><img class="thick-red-border" src="http://media.new.mensxp.com/media/content/2016/Sep/image-2-1473505464.jpg" alt="Bill Gates" align="middle"></center>
<ol>
<li>1955: William Henry Gates III is born to attorney William Henry Gates II and Mary Gates, a schoolteacher, University of Washington regent and chairwoman of United Way International. He is raised in Seattle.</li>
<li>1967: Gates is enrolled in the Lakeside School, an exclusive private school in Seattle, where he befriends Paul Allen. The two students share an interest in computers and programming. The school notices his knack for technology and asks him to create a computerized schedule of classes.Gates’ 2005 keynote speech at Lakeside School.</li>
<li>1973: Gates enters Harvard as a pre-law major, but soon shifts focus. He quickly runs through the university’s most rigorous mathematics and graduate level computer science courses.</li>
<li>1975: From his dorm room, Gates calls MITS, the maker of the world’s first personal computer. He offers to develop software for the MITS Altair. MITS eventually accepts and buys his language for $3,000 plus royalties. Gates takes his first leave of absence from school to start working on the software venture he refers to as Micro-Soft. </li>
<li>1976: Gates and Allen register the trademark “Microsoft.” Gates writes an open letter to computer hobbyists, condemning the early adopters for sharing, rather than paying for, software. Gates’ “Open Letter.”</li>
<li>1977: Gates takes a second leave of absence from Harvard and sets up Microsoft in Albuquerque, N.M., where MITS is headquartered.</li>
<li>1978: Microsoft’s year-end sales exceed $1 million. Gates gains a reputation for being tough, but focused. </li>
<li>1979: Microsoft headquarters are relocated to Bellevue, Wash., a suburb of Gates’ hometown, Seattle.</li>
<li>1981: Microsoft incorporates and buys the rights to the operating system “DOS” from Seattle Computer Products. The system is modified and renamed MS-DOS, and the company licenses it to IBM for the company’s new personal computer.</li>
<li>1983: Allen leaves Microsoft after developing Hodgkin’s disease. Microsoft announces Windows as an extension of its MS-DOS operating system.</li>
<li>1986: Microsoft headquarters move again, this time to nearby Redmond, Wash. Shortly after, the company goes public.</li>
<li>1987: At age 31, Gates becomes the youngest billionaire ever. He meets his future wife, Melinda French, at a Microsoft event in New York.</li>
<li>1989: Gates founds Corbis, an archive of art and photography from public and private collections. Corbis later becomes one of the largest collections of visual information in the world.</li>
<li>1990: The Federal Trade Commission begins an investigation into possible collusion between IBM and Microsoft.The FTC charges that IBM and Microsoft collaborated to divvy up the market for operating systems in an anticompetitive way, with IBM’s OS/2 capturing the high-end of the market and Microsoft’s Windows covering the low-end of the market.</li>
<li>1994: Gates weds French; the couple goes on to have three children. The Gateses consolidate their charitable giving under the William H. Gates Foundation, named for Gates’ father, who agrees to manage the foundation. It is later absorbed into the Bill & Melinda Gates Foundation.</li>
<li>1995: In July, at age 39 and with a fortune of $12.9 billion, Gates becomes the world’s richest man. Later that summer, Microsoft introduces Internet Explorer to the world, as part of Windows 95. The Road Ahead, Gates’ book about his vision for the digital future, holds the No. 1 spot on The New York Times best-seller list f
<div class="vertical-bar">Navigation elements</div>
and the other say: <div class="main-content">content</div>
inline
, not separated at all...
inline
elements, block
elements and inline-block
elements
inline
elements goes for everything that includes text content such as <p>
, <span>
or h1
normalize.css
for you see here http://getbootstrap.com/dist/css/bootstrap.css
block
element goes for everything that includes mor complex content such as div
ul
or section
inline-block
element goes for everything that includes specific styles for media elements or nested things like: img
or li
, or even an a
element
Revelation 14:11
And the smoke of their torment ascendeth up for ever and ever: and they have no rest day nor night, who worship the beast and his image, and whosoever receiveth the mark of his name.
If a person receives the Mark of the Beast, which is a microchip implant or an electronic tattoo, or worships the beast, which is the Roman Catholic Church, or the image of the beast, which is the church-state union that will be formed in the United States, when religious laws are enacted or enforced, then they will be tormented forever in a Lake of Fire.
glove box
inside a object var gloveBoxContents = myStorage.car.inside["glove box"];
1 Corinthians 1:10King James Version (KJV)
10 Now I beseech you, brethren, by the name of our Lord Jesus Christ, that ye all speak the same thing, and that there be no divisions among you; but that ye be perfectly joined together in the same mind and in the same judgment.
rkzoltan sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 611 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Failed to load resource: the server responded with a status of 403 ()
Upload that image to dropbox
or flickr
and use the URL generated by these services they will work without any issues
glgirl28 sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 587 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
$("#resumeBtn").on('click', resume);
amidzicigor sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 612 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
<!-- You might have some html like this with buttons inside a parent wrapper -->
<div class="buttons">
<button id="one">Button One</button>
<button id="two">Button Two</button>
</div>
// You can create a group like this
var buttons = $('.buttons').find('button');
// Then you can create a function to handle the click on any of the buttons
buttons.on('click', handler);
function handler() {
var btn = $(this); // refers to the current clicked button
// do somethin with the button
}
mones-cse sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 613 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
:cookie: 614 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
dpcleveland sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
dpcleveland sends brownie points to @jem243 :sparkles: :thumbsup: :sparkles:
:cookie: 298 | @jem243 |http://www.freecodecamp.com/jem243
@dpcleveland
think this way you are going to use $.getJSON
only to get data os this will be one function
and changing temperature is another functionality so you can make it another function
right now your changing function inside getjson so when you try to use that click event it converted celsius to fahrenheit but after immediate you get data again from api and rerun the whole thing
dpcleveland sends brownie points to @mones-cse :sparkles: :thumbsup: :sparkles:
:cookie: 411 | @mones-cse |http://www.freecodecamp.com/mones-cse
dpcleveland sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 615 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
luis4flames sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 616 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
/*twitch tv*/
var channels = ["freecodecamp", "storbeck", "terakilobyte", "habathcx","RobotCaleb","thomasballinger","noobs2ninjas","beohoff","brunofin","comster404","test_channel","cretetion","sheevergaming","TR7K","OgamingSC2","ESL_SC2"];
$(document).ready(function(){
/*here the for loop for i is kept outside the function to understand reason http://stackoverflow.com/questions/750486/javascript-closure-inside-loops-simple-practical-example*/
for(i=0;i<channels.length;i++){
getData(i);
}
/*funnction get data*/
function getData(i){
$.getJSON('https://api.twitch.tv/kraken/streams/'+channels[i]+'?client_id=bfcvgu5jg6gsft824hzc3a7qgay19gb&callback=?', function(data) {
screenOut(data,i);
});
}
/*function outputs to screen*/
function screenOut(data,i){
if(data.status == 404){
$('.data').append("<div class = 'col-lg-3 col-md-3 col-sm-4 col-xs-6 holder'><img src = 'http://i.vimeocdn.com/video/499134794_1280x720.jpg' class = 'img-responsive' ><div class = 'status'>NOT_FOUND</div><div class= 'img-text'>"+channels[i]+"</div></div>");
}
else if(data.stream == null){
$('.data').append("<div class = 'col-lg-3 col-md-3 col-sm-4 col-xs-6 holder'><img src = 'http://i.vimeocdn.com/video/499134794_1280x720.jpg' class = 'img-responsive' ><div class = 'status'>OFF-LINE</div><div class= 'img-text'>"+channels[i]+"</div></div>");
}else{
$('.data').append("<div class = 'col-lg-3 col-md-3 col-sm-4 col-xs-6 holder'><img src = '"+data.stream.channel.video_banner+"' class = 'img-responsive' ><div class = 'status'>LIVE</div><div class= 'img-text'>"+channels[i]+"</div></div>");
}
}
});
why can't I apply mouse hover effect on .holder
elements
dirtier sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 617 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
.holder:hover {
background-color: blue;
}
.hover
and .on
inside jquery to alter the holder html but didinot work
$('.holder').on('mouseenter', function(){
$(this).find('.status').fadeOut();
});
function screenOut(data,i){
if(data.status == 404){
$('.data').append("<div class = 'col-lg-3 col-md-3 col-sm-4 col-xs-6 holder'><img src = 'http://i.vimeocdn.com/video/499134794_1280x720.jpg' class = 'img-responsive' ><div class = 'status'>NOT_FOUND</div><div class= 'img-text'>"+channels[i]+"</div></div>");
}
else if(data.stream == null){
$('.data').append("<div class = 'col-lg-3 col-md-3 col-sm-4 col-xs-6 holder'><img src = 'http://i.vimeocdn.com/video/499134794_1280x720.jpg' class = 'img-responsive' ><div class = 'status'>OFF-LINE</div><div class= 'img-text'>"+channels[i]+"</div></div>");
}else{
$('.data').append("<div class = 'col-lg-3 col-md-3 col-sm-4 col-xs-6 holder'><img src = '"+data.stream.channel.video_banner+"' class = 'img-responsive' ><div class = 'status'>LIVE</div><div class= 'img-text'>"+channels[i]+"</div></div>");
}
$('.holder').on('mouseenter', function(){
$(this).find('.status').fadeOut();
});
}
durgakiran sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 618 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
akshatamohanty sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1416 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
$("#evaluate").on("click",function(){
you've selected an id which doesn't exist
<!DOCTYPE html>
<!--[if IE 9]>
<html class="lt-ie10" lang="en" >
<![endif]-->
<html class="no-js" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Coco Studio</title>
<!-- normalize.css and modernizr.js help with browser compatibility -->
<link rel="stylesheet" href="css/foundation.css">
<link rel="stylesheet" href="foundation-icons/foundation-icons.css">
<link rel="stylesheet" href="css/main.css">
<link href="https://fonts.googleapis.com/css?family=Satisfy" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab" rel="stylesheet">
</head>
<!-- include before </body> tag -->
<script src="js/vendor/jquery.js"></script>
<script src="js/foundation.min.js"></script>
<script>
$(document).foundation();
</script>
</body>
</html>
michielhuijse sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 619 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
<div class="row">
<div class="large-6 columns"></div>
<div class="large-6 columns"></div>
</div>
// userInput refers to the html input your user is typing into
// you need to get the value before using this ajax call
$.getJSON('http://en.wikipedia.org/w/api.php?action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=extracts&exintro&explaintext&exsentences=1&exlimit=max&format=json&callback=?&gsrsearch=' + userInput, function(data) {
if ( data.query ) {
// We have results
} else {
// No results
}
});
sanjayatgit sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 620 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
sfmajors373 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 621 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
sanjayatgit sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:warning: sanjayatgit already gave jdtdesigns points
sanjayatgit sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:warning: sanjayatgit already gave jdtdesigns points
rand
variable is not returning whole numbers. Change rand = Math.random() * 6;
to rand = Math.floor(Math.random() * 6);
jfkirkpatrick sends brownie points to @hmouhtar :sparkles: :thumbsup: :sparkles:
:cookie: 337 | @hmouhtar |http://www.freecodecamp.com/hmouhtar
<div id="quote"></div>
and in your JS, change all $("body").html(.....)
to $("#quote").html(....)
jfkirkpatrick sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 622 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
:cookie: 735 | @sorinr |http://www.freecodecamp.com/sorinr
zaturek sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
than in the row you can put a div for each button like:
<div id="tweet-btn" class="col-sm-4">
<button></button>
</div>
luis4flames sends brownie points to @zaturek :sparkles: :thumbsup: :sparkles:
:cookie: 267 | @zaturek |http://www.freecodecamp.com/zaturek
jfkirkpatrick sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:warning: jfkirkpatrick already gave jdtdesigns points
@zaturek I'm getting data back in the console just fine with your pen. As @sorinr recommends, change the order of your script loading to stop this warning from showing up in the console: bootstrap.min.js:6 Uncaught Error: Bootstrap's JavaScript requires jQuery
, or remove bootstrap.min.js entirely from your pen since you aren't using it in your code.
If you want article content instead of just the titles, replace the title=
at the end of your url with &list=search&srsearch=
.https://en.wikipedia.org/w/api.php?action=query&format=json&callback=?&prop=links&pllimit=max&list=search&srsearch="
:cookie: 855 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
:warning: zaturek already gave sorinr points
zaturek sends brownie points to @sorinr and @tylermoeller :sparkles: :thumbsup: :sparkles:
@DanielStoica85 on line 3 in HTML panel you have this
<im<nav class = "navbar navbar-default navbar-fixed-top">
remove <im
it will work
now the whole page is messed up...wtf?!?
@DanielStoica85 did you remove <im
this?? i still see it
:cookie: 588 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
danielstoica85 sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
calculate
that takes a string like this 5+5
or 5*5
and returns expected result. And i came to this fucntion. What do you think about it. Can you make it more elegant? const calculate = (expression) => {
const re = /[-+/*]/;
const o = {
addition: (a, b) => a + b,
subtraction: (a, b) => a - b,
multiplication: (a, b) => a * b,
division: (a, b) => a / b
};
let output = expression.split(re).map(n => Number(n));
switch(true) {
case expression.includes('+'): {
return output.reduce(o.addition);
}
case expression.includes('-'): {
return output.reduce(o.subtraction);
}
case expression.includes('*'): {
return output.reduce(o.multiplication);
}
case expression.includes('/'): {
return output.reduce(o.division);
}
}
};
calculate("5+5"); // 10
calculate("5-5"); // 0
calculate("5*5");// 25
calculate("5/5");// 1
const calculate = (e) => {
const nums = e.split(/\W/g).map(n => Number(n)),
op = e.match(/\W/g);
return op == '+' ? nums[0] + nums[1] :
op == '-' ? nums[0] - nums[1] :
op == '/' ? nums[0] / nums[1] :
nums[0] * nums[1];
}
calculate('11*11')
/\W/g
this does not cover calculate('11.1*11')
i think
const calculate = (e) => {
const nums = e.split(/[^.\w]/g).map(n => Number(n)),
op = e.match(/\W/g);
return op == '+' ? nums[0] + nums[1] :
op == '-' ? nums[0] - nums[1] :
op == '/' ? nums[0] / nums[1] :
nums[0] * nums[1];
}
console.log(calculate('11.1*11'))
vinaypuppal sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 623 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
wnbaorbust sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 736 | @sorinr |http://www.freecodecamp.com/sorinr
obj.hasOwnProperty(prop)
for checking if a prop
exists or not in obj
object
calculate("5 + 5");
returns 0
obj.hasOwnProperty(prop)
returns Boolean value i.e either true or false So use if
condition to check for that
nghm sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 589 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
eval('5 + 5')
nghm sends brownie points to @alhazen1 :sparkles: :thumbsup: :sparkles:
:cookie: 382 | @alhazen1 |http://www.freecodecamp.com/alhazen1
dirtier sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 590 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
chrome://inspect/
and see in console if any errors
const getQuote =
(data = { cat: 'famous' }) =>
Fat Arrow Functions
which are not supported by that browserdirtier sends brownie points to @vinaypuppal and @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1733 | @khaduch |http://www.freecodecamp.com/khaduch
:warning: dirtier already gave vinaypuppal points
10.5 + 2
or 10.5+2
const calc = (exp) => {
const re = /[-+/*]/;
const list = exp.match(/\W/g);
let nums = exp.split(re).map(n => Number(n));
return list.includes('+') ? nums[0] + nums[1] :
list.includes('-') ? nums[0] - nums[1] :
list.includes('/') ? nums[0] / nums[1] :
nums[0] * nums[1];
};
weatherImg = "<img src = '" + json.current_observation.icon_url + "' ";
json.current_observation.icon_url
is valid? Does it have the http://
or https://
included? A fully-formed path, in other words? Or are they giving you a relative path, perhaps just a jpg file, and you have to supply the other part? Any errors showing up in the console? Can you post a URL to your site?
Hello everyone can anyone help me out with my code below. Here i'm making a list with ul and a tag's as :
<div ng-init="menuLists=['Home','About', 'Contact']" ng-init="anchorList=['home.html', 'about.html', 'contact.html']">
<ul>
<li ng-repeat="x in menuists">
<a href="ng-repeat="x in anchorList">
{{ }}
</a>
</li
</ul>
</div>
>
in your weatherImg
variable that you are constructing weatherImg = "<img src = '" + json.current_observation.icon_url + "' >";
nevaisdreaming sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1734 | @khaduch |http://www.freecodecamp.com/khaduch
https://gist.github.com/QuincyLarson/2ff6892f948d0b7118a99264fd9c1ce8
. How do I use such sample? do I just copy paste it?
pleas they are telling me to use twitchtvs sample api response provided at httpsgistgithubcomquincylarson2ff6892f948d0b7118a99264fd9c1ce8 how do i use such sample do i just copy paste it