discussion

Where does one get data like Country:(list) State:(list)

As a programmer of data-entry forms of all kinds, I often find myself making fields for things like Country: <choose from list>, State: <choose from list>, Race/Ethnicity: <choose from list>. Consider: Perhaps a list the 50 United States names is an easy thing to find (does one include DC?) , but the countries are not. Nearly every site...

What programming language should I use to create small, native Windows Applications?

I want to develop an application that runs on any Windows platform (Windows XP, Vista, or Windows 7) but does not require a dependency like the .NET Framework or JVM. I have given the other requirements below: Runs in any windows platform Must have GUI libraries to create windows/primitive controls The output .exe should also be very...

Is it getting to be time for C# to support compile-time macros?

Thus far, Microsoft's C# team has resisted adding formal compile-time macro capabilities to the language. There are aspects of programming with WPF that seem (to me, at least) to be creating some compelling use cases for macros. Dependency properties, for instance. It would be so nice to just be able to do something like this: [Depen...

For what purpose does java have a float primitive type?

Can you help me clarify the usages of the float primitive in Java? My understanding is that converting a float value to double and vice-versa can be problematic. I read (rather long time ago and not sure that it's actual true anymore with new JVMs) that float's performance is much worse than double's. And of course floats have less prec...

regular expressions: love or hate or alternatives?

While I can see the value and usefulness of regular expressions, I also find that they are extremely complicated and difficult to create and debug. I am often at the point where I find their usefulness is offset by the difficulty in creating expressions. I am a bit astonished by the fact that there is nothing quite like them and that t...

What do you do to keep current

I've noticed that as I progress in my career I my day to day activities require less and less actual hands on development. However, I feel that I need to stay current, both for my own personal desire as well as being able to guide a team to best practices etc. I'm finding it very hard to stay on top of the game because there are so man...

Where do enumerations belong

At my current place of employment they were putting enumerations into the class they used them in. Whilst I didn't see any duplication of these enumerations I non the less thought that they didn't belong in the class so I moved them out into their own class. The reason I did that was that I wanted them to be re-usable w/out needing to ...

Sharepoint - Discussion replies show as ‘Dispform.aspx’ in search results

In a sharepoint search search, the results page shows 'dispform.aspx' as the page title on replies to discussion posts. Ideally i'd want it to say 'RE: discussion title'. Does anyone have any idea how to achieve this? EDIT - should probably point out that we have dozens of discussion forums and new ones are being created all the time....

What are the best places on the web to present my application for critique and suggestions?

I pretty much suppose that if I issue a question here on StackOverflow, saying "hey, colleagues, go this link to my website, download my CoolProggie and write a line on what you think?" it is going to be considered a sort of advertisement, downvoted and closed. Can you suggest any correct places for this, where I am going to find enough ...

*Discussion* Client side page permissions - Javascript / jquery / cookies / other?

TLDR Using plain HTML / Javascript. Want to block access to some pages (doesn't have to be super secure just to stop some peeking eyes). I would like this to be a discussion preferably on different ways of doing this? If anyone has any other ideas than using cookies or differeny ways to do this. I thought of simply doing this by sett...

Discussion - Allowing / blocking user access to pages / Client Side Validation (Client Side Only!) - Javascript / Jquery

TLDR Using plain HTML / Javascript (Client Side) I want to prevent viewing of certain pages. The user will have to type a username and password and depending on that they get access to different pages. Answers can NOT include server side whatsoever It does not matter if they can break it easily. There is no sensitive information etc....

Implementing Model-level caching

I was posting some comments in a related question about MVC caching and some questions about actual implementation came up. How does one implement a Model-level cache that works transparently without the developer needing to manually cache, yet still remains efficient? I would keep my caching responsibilities firmly within the mo...

Applications on the Web/Cloud the way to go? over Desktop apps?

i am currently a mainly web developer, but is quite attracted to the performance and great integration with the OS (eg. Windows 7, Jump Lists, Taskbar Thumbnails, etc) something like WPF/C# can provide to the user, improving workflow and productivity. privacy and performance seems like a major downside of web/cloud apps compared to deskt...

Multi-thread conversation in django (like Reddit)

Hay, i have an app which essentially a conversation system (much like reddits) Where a post can have multiple replies, and a reply and have multiplies, and a reply to a reply can have multiple replies (etc) I've made the model like this class Discussion(models.Model): message = models.TextField() replies = models.ManyToManyFi...

Are your redirects HTTP compliant (absolute URI)?

In the Hypertext Transfer Protocol 1.1 spec, it states for the Location header: The field value consists of a single absolute URI. Location = "Location" ":" absoluteURI An example is: Location: http://www.w3.org/pub/WWW/People.html I have coded many an app that doesn't include the scheme and domain (i.e., /th...

Switching to HTML 5 and CSS3

I constantly find myself creating sites using newer technologies (such as HTML 5 and CSS 3, then adding either backwards compatibility layers or porting entirely to XHTML 1.0 and CSS 2.1. This process often involves replacing CSS with sprite images and adding in flash components for advanced asynchronous support. My question is when can...

General practice to specify a break after a default clause?

Possible Duplicate: break in a case with return.. and for default If I have a switch statement: switch() { case 1: ... case 2: ... ... default: break; } Is there any reason for the break in the default clause? I see this in quite a few places, but isn't it unnecessary? What is the general practice? ...

Benefits of implementing OAuth

From a webservice provider point of view what is the benefit of asking users to create an account or login using 3rd party web service provider (e.g: Twitter or facebook) to log into your site with? Wouldn't it be easier to ask the user to provide their twitter or facebook login and use that to pull the user's twitter or facebook data?...

When do you use a circular slider/knob in a good user interface?

As I am familiar with some synthesizers, I often user real life circular sliders (e.g. to control the master volume), also called knobs. Like this one: Sometimes I also find these controls in virtual applications (yes I like extreme minimalism =P): But most of them are irritating, confusing or just wrong, and simple sliders could be ...

Problems with Facebook API - Getting all content from table Stream

I am trying to get all stream data from a group (I have wall entries, discussions, events and photos). For now, Access on this group is Open. $result = $_fb->api_client->fql_query("SELECT actor_id, message FROM stream WHERE source_id=$gid LIMIT 50"); Only some of the records come back (5 out of 10) (only wall entries and a photo). Ju...