Questions tagged [code-separation]
75 questions
1
vote
1 answer
How to use forward declaration with boost::msm to avoid circular dependency?
I am trying to implement a simple protocol with boost::msm. As packets arrive they are processed and dispatched to the State Machine (SM) to be handled accordingly.
My pkt class (i.e. Pkt1) requires a handle to the fsm that would allow it to call…

qwa
- 123
- 10
1
vote
1 answer
Separating Data using \n AND \t
I am trying to separate data into columns using "\n" in rstudio and then separate that data further into rows using "\t". So far I have been able to separate the data by "\n", but I can't figure out how to further split the data by "\t". I can't…

Rohan Singhal
- 33
- 3
1
vote
2 answers
Same DOM elements on different HTML pages
i think my question is a little bit stupid, but I have a problem. There`s a few html pages, for ex.: index.html and rooms.html etc... And a main.js file with scripts for all .html pages. The problem is that i have a variables, like
const…

Артем Мирошниченко
- 339
- 2
- 7
- 15
1
vote
2 answers
jQuery - replace attribute value with new value of all elements
I've this html markup:
The important point is that each is different. I need to get this…

mvlanga
- 109
- 8
1
vote
1 answer
SQL Query Help on separating return result
Example: On the phone table, someone has two phone number SQL would give me the a second row of the same person with different phone number instead of second column. What query do I use to check if person_id appears more than once insert second row…

chcha
- 11
- 2
1
vote
1 answer
Debug class, c++, linker error
I am trying to write a debug class for a project I am working on, and I do not want to have to pass a debug object around so I was trying to do it this way. However, I do not know why my compiler or linker seems to be skipping the implementation I…

Ben Adamson
- 129
- 1
- 2
- 10
1
vote
1 answer
Proper project organization and architecture for sharing code in Visual Studio/.NET projects
I'm looking for recommendations on how to best share code between multiple Visual Studio projects. I'm struggling with a fundamental topic and trying to get some ideas to get over it.
My solution has:
Several web app projects
Several standalone…

Robert
- 353
- 3
- 14
1
vote
1 answer
How to separate business logic from the UI
I am creating a calculator application, and I am trying to separate the business logic from the UI to improve the code maintainability and to allow for better unit tests.
I have created a CalculatorUI class that manages what happens when a user…

Theo
- 337
- 3
- 9
- 21
1
vote
4 answers
Design Pattern for separating a model from its graphical representation
The Problem
I am looking for (hopefully) a design pattern I might be ignorant of that can help be accomplish some code-separation for the problem I've defined below:
I have a set of classes that represent various entities such as Point, Vector, Arc,…

Zach F.
- 165
- 1
- 8
1
vote
3 answers
i have done the <
i have overloaded the '<<' operator in the linked class implementation, and i declared the .cpp file in my main function, but it's not working, and this error occurs:
undefined reference to operator<& list)
this is the declaration of the ostream…

Alladin
- 1,010
- 3
- 27
- 45
1
vote
1 answer
Mixed Entity and Business classes - Refactor help needed
I have a project where Entity Classes and Business classes are mixed up. The entity beans are part of the business and all is used through the whole project.
How can I best refactor those classes to separate those layers. I also want to keep the…

Dimitri Dewaele
- 10,311
- 21
- 80
- 127
1
vote
1 answer
Dealing with separation characters within quotes when using componentsSeparatedByCharactersInSet
I'm trying to separate a string by the use of a comma. However I do not want to include commas that are within quoted areas. What is the best way of going about this in Objective-C?
An example of what I am dealing with is:
["someRandomNumber","Some…

user2517992
- 13
- 2
1
vote
1 answer
Global Variables and Functions in Headers
I'm trying to separate my code into headers and cpps
I made a .h and .cpp for every class I had
but I have no idea where to put the functions (that aren't in classes) and the global variables
I tried putting them in main but it didn't work
I also…

Mark Kanemura
- 45
- 4
1
vote
2 answers
TypeScript - separating code output
i'm trying typescript and I find it very useful.
I've a quite large project and i was considering rewriting it using typescript. The main problem here is the following:
file A.ts:
class A extends B {
// A stuff
}
file B.ts:
class B {
// B…

Andrea Baccega
- 27,211
- 13
- 45
- 46
0
votes
1 answer
Split Accordion panels into multiple files in Flex?
I have five panels with some logic in every of them.
How could I split styles, code and layout for every panel to several files?

pixel
- 24,905
- 36
- 149
- 251