-1
votes
0answers
30 views

how to print a char array using a pointer only? (we don't know the size of the array) [migrated]

I have a function with three parameters: a pointer to a character array (also known as a C-String), and two pointers to specific characters (we will assume that they point to characters in the ...
0
votes
0answers
15 views

Implementation of strategy design pattern

Here is my code: public class StrategyDemo { public static void main(String[] args) { Phone ipPhone = new IPPhone("1234", "ProviderA"); Phone tdmPhone = new ...
3
votes
1answer
37 views

A question about static types

How would you statically type the following JavaScript program function c(str) { c = eval(str); return c(str); } I'm not trying to start a flame war but I'm genuinely curious. I've always ...
-3
votes
0answers
22 views

Good tools to generate ODT (OpenOffice.Org) documents [on hold]

My company is looking into exporting data from a web application into more familiar, usable formats. We're evaluating producing ODT (OpenOffice.Org Writer) files and I'm looking for a library to ...
-1
votes
0answers
62 views

Senior developer but unable to make design decisions [duplicate]

I have been coding for seven years and worked in various medium scale projects for several companies. Recently, I was transferred to a different project and found myself unable to make even simple ...
2
votes
5answers
475 views

Is making a small change, testing it, then “rinse and repeat”, a bad habit?

I am a programmer with a number of years of experience. I realized I got a certain habit. I'm nor sure whether it's really bad habit or not. Maybe you can help me tell. I get a list of tasks to ...
3
votes
2answers
83 views

Avoiding polling with components

Once you create separate components that need to communicate with each other you enter the realm of systems programming where you have to assume that errors could originate at any step in the process. ...
-3
votes
1answer
24 views

How to highlight a field that just edited? [on hold]

I developed a simple 2-page of code in classic asp. First page is test.aspthat consisting of list of companies name and with there info in tabular form. all this information of listed companies i ...
0
votes
0answers
37 views

Typecasting int to char in printf() in C [migrated]

int *int_pointer = malloc(10); *int_pointer = 53200; printf("The integer at byte #0 is set to: %d \n", (char) *int_pointer); RESULT: -48 So I was just trying this out to see what would happen and ...
0
votes
2answers
58 views

When using a programming library for an organization, can it still be a non-profit project? [on hold]

I am currently developing a web-application that is to present data stored in a database. For the presentation there is a request for both presenting this in table format and graph format. The table ...
-3
votes
0answers
24 views

Chat application and fault tolerance [on hold]

I'm writing a simple one-to-one chat application which I'm planning to publish to some cloud platform like Heroku/GAE. What should I do in order to make the service fault-tolerance/ persistence? ...
-2
votes
0answers
47 views

Are Pascal and Racket obsolete [on hold]

I recently started programming in python using A Byte of Python. I found some old books in my house about introduction to programming. One of them is about learning programming principles in Pascal ...
1
vote
1answer
96 views

Java-Like 'throws'-information in method signature C#

From Java I know that the signatures of methods that can throw exceptions contain a throws block, that contains the Exception(s) that might be thrown. In C# there is no such thing and it is also not ...
0
votes
3answers
24 views

Executing ajax calls in setTimeout after set intervals?

We develop an application involving a lot of ajax. Such as showing users notifications, updating what they see via ajax while they are on the web page. This update is due to the actions of other users ...
1
vote
3answers
148 views

Does the pattern of passing in one object instead of many parameters to a constructor have a name?

If you have a constructor that takes a lot of parameters, like this: public OrgUnitsHalRepresentation(List<OrgUnitSummaryHalRepresentation> orgUnitSummaryHalRepresentationList, int count, ...
-4
votes
0answers
17 views

I want to upload multiple images into database [on hold]

I want to store multiple images in database in one column using php. I tried this code <html> <head> <title>more option in shop detail register form </title> </head> ...
0
votes
1answer
41 views

How does a stack VM manage with only one stack?

Lately I've been asking a lot of questions here about VMs. Here's another one: I understand that often stack based VMs use only one stack - the call stack - for everything. E.g. it is also used for ...
-4
votes
0answers
26 views

how to disable copy paste option in web page [on hold]

In a particular web site how to disable copy paste option in a particular textbox and body also not allow to access mouse right option?
0
votes
2answers
60 views

Open Source-Only license

I want to know if a license exists that is similar to GPL but allows only source distribution (that is no binary distribution). Why do I want this? The idea is that I want fellow programmers to be ...
-4
votes
1answer
52 views

How should I approach a project? [on hold]

Often, when I start working on a project, I have to choose between two things: code the program and add a layout later first make a layout which does nothing yet and integrate the code with it For ...
0
votes
0answers
51 views

What is the legal status of WSDL files and the generated code from it?

I know this is more in the line of legal advice, but maybe somebody still has some insights. It comes actually down two two slightly different questions. The background is that I want to develop an ...
0
votes
0answers
47 views

Using Number() vs. parseInt() to do type conversion? Which should I use when?

For type conversion, when should one use the primitive wrapper Number() and when should one use parseInt()? I'm aware that parseInt() allows you to specify a radix, will truncate decimals so that ...
0
votes
1answer
26 views

How do I ensure my site will be crawled when articles are generated by the database?

I wasn't sure how to ask the question. But basically, it's a textbook scenario. I'm working on a site that's article based, but the article information is stored in a database. Then the page is ...
12
votes
3answers
2k views

Why Increment Pointers?

I just recently started learning C++, and as most people (according to what I have been reading) I'm struggling with pointers. Not in the traditional sense, I understand what they are, and why they ...
2
votes
1answer
68 views

Is fee-splitting/referral fees ethical in the software development industry?

I have a background in the medical field and I was taught to never engage in any fee-splitting (mostly when referring patients) because it would be a breach of fiduciary duty to my patients and ...
0
votes
1answer
61 views

Commercial Apps with an Open Source on github

I am going to be launching a small web service soon and was wondering if it's a good idea to upload the code to a public github repo. The code will not be licensed for commercial use but the public ...
0
votes
0answers
5 views

How can I rate or tag files that aren't images in Windows 7? [migrated]

In Windows 7 it is possible to rate images or tag Word-files. Since I'm reading a lot on my computer, I would like to mark pdf files I've already read. The image-rating-option would be great and so ...
0
votes
0answers
8 views

Problem with PHP login [migrated]

I'm trying to code a easy PHP login but I have a problem with the user/password checking. The code is: $host="localhost"; $username="root"; $password="pass"; $base_de_datos="usuarios"; ...
5
votes
3answers
200 views

What would the register-machine bytecode for this code look like?

I hope this kind of question isn't off-topic on this site. I'm finally getting the hang of what a stack based machine is, and how to compile code for it. For example, the following code: 2 * 5 + 1 ...
-4
votes
2answers
76 views

Java object oriented programming style [on hold]

I've noticed that a lot of the code in this java book i'm reading uses methods to execute code instead of directly writing the code in the class. Is that what object oriented programming means or is ...
1
vote
2answers
99 views

How can I figure out if another project is mostly maintenance and bugs?

I started working in a relatively big company that unfortunately has its share of quite a lot of legacy code and I ended up spending an extra ordinary amount of time in maintainance and bug fixes. ...
1
vote
0answers
41 views

Passing Anonymous Type to a Bound Control

Generally speaking, I'm fairly opposed to the use of anonymous types in real-world code (except in LINQ and some other specific scenarios), but I'm looking right now at a situation where I need to ...
0
votes
0answers
21 views

Passing configuration to a handler

I'm building my own JET Parser and one of the things I am trying to do as per the JET specifications is to allow changing of the start and end tags from the default <% and %>. Right now I have ...
-1
votes
2answers
114 views

Keeping large class level objects out of memory [on hold]

So far my program is taking 1.5 GB of RAM to run and I am afraid the hospital client that have old computers might get out of RAM issues or super slow performance. Well actually if it takes 3 hours to ...
0
votes
1answer
18 views

Long running task initiated in the web site

The plan is to develop generic solution for long running task initiated in web site by users such as: 1. upload large file and do some custom processing and then insert in the database. 2. export ...
0
votes
3answers
59 views

Structuring an application that reads from a .properties file

I have a Java app with three classes: Foo, Bar and Baz. All three depend on a bunch of what are currently constants defined in each class in order to determine how to run. On top of that, Baz ...
0
votes
1answer
58 views

What time should be recorded against story points in order to determine velocity and hours per point

We recently tried to correlate the hours spent on a sprint against the stories assigned to the project (to try and get an idea of velocity and hours per point). However our recording system only ...
3
votes
1answer
117 views

How should I recursively process a file in Haskell?

Basically I'm expanding a literate program in Haskell. There are two things I need to look for to expand. Here's an example file: program.c.lit: ============== Some comments in the source file that I ...
-5
votes
0answers
32 views

Arrays in Fortran [on hold]

I was trying to plot y=sin(x) but I made a mistake somewhere in my code and I can`t get any data for y. I get zeros both for y and x. Can you help me in identifying the mistake please? program ...
-5
votes
2answers
55 views

Why use database versus a data structure? [on hold]

Why is it better to use a database with web server instead of using a data structure on the actual web server for a web application.
0
votes
0answers
31 views

Architecture for a messaging app

I want to build a messaging app and I'm struggling with architecture here. What I want to achieve: Rest API for registrations/login Chat server itself, i.e. app which will allow clients to connect ...
0
votes
1answer
87 views

How to tell node.js which javascript code runs on server vs client?

I am trying to learn the theory of node.js but can't seem to figure out how node.js knows whether to pre process it on the server or send it to browser for execution.
2
votes
4answers
532 views

Why would the switch from C# to scala make sense in order to take advantage of scala's functional capabilities? [on hold]

What is the benefit of using functional program for large scale software projects? I have heard it is pretty performance equivalent to regular OOP. I also have heard that it is more "mathematically ...
0
votes
1answer
39 views

Permutation tests for large sequences

I would like to perform a permutation test on a particularly large data set, i.e. around 4 million entries. Basically, I need to get some number of random permutations of this data set. Usual way to ...
-6
votes
0answers
24 views

Why does Mandrill take longer when sending mails from my domain? [on hold]

I'm using the same api for sending mails from localhost and from my hosted domain. The mails are delivered much quicker when sending from localhost. Any reason why this might be so ?
-7
votes
0answers
24 views

How do I have my navigation bar scroll down too when users scroll down. Kind of like the navigation bar never moves, it just stays fixed [on hold]

How do I have my navigation bar scroll down too when users scroll down. Kind of like the navigation bar never moves, it just stays fixed. Here's the code in question: <DOCTYPE HTML PUBLIC> ...
1
vote
0answers
90 views

Frog crossing N lane road problem [on hold]

Problem says that: There are N lanes, and the speed of each lane is given. There are many cars in all the lanes and the start position and the length of each car and its corresponding lane is ...
-4
votes
0answers
33 views

Python book with lots of examples and exercises [on hold]

I have done a course on fortran in college and I want to learn python. I would like a resource recommendation with lots of examples and exercises. More or less in the style of the C book Ritchie and ...
2
votes
3answers
54 views

How to maintain view-related information in MVVM and may I store this in the model?

I have an ongoing discussion with some colleagues on how to manage the views to our model. We've got a model which may be represented by many views. Let's say we've got some data that is stored in an ...
-3
votes
0answers
20 views

Remove portion of string TSQL [migrated]

I have a string of numbers that I need to trim a portion from using TSQL. The string of numbers will always start with a 101 then it will have a set of 0's and a set of random numbers. Example: ...

15 30 50 per page