Search Results

Search found 7380 results on 296 pages for 'scripting languages'.

Page 51/296 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • Is the a pattern for iterating over lists held by a class (dynamicly typed OO languages)

    - by Roman A. Taycher
    If I have a class that holds one or several lists is it better to allow other classes to fetch those lists(with a getter) or to implement a doXList/eachXList type method for that list that take a function and call that function on each element of the list contained by that object. I wrote a program that did a ton of this and I hated passing around all these lists sometimes with method in class a calling method in class B to return lists contained in class C, B contains a C or multiple C's (note question is about dynamically typed OO languages languages like ruby or smalltalk) ex. (that came up in my program) on a Person class containing scheduling preferences and a scheduler class needing to access them.

    Read the article

  • Protobuf compiler for several languages

    - by Stipa
    Hi, In my project I have components written on Python, ObjectiveC and J2ME. I want to use protobuf as data interchange format. However, there are one issue I need to resolve. Google implementation doesn't support ObjC and J2ME. There are 3rd party implementations that supports those languages. But I really don't want to be depended of several protoc implementations. What is the best way for me to have protobufs for several languages? Do I need to use different compilers or there is other option? Thanks, -Lev

    Read the article

  • What are modern and old compilers written in?

    - by ulum
    As a compiler, other than an interpreter, only needs to translate the input and not run it the performance of itself should be not that problematic as with an interpreter. Therefore, you wouldn't write an interpreter in, let's say Ruby or PHP because it would be far too slow. However, what about compilers? If you would write a compiler in a scripting language maybe even featuring rapid development you could possibly cut the source code and initial development time by halv, at least I think so. To be sure: With scripting language I mean interpreted languages having typical features that make programming faster, easier and more enjoyable for the programmer, usually at least. Examples: PHP, Ruby, Python, maybe JavaScript though that may be an odd choice for a compiler What are compilers normally written in? As I suppose you will respond with something low-level like C, C++ or even Assembler, why? Are there compilers written in scripting languages? What are the (dis)advantages of using low or high level programming languages for compiler writing?

    Read the article

  • Avoiding Mixup of Language Details

    - by DarenW
    Today someone asked me what was wrong with their source code. It was obvious. "Use double equals in place of that single equal in that if statement. Um, i think..." As i remember some languages actually take a single equals for comparison. Since i sometimes forget or mix up the syntax details among the several languages i use, i stepped over to my laptop to try a quickie experiment... It costs a bit of time and is a break in the flow to try "quick" experiments (though maybe the practice is good for memory.) What tips do you have for keeping straight in your mind the syntax (and other) details of multiple languages? (And nowadays, this applies just as well to the many wiki-like markups!)

    Read the article

  • What are the best uses for each programming language?

    - by VirtuosiMedia
    I come from a web developer background, so I'm fairly familiar with PHP and JavaScript, but I'd eventually like to branch out into other languages. At this point, I don't have a particular direction or platform that I'm leaning toward as far as learning a new language or what I would use it for, but I would like to learn a little bit more about programming languages in general and what each one is used for. I've often heard (and I agree) that you should use the right tool for the job, so what jobs are each programming language best suited for? Edit: If you've worked with some of the newer or more obscure languages, please share for those as well.

    Read the article

  • Visual Studio 2010 Language Support

    - by inspectorG4dget
    Hello SO, I want to be able to develop code using Visual Studio 2010. I just got VS2010 and I'm not able to get the languages I want on it. The main reason that I'm asking this is that I'm trying to migrate to ONE IDE that does it all for me. Thus far eclipse has been doing a good job, but I've been informed that VS2010 is better and I'm trying to get into the groove of that standard So my question is two-fold. I am not able to find a complete list of languages supported by VS2010. What are these languages? How can I get VS2010 support for: a. Python/IronPython b. C/C++/C#/XNA c. Java My Googling has given me no promising/definitive results. I'd really appreciate any help.

    Read the article

  • How to make an application scriptable in Linux

    - by arx
    I've written an application in C++ that takes a complex binary file format and translates it into human-readable text. Having edited the text you can recompile it back into the binary file format. This would be more useful if the application's internal object model was scriptable. On Windows I'd expose the objects using COM or .Net but I want this to work on Linux. I could embed a scripting language but that's a fair bit of work, and limits users to the scripting language I choose. Ideally, I'm looking for some way of exposing a scriptable DOM from my application that is: Widely support in scripting languages (without writing language-specific wrappers) Cross-platform (but Linux support is most important) In-process (but this isn't essential)

    Read the article

  • Bash Shell Scripting Errors: ./myDemo: 56: Syntax error: Unterminated quoted string [EDITED]

    - by ???
    Could someone take a look at this code and find out what's wrong with it? #!/bin/sh while : do echo " Select one of the following options:" echo " d or D) Display today's date and time" echo " l or L) List the contents of the present working directory" echo " w or W) See who is logged in" echo " p or P) Print the present working directory" echo " a or A) List the contents of a specified directory" echo " b or B) Create a backup copy of an ordinary file" echo " q or Q) Quit this program" echo " Enter your option and hit <Enter>: \c" read option case "$option" in d|D) date ;; l|L) ls $PWD ;; w|w) who ;; p|P) pwd ;; a|A) echo "Please specify the directory and hit <Enter>: \c" read directory if [ "$directory = "q" -o "Q" ] then exit 0 fi while [ ! -d "$directory" ] do echo "Usage: "$directory" must be a directory." echo "Re-enter the directory and hit <Enter>: \c" read directory if [ "$directory" = "q" -o "Q" ] then exit 0 fi done printf ls "$directory" ;; b|B) echo "Please specify the ordinary file for backup and hit <Enter>: \c" read file if [ "$file" = "q" -o "Q" ] then exit 0 fi while [ ! -f "$file" ] do echo "Usage: \"$file\" must be an ordinary file." echo "Re-enter the ordinary file for backup and hit <Enter>: \c" read file if [ "$file" = "q" -o "Q" ] then exit 0 fi done cp "$file" "$file.bkup" ;; q|Q) exit 0 ;; esac echo done exit 0 There are some syntax errors that I can't figure out. However I should note that on this unix system echo -e doesn't work (don't ask me why I don't know and I don't have any sort of permissions to change it and even if I wouldn't be allowed to) Bash Shell Scripting Error: "./myDemo ./myDemo: line 62: syntax error near unexpected token done' ./myDemo: line 62: " [Edited] EDIT: I fixed the while statement error, however now when I run the script some things still aren't working correctly. It seems that in the b|B) switch statement cp $file $file.bkup doesn't actually copy the file to file.bkup ? In the a|A) switch statement ls "$directory" doesn't print the directory listing for the user to see ? #!/bin/bash while $TRUE do echo " Select one of the following options:" echo " d or D) Display today's date and time" echo " l or L) List the contents of the present working directory" echo " w or W) See who is logged in" echo " p or P) Print the present working directory" echo " a or A) List the contents of a specified directory" echo " b or B) Create a backup copy of an ordinary file" echo " q or Q) Quit this program" echo " Enter your option and hit <Enter>: \c" read option case "$option" in d|D) date ;; l|L) ls pwd ;; w|w) who ;; p|P) pwd ;; a|A) echo "Please specify the directory and hit <Enter>: \c" read directory if [ ! -d "$directory" ] then while [ ! -d "$directory" ] do echo "Usage: "$directory" must be a directory." echo "Specify the directory and hit <Enter>: \c" read directory if [ "$directory" = "q" -o "Q" ] then exit 0 elif [ -d "$directory" ] then ls "$directory" else continue fi done fi ;; b|B) echo "Specify the ordinary file for backup and hit <Enter>: \c" read file if [ ! -f "$file" ] then while [ ! -f "$file" ] do echo "Usage: "$file" must be an ordinary file." echo "Specify the ordinary file for backup and hit <Enter>: \c" read file if [ "$file" = "q" -o "Q" ] then exit 0 elif [ -f "$file" ] then cp $file $file.bkup fi done fi ;; q|Q) exit 0 ;; esac echo done exit 0 Another thing... is there an editor that I can use to auto-parse code? I.e something similar to NetBeans?

    Read the article

  • CTRL-Space always toggles Chinese IME (Windows 7)

    - by peterchen
    I am running Windows 7 Ultimate (w/ SP1), and have multiple UI languages installed - mainly for screenshots etc. Among them are Chinese (traditional) and Chinese (Simplified), which insist on hooking the CTRL+Space key even though I have disabled / overridden these hotkey assignments under Language Bar settings / Advanced key settings. (It conflicts with CTRL+Space in the Visual Studio IDE, and is pretty annoying beyond that.) Any ideas?

    Read the article

  • What can an effective workflow for changing input methods be on Mac OS X?

    - by Martin Josefsson
    I switch between three languages input methods frequently, sometimes in the same typing session. The default shortcut on a Macintosh seems to be to set keyboard shortcuts for previous/next language (I hit opt-cmd-space to go to previous language) and if you're more than bi-lingual you have to cycle until you find the one for you. The ideal would be something like hitting fn-e for English, fn-j for Japanese and fn-g for German, but anything better than the current state would be a great improvement.

    Read the article

  • Hiding my location to websites with region-specific languages/content

    - by Tudor
    I just went to download Microsoft Secority Essentials and it enraged me as it redirected me to a site in my home language and not the default English. If I go to America, I don't want them to speak Swahili. It reminded me of all the other websites who try to do the same. I don't want my content in greek when I'm on vacation! I for one simply can't work on a computer unless the language is English (or unless there's a VERY good reason to change the language). Location aware content is only good for download mirrors, and even then I would rather pick from a list of countries myself. (or if you can't speak anything but your own language) I know websites get your location from your IP and ISP, but is there any way you can inhibit this behaviour on a browser level? Is there any Chrome/Firefox extension for it? Do I really have no choice but to hide my IP? There's all sorts of services that claim they're hiding your IP for free so that people can't log and trace your steps through the internet, but they're probably logging it themselves and making money off it. Why else would they be free? I've found that Firefox has an Option that says "Choose your preferred language when displaying pages". Haven't found anything for Chrome.

    Read the article

  • How to stop windows from adding additional keyboards to languages

    - by MMavipc
    I have the English language setup with the normal en-us layout, and only this layout. I have the Spanish language setup with united states - international layout. When I switch to English it gives me the option to select the regular keyboard or the international version. Only the regular version is listed under EN in my language settings. How do I get it to remove the international keyboard from English? Sometimes it switches to international while I'm on English mode and screws up my typing, which is a pain in the ass.

    Read the article

  • Source of parsers for programming languages?

    - by Arkaaito
    I'm dusting off an old project of mine which calculates a number of simple metrics about large software projects. One of the metrics is the length of files/classes/methods. Currently my code "guesses" where class/method boundaries are based on a very crude algorithm (traverse the file, maintaining a "current depth" and adjusting it whenever you encounter unquoted brackets; when you return to the level a class or method began on, consider it exited). However, there are many problems with this procedure, and a "simple" way of detecting when your depth has changed is not always effective. To make this give accurate results, I need to use the canonical way (in each language) of detecting function definitions, class definitions and depth changes. This amounts to writing a simple parser to generate parse trees containing at least these elements for every language I want my project to be applicable to. Obviously parsers have been written for all these languages before, so it seems like I shouldn't have to duplicate that effort (even though writing parsers is fun). Is there some open-source project which collects ready-to-use parser libraries for a bunch of source languages? Or should I just be using ANTLR to make my own from scratch? (Note: I'd be delighted to port the project to another language to make use of a great existing resource, so if you know of one, it doesn't matter what language it's written in.)

    Read the article

  • Theory of formal languages - Automaton

    - by dader51
    Hi everybody ! I'm wondering about formal languages. I have a kind of parser : It reads à xml-like serialized tree structure and turn it into a multidimmensionnal array. I figured out that i need at least three variables to achieve the job : $tree = array(); // a new array $pTree = array(&$tree); // a new array which the first element points to $tree; $deep = 0; plus the one containing the sentence splitted into words. My point is on the similarities between the algorithm deing used and the differents kinds of automatons ( state machines turing machines stack ... ). The $words variable is the "tape" of the automaton, the test/conditions of the algorithm are transitions, $deep is the state and $tree is the output. I cannont figure what is $pTree. So the question is : which is the automaton I implictly use here, and to which formal languages family does it fit ? And what's about recursion ?

    Read the article

  • Switching languages on a website with PHP

    - by jnkrois
    Hello everybody, I'm just looking for some advice. I'm creating a website that offers (at least) 2 languages. The way I'm setting it up is by using XML files for the language, PHP to retrieve the values in the XML nodes. Say you have any XML file, being loaded as follows: <?php $lang = "en"; $xmlFile = simplexml_load_file("$lang/main.xml"); ?> Once the file contents are available, I just output each node into an HTML tag like so: <li><?php echo $xmlFile->navigation->home; ?></li> which in turn is equal to : <li><a href="#">Home</a></li> as a nav bar link. Now, the way in which I'm switching languages is by changing the value of the "$lang" variable, through a "$_POST", like so: if(isset($_POST['es'])){ $lang = "es"; }elseif(isset($_POST['en'])){ $lang = "en"; } The value of the "$lang" variable is reset and the new file is loaded, loading as well all the new nodes from the new XML file, hence changing the language. I'm just wondering if there is another way to reset the "$lang" variable using something else, other than "$_POST" or "$_GET". I don't want to use query string either. I know I could use JavaScript or jQuery to achieve this, but I'd like to make the site not too dependable on JavaScript. I'd appreciate any ideas or advice. Thanks

    Read the article

  • The use of getters and setters for different programming languages [closed]

    - by leonhart88
    So I know there are a lot of questions on getters and setters in general, but I couldn't find something exactly like my question. I was wondering if people change the use of get/set depending on different languages. I started learning with C++ and was taught to use getters and setters. This is what I understand: In C++ (and Java?), a variable can either be public or private, but we cannot have a mix. For example, I can't have a read-only variable that can still be changed inside the class. It's either all public (can read and change it), or all private (can't read and can only change inside the class). Because of this (and possibly other reasons), we use getters and setters. In MATLAB, I can control the "setaccess" and "getaccess" properties of variables, so that I can make things read-only (can directly access the property, but can't overwrite it). In this case, I don't feel like I need a getter because I can just do class.property. Also, in Python it is considered "Pythonic" to not use getters/setters and to only put things into properties if needed. I don't really understand why its OK to have all public variables in Python, because that's opposite of what I learned when I started with C++. I'm just curious what other people's thoughts are on this. Would you use getters and setters for all languages? Would you only use it for C++/Java and do direct access in MATLAB and Python (which is what I am currently doing)? Is the second option considered bad? For my purposes, I am only referring to simple getters and setters (just return/set the value and do not do anything else). Thanks!

    Read the article

  • Python vs all the major professional languages [closed]

    - by Matt
    I've been reading up a lot lately on comparisons between Python and a bunch of the more traditional professional languages - C, C++, Java, etc, mainly trying to find out if its as good as those would be for my own purposes. I can't get this thought out of my head that it isn't good for 'real' programming tasks beyond automation and macros. Anyway, the general idea I got from about two hundred forum threads and blog posts is that for general, non-professional-level progs, scripts, and apps, and as long as it's a single programmer (you) writing it, a given program can be written quicker and more efficiently with Python than it could be with pretty much any other language. But once its big enough to require multiple programmers or more complex than a regular person (read: non-professional) would have any business making, it pretty much becomes instantly inferior to a million other languages. Is this idea more or less accurate? (I'm learning Python for my first language and want to be able to make any small app that I want, but I plan on learning C eventually too, because I want to get into driver writing eventually. So I've been trying to research each ones strengths and weaknesses as much as I can.) Anyway, thanks for any input

    Read the article

  • Why do you like Python?

    - by Arnav
    I have to make a presentation at work to convince everyone why they should try coding in Python. So, I thought of taking a poll here... What is it about Python (features, etc) over other languages that you love? The reason I usually give is that in Python you forget about the complexities and frills of programming languages and can just focus on producing code that works... What do you think?

    Read the article

  • What could be the Java successor Oracle wants to invest in?

    - by deamon
    I've read that Oracle wants to invest into another language than Java: "On the other hand, Oracle has been particularly supportive of alternative JVM languages. Adam Messinger ( http://www.linkedin.com/in/adammessinger ) was pretty blunt at the JVM Languages Summit this year about Java the language reaching it's logical end and how Oracle is looking for a 'higher level' language to 'put significant investment into.'" But what language could be the one Oracle wants to invest in? Is there another candidate than Scala?

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >