3
votes
0answers
71 views

Monitor.Enter() when a thread is of highest priority

Background Okay, so let's say I have some high priority (ThreadPriority.Highest) thread t which needs to enter a critical region in order to consume some data. I will use the following code snippet ...
3
votes
0answers
58 views

How to manage (nightly) builds in repos for many platforms

at the moment I have one repo (git) for my project and I use branching techniques for development. This is a very new project and I wanted to get things right from the very beginning. I will create ...
3
votes
0answers
87 views

Generic request processing

I got a webservice that accepts multiple calls that require different handling and validation, using generics I've managed to create a common class that accepts a handler and a validator and it looks ...
3
votes
0answers
139 views

Why is a vertical bar used as the OR operator in so many programming languages?

The Vertical Bar Operator (|) is used in a variety of constants to mean OR in some way: C-style languages use a | b to mean bitwise OR of a and b, a || b to mean logical OR of a and b. Regular ...
3
votes
0answers
90 views

Finger Paint path gets huge over time and slows the app

So I am writing a Finger paint app. I have multiple color which user can select. I save the path and paint information inside an array. ArrayList<PaintPath> arrayPaintPath = new ArrayList<...
3
votes
0answers
107 views

Event driven programming in Haskell

I'm new to Haskell, so this is more a high-level conceptual question. I've read this: https://wiki.haskell.org/Real_World_Applications/Event_Driven_Applications and it has this: run :: Domain -> [...
3
votes
0answers
69 views

Is OAuth 2.0 ok for building a container of applications?

I need to create a container app which contains several apps (imagine something like iCloud): once I've been logged in, I can see all the apps by means of icons, click on them and use them (a new tab/...
3
votes
0answers
65 views

Merits of DI, Abstract Factory implementation review

I'm writing a brand new system and trying to stay true to the SOLID principles, specifically Interfacing and Dependency Injection. We are sticking closely to the Microsoft stack so we are using C# ...
3
votes
0answers
86 views

How to think about a schedule that pulls from a database as objects

I am working on a personal project using Python. I have been using version control to the best of my abilities and if you would like to check it out and run the app https://github.com/CodeAmend/old-...
3
votes
0answers
78 views

Determine equality of a DAG

Given a fairly traditional node class (below), whats the best way to implement equality on a given graph? If our node looks like this public abstract class Node{ private final Set<Node> ...
3
votes
0answers
104 views

How to efficiently query movies with characters via The Movie DB API?

I have a sort of whiteboard style question about efficiently querying The Movie DB API to find a list of characters in movies. My overall aim is to: Search for a movie by title (1 request) Look up ...
3
votes
0answers
140 views

Finite state machine menu design

I'm creating a FSM in python (it's a step sequencer and sample pad based on a Raspberry Pi 2). Right now there are two states and the third is the Menu. This is handled by a class System which ...
3
votes
0answers
162 views

Log with Application Insights only (NLog vs AI) in Asp MVC

I was going through several blog posts and stackoverflow and programmers and I am still a bit confused. You can install NLog (or some other logging lib) and start logging quite fast and then you can ...
3
votes
0answers
65 views

Generate quantity distribution of objects to reach goal for each attribute

The Problem Suppose we are given a variable-length list of objects containing a fixed-length list of positive decimal numbers as attributes. JSON Example [ {a: 0.1, b: 0.6, c: 0.0}, {a: 1.0,...
3
votes
0answers
127 views

Documentation of code review

In a project we have a rather formal code review, which is currently done manually and documented in Excel sheets and Word docs. We would like to improve the current code review process by ...
3
votes
0answers
61 views

In Perlin noise, why need vectors and how to use them exactly?

I'm reading this tutorial on Perlin noise: http://www.angelcode.com/dev/perlin/perlin.html which seems to be the clearest one but still not perfect. A lot of details are skipped and a lot of code ...
3
votes
0answers
78 views

Sharing identical events, with differing scopes, between client and server libraries, in a micro-service architecture

I have a shared user repository (id, name, e-mail, password, etc.) exposed as a REST service - and multiple independent web-sites accessing this REST service (from the back-end) as a means of sharing ...
3
votes
0answers
41 views

Is it OK to have a property of type COM object

I am developing a COM addin for Microsoft Excel, using VB.Net. I wrote a class to represent a worksheet that contains certain elements. Let's say for example it has a ListObject. I create a property ...
3
votes
0answers
55 views

Finite-difference approximation of the 2nd derivative operator matrix for a staggered grid

I'm working on a computational physics assignment and I was looking for some help as I've got stuck! The question is: Write a function to create the finite-difference approximation of the 2nd ...
3
votes
0answers
100 views

Tips for optimizing javascript code. a year's worth of Dates

I am playing around with the date object, i made a function that generates a bunch of dates, and applies some function on each date. For a month's worth, it is fine about 2.5ms on my pc, ff and ...
3
votes
0answers
372 views

Writing a Compiler - .reloc section of the COFF

I'm looking for a little bit of direction in writing a compiler. I've written in Common Intermediate Language, C#, and various other .NET languages; I've written my own Metadata Parser and now I'm ...
3
votes
0answers
51 views

Relationship between a mixin and its master invokation

I haven't studied Smalltalk or Strongtalk and am just trying to get an overview of the semantics of interfaces and polymorphism in O/O languages, particularly Dart. In the 2002 paper titled Mixins in ...
3
votes
0answers
152 views

How to distribute a number of elements in a bucket so that it is within a range?

I have 50 elements n1, n2, n3, ... , n50 and a limited number of buckets, say 5 buckets and each bucket can hold a range from, say 100 to 150 only (which is nothing but the sum of the elements in that ...
3
votes
0answers
697 views

Is it rational to convert protobuf into json to send it to a web server?

Protobuf is a good thing, it allows c++ devs to not bother with class serialization/deserialization, is fast and .proto format is very nice. It also allows automatic data validation. But the messages ...
3
votes
0answers
152 views

Web framework architecture with non-blocking I/O

There's been a lot of news in the enterprise world lately, specially in the web, and I've decided to build a small web framework on top of Netty to learn more about asynchronous programming and event-...
3
votes
0answers
177 views

Refactoring to avoid circular references

I'm working on an ASP.NET MVC solution that has two projects, WebUI and DAL. WebUI references DAL. DAL has the repository and context, while WebUI contains Authentication and Authorization classes. ...
3
votes
0answers
391 views

Fast fixed-size (256 bit) integer modulo/division

What is the fastest way to divide two 256-bit integers? They are represented as an array of 26-bit words, each stored in 32-bit integers. I have access to a 64-bit type if that's useful. It seems ...
3
votes
0answers
46 views

Update of user interface cycle

I am developing an App for iOS. In an attempt to avoid the pure MVC where everything is packed in the "Controller", I have added a Presenter layer and an Application Layer. In doing so I have come up ...
3
votes
0answers
105 views

Proper GIT repository usage that accommodates feature branches and parallel testing

After reading around I found that there were various git workflows being used but there aren't enough (or I just haven't found them yet) info on how to use git properly with having test builds. I was ...
3
votes
0answers
492 views

The best way to convert Dynamic SQL to C#/Linq while joining multiple tables

I am trying to find the best way to convert the following dynamic SQL snippet to C# / Linq. The question is complicated by the use of multiple tables within the dynamic SQL. I've examined the ...
3
votes
0answers
97 views

Updating an entity via a service layer

What's the best way to update an entity using a service layer? Performing a single, atomic action I can understand like BlogService.Publish(blogID) but what about editing multiple values which map to ...
3
votes
0answers
134 views

Smallest number of rectangles covering marked parts of grid

I have an N by N grid of cells, and certain blocks are marked: +--+---+---+---+ | | | | | | | x | x | | | | x | x | | | | | | | | | | | x | +--+---+---+---+ I would like to ...
3
votes
0answers
91 views

Method object creation in Python data model

I've been reading the article on the data model of Python on its Reference website, and have been confused about this part: When the attribute is a user-defined method object, a new method ...
3
votes
0answers
283 views

What algorithm is this?

I have some vague recollections from my algorithms courses, but nothing specific comes to mind. let S be a multiset of things we are interested in. As input, we get T, s1, s2, ... sn, all of which ...
3
votes
0answers
282 views

Oauth 2 store access token vs verifying on each call

Let's say my Server is both Authorization Server and Resource server My Client (for example mobile app) can authenticate in 2 matters: via Resource Owner Password Credentials Grant via ...
3
votes
0answers
271 views

Decoupling of Model and API (in an .net WEB API Project)

I currently have one separate project for my models, and one separate project for a API application that consumes this model. The intention of the separation is to avoid any outgoing dependencies from ...
3
votes
0answers
162 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
84 views

Adding new service to authenticated website

So I've created an API that I want to leverage to add some functionality to an existing web app. My current website authenticates users using SAML. What I'm looking to do is instead of moving the code ...
3
votes
0answers
131 views

Should I inject a data dependency into an Angular Directive?

I am currently implementing an AngularJS directive. It is fundamentally a reusable widget comprised of a select box and a table which populates based on the item in the select box. My point of ...
3
votes
0answers
387 views

How to avoid module dependency chain nightmare caused by transitive dependencies?

Many (most?) AngularJS folks seem to advocate for breaking AngularJS apps up into many modules. Brian Ford in his blog already states that packaging by layer (controller, service, etc.) is a "silly" ...
3
votes
0answers
95 views

Environment that enables variable constraint checking and creation

Currently I'm working on a system that enables users to add Tag's to available TagTypes on specific pages. For instance, we would have a TagType called "Installer" and the user wants his name ...
3
votes
0answers
461 views

Caching Strategy: WCF Buffer pooling and size

I am currently trying to understand the best configuration for caching. I am using Azure In-Role caching (currently Colocated, but Dedicated at a later point) in a Web Api 2 application in .NET 4.5.1....
3
votes
0answers
648 views

Is this Auto-Updating strategy for a program in C++ compiled with mingw32 for Windows correct?

I 've been thinking a lot on auto-updating, but wanted to check with you guys if you see any anti-patterns in my proposal: Context I'm coding a game in C++ and SDL, compiled in an Ubuntu (host) for ...
3
votes
0answers
266 views

When to use wide column stores instead of document based stores

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
293 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
136 views

How to make sure media are used only on authorised sites?

I have a video library that I need to publish for my clients. The clients need to be able to embed a player to their sites and play the videos. I need to restrict access to my clients only so that no ...
3
votes
0answers
159 views

Menu building pattern

I'm having troubles getting my head around the active-state handling of a menu when the menu isn't used for routing. I come from Drupal where the menu system handles the routing as well. so setting ...
3
votes
0answers
170 views

What's the canonical way to store translations of user data?

I've developed some software that allows my users to attach a blurb to some non-language specific information: Pseudocode model: item(): ID creationdate byline //Only one byline for the object ...
3
votes
0answers
1k views

What's the best way to expose a Model object in a ViewModel?

In a WPF MVVM application, I exposed my model object into my viewModel by creating an instance of Model class (which cause dependency) into ViewModel. Instead of creating separate VM properties, I ...
3
votes
0answers
630 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: ...

15 30 50 per page