instruction stringlengths 34 19.9k |
|---|
I am looking for a strategy to version an application with the following requirements.
My requirements are given an exe with version number (major.minor.build-number)
1) I want to map the version to a svn source revision that made the exe
2) With the source and exe I should be able to attach and debug in vs2010 with no... |
Recently, iOS 6 was "jailbroken" but only on the Apple A4 CPU.
Why is the "jailbreaking" process specific to a CPU?
From Wikipedia:
... "iOS jailbreaking is the process of removing the limitations imposed by
Apple on devices running the iOS operating system through the use of
hardware/software exploits – such dev... |
I accidentally discovered this a=b=c=d=e=f=2 in python(2.7)(and JavaScript a few minutes later) interpreter .
Is this a feature or just the way the interpreter works, if is a feature how it is called ?
Do other languages have this feature ?
|
Advanced compilers like gcc compile code into machine readable files according to the language in which the code has been written (e.g. C, C++, etc). In fact, they interpret the meaning of the code according to library and functions of the corresponding languages. Correct me if I'm wrong.
I wish to better understand co... |
We are developing a web application with a fairly standard registration process which requires a client/user to verify their email address before they are allowed to use the site. The site also allows users to change their email address after verification (with a re-type email field, as well).
What are the pros and co... |
I have a hard time learning algorithms (Particularly graphing algorithms).
Do you know of any good free resources that make some of the more harrowing algorithm concepts such NP-Complete, Traveling salesman, and other algorithms, A* heuristics, particularly graphing algorithms, simpler to learn?
|
I wrote a migration file with the following code:
class AddScheduleIdToPlayers < ActiveRecord::Migration
def change
add_column :players, :schedule_id, :integer
add_column :schedules, :coach_id, :integer
end
end
Is it bad form to not create two migration files, one for each change, or is this fine?
|
I am writing a function to label the connected component in an image
(I know there are several libraries outside, I just wanted to play with the algorithm).
To do this I label the connected regions with different labels and create an equivalence table that contain information on the labels belonging to the same connect... |
I saw, here on Programmers, the answer to this question: How does thinking on design patterns and OOP practices change in dynamic and weakly-typed languages? There I found a link to an article with an outspoken title: Are Design Patterns Missing Language Features. But where I found snippets that to me seemed very catch... |
I am an indie developer working on multiple Android projects. I am having problem with maintaining same functionality on different projects. For example, three of my apps use the same 2 classes; since they are different projects, when I need to make a change in those classes, I need to make it three times. Is there a s... |
Often times I am faced with the situation where a new client comes to me with an application that has literally 100s of unnecessary features and it is quite clear that things need to be drastically simplified for the project to have any chance of succeeding. How do you convince the client to take a more Minimum Viable ... |
I am working on a website that requires a bit of marketing; let me explain.
This website is offering a single, say, iTunes 50$ voucher to a lucky winner.
To be entered in the draw, you need to invite (and has to join) at least one friend to the website. Pretty straightforward.
Now, of course it would be easy for anyone... |
Just wondering if there is a tournament scheduling algorithm already out there that I could use or even adapt slightly.
Here are my requirements:
A variable number of opponents belonging to a variable number of teams/clubs each must be paired with an opponent
Two opponents cannot be from the same club
If there are an ... |
I am reading this book, Programming Interviews Exposed by John Mongan et. al and in chapter 6 they are discussing removing all instances of characters in a src string using a removal string, e.g. removeChars(string str, string remove).
They suggest to having a boolean lookup array with all values initially set to false... |
I am confused. I thought I would try and use a new game engine in order to expand my abilities, and found a nice engine called springrts. I was looking through the licensing info and it is licensed under the GPL 2 licence. If I remember correctly, does that mean that anything I make with it, I have to distribute the so... |
I lose a ton of productivity by getting distracted while waiting for my tests to run.
Usually, I'll start to look at something while they're loading --- and 15-20 minutes later I realize my tests are long done, and I've spent 10 minutes reading online.
Make a small change... rerun tests ... another 10-15 minutes waste... |
I just need to know is it safe to use jQuery and MooTools Together in one web framework?
I am not trying create application using both of them, but I am in a situation where I need to modify mootool based application framework, so I am used to jquery, I don't want to waste my time learning mootools and I think jquery i... |
This question follows directly from the part of an answer of this question - Why would one bother marking up properly and semantically? .
I would like to understand why SEO techniques gives more weight to semantically correct mark up?
|
So finally after reading a lot, I have understood that the difference between BDD and TDD is between T & B. But coming from basic TDD background, what I used to was,
first write unittest for database models
write test for views (at this point start with integration test as well, along with unittests)
write more integ... |
I've to read a big XML file with a lot of information. Afterwards I extract the needed information (~20 Points(columns) / ~80 relevant Data (rows, some of them with subdatasets) and write them out in a Excel File.
My Question is how to handle the extraction (of unused Data) part,
should I copy the whole file and dele... |
I have been using Linux (especially, Ubuntu) and Windows 7 for a long time. I want to publish iOS apps, but I don't have a Mac or an iPhone. I don't have anyone near me who will lend me a Mac, and I don't actually want to buy them either.
So my question is: how do I publish my iOS app from Windows or Linux? I am not... |
I was looking at the WPF MVVM framework Caliburn.Micro and read that a lot of standard things are based on naming conventions.
For example, automatic binding of properties in the View to properties in the ViewModel. Although this seems to be convenient (removes some boilerplate code), my first instinct reaction is that... |
In my organization we've put together some rules / guildelines about logging that I would like to know if you can add to or comment.
We use Java but you may comment in general about loggin - rules and advice
Use the correct logging level
ERROR: Something has gone very wrong and need fixing immediately
WARNING: The pr... |
While programming an object that represent a GUI, the class is a mix of code of following sections:
Overrides of super GUI, for behavior customization
Implementations of interface contracts, to talk/listen to other GUI objects
Local event handling methods
Local data crunching methods
Code to query/update a remote data... |
I have been programming Java with swing for a couple of years now, and always accepted that GUI interactions had to happen on the Event Dispatch Thread. I recently started to use GTK+ for C applications and was unsurprised to find that GUI interactions had to be called on gtk_main. Similarly, I looked at SWT to see in ... |
This is more of a "point me in the right direction" question.
My team of three and I have built a hosted web app that queues and routes customer chat requests to available customer service agents (It does other things as well, but this is enough background to illustrate the issue).
The basic dev architecture today is... |
I'm facing a problem to create a version control outline for several already existing software parts for my company. Until now no one - expect for the developers - knows that there are different versions, which is the reason for the outline. In fact, I'm supposed to set up the future version control and communicate all... |
A friend's father, who is a software engineering manager, said, emphatically, "The number one cause of scheduling overruns is scheduling pressure."
Where does the research stand? Is a moderate amount of scheduling pressure invigorating, or is the manager I mentioned right or wrong, or is it a matter of "the more schedu... |
My company is rewriting our proprietary business application. The current architecture is poorly done and inflexible. It is coded more procedural oriented as opposed to object oriented. It has become difficult to maintain.
Our system is a web application written in .Net Webforms. I am considering ASP.Net MVC for the re... |
This is something that's bothered me for a while, and I can't figure out why anyone would ever want the language to act like this:
In [1]: foo = [1, 2, 3]
In [2]: foo.remove(2) ; foo # okay
Out[2]: [1, 3]
In [3]: foo.remove(4) ; foo # not okay?
-----------------------------------------------------------------------... |
I have a requirement to create a webservice to expose certain items from a CMS as a web service, and I need some suggestions - the structure of the items is as such:
item
- field 1
- field 2
- field 3
- field 4
So, one would think that the class for this will be:
public class MyItem
{
public string ItemName { get; ... |
Take, for instance the "", I'd hope that anyone who has spent any time in dealing with HL7 messages knows that the "" signifies that something should be deleted. "" is not an empty string, it's not a filler etc... But occasionally, one may meet a vendor who persists in sending "" instead of just sending nothing at all... |
I will be using Visual Studio only for creating C#/XAML Windows Store apps. Is there any reason for me to purchase a "Professional" SKU of VS 2012 rather than just using the Express (free) "Metro apps with C#/XAML" version?
The only thing I can think of is that I won't be able to use Resharper in the Express version (w... |
I am going to write an graphical 2D application that allows user to create polygons and transform them through transformation such as rotation an so on. I was hoping someone can give pro and cons arguments for the different choices I got in my mind. (Its all in Java btw!)
a). Represent vectors by filling matrices with... |
Several applications of this is text recognition (OCR), face recognition (biometrics), camera guided missiles (targetting systems). Each involves analyzing images and making out some object of interest. Is there a term that describes this branch of programming?
|
I'm building an application that retrieves Sharepoint list data via a web service SPlists.Lists. To create an instance of the web service, I have the following class:
class SharepointServiceCreator
{
public SPlists.Lists createService()
{
listsService.Url = "http://wss/sites/SPLists/... |
Currently, I am through a very creative phase as a developer. I think it's a good time to contribute to an open source project. Not as "permanent" developer to a project but in a "help wanted" manner in many projects.
The open source hosting services that I know are SourceForge and CodePlex. Any suggestions that will ... |
I'm stating to work on a project that I intend to release as open source via the githubs. What are the advantages of putting the code on github from the outset, as opposed to waiting until the project is in a working state before publishing.
If it matters, this particular project is a C# app/service, and I have only a ... |
I am currently learning to use Git by reading Pro Git. Right now I'm learning about branching and tags. My question is when should I use a branch and when should I use a tag?
For example, say I create a branch for version 1.1 of a project. When I finish and release this version, should I leave the branch to mark the re... |
Although I consider myself not much experienced, I keep landing in jobs as the leader somehow (in the current one I am tech director of the company, in a previous one I was the R&D head).
I understand why this happen (I have a certain specific set of skills, and I use some uncommon programming languages), my issue is: ... |
I like to comment my code with various information, and I think most people nowadays do so while writing some code.
But when it comes to database tables or columns, I have never seen anyone setting some comments, and, to be honest, I don't even think of looking for comments there.
So I am wondering if some people are c... |
In the academic sense, do regular expressions qualify as a programming language?
The motivation for my curiosity is an SO question I just looked at which asked "can regex do X?" and it made me wonder what can be said in the generic sense about the possible solutions using them.
I am basically asking, "are regular expre... |
I have two Mac applications that I wrote for my own personal use, but I'm considering polishing them up and giving selling them on the Mac App Store a try. It seemed very premature to consider what would happen if either app would become successful enough to make it possible to set up a business around it, or to sell i... |
I was wondering the if if-else statements, is like a switch statement that does have a break statement.
if( boolean_expression_1 )
statement_1
else if( boolean_expression_2 )
statement_2
else
default_statement
Is the same as:
switch( controlling_expression )
{
case: ( boolean_expression_1 )
{
statemen... |
I know that it's been proven that a coding standard helps enormously. However, there are many different tools and IDEs that will format to whatever standard the programmer prefers. So long as the code's neat/commented (and not a spaghetti mess), I don't see the need for a coding standard.
Are there any arguments fo... |
I spent the last week learning 3 new tools: R, Sweave, and LaTeX. One question that came to my mind when working through my first project: Where do I place the majority of the R code?
The tutorials that I read online placed the majority of the R code in the LaTeX .Rnw file. However, I find having a bunch of R calculati... |
I saw these methods in the Line2D Java Docs but did not understand what they do?
Javadoc for ptLineDist says:
Returns the distance from a point to this line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by this Line2D. If the specified... |
Should coding standards/style be enforced by the continuous integration server running static analysis tools (ex. PMD, StyleCop/FxCop) and failing the build if the standards are not followed? What types of rules should not be used to fail the build?
|
- Problem
In the last couple weeks, I've used 3 different "repository" tools (listed in alphabetical order):
gradle
ivy
maven
I'm calling them "repository" tools because I've also used sbt -- which fortunately uses ivy to manage it's cache or local repository.
Each of these tools will create it's own repository. Th... |
I have an enumeration with the commands Play, Stop and Pause for a media player. In two classes I do a switch-case over the received commands. The player runs in a different thread and I deliver the commands in a command queue to the thread.
If I generate class diagrams the enumeration has dependencies all over the pl... |
I understand 'invariant' in its literal sense. I also recognize them when I type code. But I don't think I understand the importance of this term in the context of computer science.
Whenever I read conversations\white papers about language design from famous programmers\computer scientists, the term 'invariant' keeps ... |
I've learned php and c++, i will list the things i liked and didn't liked on each of them, how i decided to learn them in the first place and why i feel the need to learn a decent alternative to c++, i'm not a professional programmer and only do projects for myself.
PHP - Decided to learn because i wanted to build a dy... |
Given this Javascript example I found
var sum = function() {
var i, sum = 0;
for(i = 0; i < arguments.length; i += 1) {
sum += arguments[i];
}
return sum;
};
What advantage is there in assigning a function to a var?
|
I am yet to find the perfect way to diagrammatically represent the overall threading architecture for a system (using UML or otherwise).
I am after a diagramming technique that would show all the threads in a given system and how they interact with each other. There are a few similar questions - Drawing Thread Interac... |
I'm writing several JavaScript plugins that are run automatically when the proper HTML markup is detected on the page. For example, when a tabs class is detected, the tabs plugin is loaded dynamically and it automatically applies the tab functionality. Any customization options for the JavaScript plugin are set via HTM... |
When I was starting out, it seemed I had a much better time getting interviews and passing them. But now that I'm more experienced, I'm finding that its harder and harder to find a job. Do other developers out there feel the same way?
I'll give you an example. I did an interview last Wednesday. It was a small start-up ... |
Alright, to start off, I have experience as an amateur Obj-C/Cocoa and Ruby w/Rails programmer. These are great, but they aren't really helpful for writing cross-platform applications (hopefully GNUStep will one day be complete enough for the first to be multi platform, but that day is not today).
C++, from what I can ... |
I am not clear on this one. No matter the terminology, in the end the software fault/bug causes (according to a lot of sources):
Deviation from requirements
Devation from expectations
But if the expectations are not in requirements, then stakeholder could see a bug everywhere as he expected it to be like this or t... |
I'm working on an ASP.NET MVC website which performs relatively complex calculations as one of its functions.
This functionality was developed some time ago (before I started working on the website) and defects have occurred whereby the calculations are not being calculated properly (basically these calculations are ... |
I was recently going over MPEG articles and videos to understand how it works. I understand what I, P and B frames do but I do not understand how the prediction is calculated.
Assume that I want to record a video of a ball falling from the sky to the ground and then bouncing a couple of times before finally coming to a... |
I am involved in a large development project in which we (a very small start up) are developing for an outside client (a very large company).
We recently received their first output from UAT testing of a fairly small iteration, which listed 12 'defects', triaged into three categories : Low, Medium and High.
The issue ... |
I'm currently working with Visio to create Data Flow Diagrams for a System Analysis and Design class but I'm unsure what the difference between ------ and ------> is. I can connect 2 shapes together with a line (process, entity, data store) but does the single line connecting the two mean data flow? Do I need to explic... |
A question about form controls invoke function.
Control1 is created on thread1.
If you want to update something in Control1 from thread2
you must do something like:
delegate void SetTextCallback(string txt);
void setText(string txt)
{
if (this.textBox1.InvokeRequired)
{
SetTextCallback d = new Set... |
When teaching recently about the Big vs. Little Endian battle, a student asked whether it had been settled, and I realized I didn't know. Looking at the Wikipedia article, it seems that the most popular current OS/architecture pairs use Little Endian but that Internet Protocol specifies Big Endian for transferring nume... |
I'm programming a Javascript application which saves "documents" in localStorage. As the app evolves, naturally there are changes in the document format.
I've tried searching but not found anything – probably (at least partly) because of search term ambiguities.
What is a good practice in managing document format vers... |
The Node.js about page describes HTTP as being a "first class protocol" within node.js. What does this mean?
http://nodejs.org/about
|
Previous related questions:
Code bases for desktop and mobile versions of the same app
Git branching and tagging best practices
Question:
I have split my repo into three directories (swing, android, and common) as suggested by @KarlBielefeldt in response to my previous question. Now I am jumping back and forth betwee... |
By recently looking at the TIOBE Programming Community Index (Sep 2012) I noticed the following order:
C
Java
Objective-C
C++
C#
PHP
When looking at the tag frequencies of stackoverflow however, the situation is as follows:
C#
Java
PHP
JS
Android
jquery (JS)
iphone (Objective-C)
C++
(Java takes the lead when accoun... |
I have a problem that boils to down having a set of integers and wanting the subset of those integers whose sum is closest to some target without going over. What's a good algorithm for doing this? Maybe it's even a well known problem whose name I don't know?
|
I have a habit of writing small, reusable components in my spare time. I reuse these components with my clients' code bases. It occurs to me there's a potential issue that using identical code for multiple clients may bite me back in the future. I don't care who uses the code. I just don't want a situation where on... |
Let me start by saying that I am a computer security researcher. Part of my job is to create malware to deploy on a controlled environment in order to study or evaluate several aspects of computer security.
Now, I am starting to think that using an online code hosting service (such as BitBucket, Github, etc...) to have... |
I have read Principles for the Agile Architect, where they defined next principles :
Principle #1 The teams that code the system design the system.
Principle #2 Build the simplest architecture that can possibly work.
Principle #3 When in doubt, code it out.
Principle #4 They build it, they test it.
Principle #... |
We're trying to write a custom scripting language. There has been a suggestion to make the language forgiving by providing case insensitive keywords.
I personally do not like the idea, but there are few people in my team leaning towards it, saying it will make the end user happy! Examples of languages like FORTRAN, BAS... |
I am writing a network wrapper around boost::asio and was wondering what is a good and simple way to serialize my messages. I have a message factory which can take care of dispatching the data to the correct builder, but I want to know if there are any established solutions for getting the binary data on the sender sid... |
I'm creating an application which has 2 different UIs so I'm making it with a service layer which I understood is appropriate for such scenario.
However I found myself just creating web methods for every single method I have in the BL layer, so the services basically built from methods that looks like this:
return cust... |
Say we have a task logging system, when a task is logged, the user specifies a category and the task defaults to a status of 'Outstanding'. Assume in this instance that Category and Status have to be implemented as entities. Normally I would do this:
Application Layer:
public class TaskService
{
//...
public v... |
So I was asking around the Mercurial development mailing list about binary diffing and patch handling and I got the following examples:
whole file approaches (classic diff, bsdiff, Mercurial's internal
bdiff)
windowed streaming approaches (rsync, xdelta, libxdiff)
What does "windowed streaming" stand for in this cont... |
From what I've read agile development often involves refactoring or reverse engineering code into diagrams. Of course there is much more than that, but if we consider the practices that rely on these two methods, are dynamically typed languages at disadvantage?
It seem staticly-typed languages would make refactoring an... |
As I've become a better developer, I find that much of my design skill comes more from intuition than mechanical analysis. This is great. It lets me read code and get a feel for it quicker. It lets me translate designs between languages and abstractions much easier. And it lets me get stuff done faster.
The downside is... |
I'm experiencing a trouble with my business model, let me explain better.
I'm developing a software for 1 year and few months, it's for the food industry, more exactly a software to: Delivery, Take Way, Table Reservation, POS, Accounts Payable and Receivable, Prints(receipt), Kitchen Monitors Orders, Customers Orders C... |
Possible Duplicate:
Defensive Programming vs Exception Handling?
if/else statements or exceptions
I often come across heated blog posts where the author uses the argument: "exceptions vs explicit error checking" to advocate his/her preferred language over some other language. The general consensus seems to be that l... |
In an application framework
when performance impact can be ignored (10-20 events per second at max),
what is more maintainable and flexible to use as a preferred medium for communication between modules - Events or Futures/Promises/Monads?
It's often being said, that Events (pub/sub, mediator) allow loose-coupling and... |
I am starting a new job soon as a frontend developer. The App I would be working on is 100% Javascript on the client side. all the server returns is an index page that loads all the Javascript files needed by the app.
Now here is the problem:
The whole of the application is built around having functions wrapped to diff... |
My main platform (WinAPI) still heavily uses bits for control styles etc. (example).
When introducing custom controls, I'm permanently wondering whether to follow that style or rather use individual bool's. Let's pit them against each other:
enum EMyCtrlStyles
{
mcsUseFileIcon = 1,
mcsTruncateFileName = 2,
m... |
I'm encountering a lot of methods in my project that have a bunch of out parameters embedded in them and its making it cumbersome to call the methods as I have to start declaring the variables before calling the methods.
As such, I would like to refactor the code to return a struct instead and was wondering if this is... |
Given some string fragments, I would like to find the shortest possible single string ("output string") that contains all the fragments. Fragments can overlap each other in the output string.
Example:
For the string fragments:
BCDA
AGF
ABC
The following output string contains all fragments, and was made by naive appen... |
I need to develop an GUI application in C# where users can freely add conditional/statement blocks on the algorithm flowchart like the one shown below. By freely, I mean users can add a block on wherever the arrows are.
I'm having some problems brainstorming how to approach this problem, especially what to choose for m... |
In our Scrum teams we use a backlog, which mostly contains functional topics, but also sometimes contains technical topics. The advantage of having 1 backlog is that it becomes easy to choose the topics for the next sprint, but I have some questions:
First, to me it seems more logical to have a separate technical bac... |
Background
I just began working for a religious non-profit organization. As with most non-profits, the organization is resource-poor and has no IT department to speak of. In my two months here I've received 20 requests for websites, apps, and internal automation. Many of these 20 requests have merit and would benefit t... |
UML Diagrams take time and even though they provide knowledge about program design, the design changes and so do requirements, and hence it becomes a chore to keep UML Diagrams in Sync with code. I am trying to figure out how should we use UML in an optimum way.
|
I am primarily a Web Developer (back end programming) - but intend to offer a complete service to my clients, from concept, to brand design, photoshop mock-ups and everything else in between. I'm aware that it's a good idea to outsource this design aspect of the project to someone that I trust. My question is more abou... |
The C++ standard (I noticed it in the new one, but it did already exist in C++03) specifies universal character names, written as \uNNNN and \UNNNNNNNN and representing the characters with unicode codepoints NNNN/NNNNNNNN. This is useful with string literals, especially since explicitly UTF-8, UTF-16 and UCS-4 string l... |
I'm in the process of making a fork of GNU coreutils with a range of modifications. I'd like to release the result as an open-source project, but I'm not so much of a fan of GNU GPL as a license.
Is it possible to change the license, or provide the software under both GNU GPL v3 and CC BY-NC-SA?
|
For converting a Java object model into XML I am using the following design:
For different types of objects (e.g. primitive types, collections, null, etc.) I define each its own converter, which acts appropriate with respect to the given type. This way it can easily extended without adding code to a huge if-else-then c... |
On a debate over what Scrum is all about, I found that perhaps I totally misunderstood the agile thing. It appears to me that Scrum (which is certainly considered an Agile process) is all about managing features and sprints and roles and stuff with nothing to do with TDD, pair programming, CI, refactoring and other dev... |
I really hope you can give me some interesting viewpoints for my situation, because I am not satisfied with my current approach.
I am writing an MP3 parser, starting with an ID3v2 parser.
Right now I`m working on the extended header parsing, my issue is that the optional header is defined differently in version 2.3 and... |
There is a very prestigious company that delivers a well-sold software about financial systems. It has more that 20 years of history, and is staffed with about 20 programmers and much larger number of managerial staff.
Dissatisfied customers have reported strange bugs and no one has a clue what is wrong, hard to read... |
After a recent heated debate over Scrum, I realized my problem is that I think of management as a quite unnecessary and redundant activity in a fully agile team. I believe a mature Agile team does not require management or any non-technical decision making process whatsoever. To my (apparently erring) eyes it is more t... |
I'm looking into improving our build and release system. We are a .Net/Windows shop, and I don't see any really good tools for Windows for generating the files that are to be dropped in patch or hotfix. We are currently using TFSBuild 2010 with Windows Workflows for our continuous integration builds as well as our da... |
I have to programmatically distribute a set of items to some entities, but there are rules both on the items and on the entities like so:
Item one: 100 units, only entities from Foo
Item two: 200 units, no restrictions
Item three: 100 units, only entities that have Bar
Entity one: Only items that have Baz
Entity one h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.