Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [path]

The tag has no usage guidance.

2
votes
3answers
108 views

filesystem::path vs. optional<filesystem::path> as argument to function

Sometime ago in a code-review (C++) I suggested to change the input argument from Path type to Optional<Path>, where the function has specific logic for unset path. It looks for me intuitively ...
4
votes
1answer
111 views

Should I specify my header include path in the source code, or as a project option?

Basically, I am asking, whether my code should say #include “../libs/src/my_lib.h” or #include “my_lib.h” with a complier option of -I ../libs/src/ I feel (reasonably strongly) that ...
0
votes
2answers
51 views

Should I put request context in path or in headers?

I'm designing a system that will Act as proxy calling a service on a back-end in context of user and his session Manage sessions for users on multiple back-ends I will expose the system over HTTP. ...
3
votes
4answers
219 views

Are short-circuiting paths considered for path coverage?

In a book Doron A. Peled, he states that " path coverage does not subsume multiple condition coverage because you can execute all the paths without exercising all the conditions. But I believe ...
1
vote
2answers
202 views

How to find all possible paths with specific length in hexagonal game board?

I am currently developing a simple game in Unity. I got a game board composed of hexagons. Let's say, the red dot is the player. Now I want to show the user on which fields he can go, depending on ...
3
votes
3answers
284 views

Is there an elegant way to write code with differing paths having a common middle segment?

I started out with the following, simple routine: void originalCode(){ boolean status = getStatus(); function2(status); if(status){ return; } function3(); } But ...
0
votes
0answers
86 views

Quick way to check if there is a path in digraph

I have a finite directed graph (of several weakly connected components). Having two elements I need to check if there is a path from the first one to the second one. The easiest solution is to ...
26
votes
3answers
12k views

What algorithm is used by elevators to find the shortest path to travel floor orders?

I'm trying to simulate an elevator, as always I started very simple by taking only a single order at a time, then added memory to the elevator in the form of queues so that floors are traveled in the ...
-5
votes
1answer
1k views

How do I get python to recognize my DLL file as import(able)

I ran into an error stating: "ImportError: No module named 'pywintypes'", and after some reading around, I have discovered that the DLL for pywintypes is in C:\Python35-32\Lib\site-packages\...
1
vote
1answer
676 views

Find fastest connection to a certain point

What i'm trying to implement is a program that is searching for the fastest connection from one station to other at a given time of the day. I have a number of stations n, and a number m of lines ...
1
vote
1answer
311 views

Algorithm for creating a looping 3D path that complete fills a cube [closed]

I'm creating a game world that consists of a 16 x 16 x 16 rubix cube (pictured), where the individual cubes are floating in space. The cubes continuously move along a single set path that links up ...
1
vote
0answers
234 views

Finding the longest acyclical path in a 2D maze

I have a n by n maze, like this: [0, 1, 0, 0, 0, 1] [1, 1, 0, 1, 1, 0] [1, 0, 0, 1, 0, 1] [0, 1, 1, 0, 0, 1] [0, 0, 0, 1, 0, 1] [1, 0, 1, 0, 1, 1] Only 0-fields are passable, and one can only move ...
1
vote
1answer
2k views

When to use absolute path? [closed]

I had given an answer on SO, the question was concerning a problem with a relative path. My answer was to use an absolute path, which I thought seemed simpler. The asker claimed to need a relative ...
3
votes
1answer
574 views

How to deal with relative paths in out of source build?

An out of source build is a build which can be in any directory other than the source directory I have a project which contains relative paths to some resource files, needed at runtime, which are ...
2
votes
3answers
405 views

long (or bizarre) file paths

I know that (on Linux at least, with native file systems like Ext3) file paths can in theory be quite long, and PATH_MAX is often (but not always) as big as 4096 (see this; and this explains it could ...