instruction stringlengths 34 19.9k |
|---|
When learning about these tools, I (naively) thought that mapping about the business space could be front loaded by doing it only once and refering to those diagrams for each project within a single business unit. However, I am finding that each situation is calling for it's own set of diagrams to properly communicate... |
I'm not sure if what I'm after even exists or if it doe's im looking for the wrong thing.
I'm after a framework/application/SDK that allows me to build a desktop application with a HTML/CSS/JavaScript based interface yet still allow for more complex OS interaction with a programming language such as Python (im also fa... |
I'm looking into delving into a bit of custom OS work (and yes I understand that doing any development at the DE level or lower on an OS is extremely complex and not a light thing to undertake, curiosity is driving this though), I'm in the research phase right now, digging around and learning by example from the source... |
I am working in a Python project that I want to release under the GPL3 license. This project has one file that uses the BSD lxml library .
I really need to put reference of the BSD license in the file where I use the library? Or just the GPLv3 of my project covers the licenses restrictions.
Library:
http://lxml.de
Lic... |
I find header files to be useful when browsing C++ source files, because they give a "summary" of all the functions and data members in a class. Why do so many other languages (like Ruby, Python, Java, etc.) not have a feature like this? Is this an area where C++'s verbosity comes in handy?
|
I've been reading about software licensing as I feel that I'm at a stage now, where I should probably have some sort of a license associated with my code.
What I am looking for is a copyleft (weak or strong) license that basically is very liberal. So I'd like the license to allow anybody to do anything with the code/pr... |
I asked this question on Stack Overflow and it was closed as off-topic. I'll ask it here hoping it will do better.
This might sound silly, but bear with me. I've been working a lot with intervals and dates lately. One question that bothers me: is a day really 24 hours long? I'm interested by the answer both from a theo... |
I'm finding it hard to solve the problem and was hoping that someone could help me with the solution or at least give me a search term to use for problems like this one.
The generalized problem: I have a set of numbers (e.g. [1,2,3]) and a an array of sets (e.g. [1,4,5],[4,2,3],[6,7,8],[2],[1,3]). What I need to do is ... |
One feature I miss in from functional languages is the idea that operators are just functions, so adding a custom operator is often as simple as adding a function. Many procedural languages allow operator overloads, so in some sense operators are still functions (this is very true in D where the operator is passed as a... |
I've written several unit tests for an already existing DatabaseOpenHelper class. I covered the creation scenario and migration from old schema to new one. Unfortunately, I don't feel that my tests are good. For example, for DB creation I check that SQLiteDatabase. execSQL() was called three times (we have three tables... |
I have an open source project for mydomain.com which requires connections to a database (...as is tradition). What is the standard practice for allowing others to work on the site, without giving them full access to the database's credentials?
For example: If I have a connect.php page that connects to the database. I d... |
I'm new to GitHub and VCS in general. I've been programming in various languages for years, but I've always worked solo on custom projects (no public releases). I recently started using a jQuery UI widget I downloaded from GitHub in a project I am working on. The repo is no longer maintained by the original author. Ano... |
Although this is a gamedev project, the question is about general OOP practices, so I believe it goes here. Here's the problem:
(note: I will call any equivalent of real-world physical objects "entities" from now on; e.g. a rock in the game is an entity)
A specific class:
class Character
{
public/private CharacterInven... |
Recently I have been reading online about eXtreme programming and agile practices. I wish to adapt them. However most of my code is all in PHP which is the normal CRUD type web applications. Moreover I user web framework like CodeIgniter, which also abstracts a lot of the core features.
To sum up, how can I implement t... |
I have written an open source and cross-platform C++ File Library which have exception and error codes. Exceptions can be disabled when the program is running. In that case, the user have to check the error codes. Of course, when exception throwing is enabled, error code won't be returned because exception is thrown be... |
I looked at it in my field of work, which is film and pretty much every software we use comes with python as a scripting language: http://en.wikipedia.org/wiki/List_of_Python_software That made me assume it's the most popular.
How did Python become popular as a scripting language? Especially as an embedded language int... |
I’m trying to “conceive” the business logic of this website that has many activities, that the users can build their “combo” and get discounts depending on their choices and how long they are willing to pay for their plan (1, 3, 6 and 12 month plans).
I’m having a hard time trying to come up with a solution, while keep... |
Suppose there are two threads, which communicate by asynchronously sending data messages to each other. Each thread has some kind of message queue.
My question is very low level: What can be expected to be the most efficient way to manage the memory? I can think of several solutions:
Sender creates the object via new.... |
I have an open source project that uploads files to DropBox among several file hosts. Right now I am screen scraping for DropBox. To use their API, I have to hardcode a SECRET KEY provided by them to me for OAuth authentication. But I'm afraid that the key won't be secret if it is visible plainly for anyone to see.
It ... |
I have a set of loadable data decoders for a specific type of data and a stream to read containing data. Now I want the program to select the correct decoder in a reliable way so I want to use a trial-and-error algorithm. It seems resonable to create a decoder and connect it to the stream using a constructor:
// C++ co... |
In your opinion, do you think it is a waste of time to make checks that you know there is no possible way of it being there/not being there, or would you just put it there just in case there is a bug or something? For example, below checks to see if a button is visible, then music is playing, but there is no way for t... |
If a project is dual-licensed GPL & BSD, should there be one LICENSE file with the text of both licenses? Or two separate files, one for each license?
And I think I should put a copyright/license comment at the top of each source file. How should that comment indicate the dual-licensed status of the project?
|
On the internet, I've come across this question:
Classify the Hashing Functions based on the various methods by which the key value is found.
with answers like
Direct method
Subtraction method
Modulo-Division method
Digit-Extraction method
Mid-Square method
Folding method
Pseudo-random method
which I find strange. ... |
Possible Duplicate:
I’ve inherited 200K lines of spaghetti code — what now?
Not long ago my company placed me in a team that deals with some of the most complex bugs that are in production. The thing is that almost all of these bugs are in legacy applications I am having a really difficult time understanding and deb... |
First, does anyone know a specific advantage of Google App Engine for Python Apps?
Is there some advantage over Heruko or Appfog?
And about the database API?
Now, what about the limitations?
Are there any factors that make you think twice about using GAE?
|
Michael Perry states in his Pluralsight course on Provable Code (transcript subscription only) that:
[T]he burden of proof rests with the caller
In a code contract, why must the burden of proof rest with the caller and not the method of the class that is being called? Is this a preferred convention or does it have a ... |
I'm looking at plupload for some upload features on a website I'm developing. Now plupload is GNU GPLv2 licensed and that implies that all derivative software should also be GPL licensed (right?). Therefore I run the plupload through my minifier, the single minified js file will violate the license, and upon request, I... |
I mean something along the lines of:
public interface Dimensioned {
int getWidth();
int getHeight();
}
and
public interface Positioned {
int getX();
int getY();
}
There are a lot of standard java classes that have exactly those methods-- notably Component and all of its subclasses as well as Dimensio... |
The name mangling schemes of C++ compilers vary, but they are documented publicly. Why aren't linkers made to decode a mangled symbol from an object file and attempt to find a mangled version via any of the mangling conventions across the other object files/static libraries? If linkers could do this, wouldn't it help... |
Is there some standardized or widely accepted algorithm for picking up operators in shift/reduce conflicts in LALR parser? The question is naive, my problem is not with implementing my solution, but implementing the solution is already widely used.
For shift the operator is the next input token, for reduce, it depends ... |
I'm trying to figure out the best way to handle custom errors in my application.
Option 1:
if(expr) {
} else {
$_SESSION['error'] = "Some message describing the error";
}
Option 2:
if(expr) {
} else {
$_SESSION['error'] = 2;
}
In option 1, the same error might be recycled in multiple situations. If I ever dec... |
I was using a popular music package (Ableton Live) when I opened the legal section of the helpfile and saw that the program contained code licenses that appeared to be both free as in freedom and free as in beer. I cannot find an online copy, alas, but if necessary I can list the licensed packages.
As far as I can see ... |
I'm having a hard time understanding the difference between an emulation virtual machine and a language vm. I started with the research and implementation of an emulation virtual machine. Primarily emulating quite old 16-bit architectures.
I want to get the basics down for a language virtual machine. Are both systems ... |
I'm a bit confused about the difference between nominal and structural type systems. Can someone please explain how they differ?
From what I understand:
Nominal: Type compatibility is based on type name.
Structural: Type compatibility is based on the type structure, e.g. in C if 2 variables are struct types with diffe... |
I would like to experiment with threads on a multi-core processor, e.g. to create a program that uses two different threads that are executed by two different processor cores.
However, it is not clear to me at which level the threads get allocated to the different cores. I can imagine the following scenarios (depending... |
Should every piece of code put online have a licence with it, or should it explicitly mentioned that it is in the public domain?
I'm writing a simple python script that will take a project euler problem number and save a file with the question text as comment. As I was creating the directory and initializing git I adde... |
I've read a couple of articles (example) that consider the classic
for (int ...... size() .... i++) loop bad practice when iterating through for example vectors in stl. Instead the recommended why is to use vector iterators, i.e. begin, end, etc.
Why is that?
|
After watching this talk on REST, Reuse and Serendipity by Steve Vinoski, I wonder if there are business cases in greenfield projects for (XML-)RPC-ish setups, that REST could not solve in a better way.
A few RPC-Problems he mentions:
Focus on language (fit the distributed system to the language, not the other way aro... |
Despite increases in screen size and resolution, many sources still suggest that code be limited to 80 characters per line. I realize than there are many different opinions on this subject, but I wonder whether there are any standards bodies or influential firms that use other limits (120 characters is a common alterna... |
I have a couple of exam questions for my compilers class and wanted to check if my solutions are correct.
The first question is:
Consider a language in which numbers start with an optional minus
sign, followed by one or more decimal digits, followed by an optional
decimal point. If the number contains a decimal po... |
I have the following question taken from a compilers course exam:
Show that the following grammar is ambiguous.
S = XcY
X = a
Y = b | Z
Z = bW
W = d | ϵ
I drew the following tree:
Am I correct in thinking it is ambiguous because acY can end up at acb (one of which is followed by an epslion) following different paths... |
I've just had to switch out an ORM and it was a relatively daunting task, because the query logic was leaking everywhere. If i'd ever had to develop a new application, my personal preference would be to encapsulate all query logic (using an ORM) to futureproof it for change. Repository pattern is quite troublesome to c... |
How do you evaluate arbitrary math expressions using temporary variables instead of a stack? What I'm talking about is translating an expression into an array of simple operations- each that change one variable based on the second argument.
An example list of operations might be:
=
+=
-=
*=
/=
Notice how each operati... |
Consider an existing project that is dual-licensed GPL + either MIT or BSD.
Since it's dual-licensed, when I fork, can I pick one license in the fork? Or do my forked files need to continue to be dual-licensed?
It sure would be simpler to track only one license.
|
I read the hardware requirements of WCF in a book and two of them are the following ones:
A DVD-ROM drive
A 1024 × 768 or higher resolution display with 256 colors or more
Why is there a requirement for the screen resolution, or to have a DVD drive?
Perhaps, this requirement is necessary for Visual Studio to work. A... |
I find that the encapsulation required by OO has me frequently passing paramenters down the line from parent to child to great grandchild to second grand nephew once removed (not actually that bad). But inevitably in the process, and especially if graphics are involved there will be garbling the by the third iteration ... |
I've read about Template Method Pattern but I'm not sure about one thing.
The steps (methods) of an algorithm are supposed to be in the template method. In the case my template method's algorithm is about 2 completely different tasks that I would like all my objects to perform, let's say the one is drawing and the othe... |
Why does the compiler store constant values in the assembly metadata?
Are they directly embedded to Intermediate Language code from the assembly metadata?
|
I need something that represents a queue in F#.
The queue will be filled with items once, and (as the application progresses) items will be taken from this queue and moved to other lists.
Should I use the Queue class in .NET, or should I avoid it, and use the native lists in F# instead? Is there a better solution?
Why ... |
In my team we have been working on a firmware for a product. The product was released some years ago but we still implement new features in the firmware and regularly provide a new firmware for our customers. Recently we have developed a new product which use the same firmware as the first one. Of course, we had to cha... |
Imagine a scenario as follows: Lets say you have a central computer which generates a lot of data. This data must go through some processing, which unfortunately takes longer than to generate. In order for the processing to catch up with real time, we plug in more slave computers.
Further, we must take into account the... |
CodeIgniter has a very nice feature called a Profiler, which displays information at the foot of a page, information such as GET, Memory, POST data. It also shows database queries and how long they took to run which I find very useful.
I have recently taken over a legacy PHP application and it would help a lot to see w... |
I had recently read a paper 'Aspect-Oriented Programming' by Gregor Kiczales and others, and found there the loop fusion example.
Here is a definition of the loop fusion from the paper
…the loop fusion composes by fusing the loops of those primitive
filters that have the same loop structure and that are direct
neighbo... |
The problem occurs while doing TDD. After a couple of test pass, the return types of some class/module change. In a statically typed programming language, if a previous mocked object was used in the tests of some other class and was not modified to reflect the type change, then compilation errors will occur.
For dynami... |
I have a product with two separate applications. The core of the product lives in the database (oracle) and runs according to a schedule. The other is a client application (currently ASP.NET MVC3) used to manage the database application. There are three levels of validation going on; client, server-side, and database... |
I have an MIT-licensed project that used to include a GPL JavaScript library which has since been removed.
Is there any legal necessity to rewrite the revision history to completely remove this code?
|
I need to find the time complexity in terms of Big Oh notation for the following program which computes the factorial of a given number: The program goes like this:
public int fact(int n){
if (n <=1)
return 1;
else
return n * fact (n-1);
}
I know that the above program uses recursion but how to derive the t... |
In designing an API that provides an event listening interface, it seems there are two conflicting ways of treating calls to add/remove listeners:
Multiple calls to addListener will only add a single listener (like adding it to a set); can be removed with a single call to removeListener.
Multiple calls to addListene... |
I am working on debugging my mobile application. There is a specific requirement/issue that I am having related to a drag and drop touch interface on an iPad. I am at the trial and error phase of trying to figure out how to fix this (meaning I have no idea how to fix the issue I'm seeing).
The only way I have been ... |
I am building a tutoring application that can be used to draw objects and then one is able to drag them around. I would like to know what is the best thing to do when someone clicks on an object and starts to drag it.
I was told I should "lock" it - prevent it from being grabbed by someone else at the same time and bei... |
So I have a javascript program that currently gets random points, it generates a random x,y,z value around the center point, within the radius r
var maxArms = 3;
var i = 0;
var color = [];
for(var arm = 0; arm <= maxArms; arm++) {
var perArm = (numStars/maxArms);
var perPoint = Math.ceil((r/10)/5);
... |
I am eager to know what information is checked by the online companies to confirm that the card is yours?
If a programmer has to implement this functionality, how can he access information like address of the client which is not written on the debit card? Thanks
|
I've recently been hired for a project that involves working with and around several third-party "enterprise" systems. Due to what I imagine would be the astronomical cost and effort required to build a sufficiently faithful replica of the production environment, the prospect of having a real development environment se... |
Recently I've found myself chafing at the limitations of document indexing engines. I was developing a small website that needed some fairly robust searching capabilities but due to their hardware constraints I couldn't deploy a Lucene-ish solution (such as Solr or ElasticSearch, like I normally would) to handle this n... |
This subject is long time in the making for me and it particularly took off when I was researching bootloaders for computers and consumer electronics, which, I will note, differ drastically. I've learned how ancient and inflexible x86 hardware is and just how much the structure of software is constrained by it. Example... |
If an OSS project is not backed (for example, by the Apache Foundation), how is the OSS license upheld?
My specific scenario is this: if I create an GPLd mobile application with a non-commercial transformations clause, what's to actually stop someone from re-releasing it as "Pro" and charging for it?
I assume the owner... |
So my question is this:
Is there any easy way for a single developer to release an app on iOS and Android?
I am a web developer that primarily plays in PHP, Node, Ruby, AS, and JS. I have dabbled a tiny, tiny bit in Objective-C and Java. Basically I am looking for a good way to release a fairly simple app on both Andro... |
Is there a more common name for a "Blittable" data type? In my software there is a distinction between a variable sized structure and a fixed size structure that has a similar behavior to "blittable" but I have only seen the name used in Microsoft software.
|
I'm trying to lead a charge for re factoring our rather bloated controllers.
We currently have a BaseModel from which all our other models inherit. The BaseModel contains things common to all pages, such as the page title, css files needed, current user.
Each constructor has a private method to construct a particular V... |
I have been programming for about a year and I am really interested in data analysis and machine learning. I am taking part in a couple of online courses and am reading a couple of books.
Everything I am doing uses either R or Python and I am looking for suggestions on whether or not I should concentrate on one langua... |
I've been reading about Developer (or Programmer) Anarchy, which seems to be billed as a post-Agile development methodology. I found a few resources on it (1, 2) but it doesn't seem to be a lot out there.
I was wondering if anyone had any good resources where I could find out more about it _ how to implement it, pros... |
A colleague and I have run a Kanban board at 2 places of work now, introducing a kind of scrum-ban agile/lean process into the team. Helping us move towards more flow orientated work and continuous releases.
I just wanted to ask your advice, that when a task is peer tested or tested by the test team further down the bo... |
Assume we have a method that validates an object before saving it to a DB. It returns back KVP something like:
public KeyValuePair<bool, List<FooErrorReason>> ValidateABar(Bar b)
{
var reasons = new List<FooErrorReason>();
if (string.IsNullOrEmpty(bar.Name))
{
reasons.Add(new FooErrorReason { PropN... |
I have an exam question that I am unsure of the answer. The question is:
In organisation X valid user names have the following structure. The
user name can be either the employee’s name followed by a colon and
then the department name or a string of one or more alphanumeric
letters consisting of lower case, uppe... |
I'm very new to python and (coming from Java) am trying to think in a "pythonic" way. I'm having trouble understanding how Django turns a function (or variable) name given in string to the actual function.
Example from Django tutorial: If we give:
list_display = ('question', 'pub_date', 'was_published_recently')
Dja... |
I am currently designing a web/mobile application the bulk of whose users will be distributed across the different U.S. time zones with a potential of scaling up to other countries and time zones as well
I have worked with several other globally used apps and noticed they all used datetime to record timestamps with the... |
Assume there is an HTTP server which accepts connections and then it has somehow wait for headers to be fully sent in. I wonder what is the most common way of implementing it and what are the rest pros and cons. I can only think of these:
Many blocking workers are good because:
It is more responsive.
Easier to introdu... |
In .NET Framework, localized strings are located in an XML file (or multiple files). Those files are part of the project and are committed to the source control as any other source code file. Usually, Visual Studio is used to display those files as a table and edit the localized strings.
I work in a small team on a pro... |
I have a simple C++ RPC that lets you have remote class instances that support live members (data structures) update as well as method calls. For example I had a class declared like this (pseudocode):
class Sum{
public:
RPC_FIELD(int lastSum);
RPC_METHOD(int summ(int a, int b))
{
lastSum = a + b;
... |
My company uses a mix of onsite and increasingly offsite contractors for development of websites and online applications.
Our platform uses a mix of open source software and libraries that we've made a number of modifications to over the years. Some of the modified software is licensed GPLv2 without the linking except... |
I've seen it stated several times that AOT can run some more expensive optimizations that take too long to be used by a JIT. But I've never seen it stated what exactly these optimizations are. So I'm wondering, what are these optimizations?
|
The General Question
What are the differences between algorithms using data structures and algorithms using databases?
Some Context
This is a question that has been bugging me for some time, and I have not been able to come up with a convincing answer for it.
Currently, I am working on strengthening my understanding ... |
Why is it that when I try to make an array of ArrayLists: ArrayList<Integer>[] arr=new ArrayList<Integer>[40]; there is an error and java does not allow this?
Is there a reason related to java's implementation of generics, generics in any language, or something arbitrary?
|
The wikipedia articles are too advanced for me to understand, could someone give me a simple explanation please?
|
Background
I have a business question regarding web-based software licensing. A number of web sites offer software as a service for various APIs. A good example is Google's Custom Search API. The process to use web services typically resembles:
Account. User creates an account.
Server. User defines the IP address(es) ... |
I gave up on programming a little over a year ago when I kept hitting this wall. I am revisiting the subject because I want to create basic Android application. But I feel that my limited knowledge will not suffice.
Here is my problem.
I have read a few books and watched video tutorials on C#/Java, followed examples, ... |
ROM - Read Only Memory
Does this term mean the memory which should only be read and not written to , or the memory which can only be read ?
"ROM in PC's and laptops are usually seperate chips in the motherboard where BIOS is present (Please correct me if I am wrong) . Can they be overwritten (I guess we can) ?
When we ... |
During a recent code review I was asked to put default cases in all the files wherever switch block is used, even if there is nothing to do in default. That means I have to put the default case and write nothing in it.
Is this the right thing to do?
What purpose would it serve?
|
I've basically stared to do the following when creating a REST service:
HTML is requested
service returns the desired web page but without the requested "resource", eg. data
web page contains JavaScript that issues AJAX request to the same service (different content-type)
service then returns the actual data (JSON) an... |
Could Ruby on Rails have been created in another language like PHP, or are there some functions in the Ruby language that make the difference?
|
We're trying to move our project documentation process from Google Documents to a set of self-hosted Git repositories.
Text documents are Git-friendly enough, since we usually do not need any fancy formatting, we'll just convert everything to, say, multimarkdown with an option to embed LaTeX for complex cases.
But spre... |
I'm to write an event correlator module for the device we produce. When a fault occurs the resulting avalanche of logs about derivative conditions from various modules is readable only to a person skilled in the task - a layman will be utterly lost. The event correlator is supposed to solve this problem - find root cau... |
Lately there have been some kind of revolution against singletons, but is there something wrong with them if they are stateless?
I know the overuse talk and all... this applies to everything not just singletons.
|
I want to apologize in advance if my headline is not specific enough, but I think this is a general question, although I have a very concrete example:
In my team we maintain a test specification which we use every time we release software. The specification is written in Word and, as a consequence, we occasionally have... |
I presume it's that way so it could be extended with custom algorithms, but wouldn't it be more convenient to apply, let's say, factory method pattern here and avoid the whole NoSuchAlgorithmException thing?
Something like:
MessageDigest.getMD5Algorithm();
or
MessageDigest.getInstance(DigestAlgorithmFactory.getMD5Al... |
I have just started reading C++, and I came across a term "Null Terminated String", I read about it but couldn't understand what it actually stands for.
I also want to know what is the difference between a c-string(also referred as "Null terminated String") and a c++ string.
|
Let's say I have a product that has different features, or different feature access depending on things (i.e Premium User, Beta, Demo, Logged-in User, etc..).
What's the best way to organize a system to where it's not a set of static checks (i.e a bunch of if statements, for example)?
The platform isn't important, I'm ... |
How to represent rules for a rule engine as objects?
A rule would be
if (booleanExpression(input)) then a chain of generic actions" else next rule
...where the generic actions might be e.g. passing the input to a different chain of rules, returning a conclusion (terminating analysis with result), or gathering additi... |
gdb implemented support for reverse debugging in 2009 (with gdb 7.0). I never heard about it until 2012. Now I find it extremely useful for certain types of debugging problems. I wished that I heard of it before.
Correct me if I'm wrong but my impression is that the technique is still rarely used and most people don't ... |
I'm trying to do research on these css preprocessors.
Are there any advantages of using sass over less as a css preprocessor? Factors that i'm looking for include community size, software project maturity, etc.
I know there was another question related to this, but it was not constructively written and closed.
Update
L... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.