Questions tagged [single-source]

Single-Source refers to a single set of program source files that are compiled or otherwise converted to an executable form by compilers, interpreters or other similar tools on more than one operating system or hardware platform.

Single-Source refers to a single set of program source files that are compiled or otherwise converted to an executable form by compilers, interpreters or other similar tools on more than one operating system or hardware platform. For example, source code that compiles for two or more of Linux, Windows or OS/X, or for two or more of x86, TI-365 or Motorola 604.

Assuming the compilation case, in practical use, code components unique to a particular operating system or hardware platform are bounded in conditional compilation blocks controlled by user or system defined variables (e.g. #define-d C compiler variables). It is also common practice to code these conditional compilation elements into subroutines with names indicating their function and compiler independence. Practical application also prefers that these compiler independent subroutines be coded into separate source files for link time inclusion.

14 questions
7
votes
6 answers

Can we change Dijkstra's Algorithm to work with negative weights?

The pseudocode as taken from Wikipedia: function Dijkstra(Graph, source): 2 for each vertex v in Graph: // Initializations 3 dist[v] := infinity ; // Unknown distance…
Ori Popowski
  • 10,432
  • 15
  • 57
  • 79
4
votes
1 answer

Extensible framework for context-sensitive help in web application

For the web application we are currently working on, we will have to think in advance on how to roll it out to a number of different user groups. From a functional side it is important to have a documentation system in place that can be used to…
Kariem
  • 4,398
  • 3
  • 44
  • 73
3
votes
1 answer

Software design: DRY, Single source of truth, and data validation

From Wikipedia's article on DRY Software: The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system." The principle has been formulated by Andy Hunt and Dave Thomas in…
Callum
  • 435
  • 1
  • 4
  • 14
2
votes
3 answers

.net6.0 c# shared appsettings.json

I'm working away at a multi-tenant .net6.0 solution which has a number of embedded projects to keep maintenance low, I want to centralize and use / link one single appsettings.{environment}.JSON for the entire solution and have each project…
2
votes
1 answer

Where should I put testcode for an Eclipse plugin fragment?

There are several posts I found while searching for best practice of where to put test code for an Eclipse plugin. Most of them suggest fragments like this I have a plugin single sourced and it has two fragments, one for RCP and one for RAP. Now if…
1
vote
3 answers

compile single c++ source file in 1 project in visual studio

i know a lot of people asked this question, but i can't find how to do it. Is there a way to build only one source file in visual studio 2017? without new project, i'm learning c++, so i can't make huge thing now, just focus to code(now i'm learn…
1
vote
2 answers

Reduction kernel call from Single-Source in RenderScript

I implemented an algorithm in Single-Source. Now, I want to decrease my algorithm's processing time with reduction. Can reduction kernels be called from Single-Source in RenderScript?
Szilárd Gerlei
  • 247
  • 2
  • 7
1
vote
1 answer

How to improve Dijkstra algorithm for single source single-target shortest path?

what improvement can be made in given image dijkstra algorithm to improve Dijkstra algorithm for single source single-target shortest path? https://i.stack.imgur.com/H5ZW6.png
Abdul Rehman
  • 133
  • 12
1
vote
2 answers

Eclipse RAP/RWT not containing a Transform class

I am using Eclipse RWT to port applications written using Eclipse SWT to the web. But unfortunately there is no equivalent class for transformations under org.eclipse.swt.graphics. You can compare the Eclipse Platform API and the corresponding…
dkeck
  • 1,072
  • 1
  • 8
  • 13
0
votes
0 answers

Single source for C4 model 3 diagrams of levels 1-2-3 (System Context diagram, Container diagram, Component diagram)

With C4 model https://c4model.com/ Architecture is to presented at 3 levels as: L1 System Context diagram, L2 Container diagram, L3 Component diagram to give different view. Is it possible to generate these 3 from 1 source file, as external system…
Paul Verest
  • 60,022
  • 51
  • 208
  • 332
0
votes
1 answer

How can i handle two way binding in MVI architecture?

I see many articles handling two way binding with MVVM. But i want to handle this issue with single source of truth. I dont want to create multiple stateflows for this case. I have a StateFlow which has all view state inside entity. How can i…
0
votes
0 answers

ReactJS - Getting the data from deeply nested forms (or a possible rewrite)

Problem Statement: I need to get the input data of all the fields in either Container Component or a Form Component. Details: There are 4 to 5 different form Components, each using some common fields in a section. They are extracted into different…
Ahmed
  • 2,966
  • 7
  • 42
  • 69
0
votes
1 answer

Read line comments in INI file

The parse_ini_file function removes comments when reading configuration files. What would you do to keep the comments that are associated with the next line? For example: [email] ; Verify that the email's domain has a mail exchange (MX)…
Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
0
votes
2 answers

How to get Single Source Shortest Path for graphs having a negative weight cycle

Hey i have been studying the bellman ford algorithm for "single source shortest path" problems. Now i am stuck at one point where i need to find out the solution for a graph having negative weight cycle. But Bellman ford algorithm does not work…
Love Gupta
  • 975
  • 2
  • 16
  • 31