Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Brett Guillory
@kurzninja
It's a utility library
for doing things similar to what you're asking for
Dan Stockham
@DanStockham
Is it similar to jQuery?
I mean how fast can I pick up on it?
Brett Guillory
@kurzninja
just include it in your page, search the docs for the type of function you're looking for
Dan Stockham
@DanStockham
gotcha
Brett Guillory
@kurzninja
It uses the underscore as it's main variable, like jQuery uses $
Dan Stockham
@DanStockham
I'm looking at the docs. Looks handy.
Brett Guillory
@kurzninja
:)
sigursiguros
@sigursiguros
@jondcoleman how do I fix the rest of the elements?
Brett Guillory
@kurzninja
anyone here that can help me with a bit of advanced function writing? I want to overload a function like jQuery does, where supplying an argument sets a private variable, but not supplying an argument retrieves the previously saved variable
zackluckyf
@zackluckyf

@kurzninja well all of the images I used are on my computer and coded under that assumption + I'm sure many other potential problems. I decided to just submit it through git which works so unless a reviewer has a problem with that it's good to go

https://rawgit.com/zackluckyf/portfolio/master/index.html

Brett Guillory
@kurzninja
@zackluckyf you could upload your images to imgur and link to them from there
zackluckyf
@zackluckyf
@kurzninja Yeah I probably will eventually, it just doesn't seem that important right now honestly.
Brett Guillory
@kurzninja
I think there's also a way to link them to Github as well, if you've already uploaded them into a repository there
zackluckyf
@zackluckyf
Hmm couldn't seem to find any information on that. I did see that someone else apparently has done it in a similar fashion to how I did with just using github for everything so if I can avoid codepen I'll just stick to that as long as they don't make me change it!
Brett Guillory
@kurzninja
I have one of my projects all in Github as well, I didn't know you could submit a Github repo as a solution
that's very useful lol
not that I need to, I only have code, not images
but still
zackluckyf
@zackluckyf
hmm actually I need to figure out a way to do it better because technically I didn't link the repo I linked the website as a preview... hmm maybe I should just link the repo and include a file that says click me to preview lol
Brett Guillory
@kurzninja
that's a good idea
sigursiguros
@sigursiguros
Hi guys, I'm working on the pomodoro clock zipline.
I'd like to know whether I need a date time function to get the job done?
Alex Evans
@alex-evans
@sigursiguros I would recommend not using date time functions and instead taking a look at setInterval() method. http://www.w3schools.com/jsref/met_win_setinterval.asp
sigursiguros
@sigursiguros
@alcatrats what's the difference between using setTimeout and setInternal
setInterval*
Alex Evans
@alex-evans
setTimeout will run once after the elapse time, setInterval will continue to run every interval of time until clearInterval is called.
Can someone help me out with the "Exact Change" challenge? I'm confused by how it is pointing me towards using Global Objects. I'm sure there is a reason as I'm writing the answer without them currently and it is ugly but I'm not grasping how the Global Objects will help simplify it. Any pointers?
Alex Evans
@alex-evans
For example I currently have the following:
function drawer(price, cash, cid) {
  var change = cash - price;
  var total = cid[0][1] + cid[1][1] + cid[2][1] + cid[3][1] + cid[4][1] + cid[5][1] + cid[6][1] + cid[7][1] + cid[8][1];

  if(total < change) {
    return "Insufficient Funds";

  } else if(total == change) {
    return "Closed";

  } else {
   return ...;    // will determine exact change at this point and things get very very messy 
  }
}

drawer(19.50, 20.00, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.10], ["QUARTER", 4.25], ["ONE", 90.00], ["FIVE", 55.00], ["TEN", 20.00], ["TWENTY", 60.00], ["ONE HUNDRED", 100.00]]);
JackeL
@jackel27
So, I finished the calculator challenge.. spent around 4 hours on it.. but could use a few fixes on layout adjustment....
Brett Guillory
@kurzninja
currently working on the Calculator myself
Sam Reeves
@smreeves
Also just finished the calc challenge. Starting to feel pretty comfortable with jQuery now...
Salman Shahid
@salman-shahid
The calculator is annoying.. a lot of error checking
JackeL
@jackel27
@mynameissal what type of error checking?
Brett Guillory
@kurzninja
I'm just starting to work on the value entry logic
trying to figure out how I want to do this
Salman Shahid
@salman-shahid
@kurzninja I made 2 plans then I decided to #yolo
Brett Guillory
@kurzninja
lol
Salman Shahid
@salman-shahid
@jackel27 Mostly math logic
JackeL
@jackel27
@mynameissal check out eval
Salman Shahid
@salman-shahid
and things like character limit checks, checks to see if there are no operators back to back..
JackeL
@jackel27
hmm
Salman Shahid
@salman-shahid
I am using eval but I have to make sure I don't have things like 1++1
JackeL
@jackel27
good point. I did not do that, I figured taking the string into an expression and returning it back would be fine... even if it was 6**6
Salman Shahid
@salman-shahid
Really.. hmm
Brett Guillory
@kurzninja
I'm thinking about implementing some kind of event subscription to determine what button is being pressed, and passing the value of that button to an assignment controller
so if it's a number, it possibly goes into or replaces the current operand
if it's an operator, it goes into my currOp function
var currOp = function() {

        if (arguments[0]) {
            this.value = arguments[0];
            return;
        } else {
            return this.value;
        }
    };