Search Results

Search found 12688 results on 508 pages for 'swift language'.

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

  • 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

  • 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

  • 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

  • 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

  • Help me validate these points regarding Ruby

    - by Bragaadeesh
    Hi, I have started learning Ruby for the past 2,3 weeks and I have come up with some findings on the language. Can someone please validate these points. Implemented in many other high level languages such as C, Java, .Net etc., Is slow for the obvious reason that it cannot beat any of the already known high level languages. Should never be compared with any other high level language. Not suitable for large applications. Completely open source and is in a budding state. Has a framework called Rails which claims that it would be good for Agile development Community out there is getting better day by day and finding help immediately should not be a problem as time goes by. Has significant changes between releases which many developers wont welcome right away. Running time cannot be comprehensively estimated since the language has several underlying implementation in several languages. Books are always outdated by the time when you finish them. Thanks.

    Read the article

  • Help me vaildate these points regarding Ruby

    - by Bragaadeesh
    Hi, I have started learning Ruby for the past 2,3 weeks and I have come up with some findings on the language. Can someone please validate these points. Implemented in many other high level languages such as C, Java, .Net etc., Is slow for the obvious reason that it cannot beat any of the already known high level languages. Should never be compared with any other high level language. Not suitable for large applications. Completely open source and is in a budding state. Has a framework called Rails which claims that it would be good for Agile development Community out there is getting better day by day and finding help immediately should not be a problem as time goes by. Has significant changes between releases which many developers wont welcome right away. Running time cannot be comprehensively estimated since the language has several underlying implementation in several languages. Books are always outdated by the time when you finish them. Thanks.

    Read the article

  • Application hangs after changing language From “En-Us” to any global language in control panel

    - by user1764824
    I created a WinForms application using C#. When I try to change the culture info, my application gets hanged. Microsoft.Win32.SystemEvents.UserPreferenceChanged += new Microsoft.Win32.UserPreferenceChangedEventHandler(SystemEvents_UserPreferenceChanged); void SystemEvents_UserPreferenceChanged(object sender, Microsoft.Win32.UserPreferenceChangedEventArgs e) { if (!PreviousInstance()) { CultureInfo ObjCulture = new CultureInfo(CultureInfo.InvariantCulture.IetfLanguageTag, false); Thread.CurrentThread.CurrentCulture = ObjCulture; Application.CurrentCulture = ObjCulture; } } public void INIT() { CultureInfo objCultureInfo = null; try { objCultureInfo = new CultureInfo("en-US", false); objCultureInfo.NumberFormat.NumberDecimalSeparator = "."; objCultureInfo.NumberFormat.NegativeSign = "-"; objCultureInfo.NumberFormat.NumberNegativePattern = 1; //1 stands for -100. Application.CurrentCulture = objCultureInfo; } } After Changing Language ... My Application gets Hanged and i cant Debug anything When i Try to Evaluate things This Event Called only once.. But if try in a small application it comes every time when Language is changed... ... Nothing shown in Eventviewer either. How can I solve this problem? ..

    Read the article

  • Word list sources

    - by warren
    I am looking for a source of nouns, adverbs, adjectives, and verbs in several languages. I'd like the lists to already be split apart, and not have to go through the OED (and non-English equivalents) by hand re-creating said lists. I don't really care about definitions, and I understand some words can be multiple parts of speech - that's fine - words like "many" could be a noun or adjective, and can appear in both lists. Does anyone here know of such a source? If not, might someone be able to point me in the right direction?

    Read the article

  • What defines a language as a scripting language? [closed]

    - by Mathew Foscarini
    Possible Duplicate: What is the main difference between Scripting Languages and Programming Languages? I'd like to know what defines a language as a scripting language compared against other programming languages. Some possible scripting languages might include AutoCad LISP, Linux Bash, DOS Batch, Javascript or ActionScript in Flash. Where is the distinction made that makes a language a scripting language? Are there a set of clearly define rules to classify it as such?

    Read the article

  • Finding a new programming language for web development?

    - by Xeoncross
    I'm wondering if there are any un-biased resources that give good, specific overviews of programming languages and their intended goals. I would like to learn a new language, but visiting the sites of each language isn't working. Each one talks about how great it is without much mention of it's weaknesses or specific goals. Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. Python is a programming language that lets you work more quickly and integrate your systems more effectively. Having been a PHP developer for years, Vic Cherubini sums up my plight well: I knew PHP well, had my own framework, and could work quickly to get something up and running. I programmed like this throughout the MVC revolution. I got better and better jobs (read: better paying, better title) as a PHP developer, but all along the way realizing that the code I wrote on my own time was great, and the code I worked with at work was horrible. Like, worse than horrible. Atrocious. OS Commerce level bad. Having side projects kept me sane, because the code I worked with at work made me miserable. This is why I'm retiring from PHP for my side projects and new programming ventures. I'm spent with PHP. Exhausted, if you will. I've reached a level where I think I'm at the top with it as a language and if I don't move on to a new language soon, I'll be done completely with programming and I do not want that. Languages I've looked at include JavaScript (for node.js), Ruby, Python, & Erlang. I've even thought about Scala or C++. The problem is figuring out which ones are built to handle my needs the best. So where can I go to skip the hype and get real information about the maturity of a platform, the size of the community, and the strengths & weaknesses of that language. If I know these then picking a language to continue my web development should be easy.

    Read the article

  • Making a language switch main menu button in Drupal

    - by Let_Me_Be
    I have a bilingual site in Drupal. The problem is that I hate the language switch block taking up so much space (sometimes the only thing in the sidebar is the language switch block). So what I would love to have is language switch menu item, that would point to the other language (other then the current one). Something like this: | Home | Projects | BlaBla | | Cesky | after swith: | Domu | Projekty | Blabla | | English | Is that possible without writing a whole new module?

    Read the article

  • Dealing with Fanboys

    - by jozefg
    We've all probably met someone like this, that developer who just knows that his language is the one true language and won't shut up about it. How do you deal like someone like this? I don't want to offend anyone (especially since the fanboy in my workplace is the senior developer). But I want to be able to use my own choice of scripting language when I have to write a throwaway script that never makes it to the repository and no one else need know existed. Thoughts that I had to dealing with this: Laugh it off - "Haha yeah maybe language X is a bit easier, I guess I'm a masochist!" Go with it - I'd really prefer to avoid this as I can't afford the drop in productivity associated with picking up a new language. Hide my language - Become a closet programmer and hide my monitor whenever I'm scripting or automating something. What would you suggest for this situation?

    Read the article

  • Language Design: Combining Gotos and Functions

    - by sub
    I'm designing and currently rethinking a low-level interpreted programming language with similarities to assembler. I very soon came across the functions/loops/gotos decision problem and thought that while loops like while and for would be too high-level and unfitting, gotos would be too low level, unmaintainable and generally evil again. Functions like you know them from most languages that have return values and arguments aren't fitting in the language's concept either. So I tried to figure out something between a function and a goto which is capable of Recursion Efficient loops After some thinking I came up with the idea of subroutines: They have a beginning and an end like a function They have a name but no arguments like a goto You can go into one with jump and go out of it again before its end with return (doesn't give back any result, only stops the subroutine) Handled just like normal code - Global scope like goto So I wanted to know: Is the idea above good? What are the (dis)advantages? Would there be a better combination of function and goto or even a completely new idea?

    Read the article

  • Programming Constructs History

    - by kunjaan
    I need some help in figuring out which language introduced the constructs that we use everyday. For example: Constructs Introduced from LISP If-Else Block :"The ubiquitous if-then-else structure, now taken for granted as an essential element of any programming language, was invented by McCarthy for use in Lisp, where it saw its first appearance in a more general form (the cond structure). It was inherited by Algol, which popularized it. " - WikiPedia Function Type : Functions as first class citizens. Garbage Collection

    Read the article

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