Search Results

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

Page 36/232 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • Why is the unit test useful when the view is not unit testable in MVVM?

    - by BigTiger
    Why is the unit test useful when the view is not unit testable in MVVM? In MVVM, we have the models, view-models, and views. The claimed advantage is that MVVM can make the models and view=models unit testable. But all the three parties belong to the same application. If the views are not unit testable, why test the other two? Will unit testing the other two and leave one not tested improve the quality? Removing all the code-behind from the views sounds weird to me. How about the code-behind only handles the pure UI operations?

    Read the article

  • Why does 'uses unit' disappear when I had a new unit ?

    - by TridenT
    I have a Unit test project for my Application using DUnit framework. This project have a unit surrounded by a $IFDEF to output test-results in a xml file instead of the gui or just command line. XML_OUTPUT define is enabled by switching the Build configuration. program DelphiCodeToDoc_Tests; uses TestFramework, TextTestRunner, Sysutils, Forms, GUITestRunner, {$IFDEF XML_OUTPUT} XmlTestRunner2 in 'DUnit_addon\XmlTestRunner2.pas', {$ENDIF} DCTDSetupTests in 'IntegrationTests\DCTDSetupTests.pas', ... This works perfectly. The issue starts when I'm adding a new unit to this project from the IDE (a new unit with 'FileNewUnit'). The Test project is now : uses TestFramework, TextTestRunner, Sysutils, Forms, GUITestRunner, DCTDSetupTests in 'IntegrationTests\DCTDSetupTests.pas', ... MyNewUnit in 'IntegrationTests\MyNewUnit.pas'; As you see, the test XML_OUTPUT has disappeared ... Each time I'm adding a unit, Delphi IDE deletes this test. Do you know why and how I can avoid it ?

    Read the article

  • Is it possible to compile IronRuby code to a .NET assembly (EXE or DLL)

    - by Chris Ammerman
    My scenario consists of the following points. I have a packaged software product I am developing in C# Since it is a packaged product, the public interfaces of the assemblies need to be tightly controlled... All assemblies are strong-named Any classes that don't absolutely have to be "public" are "internal" I want to write unit tests for those "internal" classes, since they are the bulk of the code And finally.... I want to try writing the unit tests in Ruby. Since the unit tests would be external to the assembly containing the code under test, the assemblies under test would each need to have an "InternalsVisibleTo" attribute specifying the name of the unit test assembly. Which of course would mean that the Ruby unit tests would have to compile down to a .NET assembly so they can be given access in this way. Can this be done? If so, how? All I can find on the web about "compiling IronRuby" is about building the actual IronRuby runtime from source.

    Read the article

  • Custom validation works in development but not in unit test

    - by Geolev
    I want to validate that at least one of two columns have a value in my model. I found somewhere on the web that I could create a custom validator as follows: # Check for the presence of one or another field: # :validates_presence_of_at_least_one_field :last_name, :company_name - would require either last_name or company_name to be filled in # also works with arrays # :validates_presence_of_at_least_one_field :email, [:name, :address, :city, :state] - would require email or a mailing type address module ActiveRecord module Validations module ClassMethods def validates_presence_of_at_least_one_field(*attr_names) msg = attr_names.collect {|a| a.is_a?(Array) ? " ( #{a.join(", ")} ) " : a.to_s}.join(", ") + "can't all be blank. At least one field must be filled in." configuration = { :on => :save, :message => msg } configuration.update(attr_names.extract_options!) send(validation_method(configuration[:on]), configuration) do |record| found = false attr_names.each do |a| a = [a] unless a.is_a?(Array) found = true a.each do |attr| value = record.respond_to?(attr.to_s) ? record.send(attr.to_s) : record[attr.to_s] found = !value.blank? end break if found end record.errors.add_to_base(configuration[:message]) unless found end end end end end I put this in a file called lib/acs_validator.rb in my project and added "require 'acs_validator'" to my environment.rb. This does exactly what I want. It works perfectly when I manually test it in the development environment but when I write a unit test it breaks my test environment. This is my unit test: require 'test_helper' class CustomerTest < ActiveSupport::TestCase # Replace this with your real tests. test "the truth" do assert true end test "customer not valid" do puts "customer not valid" customer = Customer.new assert !customer.valid? assert customer.errors.invalid?(:subdomain) assert_equal "Company Name and Last Name can't both be blank.", customer.errors.on(:contact_lname) end end This is my model: class Customer < ActiveRecord::Base validates_presence_of :subdomain validates_presence_of_at_least_one_field :customer_company_name, :contact_lname, :message => "Company Name and Last Name can't both be blank." has_one :service_plan end When I run the unit test, I get the following error: DEPRECATION WARNING: Rake tasks in vendor/plugins/admin_data/tasks, vendor/plugins/admin_data/tasks, and vendor/plugins/admin_data/tasks are deprecated. Use lib/tasks instead. (called from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/tasks/rails.rb:10) Couldn't drop acs_test : #<ActiveRecord::StatementInvalid: PGError: ERROR: database "acs_test" is being accessed by other users DETAIL: There are 1 other session(s) using the database. : DROP DATABASE IF EXISTS "acs_test"> acs_test already exists NOTICE: CREATE TABLE will create implicit sequence "customers_id_seq" for serial column "customers.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "customers_pkey" for table "customers" NOTICE: CREATE TABLE will create implicit sequence "service_plans_id_seq" for serial column "service_plans.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "service_plans_pkey" for table "service_plans" /usr/bin/ruby1.8 -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/customer_test.rb" "test/unit/service_plan_test.rb" "test/unit/helpers/dashboard_helper_test.rb" "test/unit/helpers/customers_helper_test.rb" "test/unit/helpers/service_plans_helper_test.rb" /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb:1994:in `method_missing_without_paginate': undefined method `validates_presence_of_at_least_one_field' for #<Class:0xb7076bd0> (NoMethodError) from /usr/lib/ruby/gems/1.8/gems/will_paginate-2.3.12/lib/will_paginate/finder.rb:170:in `method_missing' from /home/george/projects/advancedcomfortcs/app/models/customer.rb:3 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:158:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:265:in `require_or_load' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:224:in `depend_on' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:136:in `require_dependency' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:414:in `load_application_classes' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:413:in `each' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:413:in `load_application_classes' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:411:in `each' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:411:in `load_application_classes' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:197:in `process' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `send' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `run' from /home/george/projects/advancedcomfortcs/config/environment.rb:9 from ./test/test_helper.rb:2:in `require' from ./test/test_helper.rb:2 from ./test/unit/customer_test.rb:1:in `require' from ./test/unit/customer_test.rb:1 from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load' from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each' from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 rake aborted! Command failed with status (1): [/usr/bin/ruby1.8 -I"lib:test" "/usr/lib/ru...] (See full trace by running task with --trace) It seems to have stepped on will_paginate somehow. Does anyone have any suggestions? Is there another way to do the validation I'm attempting to do? Thanks, George

    Read the article

  • tools for testing vim plugins

    - by intuited
    I'm looking for some tools for testing vim scripts. Either vim scripts that do unit/functional testing, or classes for some other library (eg Python's unittest module) that make it convenient to run vim with parameters that cause it to do some tests on its environment, and determine from the output whether or not a given test passed. I'm aware of a couple of vim scripts that do unit testing, but they're sort of vaguely documented and may or may not actually be useful: vim-unit: purports "To provide vim scripts with a simple unit testing framework and tools" first and only version (v0.1) was released in 2004 documentation doesn't mention whether or not it works reliably, other than to state that it is "fare [sic] from finished". unit-test.vim: This one also seems pretty experimental, and may not be particularly reliable. May have been abandoned or back-shelved: last commit was in 2009-11 ( 6 months ago) No tagged revisions have been created (ie no releases) So information from people who are using one of those two existent modules, and/or links to other, more clearly usable, options, are very welcome.

    Read the article

  • How should I mock out my data connectivity

    - by BobTheBuilder
    I'm trying to unit test my Data Access Layer and I'm in the process of trying to mock my data connectivity to unit test my DAL and I'm coming unstuck trying to mock out the creation of the commands. I thought about using a queue of IDbParameters for the creation of the parameters, but the unit tests then require that the parameters are configured in the right order. I'm using MOQ and having looked around for some documentation to walk me through this, I'm finding lots of recommendation not to do this, but to write a wrapper for the connection, but it's my contention that my DAL is supposed to be the wrapper for my database and I don't feel I should be writing wrappers... if I do, how do I unit test the connectivity to the database for my wrapper? By writing another wrapper? It seems like it's turtles all the way down. So does anyone have any recommendations or tutorials regarding this particular area of unit testing/mocking?

    Read the article

  • What is the best position for power unit?

    - by guest86
    I would like to buy new computer case. Last time I bought a computer was in 2008 and many things have changed up to day. Many new computer cases have power unit placed down, on bottom. I'm thinking about buying some of those cases, but i'm not sure about something - if power unit is placed on the bottom it can't take away hot air from the case and pump it out right? All my PC parts are silent - CPU (E8200, placed below 12cm Nochtua fan of power unit) has heat-pipe cooler with Nochtua fan spinning at only 800rpms, GPU has cooler powered by 7V instead 12 and that's why i don't want to HAVE TO place another fan to pump out hot air instead of PU placed on top. That might make some noise. So i ask someone more experienced: if i buy some computer case with PU placed down, do i HAVE TO place some fan to pump out hot air?

    Read the article

  • What's the best practice to setup testing for ASP.Net MVC? What to use/process/etc?

    - by melaos
    hi there, i'm trying to learn how to properly setup testing for an ASP.Net MVC. and from what i've been reading here and there thus far, the definition of legacy code kind of piques my interests, where it mentions that legacy codes are any codes without unit tests. so i did my project in a hurry not having the time to properly setup unit tests for the app and i'm still learning how to properly do TDD and unit testing at the same time. then i came upon selenium IDE/RC and was using it to test on the browser end. it was during that time too that i came upon the concept of integration testing, so from my understanding it seems that unit testing should be done to define the test and basic assumptions of each function, and if the function is dependent on something else, that something else needs to be mocked so that the tests is always singular and can be run fast. Questions: so am i right to say that the project should have started with unit test with proper mocks using something like rhino mocks. then anything else which requires 3rd party dll, database data access etc to be done via integration testing using selenium? because i have a function which calls a third party dll, i'm not sure whether to write a unit test in nunit to just instantiate the object and pass it some dummy data which breaks the mocking part to test it or just cover that part in my selenium integration testing when i submit my forms and call the dll. and for user acceptance tests, is it safe to say we can just use selenium again? Am i missing something or is there a better way/framework? i'm trying to put in more tests for regression testing, and to ensure that nothing breaks when we put in new features. i also like the idea of TDD because it helps to better define the function, sort of like a meta documentation. thanks!! hope this question isn't too subjective because i need it for my case.

    Read the article

  • Symfony2 trans_default_domain is not working

    - by user1069843
    At the end of http://symfony.com/doc/current/book/translation.html#twig-templates I read about {% trans_default_domain "app" %} to set a translation domain for a whole template. But for me it does not work. Calling app/console translation:extract de --dir=src/ --output-dir=app/Resources/translations --output-format=xliff --keep Just puts all messages in the messages.de.xliff file. But if I set the domain manually for a given label like {{ label.name|trans({}, 'app') }} And execute the same extract command as above, then I get a new file app.de.xliff Is there anything more to do when using trans_default_domain?

    Read the article

  • Formatting XML using XSLT1.0

    - by DS
    Hi, I have the following xml: <Subscriptions> <Subscription> <Uplink> <Size>15</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class D</Name> </Subscription> <Subscription> <Uplink> <Size>10</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class A</Name> </Subscription> <Subscription> <Downlink> <Size>50</Size> <Unit>Mbps</Unit> </Downlink> <Name>Class B</Name> </Subscription> <Subscription> <Uplink> <Size>10</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class B</Name> </Subscription> <Subscription> <Downlink> <Size>40000</Size> <Unit>Mbps</Unit> </Downlink> <Name>Class A</Name> </Subscription> <Subscription> <Downlink> <Size>20</Size> <Unit>Mbps</Unit> </Downlink> <Name>Class C</Name> </Subscription> <Subscription> <Downlink> <Size>45</Size> <Unit>Mbps</Unit> </Downlink> <Name>Class D</Name> </Subscription> </Subscriptions> I want to group it in the following format based on name using XSLT1.0. Please help <?xml version="1.0" encoding="UTF-8"?> <Subscriptions> <Subscription> <Downlink> <Size>45</Size> <Unit>Mbps</Unit> </Downlink> <Uplink> <Size>15</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class D</Name> </Subscription> <Subscription> <Downlink> <Size>40000</Size> <Unit>Mbps</Unit> </Downlink> <Uplink> <Size>10</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class A</Name> </Subscription> <Subscription> <Downlink> <Size>50</Size> <Unit>Mbps</Unit> </Downlink> <Uplink> <Size>10</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class B</Name> </Subscription> <Subscription> <Downlink> <Size>20</Size> <Unit>Mbps</Unit> </Downlink> <Uplink> <Size>0</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class C</Name> </Subscription> </Subscriptions> Thanks & Regards, D

    Read the article

  • Computational geometry: find where the triangle is after rotation, translation or reflection on a mi

    - by newba
    I have a small contest problem in which is given a set of points, in 2D, that form a triangle. This triangle may be subject to an arbitrary rotation, may be subject to an arbitrary translation (both in the 2D plane) and may be subject to a reflection on a mirror, but its dimensions were kept unchanged. Then, they give me a set of points in the plane, and I have to find 3 points that form my triangle after one or more of those geometric operations. Example: 5 15 8 5 20 10 6 5 17 5 20 20 5 10 5 15 20 15 10 I bet that have to apply some known algorithm, but I don't know which. The most common are: convex hull, sweep plane, triangulation, etc. Can someone give a tip? I don't need the code, only a push, please!

    Read the article

  • Deserialize jSON Google AJAX Translation API

    - by Chris Porter
    I've got the JSON coming back like this: {"responseData": [{"responseData":{"translatedText":"elefante"},"responseDetails":null,"responseStatus":200},{"responseData":{"translatedText":"Burro"},"responseDetails":null,"responseStatus":200}], "responseDetails": null, "responseStatus": 200} And I need to parse it into a ResponseData object I have set-up: public class ResponseData { public string translatedText = string.Empty; public object responseDetails = null; public HttpStatusCode responseStatus = HttpStatusCode.OK; public List<ResponseData> responseData { get; set; } } I Deserialize it like this: JavaScriptSerializer serializer = new JavaScriptSerializer(); ResponseData translation = serializer.Deserialize<ResponseData>(responseJson); But no matter what the translated text is always empty.

    Read the article

  • Cakephp, i18n, Retrieve translation records for associated models

    - by ion
    Quoting from the cakephp Book (ver 1.3): Note that only fields of the model you are directly doing find on will be translated. Models attached via associations won't be translated because triggering callbacks on associated models is currently not supported. Has anyone come up with a solution for this??? If not could you give me some pointers concerning the following simple scenario. I have 2 models: Project, Category. Project HABTM Category I have properly set up i18n table and I have a few entries in the db, all translated. When I retrieve a project it does retrieve the translation but not the translated category because as it says in the cakephp book models attached via associations won't be translated. Any help would be appreciated

    Read the article

  • -webkit-transition-property for translation

    - by sexyprout
    Hai. What is the transition property for translations in CSS3? I'm currently using all but I got a bug in iOS so I want to test another property. -webkit-transform: translate(-320px, 0);   -webkit-transition: ??? .5 ease-in-out; See the bug with an iOS device here (swipe horizontally), there's a kind of flash. Update: to anyone interested, I found a way to fix it thanks to Duopixel: E { -webkit-transition: all .5s ease-in-out; -webkit-transform: translate3d(0, 0, 0); // perform an "invisible" translation } // Then you can translate with translate3d(), no bug! document.querySelector('E').webkitTransform = 'translate3d(-320px, 0, 0)'

    Read the article

  • linq "let" translation

    - by luke
    I understand that when the C# compiler sees a linq query comprehension, it basically does a straight translation to the corresponding Linq Extension methods and lambdas. i.e. from x in list select x.property gets translated to: list.Select(x => x.property) my question is what do let clauses get translated to. for example how would this get translated by the compiler. from x in list let v = SomeComplexExpressionDependingOnx select v (p.s. i know this could be reduced to just select SomeComplexExpressionDependingOnx but i want to know how this is done in general) Thanks!

    Read the article

  • Django: switch language of message sent from admin panel

    - by yoshi
    I have a model, Order, that has an action in the admin panel that lets an admin send information about the order to certain persons listed that order. Each person has language set and that is the language the message is supposed to be sent in. A short version of what I'm using: from django.utils.translation import ugettext as _ from django.core.mail import EmailMessage lang = method_that_gets_customer_language() body = _("Dear mister X, here is the information you requested\n") body += some_order_information subject = _("Order information") email = EmailMessage(subject, body, '[email protected]', ['[email protected]']) email.send() The customer information about the language he uses is available in lang. The default language is en-us, the translations are in french (fr) and german (de). Is there a way to use the translation for the language specified in lang for body and subject then switch back to en-us? For example: lang is 'de'. The subject and body should get the strings specified in the 'de' translation files.

    Read the article

  • Automatic images translation to 3d model

    - by farrakhov-bulat
    I'm quite interested in automatic images translation to 3d models. Not really for commercial product, but from the point of possible academic research and implementation. What I'd like to achieve is almost transparent for user process of transformation series of images (fewer is better) to 3d model which might be shown in flash/silverlight/javafx or similar. Consider online furniture store with 3d models of all items in stock. Kinda cool to have ability to see the product in 3d before purchasing it. I managed to find a few pieces of software, like insight3d, but it couldn't be used in my case I guess. So, are there any similar projects or tips for me? If it would require to write that piece of software - I'd really love to dig into research on this field.

    Read the article

  • The member [class] has no supported translation to SQL

    - by Code Sherpa
    Hi, I am getting the following error: Error Message:The member 'Company.ProductCore.Core.Domain.Account.Email' has no supported translation to SQL. My method looks like this: public Account GetAccountByEmail(string email) { Account account; using (WorkbookDataContext dc = _conn.GetContext()) { account = ( from a in dc.Accounts join em in dc.Emails on a.AccountId equals em.AccountId where a.Email.EmailAddress == email select a).FirstOrDefault(); } return account; } My Account class has a getter / setter that exposes Email: public Email Email { get { return _email; } set { _email = value; } } And my Email is a LINQ object. I have a feeling that the problem is that I am using a LINQ object for me Email property? I am new to LINQ and am not really sure why this is happening. Help appreciated, thanks...

    Read the article

  • I18n translation problem

    - by kshchepelin
    I'm about to translate all time zones to Russian and I've done such things: model: # lib/i18n_time_zone.rb class I18nTimeZone < ActiveSupport::TimeZone def self.all super.map { |z| create(z.name, z.utc_offset) } end def to_s translated_name = I18n.t(name, :scope => :timezones, :default => name) "(GMT#{formatted_offset}) #{translated_name}" end end view: <%= time_zone_select :user, :time_zone, nil, :model => I18nTimeZone %> locale file (/config/locales/ru.yml): ru: timezones: "Midway Island": "??????" "Samoa": "?????" .... But there are cases when original string includes some dots (".") Like "St. Petersburg" And I18n.t() tells me that translation is missing. How can I avoid it?

    Read the article

  • No supported translation to SQL

    - by derans
    We have this code: private IList<InfoRequest> GetBy(Func<InformationRequest, string> func, string searchby) { var requests = _dc.InformationRequests .Where(x => func.Invoke(x).Contains(searchby)) .OrderBy(y => y.RequestDate); return Mapper.Map<InformationRequest[], InfoRequest[]>(requests.ToArray()); } It continues to throw the no supported translation to SQL error. Any ideas on the problem or how to resolve it?

    Read the article

  • Proper Translation of equation to C#

    - by Shykin
    I am trying to replicate this equation: Slope(b) = (NSXY - (SX)(SY)) / (NSX2 - (SX)2) in C# but I'm getting the following issue: If I make the average of X = 1 + 2 + 3 + 4 + 5 and the average Y = 5 + 4 + 3 + 2 + 1 it gives me a positive slope even though it is clearly counting down. If I place the same numbers into this calculator: http://www.easycalculation.com/statistics/regression.php It gives me a negative slope in the linked calculator with the same data. I'm trying to narrow down the reasons so is the following a proper translation from equation to C# code: Slope(b) = (NSXY - (SX)(SY)) / (NSX2 - (SX)2) to Slope (m) = ((x * avgX * avgY) - (avgX * avgY)) / ((x * Math.Pow(avgX, 2)) - Math.Pow(avgX, 2));

    Read the article

  • When reversing a Google Analytics e-commerce transaction is the per-unit price positive or negative?

    - by Michael Glenn
    Google's own instructions for reversing an e-commerce transaction seem to contradict themselves regarding the unit price. In the instructions it states The item field has a positive per-unit price and a negative quantity. yet, the code sample has a negative per-unit price and negative quantity. _gaq.push(['_addItem', '1234', // order ID - necessary to associate item with transaction 'DD44', // SKU/code - required 'T-Shirt', // product name 'Olive Medium', // category or variation '-11.99', // unit price - required '-1' // quantity - required ]); Which is correct?

    Read the article

  • PerlRegEx vs RegularExpressionsCore Delphi Units

    - by Jan Goyvaerts
    The RegularExpressionsCore unit that is part of Delphi XE is based on the latest class-based PerlRegEx unit that I developed. Embarcadero only made a few changes to the unit. These changes are insignificant enough that code written for earlier versions of Delphi using the class-based PerlRegEx unit will work just the same with Delphi XE. The unit was renamed from PerlRegEx to RegularExpressionsCore. When migrating your code to Delphi XE, you can choose whether you want to use the new RegularExpressionsCore unit or continue using the PerlRegEx unit in your application. All you need to change is which unit you add to the uses clause in your own units. Indentation and line breaks in the code were changed to match the style used in the Delphi RTL and VCL code. This does not change the code, but makes it harder to diff the two units. Literal strings in the unit were separated into their own unit called RegularExpressionsConsts. These strings are only used for error messages that indicate bugs in your code. If your code uses TPerlRegEx correctly then the user should not see any of these strings. My code uses assertions to check for out of bounds parameters, while Embarcadero uses exceptions. Again, if you use TPerlRegEx correctly, you should never get any assertions or exceptions. The Compile method raises an exception if the regular expression is invalid in both my original TPerlRegEx component and Embarcadero’s version. If your code allows the user to provide the regular expression, you should explicitly call Compile and catch any exceptions it raises so you can tell the user there is a problem with the regular expression. Even with user-provided regular expressions, you shouldn’t get any other assertions or exceptions if your code is correct. Note that Embarcadero owns all the rights to their RegularExpressionsCore unit. Like all the other RTL and VCL units, this unit cannot be distributed by myself or anyone other than Embarcadero. I do retain the rights to my original PerlRegEx unit which I will continue to make available for those using older versions of Delphi.

    Read the article

  • PHP unable to start if "apc.shm_size" has "M" or "G" unit

    - by apasajja
    Using: Ubuntu 10.04, PHP 5.3.10, apc 3.1.3 PHP and APC installed using below repo: deb http://ppa.launchpad.net/brianmercer/php5/ubuntu lucid main deb-src http://ppa.launchpad.net/brianmercer/php5/ubuntu lucid main If I put apc.shm_size=3G or apc.shm_size=3000M in /etc/php5/fpm/conf.d/apc.ini, PHP unable to start. However, if I put only number without M or G unit, it will start and run. By default, if put only number, what unit is it means? It I put 3000 does it means 3000 MB?

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >