Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
I know I know the answer to this, but I'm drawing a huge blank. What's the name of this pattern?

code:
class A { }

var classReference = A;
var classObject = new classReference();
That is, being able to set a variable to (or make a function that returns) a class type, and then use calls to that variable to make instances of the class?

Adbot
ADBOT LOVES YOU

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Jewel posted:

What kind of db could a an mmo like WoW or eve be using? I know there's a lot of instancing and caching involved but it still seems like there's a high data throughput. Unsure if complicated queries are necessary, though.

I was involved with a (much smaller that wow) mmo a few years back, and I'm pretty sure it was some flavor of SQL. The whole game state is loaded on startup and kept in memory, so it's not like you have to be constantly pulling and pushing into the db.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Marshmallow Blue posted:

Hey everyone

I have a dinosaur question. By that I mean actionscript3, and it looks like the mega-thread is gone. I'm just trying to pick this up and have hit a bump.


I made a stupid timer that counts down from 20 seconds. Then when complete resets to 20. But: When I click the button to make the timer count down again (from 20), it instead adds 20, and subtracts 1.

code:
var nCount:Number=20;
var myTimer:Timer=new Timer (1000, nCount); 
timer_txt.text=nCount.toString();

myTimer.addEventListener(TimerEvent.TIMER, countDown); 

function countDown (e:TimerEvent):void {
	nCount--;
	timer_txt.text = nCount.toString();
}

function countUp (e:TimerEvent):void{
	trace("Beer finished");
	nCount +=20;
	timer_txt.text = nCount.toString();
}


brewstand.addEventListener(MouseEvent.CLICK, beginBrewing);

function beginBrewing(event:MouseEvent):void
{
	myTimer.start();
	trace("You're Making Beer!");
	myTimer.addEventListener(TimerEvent.TIMER_COMPLETE, countUp);
}

My guess is that you need to call Timer.reset before Timer.start. The documentation doesn't say anything about it, but start probably don't imply reset. My guess is that when it stops it gets into some undefined state that results it in ignoring the first delay when you restart.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Jsor posted:

I still don't understand how buffer overflows that allow the user to execute arbitrary code work. I mean, the concept is straightforward, but I have no idea how I'd be able to consistently target the instruction memory I'd want to overwrite. If you actually have a copy of the program sitting around, sure, you can run a debugger on it, and since programs generally execute pretty consistently you can target the overrun. On a remote program handling multiple connections allocating memory in unpredictable addresses? No clue how people manage it. If I had to guess you just inject the first <N> bytes with your malicious code and then just put in an absurd (i.e. megabyte sized or more) number of repeating "unconditionally jump to <start of malicious block>" statements afterwards. (Though if that's the case I'm not sure how you'd get the address of the start of the block it needs to jump to).

E: This is specifically on execution of arbitrary code via overruns, getting programs to just print out a dump of the values of data you want is much easier to understand for me.

On phone so can't really link but Computerphile on YouTube did a video on it recently that explained it well.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
The finder doesn't show the standard UNIX directories located on the root of the drive, but other than that wysiwyg, there's nothing to figure out. The Library(ies?) directory (in home and root) is likely of interest as that's the standard location for installing frameworks and the like, although you're free to put your stuff wherever you want.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
The day where I don't wonder if I'm writing a Daily WTF is the day it's time to find a new career

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Cuntpunch posted:

But this comes from some rather senior people that I don't know well enough yet to doubt.

Seniority does not imply competence

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
I assume that everything that's not critical life threatening is always about to blow up.

That's not to say critical life threatening things aren't the same way

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
I've always, without any expertise or experience, figured that Big Data refers to breadth of data rather than pure size. That is to say, while Facebook and Google obviously have more data than Stack Overflow, what makes their data Big Data is that it covers a wide variety of information that you can cross-reference and use to make predictions or learn about your users or all of that other stuff they can sell ads with. Or in something like IBM's use of Watson in medical contexts, draw together disparate bits of information to figure our diseases and diagnose tricky problems.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Modest Mouse cover band posted:

e: Thanks for the example that really helps. I don't really understand what pointers are, no. I was thinking it was related to scope, but that seems wrong. For example why does this function need a pointer declaration: http://stackoverflow.com/questions/8958044/expected-constructor-destructor-or-type-conversion-before-token ?

Massive oversimplification, but in c# whenever you pass a non-primitive value to a function, you're essentially passing a pointer (the location of the item in memory rather than creating a copy). While c# assumes the pointering, in c++ you have to explicitly declare it.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
Sounds like it existed pre 1997 (how many bets on usenet) and the last maintainers didn't give a drat about modernizing.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
I like the issue tracker on Github, but that probably doesn't make sense if you're not using github (in which case you probably wouldn't be asking the question). JIRA is a big monster that's probably overkill if you're not doing corporate-scale work.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
At my current job, checking a file in means pushing it to the test server :emo:

Fortunately we're being forced by those on high to convert to git, but my boss thinks this is a step backwards and everything is fine :suicide:

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
I don't think there's any answer that doesn't ultimately end with "pray that their penetration defense is undefeatable"

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

LP0 ON FIRE posted:

The 1x1 image with the request and the Google thing to prevent it is blowing my mind too. Good to be aware a little more what's going on, instead of blindly using PHP to automatically generate emails for people.

It's not just email, either. Tracking pixels (as they're called) are used to track web browsing, too

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Star War Sex Parrot posted:

I highly recommend the textbook Computer Systems: A Programmer's Perspective if you want exposure to systems topics. For example, you'll understand why two algorithms that accomplish the same task with the same time complexity can take wildly different amounts of CPU time. For example (this is from that course's slides), these two functions do the same thing but have noticeably different runtimes. All that's different from a code standpoint is the order of the iteration for the two index variables:



Granted the former is convention for nested loops anyway, but it reinforces the point that the performance discussion in computing doesn't end at Big O. Topics like these are subtle but extremely important to certain applications. Here's the book's preface and table of contents if you want to glance at the topics it covers. If you do the projects for the textbook/course from the website, you'll learn a lot about low level bit fiddling, GDB for debugging, basic rules for avoiding security vulnerabilities in C, and how C memory allocators work. If that's not interesting to you, then don't worry about it.

I think it's a very approachable introduction to systems stuff from a software perspective (as the title indicates). It's a keeper on my bookshelf for sure.

So what's the reason there? The j arrays are stored in a one after another, so (i,j) is just incrementing the pointer, but (j,i) means you're running around in circles?

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Linear Zoetrope posted:

So I've never worked with JS before and for my own education I'm trying to look through some of the JS a colleague wrote in our new project:

code:
var main = function () {
  dealer = new WebSocket('ws://localhost:6112');
  dealer.binaryType = 'arraybuffer';
  dealer.onopen = function(event) {
  }

  dealer.onmessage = function (message) {
    
  };
  dealer.onclose = function() {
  };

  dealer.onerror = function(err) {
  };
};

main();
I deleted the stuff in the callbacks because it's not important. The question is: how does this... work? From my perspective I see a main that constructs an object, registers a bunch of callbacks, and then immediately exits. Why doesn't there have to be some event processing loop/function (Like, dealer.listen()) that needs to be called?

The event processing loop is in the environment the javascript is running in (like the browser) the websocket

dupersaurus fucked around with this message at 19:36 on Oct 16, 2017

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Linear Zoetrope posted:

So I assume that the Websocket construction is secretly modifying some lower-level global state in the browser context or spawning something akin to another thread (I know JS doesn't have threads but I'm saying something async running its own loop even if it's scheduled on a single thread)? Nice to know returning from main doesn't terminate the program in JS I guess.

(Or, more accurately, when it hits the end of the script, since the file just ends after main();)

Presumably the websocket object does something that keeps it out of the jaws of the garbage collector, yes.

Also worth noting that that the function is called main has no special meaning to javascript.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Shy posted:

A global variable exists for as long as the context that created it, and the referenced object doesn't get destroyed as long as it's being referenced, so assuming the context is persistent (browser page?) the object persists too.

The scope is the main function. Nothing outside of it (assuming var dealer doesn't appear in the global scope). Even if you're treating main as an object constructor, dealer isn't a member property, it's just there in the ether of the closure (the functions defined on dealer do technically have access to the dealer object).

Edit:

Linear Zoetrope posted:

Well, right, but something, somewhere, has to be doing something along the lines of (pseudocode):

code:
while(true) {
    // ... other processing
    if we get a response on 6112 {
        dealer.handle_incoming_events()
    }
    // ... other processing
}
I assume that upon construction the Websocket does something along the lines of telling the browser "if in the course of operating on this page you get a call from port 6112, let me know". It's not the scope I'm confused about so much as what exactly is causing it to do anything, because to me it "looks" like a dead object. It'd be more clear to me if it was like:

code:
var main = function() {
    dealer = new WebSocket('ws://localhost:6112');
    // ...
    dealer.addToContext(); // Tells the browser context that we're handling the given IP and port with this socket
}
If this does happen in new it also seems... racy, like it would start listening on 6112 and we might only have a partially constructed websocket without all its callbacks registered unless the handling doesn't start until after the script ends?

Yes, WebSocket it itself listening to its own set of callbacks (I'm not familiar with the websocket api so I couldn't tell you what exactly the callbacks are). That you haven't explicitly defined every callback isn't a problem, it happens all the time in JS.

dupersaurus fucked around with this message at 20:28 on Oct 16, 2017

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Linear Zoetrope posted:

What I'm saying is there's a potential problem in like

code:
dealer = new Websocket(...)
/// Uh oh, we received a message we had to drop because we haven't overridden the default handler with our own yet
dealer.onevent =  ...
/// Okay now we can handle the next message at least
In that the listener might start accepting messages and connections before it's ready to actually process them.

If you set the callbacks right after opening the connection there is no concern, this is standard JS usage. It's (presumably) all asynchronous, JS is going to have its callbacks long before the connection is opened.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

strange posted:

If I want to render SPA DOM code on the server am I stuck with a something running on Node? Can I get any of the big front-end frameworks to hook into my server-rendered DOM + state object?

Theoretically there's no reason you couldn't write your DOM into, say, React js files or Angular template files and serve those to the client. Although you'd have to be careful how you do that so you don't lose the advantages of caching. Node's just the natural use case since the built-in tools use it.


Bruegels Fuckbooks posted:

i'm almost inclined to say that if you want to render SPA on the server, you could like, consider not making an SPA. SPA is a specific technical term meaning "bloated website that uses a twenty megabyte of js framework to solve the challenging technical problem of making it so if the data in your model changes, your view should also update."

Server-side rendering of the first page is a legit technique. Helps with web crawlers and speeding up the initial download and render.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

22 Eargesplitten posted:

I see, that makes sense. So it is a formal name for a pretty standard way of doing things. The only parts that don't seem blindingly obvious are that the object is defined by URL endpoint and it being in JSON, although like Janitor Prime said it's not strictly required. And from stupid point of view it seems like you should almost always be using JSON for that sort of thing anyway.

While I'm asking dumb questions, what's the difference between a "Single Page Application" and just a website that's all on one page and sends you to sections with different IDs when you click on a link? It says it rewrites the page when you click, would that be something like creating form objects and such or would it be creating whole new "pages" (as far as the user could tell without looking at the URL)? Whenever I read about it, it mentions scrolling being an advantage on mobile devices, which sounds like the one page site that sends you to different parts.

SPAs are about manipulating the DOM on the client to render, and can mean as much as rendering the whole page on the fly in javascript. Using anchors like back in the day means that you still have the whole DOM delivered to you as a static page that’s all there, but if you’re using an SPA framework like React or Angular, the page is provided as template pieces that the framework adds and removes and manipulates from the DOM as needed via javascript.

So say you click a link, instead of pinging the server for a new static page, the framework clears the DOM and adds the new content where it needs to be.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

22 Eargesplitten posted:

I see. What you say it is sounds more like what I was thinking. Then why do all those articles talk about scrolling being such a huge thing? Is it a terminology confusion thing? It seems like what you're saying would require just as much link clicking as a multi-page application.

It’s about loading than clicking. Instead of making constant http requests for html, you make one big asset dump at the start, cache it, and then little api calls from then on.

Also, the client knows better how to render for itself than the server does, so responsiveness is a little easier.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

22 Eargesplitten posted:

Interesting. Responsiveness seems like it is probably one of the most painful parts with how many different resolutions and screen sizes there are now, so that seems like a big plus.

Does that big asset dump make it take longer to load on slower connections, or is it pretty equivalent if done right?

The first load can be painful but the browser can/will cache some amount of it, and if the app is built well the code that changes a lot will be separated from the code that does not, so future visits will load quicker. Server and client are then happy since from then on they're essentially only talking in deltas, not whole pages.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Dominoes posted:

Hey dudes. I've been working on a proj and the past few commits are down a rabbit hole I can't wake myself out of. Want to revert a few commits without losing everything.

History shows that entering terminal commands from the first StackOverflow article I find results in bad things happening if Git is involved. Git is a dark art. Probably need to get the current code in a sep branch. This is a collaborate proj with a few other users, but no one else has modified any commits since what I'm reverting to. What's the word?

edit: Solved. Copy+Pasted raw text from Github into current files.

First rule of git is make all changes in branches.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
And in your first case, all of the decrements are happening before the first after log is printed.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
You no longer need an iOS developer license to put stuff on a device, just to publish.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Keetron posted:

I am really bad at thinking up projects to do and I would like to help out in open source. Also I am rather proficient at writing tests and I like to work in java 11+ or Kotlin. Can anyone point out a project that could use some help? (xposting to java thread)

Make an art prompt generator :imunfunny:

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Volguus posted:

I've seen it happen too (it was XML and they had if-like-statements and loops in there) and it's insane.

holy poo poo don't tell me there's more than one of these in the world

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Rocko Bonaparte posted:

Any sufficiently large organization--and probably several small ones--does this at least once. A decade-younger Rocko almost did this and managed to step back. But it's not just me. There was at least one other tool that definitely did this, and then redid itself as basically a graphical Python editor. Finally, somebody else decided to literally reinvent C++ and make a hundred other people try to write code in it.

Like what Volguus posted, a tell-tale sign is conditionals and loops. You're basically creating an abstract syntax tree in a markup language and then interpreting it... because that's easier for non-programmers or something.

My case might be worse. My then-boss, somewhere in the early-middle '00s, decided he wanted to make something better than PHP. So he wrote an XML-compliant (and I think turing-complete?) scripting language: variables, conditionals, loops, functions, database access. The company's entire customer and customer service portals, spanning easily 15 years, was made with it. Last I heard, it's only now starting to be replaced by something sensible.

It's quite an achievement to make PHP look good

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Plank Walker posted:

Quick CSS/HTML question, a div's border appears to be always rendered "inside" its area, is there a way to center the border line on the boundary of the div? I.e. if i have a 10px border, 5px of the line should be inside the div's area and 5px should be outside.

half in border, half in outline

efb

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
vscode is great and can get real smart about autocompletes and such, but it’s entirely dependent on the language plugin. It may be the Rust plugin isn’t that smart, or maybe there’s some config you’re missing? The plugin page would hopefully have documentation on it.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
tbf pair programming can gently caress off

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

KillHour posted:

Why? Javascript is terrible a blast.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

sausage king of Chicago posted:

this is a dumb question, but it came up at my job a few days ago and just wanted opinions:

We have a controller that's called "coupons" and looks like /api/accounts/coupons. Coupons are associatd with customers - a customer can have a coupon.

We wanted expose an endpoint to void a coupon by customer id. a pr was submitted by person 1 with the endpoint being

code:
/coupons/void/customer/{customerId}
with the reasoning being this makes it clear that a coupon is being voided for that customer with that customer id

person 2 says it should be:

code:
/coupons?customerId={customerId}
with the reasoning being it should be a parameter since we don't have a coupon id to reference

person 3 says:

code:
/coupons/customer/{customerId}/void
since this is more RESTful and follows it being resource/action

which one seems to make the most sense?

Option 3. If at some point you need to void specific coupons by id, you’d just slap it on the end.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Nigel Tufnel posted:

I’m currently learning React through Codecademy but, having previously learned Python through Codecademy and been unimpressed with where it left me once I finished the course, is there a better resource people recommend for learning React?

I ultimately want to build a little text based card game if that matters. Maybe a little personal todo app with no login etc gubbins.

I've always thought pretty highly of the official React docs and tutorials, and it looks like they might have improved the later

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

OtspIII posted:

Okay, I've got some follow-up misc questions I've built up over the weeks of working on this that I haven't been able to google my way out of. Here's my first:

In React, is there any way to force a URL change in response to a promise being resolved? I mostly navigate between pages via ReactRouter Links, but sometimes I need to wait for a DB call to go through before I trigger the page change. As an example: I hit a button that creates a new page, and would like to be taken right to the page to start setting it up. The issue is, I can't navigate to the page until its data has first been inserted into the DB.

I've been able to make handmade Links with useHistory(), but since that needs to be in a function-component I can't really trigger it from the promise either. I feel like this should be easy to do, but I can't get it to work and any googling I do just takes me to the basic useHistory() usage.

You can set it up in many ways, but the gist is:

code:
function ComponentThatCanUseHistory() {
	function clickMe() {
		returnsAPromise().then(() => useHistory(newPage))
	}

	return <button onClick={clickMe} />
}

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

OtspIII posted:

Oh man, I figured it out.

So I was doing a bunch of fetches from my client, but not all of my server-side POST handlers were sending confirmation messages back to the client after the POST was handled (which, in retrospect, was a dumb mistake on my part even unrelated to this bug). I guess React must have a queue or something of fetches to process, and if there are six fetches still waiting on a response it won't send out any more until those have been handled. So I'd make six edits, never get confirmations from the server that they went smoothly, and then the queue would clog up and everything would stop working

That 6-requests-at-a-time is a browser restriction

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Away all Goats posted:

Regarding CSS, is it possible to assign values to a particular tag, within a div tag?

For example I have a
code:
#favorites {
color: white;
   position: fixed;
   bottom: 0;  } 
and I would like images that I add to this div element to be a certain size, without affecting any of the other images in the page.

I can't do
code:
#favorites {
   color: white;
   position: fixed;
   bottom: 0;
   img {
      width: 50px;
      height: 50px;
   }   
}
So what would be an alternative way to accomplishing this?

code:
#favorites {
   color: white;
   position: fixed;
   bottom: 0;
}

#favorites img {
      width: 50px;
      height: 50px;
}

Adbot
ADBOT LOVES YOU

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
Baby's first machine learning question:

I've made a camera to watch my bird feeder, and now I want to get some automatic identification going on. I grabbed this pre-trained model for Tensor Flow, and it works great on birds, but it's also pulling birds out of thin air from no-bird images. I haven't yet dug into the evaluating prediction confidence (if that's even a thing), but it got me thinking about training for null cases. The model has a label "background", and I'm wondering: what's going to happen if I add some training using my own pictures, including feeder-only shots classified as "background"? Would it help, or is it going to confuse things since the feeder is always going to dominate the picture?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply