I've been having a weird web browser issue lately... Whenever I'm on this PC (Windows 7, IE 11) whenever I open a CR page (any regular post page on CR) the PC display freezes completely for a solid 10-15 seconds
It works fine during the rest of the day. But each day it does that again. Not shutting down the PC or web browser overnight. Also does not apply to chat.
This class is part of a utility that reads lines from a set of nonblocking file descriptors, blocking only when there are no complete lines to emit.
class NonblockingLineBuffer:
def __init__(self, fd, encoding):
self.fd = fd
self.enc = encoding
self.buf = bytearray()...
I don't think this is too particularly odd necessarily. What I would do entirely depends on a lot more context. If you're really interested in figuring out the best way to do this, you can always post a question on Code Review with a working version of your code. — nhgrif1 min ago
I'm trying to optimize a nested for loops that compares an element in the array with the rest of the element in the array.
There's two part, the first part is for example, an Array has 3 elements, and each element is a dictionary:
[{"someKey_1":"a"}, {"someKey_1":"b"}, {"somekey_1":"a"}]
1s...
@nhgrif I'm learning more about ERP and CRM systems this week in class.
Unfortunately, the book is very poorly written, so I don't even know what they are getting at, other than that keeping inventory is more expensive than JIT systems (which I already knew).
So, from what I've gathered from the book, an ERP system gathers and analyzes data from the entire company, and displays it so the company leaders can easily make the best decision (well, a perfect decision is like bug-free software), and helps them run their manufacturing process more efficiently?
Like, automatically placing orders from suppliers, and the like?
Generally, you'll have sales agents. Sales persons. They're finding people to buy your products and making sales orders.
Then you have your shop floor managers, factory managers. They look at the sales orders, and they'll schedule shop floor time to manufacture the necessary goods.
And then you'll have purchasing agents that look at what material is needed and when, and purchase stuff based on that.
@Hosch250 So the purchasing agent looks as see we need X sprockets. We can order them from Acme Co, but they have a 2 week lead time. Sprockets, Inc. can get them in 7 days, but they're 50% more expensive. And Sprockets-Are-Us have the same lead time as Acme Co, they're also cheaper, but they're late by an average of 2 days.
So the purchasing agent has to choose who best to order our sprockets from based on that information.
Taking price, lead time, likelihood of being late, etc. into consideration.
@Hosch250 right. and if you change 1 to 2 you get { "abc", "xyz" }. so why doesn't a parameter of 1 give you { "abc" }?
i mean, it's documented to behave the way it does, i just think it's a really strange decision
"count The maximum number of substrings to return." ... "If this instance does not contain any of the strings in separator, or the count parameter is 1, the returned array consists of a single element that contains this instance."
Welcome to Stack Overflow. Please take the time to familiarize yourself with the Stack Overflow help file, which will help you understand what kinds of questions are appropriate for this site. This site is intended to help you obtain answers to specific programming questions, as opposed to providing tutorial, design or code review assistance. — MarsAtomic1 min ago
Edited. My last code review was "keep it to the point so people can read it." And, it's complicated because I need to know how the complicated stuff works. If I keep everything simple, I'll never find out how to keep the global scope clean, or how to format the structure so it can be properly documented and maintained. — Junior Devjust now
I am saving data into a MongoDB. The data will be saved into 3 Mongoose models that are hierarchical. A User model contains an Activity model array. An Activity model contains an array of Data models. Are the following model definitions correct (or does an explicit reference to the parent model n...