Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:33
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • May 10 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 25 17:12
    @mstellaluna banned @cmal
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:09
    thecodingaviator commented #31179
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:07
    thecodingaviator commented #31182
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator commented #31190
  • Apr 01 18:05
    thecodingaviator commented #31157
  • Apr 01 18:04

    thecodingaviator on master

    remove A (#31157) (compare)

  • Apr 01 18:04
    thecodingaviator closed #31157
  • Apr 01 18:04
    thecodingaviator closed #33788
  • Apr 01 18:04
    thecodingaviator commented #33788
  • Apr 01 18:02
    thecodingaviator closed #31059
  • Apr 01 18:02
    thecodingaviator commented #31059
Jordan Shackelford
@JordanShackelford
internet went out. im back
eduwin7
@eduwin7
can some one please help
i am on the counting cards section
ERWIN JOHN T. CARPIO, MD, FPCR
@RadEdje
hmm... it's not appearing in "code" i already used ```
Moisés Man
@moigithub
@RadEdje backticks must be on its own line
shift enter to add newlines
ERWIN JOHN T. CARPIO, MD, FPCR
@RadEdje
@moigithub oh thanks...
eduwin7
@eduwin7
?
bitgrower
@bitgrower
@eduwin7 think I've seen you around before ... so, can you post your code ?
Rémi Fortier
@mizujin
@eduwin7 maybe I can help ?
ERWIN JOHN T. CARPIO, MD, FPCR
@RadEdje
Hi still working on my random quote generator. Stuck on the tweet button. When I use the usual
``` <a class="twitter-share-button" href="https://twitter.com/intent/tweet">Tweet</a>```

and then use

``` $("twitter-share-button").attr("href", 'https://twitter.com/intent/tweet?text=' + html);```

to prepopulate it with the quote it works but I lose the nice formatting for the twitter widget button so I tried the twitter script for the button and uses this instead

```<a href="https://twitter.com/share" class="twitter-share-button" data-text="REPLACE ME">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>```

and I reused the

``` $("twitter-share-button").attr("data-text", html);```

but this doesn't work so i figured the twitter script was the problem. After I little digging... I found that the twitter widget had to be reload? Any suggestions or more elegant solution? thanks
Rémi Fortier
@mizujin
 <a class="twitter-share-button" href="https://twitter.com/intent/tweet">Tweet</a>

and then use

 $("twitter-share-button").attr("href", 'https://twitter.com/intent/tweet?text=' + html);

to prepopulate it with the quote it works but I lose the nice formatting for the twitter widget button so I tried the twitter script for the button and uses this instead

<a href="https://twitter.com/share" class="twitter-share-button" data-text="REPLACE ME">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>

and I reused the

 $("twitter-share-button").attr("data-text", 'html);

but this doesn't work so i figured the twitter script was the problem. After I little digging... I found that the twitter widget had to be reload? Any suggestions or more elegant solution? thanks

=> $("twitter-share-button") is invalid, put a suffix there $(".twitter-share-button")
shaunski11
@shaunski11
Good evening everyone. Can anyone tell me what the red dot symbolizes in the black results box?
eduwin7
@eduwin7

var count = 0;

function cc(card) {
// Only change code below this line
if (card==2||card==3||card 4||card==5||card==6)
return count ++;

if Count<0{return count+"hold";}

i have no idea what to do
ERWIN JOHN T. CARPIO, MD, FPCR
@RadEdje
@mizujin oh thanks for making my cocde mor readable. Oh about that I put the dot in the original code it was $("twitter-share-button").attr("data-text", html);
CamperBot
@camperbot
radedje sends brownie points to @mizujin :sparkles: :thumbsup: :sparkles:
:cookie: 348 | @mizujin |http://www.freecodecamp.com/mizujin
Jordan Shackelford
@JordanShackelford
@eduwin7 put 3 backticks above your code and 3 backticks below
it's the key above tab
ERWIN JOHN T. CARPIO, MD, FPCR
@RadEdje
oops sorry I meant $(".twitter-share-button").attr("data-text", html);
Rémi Fortier
@mizujin
@RadEdje twitter script is working, but it needs to be different in your code
Frank XC
@tenkdayz
trying to make an object shoot a laser. but every time I create a new laser object the previous one disappears. how can I fix this.
ERWIN JOHN T. CARPIO, MD, FPCR
@RadEdje
@mizujin Oh? i read somewhere that I have to "RELOAD" the twitter widget since it only runs once so the moment the document is "ready" it alrady asigns "REPLACE ME" and clicking the button for the random quote doesn't reload the twitter widget so it doesn't repopulate with the new quote....
Rémi Fortier
@mizujin
@RadEdje my script code (html) looks like this :
window.twttr = (function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0],
    t = window.twttr || {};
  if (d.getElementById(id)) return t;
  js = d.createElement(s);
  js.id = id;
  js.src = "https://platform.twitter.com/widgets.js";
  fjs.parentNode.insertBefore(js, fjs);

  t._e = [];
  t.ready = function(f) {
    t._e.push(f);
  };

  return t;
}(document, "script", "twitter-wjs"));
this twttr function accepts parameter (code)
something like
twttr.widgets.createShareButton(
              "-",
              document.getElementById("twitter-button"),
              {
                size: "large",
                text: your html variable here,
                count: "none"
              }
            );
ERWIN JOHN T. CARPIO, MD, FPCR
@RadEdje
@mizujin Oh thanks... I'll study that for a while.... so your script skips the problem of having to reload the twitter widget? thanks it might take me some time... kinda new to this....
CamperBot
@camperbot
radedje sends brownie points to @mizujin :sparkles: :thumbsup: :sparkles:
:warning: radedje already gave mizujin points
Rémi Fortier
@mizujin
yes, this script needs to be put in the bottom of your html page, it appends a button with correct parameters
eduwin7
@eduwin7

var count = 0;

function cc(card) {
// Only change code below this line

if (card==2||card==3||card 4||card==5||card==6)
return " 5 bet";

how can i fix this code
Arvilyn Ong
@arvilyn
you should use switch for this exercise @eduwin7
rphares
@rphares
if is also okay, but...
@eduwin7 , you dont always return "5 bet"
you will get five cards,
if you are using if/else,
Moisés Man
@moigithub
@RadEdje r u working on codepen ?
rphares
@rphares
you need if for those cards, incrementing count
Stephen James
@sjames1958gm
@eduwin7 You are supposed to adjust count based on the card number and then return a value based on count
rphares
@rphares
and another for the other cards, decrementing count
then another if/else, to return count and the appropriate string (" Bet" or " Hold")
depending on if count is above or below 0
bitgrower
@bitgrower
@eduwin7 -- you can start down that path, but you neeed to account for all the rest of the numbers ... there are TWO parts to this card count challenge ...
  1. determine whether to add or subtract 1 from the count, or nothing at all
  2. look at the value of count to determine whether you should send a bet or hold message
ERWIN JOHN T. CARPIO, MD, FPCR
@RadEdje
@moigithub no... I'm working on local files first before uploading to codepen.
eduwin7
@eduwin7
okay let me try switch
Moisés Man
@moigithub
@RadEdje cuz.. instead of writing all the code above.. u can just append to ur code a script tag n point to https://platform.twitter.com/widgets.js
<script src = "https://platform.twitter.com/widgets.js" />
instead of this :point_up: May 17, 2016 8:29 PM
@RadEdje then u can twttr.widgets.createShareButton( ... etc
Subh Samal
@subhsamal
Hi .. I am not able to solve "Record Collection"