instruction stringlengths 34 19.9k |
|---|
I'm planning to map some of my TFS projects to two different directories as discussed here. I'll be using two different workspaces, both with the same Computer and the same Owner.
Is there any reason why this would be a bad idea? Are there any complications with merging or locks that one user with two mappings would ... |
So here's a typical workflow on Github...
Like some project -> fork it -> git clone https://github.com/you/someproject.
Open project. Like what you see, but make some changes.
Having been careful to work only in a feature-branch (git checkout -b some-feature), you decide to make a pull request with the upstream ma... |
I'm looking for an umbrella term for all the nitty-gritty requirements that it's helpful to have specified up front but which the client never thinks about in his excitement about the product.
In the client's mind, they think of the headline requirements, the main user stories such as "I need to be able to view the sta... |
Watching a CEO for a new "cloud computing" company describe his company on a finance TV program today, he said something like "Cloud computing is superior to old-fashioned client-server computing".
Now I'm confused. Can someone please explain what "cloud computing" means in contrast to client-server?
As far as I under... |
Generally whenever we're programming in any Programming language, say C, we would pass the parameters we need to pass to a function using the parentheses next to the name of the function. Whereas in jQuery, other than the user defined function() we write the action we need the function to perform inside the parentheses... |
I started working at a company that is primarily C# oriented. We have a few people who like Java and JRuby, but a majority of programmers here like C#. I was hired because I have a lot of experience building web applications and because I lean towards newer technologies like JRuby on Rails or nodejs.
I have recently st... |
At my company, all of our development (bug fixes and new features) is done on separate branches. When it's complete, we send it off to QA who tests it on that branch, and when they give us the green light, we merge it into our main branch. This could take anywhere between a day and a year.
If we try to squeeze any refa... |
When I created my first web application few years ago, I remember trying to use the designer in VS 2008. Before I can even remember I abandoned it to the favor of actual debug to understand how my UI will actually look like.
Since then, I gave it few more shoots but I was never convinced that it's even possible to buil... |
My doubt arises from this sentence in the gifmerge distribution conditions:
"This software may be freely copied, modified and redistributed without fee provided that this copyright notice is preserved intact on all copies and modified copies."
Especially the "without fee" part is the one thet puzzle me.
Can some expert... |
I'm under the impression, and I agree with it, that it's bad to create a web application requiring JavaScript to function properly.
What if one were to create a single page application? Is it possible to create one that doesn't rely on JavaScript, without being difficult, or full of "hacks"?
|
I'm a Rails developer doing TDD on a Mac with RSpec, Capybara and Selenium webdriver. Now I have been asked by my company to use this approach for a .NET on Windows environment. What is the best way of doing this?
I could just install Ruby and use RSPEC, Capybara and Selenium webdriver for integration testing. But what... |
Current field-of-use restrictions defined in "Oracle Binary Code License Agreement for the Java SE Platform Products" prohibit its use in embedded systems.
"General Purpose Desktop Computers and Servers" means computers, including desktop and laptop computers, or servers, used for general computing functions under end... |
I am reading a book called Rails AntiPatterns and they talk about using delegation to to avoid breaking the Law of Demeter. Here is their prime example:
They believe that calling something like this in the controller is bad (and I agree)
@street = @invoice.customer.address.street
Their proposed solution is to do the f... |
I have a task that involves talking to a .NET-based API (namely AutoCAD) to retrieve data, send commands, and react to events.
I want to separate the API operations and the proper program logic (largely already implemented in Python) by using natural tools for both: a C# DLL for the former and a Python app for the latt... |
I wonder if I should close any unnecessary database connection inside of my PHP scripts.
I am aware of the fact that database connections are closed implicitly when the block stops executing and 'manually' closing the connections could kinda bloat the codebase with unnecessary code.
But shouldn't I do so in order to ma... |
I am fairly new in product development and I am trying to work over a product. The problem that I have realized is that people draw diagrams and charts showing different modules and layers.
But as I am working alone (I am my own team) I got a bit confused about the interaction I am facing in the development within the ... |
I have the following tables in my database:
Configuration Table:
======================================
Start_Range | End Range | Config_id
10 | 15 | 1
======================================
Available_UserIDs
==========================
ID | UserID | Used_YN |
1 | 10 | t |
1 | 11... |
I'm using an SPI host adapter for a project. The Aardvark from TotalPhase. And I did something crazy, I read that EULA license that everyone just clicks through.
The driver installation license includes these bits:
This driver installer package also includes a WIN32 driver that is
entirely based on the libusb-win32 pr... |
I am researching alternatives to database-level pessimistic locking to achieve transaction isolation in a cluster of Java applications going against the same database. Synchronizing concurrent access in the application tier is clearly not a solution in the present configuration because the same database transaction ca... |
I'm curious if there's a series of tendencies or anti-patterns when programming whereby a developer will always locally re-wrap external dependencies when consuming them.
A slightly less vague example might be say when consuming an implementation of an interface or abstract, and mapping every touch-point locally before... |
I am asking this question in continuation with http-session-or-database-approach.
I am planning to follow this approach.
When user add product to cart, create a Cart Model, add items to cart and save to DB.
Convert Cart model to cart data and save it to HTTP session.
Any update/ edit update underlying cart in DB and u... |
I am reading a book called Rails AntiPatterns and they talk about using delegation to to avoid breaking the Law of Demeter. Here is their prime example:
They believe that calling something like this in the controller is bad (and I agree)
@street = @invoice.customer.address.street
Their proposed solution is to do the f... |
I am reading a book called Rails AntiPatterns and they talk about using delegation to to avoid breaking the Law of Demeter. Here is their prime example:
They believe that calling something like this in the controller is bad (and I agree)
@street = @invoice.customer.address.street
Their proposed solution is to do the f... |
On my dev team, we're doing code reviews, however not in a proper way i believe.
The issues our process suffers from:
Not enough time is allocated for proper code review.
Doing reviews is not mandatory - many times it is simply not done.
Devs sit together for reviews, due to lack of another easy mechanism for doing it... |
I'm trying to refactor some code such that the display is separate from the implementation, and I'm not sure where to put the existing enums.
My project is currently structured as follows:
Utilities
RemoteData (Depends on: Utilities)
LocalData (Depends on: RemoteData, Utilities)
RemoteWeb (Depends on: RemoteData, Uti... |
I want to create a immutable Scale class in C#.
public sealed class Scale
{
string _Name;
string _Description;
SomeOrderedCollection _ScaleValueDefinitions;
Unit _Unit
// properties
....
// methods
ContainsValue(double value)
....
// constructors
// all parameters except sc... |
My java code is just like below:
public void check()throws MissingParamException{
......
}
public static void main(){
PrintWriter out = response.getWriter();
try {
check();
} catch (MissingParamException e) {
// TODO Auto-generated catch block
out.println("message:"+e.getMessage... |
I wonder if I should write a database class for my application, and if so, how to accomplish it?
Over there on SO, a guy mentioned it should be written as an abstract class. However, I can't understand why this would be a benefit.
Do I understand correctly, that if I would write an abstract class, every other class tha... |
Are there established models for releasing an initially proprietary piece of software under FLOSS conditions after a defined period or a certain point of time? The main problem here is that all parties involved must be able to trust that the Open Source licensing will actually take place at the defined time and no par... |
I'm currently trying to figure out the best techniques for organizing GUI view hierarchies, that is dividing a window into several panels which are in turn divided into other components.
I've given a look to the Composite Design Pattern, but I don't know if I can find better alternatives, so I'd appreciate to know if u... |
for a lot of quick tasks where one could employ a function f(x,y), in plain C, macros are used. I would like to ask specifically about these cases, that are solvable by a function call (i.e. macros used for inlining functions, not for code expansion of arbitrary code).
Typically C functions are not inlined since they m... |
I come from a Java background and I have been working with PHP for almost a year now. I have worked with WordPress, Zend and currently I'm using CakePHP. I was going through Cake's lib and I couldn't help notice that Cake goes a long way avoiding the "private" access specifier. Cake says
Try to avoid private methods ... |
It's simple to ping a server in C#, but suppose I have servers A, B and C.
A connects to B.
A asks B to ping C, to check that B can talk to C.
A needs to read the outcome.
Now, first of all is this possible without installing an application onto B? In other words, can I perform the entire check from just running a prog... |
I know that may sound a little vague, so I'll try and explain a little further...
After being self employed developer for many years I'm now in search of a commercial web developer role. My only experience with servers and hosting is uploading through FTP and playing around with CPanel/WHM a little. The role's I'm goin... |
I have some web sites programmed, I know to do it with python and PHP basically. Normally they are simple web sites, but now I want to provide REST web services but only for allowed users (allowed by me).
I saw that a lot of services uses the "KEY" and "SECRET_KEY" concepts, which seems to be what I need (if I understa... |
I've been using RTMFP streaming for around a year in ActionScript 3, and I pretty much know the difference between a near ID and far ID. The near ID is your peer ID, and the far ID is the other guy's peer ID.
The problem I'm having is that, to my knowledge, choosing whether to use one term or the other in a given sent... |
I was recently asked how to do this, specifically:
How to introduce QA into an organization?
How to break up QA into parts that others can do ?
How to prioritize what needs QA?
How to determine what to buy? code? etc.
The organization uses Rails on Rails extensively as the development platform
Note: I am posting a l... |
I see that most implementations of JAX-RS represent a class object containing a list of elements as follows (assume a class House containing a list of People)
<houses>
<house>
<person>
<name>Adam</name>
</person>
<person>
<name>Blake</name>
</person>
</house>
<house>
</house>
</house... |
I was doubting: I'm writing a cross-platform engine OpenGL C++, I figured out Windows forces the developers to access OpenGL features above 1.1 through extensions.
Now the thing is, on Linux, I know that I can directly access functions if the version supports it through glext.h and opengl version. The problem is that i... |
I'm trying to understand what types of models that I have traditionally persisted relationally would translate well to some kind of NoSQL database. Suppose I have a model with the following relationships:
Product 1-----0..N Order
Customer 1-----0..N Order
And suppose I need to frequently query things like All Orde... |
I'm writing several methods that call other methods.
To pass the information I have a couple of choices:
Pass the information as parameters
Set instance variables so that other methods can access them
When should I choose one option over the other?
It seems that the first option is good as it is very specific about w... |
I have TopicBusiness.class and PostBusiness.class. I have no problem with deciding into which class methods such as addPostToDatabase() or getAllPostsFromDatabase() should go. But what about getAllPostsFromTopic(TopicEntity topic) or getNumberOfPostsInTopic(TopicEntity topic)?
Should the parameter be the deciding facto... |
I developed an offensive content checker for my website and want to publish it on GitHub. However, the source code contains many offensive, racist and otherwise nasty content.
The source is fully documented, but I wanted your opinion on whether it's acceptable to publish such work on GitHub or whether to leave the arra... |
I am usually a Python / Database programmer, and I am considering using C for a problem.
I have a set of sequences, 8 characters long with 4 possible characters. My problem involves combining sets of these sequences and filtering which sets match a criteria. The combinations of 5 run into billions of rows and takes aro... |
It seems like there's a new major security hole patched in Java every other week, and I would assume the same goes for other development platforms. After years of frustration trying to get customers to install and configure a compatible JRE on their systems, we started bundling one with our software. (By bundling, I ... |
I have this Tic Tac Toe game and I thought of this really cool way to draw out the grid of 9 little boxes. I was thinking of putting buttons in each of those boxes.
How should I give each button (9 buttons in total) an ActionListener that draws either an X or O?
Should they each have their own, or should I do some sort... |
I'm fully redesigning a site that indexes a number of articles with basic search functionality. The previous site was written about a decade ago, and I'm salvaging about 30,000 entries with data stored in less-than-ideal formats. While I'm moving from MSSQL to MySQL, I don't need to make any "live" changes, so this i... |
There are some cases where some of the data on a class of the domain model of an application seems to be dependent on the technology being used. One example of this is the following: suppose we are building one application in .NET such that there's the need of an Employee class. Suppose further that we are going to imp... |
I'm creating an application that sits in the background and records all key presses (currently this is done and working; an event is fired every keydown/keyup). I want to offer a feature for the user that will show them their WPM over the entire session the program has been running for. This would be easy if I added ... |
I'm trying to understand what an event loop is. Often the explanation is that in an event loop, you do something until you're notified that an event has occurred. You then handle the event and continue doing what you were doing before.
To map the above definition with an example. I have a server which 'listens' in a ev... |
I am starting a side project in C which requires multiple storage backends to be driven by a particular piece of logic. These storage backends would each be linked with the decision of which one to use specified at runtime.
So for example if I invoke my program with one set of parameters it will perform the operations ... |
I want to ask whether any materials that has "Free for non-commercial use" license can be used in a GNU GPLv3 licensed software.
In my opinion, it is "free for non-commericial use", and GNU GPLv3 is also non-commericial, so it can be used in the software, is it?
I'm asking this question because there are no explicit o... |
I've read about feedback loops, how much this steady state error is for a given gain and what to do to remove this steady state error (add integral and/or derivative gains to the controller), but I don't understand at all why this steady state error occurs in the first place.
If I understand how a proportional control ... |
I was going thru a video (from coursera - by sedgewick) in which he argues that you cannot sustain Moore's law using a quadratic algorithm.He elaborates like this
In year 197* you build a computer of power X ,and need to count N objects.This takes M days
According to Moore's law,you have a computer of power 2X after 1.... |
Recently I had an interview with dev team in a company. The team uses agile + TDD.
The code exercise implements a video rental store which generates statement to calc total rental fee for each type of video (new release, children, etc) for a customer. The existing code use object like:
Statement to generate stateme... |
I have written a small open source Java library for facilitating conversions between different types of objects (in the style of Google's gson, but quite more general).
It seems to me that a nice natural name for my library is JConverter, after browsing in the web to see if another library with the same name already e... |
How to handle multiple statuses for a table entry, for example an item table may have an active, inactive, fast moving, and/or batch statuses. And I wanted to handle them in single column with VARCHAR type. Also I might set each of those attributes as a boolean with different columns. But I am not sure what consequence... |
I understand how GitHub works, but one thing I've been confused about is, why almost every OSS project lately has a "Fork me on GitHub" link on their homepage. For example,
http://jqtjs.com/, http://www.daviddurman.com/flexi-color-picker/, and others.
Why is this so common? Is it that they want/need code validation, ch... |
There is a growing industry now with more than 30 companies playing in the Backend-As-A-Service (BaaS) market.
The principle is simple: give companies a secure way of exposing data housed on premises and behind the firewall publicly.
This can include database data, as well as Legacy PC data through established connecto... |
I've got a database where I want to store user information and user_meta information.
The reason behind setting it up in this way was because the user_meta side may change over time and I would like to do this without disrupting the master user table.
If possible, I would like some advice on how to best set up this met... |
I have a class, say Foo, and every instance of Foo will need and contain the same List object, myList.
Since every class instance will share the same List Object, I thought it would be good to make myList static and use a static function to set myList before the constructor is called.
I was wondering if this was bad, b... |
I'm writing a paper on the topic of applications affected more by memory performance than processor performance. I've got a lot written regarding the gap between the two, however I can't seem to find anything about the applications that might be affected more by memory performance than by processor speed.
I suppose the... |
I have the following classes:
Teacher
Student
Class (like a school class)
They all extend from KObject that has the following code:
- initWithKey
- send
- processKey
Teacher, Student Class all use the functions processKey and initWithKey from KObject parent class. They implement their own version of send. Th... |
Basically, I want to make api calls using an SDK I am writing.
I have the following classes:
Car
CarData (stores input values needed to create a car like model, make, etc)
Basically to create a car I do the following:
[Car carWithData: cardata onSuccess: successHandler onError: errorHandler]
that basically is a fa... |
I saw how Struts 1 lasted from 2000 to 2013. I hear that people are moving from Struts 2 to Spring. But for a project that may need to be maintained for a decade or two, would it be advisable to opt for a framework or directly code with servlets and jquery? Can a system architecture really be designed keeping in mind a... |
I am comparing jpeg to jpeg in a constant 'video-stream'. I am using EMGU/OpenCV to compare each pixels at the byte level. There are 3 channels to each image (RGB). I have heard that it is common practice to store only the pixels that have changed between frames as a way of conserving memory space. But, if for instance... |
OK, I'm facing this all the time in many functions I write, which should I use?
void sth(int* a)
void sth(int& a)
Which one is faster, regarding two separate occasions: a is a small variable or a is a large data struct.
I would like a deep answers with pertinence to the actual hardware and stack process.
|
I'm a complete beginner at Assembly, and my aim is to learn as much as I can to do with Assembly to one day I can reach expert level (I know I'm way off right now, but you never know). My only problem is this: I've got two books which both teach assembly, one on a Linux and the other on Windows. They are Jeff Duntemann... |
I am a asp.net mvc programmer and if I want to start a project I do this:
I make a class library named Model for my models.
I make a class library named Infrastructure.Repository for database processes
I make a class library named Application for business logic layer
And finally I make a MVC project for the UI.
But n... |
So a large client of mine gave me access to their Organisation GitHub account.
With it came a login for myself (on github.companyname.com) and of course access to certain repos on their company account (by switching the user to the company via the button in the top left).
Now I was wondering, since I can create priva... |
I am looking for an idea on how to decipher a columnar transposition cipher without knowing the key or the length of the key.
When I take the cipher text as input to my algorithm I will guess the length of the key to be the factors of the length of the cipher text.
I will take the first factor suppose the length was ... |
Question
I'm currently working a on an assignment for school. The assignment is to create a puzzle/calculator program in which you learn how to work with different datastructures (such as Stacks). We have generate infix math strings suchs as "1 + 2 * 3 - 4" and then turn them in to postfix math strings such as "1 2 + ... |
I'm looking for a language that will let me do what I could do with Clipper years ago, and which I can do with Tcl, namely add functionality in a way other than just adding functions.
For example in Clipper/(x)Harbour there are commands #command, #translate, #xcommand and #xtranslate that allow things like this:
#xcomm... |
There was a talk given by Brian Hurt about advantages and disadvantages of static typing. Brian said that by static typing he don't mean C#, but F# and Haskell.
Is it because of dynamic keyword added to C#-4.0? But this feature is relatively rarely useful. By the way, there are ⊥ and unsafeCoerse in Haskell which obvio... |
While bouncing around StackOverflow, I've noticed a number of people attaching events (notably click events) to the document as opposed to the elements themselves.
Example:
Given this:
<button id="myButton">CLICK ME</button>
Instead of writing this (using jQuery just for brevity):
$('#myButton').on('click', function()... |
I've got a couple of data access objects (DefaultPersonServices.class, DefaultAddressServices.class) which is responsible for various CRUD operations in a database.
A few different classes use these services, but as the services requires that a connection is established with a database I can't really use them in unit ... |
On one hand, I have been taught by various software engineering books ([1] as example) that my job as a programmer is to make the best possible software: great design, flexibility, to be easily maintained etc.
One the other hand although I realize that I actually write software for money and not for entertainment, alt... |
If I use database by creating adapter with drivers, initialize it in some abstract class and extend that abstract class to required model. Then use simple query statement. Like this:
namespace My-Model\Model\DB;
abstract class MysqliDB {
protected $adapter;
public function __construct(){
$this->adapte... |
Can anyone help me in understanding how float values are stored in the memory.
My doubt is here float values contain '.' (for example 3.45) how the '.' will be represented in the memory?
Can anyone please clarify me with a diagram?
|
For example an activity diagram for a simple program:
Get User data.
If User Exists DO something, ELSE do nothing.
End.
I often see diagrams with multiple endpoints but also with just one. Should activity diagrams merge both ways to one final state, regardless of the previous paths?
|
In almost every application you have this look up entity that provides a dynamic references. This are things like type, category, etc. These entities will always have
id, name, desc
So at first I designed different entities for each look up. Like
education_type, education_level, degree_type....
But on a second thou... |
I am developing an app where four types of user share same module. So is it a good idea to create:
one table and user_type and user_id (something like that)
table prefixes basically 4 diff tables of same columns
your own suggestion
(keeping in mind its a CakePHP App so joins and contain will be there)
|
Let's say I have the following:
package me.my.pkg;
public interface Something {
/* ... couple of methods go here ... */
}
and:
package me.my;
import me.my.pkg.Something;
public class SomeClass implements Something {
/* ... implementation of Something goes here ... */
/* ... some more method implementations... |
I need to match two sets of 3D points, however the number of points in each set can be different. It seems that most algorithms are designed to align images and trimmed to work with hundreds of thousands of points. My case are 50 to 150 points in each of the two sets.
So far I have acquainted myself with Iterative Clos... |
Many of the most popular programming languges (such as C++, Java, Python etc.) have the concept of hiding / shadowing of variables or functions. When I've encountered hiding or shadowing they have been the cause of hard to find bugs and I've never seen a case where I found it necessary to use these features of the lang... |
Let me introduce my situation:
I have Java EE application and in one package, I want to have classes which will act primarily as cache for some data from database, for example:
class that will hold all articles for our website
class that will hold all categories
etc.
Every class should have some update() method, whic... |
I have doubts in JVisual VM profiler tool related to performance. I have requirement to implement a JVM Monitoring tool for my enterpise java application. I have gone through some profiling tools in market but all them are having some kind of agent file which we need include in server startup.
I have a fear that these... |
By index, I mean, as the user creates the list, each item receives an integer index for its place in that particular list. Since there will be a table of ListItems, I'd prefer to avoid using the name "Index" for the field.
Then I was thinking - should I even include the list index in the database? I figured I would b... |
Does it make more sense to store and retrieve properties or information directly related to an item in a database, or, say in such a case that a product's ID could describe information about it, should the information be gathered from that?
Example: Item SKU -- 4HBU12
4 - is the number of motors
H - the voltage
B - t... |
I need some help or maybe only a hint for the right direction.
I've got a system that is sperated into two applications.
An existing VB.NET desktop client using Entity Framework 5 with code first approach and a asp.net Web Api client in C# that will be refactored right yet. It should be possible to deliver OData.
The ... |
TDD proponents claim that it results in better design and decoupled objects. I can understand that writing tests first enforces the use of things like dependency injection, resulting in loosely coupled objects. However, TDD is based on unit tests - which test individual methods and not the integration between objects. ... |
I am working on a hobby project called Menu/Recipe Management.
This is how my entities and their relations look like.
A Nutrient has properties Code and Value
An Ingredient has a collection of Nutrients
A Recipe has a Collection of Ingredients and occasionally can have a collection of other recipes
A Meal has a Collect... |
I didn't learn programming at school and I do not work as a (professional) developer, hence a lot of basics are not quite clear to me. This question tries to clarify one of them.
Now let's suppose that I have issues #1, #2 and #3 in my Issues Tracker that are set to be corrected/enhanced for version 1.0.0 and that th... |
I'm implementing a REST method that allows you to post a list of items. If all data is correct I obviously return a 201 and if all data is incorrect a 400.
What would be an appropriate response code if some items are correct and others are not?
|
Okay, so I am looking for a way to safely run a randomly generated binary code. I also need to be able to decompile the code. Any ideas and all programming languages are welcome.
BTW it most be binary code; byte code or source code will not work. This is a research project, so I can't go adding variables.
|
I'm curious to know how Google stores the matrix that's used in the PageRank algorithm; and am looking for a data-structure for storing a very-large (not fitting in memory of any one computer) sparse matrix, and efficiently (not sure what that means yet) performing operations on it.
If there's a white-paper available ... |
If my MSSQL database contains a data type that is NULL (i.e. null is allowed) then ORMs, such as EntityFramework in my case, create .NET objects that are nullable.
This is great, and the way I use nullables is like this:
C#
int? someInt = 5;
int newInt = someInt.Value; // woot
VB.NET
Dim someInt As Integer?
Dim newI... |
Being a PHP guy myself I recently had to write a spider to an asp.net site. I was really surprised by the different approach to ajax and form-handling.
For example, in the PHP sites I've worked with, a deletion of a database entry would be something like:
GET delete.php?id=&confirm=yes and get a "success" back in some ... |
To my knowledge, event signal actions are not allowed to have output control flow, so how can I model the end of an activity after a event signal action? The same issue arises for accept event actions and activity start nodes.
|
I've been developing for 6-7 years but never in a particularly agile way. With the latest project I'm trying to make our development process more professional, and more agile.
We're using Pivotal Tracker to track the project and have gathered some pretty well thought out stories. We're also trying to keep some of our ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.