instruction stringlengths 34 19.9k |
|---|
I need to add a certain feature to a module in a given project regarding time calculation. For this specific case I'm using Java and reading through the documentation of the Date class I found out the time is calculated in milliseconds starting from January 1, 1970, 00:00:00 GMT. I think it's safe to assume there is a ... |
If you are merging two or more database records from table X, that have a many-to-many relationship with table Y, how should you solve the problem of records in intermediate table Z that would violate one or more constraints as a result of the merge? Do you simply discard them or break off the transaction?
|
I have been following verification and validation questions here with my colleagues, yet we are unable to see the slight differences, probably caused by language barrier in technical English.
An example:
Requirement specification
User wants to control the lights in 4 rooms by remote command sent from the UI for each ... |
I have started my own OS application, I am hosting it on GitHub. My problem is that I push changes to the repository from more than one location so sometimes I want to work on it and sometimes I can't always finish something in time but I would still like to push it anyway so I can fetch it later from my other location... |
I have a rating engine (it is basically an algorithm) which when I started had no formal documentation. We have created a functional specification/decomposition which is our business level document but now I need something more technical (a technical specification).
What I am struggling to understand is what that docu... |
I have a real-world problem which I'll try to abstract into an illustrative example.
So imagine I have data objects in a tree, where parent objects can access children, and children can access parents:
// Interfaces
interface IParent<TChild> { List<TChild> Children; }
interface IChild<TParent> { TParent Parent; }
// C... |
I can deal with porting platform dependent functions. I have a problem that the compilers I tried on Linux (clang and g++) do not accept the following code, while the msvc++ compiler does:
template <class T>
class Base {
protected:
T Value;
};
template <class T>
class Derived : public Base<T> {
public:
void se... |
Sanboxing is listed as one of the many security features in html5 specification . Can someone explain what is meant by sandboxing? Does it relate to HTML only or to JavaScript also?
|
I have a requirement where there are 10 Rules to be applied on data in excel.
If Rule 1 and Rule 2 fails rest of the rules are not checked. But if Rule 1 and Rule 2 passes the rest of all the Rules should be verified and if any errors found- they should be logged. Is there any design pattern which I can use to keep thi... |
Where it is accepted that a language has to be Turing complete to be any good, is it actually possible to have a 'useful' programming language that isn't Turing complete?
I should clarify that this is quite specifically about 'programming' languages in the traditional sense, and not markup or query languages.
|
I am working with a company which designs and builds one-off machines. They have been 'dabbling' with hosted Dynamics CRM and Sharepoint (on different servers!) in an attempt to centralise their data and help colleagues collaborate more effectively across projects. They haven't used either system to their potential.
No... |
I am trying to help my friend by creating a part of his on-going project.
What I'm going to do is create a Java parser to break up the Java code into operators, parameters etc to build XML representation.
Next I want to create a code generator to convert the parsed java code to XML conforming to the schema I've created... |
> shutdown /?
> Usage: shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/f]
The windows cmd.exe command shutdown only documents forward slash / switches, but it accepts dash - switches as well. For instance, both work:
shutdown /s /t 0
shutdown -s -t 0
When was this added and why?
|
Consider this bit of code:
if (x == 1)
{
throw "no good; aborting" ;
}
[... more code ...]
Now consider this code:
if (x == 1)
{
throw "no good; aborting" ;
}
else
{
[... more code ...]
}
The two cases work exactly the same way. The first case has the advantage that you don't have to "encase" the rest of the c... |
I have a site that will have lots of images of large size. What is the best format that I should choose for displaying these images?
I need the website to load fast. I am jumbled with different formats of images like jpeg, png, gif, bmp, etc. Which to use in this case and why ?
|
It seems to me that in C++11 lots of attention was made to simplify returning values from functions and methods, i.e.: with move semantics it's possible to simply return heavy-to-copy but cheap-to-move values (while in C++98/03 the general guideline was to use output parameters via non-const references or pointers), e.... |
Possible Duplicate:
What books or resources would you recommend to learn practical OO design and development concepts?
I have been mostly a C programmer so far in my career with knowledge of C++. I rely on C++ mostly for the convenience STL provides and I hardly ever focus on good design practices. As I have started... |
It seems like for years they've just been given default styling and inline display. Is there a spec somewhere that has dictated this? I've looked over the RFC's but I'm not particularly good with RFC-ese, and I didn't notice anything anywhere.
For example
<body>
Some content <mycustomtag>something else</mycustomtag>... |
My company is creating a service in an Amazon Virtual Private Cloud. Without getting too much into the details, there will be about 5 different types of servers, and each type will need to be replicated based on demand. A bit of reading gives me the impression that we're going to want to use a config management tool li... |
I started as the analyst, talking to the client and jotting down requirements and all that jazz. Ended as the sole developer of the project.
The schedule is OK, but not OK for someone that don't know nothing about how to develop a WPF application, IMHO.
What can I do about it, tell program manager that she made a huge ... |
In C#.NET language: This style of coding is recommended or the one below it?
if (sheet.Models.Data is GroupDataModel)
{
GroupDataModel gdm = (GroupDataModel)sheet.Models.Data;
Group group = gdm.GetGroup(sheet.ActiveCell.Row.Index);
if (group!=null && controller != ... |
I am working on an application that requires the storage of location information such as city, state, zip code, latitude, and longitude. I would like to ensure:
Location data is accurate
Detroit, CA
Detroit IS NOT in California
Detroit, MI
Detroit IS in Michigan
Cities and states are spelled correctly
Californi... |
I am currently creating a library that is a wrapper for an online API. The obvious end goal is to make it as easy for others to use as possible. As such I am trying to determine the best approach when it comes to common parameters for the API.
In my current situation there are 3 (consumer key, consumer secret, and and ... |
Reading a recent question: Is it actually possible to have a 'useful' programming language that isn't Turing complete?, I've come to wonder whether non Turing-complete programming languages are considered programming languages at all.
Since Turing-completeness means a language has to have variables to store values as ... |
I'm building a Delphi application which displays a blueprint of a building, including doors, windows, wiring, lighting, outlets, switches, etc. I have implemented a very lightweight script of my own to call drawing commands to the canvas, which is loaded from a database. For example, one command is ELP 1110,1110,1290,1... |
So I have a method that's something like this:
-(BOOL)isSingleValueRecord
And another method like this:
-(Type)typeOfSingleValueRecord
And it occurred to me that I could combine them into something like this:
-(id)isSingleValueRecord
And have the implementation be something like this:
-(id)isSingleValueRecord {
... |
What policy do developers have when it comes to supporting earlier versions of Android? I still support , but this means that I am unable to use features such as the action bar. Over 40% of my users are still running versions below 3.0, so I feel somewhat constrained about this.
The problem is that 3.x was not very suc... |
When programming at work we now and then face a problem with visitors and module/project dependencies.
Say you have a class A in a module X. And there are subclasses B and C in module Y. That means that module Y is dependent on module X. If we want to implement a visitor pattern to the class hierarchy, thus introducing... |
I have been programming in python and Java for quite a number of years and one thing I find myself doing is using the setters and getters from Java in Python but a number of blogs seem to think using the dot notation for access is the pythonic way.
What I would like to know is if using dot to access methods does not vi... |
Suppose there are some methods to convert from "X" to "Y" and vice versa; the conversion may fail in some cases, and exceptions are used to signal conversion errors in those cases.
Which would be the best option for defining exception classes in this context?
A single XYConversionException class, with an attribute (e.... |
Problem Link - http://opc.iarcs.org.in/index.php/problems/EQGIFTS
It is Lavanya's birthday and several families have been invited for the birthday party. As is customary, all of them have brought gifts for Lavanya as well as her brother Nikhil. Since their friends are all of the erudite kind, everyone has brought a pa... |
I am working on two projects that will both implement a Webdav server backed by a MongoDB GridFS. In each case, there is the potential for the system to store tens of millions of files spread across thousands of hierarchical directories.
I can come up with two different ways of storing the directory structure:
As a "t... |
Let's imagine a data model with customers and invoices. There is a 1 to n relationship between a customer and its invoices. We uses an ORM (like Hibernate).
One can explicitely implement the 1-n relationship (using JPA for example) or not. If not, then one must do a bit more work to fetch invoices.
However, it is much ... |
I just asked a question on StackOverflow, but I'm thinking that a part of it belongs here, as questions about design pattern are welcomed by the faq.
Here is my situation. I have developed almost completely a native iOS app. The last section I need to implement is all the rules of a sport, so that's a lot of text. It h... |
I hear about modern C++ popularity and some talks about migrating back to C++ from C# or other C-like languages.
I know about C++11 features but I would like to hear your experiences, especially from developers who migrated from C# to C++.
More importantly, does Microsoft push developers to use C++? If yes, why?
|
Given below is an image of a basic PHP web server architecture:
Would someone please explain the several components available and how they interact?
I'm more concerned of how the PHP Core operates and relates to the other components, so feel free to elaborate on this point specifically.
This Diagram was taken from her... |
I've been assuming that F# includes the module keyword in addition to the namespace keyword due to backwards compatibility with OCaml. Is this the only reason for the inclusion of the module keyword or are there other reasons module was included?
|
Are there any well-defined conventions when programming in PowerShell?
For example, in scripts which are to be maintained long-term, do we need to:
Use the real cmdlet name or alias?
Specify the cmdlet parameter name in full or only partially (dir -Recurse versus dir -r)
When specifying string arguments for cmdlets do... |
I have about ten lists of numbers and some strings. Each list has about <= 30K lines. Each line on a list has a distinct number.
I need to build an efficient way of finding all the lines in each list that has the same 'control' number (or key for dB guys) and comparing what is in their string parts. I am writing this i... |
I want to implement a JSP, POJO, DAO and Servlet in my J2EE program. However, I don't fully understand how the relationship between these elements should be. Is the following (MVC) setup the right way to do it?
Main class creates servlet(controller)
Servlet has a DAO defined in its class
DAO has a POJO defined in its ... |
My team rarely does code review, mainly because we don't have enough time and people lack the energy and will to do so. But I would really like to know what people think about my code when they read it. This way, I have a better understanding how other people think and tailor my code accordingly so it's easier to read.... |
I'm the lead developer at a small company, working with C# and ASP.Net. Our team is small, 2-3 people, without much experience in development and design. I don't have the opportunity to learn from more senior developers, there is no one in my team to guide me and help me choose the best approaches, as I take care most ... |
In certain functions in GSL (GNU Scientific Library), some functions take a "workspace" environment as an argument. For example, gsl_poly_dd_taylor from this page. Why? Wouldn't it be easier for the function to allocate its own memory, or at least the same difficulty? I suppose that this allows the caller to specif... |
Are flag variables evil? Are the following kind of variables profoundly immoral and is it wicked to use them?
"boolean or integer variables that you assign a value in certain places then down below you check then in orther to do something or not, like, for example using newItem = true then some lines below if (newItem... |
The title might be seem vague, so let me tell you a little bit history what i am trying to clarify question.
I have been hired as a consultant for a corporate's small development division. The company also owns a couple of software development companies. My ex-manager runs a BI team, with reports, analyst and develo... |
I have a project and I want to use a ready-made script that is licensed under MIT in it. But using this script separately will be redundant.
So I've decided to merge my code and the MIT licensed script in the same file. (Let's say I'll modify, improve and/or add new features to it.)
I'm planning to sell this work on a ... |
My predicament:
I designed an app, written in Python, to read my mail and check for messages that contain a certain digital signature. It opens these and looks for keywords. If the message contains these keywords, certain related functions area executed on the computer. It is a way I can control my computer from my cel... |
The often provocative Chuck Moore (inventor of the Forth language) gave the following advice[1]:
Use comments sparingly! (I bet that's welcome.) Remember that program
you looked through - the one with all the comments? How helpful were
all those comments? How soon did you quit reading them? Programs are
self-documenti... |
I'm making a site which should (a) take information from the user in the form of files and forms, (b) take that data to the server to be run on a C application, and (c) take the result back and show it to the user. I was told to look for AJAX for the communication with the server. BTW, I'm using rails.
I'm trying to un... |
Suppose you have to rewrite an entire application using Agile methodologies, how would you do it?
I guess you could write a big bunch of user stories based in the behavior of your current system. And then implement them in small iterations.
But this wouldn't mean that we have the requirements UP FRONT??
Also, when wou... |
In order to stay relevant in the marketplace, I'm researching new business models for my software company. The open source model with paid support seems like a good fit for our product, but I have concerns about whether or not a paid support model is viable in an era where top-notch help is readily available for free ... |
I'm a high schooler and I am competing in an open source software development competition. It must be a desktop application that runs on either Windows or Linux. I have a great idea for the open source desktop app, and I wanted to know if I could take it farther and port it to the iPhone or Android platform and make mo... |
I'm working on some static libraries using visual studio 2012, and after building I copy .lib and .h files to respective directories to match a desired hierarchy such as:
drive:/libraries/libname/includes/libname/framework
drive:/libraries/libname/includes/libname/utitlies
drive:/libraries/libname/lib/...
etc
I'm th... |
In JSF is it ok to bind UI components to backing bean just to render messages or we should only bind when we need to do lot more than just rendering messages?
|
Once upon a time, I heard from someone
the only difference between programming languages is the syntax
I wanted to deny it - to say that there are other fundamental aspects that truly set a language apart from others than just syntax.
But I couldn't... So, can you?
Whenever I search Google for something like "differe... |
As per IEEE 12207, who has to perform Software integration testing (SOIPL): SW Testing team or SW Development team?
|
Guava has unit test cases automatically generated:
Guava has staggering numbers of unit tests: as of July 2012, the
guava-tests package includes over 286,000 individual test cases. Most
of these are automatically generated, not written by hand, but Guava's
test coverage is extremely thorough, especially for
co... |
I've been thinking quite a bit about how to do OOP in JS, especially when it comes to encapsulation and inheritance, recently.
According to Crockford, classical is harmful because of new(), and both prototypal and classical are limited because their use of constructor.prototype means you can't use closures for encapsul... |
What are the best ways of gathering information on events (any type) from the internet ?
Keeping in mind that different websites will present information in different ways.
I was thinking 'smart' web crawlers, but that can turn out to be extremely challenging, simply because of the hugely varied ways that different sit... |
Yesterday I came across this question: How can i call robocopy within a python script to bulk copy multiple folders?, and I though it might be a good exercise for multithreading.
I though of spawning as many threads as files needed to be copied, each routine having an exception handling system to prevent the whole copy... |
I'm now doing a lot of SQL development at my new job where as before I was doing Object Oriented desktop app stuff. I keep running across very large scripts (thousands of lines) and wanting to refactor in some way. I am seeing that SQL is a different sort of beast and it's probably fine to have these big scripts for th... |
The team consists of 3 people.
The method of development is Scrum.
The language of the project is C++.
The project will be under the control of the git system.
The start up budget is 0.
The following things have to be chosen:
Build and Version Numbering
Project documentation ( file with the most common info for ... |
A company releases a library with an open source MIT license.
If they wanted to, could they change the license to be very restrictive so competitors cannot use it?
What impact would this have on previous versions?
Meaning if on Nov. 1st they make it very restrictive to some other license, would all versions prior to No... |
Please bare with me, I want this to be as language agnostic as possible becuase of the languages I am working with (One of which is a language called PowerOn). However, most languanges support for loops and arrays.
Say I have the following list in an aray:
0x 0 Foo
1x 1 Bar
2x 0 Widget
3x 1 Whatsit
4x 0 Foo... |
I am developing a new set of API methods for carpooling/cab booking, so if a developer needs to develop an app or webportal for carpooling, he can call my JSON API. Basically making it easy for developers.
My API current has:
AddVehicle
AddJourney
SearchJourney
SubscribeToThisJourney(journey)
SubscriberList(journey) ... |
Keep getting confused about these two. Anyone care to explain the difference(s)?
|
Friend of mine said that not every interface is abstract. I haven't chance to discuss that with him but it get me thinking of not abstract interface in any type of language.
Is there a non abstract interfaces?
|
Recently I heard someone say they built a "SaaS" application. At first I thought "this guy knows something new", and I figured SaaS was some hyped enterprise framework or design pattern, but after looking up the SaaS Wikipedia page I realized it's similar in meaning to "web app".
What is the origin of the phrase "SaaS... |
Let's say you have an input file with many entries like these:
date, ticker, open, high, low, close, <and some other values>
And you want to execute a pattern matching routine on the entries(rows) in that file, using a candlestick pattern, for example. (See, Doji) And that pattern can appear on any uniform time interv... |
This question is not, "Why do people still use old programming languages?" I understand that quite well. In fact the two programming languages I know best are C and Scheme, both of which date back to the 70s.
Recently I was reading about the changes in C99 and C11 versus C89 (which seems to still be the most-used versi... |
Working on a C# WinForms program that is written in a MVC ( actually Model-View-Presenter) style and I want to add a few lines of code that is responsible for logging some events. Where should I write two or three lines of code that I need? Should I write it in the Presenter section?
To get an idea, here is some line... |
Apart from the differences in syntax, can Scala be considered a superset of Java that adds the functional paradigm to the object-oriented paradigm?
Or are there any major features in Java for which there is no direct Scala equivalent?
With major features I mean program constructs that would force me to heavily rewrite ... |
I'm mostly a Windows user but I do most of my development (essentially web development) using unix tools and software. I've been going back and forth between using a dedicated lubuntu virtual machine on Virtualbox and using some tools directly in windows (msgit, python, django), but none of these approaches is entirely... |
I posted this on stackoverflow but want to get your recommendations as well as a user on overflow recommended I post it here.
I'm going to say from the beginning that I am not a programmer, I have a cursory knowledge of different types of AI and am just a businessman building a web app.
Anyways, the web app I am invest... |
I always try to write easily readable code that is well structured.
I face a particular problem when I am messing around with something new. I keep changing the code, structure and so many other things. In the end, I look at the code and am annoyed at how complicated it became when I was trying to do something so simpl... |
Scenario
I have a single-page web app consisting purely of html, css, and javascript. After initial load and during use, it updates various views with data from one or more RESTful apis via ajax calls. The api calls return data in a json format. Each web api may be hosted on independent domains.
Question
During the aja... |
Looks like Microsoft is offering a special offer of 95% of the yearly subscription for the Phone Dev Centre (I didn't say anything about desperate).
What I was wondering is do you need a seperate account to publish to the Windows Phone app centre and the Windows App Centre?
Also I heard some horror stories about the ti... |
I am starting a software project that will be team AND community developed. I was previously sold on gerrit, but now Github's fork and pull request model seem to almost provide more tools, ways to visualize commits, and ease of use.
For someone who has at least a little experience with both, what are the pros/cons of e... |
I was asked by my customer to build a Facebook game. The game would be something similar to Mafiawars.com where the game is hosted on a server and run through a frame on Facebook.
The thing is after several days of negotiations with the customer and near the finalization of the requirements he mentioned something stran... |
I'm working on a system to allow multiple users to collaborate on an online project. Everything is fairly straightforward, except for keeping the users in sync. Each user has their own local copy of the project database, which allows them to make changes and test things out, and then send the updates to the central s... |
My current project is having a 'discussion' which is split down the middle- "this story is more complex than we originally thought, we should re-estimate" vs "you should never re-estimate as you only ever estimate up and never down".
Can anyone shed some light on whether you ever should re-estimate?
IMHO I'd imagine yo... |
I have a problem understanding some functionalities in IIS. Per example I want to know when do I use "Add application", "add virtual directory" or "add website".
Currently I have around 10 websites which are located in my wwwroot/websitename directory and they automatically appear under sites in IIS.
What is the best a... |
Given that GitHub provides GUI apps for both Mac and Windows, what are the benefits of learning to use git from the command line?
Currently I'm using their mac app to update my repositories, and so far it seems to cover my needs. What might I be missing out on?
|
I work within a team of developers. Everyone is making their changes without carrying too much if the same thing is already implemented in the codebase. This leads to classes constantly growing and to severe duplication.
I want to add line items to class definitions from which a developer could judge what this class ha... |
I have to sort a set of 100000 integers as a part of a programming Q. The time limit is pretty restrictive, so I have to use the most time-efficient approach possible.
My current code -
#include<cstdio>
#include<algorithm>
using namespace std;
int main() {
int n,d[100000],i;
for(i=0;i<n;++i) {
... |
The last line of this answer prompted me to ask this question . I know to know at a conceptual level the difference between Git and GitHub .
|
I'm leading a largish development team (~35 developers). We are doing primarily Web Development work on a number of sites.
Historically the knowledge on the teams has been pretty siloed. If you worked on Site A you will know how to troubleshoot it, but you would not be a lot of help on Site B.
We also have a few cros... |
I would like to set up an app that allows users to send their code and execute it on my server. The thought of running untrusted code makes me cringe, so I am trying to set up an exhaustive list of security threats that should be addressed.
I am assuming I should strip down certain features of the language executed, li... |
I apologize for the long question, it reads a bit as a rant, but I promise it's not! I've summarized my question(s) below
In the MVC world, things are straightforward. The Model has state, the View shows the Model, and the Controller does stuff to/with the Model (basically), a controller has no state. To do stuff the C... |
Is it possible to use only Java (without C++ /NDK) for building good, fast, beautiful Android apps (including 3D development)?
When I look for Android developer position requirements (vacancies), I see that knowledge of C/C++/NDK is very important. Some companies even require to build their test tasks using only C++ (... |
I keep seeing this term being thrown around in blogs about frameworks. While I understand the difference between declarative and imperative programming, how does this apply specifically to UI? Why does there appear to be a special term for it? Are these different 'things'? If so, what is the alternative to Declarative ... |
I've been reading Steve McConnell's Software Estimation: Demystifying the Black Art book, and he gives an equation for estimating nominal schedule based on Person-months of effort:
ScheduleInMonths = 3.0 x EffortInMonths1/3
Per the book, this is very accurate (within 25%), although the 3.0 factor above varies depending... |
Suppose I have a Widget class that is part of a framework used independently by many applications. I create Widget instances in many situations and their lifetimes vary. In addition to Widget's instance specified methods, I would like to be able to perform the follow class wide operations:
Find a single Widget instanc... |
To make it simple assume you have only AND and OR gates. Each has two inputs and one output. The output of two inputs can be used as an input for the next gate For example:
A AND B -> E
C AND D -> F
E OR F -> G
Assuming an arbitrary number of gates, we want to check if the circuit ever connects back into itself at an e... |
I'm learning Scala and am a little bewildered by all the methods (higher-order functions) available on the collections. Which ones produce more results than the original collection, which ones produce less, and which are most appropriate for a given problem? Though I'm studying Scala, I think this would pertain to mo... |
In Java, if I am building a significant number of strings, is there any difference in performance in the following two examples?
StringBuilder sb = new StringBuilder();
for (int i = 0; i < largeNumber; i++) {
sb.append(var[i]);
sb.append('=');
sb.append(value[i]);
sb.append(',');
}
or
StringBuilder sb... |
I am a student and have obtained a one year placement at a business that develops an e-commerce system using C#, HTML, WPF, javascript, ASP and more. Although I do have a little bit of knowledge, I find myself being assigned a lot of tasks that are beyond me and even when I ask for help, the response I get is often cry... |
I have a 100+ users on a Silverlight application that uses WCF and entity framework.
Everyone has their own database and here comes my problem.
How do I make sure that only the user gets access to his database via WCF. Do I have to send the connectionstring every time I make a call to the service, or?
|
In the JavaDoc for X509Certificate getSubjectDN() it states:
Denigrated, replaced by getSubjectX500Principal().
I am used to seeing Deprecated in the for methods that should not be used any longer, but not Denigrated. I found a bug report about this particular case where it was closed with comment:
This isn't a bug.... |
I am working on a fairly complex .NET application that interacts with another application. Many single-line statements are possible culprits for throwing an Exception and there is often nothing I can do to check the state before executing them to prevent these Exceptions.
The question is, based on best practices and se... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.