Search Results

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

Page 150/232 | < Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >

  • Active Record's SessionScope in BL or DL ?

    - by StupidDeveloper
    Imagine that I have 3 projects: DL, BL and WS. DL contains Active Record implementation with all the mappings, BL has some logic (calling various DL methods) and finally WebService project exposes some BL methods (using some DTO mappings). The questions are: Should I put all data related methods in DL or is it allowed to use SessionScope in BL ? There are some complicated stuff that is right now done on BL. Should/can BL operate on classes-mappings of the Active record? The question is where should be the translation to DTO be made (at the BL level? ) ?

    Read the article

  • Are C/C++/ObjC/JS Apple's only allowed langauges for iPhone development?

    - by fbrereto
    According to this post on Daring Fireball a new iPhone SDK Agreement release in conjunction with the iPhone OS 4.0 announcement today specifically bans any iPhone application not implemented in C, C++ Objective-C or JavaScript. The clear impact here is to the wide array of programs written in languages other than those. Is that your reading of the clause in the new agreement as well? Update: Here is the clause as printed on Daring Fireball: 3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

    Read the article

  • Which messaging services can BlackBerry apps integrate with?

    - by humble coffee
    I'm in charge of having a BlackBerry app developed that translates the contents of a message from one language to another. So the aim would be to have a button at the bottom of a received message which says 'translate this'. I've heard that this kind of thing is possible using J2ME plus the native BlackBerry API. Can this be done for all kinds of messanging features on the Blackberry, or just some? ie I'm thinking SMS, email and BB messages. Secondly, given that the translation itself is done via a web request, I feel like this should be a fairly lightweight application. Would anyone care to hazard a guess how long it might take an experienced contractor to develop such an app?

    Read the article

  • Velocity templates seem to fail with UTF-8

    - by steve
    Hi, i have been trying to use a velocity Template with the following content: Sübjäct $item everything works fine except the translation of the tow unicode characters. The result string printed on the commandline looks like: Sübjäct foo I searched the velocity website and the web an this issue, and came uo with differnt font encoding options, which i added to my code. But those won't help. This is the actuall code: velocity.setProperty("file.resource.loader.path", absPath); velocity.setProperty("input.encoding", "UTF-8"); velocity.setProperty("output.encoding", "UTF-8"); Template t = velocity.getTemplate("subject.vm"); t.setEncoding("UTF-8"); StringWriter sw = new StringWriter(); t.merge(null, sw); System.out.println(sw.getBuffer()); Can anyone give me some hints, how to fix this issue?

    Read the article

  • java decmail string to AS 3.0 conversion procedure

    - by Jack Smith
    Hello, I have a problem with conversion java code to action script 3. Anyone can help with code translation? Thanks. public static short[] decmail_str_to_binary_data(String s) { short[] data = new short[s.length()/2]; for (int i = 0; i < s.length(); i += 2) { char c1 = s.charAt(i); char c2 = s.charAt(i + 1); int comb = Character.digit(c1, 16) & 0xff; comb <<= 4; comb += Character.digit(c2, 16) & 0xff; data[i/2] = (short)comb; } return data; }

    Read the article

  • How to extract messages to translate from a Play! application

    - by Martin
    I'm writing my first application using the Play! framework and I was wondering if there was a tool that could extract the messages that need translation from my views and controllers for me ? It is rather cumbersome to fill the conf/messages(.xx) file while I'm developing my app, but I'm afraid that if I don't do it as I go, I will never be able to completely translate my application afterwards. Such tools exist with other framework such as CakePHP for instance, and I think that it shouldn't be hard to write one by myself, but if there already is one... I was also wondering, what should I name the keys of the messages in my application ? Using gettext, it's not bad practice to directly type in the message in english as the key, but is it with the system that Play! uses (MessageFormat, right ?) ? Does anyone have an advice or naming convention (something like controller.action.describe_the_message maybe) ? Thank you for your advices !

    Read the article

  • Detecting the Loopback Adapter

    - by BlueSkies
    What is the best way for detecting whether a network interface is a loopback adapter? The windows API's GetAdaptersInfo and GetAdaptersAddresses state in the documentation that they will return whether an interface is a loopback through the Type (MIB_IF_TYPE_LOOPBACK) but neither of these do for the Microsoft Loopback Adapter at least, it is reported as a standard ethernet interface. I could try checking for the default MAC of the Loopback adapter but this can be easily spoofed. I could check for the name "Microsoft Loopback Adapter" in the description but this may have translation issues and may lead to other issues. IP addresses can also be changed. What is the most robust method for doing this?

    Read the article

  • Which messanging services can BlackBerry apps integrate with?

    - by humble coffee
    I'm in charge of having a BlackBerry app developed that translates the contents of a message from one language to another. So the aim would be to have a button at the bottom of a received message which says 'translate this'. I've heard that this kind of thing is possible using J2ME plus the native BlackBerry API. Can this be done for all kinds of messanging features on the Blackberry, or just some? ie I'm thinking SMS, email and BB messages. Secondly, given that the translation itself is done via a web request, I feel like this should be a fairly lightweight application. Would anyone care to hazard a guess how long it might take an experienced contractor to develop such an app?

    Read the article

  • Indexing a method return (depending on Internationalization)

    - by Hedde
    Consider a django model with an IntegerField with some choices, e.g. COLORS = ( (0, _(u"Blue"), (1, _(u"Red"), (2, _(u"Yellow"), ) class Foo(models.Model): # ...other fields... color = models.PositiveIntegerField(choices=COLOR, verbose_name=_(u"color")) My current (haystack) index: class FooIndex(SearchIndex): text = CharField(document=True, use_template=True) color = CharField(model_attr='color') def prepare_color(self, obj): return obj.get_color_display() site.register(Product, ProductIndex) This obviously only works for keyword "yellow", but not for any (available) translations. Question: What's would be a good way to solve this problem? (indexing method returns based on the active language) What I have tried: I created a function that runs a loop over every available language (from settings) appending any translation to a list, evaluating this against the query, pre search. If any colors are matched it converts them backwards into their numeric representation to evaluate against obj.color, but this feels wrong.

    Read the article

  • Django naturaltime Localization error

    - by Edwin Lunando
    My language ID is 'id'. I used localized humanize library for my Django template tags and use the naturaltime, but the translation is partially wrong. The now translated to sekarang is right. second to detik. minute to menit, but when it comes to date, week, or months, the word is not translated to my language. It keeps printing date, week, and months. Here are my Django configuration TIME_ZONE = 'Asia/Jakarta' LANGUAGE_CODE = 'id' SITE_ID = 1 USE_I18N = True USE_L10N = True USE_TZ = True Here how I used the naturaltime template tags. <time class="discussion__info__item">{{ object.created|naturaltime }}</time> Do I forgot something? Thank you.

    Read the article

  • Are the atomic builtins provided by gcc actually translated into the example code, or is that just f

    - by Jared P
    So I was reading http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html, and came across this: type __sync_and_and_fetch (type *ptr, type value, ...) type __sync_xor_and_fetch (type *ptr, type value, ...) type __sync_nand_and_fetch (type *ptr, type value, ...) These builtins perform the operation suggested by the name, and return the new value. That is, { *ptr op= value; return *ptr; } { *ptr = ~*ptr & value; return *ptr; } // nand Is this code literal? or is it just to explain what gcc is doing atomically using c-like syntax? And if this is the direct translation, can someone explain how it is atomic?

    Read the article

  • Java: Looking for hack to deal with Windows file paths in Linux

    - by Chase Seibert
    Say you have a large legacy ColdFusion on top of Java on Windows application. File access is done both via java.io.File and by CFFILE (which in turn also uses java.io.File), but not centralised in any way into a single file access library. Further, say you have file paths both hard-coded in the code, and also in a database. In other words, assume the file paths themselves cannot change. They could be either local or remote Windows file paths: c:\temp\file.txt \\server\share\file.txt Is there a way to run this application on Linux with minimal code changes? I'm looking for creative solutions that do not involve touching the legacy code. Some ideas: Run it on WINE. This actually works, because WINE will translate the local paths, and has a samba client for the remote paths. Is there a way to override java.io.File to perform the file path translation with custom code? In this case, I would translate the remote paths to a mount point.

    Read the article

  • Delphi: How to localize description for a menu shortcut?

    - by Ulrich Gerhardt
    Is there a way to get a localized description of a shortcut like Ctrl+Z so that I get "Ctrl+Z" if the app runs on an English system and "Strg+Z" on a German system? The VCL function ShortCutToText isn't internationalized. The API function GetKeyNameText is a bit better but still not perfect: If one switches the regional settings of a German XP to English (US), it still produces German texts. Besides the results are in CAPITALS which is ugly. Clarification: I know how I can replace ShortCutToText or the Smkc* resource strings with customized versions. But to use that I need the translated strings. And I would like to get these from the OS (or similar). Update: It looks like Microsoft expects developers to do the translation on their own - see 2. in Associating a Menu Item with an Accelerator Key.

    Read the article

  • android localization: Is it a good practice to have only needed resource to put in localized folder?

    - by MobileDev123
    Hi, My application has 4 languages in it. However only one module needs to be localized out of 5, This module has 4 layout files and some images, remaining files can be there in default layout folder and drawable folders. My question is : is it good practice to put only needed files in localization folders, if I leave other files in its respective folders and don't copy them in translation folders, does my application throw NullPointerException when my application runs in other language? and Does android market have any size limit? (Also being a BB developer,AFAIK they do not allow OTA, if the application size grows more than 3 mb) [In case i need to copy the layout and image files]. Note about NullPointerException : it throws in string if you omit some string in localization and application runs in that particular locale. Thanks

    Read the article

  • Help Me: Loading Qt dialogs from python Scripts

    - by krishnanunni
    Hello, im a novice into developing an application using backend as Python (2.5) and Qt(3) as front end GUI designer. I have 5 diffrent dialogs to implement the scripts. i just know to load the window (main window) from qt import * from dialogselectkernelfile import * from formcopyextract import * import sys if __name__ == "__main__": app = QApplication(sys.argv) f = DialogSelectKernelFile() f.show() app.setMainWidget(f) app.exec_loop() main dialog opens on running. i have a set of back,Next,Cancel buttons pusing on each should open the next or previous dialogs. i use the pyuic compiler to source translation.how can i do this from python. please reply i`m running out of time.i dont know how to load another dialog from a signal of push button in another dialog. Help me pls Thanks a Lot

    Read the article

  • Taxonomy terms are not translated in an exposed filters block

    - by Daj pan spokój
    Hi, in my view's exposed filters block the taxonomy terms are showed only in the original language version (in English). Vocabulary is set to Localize terms. The terms are translated via Translation Table. All the other content (Views, nodes, translated strings etc.) is showed correctly (in German). I'd expect them to appear in current language, however. Here for instance, I'd expect to have German Sommer 10 instead of English Summer 10. Do You have any idea how to solve it? I use Drupal 6 and Views 2.10

    Read the article

  • Is there a transformation matrix that can scale the x and/or y axis logarithmically?

    - by Dave M
    I'm using .net WPF geometry classes to graph waveforms. I've been using the matrix transformations to convert from the screen coordinate space to my coordinate space for the waveform. Everything works great and it's really simple to keep track of my window and scaling, etc. I can even use the inverse transform to calculate the mouse position in terms of the coordinate space. I use the built in Scaling and Translation classes and then a custom matrix to do the y-axis flipping (there's not a prefab matrix for flipping). I want to be able to graph these waveforms on a log scale as well (either x axis or y axis or both), but I'm not sure if this is even possible to do with a matrix transformation. Does anyone know if this is possible, and if it is, what is the matrix?

    Read the article

  • inheritance from the django user model results in error when changing password

    - by Jerome
    I inherited form the django user model like so: from django.db import models from django.contrib.auth.models import User, UserManager from django.utils.translation import ugettext_lazy as _ class NewUserModel(User): custom_field_1 = models.CharField(_('custom field 1'), max_length=250, null=True, blank=True) custom_field_2 = models.CharField(_('custom field 2'), max_length=250, null=True, blank=True) objects = UserManager() When i go to the admin and add an entry into this model, it saves fine, but below the "Password" field where it has this text "Use '[algo]$[salt]$[hexdigest]' or use the change password form.", if i click on the "change password form' link, it produces this error Truncated incorrect DOUBLE value: '7/password' What can i do to fix this?

    Read the article

  • Why can I check some event handlers for null, some not?

    - by Inno
    Hi, I have a ugly piece of code that adds event handlers. The problem is, if the code is called multiple times, the event handlers are called multiple times. To solve the problem, I remove the event handler first and then add it. Now I've seen the following behaviour: Some event handlers can be checked like: if (object.event == null) { // // Code // } others of the form if (object.object.event == null) { // // Code // } I get a message like 'object.object.event' may only occur left of -= or +=. (Since I'm using a german version of visual studio, I don't know the correct translation to english). I have no idea why the behaviour looks this inconsequent so I would be grateful for some information on this. To be more specific: It's user control. if (myControl.Event == null) { // // works // } if (myControl.TreeView.NodeMouseClick == null) { // // doesn't work // }

    Read the article

  • rails eval code

    - by xpepermint
    Hey. I have to do a coll inside my model like this: import = Import.find(id) status = User.find(import.user_id).{XXX}.import(import.file.path) Notice a {XXX} which should be replaced by a dinamic variable of a submodel. Model User has_many groups, clients and products. In translation this would be status = User.find(import.user_id).groups.import(import.file.path) status = User.find(import.user_id).clients.import(import.file.path) status = User.find(import.user_id).products.import(import.file.path) I was thinking of import = Import.find(id) status = eval("User.find(#{import.user_id}).#{import.model}").import(import.file.path) but this gives me an error 'TypeError: can't convert nil into String'. Please tell me how would you fix that. Thx!

    Read the article

  • Can you have multiple interpolators on a single view when using ViewPropertyAnimator?

    - by steven
    For example, I would like to animate a view such that it moves down in the y direction while decelerating, and at the same time it undergoes an alpha change linearly. The code would look something like this: myView.animate().translationY(100).setDuration(1000).setInterpolator(new DecelerateInterpolator()); myView.animate().alpha(1).setDuration(1000).setInterpolator(new LinearInterpolator()); This does not work of course because the LinearInterpolator overwrites the DecelerateInterpolator. Is there a way to have one interpolator for the translation part of the animation and a different interpolator for the alpha part? I am aware that this can be accomplished using ObjectAnimator or an AnimationSet, but my question is about whether it can be done using the much cleaner ViewPropertyAnimator.

    Read the article

  • Linq to Sql GroupJoin Paging oddity

    - by OllyA
    I have noticed a strange Sql Translation in a LinqToSql Query I was trying to optimise. If I execute the following Recipients.GroupJoin( RecipientAttributes, x => x.Recipient_Id, y => y.Recipient_Id, (x,y) => new {Recipient = x, Attributes = y}) .Skip(1) .Take(1000) It executes in a single query as expected. However Recipients.GroupJoin( RecipientAttributes, x => x.Recipient_Id, y => y.Recipient_Id, (x,y) => new {Recipient = x, Attributes = y}) .Skip(0) .Take(1000) executes in a separate query for each Attributes selection. Removing the Skip(0) makes no difference either. Can anyone explain this and is there something I can do to get the first page query executing in a single sql statement?

    Read the article

  • using different string files in android

    - by boreas
    I'm porting my iPhone app to android and I'm having a problem with the string files now. The app is a translation tool and users can switch the languages, so all the localized strings are in both languages and they are independent from what locale the OS is running. For iOS version I have different files like de.strings, en.strings and fr.strings and so on. For every target with specified language pair I read the strings from the string tables, e.g. for de-fr I will include de.strings and fr.strings in project and set the name of the string tables in the info-list file and read strings from them. In the end I have one project containing different targets (with different info-list files) and all are well configured. I'm intending to do the same on android platform, but Is only one strings.xml allowed per project? How do I set different build target? How do I specify per target which strings.xml it should read?

    Read the article

  • How to get a List ordered by the List it's filtered by?

    - by DaveDev
    I have a method as follows. It returns a list of MyTypes which appear to be ordered by myType.Id ascending by default. public List<MyType> GetMyTypes(List<int> ids) { return (from myType in db.MyTypes where ids.Contains(myType.Id) select new MyType { MyValue = myType.MyValue }).ToList(); } So if ids contains 302 300 301 the List returned contains items in ascending order. What do I need to do to return List<MyType> in the order of ids? Thanks edit: I've tried orderby ids.IndexOf(myType.Id) but it throws the exception Method 'Int32 IndexOf(Int32)' has no supported translation to SQL.

    Read the article

  • Create tables for a dictionary?

    - by heffaklump
    I'm making a dictionary database in SQLite and need some tips. My SQL is a bit rusty ;) Would you consider this good SQL? It's done with Java JDBC. This is for creating the tables. CREATE TABLE word ( id INTEGER, entry STRING, pos STRING ); CREATE TABLE translation ( word_id INTEGER REFERENCES word(id), entry STRING ); And when filling with data i give each word a number (id) and that words translations get the same number as word_id. What would be the best way of pulling out translations for a specific word?

    Read the article

< Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >