instruction stringlengths 34 36.1k |
|---|
There are two scenarios: writing and reading
Writing:
Whenever I write something to the ByteBuffer by calling its put(byte[]) method the position variable is incremented as: current position + size of byte[] and limit stays at the max.
If, however, I put the data in a view buffer then I will have to, manually, calculat... |
I work in a company going through a downsizing process. It is assumed that a lot of "let go" developers jobs will eventually be outsourced. Some of those programmers had some design to do.
Is it possible to outsource both design and creation/coding properly? I feel that by outsourcing design, we lose any in-house capab... |
It's like this mythical thing that a dominating portion of developers say is just the best option for back-end development, a part of development about which I know virtually nothing beyond the absolute basics.
So I've looked up PHP tutorials a bunch of times, trying to figure out why it's so powerful and common, but i... |
Yesterday my question How come verification does not include actual testing? created a lot of controversy, yet did not reveal the answer for related and very important question: does black box functional testing done by testers belong to verification or validation?
ISO 12207:12208 here mentiones testing explicitly onl... |
My Selenium test structures goes as -
Data Object class -
public class RegistrationData {
String firstName = "test first name";
String lastName = "test last name";
// Getter Setter Here
}
Page Object class which carries out operations on a Web Page -
public class RegistrationPage {
private RegistrationData... |
I switched to C++ a few months ago, learning its syntax, the main features
of the STL and what you can usually find in a "learn C++" manual.
Now I would like to go further. What would be your recommendations? I would like to know what to learn next (not only about the language, but also debugging, frameworks etc. etc.)... |
Can anyone suggest me a Common Name for Edit,Save,Delete,Select
I want to create a Interface in C#, which will support all these methods.
My Context is :
I am developing an Invoice Application in which i need a Product to be Created,Deleted,Updated,Selected
|
I am reviewing a proposed OO software architecture that looks like this:
Base
Foo
Something
Bar
SomethingElse
Where Base is a static class.
My immediate thought was that every object in any class will inherit all the methods in Base which would create a large object. Could this cause problems for a large syste... |
I recently started to use c# to interface with a database, and there was one part of the process that appeared odd to me. When creating a SqlCommand, the method I was lead to took the form:
SqlCommand myCommand = new SqlCommand("Command String", myConnection);
Coming from a Java background, I was expecting something m... |
After using version control tools, it is no longer necessary to comment out old code.
However, some team members still comment out old code. Therefore, I want to clean them up.
I want to mark commented lines which are really comments / documentation, so that every time I do not need to re-read all commented regions. Th... |
To be interchangable and testable, normally services with logic needs to have interface, e.g.
public class FooService: IFooService
{ ... }
Design-wise, I agree with this, but one of the things that bothers me with this approach is that for one service you will need to declare two things (the class and the interface),... |
I have only used Java Channels and BufferedOutputStream and the input counter part for reading and writing simple integers and some strings here and there to the file.
However I do not understand the use of all these classes when there is java.util.Scanner class that provides easy ways to read and write to the files.
J... |
Recently I stumbled once again on the issues of Haskell's records, in particular the uniqueness of field names. (It's a pain...)
I already read A proposal for records in Haskell from SPJ and Greg Morrisett, but its last update was in 2003.
Another paper called Lightweight Extensible Records for Haskell from SPJ and Mar... |
I have to create a word document in a specific format and send it as attachment to some email addresses.
I have a preview screen for the report which on approval has to be send in email. This is an ASP.NET MVC 3 application.
I am left with a few options here.
I am creating the preview using html. I can convert this ht... |
So, I graduated with a BSBA in Management Information Systems with honors almost 2 years ago which is more of a business degree. As of right now, I do have a job title of "Programmer", but it's more of a report writing position in an arbitrary, proprietary language called PowerOn with the occasional interesting projec... |
How are operators organized/saved in the memory in context of a programming language. Are they procedures/functions saved somewhere and compilers just manipulate things to call these procs whenever the operators are used in the program?
|
I have come across many situations where I had to build a system for a library or a clinic or other popular domains.
The thing is a domain model for a library was probably done 1000 times already with different level of details of course. Here is an example.
Is there a popular website or community where one can find re... |
I'm creating a News Reader app for Tablets and PCs. My app is fetching data from news sources by RSS feed of websites (in the server-side).
But some of these sites are showing some advertising banners at the end of each article.
Should I remove those banners from the feed? Am I legally/ethically allowed to do this?
And... |
I have been programming in PHP for several years and have, in the past, adopted methods of my own to handle data within my applications.
I have built my own MVC, in the past, and have a reasonable understanding of OOP within php but I know my implementation needs some serious work.
In the past I have used an is-a relat... |
I have written a small Java Swing desktop application. It seems like a natural step to port it to Android since I am interested in learning how to program for that platform. I believe that I can reuse some of my existing code base. (Of course, exactly how much reuse I can get out of it will only be determined as I star... |
Name's Vlad and I am currently on my third year of Community College, studying Computer Science with emphasis on Programming in C++ and Networking. I have completed a few programming courses with general ease, but have not gained advanced understanding of programming through school. None of my friends are serious progr... |
I work on a program with about 50 DLLs that are loaded from one executable, it's an old organically grown program where the only rationale for creating a new DLL is that one previously didn't exist to fill a given need. (and namespaces didn't exist in Delphi so it never crossed our mind to make dll1.main.pas, dll2.main... |
After 1 months research I basically give up on getting all URL's from a search results programmatically,
I looked at Google Search API to find a way to get millions of search results "URL's" to be specific to a text file or something relative but no success, but I am 100% there must be a way or trick of doing it.
Real ... |
Back when I started programming in college, a friend encouraged me to use the prefix incrementation operator ++i instead of the postfix i++, citing that there was a slight chance of better performance with no real chance of a downside. I realize this is true in C++, and it's become a general habit that I continue to do... |
I work for a small development company, 20 people total in the entire company, 3 in actual development, and we've adopted CD for our commits to trunk, and it works great, from a code management and up-time side. However - we're getting flak from our support staff and marketing department that they don't feel that they... |
The background:
I need to build a desktop application with some operations (CRUD and more) (=winforms), I need to make another application which will re-use some of the functions of the main application (=webforms). I'm using service layer for reusing my functions. The service is calling the functions on the BL layer (... |
My problem is kind of weird so please bear with me.
I have been working in a start up concerned basically with mobile development since my graduation 2 years ago. I develop apps for iOS but it's not really relevant. The start up structure is simply founders > developers, with no middle-tier technical supervision or pro... |
If I want to recommend a technology/plugin/library to my company for use in a project, are there any methodologies I can use that will produce more reliable results and a more convincing presentation of said results than just my own "common sense" approach?
|
I can't think of a better place among SO siblings to pose such a question. Originally I wanted to ask "Is python a pure OO language?" but considering troubles and some sort of discomfort people experience while trying to define the term I decided to start with obtaining a clear definition for the term itself.
It would... |
Please share your knowledge about these Crystal Reports concepts.
I want to know what is difference in section and sub report? I know about default sections and we can add new sections into report.
What is purpose of a subreport? when should we use a subreport instead of a section?
Where should we use multiple detail ... |
I know this is a dumb question and it might not be "conceptual" but, as a self-starter I really want to know how to get connected to some sort of "commercial database"?
I'm designing a local gas station utility app for iphone and ipad. I have absolutely no clue how to find a relevant database. For example, if I want to... |
I have a proof of concept application that uses Azure tables to associate DNA sequences to "something".
Table 1 is the master table. It uniquely lists every DNA sequence. The PK is a load balanced hash of the RK. The RK is the unique encoded value of the DNA sequence.
Additional tables are created per subject. The ... |
I have just started working in Information Security World. I want to learn the Python language for creating my own automated tool for Fuzzing, SQL-Injection etc.
My question is I don't know much about C language (only basic knowledge) but I want to learn directly Python Language so is it good?
I have seen there is lots... |
Doing a lot of reading about V&V, I would need to clarify the following.
A lot of definitions (less formal ones found in books) define verification like that:
Verification: The software should conform to its specification.
But then they speak about requirement verification, design verification etc. If I say that these ... |
In the project/team I'm working the frequency of comments is a little low.
One reason might be that it is not clear to the long-time devs what lines in the code really needs a comment (each part of the project has quite fixed devs).
To increase this we plan to let team members review the code and check in "requests for... |
I have been noticing for a long time on Stack Overflow that most users recommend to use PDO instead of mysql_*, because PDO is more secure than mysql_*. But my question is if websites which are already running with mysql_* will stops working? Or what exactly does "deprecating" mean here? So should we have never used m... |
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.