instruction stringlengths 34 19.9k |
|---|
I have started an introductory Java class and the material is absolutely horrendous and I have to get excellent grades to be accepted into the master's degree, hence my very beginner question:
In my assignment I have to write algorithms (no pseudo-code yet) to solve a board game (Sudoku). Essentially, the notes say tha... |
Given a list of circles with its coordinates (x and y) that are moving every second in different direction (South-East, South-West, North-East and North-West), and the circle will change direction if it hits the wall sort of like bouncing, so how do we detect if any of them collide or overlap with each other ? I am not... |
Tags are a vital part at Version Controlling for example SVN.
When should i write Tags at SVN?
What information should have a Tags?
|
First off, sorry if this is answered somewhere else. I did a brief search, but wasn't sure how to ask in search terms.
I'm looking at some code and came across lot's of statements like this:
if ( ($a != empty_or_null_or_notDefined && $a == 5 )
Is this the same as just saying:
if ( $a == 5 )
?
(language is PHP.)
|
I am looking for a free (as in beer) combination of services, for learning "cloud SW development" and very small scale private use (say, a private streamlined web shopping&todo list with simple auth). The combination should include the full set of needed services:
DVCS service (like github)
A cloud service to run the ... |
When creating a release with git flow like:
git flow release finish <branch_name>
I'm prompted for a release message. I grepped around to see where this go, but no succes. Any idea?
|
In refactoring code, I came across code that had comments. Looking closer at the comments, I could see that the code was clearly not doing what the comments said.
Without access to the coder nor documentation, and without clear direction regarding the code (i.e. defects as to the fact that the code is operating inco... |
Is it possible to use only C++ to create iOS apps? Is there any downside to that? I read somewhere that you have to use a mix of objective C and C++ if you want to use C++ that bad.
|
An assignment in my software engineering class is to design an application which can play different forms a particular game. The game in question is Mancala, some of these games are called Wari or Kalah. These games differ in some aspects but for my question it's only important to know that the games could differ in th... |
Doing on-demand work stresses me out and is not good for my back.
What tips could you offer if you have experience in spotting needs and writing custom software to suit ?
|
I am a trainee. According to my teacher to solve a problem we should go through following steps:
Create Algorithm (optional)
Create a Datatable: By analyzing the problem, create main concepts in those problem as columns and the related issues in the main concept as rows.
Create a Flowchart based on the Datatable. (whe... |
I'm going to teach teenagers some C++ code. I need an editor which is simple and has built in compiler. We tried CodeBlocks but when we installed it in the machines, the text got reversed, I'm not sure what the reaoson is. I would be great if the file size of the editor will not be large.
We need just simple features:... |
Is there any difference between return n (in the main function) and exit(n) in C? Is it defined by C or POSIX standards or it depends on OS or compiler?
|
Here is the classic scenario; Dev team build a prototype. Business mgmt like it and put it into production. Dev team now have to continue to deliver new features whilst at the same time pay the technical debt accrued when the code base was a prototype.
My question is this (forgive me, it's rather open ended); how can t... |
If I make a maven repository available for others to use, do I have
to get permission form the authors of those software that I host in
my repository even if they are free software?
Can I host free software libraries under any license or should they
have compatible licenses?
|
I recently found a framework named ecto.
In this framework, a basic component named "plasm", which is the ecto Directed Acyclic Graph.In ecto, plasm can be operated by ecto scheduler.
I am wondering what's the advantage of this mechanism, and in what other situations can we exploit the concept of DAG?
|
[Note: I hope I am not breaking etiquette, but I originally posted a variant on this question here, but am re-asking here because I am making this now solely a question about programming.]
I would like to program of the following simple form:
The user can produce X number of resizable frames (analogous to HTML frames)... |
I am a programmer and have just started reading Algorithms. I am not completely convinced with the notations namely Bog Oh, Big Omega and Big Theta. The reason is by definition of Big Oh, it states that there should be a function g(x) such that it is always greater than or equal to f(x). Or f(x) <= c.n for all values o... |
I have a small MVC framework I've been working on. It's code base definitely isn't big, but it's not longer just a couple of classes. I finally decided to take the plunge and start writing tests for it(yes, I know I should've been doing that all along, but it's API was super unstable up until now)
Anyway, my plan is to... |
I am trying to decode a piece of code from a book:
List<Person> people = new List<Person>()
{
new Person {FirstName="Homer",LastName="Simpson",Age=47},
new Person {FirstName="Marge",LastName="Simpson",Age=45}
};
Person is just a simple class they made, with a bunch of fields: Name, Last Name, etc...
What I don't under... |
Imagine I have a collection of object instances which represent activities for a user to undertake. Dependent on user attributes, I have to randomly select instances to present activities to the user.
For some users, I need to present more activities to them than there are available activities in which case, I want to... |
I'm trying to compare two text files. I want to compute how many lines were added and removed. Basically what git diff --stat is doing. Bonus points for not having to store the entire file contents in memory.
The approach I'm currently having in mind is:
read each line of the old file
compute a hash (probably MD5 or S... |
I was reading this blog by James Bennett regarding HTML vs XHTML . He writes :
I don’t have any need for namespaced content; I’m not displaying any
complex mathematical notation here and don’t plan to, and I don’t use
SVG for any images. So that’s one advantage of XHTML out the window. I
also don’t have any nee... |
Could someone please explain quite clearly the difference between a port and a socket. I know that a port serves as a door into the network for an application
process and that the application process uses a socket connection to the given port number to handle network communication but when you have multiple processes ... |
What would be a good alternative to inline Java documentation, i.e. can one have a separate docs file somehow mapped to a java source file?
I have never liked huge comment sections littered in code.
|
I am trying to get some advice on what order I should learn about SQL Server, LINQ, and Entity Framework to be able to better work with ASP.NET Webforms and MVC.
From what I've been able to learn so far, many recommend learning LINQ or Entity Framework before learning SQL Server. It also appears that many companies are... |
I'm working on a smallish web application that uses a little bit of static HTML and relies on JavaScript to load the application data as JSON and dynamically create the web page elements from that.
First question: Is this a fundamentally bad idea? I'm unclear on how many web sites and web applications completely disp... |
Is there a term to describe the point at which adding more developers to a software project will provide diminishing returns?
I realize that at a high level, it is more complicated that just a number of developers at which the project will be at productive capacity (ex/ state of the project, quality of the added develo... |
The "scope" of the GNU license is troubling me : I know it has been answered many times ( here, here, ... ) but shouldn't we take into consideration the complexity and originality of a code before using GPL license ?
I explain : I'm working on a pet project using the DTW algorithm that I have written in C using the pse... |
I am currently helping to design a web site and application in HTML. We would like the user to be able to search the site/app for desired content via a search bar. We would also like to include an advanced search ability to allow for different search options and more concentrated searches.
We are having trouble decidi... |
I am working with 2d correlation for image processing techniques (pattern recognition etc...). I was wondering if there is a theoretical approach on how to tell when to use multiplication in frequency space over correlation in time space. For sizes of 2x frequency space is obviously faster but how about small, prime si... |
I want to create a python panel for Linux like pypanel or tint2 just for fun and to do practice with python development.
Now the problem is:
I want to create an auto-generated menu, but I don't know where to start.
Where can I find all user's installed software in a Linux distro? I know I should look in the /usr/bin fo... |
BACKGROUND
We are building a Java (SE) trading application which will be monitoring market data and sending trade messages based on the market data, and also on user defined configuration parameters.
We are planning to provide the user with a thin client, built in .NET (WPF) for managing the parameters, controlling th... |
Paraphrasing a recent question: https://softwareengineering.stackexchange.com/questions/52608/what-is-object-oriented-programming-ill-suited-for
I would like to ask the opposite question:
What kind of programs cannot be written unless you use OOP?
What kind of programs are not recommended to be written using non-OOP te... |
An order can be in the "status" of Completed, Corrected or some other status.
I saw some code that is checking it like this, the purpose is to disable some stuff when the status is in Completed or Corrected status.
if (model.CurrentStatus != DSRHelper.OrderStatusEnum.Complete && model.CurrentStatus != DSRHelper.Orde... |
I'm not trying to say I know something everyone else doesn't but I've been solving more and more designs with the use of nested classes, so I'm curious to get a feeling for the acceptablilty of using this seemingly rarely used design mechanism.
This leads me to the question: am I going down an inherintly bad path for r... |
I've inherited a huge pile of legacy code written in PHP on top of a MySQL database. The thing I noticed is that the application uses doubles for storage and manipulation of data.
Now I came across of numerous posts mentioning how double are not suited for monetary operations because of the rounding errors. However, I ... |
Why doesn't Java's BigInteger class have a constructor capable of taking a numeric literal? Every single time I use BigIntegers, and many times I merely think about them, I wonder this.
What reason could the designers of java have had to exclude one despite the overwhelming convenience of one should it exist?
|
Does 'Me' in VB.NET refer only to an instantiation of the type? Just occurred to me that since I can reference properties in my VB.NET class without using 'Me', that I don't see a reason for using it for this purpose. Will referencing the variable either way always refer to the actual stored value for the property at... |
The standard method of implementing get and set accessors in C# and VB.NET is to use a public property to set and retrieve the value of a corresponding private variable. Am I right in saying that this has no effect of different instances of a variable? By this I mean, if there are different instantiations of an objec... |
Are elements returned by Linq-to-Entities query streamed from the database one at the time ( as they are requested ) or are they retrieved all at once:
SampleContext context = new SampleContext(); // SampleContext derives from ObjectContext
var search = context.Contacts;
foreach (var contact in search)
... |
I planning to write an application in which there will be a service (call it A) listening for particular commands. This service will then relay those commands to other services (call them B and C) which are written, respectively, in .NET and Java (service A chooses which of service B or C to which to relay depending on... |
In a situation like this:"
if ((metadata != null) && (metadata.TypeEnum != VariantInfoMetadata.CellTypeEnum.Status))
do you recommend to keep the code as it is above? Or is it better to make a nested "if" statement and breaks the condition into two sections where "outer if" makes sure metadata is not null and inner i... |
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.