instruction stringlengths 34 19.9k |
|---|
As the title says, if the user wants change their email address in the application, in terms of programming, what approach (process) to use? Where do you store the new email address until the user will confirms it?
|
I'm reading about SOA and the four tenets required to make a SOA application. I have tried different sources, but the explanations are twisting. I'm searching for something that is a bit less abstract. Is my interpretation correct?
The four tenets is:
Services have explicit boundaries
Services are autonomous
Services ... |
Let's say we have an abstract class and let this class has only abstract methods. Is this abstract class different from an interface that has same methods only?
What I am looking to know is if there are any differences both philosophically, objectively and in the underlying programming language implementation between a... |
Working on my own I tought I need to learn that css3 shorthand properties, because - as I know now, it affects website's loading time, so I need to optimize it a little bit.
I was thinking - is there any order how to write property values, when using shorthand prop's?
For example: font: 1em/1.5em bold italic serif
|
I have a database that contains projects and each project contains many samples. I want a project level threshold value, to trigger highlighting when a field on the sample is above this threshold. I also want to be able to override the threshold at the individual sample level.
So I can see two ways to implement this: ... |
I have an internal database at my work. At the moment we are using excel to import data, but this is very error prone, so I would like to replace this with some javascript based application which exposes some of the data in lookup tables in dropdown menus, for our customers to fill in, on a public website.
So my intern... |
I put up a webpage advertising a particular birthday party. A simple html page served by apache2 on ubuntu server 12.04. I have a link on the page to a cgi script-Python-that asks the requester to submit text values that will be formatted and relayed in an email to the bithrday boy. What's a simple way to authenticate ... |
The questions says it all, but a quick overview of the situation. I'm creating a Model which contains classes (all inherriting myObject) which have a large amount of interconnection. I want the controller to be able to create any of these objects any time, without modifying the Model. Only an explicit cal to the mod... |
So my company is using TFS and SQL to Manage their Database (MS SQL Server). It integrates with the nightly build servers to do builds and produce scripts to build the entire Database. Also the Compare Schema tool that visual studio offers is really handy.
We want to do the same with Oracle, Preferably with TFS if that... |
How should we load balance listeners to a 3rd party service?
e.g. We need to read gtalk messages via XMPP Listener and build an application using the interactions of the user with a chatbot. In such a case, how would we ensure that we can have XMPP listeners on multiple servers and we load balance the messages between ... |
Is there a difference between HttpRequest and xmlHttpRequest in terms of security? Is one more secure than the other?
Is it more secure to send important data such as passwords via HttpRequest than via xmlHttpRequest ?
Is data packing in both done the same way?
|
Is it good to use nested classes or should I use namespaces instead?
In context:
I have a templated codec loader and a codec have In objects and Out objects
template<class TypeOfData>
class Codec
{
private:
typename TypeOfData::In* reader;
typename TypeOfData::Out* writer;
};
On the other h... |
In a recent interview I asked the interviewers "how do you go about evaluating new technologies and libraries (such as SignalR) and bringing them in to use?". They said they don't, that instead they write everything themselves so they don't have to rely on anyone else.
The firm doesn't work for the government or defenc... |
In Software Engineering Methodologies... The Evolutionary Development contains Exploratory & Prototyping...
Is Exploratory Development same as Incremental Development... What do you mean by exploratory Development?
The terms are taken from
Software Engineering - Ian Sommerville
|
Been brushing up on my C++ lately, on Ubuntu QQ. I love the Qt framework for everything, especially building GUI's. I became quite familiar with it when using PyQt over the last few years.
When using PyQt, I had some issues that are now more pronounced when using C++ with Qt: Qt has many extensions to C++ that are Qt ... |
I'm looking into developing my entities so that they cannot be in an invalid state.
In particular I'm starting with my Customer entity. This would have fields like:
Title (enum)
FirstName (string)
LastName (string)
Address (value object with another 6 fields)
MainTelephone (string)
AlternateTelephone (string)
EmailAd... |
I am talking about 20-30+ millions lines of code, software at the scale and complexity of Autodesk Maya for example.
If you freeze the development as long as it needs to be, can you actually fix all the bugs until there is simply not a single bug, if such a thing could be verified by computers? What are the arguments f... |
Does anyone know how to create an algorithm capable of making the figure just like in the picture, when given a set of specific points (3D array)
|
I'm trying to include a feature on my website that verifies retail gift card balances on cards previously registered at the retailer's website by the card holder. Can this simply be done by writing an algorithm that pulls and aggregates this data on my site?
|
Sometimes I hesitate between "More code to avoid unnecessary operations" and "less code but with redundant operations". Let me just take an example (Win32 API):
I try to paint some controls manually when the cursor is over it. If the cursor is over this control and it is painted, then it doesn't need to be painted agai... |
I have read that equivalence partitioning can be used typically for intervals or lists, e.g. I assume it can be used for every set of inputs.
Anyway if the requirement says that allowed colors are (RED,BLUE,BLACK, GREEN), I cannot treat them like a list, right? I mean, testing one of them would not be enough because de... |
Is it bad that I often find myself spending more time on program structure than actually writing code inside methods? Is this common?
I feel I spend more time laying the foundation than actually building the house (metaphorically). While I understand that without a good foundation the house will cave in, but does it le... |
I'm working in an organisation with limited funds. They can't afford a business account on Dropbox. However, they would find it useful to have all their files synchronized on local machines.
I've recently looked at Python Sockets and it looks as though a custom script could achieve what they're looking for. I'm concer... |
The values of a function of two variables z = f (x, y), where x, y, z take integer values are stored in sql db. Calculate (appoint) the largest surface area of the flat. By 'flat area' we mean an area about which for each pair of x and y lying inside the area about the value of the function is constant (z = const).... |
I am in charge of a project on github that has files that are and are not code based. Specifically, I am worried about our SolidWorks files. How do I ensure these files are covered by the GPLv3 license?
|
I am working on an application, a module of which does the following financial operations sequentially:
When a user requests for a certain amount to be transferred into her bank account:
check whether any transaction can happen now? (transaction can be carried out only during a certain time period)
check whether the u... |
It seems that NoSQL concept not something very new and innovative, but these days become very popular. Why it become popular recently but not happen in the time when SQL is very popular?
|
I am learning how to draw a UML class diagram and after reading a few tutorials, I am still confused about the appropriate usages of Association type (The clear diamond and black diamond). I understand their usages but I haven't got a very concrete understanding on when to use them and when not to.
For example in the ... |
Let me explain my situation. I'm planning a kind of test case runner for doing testcases on external devices, which are microcontroller based. Lets consider the devices:
Device 1
Device 2
There exist a lot of test cases which can be run with one of the devices above. For example:
Testcase 1
Testcase 2
The main reas... |
I'm a self-taught intermediate Python programmer; I frequently come across popular books on software development and programming written in other languages (often Java).
Typical examples:
Refactoring: Improving the Design of Existing Code
Design Patterns, Gang of Four
Test Driven Development: By Example
The Art of Un... |
As part of a ray tracer implementation, I need to compute the barycentric coordinates in a triangle in 3D in order to decide if a ray hits the triangle or not. In theory this could be done by simply solving a few linear equations. But due to the fact that the vertices of a triangle could have the same x, y or z coordin... |
I assume that negative testing is an approach to design the test cases and so is equivalence partitioning. But I am not sure if NT is a part of ET.
An example:
A field can accept a numeric value from the range 0-10.
So I have three partitions: to 0, from 0-10 and more than 10.
Another invalid partitions would represent... |
I was reading some Cthulhu Mythos stuff and started to think about those various signs and symbols that are used in the texts. Of course those are made by humans but point is that they look natural to human eyes.
So, what kind of algorithm would be needed to create natural looking symbols and signs? How this problem c... |
Many PHP web applications follow this model for installation and upgrade:
Un-tar a source tar ball.
Point Apache at the source.
Navigate a web browser to the home page.
Go through several web pages of set-up (e.g., checks for existence of libraries, asks for database connection information, creates or updates database... |
I need some opinion. GCC was always a very good compiler, but recently it is losing "appeal".
I have just found that on Windows GCC does not have std::thread support, forcing Windows users to use another compiler because the most exciting feature is still missing.
But why really doesn't GCC still have threads support u... |
In many languages (a wide list, from C to JavaScript):
commas , separate arguments (e.g. func(a, b, c)), while
semicolons ; separate sequential instructions (e.g. instruction1; instruction2; instruction3).
So why is this mapping reversed in the same languages for for loops:
for ( init1, init2; condition; inc1, inc2 )... |
I'm just investigating the security and control of the Linux platform in comparison to Android.
In Android there seems to be a huge development around security - Applications are required to ask for system permissions, and if the user grants that permission, then the system allows that application to execute with thos... |
I am trying to calculate 95th Percentile from the data sets which I have populated in my below ConcurrentHashMap.
I am interested in finding out how many calls came back in 95th percentile of time
My Map will look like this and it will always be sorted in ascending order on the keys- In which
key - means number of mill... |
HTML5 is becoming more and more popular everyday. Many great online applications are now being created and described as pure HTML5 apps. (Like Muro)
But I don't understand what is exactly so cool about HTML5?
As far as I understand, it just adds few features for graphics that make good alternative for jQuery or Flash.
... |
I started logging failed logins attempts on my website with a message like
Failed login attempt by qntmfred
I've noticed some of these logs look like
Failed login attempt by qntmfredmypassword
I'm guessing some people had a failed login because they typed their username and their password in the username field. Passwor... |
Background:
I have a updator feature in my program which will downloads updates to a directory specified be the user. Then user can install these updates whenever he/she wants by just opening them. These updates are nothing but a compressed archive file which is associated to be opened by my app.
Problem:
Now, I want w... |
While learning to develop in PHP it has been easy enough that my short, one page, 20 line little scripts I could add "testing code" directly to my functions to figure out where I am or get close to the area in the code where the issue is found (for example, "print_r($var)," "var_dump($var)," "print 'you are here') type... |
I am developing an app which allows a user to upload a maximum of 20 photos, the straight forward way is of course adding 20 columns to my database table but if the user only uploads 1 image, the remaining columns becomes redundant. Anyone can advice me on a more efficient way to design it?
Thanks.
|
I have an epic which involves creating a mobile application which retrieves a user's data they have previously created in a web application and act on it locally. It seems logical to split the epic as follows;
Mobile app which acts on local, mocked up data
Mobile app which downloads data from the web app's api but wit... |
Argument which is always made in favour of Clojure is that.
The syntax is simpler and there is only one way of expressing code with no complicated rules.
However Scala has loads of different types of syntax and constructs as compared to Clojure.
But from last one week while trying to learn Clojure, I have noticed that ... |
I'm working on a project where I have to give users the ability to build their own tables,
each user can create more than one table.
(the type of all data is string).
The user can create a table and specify what columns he wants inside it.
What is the best way to do that:
to create databases dynamically
to have a tabl... |
I would like to know if there is a best practice for creating demo environments that substitutes database interaction into other forms of resource
i.e. creating .json files containing the data that was supposedly returned from a webservice call.
I wanted to know if there is already a standard way of obtaining the same ... |
It's not clear how data consistency is provided for different branches.
We have a large knowledgebase which is filled by the experts and delivered as updates to our clients. This data is also used for testing the product.
But if we have quite a few feature branches (being developed in parallel) and each feature requir... |
Why does Haskell have a built-in if/then/else, which is dependent on the Bool type, instead of having a simple library function? Such as
if :: Bool -> a -> a -> a
if True x _ = x
if False _ y = y
|
I am new to C/C++. Wanted to know why we cannot declare 'extern C' for C++ macro's similar to methods/functions...which will allow macro's defined in C++ file to be accessed in .c files.
Thanks in Advance
|
FP proponents have claimed that concurrency is easy because their paradigm avoids mutable state. I don't get it.
Imagine we're creating a multiplayer dungeon crawl (a roguelike) using FP where we emphasize pure functions and immutable data structures. We generate a dungeon composed of rooms, corridors, heroes, monste... |
Imagine we're creating a multiplayer dungeon crawl (a roguelike) using FP where we emphasize pure functions and immutable data structures. We generate a dungeon composed of rooms, corridors, heroes, monsters and loot. Our world is effectively an object graph of structures and their relationships. It sounds to me that... |
I'd also want to know how can I draw them.
|
I am trying to measure the running time of different crypto algorithm. e.g. how long it takes to encrypt/decrypt a block of plaintext. May I ask if C with OpenSSL is the best PL to do this?
|
There are a lot of methods like this in iOS/Objective C:
- viewDidLoad
- viewWillAppear:
- applicationDidFinishLaunching
I've just been having a discussion with some colleagues about this design choice and why they would choose to be so verbose in preference of the more "standard" ways of event propagation for instanc... |
I have created an ObjectParser class which parses data into strongly typed objects using an IObjectParserDataSource as the data source (the data could be an Excel file, text file, array, query string, etc).
Examples of my implementations of IObjectParserDataSource are:
TextFileObjectParserDataSource
ExcelFileObjectPar... |
What is the best way to prove to my boss that in code documentation is greater than extensive external documents containing documentation and screenshots of code/ui?
We have a group in the company running SAP code. Their documentation process involves hours of laborious documentation and screenshots of the code and th... |
I have built a framework for my applications that has been working well, and I have always referred to it in my mind as an MVC. However, after reading some more on what an MVC is (not that I didn't to start with, but I gave it a very brief overview, and looked at other frameworks that used the mvc pattern), and it has ... |
As many know, mobile development is skyrocketing these days and, I believe, it affects what we code. To be specific, I am interested in developing web services for a mobile application.
I see two possible architectures - RPC and REST. I have developed both, REST and RPC services and what I have observed is that RPC ser... |
It is our first game and we are a start-up. We had a programmer who suddenly is seeming to be a dead weight. Though we knew him personally we thought that he was as motivated as we are and hence I never looked for a code review or documentation. Now it seems that he is slacking a lot and we want him out.
Now during a c... |
Here is the scenario:
X is the author of a software. X releases v1.0 on an open source license on Github and moves on. People interested in the software fork and improve the software. Now there are 15 different flavours of the software. Few also try to send a pull request back, however since X no longer works on the so... |
I've worked at several places with 2-10 developers and each place has struggled in the area of tracking if the company has an account on a given web site or service. We're always left wondering...
What's the username
What's the password (Obviously you don't want to store this, I'm not looking for something that does)... |
I'm rolling my own application protocol on top of TCP. I'm using Linux and C. I'm wondering whether there is an advisable sequence to closing a socket connection.
The client will always initiate the close by sending a specially-formed string; say, "CLOSE". I'd like to receive some kind of acknowledgement from the se... |
I have a class, which wraps another class of a common base type. Because the base type interface is quite large this involves writing a lot of pass-through functions. I am looking for a way to avoid this.
Let's make an example:
Car
/ \
Volvo VolvoWithTrailer
Now I have to implement each and every func... |
Is it possible to re-integrate a former team member into a software project?
We have a product with a looming customer deadline and we don't have enough hours to get it done! We have a former employee who left on excellent terms and wants to come back. They are familiar with the codebase and architecture (which has ... |
I can't get my head around this. If C is so much used, but C is not C++, can someone explain to me the most important reasons that makes C more used than C++ ? Where is all this C code written for ?
Is this about the industrial sector which heavily rely on imperative programming but can't support the cost of implementi... |
If I have objects that represent a hierarchy of relationships. For example:
Person
Spouse
Spouse Contact
Spouse Address
Person Contact
Person Address
Each of the items listed has a database table related to an object. Each object/table has an ID, Parent ID (Spouse ID for Spouse Address records) and Ba... |
The D Programming Language supports writing unit tests inline with source. There's a Ruby gem called test_inline that lets you write specs in the same file as your code.
Why is it generally conventional to keep source code in a completely separate directory from test code?
|
I am taking Martin Odersky's coursera course on functional programming with scala, and for now I have learned two things that together don't make sense:
Scala doesn't support multiple inheritance
Nothing is a subtype of every other type
These two statements cannot live together, so how exactly is this done? and what ... |
Say a developer has developed a library for their closed-sourced commercial application. Since they want to give back to the open source community, they publish this library under, say, the GPL, but continue to use it in their own application. Since they hold the copyright, that's fine.
Now, a user of the GPL version f... |
Reduce the number of #include files in header files. It will reduce build times. Instead, put include files in source code files and use forward declarations in header files.
I read the quote above here: http://www.yolinux.com/TUTORIALS/LinuxTutorialC++CodingStyle.html.
So, it says if a class (class A) in a header fi... |
I am preparing a short (1-2 hour) presentation about DIP to several (~5) junior developers (1-3 yr xp) in the office. At the end of the presentation I want to know whether they understood what I was presenting, what are some possible questions that I ask in order to figure out their understanding? Maybe something that ... |
I have this idea running around in my head, to generate and evaluate random mathematical expressions. So, I decided to give it a shot and elaborate an algorithm, before coding it to test it.
Example:
Here are some example expressions I want to generate randomly:
4 + 2 [easy]
3 * 6 - 7 + 2 ... |
I have a list box with several elements, let it be web servers (tomcat, iis etc). For each list box value, UI must have different views. For example, if we choose IIS, user name and password fields appear. If we choose tomcat, some additional fields appear depending on user OS - IP and port for linux and path for windo... |
I am reading the book programming in Lua. It said that
Closures provide a valuable tool in many contexts. As we have seen, they are
useful as arguments to higher-order functions such as sort. Closures are valuable for functions that build other functions too, like our newCounter example;
this mechanism allows Lua... |
For completely random reasons*, I wrote some code that calculates and displays the following expression:
P=1*(2+2)(3+3+3)(4+4+4+4)..(n+n...…
Which is equivalent to (n!)^2
The version I wrote (listed below the line) isn't terribly efficient; especially not in how it calculates the inner product.
How should I go about ... |
I have a homebrew MVC framework that I have been using for a while, and it has been working great, but I am planning an upgrade to it for its ORM classes. So far, it only supports SQL databases by creating statements dependent on what function is being called. The ORM class includes field structure and validation, comp... |
I have a simple DB editor that sits on the client. When I make changes via the editor, should I re-get all my data, as some of it is changed, or can I just do a check to make sure the procedure ran without error and assume my data is the same as the server?
|
So I recently started using Netty for my applications client/server communication and I discovered I loved the idea of listenable Futures. I wondered why I didn't know about Java being able to do this, and, sure enough, it cannot.
After some searching I realized that this is a feature provided by Guava's concurrency to... |
I am just now in the process of looking for jobs as I am about to graduate from college. An interviewer asked me what my current 'development stack' is?
I know this is probably a really basic question. but could someone explain to me what a 'development stack' is? It isn't a term that gets used in school.
|
In the great book User Stories Applied the author specified the following process for trawling requirements in the form of user stories:
Create user roles (personas) --> brainstorm user goals for each role --> Write user stories -->
estimate all user stories --> prioritizes stories --> select some user stories for the ... |
in C (ANSI, C99, etc.), structs live in their own namespace. A struct for a linked list might look something like this:
struct my_buffer_type {
struct my_buffer_type * next;
struct my_buffer_type * prev;
void * data;
};
It seems quite natural however for most C programmers to automatically typdef those struct... |
I made the case to coworkers that deep levels of control flow was harmful to the readability of code.
Example, taken from the relevant stack overflow question https://softwareengineering.stackexchange.com/questions/52685/if-you-need-more-than-3-levels-of-indentation-youre-screwed:
for(int i=0; i<10; ++i){
Object val ... |
We have a project that was written over a period of 2 years, but has a poorly designed architecture and not unit tests.
The software works well, but we're at the point where we want to refactor some core modules.
The budget is also limited so we can not hire a sufficient number of developers to write unit tests.
Would ... |
I am building a website for a UK audience that will utilise location data to offer search results based on a desired location or home address.
I have a large list of UK postcodes and geographic locations that I could parse and input to my DB to use in searches
I am wondering if this is the right thing to do?
Would it ... |
Environment
PostgreSQL 9.1
Java
Problem
I'll try to illustrate the problem here as simply as possible:
I'm trying to record the following relationship:
Node 1 => Node 2 => Node 3
Where Node 1 is the parent of Node 2, and Node 2 is the parent of Node 3. In the database table, the initial design is tracking this data ... |
I've been thinking about creating a class that handles importing and exporting of data, and I feel that naming it FooImporterExporter might look too long, I wan't to see if there's a name convention that I could use to name it.
These are some of the names I think would be appropriate:
FooProcessor
FooPorter / FooPort... |
I have been doing some programming contest problems, and I have noticed that many of them involve something along the lines of "get the minimum number of steps necessary to achieve a certain goal".
Examples:
Given the position of a knight and certain pawns in a chessboard, what is the minimum number of jumps the knigh... |
I noticed some code in our projects using CSS class names such as red, black or float.
I want to provide some information for people so they know to avoid it.
Is there a common name for that code smell so I can reference it?
|
We have a suite of applications including a website, a client application and multiple windows services. All these applications work on the same dataset and use an in-memory cache. Of course, this setup fails when one of the applications does something that invalidates the cache. I'm looking for a solution that will al... |
I work on a large Django application that uses CouchDB as a database and couchdbkit for mapping CouchDB documents to objects in Python, similar to Django's default ORM. It has dozens of model classes and a hundred or two CouchDB views.
The application allows users to register a "domain", which gives them a unique URL... |
A conceptual question, I tried to google but couldn't find any definitive answers, so here it goes:
Is it a good practice to write Java methods to return HTML strings that will be returned to the display/presentation layer?
Example:
public string getTextField(){
return "<input type=\"text\"/>";
}
|
My senior reviewer colleague wants me to do the following.
We have (on iOS, iPhone) a hierarchy of views in one of our screens. There is a simple rectangle that represents a Business card of a person (visually matches business cards style).
As this card is reused many times in many screens, I have written a custom clas... |
Short background: I'm using MEF/C# for developing a program that has one core (singleton) and multiple MEF parts (I call them modules, each module is a separate assembly with one class that contains the MEF export). The core imports all parts that are needed/available and initializes them (makes them read their configu... |
I have been given a Drupal project from an external web agency and have been trying to becomer wiser on both Drupal and their approach of making a site. With time I've learnt a bit morer about Drupal, even though I've come to notice it really isn't my cup of tea. Recently, I tried to "simply" replace the HTML generatio... |
I'm writing some Objective-C apps (for OS X/iOS) and I'm currently implementing a service to be shared across them. The service is intended to be fairly self-contained.
For the current functionality I'm envisioning there will be only one method that clients will call to do a fairly complicated series of steps both usin... |
This question is related with copyrights. The copyright is granted by default to the author of some code, however this requires to prove that some person is the "first" author of some piece of code. Consider the following example:
Andy writes some code in 2010 and stores it in a not secure enough place.
Brian copies t... |
As we know, The SRP states that every class should have single responsibility and that responsibility must be entirely encapsulated by the class.
But setters and getters do serve another responsibility - they do abstract class property(data) access.
if Setters and getters do abstract class property access, then they do... |
Given branch prediction, and also the effect of compiler optimizations, which code tends to offer superior performance?
Note that bRareExceptionPresent represents an uncommon condition. It is not the normal path of logic.
/* MOST COMMON path must branch around IF clause */
bool SomeFunction(bool bRareExceptionPresent)... |
I am writing a Bash script that automatically updates a repository containing source code and then compiles it. I have been a bit stuck on the part about how to start the compilation itself, i.e. if I should cat all the files in the repository and look for the main (or equivalent) function and then compile that file. O... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.