Search Results

Search found 14591 results on 584 pages for 'scripting language'.

Page 83/584 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • C++: Conceptual problem in designing an intepreter

    - by sub
    I'm programming an interpreter for an experimental programming language (educational, fun,...) So far, everything went well (Tokenizer & Parser), but I'm getting a huge problem with some of the data structures in the part that actually runs the tokenized and parsed code. My programming language basically has only two types, int and string, and they are represented as C++ strings (std class) and ints Here is a short version of the data structure that I use to pass values around: enum DataType { Null, Int, String } class Symbol { public: string identifier; DataType type; string stringValue; int intValue; } I can't use union because string doesn't allow me to. This structure above is beginning to give me a headache. I have to scatter code like this everywhere in order to make it work, it is beginning to grow unmaintainable: if( mySymbol.type == Int ) { mySymbol.intValue = 1234; } else { mySymbol.stringValue = "abcde"; } I use the Symbol data structure for variables, return values for functions and general representation of values in the programming language. Is there any better way to solve this? I hope so!

    Read the article

  • How to delay putting process in background until after it is ready to serve, in shell

    - by Jakub Narebski
    I have two processes: a server that should be run in background, but starts serving requests after a delay, and a client that should be started when server is ready. The server prints line containg "Acceptin connections" to its stderr when ready (server stderr is redirected to a file when running it in background). How to delay putting server process in background until server is ready to serve requests? Alternatively, how to delay running client until server is ready? Language: shell script (or optionally Perl).

    Read the article

  • Why doesn't my form post when I disable the submit button to prevent double clicking?

    - by John MacIntyre
    Like every other web developer on the planet, I have an issue with users double clicking the submit button on my forms. My understanding is that the conventional way to handle this issue, is to disable the button immediately after the first click, however when I do this, it doesn't post. I did do some research on this, god knows there's enough information, but other questions like Disable button on form submission, disabling the button appears to work. The original poster of Disable button after submit appears to have had the same problem as me, but there is no mention on how/if he resolved it. Here's some code on how to repeat it (tested in IE8 Beta2, but had same problem in IE7) My aspx code <%@ Page Language="C#" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <script language="javascript" type="text/javascript"> function btn_onClick() { var chk = document.getElementById("chk"); if(chk.checked) { var btn = document.getElementById("btn"); btn.disabled = true; } } </script> <body> <form id="form1" runat="server"> <asp:Literal ID="lit" Text="--:--:--" runat="server" /> <br /> <asp:Button ID="btn" Text="Submit" runat="server" /> <br /> <input type="checkbox" id="chk" />Disable button on first click </form> </body> </html> My cs code using System; public partial class _Default : System.Web.UI.Page { protected override void OnInit(EventArgs e) { base.OnInit(e); btn.Click += new EventHandler(btn_Click); btn.OnClientClick = "btn_onClick();"; } void btn_Click(object sender, EventArgs e) { lit.Text = DateTime.Now.ToString("HH:mm:ss"); } } Notice that when you click the button, a postback occurs, and the time is updated. But when you check the check box, the next time you click the button, the button is disabled (as expected), but never does the postback. WHAT THE HECK AM I MISSING HERE??? Thanks in advance.

    Read the article

  • How did Perl gain a reputation for being a write-only language?

    - by Andrew Grimm
    How did Perl gain a reputation (deserved, undeserved, or used to be deserved, no longer so) of being a "write only language"? Was it The syntax of the language Specific features that were available in the language Specific features not being available in the language (or at least old versions of it) The kind of tasks Perl was being used for The kind of people who use Perl (people who aren't full-time programmers) Criticism from people committed to another language Something else? Background: I'd like to know if some aspects that gave Perl the reputation of being write-only also apply to other languages (specifically ruby). Disclaimer: I recognise that Perl doesn't force people to do write-only code (can any language?), and that you can write bad code in any language.

    Read the article

  • how to write a script that logs into an application and checks a page

    - by josh
    Is it possible to write a script that will login to an application using uname/pwd? the username/password are not passed in through POST (they dont come in the URL) Basic steps I am looking for are: Visit url enter uname/pwd click a button click a link get the raw html to make sure it does not have 500 error Is that possible to do in any language? Please point me to some examples as well

    Read the article

  • Is there any way to run Python on Android ?

    - by e-satis
    I like the Android platform. Actually, with some friends, we even participate to the ADC with the Spoxt project. But Java is not my favourite language at all. We are working on a S60 version and this platform has a nice Python API. Of course there is nothing official about Python on Android, but since Jython exists, does anybody know a way to let the snake and the robot work together ?

    Read the article

  • how to give language option at installation time of my .net project?

    - by Ashwin
    I created one desktop project in c#. i want to know about how it could be use for different languages. i created resx file for all the forms like that: select particular form goes to the property window set localiztion true select language in which i want to show in particular language. convert all labels text and other functionality in selected language and build it. after building one another resx file created other than default resx. This process is did for all the form. so now each form having to resx file first is hi.resx for hindi and another is default resx. now my qus is that : how to give language selection option at installation time. and when user choose any language then my application is converted in that language that means particular language resx file set life time whenever user uninstall that application.

    Read the article

  • writing a scrip in java

    - by giri
    Hi I am working with telecom company.I am familiar with java programming language.But now I have a task to write a script , with linux operating systems.I have to write a script for fetching data from other computer and check some conditions. How can I do that using Java. Plz help me. Thanks.

    Read the article

  • Did you ever switch from one programming language to another?

    - by Johan Pelgrim
    The stereotypical programmer is very keen on writing software in one particular programming language and is very fanatic about defending their programming language in any way they can, without being realistic about whether their programming language is the best tool for the job. The other kind of programmer can take a step back and switch between languages (or is not very concerned about doing everything in just one language), is a "jack-of-all-trades", and doesn't mind learning a new language as long as it solves their problem in a good fashion. Did you ever switch from one programming language to another? If yes, why? [P.S. Please don't just answer with "I switched from language A to B because company X sucks! I think it will be very useful to understand why people switch between languages, or what's the best tool for a particular kind of job]

    Read the article

  • Python vs Groovy vs Ruby? (based on criteria listed in question)

    - by Prembo
    Considering the criteria listed below, which of Python, Groovy or Ruby would you use? Criteria (Importance out of 10, 10 being most important) Richness of API/libraries available (eg. maths, plotting, networking) (9) Ability to embed in desktop (java/c++) applications (8) Ease of deployment (8) Ability to interface with DLLs/Shared Libraries (7) Ability to generate GUIs (7) Community/User support (6) Portability (6) Database manipulation (3) Language/Semantics (2)

    Read the article

  • Writing a script in Java?

    - by giri
    I am working with telecom company. I am familiar with Java programming language. But now I have a task to write a script, with Linux operating systems. I have to write a script for fetching data from other computer and check some conditions. How can I do that using Java?

    Read the article

  • Status of VB6/ Best Desktop Application Language with Native Compliation

    - by Sandeep Jindal
    Hi, I was looking for a Desktop Application Programming Language with one of the biggest constraint: - “ I need to output as native executable”. I explored multiple options: a) Java is not a very good option for desktop programming, but still you can use it. But Java to Exe is a problem. [Only GCJ and Excelsior-Jet provides this][1]. b) .Net platform does not support native compilation. Only very few expensive tools are available which can do the job. c) Python is not an option for native compilation. Right? d) VB6 is the option I am left with. From the above list, if I am correct, VB6 is the only and probably the best option I have. But VB6 itself has issues like: a) It is no more under development since 2003. b) There are questions on support of VB6 IDE with Vista. Thus my questions are: a) From the list of programming language options, do you want to add any more? b) If VB6 is good/best option, looking at its development status, would you suggest using VB6 in this era? Regards Sandeep Jindal

    Read the article

  • Status of VB6/ Best Desktop Application Language with Native Compilation

    - by Sandeep Jindal
    I was looking for a Desktop Application Programming Language with one of the biggest constraint: - “I need to output as native executable”. I explored multiple options: Java is not a very good option for desktop programming, but still you can use it. But Java to Exe is a problem. Only GCJ and Excelsior-Jet provides this. .Net platform does not support native compilation. Only very few expensive tools are available which can do the job. Python is not an option for native compilation. Right? VB6 is the option I am left with. From the above list, if I am correct, VB6 is the only and probably the best option I have. But VB6 itself has issues like: It is no more under development since There are questions on support of VB6 IDE with Vista Thus my questions are: From the list of programming language options, do you want to add any more? If VB6 is good/best option, looking at its development status, would you suggest using VB6 in this era?

    Read the article

  • Questions regarding ordering of catch statements in catch block - compiler specific or language stan

    - by Andy
    I am currently using Visual Studio Express C++ 2008, and have some questions about catch block ordering. Unfortunately, I could not find the answer on the internet so I am posing these questions to the experts. I notice that unless catch (...) is placed at the end of a catch block, the compilation will fail with error C2311. For example, the following would compile: catch (MyException) { } catch (...) { } while the following would not: catch (...) { } catch (MyException) { } a. Could I ask if this is defined in the C++ language standard, or if this is just the Microsoft compiler being strict? b. Do C# and Java have the same rules as well? c. As an aside, I have also tried making a base class and a derived class, and putting the catch statement for the base class before the catch statement for the derived class. This compiled without problems. Are there no language standards guarding against such practice please?

    Read the article

  • Full Text Search in SQL Server 2008 shows wrong display_item for Thai language

    - by ensecoz
    I am working with SQL Server 2008. My task is to investigate the issue where FTS cannot find the right result for Thai. First, I have the table which enables the FTS on the column 'ItemName' which is nvarchar. The Catalog is created with the Thai Language. Note that the Thai language is one of the languages that doesn't separate the word by spaces, so '????' '???' '????' are written like this in a sentence: '???????????' In the table, there are many rows that include the word (????); for example row#1 (ItemName: '???????????') On the webpage, I try to search for '????' but SQL Server cannot find it. So I try to investigate it by trying the following query in SQL Server: select * from sys.dm_fts_parser(N'"???????????"', 1054, 0, 0) ...to see how the words are broken. The first one is the text to be broken. The second parameter is to specify that we're using Thai (WorkBreaker, so on). Here is the result: row#1 (display_item: '????', source_item: '???????????') row#2 (display_item: '????', source_item: '???????????') row#3 (display_item: '??', source_item: '???????????') Notice that the first and second row display the wrong display_item '?' in the '????' isn't even Thai characters. '?' in '????' is not a Thai character either. So the question is where did those alien characters come from? I guess this why I cannot search for '????' because the word breaker is broken and keeping the wrong character in the indexes. Please help!

    Read the article

  • Writing language converter in ANTLR

    - by Stefan
    I'm writing a converter between some dialects of the same programming language. I've found a grammar on the net - it's complex and handles all the cases. Now I'm trying to write the appropriate actions. Most of the input is just going to be rewritten to output. What I need to do is parse function calls, do my magic (rename function, reorder arguments, etc) and write it. I'm using AST as output. When I come across a function call, I build a custom object structure (from classes defined in my target language), call the appropriate function and I have a string that represents the transformed function that I want to get. The problem is, what I'm supposed to do with that string? I'd like to replace the .text attribute of the enclosing rule, but setText() is only available on lexer rules and the rule's .text attribute is read-only. How to solve this problem? program : statement_list { output = $statement_list.text; } ; //... statement : expression_statement // ... ; expression_statement : function_call // ... ; function_call : ID '(' { /* build the object, assign name */ Function function = new Function(); //... } ( arg1 = expression { /* add first parameter */ } ( ',' arg2 = expression { /* add the rest of parameters */ } )* )? ')' { /* convert the function call */ string converted = Tools.Convert(function); // $setText(converted); // doesn't work // $functionCall.text = converted; // doesn't work } ;

    Read the article

  • Full Text Search in MSSQL2008 shows wrong display_item for Thai language

    - by ensecoz
    I am working with MSSQL2008. My task is to investigate the issue where FTS cannot find the right result for Thai. First, I have the table which enables the FTS on the column 'ItemName' which is nvarchar. The Catalog is created with the Thai Language. Note that the Thai language is one of the languages that doesn't separate the word by spaces, so '????' '???' '????' are written like this in a sentence: '???????????' In the table, there are many rows that include the word (????); for example row#1 (ItemName: '???????????') On the webpage, I try to search for '????' but SQLServer cannot find it. So I try to investigate it by trying the following query in SQLServer: select * from sys.dm_fts_parser(N'"???????????"', 1054, 0, 0) ...to see how the words are broken. The first one is the text to be broken. The second parameter is to specify that we're using Thai (WorkBreaker, so on). Here is the result: row#1 (display_item: '????', source_item: '???????????') row#2 (display_item: '????', source_item: '???????????') row#3 (display_item: '??', source_item: '???????????') Notice that the first and second row display the wrong display_item '?' in the '????' isn't even Thai characters. '?' in '????' is not a Thai character either. So the question is where did those alien characters come from? I guess this why I cannot search for '????' because the word breaker is broken and keeping the wrong character in the indexes. Please help!

    Read the article

  • Translating PHP language file

    - by Cudos
    Hello. I have a language file like this: <?php $lng_imagepath = "images/"; $lng_imageext = "gif"; $lng_characset = "iso-8859-1"; $lng_prefix = "en_"; $lng_tabhome = "Home"; $lng_tabmyavenue = "My Profile"; $lng_tabregister = "Register"; $lng_tabhelp = "Help"; $lng_tabbuybids = "Buy Bids"; ?> When I convert into a .html file and run Google translate it looks like this: Glemt brugernavn eller adgangskode? "; $ lng_invaliddata =" Ugyldig brugernavn og password. "$ lng_accountsuspend =" Din konto er suspenderet af vindetbud.dk. "$ lng_accountdelete =" Din konto er blevet slettet af vindetbud.dk. "$ lng_enterdata = "Angiv brugernavn og adgangskode." $ lng_enterpassword = "Angiv adgangskoden." / / slut login side variabel / / Language variabler for registrering side $ lng_frregistration = "Gratis registrering"; $ lng_vouchermessage = "voucher, indløses mod første auktion du vinder "; $ lng_amazingproducts =" Chancen for at vinde fantastiske produkter til fantastiske priser "; $ lng_registrationdata =" Du kan tilmelde med vindetbud.dk, bedes du udfylde følgende "; $ lng_personalinfo =" Personlige oplysninger "; $ lng_firstname =" Første Name "; $ lng_lastname =" Efternavn "; $ lng_birthdate =" Fødselsdato "; Do you have any clever ideas how to translate the file? P.S. I know that grammar won't be perfect, but it would help alot to use google translate.

    Read the article

  • Yahoo Query Language Problem

    - by Damiano
    Hello everybody! Today, I've started with Yahoo Query Language. I would use it to retrive stocks details, so I'm talking about Yahoo Finance. I think there is a bug on this language. This is my query: select * from yahoo.finance.quoteslist where symbol='@^GSPC' I ALWAYS get 51 results! it's impossible, take a look at: http://it.finance.yahoo.com/q/cp?s=^GSPC There are 500 results! I also tried some paging parameters. select * from yahoo.finance.quoteslist(50,30) where symbol='@^GSPC' (to get from 50 to 80) select * from yahoo.finance.quoteslist(100) where symbol='@^GSPC' (to get the first 100 results) select * from yahoo.finance.quoteslist where symbol='@^GSPC' limit 30 offset 50 but ALWAYS the last stock is: <quote symbol="BBY"> <Symbol>BBY</Symbol> <LastTradePriceOnly>41.03</LastTradePriceOnly> <LastTradeDate>5/7/2010</LastTradeDate> <LastTradeTime>4:00pm</LastTradeTime> <Change>-0.48</Change> <Open>41.35</Open> <DaysHigh>42.35</DaysHigh> <DaysLow>39.60</DaysLow> <Volume>14129531</Volume> </quote> Why do I have this kind of problem? Thank you so much for your support! (P.S. I've tested it on Yahoo YQL console)

    Read the article

  • YAHOO QUERY LANGUAGE BUG!

    - by Damiano
    Hello everybody! Today, I've started with Yahoo Query Language. I would use it to retrive stocks details, so I'm talking about Yahoo Finance. I think there is a bug on this language. This is my query: select * from yahoo.finance.quoteslist where symbol='@^GSPC' I ALWAYS get 51 results! it's impossible, take a look at: http://it.finance.yahoo.com/q/cp?s=^GSPC There are 500 results! I also tried some paging parameters. select * from yahoo.finance.quoteslist(50,30) where symbol='@^GSPC' (to get from 50 to 80) select * from yahoo.finance.quoteslist(100) where symbol='@^GSPC' (to get the first 100 results) select * from yahoo.finance.quoteslist where symbol='@^GSPC' limit 30 offset 50 but ALWAYS the last stock is: <quote symbol="BBY"> <Symbol>BBY</Symbol> <LastTradePriceOnly>41.03</LastTradePriceOnly> <LastTradeDate>5/7/2010</LastTradeDate> <LastTradeTime>4:00pm</LastTradeTime> <Change>-0.48</Change> <Open>41.35</Open> <DaysHigh>42.35</DaysHigh> <DaysLow>39.60</DaysLow> <Volume>14129531</Volume> </quote> Why do I have this kind of problem? Thank you so much for your support! (P.S. I've tested it on Yahoo YQL console)

    Read the article

  • Meta tag depending of selected language and title

    - by lena
    Hi, I'm aware about Google ignore most of the time, meta tag and use content. (This is not the point here) I'm working on an existing web site, not created by me. I need a quick solution, I guess with variables. The website construction: (no known template system) index.html which is presentation page with language selection index.php which embeding menu, content, footer several content pages that are embedded by index.php What I need to do only for those 2 pages welcome_en.html and welcome_fr.html (these pages are embedded so no header possible on these page) to have different page title (browser title) and different META tag. Any solution is welcome Thanks extra information Language detection on index.php: <?php $lang = $_GET['lang']; $page = $_GET['page']; if ($_GET['page'] == "" || !$_GET['page']) { $page = "welcome"; } if ($_GET['lang'] == "" || !$_GET['lang']) { $lang = "_fr"; } ? <td><img src="images/ban02<?php echo "$lang" ?>.jpg" width="531" height="60" <?php if ($_GET['lang'] == "_fr" || $_GET['lang'] == "" || !$_GET['lang']) { echo "alt='text'";} else if ($_GET['lang'] == "_en") {echo "alt='text'"; } ?>></td> for the embeded menu, footer ect like this one <?php include "menu.php"; ?> for the embedded content <?php //echo "$page$lang.html"; $lang = preg_replace('/[^a-z0-9_ ]/i', '', $_GET['lang']); $page = preg_replace('/[^a-z0-9_ ]/i', '', $_GET['page']); include $page . $lang . ".html"; ?>

    Read the article

  • Searching Natural Language Sentence Structure

    - by Cerin
    What's the best way to store and search a database of natural language sentence structure trees? Using OpenNLP's English Treebank Parser, I can get fairly reliable sentence structure parsings for arbitrary sentences. What I'd like to do is create a tool that can extract all the doc strings from my source code, generate these trees for all sentences in the doc strings, store these trees and their associated function name in a database, and then allow a user to search the database using natural language queries. So, given the sentence "This uploads files to a remote machine." for the function upload_files(), I'd have the tree: (TOP (S (NP (DT This)) (VP (VBZ uploads) (NP (NNS files)) (PP (TO to) (NP (DT a) (JJ remote) (NN machine)))) (. .))) If someone entered the query "How can I upload files?", equating to the tree: (TOP (SBARQ (WHADVP (WRB How)) (SQ (MD can) (NP (PRP I)) (VP (VB upload) (NP (NNS files)))) (. ?))) how would I store and query these trees in a SQL database? I've written a simple proof-of-concept script that can perform this search using a mix of regular expressions and network graph parsing, but I'm not sure how I'd implement this in a scalable way. And yes, I realize my example would be trivial to retrieve using a simple keyword search. The idea I'm trying to test is how I might take advantage of grammatical structure, so I can weed-out entries with similar keywords, but a different sentence structure. For example, with the above query, I wouldn't want to retrieve the entry associated with the sentence "Checks a remote machine to find a user that uploads files." which has similar keywords, but is obviously describing a completely different behavior.

    Read the article

  • SASS mixin for swapping images / floats on site language (change)

    - by DBUK
    Currently using SASS on a website build. It is my first project using it, tried a little LESS before and liked it. I made a few basic mixins and variables with LESS, super useful stuff! I am trying to get my head around SASS mixins, and syntax, specifically for swapping images when the page changes to a different language, be that with body ID changing or <html lang="en">. And, swapping floats around if, for example, a website changed to chinese. So a mixin where float left is float left unless language is AR and then it becomes float right. With LESS I think it would be something like: .headerBg() when (@lang = en) {background-image:url(../img/hello.png);} .headerBg() when (@lang = it) {background-image:url(../img/ciao.png);} .header {.headerBg(); width: 200px; height:100px} .floatleft() when (@lang = en) { float: left;} .floatleft() when (@lang = ar) { float: right;} .logo {.floatleft();} Its the syntax I am having problems with combined with a brain melting day.

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >