Hi All
Is there a way that we can drag text or images onto the desktop itself from within another application?
Say for example there is some text in my app, and the user wants to drag it right onto the desktop, and be able to move it around and edit it right on the desktop... Would this be possible at all?
Thank you :)
I mainly use C...
The LDC D compiler for LLVM can inline indirect function calls under some circumstances if it can prove that the target is statically known. Here's a toy example (in D) of where this might happen:
void main() {
uint num;
void incNum() {
num++;
}
auto myDelegate = &incNum;
myDelegate();
}
In this case, ev...
I'm experimenting with particle swarm optimisation and am trying to determine the best approach for the following simple scenario:
Optimizing a 1-dimensional function (i.e. particles are moving along a single line)
The function to be optimised can be sampled at any point on the line
The "value" sampled for each position is very noisy
T...
Our business currently revolves around the development of a library, which can be used in a wide spectrum of industries (desktop, mobile, web and embedded). At the moment we only have customers within the desktop and web world and we already see that we are basically having to duplicate our code across multiple languages (c#, java and c+...
I am interested in developing a new SQL-based RDS which can generate prototype CRUD-oriented 4GL code which can then be easily customized. So I am looking for opinions, suggestions, etc. in what features should a new RDS have?
I have looked at several products. FileMaker is more or less the type of product I'm looking for, but it's no...
It's Sunday, time for a round of code golf!
Challenge
Write the shortest source code by character count to determine if an input number is a "happy prime", "sad prime", "happy non-prime", or "sad non-prime."
Input
The input should be a integer that comes from a command line argument or stdin. Don't worry about handling big numbers, ...
I've been noticing answers on stack overflow that use terms like these, but I don't know what they mean. What are they called and is there a good resource that can explain them in simple terms?
...
Does anyone provide an 3rd party API that does time zone conversions? I'm thinking of doing it for a site, just to make it easier to handle all the intricacies. It is a multi-zone scheduling kind of applicaiton and time zones need to be handled perfectly.
I dont think timeanddate.com does it, but does anyone else? Reliabily?
...
I have always used streams, printf, string(x) or whatever the language in question offered to convert numeric types to a string or back. However I have never really considered how this is actually done. I searched around on Google, but all the results are just to use those varies methods, and not how the conversion is really done behind ...
i.e. Multi-language messages, screen captions, currency/date formats, etc.
...
I'm working on a simple board game using Appcelerator Titanium for iPhone (javascript - not that it matters for this question really).
My problem isn't really language-specific, it's more of a general programming and math question.
I have a grid of "cells" that is 10 columns by 10 rows (100 cells). It's a board game, like checkers/drau...
Short question: Given a point P and a line segment L, how do I find the point (or points) on L that are exactly X distance from P, if it guaranteed that there is such a point?
The longer way to ask this question is with an image. Given two circles, one static and one dynamic, if you move the dynamic one towards the static one in a str...
This is how the system works:
I have a catalog of items. An guest user can choose to add an item from the catalog to what we call the inquiry bin. The system keeps track of the items added to the inquiry bin for that particular session. The user can delete items from the bin.
I was wondering what may be the most optimal way of storing ...
I often have the following scenario: in order to reproduce a bug for reporting, I create a small sample project, sometimes a maven multi module project. So there may be a hierarchy of directories and it will usually contain a few small text files. Standard procedure would of course be to create a zip file and send that. But on some maili...
Which presentation patterns do you think Ext JS favors or have you successfully used to achieve high testability and also maintainability?
Since Ext JS component instances usually come tightly coupled with state and some sort of presentation logic (e.g. format validation for text fields), Passive View is not a natural fit. Supervising P...
Our unit tests fire off child processes, and sometimes these child processes crash. When this happens, a Windows Error Reporting dialog pops up, and the process stays alive until this is manually dismissed. This of course prevents the unit tests from ever terminating.
How can this be avoided?
Here's an example dialog in Win7 with the...
Background
With respect to cryptography in general, the following advice is so common that it may even be platform and language-agnostic.
Cryptography is an incredibly complex subject which developers should leave to security experts`
I understand and agree with the reasoning behind this statement, and therefore follow the advice when...
Is there a difference between message-passing and method-invocation, or can they be considered equivalent? This is probably specific to the language; many languages don't support message-passing (though all the ones I can think of support methods) and the ones that do can have entirely different implementations. Also, there are big diffe...
In every web project most of the time the code is just being re-use. From the drop-down navigation, Rotating Header to CSS Grids. This process makes your workflow more faster and more efficient. I'm wondering how do people organized those scripts? Where do you store it? How do you break it down into category (javascript,css,php etc.)? so...
People often comment that a program can legitimately respond to undefined behavior by deciding to reformat your hard drive. However, in practice undefined behaviors in most languages do something rather unsurprising, for example:
Fail (e.g. crash, throw an exception, or otherwise interrupt execution).
Refuse to compile. Yeah, that ...