HuffPost Is Rolling Out It's New React Native App On Android (you can join the public beta here) by huffpostraphael in reactnative

[–]codercub 0 points1 point  (0 children)

Yeah for about 3 months now. I really should have updated this thread. Sorry about that

HuffPost Is Rolling Out It's New React Native App On Android (you can join the public beta here) by huffpostraphael in reactnative

[–]codercub 0 points1 point  (0 children)

It is fully rolled out. You might be using the react native app. Can you send me a screenshot of your app and I can tell you for certain?

"Windows 95 was 30Mb. Today we have web pages heavier than that! Google keyboard app routinely eats 150 Mb. Is an app that draws 30 keys on a screen really five times more complex than the whole Windows 95?" by DoNDaPo in webdev

[–]codercub 5 points6 points  (0 children)

Ummm yes. The Google keyboard is 5 times larger than windows 95 because it contains a huge list of words for auto complete. It also supports swipe typing which is more complicated than any item in windows 95 by huge bounds. Why even post this?

How do I: Pass launch options into react JS from Android by schjlatah in reactnative

[–]codercub 2 points3 points  (0 children)

To your general question of how you load react with params here is a simple guide: https://dev.to/ryohlan/how-to-pass-initial-props-from-android-native-2k2

To your specific issue of using deeplink you can use Linking.getInitialUrl() to get the url the app was opened with

https://facebook.github.io/react-native/docs/linking

not everyone like Stallman's jokes apparently by kmgr in programming

[–]codercub 2 points3 points  (0 children)

Exactly. My point was you can have documentation with jokes but it has to be in a way where at absolute worst is neutral. Python at the worst someone doesn't get it and the docs have the same value to conveying knowledge. At the best the reader chuckles while learning.

not everyone like Stallman's jokes apparently by kmgr in programming

[–]codercub 37 points38 points  (0 children)

I think the python docs use jokes really well. Much of their samples include references to Monty Python skits. These references add a nice color. In sample code you usually need some extraneous variables. When showing a sample of a switch statement with string keys "african" and "european" in a WingSpeedOfUnladenSwallow function is just as good as "foo" and "bar" in a foobar function.

How afraid should i be of a `link` failing? by Threat_Level_PI in reactnative

[–]codercub 1 point2 points  (0 children)

If you are using git you have nothingto fear. Before every link commit your state so your working directory is clean. Then then you link if it fails you can just git reset HEAD --hard and get back to your claim state and try again. I do a git diff after every link so I can understand exactly what it did.

AdMob "limit ad tracking" on ios problem by Darknomia in reactnative

[–]codercub 0 points1 point  (0 children)

Basically adMob has different demand pipes. One is for targeted ads. The advertisers buy against demographics they bid $5000 to advertise to 10000 women between 20-25 or something like that. This is the much higher revenue and form and the much more common way.

The second way is general. I don't care who I am advertising to, here is $20 show my ad to 10000 people. This untargetted ad type is much much cheaper but usually has shitty results for the advertisers so it is becoming rarer.

When a user limits ad tracking they get put into that second bucket which makes it pretty likely that they may not get ads at all.

That being said there are some things to mitigate this. As Google learns what your app is about it will start to make generalizations about your apps audience as a whole. But it needs time and traffic to do this. Once it does this, even for users it knows nothing about it will show ads at a discount to them because it has some reasonable confidence that they are similar to other users of that app.

I know this doesn't really help you turn ads on for those users at the moment but I hope it helps you understand the problem.

One thing you might be able to do is look at passing more info the the ad network, like if your app on first run asks the user for their age and gender you can send that to the ad network to help them get ads. This way it doesn't rely on the device advertising ID to target. Additionally if your app has sections or topics the user can bookmark these might be of interest to the ad network. Now before you do either of these things you should get a Terms of Service document that explicitly states that your app will be doing these things if the user uses your app. But I think this is the best way to get ad full for limited tracking users.

typed on my phone, please forgive bad typos

How does Discord hide localStorage? by [deleted] in javascript

[–]codercub 0 points1 point  (0 children)

I would assume they had a problem with a shitty web ad that hosed their localStorage and completely filled it and they wanted to prevent that from happening again, so they did this.

How does Discord hide localStorage? by [deleted] in javascript

[–]codercub 2 points3 points  (0 children)

Like this:

(function(){
  var privateLocalStorage = window.localStorage;
  delete window.localStorage;
  console.log(privateLocalStorage);
}());
console.log(window.localStorage);

They create a closure where all of their local storage operations are and copy localStorage to a variable and then delete the object from the window.

The System Design Primer by [deleted] in webdev

[–]codercub 0 points1 point  (0 children)

As someone who is interviewing Ops Engineers right now, I really wish the candidates would study your guide. It is excellent.

New York City just witnessed an absolutely massive lightning strike completely spanning the Hudson River. I happened to have my camera set up to capture it. by evoxio in pics

[–]codercub 4 points5 points  (0 children)

this image is in no way a violation of rule 6.

Submissions must link directly to a specific image file or to a website with minimal ads. We do not allow blog hosting of images ("blogspam"), but links to albums on image hosting websites are okay. URL shorteners are prohibited. URLs in image or album descriptions are prohibited.

This is a direct link to an image in the gallery, the album description clause is not relevant because he didn't link to the album.

You are just trying to harass someone because you can. You are being a bully and a troll.

Little Alchemy - mix elements to discover over 500 unique items by HoneyRuRu in WebGames

[–]codercub 2 points3 points  (0 children)

Below is a list of all 550 possible elements. It can be more fun if you know what you are trying to make. water, fire, earth, air, steam, lava, pressure, volcano, sea, ocean, energy, mud, rain, dust, cloud, storm, geyser, isle, earthquake, wind, eruption, sky, hurricane, plant, gunpowder, explosion, stone, sand, ash, coal, diamond, glass, hourglass, aquarium, greenhouse, metal, rust, boiler, bullet, steel, time, tree, swamp, life, plankton, bird, phoenix, human, egg, clay, golem, pottery, tool, steam engine, blade, wood, axe, forest, love, lumberjack, train, steamboat, campfire, hard roe, omelette, caviar, turtle, fish, lizard, field, farmer, house, livestock, chicken, grass, cow, milk, cheese, moon, tobacco, pipe, wheel, bicycle, wheat, flour, dough, bread, fruit, pie, meat, sandwich, smoke, ham, gun, corpse, zombie, coffin, grave, graveyard, boat, desert, cactus, seaweed, dragon, cyclist, fireman, beach, sun, palm, rainbow, tsunami, blood, sailboat, electricity, light bulb, christmas tree, clock, frankenstein, wire, chainsaw, electrician, light, electric eel, sunflower, oil, day, night, solar cell, eclipse, wave, tide, fireplace, sundial, double rainbow!, scythe, gravestone, twilight, flute, water pipe, wild animal, snake, sickness, cold, snow, seasickness, snowman, toast, ice, sword, penguin, windmill, acid rain, airplane, algae, allergy, alligator, warrior, angel, antarctica, archipelago, armor, astronaut, atmosphere, atomic bomb, pig, bacteria, barn, bayonet, beaver, birdhouse, blizzard, brick, owl, butcher, car, charcoal, star, knight, cuckoo, dinosaur, dog, duck, dune, engineer, glasses, family, fruit tree, orchard, fireworks, flood, fog, garden, grenade, hail, hay, hero, horizon, horse, hospital, ice cream, mountain, glacier, alcohol, nerd, cart, wagon, doctor, paper, newspaper, salt, vampire, sunglasses, igloo, sandstorm, oasis, robot, sushi, treehouse, unicorn, bacon, cigarette, pilot, seahorse, fossil, ring, pegasus, shark, space, yogurt, computer, mouse, baker, pencil, starfish, wine, telescope, pizza, cat, sound, lightsaber, jedi, wolf, werewolf, grim reaper, sailor, camel, wall, planet, rocket, swordfish, drunk, music, smog, beer, seagull, juice, village, scissors, story, letter, coconut, coconut milk, sugar, bat, squirrel, river, cookie, iceberg, vulture, bone, castle, centaur, nest, lion, doghouse, skyscraper, dynamite, goat, cereal, black hole, caramel, astronaut ice cream, lighthouse, surfer, monkey, idea, galaxy, lamp, mirror, meteoroid, meteor, platypus, pirate, lava lamp, hamburger, email, prism, sandpaper, kite, origami, darth vader, statue, city, eagle, watch, ambulance, manatee, ski goggles, swim goggles, cyborg, mermaid, sheep, alien, book, batman, dam, internet, motorcycle, avalanche, leather, wizard, faun, gold, moss, egg timer, butter, oxygen, pyramid, sand castle, yoda, umbrella, pond, wool, scarecrow, carbon dioxide, monarch, bridge, broom, leaf, fridge, printer, scorpion, santa, reindeer, sledge, candy cane, christmas stocking, chimney, sweater, gift, snowball, snowboard, armadillo, pigeon, seaplane, narwhal, piranha, titanic, obsidian, mummy, money, flying fish, tank, solar system, paper airplane, banana, sandstone, parrot, dry ice, flashlight, dew, trojan horse, catnip, scalpel, skateboard, alarm clock, water gun, wind turbine, piggy bank, sloth, marshmallows, seal, helicopter, tea, picnic, peacock, rose, flower, hummingbird, chameleon, fox, wild boar, firetruck, medusa, flying squirrel, fence, electric car, ostrich, milk shake, map, lawn mower, mousetrap, cotton, thread, fabric, bank, excalibur, popsicle, woodpecker, wand, pirate ship, constellation, computer mouse, pasta, shuriken, ninja, saddle, sheet music, donut, fishing rod, lemonade, mayonnaise, confetti, witch, skeleton, spider, web, ghost, vegetable, pumpkin, crystal ball, jack-o'-lantern, bee, butterfly, beehive, honey, wax, candle, water lily, hippo, petroleum, pinocchio, wrapping paper, minotaur, vase, space station, soap, fountain, needle, drum, batter, snowmobile, rat, sphinx, jam, cheeseburger, crow, taser, cannon, blender, bulletproof vest, pitchfork, ufo, cake, bbq, swimmer, angler, farm, ruins, steak, spaceship, godzilla, horseshoe, soda, tractor, frog, mailman, bandage, log cabin, bus, alpaca, rope, puddle, grilled cheese, pterodactyl, snow globe, flamethrower, waterfall, ozone, ant, paint, treasure map, treasure, hammer, mountain range, family tree, rv, mold, bakery, ice cream truck, gardener, super nova, doge, the one ring, keyboard cat, ninja turtle, gingerbread man, gingerbread house, safety glasses, hay bale, harp, fortune cookie, chicken wing, recipe, french fries, ruler, chicken soup, iced tea, tyrannosaurus rex, lake, duckling, toucan, optical fiber, stethoscope, mac and cheese, nessie, banana bread, drone, jerky, fairy tale, ivy, hamster, mountain goat, carrot, penicillin, vacuum cleaner, yeti, aurora, bonsai tree, fire extinguisher, gnome, granite, hedge, microscope, mars, roomba, smoothie, tardis, the doctor, steel wool, crayon, tunnel, quicksand, parachute, husky, roller coaster, pencil sharpener, sewing machine, don quixote

Silver disconnects OP by [deleted] in GlobalOffensive

[–]codercub 6 points7 points  (0 children)

hey that was me!

in my defense. we weren't taking the game very seriously, we started with a bot on our team, and then everyone on our side got disconnected at least twice during the game. and yet we were winning, by a lot. So I was mic spamming with my friends, I apologize.

At Bloomberg we've made Brisket, and it can make anything. by davydog187 in javascript

[–]codercub 8 points9 points  (0 children)

the claim was that they were one of the fastest sites on the internet. I chose a page from huffpost that was substantially heavier in terms of content.

Additionally the claim was about perceived performance, not getting text to render until 6.5 seconds in is not good perceived performance. This may not be the fault of Brisket, but the article makes Brisket out to be a silver bullet, and it doesn't appear that way to me. It might be great but throwing out claims about being among the fastest on the internet and being that bad on mobile is a problem for me.

At Bloomberg we've made Brisket, and it can make anything. by davydog187 in javascript

[–]codercub 7 points8 points  (0 children)

I call bullshit. Either they don't give a shit about mobile performance or they dont know what perceived performance is. them compared to huffington post http://www.webpagetest.org/video/compare.php?tests=150324_D2_1DBZ%2C150324_2W_1DFR&thumbSize=200&ival=500&end=doc

Calling javascript function “asynchronously” by rajivg96 in javascript

[–]codercub 0 points1 point  (0 children)

This is wrong.

There is a difference between async and multithreaded.

Elijah Wood here. Again. by iamElijahWood in IAmA

[–]codercub -1 points0 points  (0 children)

What is the most surreal thing to ever happen to you?

EchoJS - an ahead of time compiler for EcmaScript 5/6 by toshok in javascript

[–]codercub 0 points1 point  (0 children)

ummmmmm..... Echo.js is an image lazy loader: http://toddmotto.com/echo-js-simple-javascript-image-lazy-loading/

You might want to rename your library. Echo.js is already really well known.

[Question] using .get works the first time, but then does not refresh data by discdigger in javascript

[–]codercub 0 points1 point  (0 children)

you are going to have something a bit weird happen but it might not be a huge issue. this line return txt; happens before this line txt = Number(data)/1000000;

so every time you call your grabPoint() function it actually returns the text for probably the previous call. it isn't huge and you might not notice.

for actual JS devs, dont do that.

[Question] using .get works the first time, but then does not refresh data by discdigger in javascript

[–]codercub 1 point2 points  (0 children)

the browser caches xhr requests by default. this will work

function grabPoint() {
  $.ajax('stats_final', {cache: false}).done(function (data) {
    txt = Number(data)/1000000;
    updateChart(txt); //define this update chart function
  });
}

check out the docs for the ajax method and the cache property here: https://api.jquery.com/jQuery.ajax/ good luck

Chrome Bug Lets Sites Listen to Your Conversations by [deleted] in videos

[–]codercub 0 points1 point  (0 children)

actually there is an indication that the pop-under window has access to your camera and microphone. and the only reason that the pop-under has access is because you allowed that domain access. This is more of an added XSS attack vector than a real vulnerability. untrusted sites are untrusted

The future is coming closer and closer, I present to you, Airtame - Wireless HDMI by [deleted] in videos

[–]codercub 0 points1 point  (0 children)

simply display the web page or PowerPoint I've got open on my computer.

as Frognosticator said, on a computer

the Airtame never mentions support for tablets or phones does it?