Search Results

Search found 2253 results on 91 pages for 'constant dean'.

Page 8/91 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Uninitialized constant Encoding with sqlite3-ruby on windows

    - by Ben Scheirman
    On a new machine, installed ruby with the 1-click installer for windows. Installed rails 2.3.2 and all associated gems, then I installed the sqlite3 binaries (into the c:\ruby\bin folder). Lastly I did gem install sqlite3-ruby -v=1.2.3 (which is apparently the latest version that works with windows) This error happens when I run rake db:migrate or when any ActiveRecord object is touched at runtime. The error looks like this: ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate rake aborted! **uninitialized constant Encoding** <---- Any help resolving this error would be greatly appreciated! Trace: C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:443:in `load_missing_constant' C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:80:in `const_missing' C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:92:in `const_missing' C:/Ruby/lib/ruby/gems/1.8/gems/sqlite3-0.0.3/lib/sqlite3/encoding.rb:9:in `find' C:/Ruby/lib/ruby/gems/1.8/gems/sqlite3-0.0.3/lib/sqlite3/database.rb:69:in `initialize' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:13:in `new' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:13:in `sqlite3_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout' C:/Ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:435:in `initialize' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:400:in `new' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:400:in `up' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:383:in `migrate' C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/tasks/databases.rake:116 C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' C:/Ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 C:/Ruby/bin/rake:19:in `load' C:/Ruby/bin/rake:19

    Read the article

  • When using Bundler and Rails 2.3.5 I get uninitialized constant SubdomainFu when migrating

    - by user347480
    Hi I'm using bundler with rails 2.3.5 and I'm trying to make sure everything is working correctly but when I do a "rake db:migrate --trace" I get this ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! uninitialized constant SubdomainFu /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:443:inload_missing_constant' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in const_missing' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:inconst_missing' /Users/node/Projects/Race-RX/config/initializers/subdomain_config.rb:1 /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in load_without_new_constant_marking' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:inload' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in new_constants_in' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:inload' /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:622:in load_application_initializers' /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:621:ineach' /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:621:in load_application_initializers' /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:176:inprocess' /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in send' /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:inrun' /Users/node/Projects/Race-RX/config/environment.rb:9 /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:innew_constants_in' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require' /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/misc.rake:4 /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:incall' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:ineach' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain' /opt/local/lib/ruby/1.8/monitor.rb:242:in synchronize' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in invoke_prerequisites' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:ineach' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in invoke_prerequisites' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:ininvoke_with_call_chain' /opt/local/lib/ruby/1.8/monitor.rb:242:in synchronize' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in invoke' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:ineach' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:inrun' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:inrun' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /opt/local/bin/rake:19:in load' /opt/local/bin/rake:19 I don't know what could be causing this. I did however but my require "rubygems" require "bundler" Bundler.setup in my enviroment.rb file but that doesn't see to be the problem.

    Read the article

  • Uninitialized constant Item::Types

    - by Rasmus
    Hi! First of, im a newbie ruby programmer so please bare with me if this is a very dumb question. I get this uninitialized constant error when i submit my nested forms. order.rb class Order < ActiveRecord::Base has_many :items, :dependent => :destroy has_many :types, :through => :items accepts_nested_attributes_for :items accepts_nested_attributes_for :types validates_associated :items validates_associated :types end item.rb class Item < ActiveRecord::Base has_one :types belongs_to :order accepts_nested_attributes_for :types validates_associated :types end type.rb class Type < ActiveRecord::Base belongs_to :items belongs_to :orders end new.erb.html <% form_for @order do |f| %> <%= f.error_messages %> <% f.fields_for :items do |builder| %> <table border="0"> <th>Type</th> <th>Amount</th> <th>Text</th> <th>Price</th> <tr> <% f.fields_for :type do |m| %> <td> <%= m.collection_select :type, Type.find(:all, :order => "created_at DESC"), :id, :name, {:prompt => "Select a Type" }, {:id => "selector", :onchange => "type_change(this)"} %> </td> <% end %> <td> <%= f.text_field :amount, :id => "amountField", :onchange => "change_total_price()" %> </td> <td> <%= f.text_field :text, :id => "textField" %> </td> <td> <%= f.text_field :price, :class => "priceField", :onChange => "change_total_price()" %> </td> <td> <%= link_to_remove_fields "Remove Item", f %> </td> </tr> </table> <% end %> <p><%= link_to_add_fields "Add Item", f, :items %></p> <p> <%= f.label :total_price %><br /> <%= f.text_field :total_price, :class => "priceField", :id => "totalPrice" %> </p> <p><%= f.submit "Create"%></p> <% end %> <%= link_to 'Back', orders_path %> create method in orders_controller.rb def create @order = Order.new(params[:order]) respond_to do |format| if @order.save flash[:notice] = 'Post was successfully created.' format.html { redirect_to(@order) } format.xml { render :xml => @order, :status => :created, :location => @order } else format.html { render :action => "new" } format.xml { render :xml => @order.errors, :status => :unprocessable_entity } end end end Hopefully you can see what i cant

    Read the article

  • Initializing a Global Struct in C

    - by Scott
    What is the best way to accomplish the following in C? #include <stdio.h> struct A { int x; }; struct A createA(int x) { struct A a; a.x = x; return a; } struct A a = createA(42); int main(int argc, char** argv) { printf("%d\n", a.x); return 0; } When I try to compile the above code, the compiler reports the following error: "initializer element is not constant" The bad line is this one: struct A a = createA(42); Can someone explain what is wrong? I'm not very experienced in C. Thanks!

    Read the article

  • Objective C defining UIColor constants

    - by futureelite7
    Hi, I have a iPhone application with a few custom-defined colors for my theme. Since these colors will be fixed for my UI, I would like to define the colors in a class to be included (Constants.h and Constants.m). How do I do that? (Simply defining them does not work because UIColors are mutable, and would cause errors - Initalizer not constant). /* Constants.h */ extern UIColor *test; /* Constants.m */ UIColor *test = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]; Thanks!

    Read the article

  • Configurable ruby logger setup: Logger.new().level = variable

    - by Daniel
    Hi, I want to change the logging level of an application (ruby). require 'logger' config = { :level => 'Logger::WARN' } log = Logger.new STDOUT log.level = Kernel.const_get config[:level] Well, the irb wasn't happy with that and threw "NameError: wrong constant name Logger::WARN" in my face. Ugh! I was insulted. I could do this in a case/when to solve this, or do log.level = 1, but there must be a more elegant way! Does anyone have any ideas? -daniel

    Read the article

  • Rails 3: config/initializers errors for gem configuration

    - by neezer
    I'm trying to setup this plugin (Crumble), and the docs say I need to add a configuration file for the plugin in config/initializers/ like this (breadcrumb.rb): Breadcrumb.configure do ... end I add in my directives in that block, and reloaded the page, and I'm immediately greeted with a Passenger error: uninitialized constant Breadcrumb What am I missing here? gem list shows Crumble as installed, and if I launch IRB I can require 'crumble' successfully. I remember doing this just fine in Rails 2.3.5. Here's my setup: rails 3.0.0.beta3 ruby 1.9.1p378 (via RVM) passenger 2.2.11 (with Apache2) crumble 0.1.2 I've been trying to read the Rails 3 release notes to see if they've changed anything that would affect this, but so far I haven't found anything to suggest that the above shouldn't work. I'd appreciate any guidance you could spare me!

    Read the article

  • What is the problem with this code?

    - by Giffyguy
    The compile error I'm getting is "newline in constant" The error occurs where the four asterisks are (****). I can't debug, because the solution won't build successfully. <script type="text/javascript"> function TNClicked(fullImgURL, TNID) { document.getElementById("<%= this.imgFull.ClientID %>").src = fullImgURL; var pnlFullImage = document.getElementById("<%= this.pnlFullImage.ClientID %>"); if (pnlFullImage.style.visibility != "visible") pnlFullImage.style.visibility = "visible"; document.getElementById("<%= this.tcImage.ClientID %>").innerHTML = TNID; //document.forms[0].ctl00$ctl00$ctl00$cntBody$hfImage.value = TNID; //****document.getElementById("<%= this.hfImage").setAttribute("value", TNID); //document.getElementById("<%= this.hfImage.ClientID %>").value = TNID; } </script>

    Read the article

  • Why isn't one of the constant buffers being loaded inside the shader?

    - by Paul Ske
    I however got the model to load under tessellation; only problem is that one of the constant buffers aren't actually updating the shader's tessellation factor inside the hullshader. I created a messagebox at the rendering point so I know for sure the tessellation factor is assigned to the dynamic constant buffer. Inside the shader code where it says .Edges[1] = tessellationAmount; the tessellationAmount is suppose to be sent from the dynamic buffer to the shader. Otherwise it's just a plain box. In better explanation; there's a matrixBuffer, cameraBuffer, TessellationBuffer for constant. There's a multiBuffer array that assigns the matrix, camera, tesselation. So, when I set the Hull Shader, PixelShader, VertexShader, DomainShader it gets assigned by the multibuffer. E.G. devcon-HSSetConstantBuffers(0,3,multibuffer); The only way around the whole ideal would be to go in the shader and change how much the edges tessellate and inside the edges as well with the same number. My question is why wouldn't the tessellationBuffer not work in the shader?

    Read the article

  • Debuild fails to make package for bluelog-1.04

    - by Dean Howell
    When trying to build a package for bluelog, Debuild give several errors. In the past, I've used checkinstall to quickly build crude packages. I am now trying to do it the right way and upload to a PPA. Bluelog can be found here: http://www.digifail.com/software/bluelog.shtml Here is the output from debuild; dpkg-buildpackage -rfakeroot -D -us -uc dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): -D_FORTIFY_SOURCE=2 dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2 dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions -Wl,-z,relro dpkg-buildpackage: source package bluelog dpkg-buildpackage: source version 1.0.4-0ubuntu1 dpkg-buildpackage: source changed by Dean Howell <dean@unknown> dpkg-source --before-build bluelog dpkg-buildpackage: host architecture amd64 fakeroot debian/rules clean dh clean dh_testdir dh_auto_clean make[1]: Entering directory `/home/dean/Launchpad Builds/bluelog/bluelog' rm -rf bluelog www/cgi-bin/* *.o *.txt *.log *.gz *.cgi make[1]: Leaving directory `/home/dean/Launchpad Builds/bluelog/bluelog' dh_clean dpkg-source -b bluelog dpkg-source: warning: Version number suggests Ubuntu changes, but Maintainer: does not have Ubuntu address dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field dpkg-source: info: using source format `3.0 (quilt)' dpkg-source: info: building bluelog using existing ./bluelog_1.0.4.orig.tar.gz dpkg-source: error: cannot represent change to bluelog/Builds/bluelog/bluelog/debian/bluelog/usr/bin/bluelog: binary file contents changed dpkg-source: error: add Builds/bluelog/bluelog/debian/bluelog/usr/bin/bluelog in debian/source/include-binaries if you want to store the modified binary in the debian tarball dpkg-source: error: unrepresentable changes to source dpkg-buildpackage: error: dpkg-source -b bluelog gave error exit status 2

    Read the article

  • xcode - defining integer constant

    - by Mike
    If I have #define myConstant 10 and later I use this as in [self doSomething: myConstant]; Supposing doSomething method is like - (void) doSomething:(int)myNumber; I receive a warning telling me "expected expression before int" why is that and how to solve this? thanks for any help.

    Read the article

  • Constant Memory Leak in SpeechSynthesizer

    - by DudeFX
    I have developed a project which I would like to release which uses c#, WPF and the System.Speech.Synthesizer object. The issue preventing the release of this project is that whenever SpeakAsync is called it leaves a memory leak that grows to the point of eventual failure. I believe I have cleaned up properly after using this object, but cannot find a cure. I have run the program through Ants Memory Profiler and it reports that WAVEHDR and WaveHeader is growing with each call. I have created a sample project to try to pinpoint the cause, but am still at a loss. Any help would be appreciated. The project uses VS2008 and is a c# WPF project that targets .NET 3.5 and Any CPU. You need to manually add a reference to System.Speech. Here is the Code: <Window x:Class="SpeechTest.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid> <StackPanel Orientation="Vertical"> <Button Content="Start Speaking" Click="Start_Click" Margin="10" /> <Button Content="Stop Speaking" Click="Stop_Click" Margin="10" /> <Button Content="Exit" Click="Exit_Click" Margin="10"/> </StackPanel> </Grid> // Start of code behind using System; using System.Windows; using System.Speech.Synthesis; namespace SpeechTest { public partial class Window1 : Window { // speak setting private bool speakingOn = false; private int curLine = 0; private string [] speakLines = { "I am wondering", "Why whenever Speech is called", "A memory leak occurs", "If you run this long enough", "It will eventually crash", "Any help would be appreciated" }; public Window1() { InitializeComponent(); } private void Start_Click(object sender, RoutedEventArgs e) { speakingOn = true; SpeakLine(); } private void Stop_Click(object sender, RoutedEventArgs e) { speakingOn = false; } private void Exit_Click(object sender, RoutedEventArgs e) { App.Current.Shutdown(); } private void SpeakLine() { if (speakingOn) { // Create our speak object SpeechSynthesizer spk = new SpeechSynthesizer(); spk.SpeakCompleted += new EventHandler(spk_Completed); // Speak the line spk.SpeakAsync(speakLines[curLine]); } } public void spk_Completed(object sender, SpeakCompletedEventArgs e) { if (sender is SpeechSynthesizer) { // get access to our Speech object SpeechSynthesizer spk = (SpeechSynthesizer)sender; // Clean up after speaking (thinking the event handler is causing the memory leak) spk.SpeakCompleted -= new EventHandler(spk_Completed); // Dispose the speech object spk.Dispose(); // bump it curLine++; // check validity if (curLine = speakLines.Length) { // back to the beginning curLine = 0; } // Speak line SpeakLine(); } } } } I run this program on Windows 7 64 bit and it will run and eventually halt when attempting to create a new SpeechSynthesizer object. When run on Windows Vista 64 bit the memory will grow from a starting point of 34k to so far about 400k and growing. Can anyone see anything in the code that might be causing this, or is this an issue with the Speech object itself. Any help would be appreciated.

    Read the article

  • php constant with gettext

    - by wesamly
    I am using config file which contains: config.php define('SYS_TITLE','My Application Title'); I load language local for gettext based on SESSION variable in another file included after the config file is loaded. something like: echo _(SYS_TITLE); What is the best way to translate the SYS_TITLE without changing much of the code.

    Read the article

  • Constant error in compiler using C#'s provided objects

    - by dotnetdev
    I have used the built in C# methods to write a compiler, like the following: CodeDomProvider codeProvider = CodeDomProvider.CreateProvider("CSharp"); string Output = "Out.exe"; Button ButtonObject = (Button)sender; this.RadTextBox1.Text = string.Empty; System.CodeDom.Compiler.CompilerParameters parameters = new CompilerParameters(); //Make sure we generate an EXE, not a DLL parameters.GenerateExecutable = true; parameters.OutputAssembly = Output; CompilerResults results = codeProvider.CompileAssemblyFromSource(parameters, RadTextBox1.Text); if (results.Errors.Count > 0) { RadTextBox2.ForeColor = Color.Red; foreach (CompilerError CompErr in results.Errors) { RadTextBox2.Text = RadTextBox2.Text + "Line number " + CompErr.Line + ", Error Number: " + CompErr.ErrorNumber + ", '" + CompErr.ErrorText + ";" + Environment.NewLine + Environment.NewLine; } } else { //Successful Compile RadTextBox2.ForeColor = Color.Blue; Guid guid = Guid.NewGuid(); string PathToExe = Server.MapPath(Path.Combine(@"\Compiled" , Output)); FileStream fs = System.IO.File.Create(PathToExe); using (StreamWriter sw = new StreamWriter(fs)) { sw.Write(RadTextBox1.Text); } Response.WriteFile(PathToExe); When I run this code and write a Main method (such as the code sample in http://msdn.microsoft.com/en-us/library/ms228506(VS.80).aspx, I get this error: Line number 0, Error Number: CS5001, 'Program 'c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Out.exe' does not contain a static 'Main' method suitable for an entry point; The code above is used as the basis of a compiler on my site (not yet live). So you type in code and generate an .exe assembly. But when I enter code into the textbox for code writing (Radtextbox1), even with a main method, I get the error. What gives? Thanks

    Read the article

  • Installing Wordpress - constant PHP/MySQL extension appears missing

    - by Driss Zouak
    I've got Win2003 w/IIS6, PHP 5 and MySQL installed. I can confirm PHP is installed correctly because I have a testMe.php that runs properly. When I run the Wordpress setup, I get informed that Your PHP installation appears to be missing the MySQL extension which is required by WordPress. But in my PHP.ini in the DYNAMIC EXTENSIONS section I have extension=php_mysql.dll extension=php_mysqli.dll I verified that mysql.dll and libmysql.dll are both in my PHP directory. I copied my libmysql.dll to the C:\Windows\System32 directory. When I try to run the initial setup for WordPress, I get this answer. I've Googled setting this up, and everything comes down to the above. I'm missing something, but none of the instructions that I've found online seem to cover whatever that is.

    Read the article

  • Template with constant expression: error C2975 with VC++2008

    - by Arman
    Hello, I am trying to use elements of meta programming, but hit the wall with the first trial. I would like to have a comparator structure which can be used as following: intersect_by<ID>(L1.data, L2.data, "By ID: "); intersect_by<IDf>(L1.data, L2.data, "By IDf: "); Where: struct ID{};// Tag used for original IDs struct IDf{};// Tag used for the file position //following Boost.MultiIndex examples template<typename Tag,typename MultiIndexContainer> void intersect_by( const MultiIndexContainer& L1,const MultiIndexContainer& L2,std::string msg, Tag* =0 /* fixes a MSVC++ 6.0 bug with implicit template function parms / ) { / obtain a reference to the index tagged by Tag */ const typename boost::multi_index::index<MultiIndexContainer,Tag>::type& L1_ID_index= get<Tag>(L1); const typename boost::multi_index::index<MultiIndexContainer,Tag>::type& L2_ID_index= get<Tag>(L2); std::set_intersection( L1_ID_index.begin(), L1_ID_index.end(), L2_ID_index.begin(), L2_ID_index.end(), std::inserter(s, s.begin()), strComparator() // Here I get the C2975 error ); } template<int N> struct strComparator; template<> struct strComparator<0>{ bool operator () (const particleID& id1, const particleID& id2) const { return id1.ID struct strComparator<1{ bool operator () (const particleID& id1, const particleID& id2) const { return id1.IDf }; What I am missing? kind regards Arman.

    Read the article

  • NameError: uninitialized constant Nokogiri::HTML::DocumentFragment

    - by Mike Sutton
    About three hours ago I started seeing the above error in my production server. It comes from a call to the sanitize gem: vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:276:in 'load_missing_constant' vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:468:in `const_missing' vendor/gems/sanitize-1.2.0/lib/sanitize.rb:91:in `clean!' vendor/gems/sanitize-1.2.0/lib/sanitize.rb:84:in `clean' vendor/gems/sanitize-1.2.0/lib/sanitize.rb:49:in `clean' app/helpers/application_helper.rb:28:in `display_none' app/views/main/_blogs.html.erb:13:in `_run_erb_47app47views47main47_blogs46html46erb' The error only occurs on the production server (linux), not my development machine (windows) I tried rolling back my latest deployment but it didn't fix it. I've updated to sanitize 1.2.0 (which was the latest version brought down by gem update sanitize, though I note my host is running 1.3.6. Can anyone provide any clues to help fix this?

    Read the article

  • Inline instantiation of a constant List

    - by Roflcoptr
    I try to do something like this: public const List<String> METRICS = new List<String>() { SourceFile.LOC, SourceFile.MCCABE, SourceFile.NOM, SourceFile.NOA, SourceFile.FANOUT, SourceFile.FANIN, SourceFile.NOPAR, SourceFile.NDC, SourceFile.CALLS }; But unfortunately this doesn't work: FileStorer.METRICS' is of type 'System.Collections.Generic.List<string>'. A const field of a reference type other than string can only be initialized with null. How can I solve this problem?

    Read the article

  • uninitialized constant Test::Unit::TestResult::TestResultFailureSupport

    - by Vitaly Kushner
    I get the error in subj when I'm trying to run specs or generators in a fresh rails project. This happens when I add shoulda to the mix. I added the following in the config/environment.rb: config.gem 'rspec', :version => '1.2.6', :lib => false config.gem 'rspec-rails', :version => '1.2.6', :lib => false config.gem "thoughtbot-shoulda", :version => "2.10.2", :lib => 'shoulda', :source => "http://gems.github.com" I'm on OSX. ruby 1.8.6 (2008-08-11 patchlevel 287) gems 1.3.5 rails 2.3.4 rspec - 1.2.6 shoulda - 2.10.2 test-unit - 2.0.3 I'm aware of this and adding config.gem 'test-unit', :lib => 'test/unit' indeed solves the genrator problem as it doesn't throw an exception, but it prints 0 tests, 0 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications at the end of the run so I suppose it tries to run tests which is unexpected and undesired, also the specs stop to run at all, seems like rspec is not running at all, when running rake spec I get the test-unit output again (with 0 tests as there are only specs, no tests defined)

    Read the article

  • Optional Argument: compile time constant issue

    - by Jack
    Why is this working: public int DoesEmailAddressExistsExcludingEmailAddressID( string emailAddress, string invitationCode, int emailAddressID = 0, int For = (int) Enums.FOR.AC) whereas this doesn't public int DoesEmailAddressExistsExcludingEmailAddressID( string emailAddress, string invitationCode, int emailAddressID = 0, int For = Enums.FOR.AC.GetHashCode()) where AC is enum. Can enums's hashcode change at runtime?

    Read the article

  • Constant Expected "{" before ")" token

    - by Thijs
    I've got a little problem. I am applying some changes to an iOS program i wrote, but I've struck a problem. I constantly get a "Expected '{' before ')' token" warning, but my coding skills aren't good enough to find the problem. A little help would greatly be appreciated. #import "Search.h" #import "RootViewController.h" //button - (IBAction)buttonPressed)sender{ RootViewController *newview = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.5]; [UIView setAnimationTransition:UIViewAnimationTransitionFl ipFromRight forView:self.view cache:YES]; [self.view addSubview:newview.view]; [UIView commitAnimations]; @implementation Search @end

    Read the article

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