instruction stringlengths 34 19.9k |
|---|
I have done some searching on Google, but haven't come up with much as of yet. I am wanting to take a set of point data, which I had previously been using to create weighted points for a heat map through the Google API, and turn them into a contour map to overlay on the Google Maps API. I haven't seen anything in Googl... |
I've been developing an app for the iOS platform, and as I've been going along, I've noticed that I've done a terrible job of keeping my files (.h, .m, .mm) organized. Is there any industry standards or best practices when it comes to organizing files for an iOS project?
My files include custom classes (beside the v... |
I'm starting a new Java project which will require a RESTful API. It will be a SaaS business application serving mobile clients.
I have developed one project with Java EE 6, but I'm not very familiar with the ecosystem, since most of my experience is on the Microsoft platform.
Which would be a sensible choice for a JAX... |
Possible Duplicate:
Code maintenance: keeping a bad pattern when extending new code for being consistent, or not?
To keep things simple let's say I am responsible for maintaining two applications, AwesomeApp and BadApp (I am responsible for more and no that is not their actual names).
AwesomeApp is a greenfield proj... |
I have a bunch of functions that are used across multiple ASPX files. I want to condense these down to one file to be used for all the ASPX files. I have a few ideas but I want to know what the accepted method to doing this would be. I have an idea to just create a class to put them in.
However, I was wondering if i co... |
I am trying to learn some LISP and I have read a lot about the importance of LISP macros so I would like to get some working experience with them.
Can you suggest a practical application area that would allow me to use macros to solve a real-world problem, and to understand the usefulness of this programming construct?... |
I hope this isn't too general of a question; I could really use some seasoned advice.
I am newly employed as the sole "SW Engineer" in a fairly small shop of scientists who have spent the last 10-20 years cobbling together a vast code base. (It was written in a virtually obsolete language: G2 -- think Pascal with graph... |
I have a legacy PHP application that was written in 2004 and uses MSSQL as a database backend.
At this stage MSSQL is still supported by PHP but only just via a Microsoft driver. I have looked at converting to mysql via automated tools, which work quite well, but I have quite complex views which need a lot of individu... |
I am trying to compile and install every custom module under it's own designated folder. (ex: /myApps/myLinux/compiled_app)
I had luck with Python so far, where my Python is compiled from source and lives in:
/myApps/myLinux/python2.5 and "python2.5" -> /myApps/myLinux/python2.5.6-gcc463
So I can access this Python thr... |
I have been following Coursera's course on Algorithms and came up with a thought about the divide/conquer algorithm for the closest pair problem, that I want clarified.
As per Prof Roughgarden's algorithm (which you can see here if you're interested):
For a given set of points P, of which we have two copies - sorted in... |
I have written applications that are very small scale and the code I write works fine for them. But I have often wondered how the server side code I write would scale up from 100s of queries per day to millions.
Also when looking at possible jobs/projects, people are often looking for developers with experience in this... |
I need to use FIFO in my application in linux+C, I have multiple threads and processes, I read some where that writing to a FIFO is atomic below some value (I believe 4k) especially I'm writing max of 300 bytes, Am I safe here?
|
Okay, the question title may be a bit cryptic. But it aptly describes what I'm looking for:
I think every experienced coder went through this numerous times: You get a binary file format specification, you implement the reader for it, and… nothing works like expected. So you run your code in the debugger, go execute th... |
I'm working on my CMS (in PHP platform) for a long time now. The main program is done and I'm currently developing the Installer part. Installation itself will be fairly simple:
Upload all files
Verify that the "content/" dir has correct permissions
Check if ALL files are intact and not modified [This is the subject o... |
I just read that there will be two versions of Windows available: Windows RT and Windows 8.
Could someone please describe what the differences between Windows RT and Windows 8 are? And how these differences may affect developers creating apps for one or the other?
Also, what is WinRT?
|
Background
The longer I work on a project, the less clear it becomes. It's like I cannot seperate various classes/objects anymore in my head. Everything starts mixing up, and it's extremely hard to take it all apart again. I start putting functions in classes where they really don't belong, and make silly mistakes such... |
From my understanding creating an application that runs on multiple architectures requires virtualization, and virtualization reduces performance since it creates a layer of abstraction.
With Windows 8 supporting both Intel and ARM architectures should we expect slower performance with a WinRT app versus a .Net app run... |
A webservice that I call returns a list of data. The data from the webservice is updated periodically, so a call to the webservice done in one hour could return the same data as a call done in an hour. Also, the data is returned based on a start and end date.
We have multiple users that can run the webservice search, a... |
I want to learn Cloud Computing and Big Data at home.
Is it possible to learn these technologies on home PC?
Which technologies to learn in Cloud Computing?
Which technologies to learn Big Data (Hadoop)?
|
I am a C#, WPF developer and would like to know and understand the Microsoft UI Stack. I could not find much on the internet. I guess that this would be a huge topic, and might not be feasible to explain here, but any suggest online reading would be greatly appreciated.
|
What is actually the role difference between ProductOwner and StakeHolder ?
|
I know that static methods/variables are associated with the class and not the objects of the class and are useful in situations when we need to keep count of, say the number of objects of the class that were created. Non-static members on the other hand may need to work on the specific object (i.e. to use the variable... |
Background
I've used VCS (mainly git) in the past to manage many existing projects and it works great. Typically with an existing project, I would check in each change I make to the code that either optimizes or changes the overall functionality (you know what I mean, in suitable steps, not every single line I change).... |
We've got a job queue system that'll cheerfully process any kind of job given to it. We intend to use it to process jobs that each contain 2 tasks:
Job (Pass information from one server to another)
Fetch task (get the data, slowly)
Send task (send the data, comparatively quickly)
The difficulty we're having is that... |
Justed stumbled across CRaSH and although it looks mighty interesting, I'm wondering why a Java developer should invest time & energy into learning (yet another) shell language. What sort of standard- and cool-applications can CRaSH be used for? Is this like a Groovy-version of Jython?
I guess, when the dust settles, I... |
I have the following setup in my project:
public class WebApiApplication : System.Web.HttpApplication
{
public static ISessionFactory SessionFactory { get; private set; }
public WebApiApplication()
{
this.BeginRequest += delegate
{
var session = SessionFactory.OpenSession();
... |
Typically when creating a simple tool or something that has to use a database, I go through the fairly long process of first creating a webservice that connects to a database then creating methods on this webservice that do all the type of queries I need.. methods like
List<Users> GetUsers()
{
...
}
User GetUserByI... |
I have written a nifty little web app (in Java/GWT/JS) and have been experimenting with the idea of making it available through Facebook as a Facebook App as well.
After spending some time reading Facebook's developer docs, it seems like I can just create a Facebook App to point at any URL I want and use that as the ap... |
I had a great idea for a new javascript keyword "delay", but I don't know what I can do to bring it to the new specification. Also I want to know what you guys think about it and if it's even realistic.
What does the delay keyword ?
The delay keyword does nothing more than stop the execution of the current stack and im... |
I have an object that takes in data and spits out a transformed output, called IBaseItem.
I also have two parsers, IParserA and IParserB. These parsers transform external data (in format dataA and dataB respectively) to a format usable by my IBaseItem (baseData).
I want to create 2 systems, one that works with dataA a... |
I've been reading up on EJBs (3.x) and believe I understand the basics. This question is a "call for confirmation" that I have interpreted the Java EE docs correctly and that I understand these fundamental concepts:
An EJB is to an App Container as a Web App (WAR) is to a Web Container
Just like you deploy a WAR to a ... |
1)
In fact if two responsibilities are always expected to change at the
same time you arguably should not separate them into different classes
as this would lead, to quote Martin, to a "smell of Needless
Complexity". The same is the case for responsibilities that never
change - the behavior is invariant, and t... |
a)What is the difference between SRP and SoC? Perhaps that SRP is applied at class level, while SoC can be applied at system, subsystem, module, class or function levels.
b) If answer to a) is yes, is then SoC applied at class level a synonym for SRP?
thank you
|
As my firm makes the transition to using SFDC as our main operational system, we've spun together a couple of SFDC portals where we can post customer-specific documents to be viewed at will. As such, we've had the need for pseudo-ETL applications to be implemented that are able to extract metadata from the documents ou... |
I'd like to consider myself a fairly experienced programmer. I've been programming for over 5 years now. My weak point though is terminology. I'm self-taught, so while I know how to program, I don't know some of the more formal aspects of computer science. So, what are practical algorithms/data structures that I could ... |
What is the most maintainable and efficient way to architect a web application who's purpose is to host and generate websites which can be customized to a certain degree?
There are a lot of these style of applications in the wild that generate all kinds of sites, from sites that host World of Warcraft guilds to other s... |
Here is the scenario. I am making a custom blogging software for my site. I am implementing a search feature. It's not very sophisticated - basically it just takes the search phrase entered and runs this query:
$query="SELECT * FROM `blog` WHERE `title` LIKE '%$q%' OR `post` LIKE '%$q%'";
Which is meant to simply sear... |
The probjem is that I have two sets of bugs top fix on the project. One to deploy in 5 days, and one to deploy in 10 days.
I am going to solve all the bugs before the fifth day but I do not want to deploy the last 5 before the release date (in 10 days).
How can I work on two separate codes and the merge all the modific... |
I am wondering what is the best way to handle the situation of marking a bug as resolved and providing a version of component/product in which this fix can be found.
Context
For a project I am working on, we are using Bugzilla for issue tracking, and we have the following:
A product "A" with a version number like vA.B... |
Possible Duplicate:
Is there a canonical book for learning Java as an experienced developer?
I am looking for book to get up to speed with (start with) a Java language. I am experienced (more than 15 years) C# and C++ programmer with a bit of Python, so I don't need a book which starts with a programming concepts fo... |
Many of the times my compiler shows errors like Lvalue or Rvalue Required.
What are the Lvalues and Rvalues in C or any programming languages?
Is a pointer constant a rvalue?
|
I'm trying to find out ,that is there any relation between different types of UML diagrams, for example, once you developed a use case, should it be an event for each of them in a sequence diagram, or is there any exact relation between the use case and class diagrams.
By the way my main focus is on the below diagrams:... |
Just started diving into Objective-C and IOS development and was wondering when and the correct location I should be declaring variables/properties. The main piece of code i need explaining is below:
Why and when should i be declaring variables inside the interface statement and why do they have the same variable with ... |
Is there any difference between the two topics? I have seen companies asking for Good Programming knowledge some Good Programming logic.
I have seen this in Job profiles for a developer – for e.g. "good Programming logic", "strong Programming knowledge".
I believe that Programming knowledge is related to knowledge abou... |
I want to know if the structure for an ASP.NET website I'm working on uses a design pattern for it's web pages. If it is a design pattern, what is it called? The web pages have the following structure:
UserDetails page (UserDetails.aspx) - includes UserDetailsController.ascx user control. UserDetailsController.ascx in... |
What's the best way to give the end-user of my web application the ability to open, edit and save (via browser) word documents that are stored in my database?
I have this working by doing an html conversion of the file (via Aspose Words) but this method seems not even close to flawless and i'm trying to improve this. I... |
I have been looking for an efficient String trie implementation. Mostly I have found code like this:
Referential implementation in Java (per wikipedia)
I dislike these implementations for mostly two reasons:
They support only 256 ASCII characters. I need to cover things like cyrillic.
They are extremely memory ineffic... |
Can the Strategy design pattern entirely replace delegates?
In Java, for example, there are no delegates. Is it possible to gain all the features of delegates by using Strategy design pattern?
Edit: I see there is some ambiguity in my question. By delegates I mean the feature of the language, C# for instance.
|
I have joined an ongoing project, where the team calls their architecture "component-based". The lowest level is one big database. The data access (via ORM) and business layers are combined in various components. E.g., there's a component for handling bank accounts, one for generating invoices, etc. So every component ... |
Summary:
We are looking to expand our use of email for notification purposes. We understand it will generate more inbox volume, but we are being selective about which events we fire notification on in order to keep the signal-to-noise ratio high.
The big question we are struggling with is designing a system that guara... |
I need to prepare an internal product release road-map for product being built via scrum methodology, and have some difficulty correlating sprints to the road-map.
The main problem is that as I don't have effort estimations for every story, because these prepared immediately before each sprint, so I don't know what wil... |
I am learning assembly language for x86 architecture. But, i am unable to find any practice problems so that i can test my skills. Can you suggest me some practice problems or some small assembly language project to improve my skills.??
thanks in advance
|
I've been reading Martin Fowler's note on Continuous Integration and he lists as a must "Everyone Commits To the Mainline Every Day".
I do not like to commit code unless the section I'm working on is complete and that in practice I commit my code every three days: one day to investigate/reproduce the task and make som... |
I have two objects that represent a 'Bar/Club' ( a place where you drink/socialise).
In one scenario I need the bar name, address, distance, slogon
In another scenario I need the bar name, address, website url, logo
So I've got two objects representing the same thing but with different fields.
I like to use immutable o... |
I'm addicted to VC++ since 2008, and I begin to work for my current company from 2011 when I graduated in Mathematics. Now I still love VC++, it is a wonderful programming language.
I'm a little confused whether it's a good idea to continue with Windows Programming.
I'm in Beijing, China. Of course, I come from China. ... |
What would you choose as the default Ant target?
In the context of a small visual tool with a user interface, open source.
I was thinking about jar because the project's distributable is the jar file.
But someone prefers to have help as the default target, to show the available targets.
Or maybe another target? I doubt... |
I am willing to work on a personal project that I would like to release publicly. I am working with Silverlight and have experience with XAML, as it is my full-time job.
It is enjoyably for me to create UIs in Blend and XAML. I am also a big fan of C# language. I don't know what I would do without LINQ now.
Anyways, I... |
I've been programming (obsessively) since I was 12. I am fairly knowledgeable across the spectrum of languages out there, from assembly, to C++, to Javascript, to Haskell, Lisp, and Qi. But all of my projects have been by myself.
I got my degree in chemical engineering, not CS or computer engineering, but for the fir... |
I have a legacy C code on my hands, and I am given the task to filter dead/unused symbols and paths from it. Over the time there were many insertions and deletions, causing lots of unused symbols. I have identified many dead variables which were only being written to once or twice, but were never being read from.
Both... |
JavaFX has provided a bunch of new Property objects, such as javafx.beans.property.DoubleProperty which allow you to define fields which can be automatically observed and synchronised.
In many JFX examples, the MVC model class has a number of these Property fields, which can then bind automatically to the view.
However... |
I have a website to design. I have information on how the page should look and interact. The problem is I'm not good in front-end design, and have put many many hours to get the hang of the stuff. Currently I use the CSS from sample sites in github to style my site, which seems to be an un-ethical way.
Question: how d... |
Over time I could understand two parts of SOLID – the “S” and “O”.
“O” – I learned Open Closed Principle with the help of Inheritance and Strategy Pattern.
“S” – I learned Single Responsibility principle while learning ORM (the persistence logic is taken away from domain objects).
In a similar way, what are the best re... |
Is it possible to fetch commit messages from bitbucket via json or something so that a project manager can see what the changes are without having to look at the code. If it's possible can you give me some ideas on how to do it.
|
I'm learning T-SQL. From the examples I've seen, to insert text in a varchar() cell, I can write just the string to insert, but for nvarchar() cells, every example prefix the strings with the letter N.
I tried the following query on a table which has nvarchar() rows, and it works fine, so the prefix N is not required:
... |
As freelancers, we meet somewhere and chat about a new idea for a project, brainstorm etc. Up to this point, we have taken notes of the ideas, but we would like to be able to share more efficiently the ideas with each other. However, I fear that if I use some online product (such as Google Docs) these ideas could be se... |
I am having a difficult time understanding Facebook's internal "e-commerce microcosm" and what it allows Facebook App developers to do (and what it restricts them from doing).
Two use cases:
I'm an e-com retailer selling clothes and coffee mugs (real-world goods) on my website; I want to write a Facebook App that allo... |
I work for a small company and have been designing a GUI to interface our embedded system. The problem with this embedded system is that it is not a finished product (may never be) and is constantly under development and being tweaked and updated for different customers and applications in small volumes.
So to deal ... |
I have a chunk of code that looks something like this:
function bool PassesBusinessRules()
{
bool meetsBusinessRules = false;
if (PassesBusinessRule1
&& PassesBusinessRule2
&& PassesBusinessRule3)
{
meetsBusinessRules= true;
}
return meetsBusinessRules;
}
I believe the... |
Problem
I have a big state machine. The design requirements of the project have changed such that I need to re-use this state machine in another place. All the states remain the same in this new place, but a few states run slightly different stuff. What design pattern allows me to reuse this state machine?
Motivation
I... |
I don't hang out on Programmers enough to know whether this question is "ok", so my apologies if not. I tried to make the title obvious so at least it can be closed quickly :-)
The question is simple. My employer wants "home screen presence" (or at least the possibility thereof) on iOS devices (also Android but I'm mos... |
I have to query a large data-set (~500 MB) using a sqlDataReader but I have to save the data in three different formats. Instead of querying the database 3 times I'm thinking about saving the data to an in-memory table and then save the data from there.
Is there a practical limit to a table size in memory? Any ideas f... |
I am planning on building a web app with many different public-facing HTTP servers; each of which will have Google Analytics (GA) installed on them.
I'd like to create a "dashboard" app that consolidates the GA data into one screen. I've been perusing the documentation for this so-called GA API, but I can't tell what t... |
I am relatively new to iOS development, so after watching a bunch of WWDC videos announcing new awesome features for the iPhone SDK, I still got a few questions regarding their support for older devices. Specifically:
Do the new compiler features (such as literals support, auto-synthesize, etc) require iOS 6 on the ta... |
I am aware of the PhoneGap toolkit for creating mobile applications for virtually all mobile platforms with a significant market share. However, the code in PhoneGap that is shared between the different platforms is written in JavaScript. While I like JS, I think it's hardly appropriate for computationally intensive ta... |
Sorry if this question has been asked before, but I couldn't find anything usable.
I'm working on a project for a client and currently I have to loop through the users table which is about 3000 records and still growing.
I have to do some calculations on a nightly basis which I am going to be using cron/php. The calcu... |
I'm making a simple multiplayer game of Tic Tac Toe in Python using Bridge (its an RPC service built over a message queue - RabbitMQ) and I'd like to structure it so that the client and the server are just one file. When a user runs the game, he is offered a choice to either create a game or join an existing game. So w... |
Suppose I'm a teacher and I want to explain to my students what are the benefits of using RAII in C++: I need a very good example, full of details, but that is easy to understand.
Which approach would you use?
|
I want to use JTAPI (1.4 - latest) to create an app that will call my phone whenever I need it to. I downloaded JSR043 (JTAPI specification) and have been reading the API docs and it seems pretty straight forward with respect to how to code JTAPI.
However I seriously doubt that getting a Java app on my laptop to call m... |
I was told that in order to support AES256 encryption inside my Java app that I would need the JCE with Unlimited Strength Jurisdiction Policy Files.
I downloaded this from Oracle and unzipped it and I'm only seeing 2 JARs:
local_policy.jar; and
US_export_polic.jar
I just want to confirm I'm not missing anything here... |
I was in a heated discussion the other day, about whether or not it's practical to have a perfect validation score on any HTML document. By practical I mean:
Does not take a ridiculous amount of time compared to it's almost-perfect counterpart.
Can be made to look good on older browsers and to be usable on very old br... |
I store sessions in a SessionManager. The session manager has a dependency to ISessionPersister.
SessionManager
private readonly ISessionPersister sessionPersister;
public SessionManager(ISessionPersister sessionPersister)
{
this.sessionPersister = sessionPersister;
}
ISessionPersister
public interface ISessionPe... |
This may seen like a weird question, but since we're challenged--as engineers--to constantly adapt to changing technologies, we always find ourselves buried in documentation. That said, we also need to consider that time is of the essence because people want their stuff fixed and improved with little hesitation if any... |
In the discussion here, the comments in the accepted answer suggest that I approach the given code from a functional perspective, which was new to me at the time. Wikipedia said, among other things, that FP "avoids state and mutable data", which includes according to the discussion global vars. Now, being that I am alr... |
Recently I have often read that, since the trend is to build processors with multiple cores, it will be increasingly important to have programming languages
that support concurrent and parallel programming in order to better exploit the parallelism offered by these processors (see e.g. this video for some background.).... |
I found that some of the code that Oracle uses is very useful so I don't have to re-invent the wheel.
Given this is at the top of the file where the code in question is:
/*
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* ... |
A "Heap Pollution" as in Non-Reifiable Types (The Java™ Tutorials > Learning the Java Language > Generics (Updated))
Why is it called that way?
|
I am taking a course in OOA/D this semester. I have some doubts about Object Oriented Programming.
Is it true that Object Oriented programming can be done without any specific modelling like OMT?
What are the models available for object Oriented software development?
|
The most unusual aspect of Python is that whitespace is significant
instead of block delimiters (braces → "{}" in the C family of languages), indentation is used to indicate where blocks begin and end.
how can python interpreter recognize code block ?
|
I have a specific programming need where I need to efficiently store large sorted sets in memory, query them for ranges, and intersect them against other sets that are also queried for ranged.
I am looking at Redis, but I can't see a range slice command. MongoDB can only use 1 index, so it has to perform row-level scan... |
I have a repo with Ruby and PHP code in it.
Github says my repo is 74.8% PHP and 25.2% Ruby
I do not understand how this can be. When I compare the 2 languages in my project:
# Count how many files:
# Ruby
ls | grep ".*\.rb" | wc -l
# returns 10
#PHP
ls | grep ".*\.php" | wc -l
# returns 1
# Count how many lines, w... |
I'm building and application that requires huge transactions/sec of data and I need to use IPC to for the mutithreaded mutliprocceses communication, I know that there are a lot of methods to be used but not sure which one to choose for this application.
This is what the application is gonna have,
4 processes, each pro... |
I'm in between jobs in my field (unrelated to software development), and I recently picked up a temporary side contract writing a few applications for a firm. I'm the only person working on these specific applications. Are there ways I should be checking myself to make sure my applications are sound? I test my code, tr... |
I am using a piece of hardware with a well defined C API. The hardware is stateful, with the relevant API calls needing to be in the correct order for the hardware to work properly. The API calls themselves will always return, passing back a flag that advises whether the call was successful, or if not, why not. The har... |
I've been doing MVC for a few months now using the CodeIgniter framework in PHP but I still don't know if I'm really doing things right.
What I currently do is:
Model - this is where I put database queries (select, insert, update, delete). Here's a sample from one of the models that I have:
function register_user($user... |
I have read this (Database design: 3 types of users, separate or one table?)
I decided to put admin and normal user in one table since the attributes are similar:
fullname,
address,
phone,
email,
gender
...
Then I want to draw ERD, suddenly my mind pop out a question. How to draw?
Customer make appointment and admin a... |
I feel like I have burned out, even though I am only out of college for 5 years.
For the first 3 years of my career, things were going awesome. I was never anything special in school, but I felt special at my company. Looking back, I could tell that I made all the right moves:
I actively tried to improve myself daily.... |
Quick background: we're a small web agency (3-6 developers at any one time) developing small to medium sized Symfony 1.4 sites. We've used git for a year now, but have previously used Subversion.
For the past 6 months we've put a lot of development time into a central Symfony plugin that powers our custom CMS. This pl... |
I'm curious about the birth of the compiler. How did programming begin? Did people first build hardware that recognized a certain set of commands, or did people define a language and then build hardware around it? And on a related note, what was the first programming language?
|
My colleague and I have dispute. We are writing a .NET application that processes massive amounts of data. It receives data elements, groups subsets of them into blocks according to some criterion and processes those blocks.
Let's say we have data items of type Foo arriving some source (from the network, for example) o... |
I am currently undertaking a software project on my own time. When I first got the project I put in many hours working out how to do the "tricky" parts of the solution. I spent many hours googling and reading up on classes available on MSDN that I could use for the project. I was madly excited and passionate about doin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.