instruction stringlengths 34 19.9k |
|---|
I am working on an application that has many functional parts.
When a customer buys the application, he buys the standard functionality, but he can also buy some additional elements of the application for an additional price.
All of the elements are part of the same application executable.
A license key is used to indi... |
When an API requires that a client authenticates to it, i've seen two different scenarios used and I am wondering which case I should use for my situation.
Example 1. An API is offered by a company to allow third parties to authenticate with a token and secret using HTTP Basic.
Example 2. An API accepts a username and ... |
For the past 6 months or more, I've been seeing many codes hosted at sourceforge.net as well as other hosting sites "Move to GitHub". A mere Google Search with the phrase "Moved to Github" returns several results containing the text moved to github. This is very confusing for me, and I'm wondering, why exactly are peop... |
I am currently writing my Master's Thesis on maintainability of a web application. I found some methods like the "Maintainability Index" by Coleman et.al. or the "Software Maintainability Index" by Muthanna et.al.
For both of them one needs to calculate the cyclomatic complexity. So my question is:
Is it possible to me... |
I am developing a asp.net website. When I used the CSS property "word-wrap", VIsual Studio 2010 is showing a warning: Validation (CSS 2.1) 'word-wrap' is not a known CSS property name.
When I tested the website, it is working fine. However, can there be any issue in using this property ignoring the warning?
|
I'm working on a data migration of several hundred nodes from a Drupal 6 to a Drupal 7 site. I've got the data exported to the new site and I want to check it. Harkening back to my statistics classes, I recall that there is some way to figure out a random number of nodes to check to give me some percentage of confidenc... |
I'm not talking about MySQL, I'm talking about Microsoft SQL Server
I've been aware of PDO for quite some time now, standard mysql functions are dangerous and should be avoided.
http://php.net/manual/en/function.mysql-connect.php
But what about the MSSQL function in PHP? They are, for most purposes, identical sets of ... |
I have an idea for a personal iOS project that I would like to write and release to the iOS store. I'm the type of developer who enjoys developing and publishing. I want to write quality software and take care of my customers. Assuming that I wrote an application that had reasonable success, there is a fair chance t... |
Assuming there is some bit of code that reads files for multiple consumers, and the files are of any arbitrary size: At what size does it become more efficient to read the file asynchronously? Or to put it another way, how small must a file be for it to be faster just to read it synchronously?
I've noticed (and perhaps... |
I have a problem related to this:
Are there guidelines on how many parameters a function should accept?
In my case, I have a function that describes a rounded rectangle. The caller specifies
An integer which determines how the rectangle should be merged into previously created shapes
An Anchor, which is a point that i... |
I have only a limited knowledge of Lisp (trying to learn a bit in my free time) but as far as I understand Lisp macros allow to introduce new language constructs and syntax by describing them in Lisp itself. This means that a new construct can be added as a library, without changing the Lisp compiler / interpreter.
Thi... |
I need some expert answers to help me determine the most efficient algorithm in this scenario.
Consider the following data structures:
type B { A parent; }
type A {
set<B> children;
integer minimumChildrenAllowed;
integer maximumChildrenAllowed;
}
I have a situation where I need to fetch all the orphan child... |
Perl doesn't support a friend relationship between objects, nor does it support private or protected methods. What is usually done for private methods is to prefix the name with an underscore. I occasionally have methods that I think of as friend methods. Meaning that I expect them to be used by a specific object, or a... |
So I have a Selenium Automation project (using Maven).
I'd like to be able to set my tests to run overnight and possibly email a report daily to the team.
Which CI would be most suitable for TestNG.xml suites?
I tried Hudson but I couldn't figure out a way to execute TestNG files from the build?
Thanks in advance.
|
I have a factory class XFactory that creates objects of class X. Instances of X are very large, so the main purpose of the factory is to cache them, as transparently to the client code as possible. Objects of class X are immutable, so the following code seems reasonable:
# module xfactory.py
import x
class XFactory:
... |
I've noticed that July 26th (my birthday) is used really often in various PHP examples related to preventing http caching using Expires header, like:
https://stackoverflow.com/questions/12398714/cache-issue-with-private-networking-stream
https://stackoverflow.com/questions/2833305/how-to-expire-page-in-php-when-user-lo... |
I am thinking to take the next semester a course called "Digital systems architecture", and I know that we need to program micro-controllers with several programming languages such as C, C++, verilog, and VHDL. I want to be prepared to take that course, but I need to know if I need to study deeper these languages.
At ... |
In Spring AOP, I can add an aspect at the following locations
before a method executes (using MethodBeforeAdvice)
after a method executes (using AfterReturningAdvice)
around a method (both before and after a method executes) (using MethodInterceptor)
If I have all three types of advice, is the order of execution alwa... |
So, how exactly do software patches work. If there is a certain bug in the source code of a program, how is this source code changed when one installs a patch? After the patch has been installed how is the program 'automatically' rebuilt?
|
I've started using Google Drive for my cloud needs and backing up pretty much everything. I've got the app installed so it auto-sync's all my content in most things.
My question is this, I am currently coding for iOS (although this applies to any coding project) and am split on storing my project files on Google Drive... |
For example, should I be doing something like:
<?php
function output_message($message,$type='success') {
?>
<p class="<?php echo $type; ?>"><?php echo $message; ?></p>
<?php
}
output_message('There were some errors processing your request','error');
?>
or
<?php
function output_message($message,$type='success') {... |
I agree that we should put CRUD methods in a data access layer, However, in my current project I have some issues.
It is a legacy system, and there are quite a lot CRUD methods in some concrete manager classes.
People including me seem to just add new methods to it, rather than reuse the existing methods.
Because
We d... |
I am currently building a test plan for the system I am working on. The plan is 5,000 lines long and about 10 years old. The structure is like this:
1. test title
precondition: some W needs to be set up, X needs to be completed
action: do some Y
postcondition: message saying Z is displayed
2. ...
What is th... |
This is more of a "how would you do it" type of question.
The application I'm working on is an ASP.NET MVC4 app using Razor syntax.
I've got a nice domain model which has a few polymorphic classes, awesome to work with in the code, but I have a few questions regarding the MVC front-end.
Views are easy to build for norm... |
I'm a little bit confused about BDD. I'm doing TDD currently.
My question is whether BDD is complementary to TDD or it's a whole new thing and my team should do both TDD and BDD? Or is it enough to do just one or the other?
|
My company has many clients wanting mobile applications and having the payments come into our account and then sorting the payments would be a real pain.
So can a company have a main account to publish applications (free and chargeable) and still have some sort of client account for each app (so they could view sales a... |
I'm a programmer that also does database stuff and I get a lot of so-called one-time report requests and recurring report requests.
I work at a company that has a SQL Server database that we integrate third-party data with and we also have some third-party vendors that we have to use their proprietary reporting system... |
I'm currently developing an client-server application in node.js, Express, mustache and MySQL. However, I believe this question should be mostly language and framework agnostic.
This is the first time I'm doing a real MVC application and I'm having trouble deciding exactly what means each component.
(I've done web appl... |
I run a small company composed of only 2 developers. We are building a very big application for one of our clients. Development on this project has gone on for 1.5 years.
Now this client has secured an important sponsorship, and they are organizing events related to this project. So now we have a deadline in 2 months a... |
I am a developer and have worked at this company 4~5 years by now.
We have been practicing scrum for about 2 years.
I think, I have been worked well with QAs.
I believe QAs/developers/technical writers are all one team.
We are also actively hiring new team members.
As a legacy member of the team, I have faced to assist... |
This question brought me to another question: is there any VCS/tool for a VCS which automatically backups your source code between the last checkout and current changes?
I had the problem of loosing uncommited source code changes just one week ago.
I did not want to commit yet because the changes were incomplete. But t... |
I've been doing software for a long time, but almost all of it has been back-end centric.
I recently decided to learn Swing and tried to apply MVC principles. I realize that in Swing the View is handled for you by the components you add to the window/frame/panel, and the Controller is your code responding to the event... |
In C++, pointers generally have a lot more functionality associated with them than is really necessary. A class template that wraps a pointer and removes most of the less-used features (arithmetic, indexing, deletion). Each function could then decide how powerful a pointer it requires and take the appropriate type.
W... |
My development team is looking to expand into some new areas that we don't currently have direct skills for. We're trying to evaluate the available training courses, but there's not much depth of differences that you can plumb from a webpage or two and a brochure. So the root of my question is what should we be looki... |
For some systems, the time value 9999-12-31 is used as the "end of time" as the end of the time that the computer can calculate. But what if it changes? Wouldn't it be better to define this time as a builtin variable?
In C and other programming languages there usually is a variable such as MAX_INT or similar to get the... |
We develop small to large visualization projects for different tasks and industries and sometimes while rewriting them a couple of times in the process we hit walls because we discover that we need to add a lot of code to support new requirements. Now we have established a design process that seems to work well (at lea... |
What are the advantages of Weblogic or Websphere over Glassfish or JBoss, since they may reach costs of millions of dollars?
Edit: Is there additional functionality? The all are Java EE Full Certified.
The question is about technology, not business or marketing. From the technological POV how are the servers different?... |
I was talking to a technical boss yesterday. Its about a project in C++ that depends on opencv and he wanted to include a specific opencv version into the svn and keep using this version ignoring any updates which I disagreed with.We had a heated discussion about that.
His arguments:
Everything has to be delivered in... |
I'm learning to develop windows applications using WINAPI and plain C.
Now I got a bit confused with all those handles and would like to ask if you guys could teach me some good practices to structure and handle controls and windows.
Here's where I get confused:
Using the IDs declared in the resources for each object, ... |
I have just read this blog post from Jimmy Bogard and was drawn to this comment.
Where this falls down is when a component doesn’t support a given
layering/architecture. But even with NHibernate, I just use the
ISession directly in the controller action these days. Why make things
complicated?
I then commented ... |
I am new to requirements analysis and have a simple questions: Would you include the budget in the requirements, if e. g. the departments budget for running costs is 10k a year.
|
What is the best practice for packaging Java enums?
is it separate file for each enum?
or
having same file for all the enums?
What are the pros and cons ?
|
I have been programming for a couple of years and have often found myself at a dilemma.
There are two solutions -
one is simple one i.e. simple approach, easier to understand and maintain. It involves some redundancy, some extra work (extra IO, extra processing) and therefore is not the most optimal solution.
but... |
I have noticed that Play! Framework encompasses persistence strategy (like JPA etc...)
Why would a web framework care about persistence ?!
Indeed, this would be the job of the server-sides components (like EJB etc...), wouldn't this?
Otherwise, client would be too coupled with server's business logic.
UPDATE: One answe... |
Developing an application in which users have to upload images. I have not really got much experience with file uploads in an application so I am wondering what the best way is for storing images which are uploaded by users to the file system.
|
History
We are currently using a so called redirect model for our online payments (where you send the payer to a payment gateway, where he inputs his payment details - the gateway will then return him to a success/failure callback page). That's easy and straight-forward, but unfortunately quite inconvenient and at time... |
When creating a library for a simple program, is it more cost effective to make it thread safe or is there a way to detect the program's use in a multithreaded program and ASSERT() or otherwise determine (preferably at compile or link time) that it may create problems.
Related help for this question would be automated ... |
There are cases where you have the opportunity, as a developer, to enforce stricter security features and protections on a software, though they could very well be managed at an environmental level (ie, the operating system would take care of it).
Where would you say you draw the line, and what elements do you factor i... |
In Appendix A to The Art of Unit Testing, Roy Osherove, speaking about ways to write testable code from the start, says,
An abstract class shouldn't call concrete classes, and concerete classes shouldn't call concrete classes either, unless they're data objects (objects holding data, with no behavior). (259)
The firs... |
Is the singleton pattern prone to thread safety problems? If so, what are the best methods to work around them?
|
A prospective employer told me they took a company level decision to do only outsourcing projects.
I do not understand why they took such a decision and the guy I talked to did not elaborate. He further said only that "their intention is to build software components".
Since they are growing quite fast and reached aroun... |
I have a lot of time invested in creating Wordpress templates. I want to release combinations of these templates along with different styles and Fancy Front pages as "Premium Wordpress Themes". What I need to know is what does "Premium" mean? What do people expect of a GPL theme vs. a Premium theme? Are there features ... |
Given that UML is oriented towards a more classic approach to object orientation, is it still usable in a reliable way to design JavaScript systems?
One specific problem that I can see is that class diagrams are, in fact, a structural view of the system, and JavaScript is more behaviour driven, how can you deal with i... |
I am trying to build an app with HTML5.
Is there a certain syntax to follow when making objects for games?
Anyone tried that and what are good practices to follow?
|
MSSQL and DB, Zend as PHP Framework,
I am using this way to call SP with I/P Parameters and to get O/p Parameters.
It seems I am writing SQL code in PHP.
Any other good approaches?
$str1 = "DECLARE @Msgvar varchar(100); DECLARE @last_id int;
exec DispatchProduct_m_Ins $DispatchChallanId,'$FRUNo',$QTY,$Rate,$Amoun... |
this question may sound stupid, but no one has ever taught me this. I have an HTML input for a password field, and you can only log on with one specific password with JS. Could someone please give me a syntax on assigning a variable to document.getElementById(""); syntax or a different syntax? Thanks.
|
Note that I (try) to mark up as semantically as possible because I like they way it looks and feels, but not because I'm aware of any other stunning advantages. The point of my question is to be able to educate others
Well, I've seen a lot of articles and tutorials which often state "Let's mark this up in the most se... |
Possible Duplicate:
Licensing for hosted open source and 3rd party libraries
I am newbie in the open source community world. I am planning to develop a open source project, hosted on github. The project would be using other open source components like- NHibernate, FNH, Log4net, CommonLibrary, Autofac, Quartz.Net Sch... |
Some background
I work at a small startup: 4 devs, 1 designer, and 2 non-technical co-founders, one who provides funding, and the other who handles day-to-day management and sales. Our company produces mobile apps for target industries, and we've gotten a lot of lucky breaks lately. The outlook is good, and we're confi... |
I am starting out doing some low-level 3D programming in Linux. I have a lot of experience using the higher level graphics API OpenInventor.
I know it is not strictly necessary to be aware of how all these things fit together but I'm just curious. I know OpenGL is just a standard for graphics applications. Mesa3D seem... |
Recently I worked on a fairly large project involving C# and MVVM. This application had around 160 projects in the solutions each seprarated into their own layers. As I have been working on this application for almost a year, building it from scratch as part of a team, I am now coming off that project and onto smaller ... |
It has been a year or so since I last took an assembly class. In that class, we were using MASM with the Irvine libraries to make it easier to program in.
After we'd gone through most of the instructions, he said that the NOP instruction essentially did nothing and not to worry about using it. Anyway, it was about mid... |
The company I work for develops custom factory automation applications for multiple customers. Even though each application is custom, they contain common code which is re-used across projects.
One of the customers is now looking for the source code to their application, which has caused a major storm in the company.... |
I have an open source project that works on .Net 2.0 and up. The thing is though that I prefer to use Visual Studio 2012, which forces the solution and project files to only work with VS2010/2012.
What exactly should I do? I don't want for my users to have to create a solution from scratch if they don't have access to... |
I am writing some code that has a very large number of reasonably simple objects and I would like them the be created at compile time. I would think that a compiler would be able to do this, but I have not been able to figure out how.
In C I could do the the following:
#include <stdio.h>
typedef struct data_s {
i... |
I never know where it's acceptable to post something like this, so please forgive if it's in the wrong place. I'm very interested in going further in to web development; I know a bit of javascript, a bit of php, and so forth, but I'm now seeing these services that will go from psd to wordpress for 200 bucks and I'm won... |
I prefer providing an example to explain the following paragraph:
However, since excess K representation using N bits has two parameters, K and N, you can pick K to be whatever you want. You can have more positive numbers than negative, not include zero, and so forth.
|
In a bootloader, the second last line is :
TIMES 510-($-$$) db 0
Now, will this command also do the same :
db 510-($-$$) DUP (0)
If not why?
I know what TIMES does, but its not mentioned in my x86 book by Mazidi (Pearson Publication). Any idea why?
And what is the meaning of the $ sign exactly? Different sites have... |
The X Window System is 25 years old, it had it's birthday yesterday (on the 15'th).
As you probably are aware of, one of it's most important features is the separation of the server side and the client side in a way that neither Microsoft's, Apples or Wayland's windowing systems have.
Back in the days (sorry for the ... |
I read this code somewhere
class Foo {
public int a;
public Foo() {
a = 3;
}
public void addFive() {
a += 5;
}
public int getA() {
System.out.println("we are here in base class!");
return a;
}
}
public class Polymorphism extends Foo{
public int a;
publ... |
Based on a multitude of questions related to temporarily disabling ReSharper, and also on certain research data, I can see that a considerable share of ReSharper users have it disabled most of the time. They tend to enable it for a limited period of time (say, several hours), do whatever they need to do using its funct... |
How do vector registers work in terms of calculations and alloting data to them ?
Is there a detailed reference available somewhere explaining how vector registers work and how data is fetched from them ?
|
If you were building a new Saas project, would it make sense to start with all of the backend services returning xml/json?
Because these days you need to build for both the web and mobile devices, and having a backend that is build from the start to return xml and json, you are ready to go mobile (all services have the... |
There are some applications like Readability and Pocket, which are letting users to read the main content of web pages, in a clean interface or such. But the articles should be bookmarked from another application, or the web browser.
However, I'm creating a news reader app (Zite and Flipboard are popular news reader ap... |
I am currently working for a 2 person company, as the solo primary developer. My boss gets the clients, mocks up some png design templates and hands them over to me.
This system has been working fine and i'm really enjoying it.
The types of projects I work on are for small - medium sized businesses and they usually wan... |
I am creating a basic game of space invaders. I am using a thread to animate the game and was wondering, how do I get the aliens the speed up going left and right without changing the speed of the ship you control below them?
What is the easiest method? I am quite new to Java 2d and have only created two other more bas... |
The term "segregation" is used in the CQRS pattern.
What's the difference between segregation versus separation in this case?
|
Recently at work we ran into a problem where we tagged/branched a project and had some compiling issues because of dll/project references that was pointing to the old folder structure.
We created an 'external bin' folder for each of the projects and copied the referenced dll's to these folders. Is this the best way or ... |
I am practicing OOP with PHP, and I am struck at setter and getter methods.
I can directly access the class properties and methods with getter method then what's the use of setter method?
See my example.
<?php
class MyClass{
public $classVar = "Its a class variable";
public function Getter(){
return $th... |
In my personal project I have tried to stick to MVC, but I've also been made aware that sticking to MVC too tightly can be a bad thing as it makes writing awkward and forces the flow of the program in odd ways (i.e. some simple functions can be performed by something that normally wouldn't, and avoid MVC related overhe... |
I am trying to create an interface with an external server, and don't know where to start. I would need to take audio as input to my computer, and send it to the remote server as a chunked HTTP request. The API that I'm trying to connect to is described here p1-5
http://dragonmobile.nuancemobiledeveloper.com/public/... |
I asked something kind of similar on stackoverflow with a particular piece of code however I want to try to ask this in a broader sense.
So I have this web application that I have started to write in backbone using a Single Page Architecture (SPA) however I am starting to second guess myself because of security. Now w... |
For a project, I have to classify a list of banking transactions based on their description.
Supose I have 2 categories: health and entertainment. Initially, the transactions will have basic information: date and time, ammount and a description given by the user. For example:
Transaction 1: 09/17/2012 12:23:02 pm - 45.... |
I was looking to upgrade my project from EF4.1/Framework 4.0 to EF5/Framework 4.5. After reading up on migrating the t4 templates for STE's (Self-Tracking Entities), I came across this link that indicates that STE's are no longer recommended.
Why is Microsoft no longer recommending the use of STE's?
|
I've read many times on the web that if your language doesn't support some concept, for example, object orientation, or maybe function calls, and it's considered a good practice in this other context, you should do it.
The only problem I can see now is that other programmers may find your code too different than the us... |
I have code to switch between databases when using EF, but now also need to allow the user to choose a particular table. (The tables all use the same schema but may have different names because of the way the client updates datasets). Is there a way to do this? And if it's done can it be done without being broken by up... |
I'm making a custom RoleProvider that I would like to use across multiple applications in the same application pool. For the administration of roles (create new role, add users to role, etc..) I would like to create a master application that I could login to and set the roles for each additional application. So for exa... |
Consider train timetable data, where each service (or "run") has a data structure as such:
public class TimeTable
{
public int Id {get;set;}
public List<Run> Runs {get;set;}
}
public class Run
{
public List<Stop> Stops {get;set;}
public int RunId {get;set;}
}
public class Stop
{
public int Stati... |
I have an mbed microcontroller which has a small ARM Cortex M3 on it. Basically, my effective resources for the project are ~25 KB of RAM and ~400 KB of Flash. For I/O I'll have a PS/2 keyboard, a VGA framebuffer (with character output), and an SD card for saving/loading programs (up to a couple of MB maybe).
I ask bec... |
I've interacted with a few RESTful APIs that provided excellent documentation for humans and descriptive URIs, but none of them seem to return machine-readable descriptions of themselves.
It's not too tough to write methods of my own that assemble the right paths, and many language-specific API libraries are already ju... |
I have developed a single page app prototype that is using Backbone on the front end and going to consume from a thin RESTful API on the server for it's data.
Coming from heavy server side application development (php and python), I have really enjoyed the new different design approach with a thick client side MVC but... |
This may be subjective and likely to be closed but I still wanted to know if its really helpfull to read Structure and Interpretation of Computer programs.
Structure and Interpretation of Computer Programs
The book does not use Java. Not that I wanted to learn Java. I am just curious as to know if it be will useful re... |
Which types of learning resources do you find the most helpful, for which kinds of learning and/or perhaps at specific times?
Some examples of types of learning you could consider:
When starting to integrate a new SDK inside an existing codebase
When learning a new framework without having to integrate legacy code
Whe... |
I am a junior developer working on my own in the programming aspect of projects.
I am given a png file with 5-6 of the pages designed, most times in specific detail. From this I'm asked to develop the back end system needed to maintain the website, usually a cataloging system with products, tags and categories and mat... |
I'm reading up on event sourcing and have a question regarding persistence.
I can still have a DB with all entities, right? Or should the events be replayed every time the application is started to get the latest version of each entity in the memory? Seems like a waste on larger systems (as in large amount of data)?
T... |
I made a documented which is to describe the difference between the same logical structure from different version ( e.g Structure A from version 8 and Structure A from version 9 ).
Luckily I've got the logical structure diagram from the 2 functional specification. I've managed to copy the image of each logical structur... |
I need to have a data structure with say 4 keys . I can sort on any of these keys. What data structure can I opt for? Sorting time should be very little.
I thought of a tree, but it will be only help searching on one key. For other keys I'll have to remake the tree on that particular key and then find it. Is there any ... |
Assume I have abstract base model class called MoneySource. And two realizations BankCard and CellularAccount. In MoneysSourceListViewController I want to display a list of them, but with ListItemView different for each MoneySource subclass.
What if I define a category on MoneySource
@interface MoneySource (ListItemVi... |
I have a domain model, persisted in a database, which represents a graph. A graph consists of nodes (e.g. NodeTypeA, NodeTypeB) which are connected via branches. The two generic elements (nodes and branches will have properties). A graph will be sent to a computation engine. To perform computations the engine has to be... |
In Java/JVM, why do we call the memory place where Java creates objects as "Heap"?
Does it use the Heap Data Structure to create/remove/maintain the objects?
As I read in the documentation of Heap data structure, the algorithm compares the objects with existing nodes and places them in such a way that Parent object is ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.