Search Results

Search found 13378 results on 536 pages for 'natural language'.

Page 11/536 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Django: How to set default language in admin on login

    - by lazerscience
    I'm saving an user's default language in his user profile and on login I want to set the admin's default language to it. One possibility I was thinking of is using a middleware, but I think if I do it on process_request I will not see an user object there since this is processed AFTER the middleware, so I could only set it after the next request! Any solutions are highly appreciated!

    Read the article

  • What's a regular language?

    - by Javier Badia
    I've read that you can't parse HTML with regular expressions because HTML is not a regular language. I tried searching Wikipedia, but I didn't understand a word of what the various related articles said. Can someone explain, in simpler terms, what's a regular (or non-regular) language, and why non-regular languages can't be parsed with regexes?

    Read the article

  • What is the easiest language to start with?

    - by Teifion
    What is the language with the lowest barriers to entry, simplest syntax, easiest setup. I'm aware that there's not a best language but I am sure that there will be one that's got a good score in all three areas. It's for teaching friends how to program, I like PHP and Python but I don't want to be narrow minded and limit myself when there is a better option out there. Common suggestions Ruby Python Basic C Java C# Useful links Best Ways To Teach A Beginner to Program Why's (Poignant) Guide to Ruby Think Python

    Read the article

  • WordPress Multi Language Help

    - by Cameron
    I have a WordPress website that needs to have its articles in multiple languages. The authors will be writing the articles themselves so I don't need an automatic translation tool. The plan is that a user can choose a language from a drop-down list which will then show the different language. Any ideas on how I can do this?

    Read the article

  • What are the benefits of learning a new language, as a game developer?

    - by Keand64
    I'm an independant game developer/designer, and I'm wondering what specific benefits are there to learning a new programming language. I do my programming in C++ currently, and I want to know if there are any tangible benefits to learning a different language, as in, benefits to writing a game x in language y versus game w in language z? Basically, I understand that learning a new programming language will help me think about a problem in different ways, but what are some actual benefits to using one language over another in specific scenarios?

    Read the article

  • Why does Code::Blocks constantly changes my language?

    - by Yakov Lipkovich
    On my there are two set languages, which are English and Russian, and English is the default set language. Yet every time I leave Code::Blocks and click on the window again, the program automatically changes the language to Russian, which not only is it annoying, but it doesn't make much sense. Does anyone have any idea why it's going on and how to get rid of this pest? So far that's the best C++ IDE I have found and I don't want to ditch it due to such a nasty annoyance.

    Read the article

  • PHP language specification ?

    - by Rolf
    Hi, as I know there is an official document for Java (JLS), I'd like to know if it's also the case of PHP language. I found the "Language Reference" section on the PHP manual, but it doesn't look as detailed as the JLS. The thing is I have a good practical knowledge of PHP but I'm miserably clueless about what REALLY happens under the hood. If there isn't any official document, could you recommend me some good books to read ? Thanks in advance ! Rolf

    Read the article

  • Converting java language output to Joomla language output

    - by jax
    in java if I run : Locale.getDefault().toString() I get zh_tw I am sending this to a joomla site and setting the language like this: $lang = &JFactory::getLanguage(); $lang->setLanguage( $_GET['lang'] ); $lang->load(); however the site requires the following format zh-TW It appears that if it is not in that exact format the language will not change. Is there a function somewhere in java or php that will convert the format for me? I realise that I could write the method myself like this: public static String convertLanguageToJoomlaFormat(String lang) { String[] parts = lang.split("_"); if(parts.length ==2) return parts[0]+"-"+parts[1].toUpperCase(); return lang; } but am unsure if there are any cases where the format changes for particular languages.

    Read the article

  • Microsoft Natural Keyboard 4000, more problematic keys?

    - by Saebin
    So my new motherboard doesn't have a ps/2 connector, so I bought a Microsoft natural keyboard 4000 to replace my old natural keyboard. But, some of the keys stopped working, so I bought another 4000... which then had different keys stop working. I tried cleaning them out, but no go. My guess is some condensation or something fell on it and shorted it out... but if it is that easy to short out, I can't imagine how my old keyboard lasted for years. Did I just get unlucky or are newer keyboards more vulnerable? Any recommendations?

    Read the article

  • Java language book for an experienced programmer?

    - by Andrew
    I am looking for book to get up to speed with (start with) a Java language. I am experienced (more than 15 years) C# and C++ programmer with a bit of Python, so I don't need a book which starts with a programming concepts for a beginner. In fact I think I need a "Java language specification" sort of book. I checked the answers to questions similar to mine and found that there two books which is being recommended most: "Effective Java" and "Sun Certified Java Programmer". After a quick look at the "Effective Java" I realised it should not be a book to start with, it is a good book (I read all books in Effective C++, STL series and liked them but they are more "good practices" books, rather than a book for a beginners) "Sun Certified Java Programmer" looks closer to what I am after - but goes too slow for me. So I did some more search and found these two books: The Java(TM) Language Specification by Gosling himself Java™ Programming Language, The (4th Edition) by Ken Arnold I gather the first one a little bit dated and the second one is the best Java Language Reference books up to date, but I am not sure - as I am not a Java person to make such judgements. After reading the language reference book I will start learning the basic libraries / packages / namespaces (collections, algorithms, IO, etc) and then something about UI architecture. But that will come later. Question: - which Java Language reference book for an experienced programmer you can recomend ? and why? Cheers.

    Read the article

  • What can be done against language inertia?

    - by gerrit
    Often, projects use programming language X, but would use programming language Y if they were started from scratch. For example, big numerical models may be written entirely in Fortran. Whereas this might be a reasonable choice for the components that need to run fast (alternative would be C or C++), it might be a poor choice for components that either do not need to run fast (such as things dealing with human input or simple visualisations), or where runtime is not the limiting factor (such as I/O, particularly when from the network). Another example may be when a project is built using a propriety language (such as Matlab; no, FOSS clones are not good enough) and was started at a time when FOSS alternatives were not viable, but ten years later, they are; and it would be beneficial to migrate. However, due to language inertia, a migration does not happen. Code that works should not be touched, porting code is a time-consuming, expensive process, and programmers are familiar in language X but not necessarily in language Y. Still, in the long term, a migration would likely be beneficial. Can anything be done to mitigate the problems associated with language inertia? Are there any notable examples of big projects that have successfully overcome this problem? Or is a project bound to stick forever with the initial choices?

    Read the article

  • JVM Language Summit in July

    - by Tori Wieldt
    A reminder that the 2012 JVM Language Summit is happening July 30–August 1, 2012 in Santa Clara, CA. The JVM Language Summit is an open technical collaboration among language designers, compiler writers, tool builders, runtime engineers, and VM architects, sharing their experiences as creators of programming languages for the JVM, and of the JVM itself. Non-JVM developers are welcome to attend or speak on their runtime, VM, or language of choice. About 70 language and VM implementers attended last year—and over one third presented. What’s at the JVM Language Summit? Three days of technical presentations and conversations about programming languages and the JVM. Prepared talks by numerous visiting language experts, OpenJDK engineers, and other Java luminaries. Many opportunities to visit and network with your peers. Da Vinci Machine Project memorabilia. Dinner at a local restaurant, such as last year’s Faultline Brewing Company. A chance to help shape the future of programming languages on the JVM. Space is limited: This summit is organized around a single classroom-style room, to support direct communication between participants. To cover costs, there is a nominal conference fee of $100. Learn more.

    Read the article

  • How to indicate to a web server the language of a resource

    - by Nik M
    I'm writing an HTTP API to a publishing server, and I want resources with representations in multiple languages. A user whose client GETs a resource which has Korean, Japanese and Trad. Chinese representations, and sends Accept-Language: en, ja;q=0.7 should get the Japanese. One resource, identified by one URI, will therefore have a number of different language representations. This seems to me like a totally orthodox use of content negotiation and multiple resource representations. But when each translator comes to provide these alternate language representations to the server, what's the correct way to instruct the server which language to store the representation under? I'm having the translators PUT the representation in its entirety to the same URI, but I can't find out how to do this elegantly. Content-Language is a response header, and none of the request headers seem to fit the bill. It seems my options are Invent a new request header Supply additional metadata in a multipart/related document Provide language as a parameter to the Content-Type of the request, like Content-Type: text/html;language=en I don't want to get into the business of extending HTTP, and I don't feel great about bundling extra metadata into the representation. Neither approach seems friendly to HTTP caches either. So option 3 seems like the best way that I can think of, but even then it's decidedly non-standard to put my own specific parameters on a very well established content type. Is there any by-the-book way of achieving this?

    Read the article

  • SOLR and Natural Language Parsing - Can I use it?

    - by andy
    hey guys, my requirements are pretty similar to this: Requirements http://stackoverflow.com/questions/90580/word-frequency-algorithm-for-natural-language-processing Using Solr While the answer for that question is excellent, I was wondering if I could make use of all the time I spent getting to know SOLR for my NLP. I thought of SOLR because: It's got a bunch of tokenizers and performs a lot of NLP. It's pretty use to use out of the box. It's restful distributed app, so it's easy to hook up I've spent some time with it, so using could save me time. Can I use Solr? Although the above reasons are good, I don't know SOLR THAT well, so I need to know if it would be appropriate for my requirements. Ideal Usage Ideally, I'd like to configure SOLR, and then be able to send SOLR some text, and retrieve the indexed tonkenized content. Context So you guys know, I'm working on a small component of a bigger recommendation engine.

    Read the article

  • Simulating aspects of static-typing in a duck-typed language

    - by Mike
    In my current job I'm building a suite of Perl scripts that depend heavily on objects. (using Perl's bless() on a Hash to get as close to OO as possible) Now, for lack of a better way of putting this, most programmers at my company aren't very smart. Worse, they don't like reading documentation and seem to have a problem understanding other people's code. Cowboy coding is the game here. Whenever they encounter a problem and try to fix it, they come up with a horrendous solution that actually solves nothing and usually makes it worse. This results in me, frankly, not trusting them with code written in duck typed language. As an example, I see too many problems with them not getting an explicit error for misusing objects. For instance, if type A has member foo, and they do something like, instance->goo, they aren't going to see the problem immediately. It will return a null/undefined value, and they will probably waste an hour finding the cause. Then end up changing something else because they didn't properly identify the original problem. So I'm brainstorming for a way to keep my scripting language (its rapid development is an advantage) but give an explicit error message when an an object isn't used properly. I realize that since there isn't a compile stage or static typing, the error will have to be at run time. I'm fine with this, so long as the user gets a very explicit notice saying "this object doesn't have X" As part of my solution, I don't want it to be required that they check if a method/variable exists before trying to use it. Even though my work is in Perl, I think this can be language agnostic.

    Read the article

  • Does this language feature already exists?

    - by Pindatjuh
    I'm currently developing a new language for programming in a continuous environment (compare it to electrical engineering), and I've got some ideas on a certain language construction. Let me explain the feature by explanation and then by definition; x = a | b; Where x is a variable and a and b are other variables (or static values). if(x == a) { // all references to "x" are essentially references to "a". } if(x == b) { // same but with "b" } if(x != a) { // ... } if(x == a | b) { // guaranteed that "x" is '"a" | "b"'; interacting with "x" // will interact with both "a" and "b". } // etc. In the above, all code-blocks are executed, but the "scope" changes in each block how x is interpreted. In the first block, x is guaranteed to be a: thus interacting with x inside that block will interact on a. The second and the third code-block are only equal in this situation (because not b only remains a). The last block guarantees that x is at least a or b. Further more; | is not the "bitwise or operator", but I've called it the "and/or"-operator. It's definition is: "|" = "and" | "or" (On my blog, http://cplang.wordpress.com/2009/12/19/binop-and-or/, is more (mathematical) background information on this operator. It's loosely based on sets.) I do not know if this construction already exists, so that's my question: does this language feature already exists?

    Read the article

  • Language Translation API

    - by kandarp
    How can i convert language in my Java? Is there any API exist, which convert any language to any other language? I am using Google Translate API, but it giving me below exception. java.lang.Exception: [google-api-translate-java] Error retrieving translation. at com.google.api.GoogleAPI.retrieveJSON(GoogleAPI.java:123) at com.google.api.translate.Translate.execute(Translate.java:69) at com.nextenders.client.beans.ruleengine.RuleEngineTest.main(RuleEngineTest.java:27) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) null at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source) at com.google.api.GoogleAPI.retrieveJSON(GoogleAPI.java:107) ... 2 more If anybody knows any API for translation, please tell me.

    Read the article

  • How to justify using a scripting language as part of a project

    - by sylvanaar
    I have a specific project in which I want to use either a scripting language + C, or as an alternative a 100% Java solution. The program adapts a legacy system for use with other moderns systems. Basically, I have few choices as to what language I can use. I have C/C++, Java 1.4, and I have also compiled the Lua for this environment. The program does 'screen scraping' and has to deal with alot of strings. That part of the code is highly variable. Most of the developers at my company use C, so - my original design was to write some portions in C, and use Lua for the part that dealt with strings and changed freqently. I was told 'You have to justify your use of the scripting language.' So i reworked my design using 100% Java, and was told - Java wont have enough performance. You should do the whole thing in C. I'm not controlling lasers or doing image processing - just some screen scraping. I still have to provide justification for using anything but C - so what justification can I provide?

    Read the article

  • Defining the context of a word - Python

    - by RadiantHex
    Hi folks, I think this is an interesting question, at least for me. I have a list of words, let's say: photo, free, search, image, css3, css, tutorials, webdesign, tutorial, google, china, censorship, politics, internet and I have a list of contexts: Programming World news Technology Web Design I need to try and match words with the appropriate context/contexts if possible. Maybe discovering word relationships in some way. Any ideas? Help would be much appreciated!

    Read the article

  • translate by replacing words inside existing text

    - by Berry Tsakala
    What are common approaches for translating certain words (or expressions) inside a given text, when the text must be reconstructed (with punctuations and everythin.) ? The translation comes from a lookup table, and covers words, collocations, and emoticons like L33t, CUL8R, :-), etc. Simple string search-and-replace is not enough since it can replace part of longer words (cat dog ? caterpillar dogerpillar). Assume the following input: s = "dogbert, started a dilbert dilbertion proces cat-bert :-)" after translation, i should receive something like: result = "anna, started a george dilbertion process cat-bert smiley" I can't simply tokenize, since i loose punctuations and word positions. Regular expressions, works for normal words, but don't catch special expressions like the smiley :-) but it does . re.sub(r'\bword\b','translation',s) ==> translation re.sub(r'\b:-\)\b','smiley',s) ==> :-) for now i'm using the above mentioned regex, and simple replace for the non-alphanumeric words, but it's far from being bulletproof. (p.s. i'm using python)

    Read the article

  • Use of (non) qualified names

    - by AProgrammer
    If I want to use the name baz defined in package foo|bar|quz, I've several choices: provide fbq as a short name for foo|bar|quz and use fbq|baz use foo|bar|quz|baz import baz from foo|bar|quz|baz and then use baz (or an alias given in the import process) import all public symbols from foo|bar|quz|baz and then use baz For the languages I know, my perception is that the best practice is to use the first two ways (I'll use one or the other depending on the specific package full name and the number of symbols I need from it). I'd use the third only in a language which doesn't provide the first and hunt for supporting tools to write the import statements. And in my opinion the fourth should be reserved to package designed with than import in mind, for instance if all exported symbols start with a prefix or contains the name of the package. My questions: what is in your opinion the best practice for your favorite languages? what would you suggest in a new language? what would you suggest in an old language adding such a feature?

    Read the article

  • Factorial Algorithms in different languages

    - by Brad Gilbert
    I want to see all the different ways you can come up with, for a factorial subroutine, or program. The hope is that anyone can come here and see if they might want to learn a new language. Ideas: Procedural Functional Object Oriented One liners Obfuscated Oddball Bad Code Polyglot Basically I want to see an example, of different ways of writing an algorithm, and what they would look like in different languages. Please limit it to one example per entry. I will allow you to have more than one example per answer, if you are trying to highlight a specific style, language, or just a well thought out idea that lends itself to being in one post. The only real requirement is it must find the factorial of a given argument, in all languages represented. Be Creative! Recommended Guideline: # Language Name: Optional Style type - Optional bullet points Code Goes Here Other informational text goes here I will ocasionally go along and edit any answer that does not have decent formatting.

    Read the article

  • locale: What is the LANGUAGE variable used for? (and when?)

    - by seya
    I am trying to understand the locales used in Linux. On my Ubuntu 11.10 system locale puts out the following: LANG=en_DK.UTF-8 LANGUAGE=en_GB:en LC_CTYPE=en_GB.UTF-8 LC_NUMERIC="en_DK.UTF-8" LC_TIME="en_DK.UTF-8" LC_COLLATE=en_GB.UTF-8 LC_MONETARY="en_DK.UTF-8" LC_MESSAGES=en_GB.UTF-8 LC_PAPER="en_DK.UTF-8" LC_NAME="en_DK.UTF-8" LC_ADDRESS="en_DK.UTF-8" LC_TELEPHONE="en_DK.UTF-8" LC_MEASUREMENT="en_DK.UTF-8" LC_IDENTIFICATION="en_DK.UTF-8" LC_ALL= (en_dk is for using international day format, continental European number formatting (1.234,56) etc.) I think I understand what the LC_* family does, that LANG is the fallback if one of them is not set and that LC_ALL sets all of the LC_* variables to its value. What I don't know yet, is what LANGUAGE is used for. The notation en_GB:en reminds me of the Accept-Language HTTP header. With the settings above it would mean, British English is used, if a translation for it exists. Otherwise any existing English translation (en_US, en_AU, ..., whatever) would be used. Am I right so far? Also what programs actually obey the LANGUAGE setting? In how far is it different from LC_MESSAGES? Unfortunately, man locale only documents the LC_* family. And searching the web for 'linux locale LANGUAGE' or similar is a mute point. (Of course language is a word often used when talking about locales, and it may also be shown just in the output of locale without being discussed). Does anybody of you can help me out there?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >