Questions tagged [code-reuse]

The use of existing software, or software knowledge, to build new software

875 questions
0
votes
1 answer

How do I adapt Django ForeignKey to a reusable app?

I have written a carousel plugin for Django-CMS which displays screenshots. The underlying model has some carousel-related parameters (height, animation style etc), and a ForeignKey to ScreenshotGroup: class ScreenshotGroup(models.Model): name =…
Racing Tadpole
  • 4,270
  • 6
  • 37
  • 56
0
votes
2 answers

c# asp.net Centralized UI Development

We have a lot of websites with common functionality developed by 3 persons, in the business logic we use a common library project (in a shared directory) so we all use the same functions. This way the corrections and improvements are shared for the…
VSP
  • 2,367
  • 8
  • 38
  • 59
0
votes
1 answer

Sharing classes between Xamarin.Android and ASP.Net MVC 4

I have created a solution with 3 projects in Xamarin Studio: A ASP.Net Server with POCOs, a Shared Library Core and an Android Project but referencing the shared library project on the Android side fails with Incompatible Target Framework. What can…
Machinarius
  • 3,637
  • 3
  • 30
  • 53
0
votes
1 answer

Android: Implementing a reusable HTTP Async Method

I've been searching but I do not find any implementation of a method that allows to make an HTTP post request receiving both the URL and the data as parameters of the function. I mean, all the samples I've found are tailored for a specific set of…
user2304118
0
votes
1 answer

C# code re-use public class Foo method parameters

I was hoping someone could help me with a problem. I am attempting to make a new class of Type: public class Foo whose only method's job is to iterate through another classes' properties. There are about 20 classes with a varying amount of…
DisplayName13579
  • 229
  • 1
  • 2
  • 6
0
votes
1 answer

How can I improve my code reuse by utilising delegates?

I am writing a class which utilizes a USING statement to connect to the task scheduler on a server and "does things"; like enable/disable a task, start and stop etc. I want to improve code reuse, perhaps by using delegates, but I'm not sure how to…
Tom Pickles
  • 890
  • 10
  • 26
0
votes
4 answers

Reuse a Java Package across different Projects

I'm a Java developer using Eclipse and Maven. There are some modules I created in a project that I'd like to reuse in my future projects. Is there any standard way to accomplish this using Maven? I don't like the idea of including classpath in…
Shuo
  • 4,749
  • 9
  • 45
  • 63
0
votes
1 answer

Ember namespaces creating reusable apps

Hi I am new in ember I tried to solve my self but no success. Take a look at code: // works window.App = Em.Application.create(); window.Core = Em.Namespace.create({ Beta: Em.Namespace.create() }); App.Router.map(function() { …
carlitux
  • 1,217
  • 10
  • 14
0
votes
5 answers

Using unknown dll in a c# project

I have got a dll from another program on my computer. According to its name it could have the functionality that I need for my own c# project. It seems to be also made with c#. Is it possible to find out the functions in it and use them?
Markus
  • 19
  • 3
0
votes
1 answer

Reuse function multiple times in jQuery Draggable

I'm using jQuery UI Draggable and I've got various points which the user can drag about, with the top/left position of every point showed in the respective results divs beneath (this will show either the original starting position of each point if…
Duncan
  • 37
  • 1
  • 5
0
votes
1 answer

Binding to observable created inside custom binding

I am trying to encapsulate the creation of an observable inside a custom binding, much like isValid of knockoutjs-validation, but without extending the binding because this property in the future will be the result of another binding that records a…
0
votes
2 answers

Search the available Java classes on Internet?

These days lot of Java code is available on internet and probably whatever class you want to write, someone has already written it in some project. In a simple e.g if I want to create an Address bean with fields like streetName, streetNumber,…
Arsal
  • 919
  • 3
  • 11
  • 19
0
votes
1 answer

Building a javascript app shared across node.js and client side

I am used to cross platform dev. On the C/C++ side it's simple, but I'm stuck with a problem when using javascript. I want to be able to reuse code from my web-service on the client-side. Currently node.js requires me to write my program in a most…
Coyote
  • 2,454
  • 26
  • 47
0
votes
1 answer

Decorate re-using another decorator's implementation

I've implemented a memoize decorator, which allows to cache a function. The cache key includes the function arguments. Similarly the cached decorator caches a function, but ignores the arguments. Here is the code: class ApplicationCache…
hsk81
  • 792
  • 8
  • 15
0
votes
1 answer

Integrate C library with Java, Ruby, Node, Python, Go, .NET

Status Quo For a project of mine I need a client library that communicates with my API for every major programming platform. Currently I implemented just one (Java) and was thinking 'I don't want to do this 8 times (or hope someone else will)'. The…
stephanos
  • 3,319
  • 7
  • 33
  • 47