instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
Routines can have parameters, that's no news. You can define as many parameters as you may need, but too many of them will make your routine difficult to understand and maintain. Of course, you could use a structured variable as a workaround: putting all those variables in a single struct and passing it to the routine....
stackexchange/codereview
Is there a way to hide the text limit line in netbeans 6.5?
stackexchange/codereview
Looking for good techniques to justify "great than normal" machine for developers. The company I work for buys the same underpowered $500 dollar systems for everyone, and looking for ways to prove ROI or arguments to use. Sorry, I didn't say this in the initial question, the stack is VS 2008, SQL 2005/2008. As dutie...
stackexchange/codereview
I need to detect whether my application is running within a virtualized OS instance or not. I've found an article with some useful information on the topic. The same article appears in multiple places, I'm unsure of the original source. VMware implements a particular invalid x86 instruction to return information about ...
stackexchange/codereview
Hiya I am working on an FTP client, can someone tell me the difference in speed and efficiency for using WebRequest and sockets (direct network streams) to download and upload files on the FTP server. (Our files will be video streams.) I am using C#3.5.
stackexchange/codereview
Not sure what exactly is going on here, but seems like in .NET 1.1 an uninitialized event delegate can run without issues, but in .NET 2.0+ it causes a NullReferenceException. Any ideas why. The code below will run fine without issues in 1.1, in 2.0 it gives a NullReferenceException. I'm curious why does it behave d...
stackexchange/codereview
Is it possible to copy a single file to multiple directories using the cp command ? I tried the following , which did not work: cp file1 /foo/ /bar/ cp file1 {/foo/,/bar} I know it's possible using a for loop, or find. But is it possible using the gnu cp command?
stackexchange/codereview
I have a berkeley db file (*.bdb) which is created by the C implementation(python bsddb module). Is it possible to read this file by a pure java implementation of Berkeley Db? I tried to read it using berkeley db java edition (je) but could not. je throws out an exception saying that it could not detect the berkeley da...
stackexchange/codereview
Where can I find a free, very quick, and reliable implementation of FFT in C#? That can be used in a product? Or are there any restrictions?
stackexchange/codereview
I'm new to Maven so I may be missing something obvious, but I've got a maven project and when I try to "mvn package" this project it fails with ERROR BUILD ERROR INFO ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Missing: ---------- 1) org.apache.maven.wa...
stackexchange/codereview
Does anybody know a way with JavaScript or CSS to basically grey out a certain part of a form/div in HTML? I have a 'User Profile' form where I want to disable part of it for a 'Non-Premium' member, but want the user to see what is behind the form and place a 'Call to Action' on top of it. Does anybody know an easy way...
stackexchange/codereview
I want to return all application dates for the current month and for the current year. This must be simple, however I can not figure it out. I know I have 2 dates for the current month and 90 dates for the current year. Right, Left, Outer, Inner I have tried them all, just throwing code at the wall trying to see what...
stackexchange/codereview
I'm slowly moving all of my LAMP websites from mysql_ functions to PDO functions and I've hit my first brick wall. I don't know how to loop through results with a parameter. I am fine with the following: foreach ($database->query("SELECT * FROM widgets") as $results) { echo $results["widget_name"]; } However if I...
stackexchange/codereview
I am not the most experienced GUI programmer, so bear with me here. I have a custom list view. I would like to be able to drag a row from the ListView to another control on a form. I know how to catch events that are fired when an object is dragged to a control, but I am not sure how to make a row itself draggable. ...
stackexchange/codereview
I need to either find a file in which the version is encoded or a way of polling it across the web so it reveals its version. The server is running at a host who will not provide me command line access, although I can browse the install location via FTP. I have tried HEAD and do not get a version number reported. If I ...
stackexchange/codereview
I have used fork() in C to start another process. How do I start a new thread?
stackexchange/codereview
I'm trying to consume a SharePoint webservice from ColdFusion via cfinvoke ('cause I don't want to deal with (read: parse) the SOAP response itself). The SOAP response includes a byte-order-mark character (BOM), which produces the following exception in CF: "Cannot perform web service invocation GetList. The fault retu...
stackexchange/codereview
I'm refactoring some code currently implemented in stored procedures to use LinqToSql (for use in training). Is it possible to use SQL functions in a linqToSql Query?
stackexchange/codereview
I have some code that uses the shared gateway pattern to implement an inversion of control container. I have several hundred NUnit unit tests that exercises the code that uses this IOC. They all work (on my machine!) but I am concerned that these tests might fail under load. I seem to remember that NUnit (and MSTest...
stackexchange/codereview
I need to set a dependency property on a control (Slider.Value) in my code without it triggering a ValueChanged event (since I set the value, not the user). What is the best way to handle this situation in WPF? For clarification, what I am trying to do is hook up WPF sliders to a WinForms User Control. Currently in my...
stackexchange/codereview
I have heard this concept used frequently, but I don't have a really good grasp of what it is.
stackexchange/codereview
Does anyone know if IE6 ever misrenders pages with hidden divs? We currently have several divs which we display in the same space on the page, only showing one at a time and hiding all others. The problem is that the hidden divs components (specifically option menus) sometimes show through. If the page is scrolled, rem...
stackexchange/codereview
Can you suggest an asp.net 3.5 hosting provider with continuous integration (cctray – nant builds) and source control facilities (svn)? My requirement would be something like this: I checkin to a svn branch (say trunk) on the hosting provider space. CruiseControl.NET on the server fires off a build. I see success/...
stackexchange/codereview
Oracle database 11g. What is the easiest way to set up a full nightly database backup to a network drive (ie drive on another computer)?
stackexchange/codereview
I have an app where I would like to support device rotation in certain views but other don't particularly make sense in Landscape mode, so as I swapping the views out I would like to force the rotation to be set to portrait. There is an undocumented property setter on UIDevice that does the trick but obviously generate...
stackexchange/codereview
I've got a Java client that needs to access a remote database. It is the goal to hide database credentials from the user and not hardcode any credentials within the code. Therefore, the database access will probably have to be on the server side. I'm restricted to use Ibatis as a data abstraction framework. Apart from ...
stackexchange/codereview
My company unwittingly switched from cvs to subversion and now we're all wishing we had cvs back. I know there's tools to migrate history and changes from cvs to svn and there's no equivalent to do the reverse. Any suggestions or ideas on how to do this?
stackexchange/codereview
I want to change/animate the Foreground property of a custom button control template depending on the control's state. Pre-RC0, I set the Foreground of the ContentPresenter, gave it an x:Name, and referenced it in the VisualStateManager transitions. Now, ContentPresenter no longer has a Foreground, since it doesn't inh...
stackexchange/codereview
How would one structure a table for an entity that can have a one to many relationship to itself? Specifically, I'm working on an app to track animal breeding. Each animal has an ID; it's also got a sire ID and a dame ID. So it's possible to have a one to many from the sire or dame to its offspring. I would be incl...
stackexchange/codereview
A project I'm working on will pull XML from a web-server and build a data store from it. The data will have certain core fields but needs to be extendable... for example I have a and later might want to have which adds extra fields. In the Flex app, I don't want the central data store to be working on XML objects or ...
stackexchange/codereview
Is there any IDE for coding mono on windows platform?
stackexchange/codereview
I create a TextArea in actionscript: var textArea:TextArea = new TextArea(); I want it to have a black background. I've tried textArea.setStyle("backgroundColor", 0x000000); and I've tried textArea.opaqueBackground = 0x000000; but the TextArea stays white. What should I do?
stackexchange/codereview
I'm exploring various options for mapping common C# code constructs to C++ CUDA code for running on a GPU. The structure of the system is as follows (arrows represent method calls): C# program -> C# GPU lib -> C++ CUDA implementation lib A method in the GPU library could look something like this: public static void Map...
stackexchange/codereview
I am going to be starting a javascript reporting engine for my website, and have started some prototyping using MooTools. I really like being able to do things like this: function showLeagues(leagues) { var leagueList = $("leagues"); leagueList.empty(); for(var i = 0; i<leagues.length; ++i) { var l...
stackexchange/codereview
I have a pdf file.I need to find all the hyperlinks available in that file and then make change on those links. I am using C# and I'd rather not to use a third party tool!
stackexchange/codereview
Is there any way to change the default tab size in a .NET RichTextBox? It currently seems to be set to the equivalent of 8 spaces which is kinda large for my taste. Edit: To clarify, I want to set the global default of "\t" displays as 4 spaces for the control. From what I can understand, the SelectionTabs property r...
stackexchange/codereview
I am trying to use a DynamicResource in Storyboard contained within a ControlTemplate. But, when I try to do this, I get a 'Cannot freeze this Storyboard timeline tree for use across threads' error. What is going on here?
stackexchange/codereview
I know this is somewhat of a server question, but I wanted to ask anyways in case someone has done this before. I have a web service that is on our internal 172.x.x.x subnet and a web server that is on our internal 10.x.x.x subnet. The webserver needs to hit the 172 web service, but is unable to route there. The real...
stackexchange/codereview
In Ruby-on-Rails, this is called a "polymorphic association." I have several Commentable things in my application, the tables for each are below: Post id | title | text | author (FK:Person.id) | ... Person id | name | ... Photo id | title | owner (FK:Person.id) | path | ... I'd like to add a Comments table as follow...
stackexchange/codereview
Unfortunately, sometimes the only way to debug a program is by going through its long log files. I searched for a decent log viewer for a while now, and haven't found a real solution. The only program that seemed to be most appropriate was Chainsaw with its Socket connector but after a few short uses the program prove...
stackexchange/codereview
Recently I have started playing with jQuery, and have been following a couple of tutorials. Now I feel slightly competent with using it (it's pretty easy), and I thought it would be cool if I were able to make a 'console' on my webpage (as in, you press the ` key like you do in FPS games, etc.), and then have it Ajax i...
stackexchange/codereview
I have to create a C program which will run on Linux server. It will take information from Oracle database, create a local file and then copy that file to Windows server. I know how to create a local file on Linux server. But what is the way to copy it to windows server from C?
stackexchange/codereview
I have a web server built in Delphi, and I'm trying to consume its web services on Java (I'm using Eclipse IDE) by creating a Web Service Client through the Eclipse wizard. The Web Services Explorer recognice the WSDL file, but when trying to create the client, the wizard says there's an "unexpected attribute" and does...
stackexchange/codereview
I would like to create a Crystal Reports report using pre-existing LINQ classes that live in a different project than where the report lives. I can't find a way to do this. I'm using VS2008. Whenever I expand the "Project Data" tree, I see only classes in my current project. The "History" tree shows me the last 5 cl...
stackexchange/codereview
I'm trying to generate some code at runtime where I put in some boiler-plate stuff and the user is allowed to enter the actual working code. My boiler-plate code looks something like this: using System; public class ClassName { public double TheFunction(double input) { // user entered code here } ...
stackexchange/codereview
I've got a windows form in Visual Studio 2008 using .NET 3.5 which has a WebBrowser control on it. I need to analyse the form's PostData in the Navigating event handler before the request is sent. Is there a way to get to it? The old win32 browser control had a Before_Navigate event which had PostData as one of its a...
stackexchange/codereview
If I drag and drop a selection of a webpage from Firefox to HTML-Kit, HTML-Kit asks me whether I want to paste as text or HTML. If I select "text," I get this: Version:0.9 StartHTML:00000147 EndHTML:00000516 StartFragment:00000181 EndFragment:00000480 SourceURL:http://en.wikipedia.org/wiki/Herodotus <html><body> <!--St...
stackexchange/codereview
Is anyone using or has anyone evaluated OPF3 as an ORM (.NET)? How does it stack up against EntitySpaces or Subsonic? One thing about OPF3 I like in my evaluation so far is that it is very easy to customize. Since it binds database fields to object members using attributes, you do not need to use any code generation t...
stackexchange/codereview
How do I easily undo a git rebase? A lengthy manual method is: checkout the commit parent to both of the branches create and checkout a temporary branch cherry-pick all commits by hand reset the faulty rebased branch to point to the temporary branch In my current situation, this works because I can easily spot commit...
stackexchange/codereview
I'm trying out the recorder of the latest Selenium IDE Firefox extension on win32/ff3. On one page, currently I have to hit Enter to go to the next page, but it's not on a submit button, it's captured manually. This is not picked up by the recorder. I know I can enter it manually myself after recording, but why isn't...
stackexchange/codereview
Trying to include ThickBox (from http://jquery.com/demo/thickbox/) in an ASP.NET application. Visual Studio is failing when I try to run the application with the error: js\ThickBox\jquery-1.2.6.min.js(11): error CS1056: Unexpected character '$' Using Visual Studio 2008 and jquery 1.2.6
stackexchange/codereview
I've been trying to call Page Methods from my own JavaScript code but it doesn't work. If I use jQuery AJAX I can sucessfully call the Page Methods, but I need to do this from my own JavaScript code because we can't use third-party libraries (we are building our own library). Whenever I use jQuery AJAX methods I get th...
stackexchange/codereview
I have a list of Date objects, and a target Date. I want to find the date in the list that's nearest to the target date, but only dates that are before the target date. Example: 2008-10-1 2008-10-2 2008-10-4 With a target date of 2008-10-3, I want to get 2008-10-2 What is the best way to do it?
stackexchange/codereview
I'm using the Scriptaculous library to slap an appealing UI on an application which helps an enduser build lists. Let's say its for pizza creation. To fill out an order, you drag a size of pizza from the pizza palette into the orders droppable. Once it is put in there, it gets replaced with a new div which is both dr...
stackexchange/codereview
Apple's documentation on -setPrimitiveValue:forKey: is vague in two ways when using it to manage to-many relationships. First they state: If you try to set a to-many relationship to a new NSMutableSet object, it will (eventually) fail. Eventually?! What does that even mean? Will it fail later during -[NSManagedObject...
stackexchange/codereview
F# is derived from OCaml, but what major items are missing or added? Specifically I'm curious as to whether the resources available for learning OCaml are also useful to someone who wants to learn F#.
stackexchange/codereview
How do I change the system-wide short date format in Ubuntu? For example, Thunderbird is showing dates in the DD/MM/YY format, and I would like to change it to MM/DD/YY or YYYY-MM-DD. The best information I can find so far is in this thread: http://ubuntuforums.org/showthread.php?t=193916 Edit: I want to change the sy...
stackexchange/codereview
I have this code: @PersistenceContext(name="persistence/monkey", unitName="deltaflow-pu") ... @Stateless public class GahBean implements GahRemote { But when I use this: try{ InitialContext ic = new InitialContext(); System.out.println("Pissing me off * " + ic.lookup("java:comp/env/persistent/monkey")); Iterator e ...
stackexchange/codereview
I've been working with Perl long enough that many of its idiosyncracies have become second nature to me. When new programmers join our group, they frequently have little to no experience with Perl, and it's usually my task to train them (to the extent necessary). I'd like to know what to focus on when training a prog...
stackexchange/codereview
I've seen a lot of questions around that use improperly the expression "C/C++". The reasons in my opinion are: Newbie C and C++ programmers probably don't understand the difference between the two languages. People don't really care about it since they want a generic, quick and "dirty" answer While C/C++ could somet...
stackexchange/codereview
The app uses DLLImport to call a legacy unmanaged dll. Let's call this dll Unmanaged.dll for the sake of this question. Unmanaged.dll has dependencies on 5 other legacy dll's. All of the legacy dll's are placed in the WebApp/bin/ directory of my ASP.NET application. When IIS is running in 5.0 isolation mode, the app wo...
stackexchange/codereview
In chapter 2, the section on bitwise operators (section 2.9), I'm having trouble understanding how one of the sample methods works. Here's the method provided: unsigned int getbits(unsigned int x, int p, int n) { return (x >> (p + 1 - n)) & ~(~0 << n); } The idea is that, for the given number x, it will return the...
stackexchange/codereview
As a follow up to an earlier question that attracted a whole zero answers, I'm wondering about the possibilities of allowing a web server (apache) to write to its own document root (Linux), in order to dynamically create meta-redirect files. Of course, this sounds incredibly dangerous, and I'm wary of going the whole h...
stackexchange/codereview
Is there a Visual Studio plugin/tool/snippet for .NET that is similar to commonclipse for the java eclipse platform that automatically generates the ToString(), Equals(), GetHashCode() methods for you?
stackexchange/codereview
Is it possible to apply DRM forward lock to windows mobile applications?
stackexchange/codereview
I am debugging a large, complex web page that has a lot of JavaScript, JQuery, Ajax and so on. Somewhere in that code I am getting a rouge request (I think it is an empty img) that calls the root of the server. I know it is not in the html or the css and am pretty convinced that somewhere in the JavaScript code the r...
stackexchange/codereview
I'm looking at creating a server in python that I can run, and will work as an SSH server. This will then let different users login, and act as if they'd logged in normally, but only had access to one command. I want to do this so that I can have a system where I can add users to without having to create a system wide ...
stackexchange/codereview
Is it possible to integrate my PHP web-based ecommerce application with Quickbook Online Edition? When I make a sale on my web site, I would like to be able to make the corresponding journal entry in my accounting books. Note, I'm referring to Quickbook Online Edition, not the desktop software.
stackexchange/codereview
I wonder if there is a way to limit the WPF framerate within a process? i.e. I do not want to limit a single animation's framerate, but the global framerate for my whole application. I think I've seen something like this before but I can't find it anymore.
stackexchange/codereview
With ASP.NET's view engine/template aspx/ashx pages the way to spit to screen seems to be: <%= Person.Name %> Which was fine with webforms as alot of model data was bound to controls programatically. But with MVC we are now using this syntax more oftern. The issue I have with it is quite trivial, but annoying either...
stackexchange/codereview
Ok, this is a bit of a cheeky question. I want to build a simple text editor (using my own text mode screen handling). I just want a good example of data structures that can be used to represent the text buffer, and some simple examples of char/text insertion/deletion. I can handle all the rest of the code myself (file...
stackexchange/codereview
I have written a watir script that downloads files. One of the files it downloads has a .dcf extension. Months ago, on my machine, I changed a setting somewhere so that .dcf files prompt for download ("Do you want to open or save this file?") instead of opening in the browser. This is the behavior that I desire. I am ...
stackexchange/codereview
I tried: DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(f); Node mapNode = getMapNode(doc); System.out.print("\r\n elementName "+ mapNode.getNodeName());//This works fine. Element e = (Element) mapNode; //This is where the erro...
stackexchange/codereview
I'm trying to map a ManyToMany relationships between 2 tables, both having composite primary keys LSFOCTB which primary key is composed of : LSFOC_CODSOC,LSFOC_CODLSC,LSFOC_CODFOC LSFORTB which primary key is composed of : LSFOR_CODSOC,LSFOR_CODLSC,LSFOC_CODFOR The table in charge of the ManyToMany relationship is :...
stackexchange/codereview
I have a c# .NET 2.0 application that has been running on W2K/IIS5 quite happily for several years. The sysadmin team are currently setting up a W2K3 box for the app, using the same install files, but are running into the dreaded "Could not load type..." error. The type in question is the class (i.e. code behind) for t...
stackexchange/codereview
I have a need to run a relatively large number of virtual machines on a relatively small number of physical hosts. Each virtual machine isn't doing to much - each only needs to run essentially one basic network service - think SMTP or the like. Furthermore, the load on each is going to be extremely light. Unfortunatel...
stackexchange/codereview
While working on SVG implementation for Internet Explorer to be based on its own VML format I came to a problem of translation of an SVG elliptical arc to an VML elliptical arc. In VML an arc is given by: two angles for two points on ellipse and lengths of radiuses, In SVG an arc is given by: two pairs of coordinates f...
stackexchange/codereview
This is probably a really stupid newbie-sounding question to you developer type people, but I'm at a loss :( I've been trying to learn how to use Subversion for keeping the history of my code, but I'm finding it pretty confusing. I read the 'book' that comes with Subversion, but I didn't find it all that helpful. I'm u...
stackexchange/codereview
Can you use the bash "getopts" function twice in the same script? I have a set of options that would mean different things depending on the value of a specific option. Since I can't guarantee that getopts will evaluate that specific option first, I would like to run getopts one time, using only that specific option, t...
stackexchange/codereview
This might be a similar problem to my earlier two questions - see here and here but I'm trying to use the _detail command to automatically click the link so I can scrape the details page for each individual event. The code I'm using is: require 'rubygems' require 'scrubyt' nuffield_data = Scrubyt::Extractor.define do ...
stackexchange/codereview
I am working on a project that requires a number of icons generated from a set of source images. I have a script that generates all the required images with judicious use of ImageMagick, although I have not found a suitable tool to package the images as icons. I have a set of png files (from dimensions of 16x16 up to ...
stackexchange/codereview
Where X is any programming language (C#, Javascript, Lisp, Perl, Ruby, Scheme, etc) which supports some flavour of closures. Some limitations are mentioned in the Closures in Python (compared to Ruby's closures), but the article is old and many limitations do not exist in modern Python any more. Seeing a code example...
stackexchange/codereview
I've written code for communication between my phone and comp thru TCP sockets. When I type out the code line by line in the interactive console it works fine. However, when i try running the script directly through filebrowser.py it just wont work. I'm using Nokia N95. Is there anyway I can run this script directly wi...
stackexchange/codereview
I've seen the other post about this, but is there a clean way of doing this in Haskell? As a 2nd part, can it also be done without making the function monadic?
stackexchange/codereview
Possible Duplicate: C#: How to enumerate an enum? The subject says all. I want to use that to add the values of an enum in a combobox. Thanks vIceBerg
stackexchange/codereview
Is there a way to get rid of the selection rectangle when clicking a link which does not refresh the current page entirely?
stackexchange/codereview
Given that Chrome and Safari use webkit has anyone yet found anything that renders differently on Chrome than Safari? Is there any reason at the moment to test sites on both, or would testing Safari be sufficient for right now?
stackexchange/codereview
Currently, primary keys in our system are 10 digits longs, just over the limit for Java Integers. I want to avoid any maintenance problems down the road caused by numeric overflow in these keys, but at the same time I do not want to sacrifice much system performance to store infinitely large numbers that I will never n...
stackexchange/codereview
I'd like all queries like http://mysite.com/something/otherthing?foo=bar&x=y to be rewritten as http://mysite.com/something/otherthing.php?foo=bar&x=y In other words, just make the .php extension optional, universally.
stackexchange/codereview
I have a class that has a Generic type "G" In my class model i have public class DetailElement : ElementDefinition Let's say i have a method like this public void DoSomething<G>(G generic) where G : ElementDefinition { if (generic is DetailElement) { ...
stackexchange/codereview
If I read or write to a file and receive a 33 or 32 error, I would like to log a message containing the name of the other process(es) that have the file opened. There must be a Win32 API I could use to get this info. Process Explorer displays it. Of course, Process Explorer also has info about all processes in memory. ...
stackexchange/codereview
I am a complete beginner trying to develop for FCKeditor so please bear with me here. I have been tasked with developing a custom plugin that will allow users to browse a specific set of images that the user uploads. Essentially the user first attaches images, then uses the FCKeditor to insert those images. So I have m...
stackexchange/codereview
Which is generally fastest when reading/comparing row info from a DataTable? 'assume dt as datatable' 'method 1' dim i as int32 for i = 0 to dt.rows.count - 1 .... next 'method 2' dim row as datarow for each row in dt.rows .... next And if there's a difference, in what circumstances does it pay to use one ove...
stackexchange/codereview
Everything I read about better PHP coding practices keeps saying don't use require_once because of speed. Why is this? What is the proper/better way to do the same thing as require_once? If it matters, I'm using PHP 5.
stackexchange/codereview
Is there an event like onLoad? just at closing the Site (onClose)?
stackexchange/codereview
The system consists of a hardware device and a PC. The PC runs a GUI that controls the hardware device. To test the device various test hardware is used that can be controlled by RS232 or GPIB. To automate this testing the test software would have to control the test hardware and interact with the PC GUI. What is the b...
stackexchange/codereview
I have an AdvancedDataGrid that uses customer grouping of data. Not all of the groups will be at the same level in the hierarchy, and groups can contain both groups and members. We have a sort callback, but it's not being called except for groups at the leaf-most levels. See code below for an example -- expand all of t...
stackexchange/codereview
I am trying to extract a certain part of a column that is between delimiters. e.g. find foo in the following test 'esf :foo: bar So in the above I'd want to return foo, but all the regexp functions only return true|false, is there a way to do this in MySQL
stackexchange/codereview
I have a HTML select list with quite a few (1000+) names. I have a javascript in place which will select the first matching name if someone starts typing. This matching looks at the start of the item: var optionsLength = dropdownlist.options.length; for (var n=0; n < optionsLength; n++) { var optionText = drop...
stackexchange/codereview
I'm creating a custom drag helper (in jQuery): $('.dragme', element).draggable({ appendTo: 'body', helper : custom_drag_helper, opacity : 0.5 }); I'm doing this because I want to sometimes clone and sometimes do the default functionality, i.e. drag the original element. function custom_drag_helper() { ...
stackexchange/codereview