language

Why use C?

Why is C used for writing drivers and OS codes? Is there a size problem? Are there any drivers written in other languages? Which language were XP, Vista, and Solaris written in? ...

How do you set the language in Rails?

Hi, I am trying to use i18n in rails. I want the language to be set first from params[:locale] (probably already in the url) then from the browser http header and lastly from the default_locale. Everything is fine. Now the problem starts, when I want to add a dropdown list to allow the user to change the locale. How do I force the page t...

Developing a non english language Sharepoint site

I need to develop a multi language sharepoint site, (English / French ) for example. I installed the french language pack with Service packs. I used variations, added labels for En-US and Fr-FR and created the hierarchies. The problem is that when working with the french site, All Sharepoint menu items are in french. This is very hard fo...

Website language: use browser locale or IP address

Hello! For a website we're about to implement automatic country/language selection, but still giving the user the choice to change it. First of all, if the user enters the website using a domain with a country-level TLD they will be presented the correct language by default. But the question is what should the logic be if they come fro...

C# - Value Type Equals method - why does the compiler use reflection ?

I just came across something pretty weird to me : when you use the Equals() method on a value type (and if this method has not been overriden, of course) you get something very very slow -- fields are compared one to one using reflection ! As in : public struct MyStruct{ int i; } (...) MyStruct s, t; s.i = 0; t.i = 1; ...

What can go in the parentheses of a Java for loop?

My question is about the Java for statement, e.g. for (int i = 0; i < 10; ++i) {/* stuff */} What I don't understand is precisely how much code / what kind of code I can put in the parentheses (i.e. where I have int i = 0; i < 10; ++i in my example)- I don't really understand the language used to describe it here: http://java.sun.co...

Parse and execute formulas with C#

Hi all I am looking for an open source library to parse and execute formula/functions in C#. I would like to create a bunch of objects that derive from an interface (i.e. IFormulaEntity) which would have properties/methods/values and the allow a user to specify formulas for those objects. For example, I might have public class Emplo...

How can I construct a grammar that generates this language?

I'm studying for a finite automata & grammars test and I'm stuck with this question: Construct a grammar that generates L: L = {a^n b^m c^m+n|n>=0, m>=0} I believe my productions should go along this lines: S->aA | aB B->bB | bC C->cC | c Here's where I have doubts How can my production for C remember the numbers of m a...

Which language to choose to learn the basics of programming?

Possible Duplicate: What is the easiest language to start with? Hi, I am trying to change my career to a programmer. I found interest in programming, and also quicker to learn. my confusion started when I have decide which language should I be with? should it be the languages and scripts from MS stable or should it be Java? ...

VB.NET language and Nothing : why is it the way it is ?

This is a question about the VB.NET language. Since I am using it every day, I just try to understand the motivations behind some of its constructs. I just find out that this line : If myObject Is Nothing then is as correct as this one is : If Nothing Is myObject Then Same results. Using ildasm, we can see that these lines are tra...

How to efectively organize your web project? (specially mutilanguage websites)

I have my project folder, for instance, myWeb. In it there are various folders like styles (for CSS), scripts (JS), php (for php scripts), and folders for 3 different languages, for instance: en(english), sp (spanish), cn (chinese). This sometimes gives me problems because the index or default page should be in the root directory but all...

How do you normalize a finite state machine?

How do you find the minimal Deterministic FSM? Is there a way to normalize non-deterministic FSMs? Is there a linear time bound algorithm to find the minimal FSM for a given machine? Is there a way to see if two FSMs are equivalent? This is not a homework question. I was watching this lecture series and just got curious. ...

Do Intel and AMD processor have the same assembler?

The C language was used to write UNIX to achieve portability -- the same C language program compiled using different compilers produces different machine instructions. How come Windows OS is able to run on both Intel and AMD processors? ...

Struts Tags and Expression Language

I am having a problem using expression language and struts tags together in a struts2 project. The following code snippet from a jsp file illustrates my problem. The fruits object is passed by a servlet. I know that the error is not from the servlet because when I comment out the form code, it correctly prints out each fruit. <c:forEach...

Foreach-statement in c++ and language extension?

You can simulate foreach-statement in c++ with macro declaration. I'm using similar syntax for looping arrays in the following way: int array1[10]; vector<int> array2(10); fori(array1) forj(array2) fork(123) if(array1[i]==array[j]) return true; What's your favorite macros for extending c++ l...

Are computer language copyrighted? Can I make a compiler or ide or anything for any of them?

Are computer languages copyrighted or have some restrictions imposed on them how they can be used? What does that mean in practice? If so, what can be done or what cannot be done? Could I make a compiler or ide or anything for any of them? For example for Pl/Sql? ...

SQL Server 2005 Express cannot update datetime field when windows is set to Italian

Hi, I am struggling with an MS SQL 2005 Express issue. A query like the one below works perfect when Windows Regional Options (control panel) is set to English (United States), but it fails when set to Italian (and maybe other languages). UPDATE MyTable SET StartDate='2009-07-14 12:05:30' WHERE ID=7 I tried also many different date-t...

Which language uses .pde extension?

While searching for an implementation of the Barnsley's Fern fractal i came across a implementation that has .pde extension which programming language uses this extension? Implemantation Page ...

Which is more advantageous: Learning new languages or increasing knowledge of ones you already know?

Do you prefer learning new languages or just working in your current language and increase your knowledge of it? Which one provides more real-world benefits, and why? ...

PHP language engine

Hello everyone! I'm writing Content Management software in PHP (which should not be bigger then 3kb when minified), but what engine should I use for languages (english, dutch, german, chinese, etc...)? I was thinking of creating a function called function _(){} that reads strings from a file (a .ini file or similar). But does somebod...