instruction stringlengths 34 19.9k |
|---|
I have received comments from the supervisor reviewing my thesis. He asked two questions I cannot answer right now:
If ISO 12207 says under "Integration verification" that it "checks that components are correctly and completely integrated into a system", how this can be verified without testing, if all testing is vali... |
Hey guys I am really new to the C++ programing I have a little knowledge in C and a bit more in C++, but I do not know them enough to call myself a programmer. I am working as a PHP Web Developer I like being a crafts man and creating things so that is the reason to combine the programming with web development. I think... |
Let's assume that I'm extending a graphical file chooser class (JFileChooser).
This class has methods which display the file chooser dialog and return a status signature in the form of an int: APPROVE_OPTION if the user selects a file and hits Open /Save, CANCEL_OPTION if the user hits Cancel, and ERROR_OPTION if somet... |
I was recently asked the following question in an interview :
How do you debug a C++ program ?
I started by explaining that programs may have syntax and semantic errors. Compiler reports the syntax errors which can be corrected. For semantic errors, various debuggers are available. I specifically talked about gdb, wh... |
I'm learning node.js and am trying out Express. My first app had this code:
var express = require('express')
, routes = require('./routes')
, user = require('./routes/user')
, http = require('http')
, path = require('path');
Reading through the mongoose tutorial gives me this:
var mongoose = require('mongoose... |
Many sources note that automatic static code analysis include data flow and control flow. But these two are included in white box testing as well. Is there a difference in the automation? That in automatic static analysis all is done by the tools while in white box testing, a person creates the data to exercise the pos... |
I have an affiliate marketing client who needs to know if I can program this. Can I do one or both of the following scenarios without violating the GPL license?
Scenario A:
Make a software installer for a GPL licensed product which includes source, binaries, and license info. The installer also has a checkbox for insta... |
I was posed with the idea of creating an object that checks if a point will collide with a line:
public class PointAndLineSegmentCollisionDetector {
public void Collides(Point p, LineSegment s) {
// ...
}
}
This made me think that if I decided to create a Box object, then I would need a PointAndBoxColl... |
So let's say that I have a test:
@Test
public void MoveY_MoveZero_DoesNotMove() {
Point p = new Point(50.0, 50.0);
p.MoveY(0.0);
Assert.assertAreEqual(50.0, p.Y);
}
This test then causes me to create the class Point:
public class Point {
double X; double Y;
public void MoveY(double yDisplace) {
... |
I have a small tool I'm designing which would require a configuration file of some sort. The configuration file in my case is really more of a database, but it needs to be lightweight, and if needed the end-user should find it easily editable. However, it also will contain a lot of things in it. (depending on certain f... |
Is there a specific name to this? For me it looks like a view router, or a presenter router (I would name it like that) but maybe there is a better name and explication.
|
Yesterday I asked a question that happened to have another meaning inside. I can see that Control/data flow is often mentioned to be static analysis (when tools is used) or dynamic analysis testing in terms of white box testing. Could it be that automatic analysis tools can just help by creating graphs or they do actua... |
I'm sure there is such a correlation, because
experience and skill leads good programmers to picking languages that are better for them, in which they're more productive, and
working in a language forms how programmers think and influences their methods and skills.
Is there any research or some statistical data of th... |
I remember reading that there are no existing data structures which allow for random-access into a variable length encoding, like UTF-8, without requiring additional lookup tables.
The main question I have is, is this even a useful property? I mean, to look up and replace random single codepoints in O(1) time.
|
I have written a tiny bit of jQuery which simply selects all the Select form elements on the page and sets the selected property to the correct value. Previously I had to write code to generate the Select in php and specify the Selected attribute for the option that was selected or do loads of if statements in my php ... |
I want to know if there are any tools/tool-kits which aid in building
source level debuggers for domain specific languages ?
(I work on a proprietary DSL, which doesn't have any tools
and sometimes debugging will become difficult, so, if in case
there are any such tool-kits, wanted to try)
|
I've just developed a block cipher symmetric-key algorithm and I am using it in some of my products. I want to put it to real test.
How would one go about entering their encryption algorithm into an international encrytption contest?
|
I am pretty new to Java and its JTables and this is where I am struggling at the moment.
I need to create a GUI which shows me results of a sql query like SELECT * FROM tblPeople WHERE name='Doe'. My idea was to create a a JFrame which displays a JTable with all found records.
Besides this, I need to also implement s... |
For some legal reasons I haven't worked for anybody for the last 12 years. I am a java web developer or at least I am thinking so. For this period I have been working on my project- some sort of business network - and I did few small jobs, so right now I feel I am far behind in terms of my skills and the skills needed ... |
I'm trying to think about the best way to handle group memberships on a website. People sign up and select checkboxes in a list of interests. Every week we send out interest-themed emails to those members that indicated that interest.
however i store the information in the database, while i am working with the lists an... |
I have an API which allows a user to update their system status; and a separate call to retrieve system status updates from other users. Would it make sense to unify them under a PUT request where a user would request a PUT update with their own status update, and they would receive the status updates of other users?
M... |
In Java, there is the final keyword in lieu of the const keyword in C and C++.
In the latter languages there are mutable and immutable methods such as stated in the answer by Johannes Schaub - litb to the question How many and which are the uses of “const” in C++?
Use const to tell others methods won't change the logi... |
I am learning Hibernate (OR Mapping). I am using Maven for project management. However, I am currently reading a Hibernate book by O'Reilly, and they use ANT for their example. So my question is are there any difference between setting up hibernate with ANT and Maven?
Thanks in advance!
|
I need to write a unit test which validates the serialization of two attributes of an XML(size ~ 30 KB) file.
What is the best way to provide an input for this test?
Here are the options I have considered:
Add the file to the project and use a file reader
Pass the contents of the XML as a string
Create the XML through... |
I am unsure regarding the scalability of the following model. I have little experience with large systems, big number of requests and so on but I'm trying to build some features considering scalability first.
In my scenario there is a user page which contains data for:
User's details (name, location, workplace ...)
Us... |
Recently I was asked:
Why is NoSQL faster than SQL?
I didn't agree with the premise of the question... it's just nonsense for me personally. I can't see any performance boost by using NoSQL instead of SQL. Maybe SQL over NoSQL, yes but not in that way.
Am I missing something about NoSQL?
|
I am confused which approach to choose - Poll (which waste battery), GCM or any other approach which suits best?
Scenario is: my client is Android and server is C#.Net. Server sends Invitation to client. Server can choose whom to send (Regionwise, Particular, To All). Client can accept or reject the invitation.which se... |
I am given a set of sets:
{{a,b}, {a,b,c}, {a,c}, {a,c,f}}
I would like to have a data structure to index those sets such that the following "lookup" is executed fast: find all supersets of a given set.
For example, given the set {a,c} the structure would return
{{a,b,c}, {a,c,f}, {a,c}}
but not {a,b}.
Any suggesti... |
Possible Duplicate:
Is it OK to push my code to GitHub while it is still in early development?
I've been working on a hobby project for a few months now; it's clocking in at over 15000 source lines of code. A number of people have expressed interest in joining development, and I have full intentions of going open so... |
I am currently doing some research about software patterns and about architectural patterns for frameworks specifically.
Google is not really showing off for this topic, so I am curious which patterns would you consider specificially important for the architecture of frameworks? I am focusing on frameworks for web, mob... |
We're about to start a new project using Agile (using TFS), and I have a couple of "good practice" questions regarding the product backlog:-
When we first start adding users stories, is it a good idea to put them in (say) a "Backlog" iteration, or just leave their iteration blank? Obviously when the time comes to start... |
Possible Duplicate:
Where does this concept of “favor composition over inheritance” come from?
I have colleagues at work who claim that "Inheritance is an anti-pattern" and want to use composition systematically instead, except in (rare, according to them) cases where inheritance is really the best way to go.
I want... |
A client has asked me to do a redesign of their website, an ASP.NET Webforms application that was developed by another consultant. It seemed like a relatively straightforward job, but after looking at the code, it's clear that's not the case.
This application was not written well. At all. It is extremely vulnerable to ... |
I'm currently working in a geographically distributed team in a big company. Everybody is just focused on today's tasks and getting things done, however this means sometimes things have to be done the quick way, and that causes problems... you know, same old, same old.
I'm bumping into code with several smells such as:... |
Ok, I am a newbie and don't really think "dimensionally" yet, I have most of my initial schema roughed out but I keep flipping back and forth on one table.
I have a Contract table and it has a quantity column (tonnes), and a net price column, which need to be summed up a bunch of different ways, and the contract has l... |
My company switched from Subversion to Git about three months ago. We had weeks of advance notice prior to the switch. Since I'd never used Git before (or any other DVCS), I read Pro Git and spent a little time spinning up my own repositories and playing around, so that when we switched I'd be able to keep working wi... |
Possible Duplicate:
Avoid having an initialization method
I want to determine when to do non-trivial initialization of a class. I see two times to do initialization: constructor and other method. I want to figure out when to use each.
Choice 1:
Constructor does initialization
MyClass::MyClass(Data const& data) : m_... |
I'm currently working on a project where the original author informally told me that he didn't want to publish the source.
Since then, the original author has gone leaving me to be the sole developer on the project. I've tried to contact him several times about making the project open source so that I can have other d... |
First question here; please help me if I'm doing something wrong.
I'm a graphic designer who's trying to teach himself ASP.NET/C#. My server-side background is PHP/WordPress and some ASP Classic, and when I do code I've hand-coded just about everything since I started learning HTML. So, as I've started to learn .NET, m... |
I want to link several tables to a many-to-many(m2m) table.
One table would be called location and this table would always be on one side of the m2m table.
But I will have a list of several tables for example:
Cards
Photographs
Illustrations
Vectors
Would using GUID's between these tables to link it to a single colu... |
Assume two nodes in a peer-to-peer network initiating a communication.
In this communication, one node has to serve as a "sender", another as a "receiver" (role names are arbitrary here).
I'd like the nodes to assert either role with approximately equal probability. That is, in N communications with various other nodes... |
In Python, I often hear that it is better to "beg forgiveness" (exception catching) instead of "ask permission" (type/condition checking). In regards to enforcing duck typing in Python, is this
try:
x = foo.bar
except AttributeError:
pass
else:
do(x)
better or worse than
if hasattr(foo, "bar"):
do(foo... |
ISTQB, Wikipedia or other sources classify verification acitivities (reviews etc.) as a static testing, yet other do not. If we can say that peer reviews and inspections are actually a kind of a testing, then a lot of standards do not make sense (consider e.g. ISO which say that validation is done by testing, while ver... |
Disclaimer: I'm aware of the questions How do I review my own code? and What advantages do continuous integration tools offer on a solo project?. I do feel that this question aims at a different set of answers though, as it is about a specific software, and not about general musings about the use of this or that practi... |
I'm working on a content synchronisation module for Drupal. There is a server module, which sits on ona website and exposes content via a web service. There is a also a client module, which sits on a different site and fetches and imports the content at regular intervals.
The server is created on Drupal 6. The clien... |
I'm currently choosing between two viable software designs/solutions. Solution 1 is easy to implement, but will lock some data in a proprietary format, and will be hard to change later. Solution 2 is hard to implement, but will be a lot easier to change later on.
Should I go YAGNI on this or should I incorporate the ex... |
It has happened in our team that our issue-tracker is down. Happens about once a week now (yes, wow), and there's not really much we can do to get it back up, since it's hosted by our client in a different timezone. It sometimes takes several hours for it to be operative again.
In the meanwhile, we can't really tell wh... |
This analysis makes sense, and states anything that avoids code duplication and simplifies maintenance speaks for a service layer.
What is the technical behavior?
When a service client references a service, does it do so at runtime, or does it happen at compile time?
When I change something in the service layer code,... |
Currently the company I work in gives each developer their own development virtual machine. On this machine (Windows 7) they install the entire stack of the product (minus database) this stack is normally spread amongst multiple machines of differing OS (although moving towards windows 2008 and 2008r2)
So when a develo... |
I am looking for a design for my application, here are the players(classes) involved.
struct Transform {
// Uses a matrix to transform the position.
// Also acts acts as the state of a Dialog.
Position transform(Position p);
//other methods.
};
struct Dialog {
// There are multiple dialog for the... |
I'm finding it difficult to frame this question so ... I want to execute code both before and after a method runs in PHP. There are, as far as I know, two ways to implement this:
Method One: pre and post methods
class Model
{
function find($id)
{
$this->_precode();
// ... do stuff
$this->post_code();
... |
I want to start/improve a culture of collective code ownership at my company but at a geographically distributed level... I'd say there is some current collective code-ownership mentality, but only at single geographical sites.
This is a follow-up to this question: What is the politically correct way of refactoring oth... |
For a school assignment we're supposed to make a Java implementation of a compressor/decompresser using Huffman's algorithm.
I've been reading a bit about it, specially this C++ tutorial: http://www.cprogramming.com/tutorial/computersciencetheory/huffman.html
In my program, I've been thinking about having Nodes that ha... |
I'm against compiled stuff going into version control, specially when it comes to compiled binaries, however, my principles are now in question after adding doxygen support for a project.
Should the hundreds of files generated by doxygen go into version control?, what is the recommended practice here?, I think the idea... |
I read a lot about vim and emacs and how they make you much more productive, but I didn't know which one to pick. Finally when I decided to teach myself common lisp, the decision was straight forward: everybody says that there's no better editor for common lisp, than emacs + slime. So I started with emacs tutorial and ... |
Often I need to apply some small fixes (to make them run on my environment) or even change some parts of the software (to tailor it to my needs) to software from outside. However this obviously creates problem with updating said software, even when it changes nothing related to my fix. It would be easier when the softw... |
I have to debug an issue which requires me to print all the values of a Value Object that is returned by a web service call. The Value object is a complex object in the sense, it has another object as its member which in turn has another object.
Printing all the values by using get methods is cumbersome. So I was wonde... |
I got the idea that basics of fuzzy logic is not that hard to grasp. And I got the feeling that someone might explain it to me in like 30 minutes. I understand neural networks and am able to re-create the famous Xor problem. And understand how to go just beyond it and create 3 layer networks of x nodes.
I'd like to und... |
So, I'm on my quest about creating a Java implementation of Huffman's algorithm for compressing/decompressing files (as you might know, ever since Why create a Huffman tree per character instead of a Node?) for a school assignment.
I now have a better understanding of how is this thing supposed to work. Wikipedia has a... |
In corporate in-house software development it is common for requirements to be determined through a formal process resulting in the creation of a number of requirements documents. In open source software development, this often seems to be absent. Hence, my question is: how are requirements determined in open source so... |
I was reading code of a java project where I found a class name like "UserSansXml". This class is dealing with user objects. I wanted to know the meaning of "sans".
|
We had a senior level interview candidate fail a nuance of the FizzBuzz question12.
I mean, really, utterly, completely, failed the question - not even close.
I even coached him through to thinking about using a loop and that 3 and 5 were really worth considering as special cases.
He blew it.
Just for QA purposes, I ga... |
So here's the confusion, let's say I declare an array of characters
char name[3] = "Sam";
and then I declare another array but this time using pointers
char * name = "Sam";
What's the difference between the two? I mean they work the same way in a program. Also how does the latter store the size of the stuff that som... |
In a current project we have setup the build so that we could mix Java and Scala. I would like to use more Scala in our code base to make the code more readable and concise. In the process also learn the language by handing over real features.
So I plan to use Scala for some classes to showcase its benefits and convi... |
MVVM Light and PRISM offer messenger to implement event system.
the approximate interface looks like the following one:
interface Messanger
{
void Subscribe<TMessageParam>(Action<TMessageParam> action);
void Unsubscribe<TMessageParam>(Action<TMessageParam> action);
void Unsubscribe<TMessageParam>(objec acti... |
I love gaming, I love games that allow modding and I love linux. But the fact that most games right now are targeted for windows (consoles aside), most mods and modding tools are also targeted for windows. There is a certain modder called Boris Vorontsov that makes a famous visual overhaul mod series called ENB.
What h... |
Objective C has a concept of a nil object which would accept any method call with any parameters without complaining and silently return another nil.
I have used something similar in Java using easymock and mockito for testing. Is there something similar for main line code? Is it even a good idea to have something lik... |
Despite having started learning programming with Pascal and C, after the jump to OO (C++, Java) I lost sense of the structured programming paradigm. I have started learning Lua and I have researched many tutorials, but all of them only cover basic operations and language features and capabilities. They feel more like a... |
To give a bit of background, lets say it's a generic results page, which is paginated so there are X results per page.
Generally to do this, I have two queries on the page:
to get the total number of results
to get the results, limiting by the correct page's resultset
However, recently I've been trying to cut down on... |
Possible Duplicate:
Verification of requirements question
Having asked but deleted the question as it was a bit misunderstood. If Quality Control is the actual testing, what are the commonest true quality assurance activities? I have read that verification (reviews, inspections..) but it does not make much sense to ... |
For example, I've GPL software. I'm the author of this GPL software. This GPL software has, between its code, Doxygen comments. These Doxygen comments are written to generate a CC-BY-SA html page, in order to upload this generated documentation in my project website under CC-BY-SA license.
But, is the Doxygen documenta... |
From Lafore's "Data Structures and Algorithms in Java":
(about insertion sort (which uses copy + shift instead of swap (used in bubble and selection sort)))
However, a copy isn’t as time-consuming as a swap, so for random data
this algo- rithm runs twice as fast as the bubble sort and faster than
the selectionsort... |
I have a codebase where the programmer tended to wrap things up in areas that don't make sense. For example, given an Error log we have you can log via
ErrorLog.Log(ex, "friendly message");
He added various other means to accomplish the exact same task. E.G.
SomeClass.Log(ex, "friendly message");
Which simply turns... |
I am about to design a video conversion service, that is scalable on the conversion side.
The architecture is as follows:
Webpage for video upload
When done, a message gets sent out to one of several resizing servers
The server locates the video, saves it on disk, and converts it to several formats and resolutions
The... |
So far I haven't been testing or learning how to test my java web applications.
If you do, what are the tools you need, and is it really necessary to test a web application if doesn't need scaling or it won't be handling big traffics and multi transactions?
What things should I test and what approaches should I take to... |
I am considering the technical viability of software that I want to write.
Is there a way that I can push data to a phone (iPhone or Andriod) via Bluetooth without pairing with it?
I want to be able to walk into a room and have a computer push data to my phone when I get a certain distance from it, or push data to any ... |
Often testing is regarded as a dynamic analysis of a software. Yet while writing my thesis, the reviewer noted to me that dynamic analysis is about analyzing the program behind the scenes - e.g. profiling and that it is not the same as testing because its "analysis" which looks inside and observes.
I know that "static ... |
Disclaimer: I don't want to start any flame war so there will not be no name of any framework mentioned.
I've been using quite many from the existing PHP frameworks and my experience in each case was similar: everything is nice a the beginning but in the moment you require something non standard you get into lot of pro... |
Assume I have a library A which is licensed under a two-clause Free BSD style license. Library A optionally depends on library B (the availability of the dependency is configured at build-time), which is licensed under the GPLv3.
If I distribute both bundled together, the license will need to be GPL. But am I still abl... |
On one hand there is an advice that says "Build one to throw away". Only after finishing a software system and seeing the end product we realize what went wrong in the design phase and understand how we should have really done it.
On the other hand there is the "second-system effect" which says that the second system o... |
I'm looking for a label to describe the practice of using human-based computation methods or other means of "faking" an algorithm for the sake of getting a product or demo off the ground quickly without spending the time to develop an technical/scalable/analytical solution? Eg: using Amazon Turk to count the number of... |
I'm working on a project right now and it's my first project using BDD. Up till now, the user stories have proven themselves a very valuable weapon to understand requirements and to specify the solution in a comprehensive, easy to understand language.
My question is this: now that my user stories are complete, how do I... |
I have at first sight a simple issue but can't wrap my head around on how to solve. I have an abstract class Compound. A Compound is made up of Structures. Then there is also a Container which holds 1 Compound.
A "special" implementation of Compound has Versions. For that type of Compound I want the Container to hold t... |
I am thinking about open sourcing my project, but I want to prohibit public hosting, so noone will put up an alternative website with my code on it, and compete with my site.
Internal networks, like libraries etc. would be welcome to use it.
Are you aware of such a license? I guess this would be even more restrictive t... |
I'm working on a review site, where there is a minor issue with almost duplicate reviews across items. Just a few words are changed. It would be very nice to be able to uncover these duplicates before they are approved by a moderator, and I'm hoping someone could chime in on the best strategy to get there.
The site is ... |
I recently got into using the HTML5-requestAnimationFrame-API a lot on animation-heavy websites, especially after seeing the Jank Busters talk. This seems to work pretty well and really improve performance in many cases.
Yet one question still persists for me: When wanting to use an animation that is NOT entirely calcu... |
I have a small webapp in java and I am adding the internationalization support, replacing texts with labels that are defined in dictionary files.
While some texts are obviously unique to each view (v.g. the html title), other refer to concepts from the model (v.g. a ticket, the location or status of such ticket, etc.)
... |
We have an ASP.NET web-application which has become difficult to maintain, and I'm looking for ideas on how to redesign it. It's an employee administration system which can be highly customized for each of our customers. Let me explain how it works now:
On the default page we have a menu where a user can select a task,... |
Since that every things is a file on the UNIX system. If I have a hardware, for example, a mouse, move from left corner to right corner, it should produce some kinds of file to communicate with the system.
So, if my assumption is correct, is this possible to do following things:
Capture the raw data, which is about m... |
I have seen various arguments against the DAO being called from the Controller class directly and also the DAO from the Model class.Infact I personally feel that if we are following the MVC pattern , the controller should not coupled with the DAO , but the Model class should invoke the DAO from within and controller sh... |
I'm currently working on a project that makes connection between different banks which send us information on which that project replies. A part of that project configures the different protocols that are used (not every bank uses the same protocol), this runs on a separate server. These processes all have unique id's... |
Not all languages support java-like annotations or C#-like attributes or code metadata in general, however that doesn't mean it is not possible to have in languages that don't have this.
An example is PHP with Stubbles and the Doctrine annotation library.
My question is, is there anything like this for C?, or are there... |
Recently I've been thinking about a general ExceptionHandler, that I could initialize once in my app context and inject it everywhere. The idea that it will have quite simple interface with just public void handle(Exception ex), and then according to exception type it should decide what to do, maybe just log it, or sho... |
Suppose, I have a class with a constant static final field. Then I want in certain situations that field to be different. It still can be final, because it should be initialized in constructor. My question is, what strategy I should use:
add this field value into the constructor
create 2 subclasses, replace original ... |
My use case is that I have a pipeline of independent, stand alone programs, that I want to execute in a certain order on specific pieces of data that are output from previous pipeline stages.
The pipeline is entirely linear and doesn't do anything in terms of alternate paths through the pipe.
I'm currently using SGE t... |
We are looking for a way to tokenize some text in the same or similar way as a search engine would do it.
The reason we are doing this is so that we can run some statistical analysis on the tokens. The language we are using is python, so would prefer a technique that works in that language, but could probably set somet... |
I was recently grabbing an auto generated TreeViewItem from a nested TreeView node in WPF, and I was using ItemContainerGenerator to get it in code behind. Then I thought to myself I'm certainly violating MVVM right now.
What are some other signs that someone is violating MVVM ?
|
I have inherited and now further develop a large application consisting of an ASP.NET application, VB6 and VB.NET application.
The software was poorly written. I am trying to refactor the code as I go along. The changes I am making are not live (they are contained in a folder on my development machine). This is prov... |
I have a somewhat simple, but specific, question about implementing the transport layer for a SIP UAC.
Do I expect the response to a request on the same socket that I sent the request on, or do I let the UDP or TCP listener pick up the response and then route it to the correct transaction from there? The RFC does not s... |
Say my company is going to build a complicated asp.net web form education system. One of the module is web based registration. To make it flexiable, we decide to use user control(ascx) with rule-engine (work flow) regulating all business logic behide them. Thus in future,for different clients, we can simply config basi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.