instruction stringlengths 34 36.1k |
|---|
I am writing some code that has a very large number of reasonably simple objects and I would like them the be created at compile time. I would think that a compiler would be able to do this, but I have not been able to figure out how.
In C I could do the the following:
#include <stdio.h>
typedef struct data_s {
i... |
I never know where it's acceptable to post something like this, so please forgive if it's in the wrong place. I'm very interested in going further in to web development; I know a bit of javascript, a bit of php, and so forth, but I'm now seeing these services that will go from psd to wordpress for 200 bucks and I'm won... |
I prefer providing an example to explain the following paragraph:
However, since excess K representation using N bits has two parameters, K and N, you can pick K to be whatever you want. You can have more positive numbers than negative, not include zero, and so forth.
|
In a bootloader, the second last line is :
TIMES 510-($-$$) db 0
Now, will this command also do the same :
db 510-($-$$) DUP (0)
If not why?
I know what TIMES does, but its not mentioned in my x86 book by Mazidi (Pearson Publication). Any idea why?
And what is the meaning of the $ sign exactly? Different sites have... |
The X Window System is 25 years old, it had it's birthday yesterday (on the 15'th).
As you probably are aware of, one of it's most important features is the separation of the server side and the client side in a way that neither Microsoft's, Apples or Wayland's windowing systems have.
Back in the days (sorry for the ... |
I read this code somewhere
class Foo {
public int a;
public Foo() {
a = 3;
}
public void addFive() {
a += 5;
}
public int getA() {
System.out.println("we are here in base class!");
return a;
}
}
public class Polymorphism extends Foo{
public int a;
publ... |
Based on a multitude of questions related to temporarily disabling ReSharper, and also on certain research data, I can see that a considerable share of ReSharper users have it disabled most of the time. They tend to enable it for a limited period of time (say, several hours), do whatever they need to do using its funct... |
How do vector registers work in terms of calculations and alloting data to them ?
Is there a detailed reference available somewhere explaining how vector registers work and how data is fetched from them ?
|
If you were building a new Saas project, would it make sense to start with all of the backend services returning xml/json?
Because these days you need to build for both the web and mobile devices, and having a backend that is build from the start to return xml and json, you are ready to go mobile (all services have the... |
There are some applications like Readability and Pocket, which are letting users to read the main content of web pages, in a clean interface or such. But the articles should be bookmarked from another application, or the web browser.
However, I'm creating a news reader app (Zite and Flipboard are popular news reader ap... |
I am currently working for a 2 person company, as the solo primary developer. My boss gets the clients, mocks up some png design templates and hands them over to me.
This system has been working fine and i'm really enjoying it.
The types of projects I work on are for small - medium sized businesses and they usually wan... |
I am creating a basic game of space invaders. I am using a thread to animate the game and was wondering, how do I get the aliens the speed up going left and right without changing the speed of the ship you control below them?
What is the easiest method? I am quite new to Java 2d and have only created two other more bas... |
The term "segregation" is used in the CQRS pattern.
What's the difference between segregation versus separation in this case?
|
Recently at work we ran into a problem where we tagged/branched a project and had some compiling issues because of dll/project references that was pointing to the old folder structure.
We created an 'external bin' folder for each of the projects and copied the referenced dll's to these folders. Is this the best way or ... |
I am practicing OOP with PHP, and I am struck at setter and getter methods.
I can directly access the class properties and methods with getter method then what's the use of setter method?
See my example.
<?php
class MyClass{
public $classVar = "Its a class variable";
public function Getter(){
return $th... |
In my personal project I have tried to stick to MVC, but I've also been made aware that sticking to MVC too tightly can be a bad thing as it makes writing awkward and forces the flow of the program in odd ways (i.e. some simple functions can be performed by something that normally wouldn't, and avoid MVC related overhe... |
I am trying to create an interface with an external server, and don't know where to start. I would need to take audio as input to my computer, and send it to the remote server as a chunked HTTP request. The API that I'm trying to connect to is described here p1-5
http://dragonmobile.nuancemobiledeveloper.com/public/... |
I asked something kind of similar on stackoverflow with a particular piece of code however I want to try to ask this in a broader sense.
So I have this web application that I have started to write in backbone using a Single Page Architecture (SPA) however I am starting to second guess myself because of security. Now w... |
For a project, I have to classify a list of banking transactions based on their description.
Supose I have 2 categories: health and entertainment. Initially, the transactions will have basic information: date and time, ammount and a description given by the user. For example:
Transaction 1: 09/17/2012 12:23:02 pm - 45.... |
I was looking to upgrade my project from EF4.1/Framework 4.0 to EF5/Framework 4.5. After reading up on migrating the t4 templates for STE's (Self-Tracking Entities), I came across this link that indicates that STE's are no longer recommended.
Why is Microsoft no longer recommending the use of STE's?
|
I've read many times on the web that if your language doesn't support some concept, for example, object orientation, or maybe function calls, and it's considered a good practice in this other context, you should do it.
The only problem I can see now is that other programmers may find your code too different than the us... |
I have code to switch between databases when using EF, but now also need to allow the user to choose a particular table. (The tables all use the same schema but may have different names because of the way the client updates datasets). Is there a way to do this? And if it's done can it be done without being broken by up... |
I'm making a custom RoleProvider that I would like to use across multiple applications in the same application pool. For the administration of roles (create new role, add users to role, etc..) I would like to create a master application that I could login to and set the roles for each additional application. So for exa... |
Consider train timetable data, where each service (or "run") has a data structure as such:
public class TimeTable
{
public int Id {get;set;}
public List<Run> Runs {get;set;}
}
public class Run
{
public List<Stop> Stops {get;set;}
public int RunId {get;set;}
}
public class Stop
{
public int Stati... |
I have an mbed microcontroller which has a small ARM Cortex M3 on it. Basically, my effective resources for the project are ~25 KB of RAM and ~400 KB of Flash. For I/O I'll have a PS/2 keyboard, a VGA framebuffer (with character output), and an SD card for saving/loading programs (up to a couple of MB maybe).
I ask bec... |
I've interacted with a few RESTful APIs that provided excellent documentation for humans and descriptive URIs, but none of them seem to return machine-readable descriptions of themselves.
It's not too tough to write methods of my own that assemble the right paths, and many language-specific API libraries are already ju... |
I have developed a single page app prototype that is using Backbone on the front end and going to consume from a thin RESTful API on the server for it's data.
Coming from heavy server side application development (php and python), I have really enjoyed the new different design approach with a thick client side MVC but... |
This may be subjective and likely to be closed but I still wanted to know if its really helpfull to read Structure and Interpretation of Computer programs.
Structure and Interpretation of Computer Programs
The book does not use Java. Not that I wanted to learn Java. I am just curious as to know if it be will useful re... |
Which types of learning resources do you find the most helpful, for which kinds of learning and/or perhaps at specific times?
Some examples of types of learning you could consider:
When starting to integrate a new SDK inside an existing codebase
When learning a new framework without having to integrate legacy code
Whe... |
I am a junior developer working on my own in the programming aspect of projects.
I am given a png file with 5-6 of the pages designed, most times in specific detail. From this I'm asked to develop the back end system needed to maintain the website, usually a cataloging system with products, tags and categories and mat... |
I'm reading up on event sourcing and have a question regarding persistence.
I can still have a DB with all entities, right? Or should the events be replayed every time the application is started to get the latest version of each entity in the memory? Seems like a waste on larger systems (as in large amount of data)?
T... |
I made a documented which is to describe the difference between the same logical structure from different version ( e.g Structure A from version 8 and Structure A from version 9 ).
Luckily I've got the logical structure diagram from the 2 functional specification. I've managed to copy the image of each logical structur... |
I need to have a data structure with say 4 keys . I can sort on any of these keys. What data structure can I opt for? Sorting time should be very little.
I thought of a tree, but it will be only help searching on one key. For other keys I'll have to remake the tree on that particular key and then find it. Is there any ... |
Assume I have abstract base model class called MoneySource. And two realizations BankCard and CellularAccount. In MoneysSourceListViewController I want to display a list of them, but with ListItemView different for each MoneySource subclass.
What if I define a category on MoneySource
@interface MoneySource (ListItemVi... |
I have a domain model, persisted in a database, which represents a graph. A graph consists of nodes (e.g. NodeTypeA, NodeTypeB) which are connected via branches. The two generic elements (nodes and branches will have properties). A graph will be sent to a computation engine. To perform computations the engine has to be... |
In Java/JVM, why do we call the memory place where Java creates objects as "Heap"?
Does it use the Heap Data Structure to create/remove/maintain the objects?
As I read in the documentation of Heap data structure, the algorithm compares the objects with existing nodes and places them in such a way that Parent object is ... |
I've seen a few other developers talk about binding scope in JavaScript but it has always seemed to me like this is an inaccurate phrase. The Function.prototype.call and Function.prototype.apply don't pass scope around between two methods; they change the caller of the function - two very different things. For example:... |
I'm trying SharpDevelop to develop c# applications. Regardless of the language and the IDE, is it free to deploy applications that use WinForms?
I've been developing with MonoDevelop just because it has a designer for Gtk# (client doesn't want to pay more for licences as to use VS...), but it's too buggy and it's makin... |
My team is working on a product, which for business reasons needs to be released on a regular schedule. An issue has arisen where we want to do development in parallel for the upcoming release, as well as the 'next' release. This is to become standard practice, so it's not as straightforward as cutting a feature branch... |
I work on a CakePHP app and the views consist of raw html with embedded php echo statements, which over time has gotten rather messy. Before I go in and rewrite the code, I'm wondering if it makes sense to rewrite the views with a template engine, such as Twig or Smarty, but I don't have experience with template engine... |
I'm in the process of defining an approach that may best fit our needs for a big web application development.
For now, I'm thinking going with an ASP.NET Architecture with a DAL using Entity Framework, a Repository concept to not access DAL directly from BLL and a BLL that call the repository and make every manipulati... |
I'm currently shipping a desktop Java application. It is a plain old Java 5 Java / Swing app and so far everything worked nicely. Java 5 was targetted because some users were on OS X version / computers that shall never have Java 6 (we may lift this limitation soon and switch to a newer Java and simply abandoning my us... |
As Apple won lawsuits against Motorola and Samsung with the so called overscroll patent, I am asking myself what the legal consequences of releasing an application with such a feature are?
I think if one releases the app in IOS it would be okay, but what happens in Android or Windows? Am I getting sued?
What happens if... |
I have been offered an "opportunity" to take over maintenance of a small internal website run by my group that provides information about schedules and photos of events the groups done.
My manager sent me the link to the site and I checked it out. The site looked clean and neat but loaded in ~5 seconds. I thought this ... |
First a bit of background: We are re-architecting our product suite that was written 10 years ago and served its purpose. One thing that we cannot change is the database schema as we have 500+ client base using this system. Our db schema has over 150+ tables. We have decided on using Entity Framework 4.1 as DAL and sti... |
So I have been developing in ASP.NET WebForms for some time now but often get annoyed with all the overhead (like ViewState and all the JavaScript it generates), and the way WebForms takes over a lot of the HTML generation.
Sometimes I just want full control over the markup and produce efficient HTML of my own so I hav... |
I am having difficulty in understanding IPC in multiprocess system. I have this system where there are three child processes that send two types of signals to their process group. There are four types of signal handling processes responsible for a particular type of signal.
There is this monitoring process which waits... |
I have programming interviews coming up in a couple weeks. I took an algorithms class a while ago but likely forgot some key concepts.
I'm looking for something like a very short book (< 100 pages) on algorithms to get back up to speed. Sorting algorithms, data structures, and any other essentials should be include... |
I'm building a webservice which returns JSON / XML / SOAP at the moment.. and I'm not entirely sure which approach for returning results is best.
The Client Consuming the Services will generally be Web Applications / Mobile Web Applications. But could be from various WordPress and other social media Plugin type system... |
We have recently had a new line manager start to manage our Scrum team. He is immensely experienced in our field but is relatively inexperienced at Agile/Scrum. He has extensive technical expertise in embedded software (the team's domain) that would go to waste if not utilised properly.
However, the team is wary of mak... |
I've found the SOLID principles quite useful when thinking about object-oriented design.
Is there a similar / equivalent set of language-agnostic principles tailored for functional programming?
|
I am developing my first project using test driven development. I am using Zend Framework and PHPUnit.
Currently my project is at 100% code coverage but I am not sure I understand in what order I am supposed to write my code.
Am I supposed to write my test FIRST with what my objects are expected to do, or write my obje... |
I am running into problems in NetLogo with large *.csv / *.txt files.
The documents can consist of about 1 million data sets and I need to read them (to eventually create a diagram based on the data).
With the most straightforward source code, my program needs about 2 minutes to process these files.
How should I approa... |
On a web page I have 1 script tag that contains all my minified JavaScript (I use SquishIt for .NET).
However I see that a few people prefer to load their scripts in parallel using something like requirejs or headjs.
I was wondering which is better for performance and whether combining and minifying all my JavaScript i... |
My company is developing driver for our hardware. Now I need to sign my driver for 32 and 64 bit platforms.
Please tell, now I need to buy Authenticode certificate, right?
What CA to use?
DigiCert?
GlobalSign? ( http://www.sslshopper.com/microsoft-authenticode-certificates.html )
Symantec? ( http://www.symantec.com/ver... |
My question is what is the subject area that covers web page execution/loading.
I am looking to purchase a book by subject area that covers when things execute or load in a web page, whether it's straight html, html and Javascript, or a PHP page.
Is that topic covered by a detailed html book, or should I expect to fin... |
I would like to know what documents (ISO?) should I follow when I write a functional specification. Or what should designers follow when creating the system design? I was told that there was a progress in last years but was not told what the progress was in (college professor). Thank you
EDIT: I do not speak about docu... |
I know that learning a language, you can simply buy a book, follow the examples, and whenever possible try the exercises. But what I'm really looking is how to master the language once you've learned it.
Now I know that experience is one major factor, but what about learning the internals of the language, what is the u... |
My tools involved here are GTK and Haskell. My questions are probably pretty trivial for anyone who has done significant GUI work, but I've been off in the equivalent of CGI applications for my whole career.
I'm building an application that displays tabular data, displays the same data in a graph form, and has an edit... |
I came across a really old (2+ years) feature request issue in a bug tracker for an open source project that was marked as "resolved (won't fix)" due to the lack of tools required to make the requested enhancement. In the time elapsed since that determination was made, new tools have been developed that would allow it ... |
Since I started learning C a few years ago, I have never been a part of a team that worked on a project. I am very interested to know what are the best practices for writing large projects in C.
One of the things I want to know, is when (not how) do I split my project into different source files? My previous experienc... |
So, I have this little debate at work where some of my colleagues (which are actually in charge of administrating our Perforce instance) say that workflows are strictly a process thing, and that the tools that we use (in this case, the version control system) have no take on it. In otherwords, the point that they make ... |
I work on a well-established, embedded C++ code base. We have been using a proprietary API to our filesystem. For better integration with third-party C libraries, we are currently in the process of implementing most of stdio.h and fcntl.h. I made what I thought was a non-controversial proposal that we should also im... |
My current job is mostly writing GUI test code for various applications that we work on. However, I find that I tend to copy and paste a lot of code within tests. The reason for this is that the areas I'm testing tend to be similar enough to need repetition but not quite similar enough to encapsulate code into methods ... |
I've found a software library, licensed under the new BSD license.
I want to use in my closed source commercial project. Can I do it?
|
I have a single threaded application that runs on a machine with a quad core processor. The scheduled tasks that run VB.NET forms are too slow.
I am new to multi threading and parallel computing. If you have a single threaded application that runs on a server with a multi core processor then does the application on... |
I have created a simple MVC Java application that adds records through data forms to a database.
My app collects data, it also validates it and stores it. This is because the data is being sourced online from different users. the data is mostly numeric in nature.
Now on the numeric data being stored into database (S... |
A government agency publishes a text file with thousands of records. The entire file is about 60MB. Every day the file has about 60 new or changed records.
We need to validate some info against that file, and for auditing purposes, we may need to recover the file as it was in certain date.
I thought I could use a VCS t... |
I originally asked this on SO, where it was closed and recommended that I ask it here instead. I'm trying to figure out how to group all the functions necessary for my project into classes. The goal of the project is to execute the following process:
Get the user's FTP credentials (username & password).
Check to make... |
First things first: I have absolutely no interest in learning how to crack systems for personal enrichment, hurting other people or doing anything remotely malicious.
I understand the basis of many exploits (XSS, SQL injection, use after free etc.), though I've never performed any myself. I even have some idea about ho... |
I am wondering if one of the key features of a programming language is to have the ability to overload functions via arguments. I think it is essential in-context of the Object oriented programming.
Is it intentionally left behind and not allowed? Or is overloading not a good practice?
|
My company is building an iOS version of an Android app that our client is developing (but has not yet released). We have access to the latest builds and source, however since the software is frequently re-structured and refactored, we're doing a lot of unnecessary re-work. In addition, the due date on the contract wil... |
In college I took a class in Expert Systems. The language the book taught (CLIPS) was esoteric - Expert Systems: Principles and Programming, Fourth Edition. I remember having a tough time with it. So, after almost failing the class, I needed to create the most awesome Expert System for my final presentation. I chos... |
The Belkin N300 F9K1002 firmware is located here. It does not appear to be encrypted. How can I upload my own custom Linux firmware to this device. How would I go about hacking it?
|
I'm mainly a .NET developer so I normaly use Windows/VisualStudio (that means: I'm spoiled) but I'm enjoying Haskell and other (mostly functional) languagues in my spare time.
Now for Haskell the windows-support is ok (you can get the Haskell-Platform) but latley I tried to get a basic Clojure/Scheme environment set up... |
I am working with a MFC application for the first time and I have lots of doubts the biggest at the moment is What is .ini file and why is it there? What exactly is the role it plays? Can some tell me the required?
Edit : What if I make an application and do not have .ini file, what do I loose on?
|
I am currently working on a small project in which I work with some "static data", which is extracted from one source. The data might change from time to time (up to once a week).
I don't need all of the information the data includes in my project so to allow easier and a more logical access to it I wrote some small t... |
As the subject goes; once a software architect puts down the high level design and approach to a software that is to be developed from scratch, how does the team ensure that it is implemented successfully? To my mind the following things will need to be done
Proper understanding of requirements
Setting down coding pr... |
In a few weeks, my project is going to be finished and I want to start getting my code ready for other people to use it.
I am going to be posting everything to GitHub so people can tweak it and hopefully make it better.
I guess what I'm asking is, what would be the best way to make sure my code is sufficiently document... |
I am looking for a strategy to version an application with the following requirements.
My requirements are given an exe with version number (major.minor.build-number)
1) I want to map the version to a svn source revision that made the exe
2) With the source and exe I should be able to attach and debug in vs2010 with no... |
Recently, iOS 6 was "jailbroken" but only on the Apple A4 CPU.
Why is the "jailbreaking" process specific to a CPU?
From Wikipedia:
... "iOS jailbreaking is the process of removing the limitations imposed by
Apple on devices running the iOS operating system through the use of
hardware/software exploits – such dev... |
I accidentally discovered this a=b=c=d=e=f=2 in python(2.7)(and JavaScript a few minutes later) interpreter .
Is this a feature or just the way the interpreter works, if is a feature how it is called ?
Do other languages have this feature ?
|
Advanced compilers like gcc compile code into machine readable files according to the language in which the code has been written (e.g. C, C++, etc). In fact, they interpret the meaning of the code according to library and functions of the corresponding languages. Correct me if I'm wrong.
I wish to better understand co... |
We are developing a web application with a fairly standard registration process which requires a client/user to verify their email address before they are allowed to use the site. The site also allows users to change their email address after verification (with a re-type email field, as well).
What are the pros and co... |
I have a hard time learning algorithms (Particularly graphing algorithms).
Do you know of any good free resources that make some of the more harrowing algorithm concepts such NP-Complete, Traveling salesman, and other algorithms, A* heuristics, particularly graphing algorithms, simpler to learn?
|
I wrote a migration file with the following code:
class AddScheduleIdToPlayers < ActiveRecord::Migration
def change
add_column :players, :schedule_id, :integer
add_column :schedules, :coach_id, :integer
end
end
Is it bad form to not create two migration files, one for each change, or is this fine?
|
I am writing a function to label the connected component in an image
(I know there are several libraries outside, I just wanted to play with the algorithm).
To do this I label the connected regions with different labels and create an equivalence table that contain information on the labels belonging to the same connect... |
I saw, here on Programmers, the answer to this question: How does thinking on design patterns and OOP practices change in dynamic and weakly-typed languages? There I found a link to an article with an outspoken title: Are Design Patterns Missing Language Features. But where I found snippets that to me seemed very catch... |
I am an indie developer working on multiple Android projects. I am having problem with maintaining same functionality on different projects. For example, three of my apps use the same 2 classes; since they are different projects, when I need to make a change in those classes, I need to make it three times. Is there a s... |
Often times I am faced with the situation where a new client comes to me with an application that has literally 100s of unnecessary features and it is quite clear that things need to be drastically simplified for the project to have any chance of succeeding. How do you convince the client to take a more Minimum Viable ... |
I am working on a website that requires a bit of marketing; let me explain.
This website is offering a single, say, iTunes 50$ voucher to a lucky winner.
To be entered in the draw, you need to invite (and has to join) at least one friend to the website. Pretty straightforward.
Now, of course it would be easy for anyone... |
Just wondering if there is a tournament scheduling algorithm already out there that I could use or even adapt slightly.
Here are my requirements:
A variable number of opponents belonging to a variable number of teams/clubs each must be paired with an opponent
Two opponents cannot be from the same club
If there are an ... |
I am reading this book, Programming Interviews Exposed by John Mongan et. al and in chapter 6 they are discussing removing all instances of characters in a src string using a removal string, e.g. removeChars(string str, string remove).
They suggest to having a boolean lookup array with all values initially set to false... |
I am confused. I thought I would try and use a new game engine in order to expand my abilities, and found a nice engine called springrts. I was looking through the licensing info and it is licensed under the GPL 2 licence. If I remember correctly, does that mean that anything I make with it, I have to distribute the so... |
I lose a ton of productivity by getting distracted while waiting for my tests to run.
Usually, I'll start to look at something while they're loading --- and 15-20 minutes later I realize my tests are long done, and I've spent 10 minutes reading online.
Make a small change... rerun tests ... another 10-15 minutes waste... |
I just need to know is it safe to use jQuery and MooTools Together in one web framework?
I am not trying create application using both of them, but I am in a situation where I need to modify mootool based application framework, so I am used to jquery, I don't want to waste my time learning mootools and I think jquery i... |
This question follows directly from the part of an answer of this question - Why would one bother marking up properly and semantically? .
I would like to understand why SEO techniques gives more weight to semantically correct mark up?
|
So finally after reading a lot, I have understood that the difference between BDD and TDD is between T & B. But coming from basic TDD background, what I used to was,
first write unittest for database models
write test for views (at this point start with integration test as well, along with unittests)
write more integ... |
I've to read a big XML file with a lot of information. Afterwards I extract the needed information (~20 Points(columns) / ~80 relevant Data (rows, some of them with subdatasets) and write them out in a Excel File.
My Question is how to handle the extraction (of unused Data) part,
should I copy the whole file and dele... |
I have been using Linux (especially, Ubuntu) and Windows 7 for a long time. I want to publish iOS apps, but I don't have a Mac or an iPhone. I don't have anyone near me who will lend me a Mac, and I don't actually want to buy them either.
So my question is: how do I publish my iOS app from Windows or Linux? I am not... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.