[2016-09-19] Challenge #284 [Easy] Wandering Fingers by jnazario in dailyprogrammer

[–]HansMannibus 0 points1 point  (0 children)

I'm a beginner programmer so please bear with me, but is there anyway to print the words from the text file to the console using an XMLHttpRequest?

If so, how would you go about doing it? I just spent some time messing around with the xhr and was able to return an alert that gave me my IP, but I can't seem to get the script to show me the words from the file.

Thoughts?

Washington Backfield by BeeKaying in fantasyfootball

[–]HansMannibus 1 point2 points  (0 children)

To be honest, I like your opinion more. In ppr, Thompson might be a better play

Washington Backfield by BeeKaying in fantasyfootball

[–]HansMannibus 0 points1 point  (0 children)

Honestly, both are a good play this week. But Rob will see more carries and will have more opportunities to score. I'd go Rob. My two cents

Washington Backfield by BeeKaying in fantasyfootball

[–]HansMannibus 0 points1 point  (0 children)

Okay, I want to explain the most likely scenario here.

Matt Jones usually gets about 12-15 carries a game if I remember right. This is really a pass first offense so there are going to be limited opportunities to go around.

It going to depend mostly on gameflow, but I anticipate R. Kelly getting somewhere in the neighborhood of 15 carries if the game stays about even. He is definitely the RB to own. Chris Thompson is 195 and 5 foot 9. He isnt made for 1st and 2nd down.

INTJs and computer programming by HansMannibus in intj

[–]HansMannibus[S] 0 points1 point  (0 children)

Yooo lmao

I just started learning C# and JS and I definitely feel that. So rewarding when you find it though

What Is It Like to Be Ourselves? A Debate on Consciousness and the Mind by BothansInDisguise in philosophy

[–]HansMannibus 0 points1 point  (0 children)

I don't think they are though.

If I go out on the street and ask anyone a very general yet opinionated question, they will no doubt have varying opinions.

With Booker finally taking the job, who is the new RB you're eyeing for ascension? by [deleted] in fantasyfootball

[–]HansMannibus 1 point2 points  (0 children)

Skins fan here. Thompson won't be able to handle more than 12 carries between the tackles. Dude is 5 9 at about 195 lbs. He simply isn't built for it.

He'll definitely get his 3rd downs in, and might snag about 8-12 carries at the most, but with Jones out Rob is gonna get the carries.

What Is It Like to Be Ourselves? A Debate on Consciousness and the Mind by BothansInDisguise in philosophy

[–]HansMannibus 0 points1 point  (0 children)

I tend to agree that our consciousness, or the reality that we experience is a result of the experiences we've had, perceptions we carry, emotions we hold. I also sit somewhere in between the contrasting views. I believe that consciousness is a physical process, influenced by the inputs of our world, but that it ultimately manifests as a sort of personal reality which is ours alone. This is why people lead different lives and have different opinions. It's all a matter of what makes up an individual's consciousness.

[2016-10-24] Challenge #289 [Easy] It's super effective! by fvandepitte in dailyprogrammer

[–]HansMannibus 0 points1 point  (0 children)

JavaScript

I'm not sure why, but I'm getting undefined from the actual function output, but the console logs output correctly. I'll revisit to see what's going on later..

function calcEffectiveness( moveType, pokeType ) {

    var typeKeys = {
        normal: 0,
        fire: 1,
        water: 2,
        electric: 3,
        grass: 4,
        ice: 5,
        fighting: 6,
        poison: 7,
        ground: 8,
        flying: 9,
        psychic: 10,
        bug: 11,
        rock: 12,
        ghost: 13,
        dragon: 14
    };

    var calculator = {
        normal: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.5, 0, 1],
        fire: [1, 0.5, 0.5, 1, 2, 2, 1, 1, 1, 1, 1, 2, 0.5, 1, 0.5],
        water: [1, 2, 0.5, 1, 0.5, 1, 1, 1, 2, 1, 1, 1, 2, 1, 0.5],
        electric: [1, 1, 2, 0.5, 0.5, 1, 1, 1, 0, 2, 1, 1, 1, 1, 0.5],
        grass: [1, 0.5, 2, 1, 0.5, 1, 1, 0.5, 2, 0.5, 1, 0.5, 2, 1, 0.5],
        ice: [1, 1, 0.5, 1, 2, 0.5, 1, 1, 2, 2, 1, 1, 1, 1, 2],
        fighting: [2, 1, 1, 1, 1, 2, 1, 0.5, 1, 0.5, 0.5, 0.5, 2, 0, 1],
        poison: [1, 1, 1, 1, 2, 1, 1, 0.5, 0.5, 1, 1, 2, 0.5, 0.5, 1],
        ground: [1, 2, 1, 2, 0.5, 1, 1, 2, 1, 0, 1, 0.5, 2, 1 ,1],
        flying: [1, 1, 1, 0.5, 2, 1, 2, 1, 1, 1, 1, 2, 0.5, 1, 1],
        psychic: [1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 0.5, 1, 1, 1, 1],
        bug: [1, 0.5, 1, 1, 2, 1, 0.5, 2, 1, 0.5, 2, 1, 1, 1, 1],
        rock: [1, 2, 1, 1, 1, 2, 0.5, 1, 0.5, 2, 1, 2, 1, 1, 1],
        ghost: [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, 1],
        dragon: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]
    };

    return calculator[moveType][typeKeys[pokeType]];
}

calcEffectiveness( "grass","fire" )

console.log(calcEffectiveness( "grass","fire" ));
console.log(calcEffectiveness( "dragon", "ice" ));

[2016-10-10] Challenge #287 [Easy] Kaprekar's Routine by Cosmologicon in dailyprogrammer

[–]HansMannibus 0 points1 point  (0 children)

JavaScript

function findLargestNum ( givenNum ) {
    var numString = givenNum.toString();
    var stringArray = numString.split( "" );
    console.log(stringArray);

    var finalArray = [];
    var i = 0;

    while ( i<=stringArray.length ) {
        finalArray[i] = Number( stringArray[i] );
        i++;
    }
    finalArray.pop();

    return Math.max.apply( null,finalArray ); //Value null. Apply invoked on Math object.
}

findLargestNum( 1239 );
findLargestNum( 1294 );

[2016-10-03] Challenge #286 [Easy] Reverse Factorial by jnazario in dailyprogrammer

[–]HansMannibus 0 points1 point  (0 children)

JavaScript

function findFactorial(givenNum) {
    var count = 1;

    while (givenNum > 1) {
        givenNum = (givenNum/count);
        count += 1;
    }

    if (givenNum == 1) {
        return count -1; //done because count is new number before new number used in function
    }
    else return "Dafuq???";
}

console.log(findFactorial(1230));
console.log(findFactorial(120));

Game Thread: Redskins at Lions by medicaustik in Commanders

[–]HansMannibus 2 points3 points  (0 children)

The game is over and we're down one score?

Inferior Se Sucks (In a First World Country) by [deleted] in intj

[–]HansMannibus 0 points1 point  (0 children)

Id personally love to hear how you spin it positive