joyinthenow sends brownie points to @jar36 :sparkles: :thumbsup: :sparkles:
:cookie: 274 | @jar36 |http://www.freecodecamp.com/jar36
adampinsky sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 711 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
$( document ).ready(function() {
$("data").html( "ready!" );
});
and nothing is happening. the html is:
<div id="data">data</div>
does anybody know what's going on? i'm working in codepen
function per(x){
var source = []; // source=dest[j];
var temp=[];
var dest = [];
for(var k=0;k<x.length;k++){
recursive(k)
}
function recursive(ch){
for (var i = 0; i <= source.length; ++i) {
temp = source.slice(0);
temp.splice(i, 0, ch);
dest.push(temp);
}
for(var j=0;j<dest.length; j++){
source=dest[j];
}
return dest;
}
}
per('ab')//should return [['a','b'],['b','a']];
function recursive(ch){
for (var i = 0; i <= source.length; ++i) {
temp = source.slice(0);
temp.splice(i, 0, ch);
dest.push(temp);
}
why can't i get any kind of display with
$(document).ready(function() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
$("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);
});
}
else {
$("#data").html("nope");
}
});
?
c0d0er sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 712 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
asparism sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 713 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
deadline is the best inspiration
:P
.meta li:after {
content: "\\";
padding: 0 2px;
color: #999;
}
nitinnair89 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 779 | @sorinr |http://www.freecodecamp.com/sorinr
felexkemboi sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 284 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
<ul class="nav nav-pills nav-stacked" role="tablist">
<li class="active"><a href="/profile" style="text-align: center;">Profile</a></li>
<li><a href="/profile/settings" style="text-align: center;">Settings</a></li>
</ul>
<script>
$('ul.nav.nav-pills li a').click(function() {
$(this).parent().addClass('active').siblings().removeClass('active');
});
</script>
1+
in ([a-z])\1+
?
factorialize a number
+
, ([a-z])\1
can only match aa of aab
but not aaa of aaab
, why?
aaab
ccddda
c0d0er sends brownie points to @ifamed :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for ifamed
latitude
, longitude
kurumkan sends brownie points to @mapamatician and @name :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for name
:warning: could not find receiver for mapamatician
elqomri sends brownie points to @ifamed :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for ifamed
:cookie: 355 | @kurumkan |http://www.freecodecamp.com/kurumkan
:warning: could not find receiver for ifamed
mapamatician sends brownie points to @ifamed and @kurumkan :sparkles: :thumbsup: :sparkles:
Hi, can someone help me with counter in JS? I have something like this:
$("#getting-started")
.countdown("2016/11/20", function(event) {
var $this = $(this).html(event.strftime(
+ '<small>ruszamy za:</small> <br>'
+ '<span>%D</span> d '
+ '<span>%H</span> h '
+ '<span>%M</span> m '
+ '<span>%S</span> s')
);
}); '
And after every second 's' letter is a little bit moving to left or right because number change. What can I do to stop this letter and put it always on the same place, not moving?
white-space
?
letter-spacing: 2px
or any value that suits your need and check
Hey there.
Got a confusing problem with my Tic Tac Toe project:
Before I will make my AI "smarter", I coded a simple function which does a random move on AI´s turn. It works, but only on the AI´s first move. On the second turn , the AI does 2 moves. On the third turn, the AI does 3 moves and so on....
I just can´t find the error, would be great if someone could help me!
Thank you in advance!
Here´s my pen:
http://codepen.io/kenobijr/pen/ozJorK
@eduardorioterra your menu-btn styles was preventing it..try this:
#nav-btn li{
display: inline;
}
But fix those menu-btn CSS. I tried after removing all your menu-btn css and it works
eduardorioterra sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 286 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
.animate:focus
is not workinghover
is working but i want my tabs to look selected when online , offline , all is selected just to look clean
<ul>
<img src="C:\Users\User\Documents\Akod1.png”>
focus
annunirmal sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 287 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
nitinnair89 sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 633 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
taronaggarwal sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 288 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
taronaggarwal sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:cookie: 408 | @jluboff |http://www.freecodecamp.com/jluboff
taronaggarwal sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:warning: taronaggarwal already gave nitinnair89 points
taronaggarwal sends brownie points to @mcpengelly :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for mcpengelly
<div class="container">
<div class="row">
<div class="col-md-7">
content here
</div>
</div>
</div>
<div class=“row”>
kcdilla sends brownie points to @steveamaki :sparkles: :thumbsup: :sparkles:
:cookie: 237 | @steveamaki |http://www.freecodecamp.com/steveamaki
<div class="row">
<div class="col-md-7">
SPAN OF 7
</div>
<div class="col-md-5”>
PLUS SPAN OF 5 is 12
</div>
</div>
col-sm-#
meaning once the screen gets too skinny, it switches from floating side by side to each element taking the whole row.. pushing the next element to a new row below the previous element.. if Im saying that right.
<div class="container">
<div class="row">
<div class="col-sm-2">
profil pic goes here
</div>
<div class="col-sm-7">
about goes here
</div>
<div class="col-sm-3 col-sm-odffset-1">
skills go here
</div>
</div>
</div>
@kcdilla make sure you understand how the grid layout works in Bootstrap. There are different span sizes.. col-xs-#
, col-sm-#
, col-md-#
, col-lg-#
Each size category is accomodating for different screen sizes.
row
need to equal to 12
margin: 0 4px
.
:warning: kcdilla already gave steveamaki points
kcdilla sends brownie points to @steveamaki :sparkles: :thumbsup: :sparkles:
<div class="row">
<div class="col-xs-6 col-sm-2 col-md-5 col-lg-8”> </div>
<div class="col-xs-6 col-sm-10 col-md-7 col-lg-4”> </div>
</div>
style="display:inline-block;”
on the <p>
<img class="img-responsive center-block" src="http://www.etatdexception.net/wp-content/uploads/2013/03/Patrice-Lumumba1.jpg" alt "=Patrice Lumumba">
<p class="text-center">Patrice Lumumba holding a press conference</p>
nei-v sends brownie points to @walidashri :sparkles: :thumbsup: :sparkles:
:cookie: 429 | @walidashri |http://www.freecodecamp.com/walidashri
text-center
, center-block
, using row's, columns, etc. will only work if you add this to your CodePen's CSS Settings: https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css
nei-v sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 896 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
"?callback=?"
what the call back is set to?
function myGetJSONFunction() {
$.getJSON('http://api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&jsonp=?&lang=en', function (data) {
console.log(data); // gives you data from the API
});
console.log(data) // undefined - since it's out of scope
}
@poemul7 Try this:
<div class="row img-border">
<img class="img-responsive center-block" src="http://www.etatdexception.net/wp-content/uploads/2013/03/Patrice-Lumumba1.jpg" alt "=Patrice Lumumba">
<p class="text-center">Patrice Lumumba holding a press conference</p>
</div>
And in your CSS:
.img-border {
background-color: white;
}
That should help you get started :) you can style as needed after that
var getWeather = function() {
if (navigator.geolocation){
var key = "fff7f784828c4e1c2dc51b8d52ff1399";
navigator.geolocation.getCurrentPosition(function(pos){
$.getJSON("api.openweathermap.org/data/2.5/weather?lat=" + Math.round(pos.coords.latitude) + "&lon=" + Math.round(pos.coords.longitude) + "&appid=" + key, function(data){
console.log("success!!");
showWeather(data);
}, function(error){console.log(error)});
});
}else{
console.log("no geolocation :/");
}
};
$.ajax({
url: "http://api.forismatic.com/api/1.0/",
jsonp: "jsonp",
dataType: "jsonp",
data: {
method: "getQuote",
lang: "en",
format: "jsonp"
}
})
.done(function(json) {
$(".quote").html(json.quoteText + "<br>" + json.quoteAuthor);
});
porygonj sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 897 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
http://api.wunderground.com/api/Your_Key/geolookup/q/autoip.json
. More info at: https://www.wunderground.com/weather/api/d/docs?d=data/geolookupjttyeung sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 898 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
hello ! good night ! i having a problem in my code. I tryed everything to change <li> style to center of my page but i can´t. follow the code...<div class="container">
<div class="row">
<div class="col-xs-12">
<head>
<h1 style="color:white"; class="text-center bold white ">Ayrton Senna </h1>
<h2 style="color: white" class="text-right">The Legend</h2>
</head>
<body>
<img src="http://i.dailymail.co.uk/i/pix/2015/06/29/17/2A16EF2F00000578-0-image-a-56_1435594654943.jpg">
<body style= "background-color:black">
<p></p>
<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">
<ul align="center">
<li> 162 Races</li>
<li> 80 Podium</li>
<li> 41 Wins</li>
<li> 19 fastest lap</li>
<li> 3 world champion>/li>
<li> 1 world´s fan</li>
</ul>
</div>
</div>
</div>
</div>
http://codepen.io/jttyeung/pen/VKqmBG?editors=0010
). The Forismatic Quote API only supports http.