Search Results

Search found 5783 results on 232 pages for 'translation unit'.

Page 41/232 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • where to find Ubercart translation files

    - by ernie
    I am trying to update language specific text files ("po files") for Ubercart, but it is unclear who/where these files are maintained. There are several places sited but I am not sure which is maintained? http://ftp.drupal.org/files/translations/6.x/ubercart/ http://l10n.privnet.biz/translation_group/ Also a description of how to do this in Drupal. In Drupal (link: admin/build/translate/import) there are several text groups to select. Do I have to repeat update for each group?

    Read the article

  • About Network Address Translation (NAT)?

    - by Rudi
    Just curious about a particular scenario of NAT. Let's suppose we have 4 computers sharing a global IP address under the NAT. I understand that the NAT box keeps an internal record to know which computer to forward requests to. But let's say on computer #2 I'm trying to download a file. And let's say on computer #1, #3, and #4, I'm just browsing the web normally. When the browser initiates a TCP connection to get that file, how does it know which computer to give it to? I mean like, each of the four computers is using port 80 to browse the web right? How does the NAT's record distinguish which "port 80" belongs to which computer?

    Read the article

  • My javascript to jQuery translation has a bug

    - by donpal
    My guess is that this javascript just finds the div called divid and then uses it with the sendit function. var somevalue = 19; if (navigator.appName.indexOf("Microsoft") != -1) { thediv = window["divid"]; } else { thediv = document["divid"]; } thediv.sendit(somevalue); I would imagine in jQuery it would look something as simple as this: var somevalue = 19; $('divid').sendit(somevalue); But it's not working!! What could I be missing? I should say that it's in the middle of other javascript code, could that be a problem?

    Read the article

  • Java code translation of Python array-splitting code

    - by techventure
    Can someone please give the Java equivalent of the below python (which slices a given array into given parts) which was originally written by ChristopheD here: def split_list(alist, wanted_parts=1): length = len(alist) return [ alist[i*length // wanted_parts: (i+1)*length // wanted_parts] for i in range(wanted_parts) ] I don't know any python but can really use the above code in my Java app. Thanks

    Read the article

  • Translation of a RoR view to Java

    - by mnml
    Hi, for some reasons I am trying to translate the following RoR view code to a GSP view: List<Object> objectscontains the data I want to display in 3 columns <% modulo_objects = @objects.length % 3 base = @objects.length / 3 base = base.ceil case modulo_objects when 0 cols = [base, base, base] when 1 cols = [base, base + 1, base] when 2 cols = [base + 1, base, base + 1] end counter = 0 %> <% 3.times do |i| %> <td width="220" align="center" style="padding-right: 15px;"> <% cols[i].times do %> <h1><a href="/objects/show/<%= @objects[counter].urlname %>" ><%= @objects[counter].name %></a></h1> <% counter = counter + 1 %> <% end %> </td> <% end %> This is what I got so far: #{extends 'main.html' /} %{ modulo_objects = objects.size() % 3 base = objects.size() / 3 base = Math.ceil(base) if(modulo_objects == 0) cols = [base, base, base] else if(modulo_objects == 1) cols = [base, base + 1, base] else if(modulo_objects == 2) cols = [base + 1, base, base + 1] endif counter = 0 }% #{list items:1..3, as:'i'} <td width="220" align="center" style="padding-right: 15px;"> #{list items:cols[i]} <a href="@{Objects.show(objects.get(counter).name.replaceAll(" ", "-"))}" >${objects.get(counter).name}</a> %{ counter = counter + 1 }% #{/list} </td> #{/list} The idea is to keep the items organised in 3 columns like 1|0|1 4|5|4 or 5|4|5 for example, I don't really understand if #{list items:cols[i]} will reproduce ruby's cols[i].times do. So far the Java view is does not display more than two elements.

    Read the article

  • Animating translation and scaling of view in Android

    - by hgpc
    I have to animate a view from state A to B with changes to its scale, position and scrolling. I know everything about state A (widthA, heightA, topA, leftA, scrollXA, scrollYA) and state B (widthB, heightB, topB, leftB, scrollXB, scrollYB). So far I wrote the following code: AnimationSet animation = new AnimationSet(true); int toXDelta; // What goes here? int toYDelta; // What goes here? TranslateAnimation translateAnimation = new TranslateAnimation(1, toXDelta, 1, toYDelta); translateAnimation.setDuration(duration); animation.addAnimation(translateAnimation); float scale = (float) widthB / (float) widthA; ScaleAnimation scaleAnimation = new ScaleAnimation(1, scale, 1, scale); scaleAnimation.setDuration(duration); animation.addAnimation(scaleAnimation); animation.setAnimationListener(new AnimationListener() { @Override public void onAnimationEnd(Animation arg0) { view.clearAnimation(); // Change view to state B } @Override public void onAnimationRepeat(Animation arg0) {} @Override public void onAnimationStart(Animation arg0) {} }); view.startAnimation(animation); Is this the right way to do this? If so, how should I calculate the values of toXDelta and toYDelta? I'm having trouble finding the exact formula. Thanks!

    Read the article

  • How to null a translation in gettext system?

    - by Evgeny
    Suppose a simple phrase "In" in English needs to be interpreted as "" - empty string in Russian. Is is possible to specify that in the .po file? What normally happens if you set msgstr "" - you'll get the untranslated key, but I want to get nothing in that specific case. Here is a use case: I have underneath a giant search bar a set of buttons to select questions (for a Q&A site) from particular scopes - like so: (in English) In: [all] [unanswered] [my own] (in Russian I want) [???] [??? ???????] [???] It just sounds more natural. Yes I can leave out In for english, but I don't want to and I do not want to put button (things in [] are buttons) html into the 'po' file. Thanks!

    Read the article

  • I18n - JSF variable value translation

    - by Yurish
    Hi! I am using Bundle Internationalization in my project. I have initialized bundle via <f:loadBundle basename="ui.all.bundles.AppResources_en" var="msg"/> When i need to translate some text, i am using a key to resourceBundle, to get a value of it, for example: #{msg.someText}. But, now i want to translate text, which key is a value of another variable. For example: I have variable String textToTransl. It`s value is status_booked. In my AppResources is defined, that status_booked means "It is booked!", so, when i am pointing it to #{msg.textToTransl} i need to see "It is booked!" How can i make it work?

    Read the article

  • Matlab matrix translation and rotation multiple times

    - by pinnacler
    I have a map of individual trees from a forest stored as x,y points in a matrix. I call it fixedPositions. It's cartesian and (0,0) is the origin. I would like 0/360 degrees to be the top of the screen and 90 degrees to be to the right. Given a velocity and a heading, i.e. .5 m/s and 60 degrees (2 o'clock equivalent on a watch), how do I rotate that x,y points, so that the new origin is centered at (.5cos(60),.5sin(60)) and 60 degrees is now at the top of the screen? Then if I were to give you another heading and speed, i.e. 0 degrees and 2m/s, it should calculate it from the last point, not the original fixedPositions origin. I've wasted my day trying to figure this out. I wish I took matrix algebra but I'm at a loss. I tried doing cos(30) and even those wouldn't compute correctly, which after an hour I realize were in radians.

    Read the article

  • Translate model fields' attributes from a Database with Django?

    - by Luiz C.
    I'm trying to create a Model that has fields that have the following attributes translatable: verbose_name and choices. I can easily do this by tagging the strings and using the i18l middleware. The problem is that I don't want to define the translation in po/mo files. Is there a way to pull this data from a database table? If so, any examples? There are some options out there that offer model content translation. That is not my case. I need to translate the verbose_name, choices and error_messages from database.

    Read the article

  • Linq to SQL Strange SQL Translation

    - by Master Morality
    I have a simple query that is generating some odd SQL translations, which is blowing up my code when the object is saturated. from x in DataContext.MyEntities select new { IsTypeCDA = x.EntityType == "CDA" //x.EntityType is a string and EntityType.CDA is a const string... } I would expect this query should translate to: SELECT (CASE WHEN [t0].[EntityType] = @p1 THEN 1 ELSE 0 END) as [IsTypeCDA] ... Instead I get this : SELECT (CASE WHEN @p1 = [t0].[EntityType] THEN 1 WHEN NOT (@p1 = [t0].[EntityType]) THEN 0 ELSE NULL END) AS [IsTypeCDA] ... Since I'm saturating a POCO where IsTypeCDA is a bool, it blows up stating I can't assign null to bool. Any thoughts? Edit: fixed the property names so they make sense...

    Read the article

  • How do you run your unit tests? Compiler flags? Static libraries?

    - by Christopher Gateley
    I'm just getting started with TDD and am curious as to what approaches others take to run their tests. For reference, I am using the google testing framework, but I believe the question is applicable to most other testing frameworks and to languages other than C/C++. My general approach so far has been to do either one of three things: Write the majority of the application in a static library, then create two executables. One executable is the application itself, while the other is the test runner with all of the tests. Both link to the static library. Embed the testing code directly into the application itself, and enable or disable the testing code using compiler flags. This is probably the best approach I've used so far, but clutters up the code a bit. Embed the testing code directly into the application itself, and, given certain command-line switches either run the application itself or run the tests embedded in the application. None of these solutions are particularly elegant... How do you do it?

    Read the article

  • Problems with i18n using django translation on App-Engine with Korean and Hindi

    - by Greg
    I've got a setup based on the post here, and it works perfectly. Adding more languages to the mix, it recognises them fine, except for Korean (ko) and Hindi (hi). Chinese/Japanese/Hebrew are all fine, so nothing to do with encodings/charsets I don't think. Taking a look into the django code inside the app-engine SDK, I notice that all the languages that I'm using except for ko and hi are ones that ship with django - in the default settings.py and inside the locale folder they are missing. If I copy one of the locale folders inside the /usr/local/google_appengine/lib/django[...]/conf/locale and rename it to be 'ko', then it starts working in my app, but I won't be able to replicate this modification when I deploy to app-engine, so need a bit of help understanding what I might be doing wrong. my settings.py is definitely being taken into account, as if I remove languages from there then they stop working (as they should). If I copied the django modules into my app, under 'lib' there say, could I use those instead of the ones app-engine tries to use, maybe? I'm brand new to python/django/app-engine, and developing on a Mac with Leopard, if that makes any difference. I have the latest app-engine SDK as of tuesday.

    Read the article

  • iOS: Text translation from English to different language and visa-versa

    - by AppleDeveloper
    I want to translate English texts to different languages from my iPad App. These texts are generated dynamically from the front end website so I can use static mapping between English and other language. Basically I will receive line of text in English from the server and I want to convert it to iPad's Locale language settings and display it. Is there anyone I can achieve this? Can I use Google translator? Thanks.

    Read the article

  • Python to Java translation

    - by obelix1337
    Hello, i get quite short code of algorithm in python, but i need to translate it to Java. I didnt find any program to do that, so i will really appreciate to help translating it. I learned python a very little to know the idea how algorithm work. The biggest problem is because in python all is object and some things are made really very confuzing like sum(self.flow[(source, vertex)] for vertex, capacity in self.get_edges(source)) and "self.adj" is like hashmap with multiple values which i have no idea how to put all together. Is any better collection for this code in java? code is: [CODE] class FlowNetwork(object): def __init__(self): self.adj, self.flow, = {},{} def add_vertex(self, vertex): self.adj[vertex] = [] def get_edges(self, v): return self.adj[v] def add_edge(self, u,v,w=0): self.adj[u].append((v,w)) self.adj[v].append((u,0)) self.flow[(u,v)] = self.flow[(v,u)] = 0 def find_path(self, source, sink, path): if source == sink: return path for vertex, capacity in self.get_edges(source): residual = capacity - self.flow[(source,vertex)] edge = (source,vertex,residual) if residual > 0 and not edge in path: result = self.find_path(vertex, sink, path + [edge]) if result != None: return result def max_flow(self, source, sink): path = self.find_path(source, sink, []) while path != None: flow = min(r for u,v,r in path) for u,v,_ in path: self.flow[(u,v)] += flow self.flow[(v,u)] -= flow path = self.find_path(source, sink, []) return sum(self.flow[(source, vertex)] for vertex, capacity in self.get_edges(source)) g = FlowNetwork() map(g.add_vertex, ['s','o','p','q','r','t']) g.add_edge('s','o',3) g.add_edge('s','p',3) g.add_edge('o','p',2) g.add_edge('o','q',3) g.add_edge('p','r',2) g.add_edge('r','t',3) g.add_edge('q','r',4) g.add_edge('q','t',2) print g.max_flow('s','t') [/CODE] result of this example is "5". algorithm find max flow in graph(linked list or whatever) from source vertex "s" to destination "t". Many thanx for any idea

    Read the article

  • Pass codeigniter translation array to jQuery Function

    - by grolle
    Hi, I’ve a problem by passing an array to a jQuery function. Some code: // in the language file $lang['daynames'] = array('So','Mo','Di','Mi','Do','Fr','Sa'); //In the view var config = { basePath : '' }; // THIS WORKS GREAT!!! var days = new array('lang-line('daynames')); ?'); //in the js-File $(function() { $("#datepicker").datepicker({ dateFormat : 'dd.mm.yy', showWeek : true, firstDay : 1, weekHeader : 'KW', dayNamesMin : days, monthNames : ['Januar','Februar','März','April', 'Mai','Juni','Juli','August','September', 'Oktober','November','Dezember'], onSelect : function(dateText,inst){ } }); }); If I do lang-line(‘daynames’)); ? in the view everything looks fine, so what is wrong here? Thanks and best regards ...

    Read the article

  • What is the proper way to localize a static website

    - by Pavel
    Hey! I need to localize our site to a number of languages. The site consists of several static pages, no dynamic backend. We have a nice international community and the people are ready to help us. The problem is how to arrange website translation, what is the right workflow? What are the best practices for static website localization? Is it possible to arrange translation in a wiki way, where several translators could translate site pages online?

    Read the article

  • Compiler: Translation to assembly

    - by sub
    I've written an interpreter for my experimental language and know I want to move on and write a small compiler for it. It will probably take the source, go through the same steps as the interpreter (tokenizer, parser) and then translate the source to assembly. Now my questions: Can I expect that every command in my language can be 1:1 translated to a bunch of assembly instructions? What I mean is if I will have to completely throw over the whole input program or if it is just translated to assembly per line. Which assembler should I use as output format?

    Read the article

  • String translation to Portuguese

    - by xrx215
    I wanted to translate strings groupbytext, show in groups in the column menu of a grid panel. In ext-lang-pt.js the string are not included. wheres as in other languages thse string are included. These strings are in cluded in ext-lang-pt_PT.js. what is the difference between ext-lang-pt.js and ext-lang-pt_PT.js. Do I have to include the file ext-lang-pt_PT.js in order to translate the strings in portugese? Please let me know

    Read the article

  • IP to MAC adress translation

    - by b-gen-jack-o-neill
    Hi, please, tell me one thing I can´t understand. On PC networks which uses TCP/IP protocol set, why is ip adress further translated into MAC adress? I mean, when every device knows its IP, why furher use MAC and not to use IP number as adress directly?

    Read the article

  • preg_replace or regex string translation

    - by ccolon
    I found some partial help but cannot seem to fully accomplish what I need. I need to be able to do the following: I need an regular expression to replace any 1 to 3 character words between two words that are longer than 3 characters with a match any expression: For example: walk to the beach == walk(.*)beach If the 1 to 3 character word is not preceded by a word that's longer than 3 characters then I want to translate that 1 to 3 letter word to ' ?' For example: on the beach == on ?the ?beach The simpler the rule the better (of course, if there's an alternative more complicated version that's more performant then I'll take that as well as I eventually anticipate heavy usage eventually). This will be used in a PHP context most likely with preg_replace. Thus, if you can put it in that context then even better!

    Read the article

  • Webcast Q&A: Hitachi Data Systems Improves Global Web Experiences with Oracle WebCenter

    - by kellsey.ruppel
    Last Thursday we had the third webcast in our WebCenter in Action webcast series, "Hitachi Data Systems Improves Global Web Experiences with Oracle WebCenter", where customer Sean Mattson from HDS and Rob Vandenberg from Oracle Partner Lingotek shared how Oracle WebCenter is powering Hitachi Data System’s externally facing website and providing a seamless experience for their customers. In case you missed it, here's a recap of the Q&A.   Sean Mattson, Hitachi Data Systems  Q: Did you run into any issues in the deployment of the platform?A: There were some challenges, we were one of the first enterprise ‘on premise’ installations for Lingotek and our WebCenter platform also has a lot of custom features.  There were a lot of iterations and back and forth working with Lingotek at first.  We both helped each other, learned a lot and in the end managed to resolve all issues and roll out a very compelling solution for HDS. Q: What has been the biggest benefit your end users have seen?A: Being able to manage and govern the content lifecycle globally and centrally and at the same time enabling the field to update, review and publish the incremental content changes without a lot of touchpoints has helped us streamline and simplify the entire publishing process. Q: Was there any resistance internally when implementing the solution? If so, how did you overcome that?A: I wouldn't say resistance as much as skepticism that we could actually deploy an automated and self publishing solution.  Even if a solution is great, adoption of a new process can be a challenge and we are still pursuing our adoption targets.  One of the most important aspects is to include lots of training and support materials and offer as much helpdesk type support as needed to get the field self sufficient and confident in the capabilities of the system.  Rob Vandenberg, Lingotek  Q: Are there any limitations regarding supported languages such as support for French Canadian and Indian languages?A: Lingotek supports all language pairs. Including right to left languages and double byte languages such as Chinese, Japanese and Korean Q: Is the Lingotek solution integrated with the new 11g release of WebCenter Sites? A: Yes! In fact, Lingotek is the first OVI partner for Oracle WebCenter Sites  Q: Can translation memories help to improve the accuracy of machine translation?A: One of the greatest long term strategic benefits of using Lingotek is the accumulation of translation memories, or past human translations. These TMs can be used to "train" statistical machine translation engines to have higher and higher quality. This virtuous cycle is ongoing and will consistently improve both machine and human translations.  Q: We have existing translation memories from previous work with our translation service provider. Can they be easily imported in to the Lingotek solution for re-use? Q: Yes, Lingotek is standards compliant. We support TM import in both the TMX and XLIFF formats. Q: If we use Lingotek as a service to do our professional translation and also use the Lingotek software solution, do we get the translation memories to give us a means of just translating future adds and changes ourselves? A: Yes, all the data is yours, always. Lingotek can provide both the integrated translation software as well as the professional translation services. All the content and translation memories are yours. Q: Can you give us an example of where community translation has proved to be successful?A: The key word here is community. If you have a community that cares about you, your content, and the rest of the community, then community translation can work for you. We've seen effective use cases in Product User Groups content, Support Communities, and other types of User Generated content, like wikis and blogs.   If you missed the webcast, be sure to catch the replay to see a live demonstration of WebCenter in action!   Hitachi Data Systems Improves Global Web Experiences with Oracle WebCenter from Oracle WebCenter

    Read the article

  • Handling learning curve for new developers

    - by pete the pagan-gerbil
    Our company likes to hire new developers, with no experience. We have a core set of skills that we try to get them up to speed with, like ASP.NET and WinForms - to teach basic programming, the .NET languages, and the things they'll need to maintain and write. We also try and mentor them through early projects, so they can learn from someone more experienced. Recently, we've been seeing the benefits of new frameworks like MVC and ideas like Unit Testing and TDD (by extension, dependancy injection and IoC), and we'd like to start using these in the team. However, this increases the time that a junior would have before they can get started on a new project - because doing something like unit tests wrong could cause major headaches months or years later in maintenance, especially if we believe unit tests to be comprehensive. How do you handle the huge amount of things that a junior will need to take on, acknowledging that the business wants them working independantly as soon as possible? Is it acceptable to tell them not to unit test till a while after they are independant (and give them small, simpler projects in the meantime) before taking them to 'level 2' of the core skills?

    Read the article

  • Is JPA persistence.xml classpath located?

    - by Vinnie
    Here's what I'm trying to do. I'm using JPA persistence in a web application, but I have a set of unit tests that I want to run outside of a container. I have my primary persistence.xml in the META_INF folder of my main app and it works great in the container (Glassfish). I placed a second persistence.xml in the META-INF folder of my test-classes directory. This contains a separate persistence unit that I want to use for test only. In eclipse, I placed this folder higher in the classpath than the default folder and it seems to work. Now when I run the maven build directly from the command line and it attempts to run the unit tests, the persistence.xml override is ignored. I can see the override in the META-INF folder of the maven generated test-classes directory and I expected the maven tests to use this file, but it isn't. My Spring test configuration overrides, achieved in a similar fashion are working. I'm confused at to whether the persistence.xml is located through the classpath. If it were, my override should work like the spring override since the maven surefire plugin explains "[The test class directory] will be included at the beginning the test classpath". Did I wrongly anticipate how the persistence.xml file is located? I could (and have) create a second persistence unit in the production persistence.xml file, but it feels dirty to place test configuration into this production file. Any other ideas on how to achieve my goal is welcome.

    Read the article

  • How do I change the base class at runtime in C#?

    - by MatthewMartin
    I may be working on mission impossible here, but I seem to be getting close. I want to extend a ASP.NET control, and I want my code to be unit testable. Also, I'd like to be able to fake behaviors of a real Label (namely things like ID generation, etc), which a real Label can't do in an nUnit host. Here a working example that makes assertions on something that depends on a real base class and something that doesn't-- in a more realistic unit test, the test would depend on both --i.e. an ID existing and some custom behavior. Anyhow the code says it better than I can: public class LabelWrapper : Label //Runtime //public class LabelWrapper : FakeLabel //Unit Test time { private readonly LabelLogic logic= new LabelLogic(); public override string Text { get { return logic.ProcessGetText(base.Text); } set { base.Text=logic.ProcessSetText(value); } } } //Ugh, now I have to test FakeLabelWrapper public class FakeLabelWrapper : FakeLabel //Unit Test time { private readonly LabelLogic logic= new LabelLogic(); public override string Text { get { return logic.ProcessGetText(base.Text); } set { base.Text=logic.ProcessSetText(value); } } } [TestFixture] public class UnitTest { [Test] public void Test() { //Wish this was LabelWrapper label = new LabelWrapper(new FakeBase()) LabelWrapper label = new LabelWrapper(); //FakeLabelWrapper label = new FakeLabelWrapper(); label.Text = "ToUpper"; Assert.AreEqual("TOUPPER",label.Text); StringWriter stringWriter = new StringWriter(); HtmlTextWriter writer = new HtmlTextWriter(stringWriter); label.RenderControl(writer); Assert.AreEqual(1,label.ID); Assert.AreEqual("<span>TOUPPER</span>", stringWriter.ToString()); } } public class FakeLabel { virtual public string Text { get; set; } public void RenderControl(TextWriter writer) { writer.Write("<span>" + Text + "</span>"); } } //System Under Test internal class LabelLogic { internal string ProcessGetText(string value) { return value.ToUpper(); } internal string ProcessSetText(string value) { return value.ToUpper(); } }

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >