The use of existing software, or software knowledge, to build new software
Questions tagged [code-reuse]
875 questions
-1
votes
1 answer
SQL Server - Code reuse for string operations
I have a field containing 4 different informations, separated by as dash ("-").
The code to separate it with CHARINDEX, RIGHT, LEFT, SUBSTRING, can get very awkward. Is there a more readable solution?
Sample data:
AR - RE - Dir. Asuntos Publicos y…

Rafael
- 91
- 1
- 1
- 9
-1
votes
1 answer
Building a code asset library
I have been thinking about setting up some sort of library for all our internally developed software at my organisation. I would like collect any ideas the good SO folk may have on this topic.
I figure, what is the point in instilling into…

Teto
- 800
- 6
- 15
-1
votes
3 answers
Using the same activity but changing the contents that are displayed
I am developing an application in which when an activity loads it shows a textfile(.txt) in a scrollview. Just Below the text file I have two buttons(playAnimation and playAudio) which when pressed play the corresponding files(swf and mp3…

D'yer Mak'er
- 1,632
- 5
- 24
- 47
-1
votes
1 answer
Process for creating resuable code
I have many C# applications that require a newly coded security protocol I wrote. There are many classes associated with the protocol, and it is not necessary to view the code at this point by the protocol caller, assuming proper documentation.
I…

sammarcow
- 2,736
- 2
- 28
- 56
-1
votes
2 answers
To call some sql code to reset values of local variables
I am using Sql Server 2008. In my sql file, I have defined 5 local variables (all of them int) and set them all to 0. I then do some operations (not in a loop). After each operation, I need to reset the local variables' values to 0. Right now, I am…

user1274655
- 151
- 1
- 4
- 9
-1
votes
1 answer
Removing multiple inheritance
I am studying multiple inheritance, and I read that it is considered bad design.
I created an example where multiple inheritance would be useful, and I have not found a way to rewrite it to remove multiple inheritance.
Furthermore, many languages do…

Squall
- 4,344
- 7
- 37
- 46
-2
votes
1 answer
Common footer with multiple links
I want to add a common footer for all my html pages, but the footer has links to different pages in different folders, how can I do this?
The problem is, I can write the footer with respect to one page, where the links point to, but what about other…
-2
votes
1 answer
How to exclude a method in Python?
I have a Python method in a class like below.
method_A(self):
self.method1(self)
self.method2(self)
self.method3(self)
I need to call the entire methodA() in another Python class by excluding only self.method3(self) from the…

Ravi Teja Kothuru
- 19
- 3
-2
votes
1 answer
Reusing a single componenet
I'm trying to use a single component to render two different warning messages in a react app as the only difference in that warning message (I have both of them in a translation file) is wordings, so I tried passing language props like shown below,…

Noob
- 25
- 6
-2
votes
2 answers
I want to write code once and run it on multiple platforms (Windows, Linux, Mac, Android, iOS). Is there any programming language related to this?
Language must has disaply images, play videos feature. Platform wise wrapper is acceptable but no more change required to run it on any of these 5 platforms.
Windows
Linux
Mac
Android
iOS

Ravi Paneliya
- 11
- 1
-2
votes
1 answer
What is the correct way to reuse code in any team-based (work) project?
So while I was working, a colleague of mine (code-)reviewed my code (shown below). The code is edited a little bit so it doesn't show what it's about.
//Types is a static class with static strings (because enums cant be strings)
//id can be the id…

Codr
- 1
- 3
-2
votes
2 answers
Attempting to instantiate in loop, get unexpected type (expected variable)
I'm trying to instantiate three objects in a loop so that I don't reuse the constructor text. This is because, for Uni, we get marked down if we reuse the same line of code (it's marked automatically).
My code is as follows:
EnemyShip…

Harry Allen
- 91
- 9
-2
votes
1 answer
Where to download Pylons reusable apps
I've learnt some basic in Django.. and there is lots of Django reusable apps available for use.
But how about Pylons? Where to download Pylons reusable apps?

Captain
- 4,797
- 4
- 16
- 6
-2
votes
1 answer
Creating web api to make calls to another web api
What I would like to do is create a web api that makes calls to facebook api. It this possible or is there any other way?
The reason I want to this is because I would like to allow android/ios apps to make calls to my web api which calls the…

Hereok
- 41
- 4
- 12
-2
votes
2 answers
Architecture of iOS project
In iOS generally we follow MVC project structure but it makes our view controller very massive.
I seen many Github projects but there is no such example which makes my view controller small, modular code, reusable code and many more…

ROCKING-XCode
- 3
- 1