All Questions
13
votes
0answers
648 views
How to implement a branch-and-bound in a functional programming language?
I am trying to write a branch and bound search on the set of all functions f: D -> R, where the domain size is small (|D| ~ 20) and the range is much bigger (|R| ~ 2^20). Initially, I came up with the ...
10
votes
0answers
157 views
Haskell build and artifact environment similar to Maven
I used to be a Java developer for a long time, but recently, I joined a Haskell team.
In the java world, if you have a large project,
with several teams working on it, a common approach is to use an ...
7
votes
0answers
120 views
Is there a performance benefit to using the method reference syntax instead of lambda syntax in Java 8?
Do method references skip the overhead of the lambda wrapper? Might they in the future?
According to the Java Tutorial on Method References:
Sometimes... a lambda expression does nothing but ...
6
votes
0answers
101 views
Is it common practice to transform requirement specifications into predicate logic for functional programming?
I've recently been assigned to work on a small project which is being implemented in Haskell. Coming from an OO/imperative background, I'm used to converting requirements/user-stories into use-cases ...
5
votes
0answers
36 views
Safest way to use and store User's third party credentials
I'm working on an add-in that will integrate git into the VBA IDE. I'm using the LibGit2Sharp library under the hood, which supports User name and password credentials, but not SSH Keys. I would use ...
5
votes
0answers
96 views
Clustering algorithm
I have a set of n elements (1,000 <= n <= 100,000) and I can compute the grade of similarity between each pair, that is a value from 0 (very similar) to 1 (very different). I would like to ...
5
votes
0answers
75 views
Does Optimistic Concurrency per object imply Serializability if a transaction will never span multiple objects?
Given a system which provides:
Optimistic concurrency control / versioning per object (using CAS - Check-and-Set)
Transactions that never need to span more then a single object.
Snapshot Isolation
...
4
votes
0answers
101 views
What's the best way to handle Windows API errors in response to system messages or when I have nowhere to return them to?
This is going to be a really stupid question and I hope it's fine for Stack Exchange at all, let alone just this part of it...
Right now, my custom Table control uses panic() functions that print an ...
4
votes
0answers
245 views
Find sequences in a big data set of integers
I am working on algorithm for solving the integer factorization problem.
My goal is to be able to recognize sequence in a big data set of integers.
This is my premise, it based on experiments.
The ...
4
votes
0answers
268 views
Why should ViewModel route actions to Controller when using the MVCVM pattern?
When reading examples across the Internet (including the MSDN reference) I have found that code examples are all doing the following type of thing:
public class FooViewModel : BaseViewModel {
...
3
votes
0answers
49 views
Are Secure Desktop and separate process enough for hiding sensitive information in RAM?
In my program, I have an encrypted database on the file system with a password. It is decrypted in RAM, and the sensitive data get spread out too much in RAM for mistake to be auditable easily enough. ...
3
votes
0answers
150 views
Why was the grave but not the acute accent included in ASCII?
While looking at the Unicode properties (code point, script, block, UTF-8 and UTF-16 encoding, etc.) of some characters, I stumbled upon major differences between ` ("GRAVE ACCENT") and ´ ("ACUTE ...
3
votes
0answers
214 views
Is obtrusive JavaScript required to support a feature of AngularJS?
I'll start by saying I'm just learning about AngularJS, and I was reading this article, which seems to advocate for obtrusive JavaScript as the right thing:
...
3
votes
0answers
66 views
Audit trail for Rails app
I am looking to add an audit trail to our Rails app. At the moment, I am trying to lock down my requirements and determine the appropriate software architecture.
Our website gets about one hundred ...
3
votes
0answers
119 views
How to test network connectivity API using TDD?
I'm currently trying to add TDD on my workflow. I fail to create tests where I can easily test a library that requires remote connections.
More precise, my program uses snmp4j library. Currently I'm ...
3
votes
0answers
111 views
Design an algorithm with network flow
Given a matrix A with 0 and 1 entries. Neighbours of a[i,j] are a[i-1,j], a[i+1,j], a[i,j-1] and a[i,j+1] (if exists any).
Tow neigbour entries are an Improper pair if they have not equal values.
if ...
3
votes
0answers
140 views
how does CC licenses (0,BY,BY-SA) affect proprietary/closed source applications?
I think this question is specific to indie developers be concerned about. Think about it as a "license clarification" or a "license practical use case".
I need to know how must be my project basic ...
3
votes
0answers
90 views
Is there a reasonable way for a typescript class to derive from a dojo/dijit class?
DefinitelyTyped has a dojo solution which uses named modules and may work with legacy dojo and explicit typing, but these declarations do not facilitate typescript import since there are no anonymous ...
3
votes
0answers
91 views
Why is the Jacobi method a good candidate algorithm to implement on a GPU?
I understand that GPU's has hundreds of cores that can handle thousands of threads all at once and that with the Jacobi iteration you're essentially using the same numbers over and over again to ...
3
votes
0answers
82 views
In a mutual credit network, how would you program an automatic jubilee?
A little explanation might be needed. I mean mutual credit the way that it's defined here:
a type of alternative currency in which the currency used in a transaction can be created at the time of ...
3
votes
0answers
209 views
OAuth shared Authorization server for multiple apps
At my shop we have a couple .NET Web APIs that use OAuth tokens for authentication. Currently, each web API is both authorization and resource server. Users authenticate to all of these APIs using ...
3
votes
0answers
140 views
How to pass control between sub-controller to parent controller in Java MVC Design Pattern?
I'm pretty new in Java, but I've done plenty of research and I know what MVC is. However, to implement MVC in Java was a difficult task. I followed this tutorial, which helped me to realise that the ...
3
votes
0answers
49 views
Evaluating concurrent application design approaches on Linux
Working on relatively low-speed hardware, I need to grab a snapshot of a rapidly changing datastream and then post-process the snapshot data and save it to disk.
I need help with designing the ...
3
votes
0answers
79 views
Incorporating custom Algorithm in SOLR-LUCENE , before Indexing?
CURRENT FLOW: I am using a custom algorithm(presently in php) to rank
the MYSQL records before INDEXING it to SOLR .
WHAT I WANT : Is it possible implementing this
ALGORITHM(may be in JAVA) inside ...
3
votes
0answers
64 views
Breaking a table over multiple lines in Sphinx
Lets say I have the following function with a docstring:
def foo(*args):
"""
do some fooness
+----------------------------+----------------------------------------------------+
| ...
3
votes
0answers
74 views
Directory access from PHP script
Introduction
I'm creating an Android app for webpage that runs on Joomla 1.5. Yes I know that it's an old version etc. but it's not my site and I can't do anything about it.
So basically I'm creating ...
3
votes
0answers
81 views
Mono: C call into managed with COM Interop
I am trying to design a managed library to implement -what appear to be- unmanaged VST3 plugins. The VST3 plugin interface is a C/C++ interface-based API that is compatible with COM (ref-counting, ...
3
votes
0answers
140 views
Which type of query do wide column stores optimize
I have some experience with document based stores (MongoDB and CouchDB) and I am interested in exploring wide column databases.
Based on my initial exploration I can grasp a basic understanding of ...
3
votes
0answers
427 views
How do I resolve $ref in a JSON object?
I have written a single page application that uses rest services to retrieve JSON objects. The JSON objects being returned are C# objects serialized using the Newtonsoft.JSON library. The returned ...
3
votes
0answers
401 views
Why does the .NET framework have no concept of classes as first-class types?
It's well known to those familiar with the history that C# and the .NET framework started out as essentially "Delphi rewritten to feel like Java," architected by the chief developer behind Delphi, ...
3
votes
0answers
75 views
Dealing with class optional dependencies
I am wondering how are you guys handling an optional class properties.
Let's say I have a product that can bud doesn't have to have a color property. Is that really the best way of doing that? Should ...
3
votes
0answers
108 views
Erlang function naming conventions
I understand the general Erlang conventions for functions are using snake case or camel case, but what about exported functions?
For example, say I have a gen_server module that defines a check to ...
3
votes
0answers
125 views
Splitting up a Rails/Ruby app onto multiple servers
We recently moved a large application to two machines, both running the same codebase.
I. Machine A
Web server for public facing application
Receives web hook call backs from our ESP
Handles a ...
3
votes
0answers
142 views
Passing Anonymous Type to a Bound Control
Generally speaking, I'm fairly opposed to the use of anonymous types in real-world code (except in LINQ and some other specific scenarios), but I'm looking right now at a situation where I need to ...
3
votes
0answers
280 views
Which patterns/architecture to apply for “Import Data, Process Data, Export Result”
I was wondering which architecture/patterns to choose for the following problem divided into three steps:
Import TestScript Description from File (e.g. .xls, .txt)
Process Described TestScript
...
3
votes
0answers
244 views
JavaScript Combination Inheritance Pattern
In the chapter of Professional JavaScript for Web Developers on OOP, Nicholas Zachas describes a JavaScript inheritance pattern which he refers to as combination inheritance. The basic idea is that ...
3
votes
0answers
46 views
API Server Client Setup
Suppose you have a setup where there is an API Server and all interaction revolve around the API. There is the admin, public and third party components that interact with the API server.
Suppose we ...
3
votes
0answers
102 views
Why do Haskell functors only have derived types in their target category?
In Haskell, the Functor typeclass functor is defined as follows (see e.g. Haskell wiki):
class Functor (f :: * -> *) where
fmap :: (a -> b) -> f a -> f b
As far as I understand ...
3
votes
0answers
50 views
Integrate NuGet Package Restore feature into checkout process
There are some situations where I have no internet connection and so I am forced to work offline. Usually it would look like this: I get connected, do a checkout from source control server, and move ...
3
votes
0answers
173 views
Do serialization functions belong in a model or a controller?
I'm developing an application where:
Models keep data as a multi-dimensional array, which are saved as-is to a MongoDB database. The model is used to provide methods to manipulate the data, and ...
3
votes
0answers
97 views
Do Rails Join Models Get Controllers?
I have a rails app where my users can buddy up with other users. Since that relationship can have a status (approved/rejected/pending), I decided to go with a join model (UserRelationship) so now I ...
3
votes
0answers
175 views
How can I make a universal construction more efficient?
A "universal construction" is a wrapper class for a sequential object that enables it to be linearized (a strong consistency condition for concurrent objects). For instance, here's an adapted ...
3
votes
0answers
305 views
MVVM - Master Detail interaction scenarios - Implementing when MasterVm has partial data, and Detail has to pull whole entity
I primarily work with .Net WPF MVVM applications. I've used several frameworks, MVVM Light, Prism, etc, and I've been able to break the implementation of CRUD MVVM into three scenarios.
Scenario 1: ...
3
votes
0answers
505 views
Redex and reduction strategies
I'm studying Types and Programming Languages, and have some trouble getting my head around the concepts of the 5th chapter, The Untyped Lambda Calculus.
Specifically, redex, reduction and the various ...
3
votes
0answers
190 views
Facebook authentication with an Authoritative Server for a Flash Game
I'm working on a multiplatform game in Flash. This game utilizes Photon Server for authoritative physics and user statistics tracking. I'm looking to leverage Facebook authentication as an alternative ...
3
votes
0answers
187 views
Help/suggestions for Parallel assembly line scheduling (Dynamic programming)
I am working on a problem similar to the assembly line scheduling by dynamic programming.The issue is that unlike the classic problem where we have predefined stations now I only have information ...
3
votes
0answers
294 views
Is this any form of service pattern, some other pattern, SOA or just an anti-pattern?
I'm going to set out a scenario/pattern I've encountered and then I have a few questions pertaining to it.
During an MVC request in a web framework (PHP, Laravel in my case), if I have an abstract ...
3
votes
0answers
137 views
Strategies to find memory leak in AIR app with native extension
Background:
I'm working on an Adobe AIR app that has many facets. I'm looking for strategies to find memory leaks.
Broadly speaking, the EXE contains an embedded JVM, and an AIR Native Extension for ...
3
votes
0answers
182 views
Understanding velocity update in Binary Particle Swarm Optimization
I am wondering how to interpret the velocity update in a Binary Particle Swarm Optimization (PSO). To recap the velocity update :
V(t+1) = V(t) + c1 * r1 * (XlocalBest - X(t))
+ c2 * ...
3
votes
0answers
140 views
Automatic Appointment Conflict Resolution
I'm trying to figure out an algorithm for resolving appointment times.
I currently have a naive algorithm that pushes down conflicting appointments repeatedly, until there are no more appointments.
...