Search Results

Search found 15070 results on 603 pages for 'language conversion'.

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

  • Concatenative language inrepreter in Java

    - by Vojislav Stojkovic
    I'm interested in finding a concatenative language interpreter in Java. Ideally, it should satisfy the following conditions: It has an interpreter, not (only) a bytecode compiler for JVM. The language itself has decent documentation, not only a few examples and a "I'll document the rest someday" notice. The project is not completely abandoned. In short, I'm looking for a reasonably "alive" concatenative language that can be embedded into Java easily.

    Read the article

  • SEO Language information

    - by Kevin
    I was wondering if defining your language in HTML is better for search enigines. For example, I've got a French site, then i've got three options: 1.) have faith that google can say my site is french 2.) define language in the HTML tag <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr"> 3.) define language in a meta tag <meta http-equiv="content-language" content="FR-fr" /> Which option you believe is best? Or which combination of options?

    Read the article

  • Google is displaying "Translate this page" based on a previously registered domain inbound links

    - by crnm
    I recently started a new project with a newly registered generic tld domain. As soon as Google started indexing the page, it displayed a "translate this page" in SERP's, which tries to translate the page to the language of a small Eastern European country from the language that the site actually uses. I tried everything to prevent this: language meta headers and attributes, localisation through Google Webmaster Tools...all to no avail - nothing helped. After a couple of weeks I spotted dozens of inbound links popping up in Google Webmaster Tools all coming from that small Eastern European country, from sub-pages that are not active anymore (either sending out 404's or 301's to the main page), and also had been written in that other language. So the domain had been registered before and as it looks, it did got a lot of possibly spam links in that language. I can't even ask the sites where those links should have been to remove them as they are not active anymore physically, just in Google Webmaster Tools and/or internal data masses... Now I'm at a loss about what to do? As my site is pretty new, it does not have many links pointing towards it in my targeted language. So those are probably not enough to convince Google of attaching the right language to it as Google ignores all other signals about the page language. I'm also unsure if I should use the "disavow" tool, or a reconsideration request...or what else to do about this miserable state. I never used these tools before so I don't have any experience with them. Somehow I have to convince Google about the right language of the page and also to not count/apply/whatever all those historical links from the previous owner. (The domain had been deleted without any traces in Google before I registered it) Has anyone here ever dealt with a similar "Translate this page" problem? (I've also looked at this thread: How can I prevent Google mistakenly offering to translate a page? but didn't find a solution there)

    Read the article

  • Picking Core Language For Large Scale Web Platform

    - by ryanzec
    Now I have work with PHP and ASP.NET quite a bit and also played around few other language for web development. I am now at a point where need to start building a backend platform that will have the ability to support a large set of applications and I am trying to figure out which language I want to choose as my core language. When I say core language I mean the language that the majority of the backend code is going to be in. This is not to say that other languages won't be used because my guess is that they will but I want a large majority of the code (90%-98%) to be in 1 language. While I see to benefit of using the language that is best for the job, having 15% in php, 15% in ASP.NET, 5% in perl, 10% in python, 15% in ruby, etc… seems like a very bad idea to me (not to mention integrating everything seamlessly would probably add a bit of overhead). If you were going to be building a large scale web platform that need to support multiple applications from scratch, what would you choose as your core language and why?

    Read the article

  • Units of measurement conversion logic in C#

    - by EvanRyan
    I am adding a feature to my program in which the user will have the ability to change their unit of measurement at any time, and have the program recalculate their input and output. If the user inputs say, 20lbs for an item, then decides he wants to work in kilograms instead, he can select an option to do so at any time, and the program will recalculate his 20lb input to 9Kg. Then if he decides he'd rather work in ounces, it would convert that 9Kg to 320oz, so on and so forth. What would be the most effective and efficient way to go about this? I've been racking my brain trying to figure out a way to have the correct formula be implemented.

    Read the article

  • Letters in base-conversion

    - by tech_geek23
    I have this code written so far and is correct, aside from not using A-F when the value is over 10: public class TenToAny { private int base10; private int newBase; public TenToAny() { } public TenToAny(int ten, int base) { base10 = ten; newBase = base; } public void setNums(int ten, int base) { base10 = ten; newBase = base; } public String getNewNum() { String newNum=""; int orig = base10; //int first = newBase - 1; while(orig > 0) { newNum = orig%newBase + newNum; orig = orig/newBase; } return newNum; } public String toString() { String complete = base10 + " base 10 is " + getNewNum() + " in base " + newBase; return complete; } } Obviously I don't have anything relating to values over 10 converting to A-F as I've never dealt with these before. Any help is appreciated. Here's my runner class: public class Lab09i { public static void main( String args[] ) { TenToAny test = new TenToAny(234, 9); out.println(test); test.setNums(100, 2); out.println(test); test.setNums(10, 2); out.println(test); test.setNums(15, 2); out.println(test); test.setNums(256, 2); out.println(test); test.setNums(100, 8); out.println(test); test.setNums(250, 16); out.println(test); test.setNums(56, 11); out.println(test); test.setNums(89, 5); out.println(test); test.setNums(23, 3); out.println(test); test.setNums(50, 5); out.println(test); test.setNums(55, 6); out.println(test); test.setNums(2500, 6); out.println(test); test.setNums(2500, 13); out.println(test); } } this is what my results should be: 234 base 10 is 280 in base 9 100 base 10 is 1100100 in base 2 10 base 10 is 1010 in base 2 15 base 10 is 1111 in base 2 256 base 10 is 100000000 in base 2 100 base 10 is 144 in base 8 250 base 10 is FA in base 16 56 base 10 is 51 in base 11 89 base 10 is 324 in base 5 23 base 10 is 212 in base 3 50 base 10 is 302 in base 4 55 base 10 is 131 in base 6 2500 base 10 is 9C4 in base 16 2500 base 10 is 11A4 in base 13

    Read the article

  • javascript arrays and type conversion inconsistencies

    - by ForYourOwnGood
    I have been playing with javascript arrays and I have run into, what I feel, are some inconsistencies, I hope someone can explain them for me. Lets start with this: var myArray = [1, 2, 3, 4, 5]; document.write("Length: " + myArray.length + "<br />"); for( var i in myArray){ document.write( "myArray[" + i + "] = " + myArray[i] + "<br />"); } document.write(myArray.join(", ") + "<br /><br />"); Length: 5 myArray[0] = 1 myArray[1] = 2 myArray[2] = 3 myArray[3] = 4 myArray[4] = 5 1, 2, 3, 4, 5 There is nothing special about this code, but I understand that a javascript array is an object, so properities may be add to the array, the way these properities are added to an array seems inconsistent to me. Before continuing, let me note how string values are to be converted to number values in javascript. Nonempty string - Numeric value of string or NaN Empty string - 0 So since a javascript array is an object the following is legal: myArray["someThing"] = "someThing"; myArray[""] = "Empty String"; myArray["4"] = "four"; for( var i in myArray){ document.write( "myArray[" + i + "] = " + myArray[i] + "<br />"); } document.write(myArray.join(", ") + "<br /><br />"); Length: 5 myArray[0] = 1 myArray[1] = 2 myArray[2] = 3 myArray[3] = 4 myArray[4] = four myArray[someThing] = someThing myArray[] = Empty String 1, 2, 3, 4, four The output is unexpected. The non empty string "4" is converted into its numeric value when setting the property myArray["4"], this seems right. However the empty string "" is not converted into its numeric value, 0, it is treated as an empty string. Also the non empty string "something" is not converted to its numeric value, NaN, it is treated as a string. So which is it? is the statement inside myArray[] in numeric or string context? Also, why are the two, non numeric, properities of myArray not included in myArray.length and myArray.join(", ")?

    Read the article

  • Using antlr and the DLR together -- AST conversion

    - by RCIX
    I have an AST generated via ANTLR, and I need to convert it to a DLR-compatible one (Expression Trees). However, it would seem that i can't use tree pattern matchers for this as expression trees need their subtrees at instantiation (which i can't get). What solution would be best for me to use?

    Read the article

  • Streaming and conversion of video from 3rd Parth

    - by Ashish
    Hi, I am working on a App where video has to be displayed.All these video are in .flv format, Is there any mechanism by using that I can convert this video to .mov or .m4v (supported by iphone) on the fly, so that user can view those video on their iphone or ipod. Thanks, Ashish

    Read the article

  • Perl coding to PHP coding conversion

    - by Haskella
    Hi, I am trying to convert some Perl into PHP using this guideline: http://www.cs.wcupa.edu/~rkline/perl2php/#basedir Basically I know next to nothing about these two languages. Please give me some simple English explanation of what each line does, I'll be more than happy. Thanks for reading :D Perl CGI program: #!/usr/bin/perl -T use strict; use warnings; use CGI (); my %fruit_codes = ( apple => '2321.html', banana => '1234.html', coconut => '8889.html', ); my $c = CGI->new; my $fruit_parameter = $c->param('fruit_name'); my $iframe_document; if (defined $fruit_parameter and exists $fruit_codes{$fruit_parameter}) { $iframe_document = $fruit_codes{$fruit_parameter}; } else { $iframe_document = 'sorry-no-such-fruit.html'; } $c->header('application/xhtml+xml'); print <<"END_OF_HTML"; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Fruits</title> </head> <body> <form action="fruits.cgi"> <fieldset> <label for="fruit">Name of the fruit:</label> <input id="fruit" name="fruit_name" type="text" /> <input type="submit" /> </fieldset> </form> <iframe src="$iframe_document"> <a href="$iframe_document">resulting fruit</a> </iframe> </body> </html> END_OF_HTML 1;

    Read the article

  • .NET Type Conversion Issue: Simple but difficult

    - by jaderanderson
    Well, the question is kinda simple. I have a object defined as: public class FullListObject : System.Collections.ArrayList, IPagedCollection And when i try to: IPagedCollection pagedCollection = (IPagedCollection)value; It don't work... value is a FullListObject... this is my new code trying to get around a issue with the "is" operator. When the system tests (value is IPagedCollection) it never gets true for FullListObject. How to cast the object to another object with a interface type?

    Read the article

  • Python, a smarter way of string to integer conversion

    - by Hellnar
    Hello I have written this code to convert string in such format "0(532) 222 22 22" to integer such as 05322222222 . class Phone(): def __init__(self,input): self.phone = input def __str__(self): return self.phone #convert to integer. def to_int(self): return int((self.phone).replace(" ","").replace("(","").replace(")","")) test = Phone("0(532) 222 22 22") print test.to_int() It feels very clumsy to use 3 replace methods to solve this. I am curious if there is a better solution?

    Read the article

  • High-quality PDF to Word conversion in PHP?

    - by cletus
    What's the best way of converting PDF docs to Microsoft Word format in PHP? This can be either as a PHP script or calling a (Linux) executable (with proc_open()). It just needs to be relatively fast and produce quality Word documents (in 97/2000/2003 format). Commercial software is OK.

    Read the article

  • C# To VB.Net Conversion - array of class objects with initialisation

    - by mattryan
    can someone help me pls, im new to vb.net and im trying to work through the nhibernate firstsolkution sample (written in c#) and im struggling to convert this one bit. ive tried numerous convertors; telerik, developerfusion and a several others but none of the code produced will compile and i cant see the why... private readonly Product[] _products = new[] { new Product {Name = "Melon", Category = "Fruits"}, new Product {Name = "Pear", Category = "Fruits"}, new Product {Name = "Milk", Category = "Beverages"}, new Product {Name = "Coca Cola", Category = "Beverages"}, new Product {Name = "Pepsi Cola", Category = "Beverages"}, }; developer fusion gives Private ReadOnly _products As Product() = New () {New Product(), New Product(), New Product(), New Product(), New Product()} telerik gives Private ReadOnly _products As Product() = New () {New Product() With { _ .Name = "Melon", _ .Category = "Fruits" _ }, New Product() With { _ .Name = "Pear", _ .Category = "Fruits" _ }, New Product() With { _ .Name = "Milk", _ .Category = "Beverages" _ }, Nw Product() With { _ .Name = "Coca Cola", _ .Category = "Beverages" _ }, New Product() With { _ .Name = "Pepsi Cola", _ .Category = "Beverages" _ }} which seems the most useful except it complains about a type expected here "New () {..." ive tried various things just cant figure it out... what am i missing? am i just being dumb? or isnt there and equivilent? Cheers all

    Read the article

  • convert string to float without silent NaN/Inf conversion

    - by Peter Hansen
    I'd like convert strings to floats using Python 2.6 and later, but without silently converting things like 'NaN' and 'Inf'. Before 2.6, float("NaN") would raise a ValueError. Now it returns a float for which math.isnan() returns True, which is not useful behaviour for my application. Here's what I've got at the moment: import math def get_floats(source): for text in source.split(): try: val = float(text) if math.isnan(val) or math.isinf(val): raise ValueError yield val except ValueError: pass This is a generator, which I can supply with strings containing whitespace-separated sequences representing real numbers. I'd like it to yield only those fields which are purely numeric representations of floats, as in "1.23" or "-34e6", but not for example "NaN" or "-Inf". Test case: assert list(get_floats('1.23 -34e6 NaN -Inf')) == [1.23, -34000000.0] Please suggest alternatives you consider more elegant, even if they involve "look before you leap" (which is normally considered a lesser approach in Python).

    Read the article

  • Programmtically choosing image conversion format to JPEG or PNG for Silverlight display

    - by Otaku
    I have a project where I need to convert a large number of image types to be displayable in a Silverlight app - TIFF, GIF, WMF, EMF, BMP, DIB, etc. I can do these conversions on the server before hydrating the Silverlight app. However, I'm not sure when I should choose to convert to which format, either JPG or PNG. Is there some kind of standard out there like TIFF should always be a JPEG and GIF should always be a PNG. Or, if a BMP is 24 bit, it should be converted to a JPEG - any lower and it can be a PNG. Or everything is a PNG and why? What I usually see or see in response to this type of question is "Well, if the picture is a photograph, go with JPEG" or "If it has straight lines, PNG is better." Unfortunately, I won't have the luxury of viewing any of the image files at all and would like just a standard way to do this via code, even if that is a zillion if/then statements. Are there any standards or best practices around this subject? P.S. Please don't move to close this subject - it actually has no duplicate on SO because I'm not looking for subjectivity.

    Read the article

  • Sparx Enterprise Architect conversion (from source to UML)

    - by user228938
    I need to make a UML class diagram for a project. I used Sparx Enterprise Architect in the past to generate source code from a diagram so I'm using that. The project is complete so all of the code is done and I don't really want to write all the classes / functions manually, so I was trying to generate the diagram from the source code but can't seem to find a way to do it. I searched online and on their website but nothing. Any help appreciated. Thanks in advance.

    Read the article

  • Can a single argument constructor with a default value be subject to implicit type conversion

    - by Richard
    I understand the use of the explicit keyword to avoid the implicit type conversions that can occur with a single argument constructor, or with a constructor that has multiple arguments of which only the first does not have a default value. However, I was wondering, does a single argument constructor with a default value behave the same as one without a default value when it comes to implicit conversions?

    Read the article

  • PHP Object conversion question

    - by karlthorwald
    I am converting from JSON to object and from object to array. It does not what I expected, can you explain to me? $json = '{"0" : "a"}'; $obj = json_decode($json); $a = (array) $obj; print_r($a); echo("a0:".$a["0"]."<br>"); $b = array("0" => "b"); print_r($b); echo("b0:".$b["0"]."<br>"); The output here is: Array ( [0] => a ) a0: Array ( [0] => b ) b0:b I would have expected a0:a at the end of the first line.

    Read the article

  • Scala traits and implicit conversion confusion

    - by pr1001
    The following lines work when I enter them by hand on the Scala REPL (2.7.7): trait myTrait { override def toString = "something" } implicit def myTraitToString(input: myTrait): String = input.toString object myObject extends myTrait val s: String = myObject However, if I try to compile file with it I get the following error: [error] myTrait.scala:37: expected start of definition [error] implicit def myTraitToString(input: myTrait): String = input.toString [error] ^ Why? Thanks!

    Read the article

  • Use OpenOffice to do server-side ppt(x) to swf conversion

    - by Steven Xu
    I'd like to turn Powerpoint presentations to SWF files the same way that OpenOffice does it, except automatically through a command line call. I came across http://stackoverflow.com/questions/886144, which led me to explore PyUNO bridge, which comes with OpenOffice as well as the OpenOffice command line API, but I wasn't able to make anything productive of it. Any guidance is appreciated. If there is a good solution outside of OpenOffice, I would be happy to try it too.

    Read the article

  • Conversion of DOM element selection code to jQuery

    - by Tom McDonnell
    I have a large Javascript codebase to convert to jQuery. The code is structured such that DOM elements are created in Javascript (using a library called DomBuilder), and saved to variables if they will be needed later, before being added to the DOM. Eg. var inputs = { submitConfirm: INPUT({type: 'button', value: 'Submit'}), submitCancel : INPUT({type: 'button', value: 'Cancel'}) }; document.appendChild(inputs.submitConfirm); Then later for example... inputs.submitCancel.style.display = 'none'; inputs.submitCancel.addEventListener('click', onClickSubmitCancel, false); My problem is that jQuery seems to lack a way of manipulating DOM elements directly, as opposed to selecting them first (with for example $('#submitCancel'). Can anyone suggest a way to directly translate the last two Javascript lines given above to use jQuery, given that the DOM elements are already available, and so do not need to be selected?

    Read the article

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