instruction stringlengths 34 19.9k |
|---|
I'm having a set of data's, say
Question,
Question's Main Category,Main Category followers,
Question's Related Categories,Each Related Categories followers,
Whether it got answer in 24hrs [Yes/No]
Now, I need to analyse a database with thousands of sets of data's like given above and predict whether the new given qu... |
I wonder if there are benign use-cases for simulating mouse clicks using event.initMouseEvent. I found that it is used for creating pop-under ads in the following way:
var e = document.createEvent('MouseEvents');
e.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, true, false, false, true, 0, n... |
I have just moved to a new company and they are using TFS 2010 (2012 in a couple of months) as their version control system and recently started to use it as a work tracking system for the developers.
However, there doesn't seem to be a bug tracking system for use by people outside development & test. Production suppo... |
I work in a company where there are Excel spreadsheets everywhere. As my colleagues are non-programmers, I'm sure they haven't contemplated that there might be a better/easier/more productive way of managing their data. Naturally, I advocate an application of sorts that can leverage the features you find in relational ... |
I know there is a difference between INNER JOIN and FULL OUTER JOIN, I can see it, but, what is the difference between the two following: JOIN ... ON... and INNER JOIN...ON... and still yet JOIN...ON... vs FULL OUTER JOIN...ON...
Reason being is I think maybe just using JOIN is messing up a query I am working on that i... |
This is my first project related to SMS verification.
How to implement SMS verification in online ordering web application? For example:- when we try to reset the password in amazon's website, it sends an sms verification code and after entering the code it proceeds with changing the password. I want to implement the s... |
I can't decide what to name my class. So far I've labelled it up as a Factory, but I am not sure.
Here is the class. As you can see, it exists to return a concrete type of an Interface (ResolveRegistrationIssue) based on the argument supplied to the getter method (ResolutionFamilyEnum):
@SuppressWarnings("serial")
@Man... |
I want to write a function that return random unique pair numbers every time call it from a range until resetting it.
Something like this:
function randomUniquePairs($ranges, $reset = false){
if ($reset === false){
// some code for reseting
}
/*
some code for creating random unique pair numbers
*... |
I'm in process of making an open source application for Windows. In the end I would require an icons for my app and its gui. I'm huge fan of Tango styled icons, but its pack doesn't provide all icons I need. Gnome project seems to provide ones for more mature projects that run on linux.
What is the general way, procedu... |
A team has decided that every morning someone should bring croissants for everybody. It shouldn't be the same person every time, so there should be a system to determine whose turn it is next. The purpose of this question is to determine an algorithm for deciding whose turn it will be to bring croissants tomorrow.
Cons... |
I'm confused by this post by Mark Seeman.
And his comment on IInitializable below:
The problem with an Initialize method is the same as with Property
Injection (A.K.A. Setter Injection): it creates a temporal coupling
between the Initialize method and all other members of the class.
Unless you truly can invoke a... |
The titled basically states it. If I have a bigint column with primary key and autonumber, and a record is deleted, will SQL Server ever reuse that now available value?
The underlying issue is that I have a multi-user environment, and if I retrieve a record from the database into memory, then another user makes changes... |
Recently I've started to work with object oriented analysis and design and it seemed very interesting to me as a way to get work done better. But I'm still in doubt with one kind of situation. If this is not the correct site to ask about it, sorry for that.
Well, if I have to design a system that allows one user to reg... |
I have recently inherited a large, legacy system with a complex codebase that has a lack of documentation. I'm the sole internal developer embedded with the core users, taking some responsibility from an external contractor. While modules and functions are documented well enough, there is no documentation around the sy... |
Imagine I have a rich data model that is represented by a hierarchy of objects.
I also have a view hierarchy with views that can extract required data from model objects and display the data (and allow the user to manipulate the data).
Actually, there could be multiple view hierarchies that can represent and manipulat... |
In a language like Python or JavaScript (NodeJS), is there anything wrong with defining "the configuration file" as a file which essentially hard-codes the configuration settings? For example:
options.py:
OUTPUT_DIRECTORY = 'out'
LOGLEVEL = 'debug'
options.js:
outputDirectory = 'out';
logLevel = 'debug';
Does this co... |
I can write PHP application in linux platform.
However, I getting a request to explore the idea to run PHP application into .NET.
I have zero .NET knowledge.
So wondering, is it possible?
Is it advisable? Implication ? Or maybe I should just install a .NET to playaround first?
In short, zero code changes, except setu... |
I'm designing an append-only ("journaled") file format, and I'd like it to be friendly towards being stored in VCS (git/Mercurial/...).
On one hand, I'd like if after each change, only delta (difference) from previous file state was added into the repository (i.e. some trailing bytes), not the whole contents of the fi... |
I was going through the answers to this question:
What information must never appear in logs?
And noticed that nobody mentioned this particular attribute. It's something I find useful- whenever any logging is added to the system as a result of tracing a particular issue raised in the bug tracker, or adding a feature, I... |
I have come to python from C++ (I also know a little Java). I am writing code to exercise a server so I basically use http methods to send a load of requests to the server. As part of my code I created a class and called it testdata. This contains basically test input data (to send in requests) and output data to ch... |
Internationalized applications usually display links in header for translating in different languages, e.g.: Spanish | English | Italian.
These links usually translate current page in the selected language, and usually the url includes the language: http://www.mysite.com/myapp/es/somePage.
Questions:
Does this only a... |
We have Development department and the department of System Engineers that works on a big project (development of J2EE application).
We are using Build management system, Bug tracking system and a Wiki engine in our work.
Sometimes we have a situation when some developer initiate a server restart or an application buil... |
If I have a method taking input and giving output, it's a no-brainer that tests should be written. But what about things like validation rules?
For example, I add a validation rule that a certain property must be at least 5 characters long. Should I then write a UI test to check for an error message when the form field... |
We are moving our software project from the practically auto-creating Visual Studio Installer in Visual Studio 2010 to a WiX installer. I'd like to use this change to make sure things are right.
The application is a subsidiary to our company's main app that will already be installed in its own folder. The main app ha... |
I recently looked a Flow-Graph question.
Consider 8 boxes with following values
Box 1 = 2
Box 2 = 7
Box 3 = 2
Box 4 = 1
Box 5 = 5
Box 6 = 7
Box 7 = 1
Box 8 = 4
Now follow the instructions:
Put the number from Box 7 into Box 1
Add the numbers from Box 1 and Box 2 , and put the result in Box 1
Change Instruction 2, Inc... |
I am seeing a lot of programmers turning away from management and administration roles. They want to build stuff. And as a result, a lot of these positions are filled by non-technical people. I fail to see how they add value. Is scheduling meetings, booking offsites and other administrative work enough to justify their... |
I have been doing a lot of code review lately, and I am unsure of the positive and negative effects and professionalism of putting positive and/or funny comments in code reviews.
We use Github as our code review platform on my team, so the comments are viewable by anyone. I generally try to use this platform so the en... |
I have a client-side Javascript framework that is publicly available and BSD licensed. Each file says it is copyright me, the date, all rights reserved, and the BSD license text.
I am making a project which uses - and adapts and makes code changes to - my BSD licensed framework. Although obviously browsers will downl... |
I have a set of classes from a 3rd party library. These classes use an inheritance structure to share logic. I would like to add a layer of abstraction in the middle of their inheritance tree to add functionality to all of the children (concrete) implementations.
Here is a simplified example of the classes in the 3rd p... |
The title pretty much says it all. I'm just having a little computer science exercise and am building a Tree. I want a node to be able to add a sibling which requires one to first get a reference to the parent, obviously. I was wondering what is the "correct" way, by definition of what a Tree is, to do such a thing?
|
I have a monitoring web application which has a .Net Backend and a Silverlight frontend. The application crunchs big chunks of data, process them and presentates to user. Then user can interact with the data to see different graphs of log. He/She can unselect dimensions, group some values, choose metrics like transacti... |
I wondered what functional languages are mainly used for? I've been reading about them and read about Haskell and others. Some seem to be just "academic" languages which makes little sense to me, so hoping to get a better idea of their uses in real world applications.
|
gtkmm provides lifetime management of widgets using
Gtk::Widget* aWidget = Gtk::manage(new Widget());
Gtk::Widget.add(*aWidget);
This delegates lifetime management of aWidget to its container widget.
We also have several types of smart pointers, particular the C++ 11 smart pointers templates, which I use everywher... |
Up until now it seems that when you register on a random web site you do so with blind trust.
You assume that the site isn't harvesting information and passwords. You assume the site is reasonably secure. And you also assume that the information you've submitted isn't used in an undesireable way.
More recently, it's b... |
Forgive the title -- it needs work. I am struggling to find better English to express my issue. Edits encouraged.
Example to describe my issue:
Checker Method
I have an argument checking method called public static void StringArgs.checkIndexAndCount(String, int, int). Given a string, an index, and a count, confirm t... |
I am not experienced in javascript. I try to use some popular javascript libraries such as jQuery, Angular.js and Meteor.js.
I wonder if understanding the logic of functional programming (in javascript of course) will help in understanding and using these libraries better?
|
I've been writing JavaScript for a bit and have now seen code using the idiom
var that = this;
and
var self = this;
Used to gain access to this through closure scope. At this point var self = this seems somewhat more common.
My question is which of these two idioms is truly the convention?
Since they do exactly the... |
I have recently taken a project with another developer, and he has a certain way of initializing his references.
class Player
{
private:
Console &console;
Armor &armor1, &armor2;
Debugger &debugger;
sf::RenderWindow &window;
sf::Event &event;
public:
Player(Console... |
On a high level, this is my understanding of the difference between a client and server:
a server listens on a host and a port, receives requests (e.g. through a socket connection), and then sends a response to the client who initiated the socket connection.
The client is what sends a request to that server socket, an... |
Is there some recommended practice regarding methods as verbs in OOP? Should the object work syntactically as subject or as object/complement?
Should object.doSomething() be normally understood as "the object iself does something" (subject) or "the caller does something with the object"?
I suspect that the first alte... |
I got mainly abstract classes in my project and there are a few other class which are using/inheriting them. When I'm writing the documentation I would like to specify that a part of it is just about the behavior of these non-abstract classes, but I found using this word silly.
I could just say it's a class, however an... |
For example, Say I make a business software product. I sell it for $100. The competitors charge thousands for their version. Does that kind of model work? Do company's ever buy software turnkey like that? No support. No nothing. They just spend $100. Sure there are continuing efforts to improve the product but ... |
All functional programming languages that I know of (e.g. Haskell, Scala, Scheme, Clojure, SML, OCaml, ...) support a notion of closures.
Also, I often read that a language X can be considered functional because it supports closures.
On the other hand there are programming languages that do have closures but are not co... |
Is there a reason, historical or otherwise, why the modulus operator is part of a small set of standard operators in what seems like many languages? (+, -, *, / and %, for Java and C, with ** in Ruby and Python).
It seems strange to include mod as a "fundamental" (not to knock it, I use it plenty, but I also use expone... |
Well, the title is not very appropriate, please read on (I couldn't get a better one).
Note: Using Python 2.7, but an algorithm will help too.
I'm making a side scroller game, in which I am generating the obstacles on the fly. The trouble I am having is figuring out how to generate the obstacles. o_O
I have a some kind... |
These days password hashing algorithms are designed to be slow. While it prevents black hats from guessing the password (at least partially), it also gives additional work for the server.
I can imagine that, if someone wanted to make server run extremely slowly, they could simply send many log-in requests which would l... |
I'm looking into building my first mobile app. One of the core features of the application is that multiple devices/users will have access to the same data -- and all of them will have CRUD rights.
I believe the architecture should involve a central server where all the data is stored. The devices will use an API to in... |
I have certain preconditions on input data and I need to design an algorithm for that data. Should I also handle invalid preconditions? Also is it normal that my algorithm will work only for a certain number of inputs, for example 4, and for any smaller number of inputs I'll have "if input.size" clause?
To clarify my ... |
When should I use one versus the other? For instance, let's say I have 20 comma delimited, denormalized text files and I want to transform the data and load it into normalized SQL Server tables.
|
I have an open source script for a specific site (I'm trying not to call anything by name here) that I and a few other developers recently moved to GitHub. We've gotten several new developers since we moved to the new system, including one very active one in particular. However, this active one has started changing a l... |
We have a Javascript codebase that we want to open-source in an incremental fashion. That is, we want to release the full code to some of our core modules first, keeping the rest of the "application" code in minified format. Eventually, we will also release the whole application code in full (although that may take a f... |
I'm designing a system which needs to report basic distance between zip codes. It will use the Google Distance Matrix API but I want to cache the results in the database so that multiple requests for the same data points don't result in duplicate API calls.
A basic Distance class might look like this:
A basic data str... |
Most "Canvas" widgets in common GUI toolkits offer low level operations like drawing basic shapes of different colors/line-width/etc, or displaying sprites and images. Some seem to have slightly more advanced features like the ability to treat primitives drawn on the canvas as "actors" so they can be moved and manipul... |
As far as I remember myself programming I was taught not to compare floating point numbers for equality. Now, while reading Programming in Lua about Lua number type, I found following:
The number type represents real (double-precision floating-point)
numbers. Lua has no integer type, as it does not need it. There is... |
I would like to know what the overall impact of resource planning on a software project is, where the requirements and design of the project are driven by automated acceptance tests and unit tests, in contrast to a more "traditional" approach to software development.
What, in your experience, is the overall effect on ... |
In each application there are concepts like users, customers, etc. and some part of the application tries to manage them. For example:
1. keeping the information of people, organizations, firms, etc.
2. managing users (people who work with the system)
3. managing customers (people who purchase goods/services)
4. distin... |
I'm working on an ordering system where we receive tab delimited files that look like this (I removed most of the columns for clarity):
OrderId OrderLineId BuyerName BuyerAdress RecipientName RecipientAdress
1 1 John 123, Street Doe 25, street
... |
I need to add a new payment type to an existing code base. That means that I'm going to have a few methods looking like this:
if (old payment type)
process old type of payment
else
process new type of payment
Now, if this could have been determined beforehand, I would have this method point to an interface imp... |
I have created a a number of non-trivial scripts in Python that do some long running reporting. At first these reports started off as scripts with a config file. Then I added in the a database component to persist data. Now I'm building a GUI to sit on top of all of them.
My question relates to design. Each time I add ... |
Everyone says that I should make my code modular, but isn't it less efficient if I use more method calls rather than fewer, but larger, methods? What is the difference in Java, C, or C++ for that matter?
I get that it is easier to edit, read and understand, especially in a group. So is the computation time loss insigni... |
I am confused about the use of register keyword in C. It is generally told that its use isn't needed like in this question on stackoverflow.
Is this keyword totally redundant in C due to modern compilers or are there situations in which it can still be useful? If yes, what are some situations in which use of register ... |
I will be moving workplace in the near future and I believe they will be very interested in my experience of Scrum and how it may relate to their business. I am trying to understand if it will work in their environment.
My current place of work we have a 2 products/2 backlogs/2 separate teams. These backlogs are obviou... |
I'm creating a menu system in PHP and MySQL. I will have several different menus and each menu will have a set of menu items connected to it.
On the site, I also have different user permissions, some users can see all menu items and some items are hidden from some users. I'm curious on how I could handle the permission... |
I have a list of objects that will need to go through an approval process.
I am curious if it would be best to simply add some properties to my object, like ApprovedBy, and ApprovedOn.
Another option is to create an ObjectApproval class that contains this information as well as other information that needs to be stored... |
I'm working on image processing and I need to use big Images in a critical system.
A good practice for critical systems is to avoid dynamic allocation of memory but what is the design/recommendations for static memory allocation?
If we do a static allocation of a big matrix we get stack overflow.
class test
{
publi... |
I've inherited a lot of poorly designed code; the code has no tests. I am putting tests in place before I attempt a major refactor, but I have run into a problem with my unit tests.
The problem is, I will unit test a function, and then later decide that function is a liability. I will either get rid of the function, o... |
I am trying to solve the following kind of problem. I do not know if there is already a name for this, or a solution; however, I'm willing to bet there is. I was hoping someone could point me in the direction of implementing a solution for it, or at least tell me the name of the problem?
Suppose a traveler has a cert... |
I'm writing a library for sparse linear algebra computations as a backend for my thesis work and I've come to a bit of a crossroads. I'm using modern Fortran (don't groan, it's had inheritance and polymorphism and all that jazz for 10 years now).
From a software design standpoint, my main issue was making iterative sol... |
I am not sure whether there is a 'right' or 'wrong' answer to this one, but I was curious about the general consensus.
I have a User model that currently performs user functions (such as retrieving user details from the database, inserting new users to the database, updating user details etc.)
This leads to a fairly l... |
I've been using PHP Frameworks for so long that I've actually forgot the "best practices" for create websites without one.
Usually I will use Symfony, or more recently I've been using Laravel. A client wants a very simple website, but with certain parts of it dynamic. Due to the nature of the site using Wordpress, or a... |
I'm a Java developer with a bit more than a year of experience which places me somewhere above a junior, but not among mid-level developers yet. Recently I was offered a long-term project which is about studying an existing banking application code for 4 months and then introducing changes when needed. As a not-so-expe... |
I am writing a piece of software and I would like to release it open source.
Should I try just getting it stable on my computer (with normal use; no "things a monkey wouldn't even do") before releasing it, or should I take a different approach?
What I am leaning towards doing right now is:
Write it myself during the... |
Firstly, I'm not new to this. I've written desktop applications for Windows going back to 1991 with Visual Basic 3.0. I've used C/C++ and Win32 API, VB3-6, C# 1.0-4.0 and currently knock out web applications in ASP.Net MVC. However I haven't touched desktop stuff since 2000 in depth bar playing around with some ClickOn... |
Do JAX WS implementation classes come as part of the Java5 package, as part of the Java6 package or only as part of an application server libraries like WAS?
I read that it comes as part of Java EE? What does that mean? Java 5?
|
Consider a table in which a column represents a monetary value in some cases and a link to the value of another record in other cases so that we have the following:
TABLE 1
Id Product Composite
1 Apple False
2 Orange False
3 Pear True
TABLE 2
Product Date Price
1 2010-01-01 0.45
2 201... |
In this thread, an Oracle Product Manager (username "Alex Keh") refused to make Oracle's EF provider to conform with .NET's PascalCase coding standard for class names and property names, saying that it is only "cosmetics" without any "functional needs".
I discussed it with my team. One of the key things we want to kn... |
At one of the DevDays conferences a presenter said that Workflow Foundation isn't just for applications that require persistence, but they can make it easier to write and maintain Async WCF code and the corresponding error handling. (try.. catch)
Assuming that is true, is Workflow Foundation able to use all the CPUs ... |
I am new to GitHub and new to the open source world (coming from .NET). I have a media wiki site and want to install a Google analytics extension: http://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration
The extension's documentation says to download the code from GitHub.
In the GitHub repo, there are some... |
You can't ever have a talk about so called "NoSQL" database without bringing the CAP theorem (Consistency, Availability, Partition : pick two). If you have to pick say, between MongoDB (Partition, Consistency) and CouchDB (Availability, Partition), the first you need to think about is "Do I need correct data or do I ne... |
It was my freelancer job at oDesk. I have done several jobs earlier in given time, but is was the first time I missed the deadline. It was a very lengthy job and I tried my best but I still missed the deadline. Now, I am very scared. Because it's my fault that I missed the deadline.
My question is: Is this is a big con... |
I have the web application where i am serving file downloads in php.
All is working fine and i have the download column in file field where i increment it.
But i want to have full statictics of downloads like how many downloads on each day or in month or time of day or from which location
But i am not able o find how t... |
As a developer I should strive for low coupling between classes.
But low coupling doesn't mean "No coupling" so sometimes I have to allow some code flexibility and use "new" inside a domain model. (I'm sure everybody does this in real production code)
If I use "new" inside a method to create an object and I have to un... |
I like to create simple class diagrams for my projects. Most of the time I just use composition, inheritence and associations.
IBM's basic UML resource tells all about this.
However I'm using ruby so I got the option to define a module with some methods. I can just include this module in every class where I want to use... |
I created login form. When user clicks on login button this form shows up with some fade effect (jQuery). What I want to do is to display error message in this form when user inputs invalid data. Before showing any messages, PHP must read data from database, therefore page must be reloaded and when page is reloaded thi... |
I found an interesting article on high scalability web site where it talks about EBay scalability and especially a specific passage struck me:
"(Ebay strategies)...Move work out of the database into the
applications because the database is the bottleneck. Ebay does this in
the extreme. We see it in other architect... |
Here is, roughly, our structure of work using git, for web development. We have a master branch, and individual or groups of work are done seperately in branches, then merged in.
A ticket (or several) comes in.
We create a branch on our local development repository, and push it to origin.
We fix the tickets in code, c... |
I have a system that checks the status of a number of systems, such as, is http up, does the system respond to ping, that sort of thing.
I check all of these systems every 5 minutes. If something is broken, I send out an e-mail with a notice. If the problem is cleared I send out an "all clear, problem resolved" notice... |
I am writing a Java web application that consists mainly of a bunch of similar pages in which every page has several tables and a filter that applies to those tables. The data on these tables comes from an SQL database.
I am using myBatis as ORM, which may not be the best choice in my case, since the database is poorly... |
Since the released of Web API, I've been wondering whether it's necessary or helpful to migrate/change MVC controllers to use Web API calls. Since it's hard to describe code I'll show an example of what I mean:
Current controller, the _userService is basically the Business layer of the application that is then calling ... |
There are answers to the question on how test classes that connect to a database, e.g. "Should service test classes connect ..." and "Unit testing - Database coupled app".
So, in short let's assume you have a class A that needs to connect to a database. Instead of letting A actually connect, you provide A with an inter... |
I've written an API which can be configured to signal errors in different ways (return values, debugging messages, or exceptions). I've got a check in place when the API is first initialized to see what type of error handling the client is requesting - what should I do when they request an undefined error handling type... |
I know some people that are currently working on a project for the US military (low security level, non-combat human resources type data).
An initial state of the project code was submitted to the military for review, and they ran the program through some sort of security analyzer tool. It returned a report of known se... |
I've made a container which functions like a Binary Heap in terms of insertions and popping the root element. The key difference is that the comparison steps are all replaced with a random call for deciding when to go left/right. (The underlying data structure is a Vector, written as an expandable array, so you don't... |
A db index is analogous to a table of contents. This helps me understand db index in an easy way. My question is are tehre any real world analogies for a clustered index?
|
I am not a licenses expert so I got confused a bit... The license Apache 2.0; Does it allow to get source codes and modify them for new projects? I mean modify source codes (some its parts) and recompile them?
|
I was wondering if it's valid to initialize an instance of a class within the same class? For example:
public class Person()
{
string name;
string age;
public Person getPerson()
{
Person p1=new Person();
//some logic here
return p1
}
}
I ended up doing that for a part of my code ... |
I already had question about this but obviously it was not accepted very well, apparently too long when it's actually more information so you could have given me better answer.
Ok, I will be much clearer now. Best possible logic to develop scalable chat in terms of stability, storing/reading messages on chat, updating ... |
I am a little confused on both pointers and reference. From my understanding pointers are addresses in memory. If I pass a variable using pointers and reference to a function, any manipulations of the variable in the function will change the original variable.
I read online that passing by reference is not encourage... |
So I am creating a web api for an app I am making. The data is sanitized before it is sent to my web api and then encrypted before it is stored in my MySql server.
The phone app sanitizes then behind the scenes calls -> web php api which encrypts aes style with a hard coded salt then calls -> server
My question is if ... |
I am implementing a vector in C. I am doing this for the fun of programming, for the fun of learning, and for the use of the data structure in later projects. This is not homework. My question is regarding methodology, not necessarily implementation, therefore I am not really looking for a code review.
Now, I have read... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.