instruction stringlengths 34 19.9k |
|---|
My clients wants to take pictures with their iPhone's and place them collectible on their server, suggested by FTP.
I can see there is two solutions:
Directly upload from the iPhone to the FTP server. My colleague can make so the get the ActiveDirectery username and password, so they do not use the same password all o... |
I've recently found myself frequently in the position where I'm checking both bug fixes by other programmers, and bugs raised by the QA team.
Any bug fixes frequently end up having 'collateral damage', and I've found it invaluable to go through any recent fixes, and analyze what other parts of the system could potentia... |
I just refactored my project's entire codebase. So much so that even though it uses most of the same code base, things work in a radically different way. If the old version was 1.0, the new one would be 2.0. The project itself is just under 1mb in size (its a tiny little lib). I started the project a long time ago and ... |
We might be interested in starting to incorporate a unit test suite to our project, which is coded in Python (and it uses Redis, PostgreSQL and some third-party libraries, if that bears into the solution). The benefits we want to achieve are:
Once the project is up to speed, we want to be able to specify new behavior... |
I recently created a site in SharePoint and I need to setup a maintenance/support agreement for the site. In addition to the site, there are some custom modules that were developed that we monitor. What considerations should I be making when determining how much to charge for supporting the SharePoint site and any cust... |
I want to publish a small web project that is supposed to contain some of my research results to present it to the scientific community. All my analysis I ran so far have been written in python already, thus I considered to use django web framework to provide the results. This is, because I plan to show some visualizat... |
I've written an iOS app, and I'd like to release it on to the App Store. I'm an individual so it's not being released via a company or anything, just me.
Is it typical to just release a free app under your own name? If so, what would be appropriate copyright information to submit?
|
I'm rather new to C, and I'm wondering if code duplication is a necessary evil when it comes to writing common data structures and C in general?
I could try to write a generic implementation for a hash map for example, but I'm always finding the end result to be messy. I could also write a specialized implementation ju... |
One of the differences between svn and git is the ability to control access to the repository. It's hard to compare the two because there is a difference of perspective about who should be allowed to commit changes at all!
This question is about using git as a centralized repository for a team at a company somewhere. ... |
Overview
I am working on a client-server application. The client is written in C++ (working on Windows, planning to support Linux) and the server is a .NET RESTful service. I need to HTTP POST some data to the server. The data is a unicode string that I need to compress using any fast compression algorithm (needs to be... |
I have a tiny project (<1k but let's say its <5k of lines). I made it open source and put it on github.
I did this once before and I didn't get a single download nor fork but that was very specific and this tiny project is very useable to other programmers.
It's open source (let's say LGPL, GPL, public domain or somewh... |
Having read a post yesterday, I realized I did not know much about the origin of exceptions. Is it an OOP related concept only? I tend to think it is, but again there are database exceptions.
|
I remember once reading some research where a body of C code had been analysed, and the findings were that the vast majority of for loops could be categorised into about five categories, corresponding to the functional equivalents of map, filter, fold, etc.
I can't seem to find this paper/article anymore. Can anyone po... |
As far as I understand, both Scala and Clojure have been designed as new languages that
depend on the JVM, and
easily integrate with Java code, in the sense that they allow to use Java classes inside Scala and Clojure code.
Starting with Java 8 (and maybe even more strongly with subsequent versions of Java), there wi... |
I'm writing a GUI application. The user selects item from a comboBox (non editable). The suitable input data control is then enabled and user enters data. Then the appropriate object according to the comboBox selected item is created.
I've thought of using String[] array to display the list of choices and then using ... |
For developers with extensive experience using mocks, is it okay to mock multiple objects in one class (ie satisfy multiple interfaces) or is this not recommended?
I am wondering because mocks are stubs anyway, from a testing perspective, it doesn't seem to make a big difference if I consolidate mocks.
However, I do wo... |
Here's an API concept which could be useful for performance optimisation. It's an example of key-based cache expiry applied to a broader internet-wide context instead of the internal Memcached-style scenario it seems to be mostly used for.
I want to make API calls almost as cacheable as static images. Using a news/feed... |
I'm developing an application handling DB parts. I retrieve the data from the DB with stored procedures and prepared statements. Now I want to display the data in the GUI.
What is the current technology used for that? Does one still use DataSet and DataTable for that?
|
I am building an app that analyzes posts by people by pulling their Tweets and Facebook posts. I need to process all the posts and find useful phrases. What I mean by useful is that, any word or phrase that is a noun/adjective/verb that would represent a discrete object or an idea, or in other words, I am looking for k... |
Currently I want to structure a tracking/history table like this:
PrimaryKey - ID
OtherTableId - fk
fieldName - name of the field its tracking
OldValue
NewValue
UserName
CreateDateTime
So basically I want to have a table that will track another tables history, store the column name of the changed field with the new a... |
I'm a Web Developer about to unlock the "First Class Library Published" achievement in my career and I'm sweating bullets (I was up all night stressing out). I'd love to tap the experience of the community to see if anyone has any suggestions or recommendations for making sure this goes as smoothly as possible. Are t... |
So every number in the code that we are sending to a method as an argument is considered as a Magic Number?
To me, it shouldn't. I think if some number is let's say it is for minimum length of user name and we start using "6" in the code...then yeah we have a maintenance problem and here "6" is a magic number....but ... |
This image is taken from Applying Domain-Driven Design and Patterns: With Examples in C# and .NET
This is the class diagram for the State Pattern where a SalesOrder can have different states during its life time. Only certain transitions are allowed between the different states.
Now the OrderState class is an abstract... |
Persistence ignorance is ability to retrieve/persist standard objects, where standard objects are considered as classes focused on particular business problem and thus don't contain any infrastructure-related logic. In DDD a Repository pattern is used to achieve PI.
Assuming we don't use ORM's POCO objects to model th... |
I have recently witnessed more and more problems similar to the ones explained in this article on feature intersections. Another term for it would be product lines, though I tend to attribute these to actually different products, whereas I usually encounter these problems in the form of possible product configurations.... |
Possible Duplicate:
How to open-source a project whose git repository has copyrighted media in the history?
Our company has spent a year working on an internal web application and has decided to open source the project and host on github. The application was originally versioned with Bazaar and we are going to prese... |
I have developed a website in asp.net and I have some additional tasks, improvements to develop. In order to get experience in asp.net/mvc, I want to create an admin panel using asp.net mvc.
Is this a logical next step?
P.S. The project is small and 20% of the website is mine, so there are not any restrictions. Ther... |
In this talk, Guido van Rossum is talking (27:30) about attempts to write a compiler for Python code, commenting on it saying:
turns out it's not so easy to write a compiler that maintains all the
nice dynamic typing properties and also maintains semantic correctness
of your program, so that it actually does the s... |
I'm fairly new to the MVVM concept but like a lot of the flexibility it gives me so far. However, I'm struggling to find a good way to manage my code. I have several classes that are just sitting in a folder in my solution such as xxxView.cs, xxxViewModel.cs, yyyView.cs, yyyViewModel.cs, zzzView.cs, zzzViewModel.cs y... |
This is about the use of personas, primarily in the agile development realm.
What value, if any, do personas give during implementation?
On agile modeling, the discussion about personas remains in the context of requirements investigation.
On wikipedia, the benefits are described to "assist with brainstorming, use case... |
BACKGROUND: I am starting to architect a web project using asp.net mvc.
I'm going to use a very common architecture where I have the following layers:
Service
Biz
Data
Domain
The Service layer interacts with the Biz, Data and Domain layers. The mvc controllers will have the service layer injected into them using ... |
Question and Context
I am currently working on a project where the main question is, how do we insert an API between the database and end-users who may develop applications/scripts of their own that will work with or on top of the database?
The database type I am working with is Postgresql, and this project is in-house... |
Take a look at Google, Windows 8, etc.
Why does everything look so plain now? Looks really ugly to me.
Is it all because of smartphones and tablets?
Do I have to follow that trend?
|
In a sense, 10! (ten factorial) represents an approximate dividing
line between things which are practical to compute and things which
are not.
This is from Knuth's TAOCP Fundamental Algorithms book (1973).
Is this still a valid statement or has computing power rendered it obsolete ?
|
To get an idea of the quality of a project that I've never seen before (usually open source projects that I'm considering whether or not to use), I often start by opening random files and eyeballing fine details of the code.
I look for things like:
Style (does it follow accepted conventions for the language and is it ... |
On my mobile app, I am storing the username of a logged in person, and downloading some data for the given/stored username. When the user checks for updates to his data content on the server, the server dishes out a delta of the content, based on the username. The app then updates its local display accordingly.
The pro... |
In a program I am developing, I need to use an improved ListView. The ObjectListView seems to satisfy my needs, except it is GPL and thus unusable in my commercial application. I believe, however, that we can develop our own replacement in-house, using the documentation from the site, without looking at the code.
Is th... |
Recently I realized that the most popular social platforms on the net are in the hand of just a few companies, Google, Twitter, Facebook, to name just a few. Taking into account the world changing power of these frameworks I am looking for a non-profit, democratic alternatives to these sites. (Mozilla is a non-profit p... |
I am writing unit tests for a library written in Qt/C++.
The library is rather big, with lots of functionalities. I have a separate unitTest folder which I have my UnitTest.cpp in there. Having all test case / unit tests in the same file, makes it one very big .cpp file.
I was wondering what is the best approach to uni... |
As per my knowledge daemon thread is a thread that runs in background(low priority thread) and also a child thread runs in the background when the parent thread runs foreground so where does the difference lie between a child and a daemon thread?
It's in case of java and can you explain referring to other languages too... |
I'm to write an event correlator. A fundamental part of the system will be a decision tree that recognizes the origin of the fault basing on recorded states and log files.
Often many accidents will differ with minor details and many decisions taken will be made basing on fuzzy, incomplete or unreliable data, but most o... |
My team and I are using Scrum to manage software development projects. In my company there has been a move towards more structure in all IT projects using a waterfall methodology. This is fine by me as there are lots of non-software-development projects which will benefit greatly from this and it is not threatening ou... |
Obviously, testing methods are language-independent. An integration test stays an integration test no matter what the technology.
But platforms implement some kinds of testing support. And the details vary between implementations, so a programmer has to learn how to use the tools of their framework. And platforms evol... |
When I first started working a mainframe assembler programmer showed me how they swap two values without using the traditional algorithm of:
a = 0xBABE
b = 0xFADE
temp = a
a = b
b = temp
What they used to swap two values - from a bit to a large buffer - was:
a = 0xBABE
b = 0xFADE
a = a XOR b
b = b XOR a
a = a XOR b
... |
Let's suppose I want to create an extension for Joomla that uses a jQuery plugin or any third party library. Imagine that I create a Joomla module that uses jquery Nivo Slider plugin (MIT License) http://nivo.dev7studios.com/license/. I'm not sure If I could sell this module with this license.
Could I sell it if the p... |
I'm solving a graph-search optimization problem. I need to find the k best acyclic shortest-paths through a directed weighted graph.
I know there are a number of exact and approximate k-best algorithms, but most of the recent research seems to be oriented toward very large, very sparsely-connected graphs (e.g. road rou... |
I am author of growing framework, which is focused around User Interface building in PHP. Essential requirements for the up-coming website redesign is ability to run code examples. I am willing to extend this option to add-on authors which would mean other people will be able to execute code on my server.
Please sugges... |
In programming contests like Google CodeJam, Facebook Hacker Cup, each question is provided with an input file for testing one's code for that program. I get struck at this point only.
I don't understand whether that input file should be read by my program or it is just for testing the correctness of my program for var... |
In agile methodologies (e.g. SCRUM), the complexity/effort needed for user stories are measured in Story points. Story points are used to calculate how many user stories a team can take in an iteration.
What is the advantage of introducing an abstract concept (story points), where we can just use a concrete measurement... |
Given a numerical range and a list of used numbers that fall within that range I need to compress the range into blocks of used and unused numbers.
For example:
range: 0 to 10
used: 3,4,5,9
I need an output like
0-2: free
3-5: used
6-8: free
9: used
10: free
Not sure where to start with this, so any guidance appr... |
I know Haskell already has the ability to parametrise a type over another type (similar to template programming in C++), but I'm wondering whether Haskell can also parametrise a type over values – whether it supports dependent types. With dependent types, you can have a type that's parametrised over integers, for examp... |
I have a mobile app built using jquerymobile, PhoneGap and some custom CSS and JavaScript. The data objects are received in JSON and used to display different forms to the user. For example
{ id: 1, type: personal_details, question_1: "First name", question_2: "Last name" },
{ id: 2, type: work_details, question_1: "O... |
Where I work, new applications that are being developed that will use their own relational database, must have their database-models (conceptual, then physical ) reviewed and aproved by DBAs.
Things looked after are normalization, antipatterns, table and column naming standards, etc.
Is this really a DBA's responsabili... |
Recently I was looking at python's shutil and subprocess etc... And I started wondering: wouldn't it be ok to use python instead of e.g. bash?
What am I missing?
|
I am doing arithmetic operations on really huge numbers.
For example, I am given six variables, a_{11}, a_{12}, a_{21}, a_{22}, x_1, and x_2.
Although the above are math terms, these six variables are each 1000-bit integers.
What I want to do is to calculate (1) two numbers z_1 and z_2, and (2) the matrix inverse.
(1) ... |
I have been going round in circles with this question for days - which is the best PHP framework to use to create a RESTful Web service?
I've trawled the web for info and have come across three main factors that are important:
must have REST architecture built into the framework
must be a stable application
must be fu... |
Is the concept of OOP intimately tied to allocating objects on the heap? Is it possible to write normal OOP without creating excessive objects on the heap?
|
I have a codeigniter app and in my model, I always return true or false for all functions, and if I have data that needs to be passed, I also set a property that contains my data.
The only trouble is, in my controller, if I have to call 3 or 4 methods in my model, the code gets really repetitive.
If ( $this->my_model-... |
I'm writing some documentation in a project in a tool. In this tool of mine, and write in specific area, I have here use Case, Business Rule, N-Diagram Types, and Functionality and Functional Requirements.
So I got me wondering, Are there differences between Functionality and Functional Requirements?
In my vision, a Fu... |
I'm a python beginner, and I just learned a technique involving dictionaries and functions. The syntax is easy and it seems like a trivial thing, but my python senses are tingling. Something tells me this is a deep and very pythonic concept and I'm not quite grasping its importance. Can someone put a name to this techn... |
I am working on developing a relational database that tracks transactions that occur on a device I'm working on for my company. There are different types of transactions that could occur on the device, so we have a "trans_type" field in one of our main record tables. My group has decided to make the type of this field ... |
Getting a few projects started with EF, but I had some questions about join tables and keys etc. Lets say I have a table of applications and a table of permissions. Applications have many permissions and each permission can belong to many applications (many-to-many).
Now, the Application and Permission tables are easy:... |
Many modern Relational Database Management Systems automatically support referential integrity, i.e. when you try to delete a tuple which has a reference (in the form of foreign key, for example), the DBMS doesn't complete the operation and brings an error.
Consider a database where every table has an attribute, which... |
I always have trouble figuring out if I should name a certain method starting with getSomething versus findSomething.
The problem resides in creating helpers for poorly designed APIs. This usually occurs when getting data from an object, which requires the object as a parameter. Here is a simple example:
public String ... |
I know it has something to do with 2's complement and adding 1, but I don't really get how you can encode one more number with the same amount of bits when it comes to negative numbers.
|
What's the difference between WTFPL, CC0, and public domain? Are they essentially the same thing?
|
As someone who's still new to agile, I'm not sure I completely understand the relationship or difference between user story, feature, and epic.
According to this question, a feature is a collection of stories. One of the answers suggests that a feature is actually an epic. So are features and epics considered the same... |
I am stuck with a very old large website which I need to do some modifications. I can't use or integrate a new MVC framework due to current site is outdated with some custom coding done long time ago.
I am writing custom reflection class for the user table in the database, but I find it easy to work on the model creat... |
I would have two questions related to cyclomatic complexity:
Can I use this metric for a whole app? I guess I cannot, as it would be incredibly large number, considering functions calling functions etc. Is it just for module/method/unit?
In Visual Studio, for starting app with just calling the Main method, the cycloma... |
I recently came across some newly written code that was interspersed with lots of Debug.Assert (C#).
Should we still use this widely despite the usage of TDD, BDD and Unit Testing in general?
|
I am tasked with designing and implementing a flexible UI solution for deployment across a series of "kiosk"-ed Windows endpoints. There is some debate about what is the considered to be the best technology solution for the actual UI itself. The requirements are:
Must be hardware accelerated
Must play WMV video (for l... |
I deployed a Redmine installation yesterday and today I try to fill it with some relevant data. One issue I came across is the organization of projects itself. While I took a look at how Redmine itself uses parts of the software, they unfortunately have only one project set up and I haven’t seen any other examples. I ... |
Possible Duplicate:
Asking for a code sample of the company at an interview
Last year I changed jobs twice.. In the interviews with the companies, everything was so ideal and perfect. Latest frameworks, design patterns, distributed systems, scalable and enterprise systems, etc.. But in both cases something was not a... |
Sources usually mention that dynamically created variables are allocated on the heap, while functions' variables on the stack. Also the ones on the stack cease to exist automatically when e.g. the function which contains the variable exits. If I understand correctly, data fields of class are on the heap.
I do not under... |
Possible Duplicate:
Why were Java collections implemented with “optional methods” in the interface?
I was looking at the javadoc for Collections and I noticed the unmodifiableCollection/unmodifiableList/etc. methods and I thought to myself, could this API be better?
Here's one of the API signatures:
public static ... |
Preamble
One of the concepts used in writing Python code is "Easier to ask for forgiveness than permission", aka EAFP. Literally, this means that instead of doing checks, whether an operation is possible, you do the operation and "ask forgiveness" if what you do fails. Technically this means (just an example with no pa... |
I am a founder and only developer of an open-source software designed for a small subset of enterprises. It was originally developed for and now runs at one of businesses of the type it was designed for.
It's my biggest project and I wanted to make something even bigger of it. Creating a software developing company and... |
Is it possible to use the Windows 8 Store controls in a Windows 8 desktop app? Controls like the FlipView and SemanticZoom would be useful.
I haven't found any information about this and would presume the answer is no, but thought someone would have a more definitive answer.
|
I have an exam on Programming Concepts this Saturday and I am struggling to find some information to understand some concepts better.
What is the difference between loop invariant and assertion? To me they look the same.
Also, what exactly is while loop invariance theorem?
Not sure whether it is me or it is ridiculousl... |
I'm a big fan of using open source software but I mostly use community binary releases for the job.
I'm wondering about companies that go the extra degree and build everything they use in their production server application infrastructure entirely from source, in-house, in an effort to promote transparency and supporta... |
I'm fairly new to OOP (and programming in general), but what I find myself doing is that in the event that I don't need to pass a value from one method to another, I'll have my method calls centralized in some class within a Form.cs file.
For example:
public void CentralMethod()
{
MethodA();
MethodC();
Meth... |
Possible Duplicate:
Should developers enter bugs into the bug tracking system?
Should I log trivial fixes?
For a project I'll be doing in school soon I will be working with 6 other people. We will probably be using YouTrack to track our bugs and we can obviously see the value in this system.
My question, however, is... |
As part of the interview process we initially ask the candidates to do 'FizzBuzz' nowadays the percentage of candidates that can correctly answer FizzBuzz has increased dramatically - this may be due to it's popularity on the web.
About a year ago, as a second question we began asking a question very similar to the ori... |
I'm confused between aggregation and containment. I'm wondering if the following represent an aggregation or containment?
class Auto
{
private string model;
private int speed;
class AutoCustomer
{
public string LastName;
public string Address;
public DateTime DateOfPurchase;
... |
Today I got yelled at for developing an application on a production server. Quote, "developing on a production server is not acceptable - ever!"
Here is the situation.
I set up a development instance: http://example.com:3000
The production instance is: http://example.com
I complete all my development work on http://ex... |
Just wondering what the accepted convention is for Rails controller design. Currently, every controller in my app that I've written it set up to send a JSON response when necessary. Thing is, I only ever utilse HTML responses in my app. So is it a good idea to have them defined?
For example:
def show
@dog = Dog.find(... |
I need help understanding a problem I have, and that others surely have had as well.
I'm working on a web-application that allows users to interface with a database. The application in general has multiple pages with tabbed navigation, that displays and allows most content to be editable. So far, it works well.
I need ... |
Why is it often said that the test cases need to be made before we start coding?
What are its pros and what the cons if we don't listen to this advice?
Moreover, does that advice refer to black box testing or White Box testing or both?
|
I need to describe an algorithm that finds the second smallest element in a Fibonacci-Heap using the Operations: Insert, ExtractMin, DecreaseKey and GetMin. The last one is an algorithm previously implemented to find and return the smallest element of the heap.
I thought I'd start by extracting the minimum, which resul... |
I was reading about some development interview practices, specifically about the technical questions and tests asked at interviews and I've stumbled quite a few times over sayings of the genre "Ok you solved the problem with a while loop, now can you do it with recursion", or "everyone can solve this with a 100 lines w... |
I have a page Object,
which has Paragraph and Image object Collections
And each paragraph has only image_id(s) that are assigned to a paragraph. All other information about image is stored in Page->Image
Now from the paragraph object I want to access the image information where paragraph has only image_id and all other... |
The question in general is: is there a more effective way of implementation of table with structure like Dictionary<int, Dictionary<string, string>>?
The reason I am asking this is because I have made few performance tests and it does not perform well for data with > 5M rows. Now, I dont really need this amount of data... |
Neo4j eases relationship traversals => especially useful for a social network for instance.
But are there any scenarios when it's advised to associate an additional relational database (or other NoSQL database that isn't specifically oriented graph) for specific query types.
In short, can Neo4j be sufficient to itself ... |
in my application,
I have a request type associated with variety of API calls I make to the REST server.
when the response from server comes in the same delegate method for web engine's response,
I have to check the API type in the request object passed as a parameter to the delegate method and then take the correspon... |
This is what I call a "combined" getter/setter method (from jQuery):
var foo = $("<div>This is my HTML</div>"),
myText;
myText = foo.text(); // myHTML now equals "This is my HTML" (Getter)
foo.text("This is a new value"); // The text now equals "This is a new value")
This is the same logic with separate (theoreti... |
Recently we had an issue on our site where someone attempted SQL injection via a cookie (we'll call it lastID). NOC was in a frenzy and angry about how the cookie as an attack vector could be ignored. They had a developer create a class for managing cookies that will sanitize lastID (and eventually other cookies) to ... |
For my final project in school we have to develop an online shop. This shop should have a cart where items can be placed whether or not you are logged in. If you log out the cart shouldn't empty and should still be shown.
So my question is would it make sense to store the cart as xml in the database(ms sql server)? The... |
I have been trying to understand why the JDK 8 Lambda Expert Group (EG) decided not to include a new function type into the Java programming language.
Going over the mailing list I found a thread with the discussion about removal of function types.
Many of the statements are ambiguous to me, maybe because of the lack o... |
What are the most obvious drawbacks to this idea for an enterprise(ish) model using the following technologies.
Browser based and native developed GUI using Delphi to connect to
Datasnap server (Delphi, obviously) via Rest which stores documents in
A CouchDB Server
But gets the structure for those documents from ... |
A user on Stack Overflow posted a question related to overriding a native JS function. The question is here and this is the code:
function throttle(fn, time) {
var handle;
var execute = function() {
handle = null;
fn.apply(this, arguments);
};
var throttled = function() {
if(!handle) {
handl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.