reusability

Other uses of version control than for code?

Seeing this: http://www.suckless.org/wiki.html. A wiki based on Mercurial. Are there any other non-code related use to version control? Is there any other projects that uses version control tools inside instead of programming their own specific solution? ...

Can you reuse fragments of XML (in some kind of variables/references way)?

I am using SLD to style output from my geoserver. I have couple types of objects to be displayed. Each type have different icons, but text description is generated from the same information (text field in the database). I cannot use object_type as image name because you cannot use variable in image name (or I do not know how to do it...)...

Code reusability - App_Code or BIN or UserControls?

I recently had a discussion on another forum with another developer and the topic was Code Reuse in ASP.NET. The stated scenario was that he needs to update code frequently on Production servers during server uptimes, and this results in Session getting reset for all users. He is avoiding putting shared code or classes into the App_Code ...

silverlight - reusing components

I am trying to create some reusable components in Silverlight2. The difficulty comes when my components are using templates/styles that are shared with other components. From what I know, in silverlight you can add the style/template in the component itself (not good enough due to duplicate styles) or in the main app file (this does n...

How do you structure your reusable libraries?

How do you organize your code so that it can easily be ported across business projects without carrying unnecessary bloat? For example (in .Net), let's say you have the following namespaces: namespace Computers - Hardware - Motherboard - GPU namespace Monitors - Display - Mirrors namespace Peripherals...

define animations and triggers as reusable resource?

Is there a way to define an animation somewhere in xaml (eg. as a resource) once and then reuse it multiple times? I have a lot of independent brushes across differnt datatemplates that independently need to start the same kind of animation based on a datatrigger. Now since it seems that an animation has to define an Storyboard.TargetNam...

how to Request a resource without requesting a webPage in Asp.Net Application ?

We have a Web Application (WebApplication A) which is in place and serving fine, we are working on another WebApplication which will use the Engine of Existing Web Application (WebApplication B) to some extent. Problem: WebApplication A responds when a http request is made for a resource, like LatestPost.aspx, which passes it down to ...

Factors that improve code reusability

Which principles, code qualities, practices, aproaches, language or framework features help you to reuse effectively functions, classes etc in wider range of cases. All of the situations are interesting: either you can modify both implementation and interface of the code to enable/improve reuse, or only implementation, or nothing at all....

How reusable should ViewModel classes be?

I'm working on a WPF application, and I'm structuring it using the MVVM pattern. Initially I had an idea that the ViewModels should be reusable, but now I'm not too sure anymore. Should I be able to reuse my ViewModels if I need similar functionality for a WinForms application? Silverlight doesn't support all things WPF does - should...

Java: reusable encapsulation with interface, abstract class or inner classes?

I try to encapsulate. Exeption from interface, static inner class working, non-static inner class not working, cannot understand terminology: nested classes, inner classes, nested interfaces, interface-abstract-class -- sounds too Repetitive! BAD! --- Exception 'illegal type' from interface apparently because values being constants(?!) ...

Vimrc: how to reuse code and definitions for differnt file types?

I have defined my own file types using vim. For example I have: .classNotes .reportJotNotes .homework These file types are defined in .vim files: ~/.vim/syntax/homework.vim ~/.vim/syntax/reportJotNotes.vim ~/.vim/syntax/homework.vim Many of these things have several of the same code in them. Ie they all have this for titles: sy...

What is the best WebControl to create this

current output wanted output current code public partial class test : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) populateData(); } private void populateData() { List<temp> ls = new List<temp>(); ls.Add(new temp { a = "A...

How is my approach to reuse view logic in my project?

Aim To implement a proper and efficient view architecture for my project (with maximum reuse of repeated units) About my project My project involves classes taken by tutors and packs published by tutors. No framework has been used but object orientation and class hierarchies are present for model, controller part. I have the followin...

minimize 'n' number of javascript functions into one function in jquery.

I have 'n' number of javascript functions in javascript which nearly gets an element and sets its display property. function ShowDivforassignclick() { document.getElementById("FollowupDiv").style.display = 'block'; document.getElementById("datatable").style.display = 'block'; } function HideDivforassignclick() { document.get...

Good Reusable, centralized AJAX component based on jQuery

I ofetn find myself writing the same code in jquery for ajax stuff. Still i can't find a good Reusable, centralized AJAX component based on jQuery... Note: One similar question i had asked before Reusable jquery ajax requests but it had some issues. ...

splitting a list in jQuery - conscious of memory and reusability.

I'm trying to write a function in jQuery that will split lists - or really, any element that has children - that is conscious of memory use and is general enough to be widely reusable, but I'm having trouble resolving these against one another. For the sake of argument (and to keep the code on point) let's say I'm trying to split the li...

Reusing Android rows with iPhone-like CellIdentifiers?

On iPhone you have something like this: static NSString *Celldentifier = @"Section1_Cell"; UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier: CellIdentifier]; where the CellIdentifier is used to dequeue cells of a specific 'type' of cells. So if you have more than one sections in a tableview and ...