Questions tagged [resources]
Memory, files, network connections, I/O devices and other objects that have to be acquired and then released within a program. Please do not use this tag to ask questions about educational resources such as tutorials, books, websites or classes. Those are off-topic on Programmers.
107 questions
12
votes
4
answers
3k
views
How to initialize the same global resources from multiple modules independently?
I encountered the following situation: I have two modules, TokenService and Wifi which are initialized from main(). The modules themselves don't know of the existence of each other and function ...
0
votes
1
answer
377
views
Sink or non-sink API's?
This might be an opinionated question but I'm eager to hear your anecdotes as I'm at the beginning of designing a new API. Now I'm questioning whether I want this API to be a sink API or non-sink API. ...
0
votes
0
answers
111
views
In Laravel, how do you handle a resource being managed differently depending on a user role while using policies?
I find myself in a situation where I have two roles, "Admin" and a "Organizer". The "Admin" accesses the AdminUserController to update users, while the "Organizer&...
-2
votes
2
answers
75
views
When to self-audit complex calculation [closed]
Given an app that manages appointment bookings, I'm separately storing purchases, bookings made, or cancellations (some of them non-refundable) and am required to show the sum of these, based on ...
0
votes
1
answer
338
views
Can resource which requires asynchronous cleanup be constructed synchronously?
More specifically this applies only to resources which have asynchronous dependencies themselves (but I think that's majority of them).
Concrete example:
class Foo : IAsyncDisposable
{
public ...
74
votes
4
answers
12k
views
What is the purpose of storing multiple lower resolution versions of the same original image?
Sometimes in apps I look into the Resources and find files for, for example, a 256x256 version, a 128x128 version, a 64x64 version, AND a 32x32 version, of the same icon. When I see simple geometric ...
0
votes
0
answers
152
views
HTTP polling vs WebSocket for very small payloads that don't change often
In our team we are currently discussing which technology makes more sense for an upcoming feature - HTTP polling vs WebSocket.
To give some context:
We are developing a TV streaming application (...
2
votes
1
answer
3k
views
How to store a vector of smart pointers, except some of them are owned by another object?
I'm making a basic platformer game. I have a Game class as well as Level class. The game object holds a pointer to the current Level object. A level currently has a std::vector of GameObject raw ...
0
votes
1
answer
350
views
Managing the disposal of network connections
I am writing a class -- let's call it MessageSender -- that needs to perform operations over the network. It basically does these things:
Take some configuration
establish a connection
send stuff
If ...
-4
votes
2
answers
98
views
How do browsers isolate traffic within a single tab?
I know that browsers use a separate port for each tab. However, in each tab, there might be multiple scripts doing data transfer over the network. How does a browser makes sure that the data is ...
1
vote
2
answers
154
views
How do VMs and GCs treat objects which wrap yet active resources, but that are unreachable from user code?
I am building an interpreter in C for a simple programming language.
The interpreter is fitted with a built in garbage collector. The GC simply marks all objects which are linked from some root (the ...
1
vote
1
answer
5k
views
Managing .resx resources files for multiple languages application
I am currently developing a software for a multi languages environment using visual studio (en, fr and es). The soft is some kind of a 3d configurator, if I take the exemple of a car configurator, the ...
2
votes
1
answer
652
views
How can I accurately estimate the minimum resources my application needs?
For an application that is starting out I do not want to over pay for servers and resources that will not be used since the budget is very limited at this point. This will be a for an iOS and Android ...
-4
votes
1
answer
132
views
Can iOS App Process Location Info while it's not running?
I want to ask about iOS application characteristic/behavior regarding processing location information. My previous wording isn't straightforward and seems to make it look unclear (which is my problem ...
-1
votes
1
answer
579
views
Updating last resource access time when clients perform a GET
We have many clients which, upon start up, request a specific resource on the server using an HTTP API (not RESTful). This resource is - currently, identical for all clients.
Naturally, since the ...