Search Results

Search found 342 results on 14 pages for 'initializer'.

Page 1/14 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Spork servers super slow (>3m) to start for RSpec & Cucumber BDD

    - by Eric M.
    I recently installed a fresh development setup on my laptop and now notice that my instances of spork take several minutes to start up. This is also most likely of the RSpec and Cucumber tests start up times running super slow. I ran in diagnostic mode with the -d flag and received the output below. Anyone have a clue why this is suddenly happening? Spork Diagnosis - -- Summary -- config/boot.rb config/environment.rb config/initializers/backtrace_silencers.rb config/initializers/devise.rb config/initializers/hoptoad.rb config/initializers/inflections.rb config/initializers/mime_types.rb config/initializers/new_rails_defaults.rb config/initializers/session_store.rb spec/spec_helper.rb -- Detail -- --- config/boot.rb --- config/environment.rb:7 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/environment.rb --- spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/backtrace_silencers.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/devise.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/hoptoad.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/inflections.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/mime_types.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/new_rails_defaults.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/session_store.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- spec/spec_helper.rb ---

    Read the article

  • Objective-c class initializer executes multiple times

    - by apisip
    Unless I misunderstood it, this LINK from Apple's documentation clearly states that the class initializer, "+ (void)initialize)", only executes once per class. Here is the excerpt: Special Considerations initialize it is invoked only once per class. If you want to perform independent initialization for the class and for categories of the class, you should implement load methods. However, I'm getting a weird behavior on my project and the initializer is being executed twice. So I have to check if _classContext is null. I only got one class that has this method. What are the possible reasons why this is happening? I'm using XCode 4.5.2 and OS X 10.8.2. I got multiple iOS simulators, iPhone 5.1 and 6.0. + (void) initialize { num++; NSLog([NSString stringWithFormat:@"Times: %i", num]); if(_classContext == nil) _classContext = [[myClass alloc] init]; }

    Read the article

  • C++ Constructor Initializer List - using member functions of initialized members

    - by Andy
    I've run into the following a few times with initializer lists and I've never been able to explain it well. Can anyone explain why exactly the following fails (I don't have a compiler to catch typos, so bear with me): class Foo { public: Foo( int i ) : m_i( i ) {} //works with no problem int getInt() {return m_i;} ~Foo {} private: int m_i; }; class Bar { public: Bar() : m_foo( 5 ), //this is ok m_myInt( m_foo.getInt() ) //runtime error, seg 11 {} ~Bar() {} private: Foo m_foo; int m_myInt; }; When trying to call member functions of members initialized higher up the initializer list, I get seg faults. I seem to recall this is a known problem (or perhaps somehow by design) but I've never seen it well described. The attached example is contrived with plain old data types, but substitute the Bar::m_myInt with another object lacking a default (empty) constructor and the issue is more real. Can anyone enlighten me? Thanks!

    Read the article

  • Object initializer with explicit interface in C#

    - by Ben Aston
    How can I use an object initializer with an explicit interface implementation in C#? public interface IType { string Property1 { get; set; } } public class Type1 : IType { string IType.Property1() { get; set; } } ... //doesn't work var v = new Type1 { IType.Property1 = "myString" };

    Read the article

  • Throw exception from initializer list

    - by aaa
    hello. what is the best way to throw exception from initializer list? for example: class C { T0 t0; // can be either valid or invalid, but does not throw directly T1 t1; // heavy object, do not construct if t0 is invalid, by throwing before C(int n) : t0(n), // throw exception if t0(n) is not valid t1() {} }; I thought maybe making wrapper, e.g. t0(throw_if_invalid(n)). What is the practice to handle such cases? Thanks

    Read the article

  • C++, throw exception from initializer list

    - by aaa
    hello. what is the best way to throw exception from initializer list? for example: class C { T0 t0; // can be either valid or invalid, but does not throw directly T1 t1; // heavy object, do not construct if t0 is invalid, by throwing before C(int n) : t0(n), // throw exception if t0(n) is not valid t1() {} }; I thought maybe making wrapper, e.g. t0(throw_if_invalid(n)). What is the practice to handle such cases? Thanks

    Read the article

  • Possible compiler bug in MSVC12 (VS2013) with designated initializer

    - by diapir
    Using VS2013 Update 2, I've stumbled on some strange error message : // test.c int main(void) { struct foo { int i; float f; }; struct bar { unsigned u; struct foo foo; double d; }; struct foo some_foo = { .i = 1, .f = 2.0 }; struct bar some_bar = { .u = 3, // error C2440 : 'initializing' : cannot convert from 'foo' to 'int' .foo = some_foo, .d = 4.0 }; // Works fine some_bar.foo = some_foo; return 0; } Both GCC and Clang accept it. Am I missing something or does this piece of code exposes a compiler bug ? EDIT : Duplicate: Initializing struct within another struct using designated initializer causes compile error in Visual Studio 2013

    Read the article

  • Why won't xattr PECL extension build on 12.10?

    - by Dan Jones
    I was using the xattr pecl extension in 12.04 (in fact, I think since 10.04) without problem. Not surprisingly, I had to reinstall it after upgrading to 12.10 because of the new version of PHP. But now it fails to build, and I can't figure out why. Other PECL extensions have built fine. And I have libattr1 and libattr1-dev installed. Here's the output from the build: downloading xattr-1.1.0.tgz ... Starting to download xattr-1.1.0.tgz (5,204 bytes) .....done: 5,204 bytes 3 source files, building running: phpize Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525 libattr library installation dir? [autodetect] : building in /tmp/pear/temp/pear-build-rootdSMx0G/xattr-1.1.0 running: /tmp/pear/temp/xattr/configure --with-xattr checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib checking for PHP extension directory... /usr/lib/php5/20100525 checking for PHP installed headers prefix... /usr/include/php5 checking if debug is enabled... no checking if zts is enabled... no checking for re2c... re2c checking for re2c version... 0.13.5 (ok) checking for gawk... gawk checking for xattr support... yes, shared checking for xattr files in default path... found in /usr checking for attr_get in -lattr... yes checking how to print strings... printf checking for a sed that does not truncate output... (cached) /bin/sed checking for fgrep... /bin/grep -F checking for ld used by cc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking for gawk... (cached) gawk checking command to parse /usr/bin/nm -B output from cc object... ok checking for sysroot... no checking for mt... mt checking if mt is a manifest tool... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if cc supports -fno-rtti -fno-exceptions... no checking for cc option to produce PIC... -fPIC -DPIC checking if cc PIC flag -fPIC -DPIC works... yes checking if cc static flag -static works... yes checking if cc supports -c -o file.o... yes checking if cc supports -c -o file.o... (cached) yes checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating ./config.status config.status: creating config.h config.status: executing libtool commands running: make /bin/bash /tmp/pear/temp/pear-build-rootdSMx0G/xattr-1.1.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/xattr -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootdSMx0G/xattr-1.1.0/include -I/tmp/pear/temp/pear-build-rootdSMx0G/xattr-1.1.0/main -I/tmp/pear/temp/xattr -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/xattr/xattr.c -o xattr.lo libtool: compile: cc -I. -I/tmp/pear/temp/xattr -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootdSMx0G/xattr-1.1.0/include -I/tmp/pear/temp/pear-build-rootdSMx0G/xattr-1.1.0/main -I/tmp/pear/temp/xattr -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/xattr/xattr.c -fPIC -DPIC -o .libs/xattr.o /tmp/pear/temp/xattr/xattr.c:50:1: error: unknown type name 'function_entry' /tmp/pear/temp/xattr/xattr.c:51:2: warning: braces around scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: (near initialization for 'xattr_functions[0]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: initialization makes integer from pointer without a cast [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: (near initialization for 'xattr_functions[0]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: error: initializer element is not computable at load time /tmp/pear/temp/xattr/xattr.c:51:2: error: (near initialization for 'xattr_functions[0]') /tmp/pear/temp/xattr/xattr.c:51:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: (near initialization for 'xattr_functions[0]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: (near initialization for 'xattr_functions[0]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: (near initialization for 'xattr_functions[0]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: (near initialization for 'xattr_functions[0]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: braces around scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: (near initialization for 'xattr_functions[1]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: initialization makes integer from pointer without a cast [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: (near initialization for 'xattr_functions[1]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: error: initializer element is not computable at load time /tmp/pear/temp/xattr/xattr.c:52:2: error: (near initialization for 'xattr_functions[1]') /tmp/pear/temp/xattr/xattr.c:52:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: (near initialization for 'xattr_functions[1]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: (near initialization for 'xattr_functions[1]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: (near initialization for 'xattr_functions[1]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: (near initialization for 'xattr_functions[1]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: braces around scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: (near initialization for 'xattr_functions[2]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: initialization makes integer from pointer without a cast [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: (near initialization for 'xattr_functions[2]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: error: initializer element is not computable at load time /tmp/pear/temp/xattr/xattr.c:53:2: error: (near initialization for 'xattr_functions[2]') /tmp/pear/temp/xattr/xattr.c:53:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: (near initialization for 'xattr_functions[2]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: (near initialization for 'xattr_functions[2]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: (near initialization for 'xattr_functions[2]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: (near initialization for 'xattr_functions[2]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: braces around scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: (near initialization for 'xattr_functions[3]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: initialization makes integer from pointer without a cast [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: (near initialization for 'xattr_functions[3]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: error: initializer element is not computable at load time /tmp/pear/temp/xattr/xattr.c:54:2: error: (near initialization for 'xattr_functions[3]') /tmp/pear/temp/xattr/xattr.c:54:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: (near initialization for 'xattr_functions[3]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: (near initialization for 'xattr_functions[3]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: (near initialization for 'xattr_functions[3]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: (near initialization for 'xattr_functions[3]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: braces around scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: (near initialization for 'xattr_functions[4]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: initialization makes integer from pointer without a cast [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: (near initialization for 'xattr_functions[4]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: error: initializer element is not computable at load time /tmp/pear/temp/xattr/xattr.c:55:2: error: (near initialization for 'xattr_functions[4]') /tmp/pear/temp/xattr/xattr.c:55:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: (near initialization for 'xattr_functions[4]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: (near initialization for 'xattr_functions[4]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: (near initialization for 'xattr_functions[4]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: (near initialization for 'xattr_functions[4]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: braces around scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: (near initialization for 'xattr_functions[5]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: initialization makes integer from pointer without a cast [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: (near initialization for 'xattr_functions[5]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: (near initialization for 'xattr_functions[5]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: (near initialization for 'xattr_functions[5]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:67:2: warning: initialization from incompatible pointer type [enabled by default] /tmp/pear/temp/xattr/xattr.c:67:2: warning: (near initialization for 'xattr_module_entry.functions') [enabled by default] /tmp/pear/temp/xattr/xattr.c: In function 'zif_xattr_set': /tmp/pear/temp/xattr/xattr.c:122:49: error: 'struct _php_core_globals' has no member named 'safe_mode' /tmp/pear/temp/xattr/xattr.c:122:92: error: 'CHECKUID_DISALLOW_FILE_NOT_EXISTS' undeclared (first use in this function) /tmp/pear/temp/xattr/xattr.c:122:92: note: each undeclared identifier is reported only once for each function it appears in /tmp/pear/temp/xattr/xattr.c: In function 'zif_xattr_get': /tmp/pear/temp/xattr/xattr.c:171:49: error: 'struct _php_core_globals' has no member named 'safe_mode' /tmp/pear/temp/xattr/xattr.c:171:92: error: 'CHECKUID_DISALLOW_FILE_NOT_EXISTS' undeclared (first use in this function) /tmp/pear/temp/xattr/xattr.c:187:2: warning: passing argument 4 of 'attr_get' from incompatible pointer type [enabled by default] In file included from /tmp/pear/temp/xattr/xattr.c:37:0: /usr/include/attr/attributes.h:122:12: note: expected 'int *' but argument is of type 'size_t *' /tmp/pear/temp/xattr/xattr.c:198:3: warning: passing argument 4 of 'attr_get' from incompatible pointer type [enabled by default] In file included from /tmp/pear/temp/xattr/xattr.c:37:0: /usr/include/attr/attributes.h:122:12: note: expected 'int *' but argument is of type 'size_t *' /tmp/pear/temp/xattr/xattr.c: In function 'zif_xattr_supported': /tmp/pear/temp/xattr/xattr.c:243:49: error: 'struct _php_core_globals' has no member named 'safe_mode' /tmp/pear/temp/xattr/xattr.c:243:92: error: 'CHECKUID_DISALLOW_FILE_NOT_EXISTS' undeclared (first use in this function) /tmp/pear/temp/xattr/xattr.c: In function 'zif_xattr_remove': /tmp/pear/temp/xattr/xattr.c:288:49: error: 'struct _php_core_globals' has no member named 'safe_mode' /tmp/pear/temp/xattr/xattr.c:288:92: error: 'CHECKUID_DISALLOW_FILE_NOT_EXISTS' undeclared (first use in this function) /tmp/pear/temp/xattr/xattr.c: In function 'zif_xattr_list': /tmp/pear/temp/xattr/xattr.c:337:49: error: 'struct _php_core_globals' has no member named 'safe_mode' /tmp/pear/temp/xattr/xattr.c:337:92: error: 'CHECKUID_DISALLOW_FILE_NOT_EXISTS' undeclared (first use in this function) make: *** [xattr.lo] Error 1 ERROR: `make' failed There seem to be a few errors, but I can't make heads or tails of them. Does this just not work properly in 12.10? That would be a big problem for me.

    Read the article

  • Simple Constructor With Initializer List? - C++

    - by Alex
    Hi all, below I've included my h file, and my problem is that the compiler is not liking my simple exception class's constructor's with initializer lists. It also is saying that string is undeclared identifier, even though I have #include <string> at the top of the h file. Do you see something I am doing wrong? For further explanation, this is one of my domain classes that I'm integrating into a wxWidgets GUI application on Windows. Thanks! Time.h #pragma once #include <string> #include <iostream> // global constants for use in calculation const int HOURS_TO_MINUTES = 60; const int MINUTES_TO_HOURS = 100; class Time { public: // default Time class constructor // initializes all vars to default values Time(void); // ComputeEndTime computes the new delivery end time // params - none // preconditions - vars will be error-free // postconditions - the correct end time will be returned as an int // returns an int int ComputeEndTime(); // GetStartTime is the getter for var startTime // params - none // returns an int int GetStartTime() { return startTime; } // GetEndTime is the getter for var endTime // params - none // returns an int int GetEndTime() { return endTime; } // GetTimeDiff is the getter for var timeDifference // params - none // returns a double double GetTimeDiff() { return timeDifference; } // SetStartTime is the setter for var startTime // params - an int // returns void void SetStartTime(int s) { startTime = s; } // SetEndTime is the setter for var endTime // params - an int // returns void void SetEndTime(int e) { endTime = e; } // SetTimeDiff is the setter for var timeDifference // params - a double // returns void void SetTimeDiff(double t) { timeDifference = t; } // destructor for Time class ~Time(void); private: int startTime; int endTime; double timeDifference; }; class HourOutOfRangeException { public: // param constructor // initializes message to passed paramater // preconditions - param will be a string // postconditions - message will be initialized // params a string // no return type HourOutOfRangeException(string pMessage) : message(pMessage) {} // GetMessage is getter for var message // params none // preconditions - none // postconditions - none // returns string string GetMessage() { return message; } // destructor ~HourOutOfRangeException() {} private: string message; }; class MinuteOutOfRangeException { public: // param constructor // initializes message to passed paramater // preconditions - param will be a string // postconditions - message will be initialized // params a string // no return type MinuteOutOfRangeException(string pMessage) : message(pMessage) {} // GetMessage is getter for var message // params none // preconditions - none // postconditions - none // returns string string GetMessage() { return message; } // destructor ~MinuteOutOfRangeException() {} private: string message; }; class PercentageOutOfRangeException { public: // param constructor // initializes message to passed paramater // preconditions - param will be a string // postconditions - message will be initialized // params a string // no return type PercentageOutOfRangeException(string pMessage) : message(pMessage) {} // GetMessage is getter for var message // params none // preconditions - none // postconditions - none // returns string string GetMessage() { return message; } // destructor ~PercentageOutOfRangeException() {} private: string message; }; class StartEndException { public: // param constructor // initializes message to passed paramater // preconditions - param will be a string // postconditions - message will be initialized // params a string // no return type StartEndException(string pMessage) : message(pMessage) {} // GetMessage is getter for var message // params none // preconditions - none // postconditions - none // returns string string GetMessage() { return message; } // destructor ~StartEndException() {} private: string message; };

    Read the article

  • Static initializer in Java

    - by Szere Dyeri
    My question is about one particular usage of static keyword. It is possible to use static keyword to cover a code block within a class which does not belong to any function. For example following code compiles: public class Test { private static final int a; static { a = 5; doSomething(a); } private static int doSomething(int x) { return (x+5); } } If you remove the static keyword it complains because the variable a is final. However it is possible to remove both final and static keywords and make it compile. It is confusing for me in both ways. How am I supposed to have a code section that does not belong to any method? How is it possible to invoke it? In general, what is the purpose of this usage? Or better, where can I find documentation about this?

    Read the article

  • c# object initializer complexity. best practice

    - by Andrew Florko
    I was too excited when object initializer appeared in C#. MyClass a = new MyClass(); a.Field1 = Value1; a.Field2 = Value2; can be rewritten shorter: MyClass a = new MyClass { Field1 = Value1, Field2 = Value2 } Object initializer code is more obvious but when properties number come to dozen and some of the assignment deals with nullable values it's hard to debug where the "null reference error" is. Studio shows the whole object initializer as error point. Nowadays I use object initializer for straightforward assignment only for error-free properties. How do you use object initializer for complex assignment or it's a bad practice to use dozen of assigments at all? Thank you in advance!

    Read the article

  • Ruby on Rails cannot find Initializer?

    - by Ryan M.
    Hello, I am trying to deploy an app to a fresh Ubuntu 10 installation using Passenger 2.2.15, Rails 2.3.5, Ruby 1.8.7, and Apache 2.2.14. However, even with a default rails app (sudo rails defaultapp), I am receiving the following error: "no such file to load -- initializer". I'm not sure which files you might need copies of in order to diagnose this problem, so I'll copy a few here and hope that it will help. Thanks for any help you can provide. -RM /etc/apache2/sites-available/default <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/appname/public <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost> /etc/apache2/mods-available/passenger.conf <IfModule passenger_module> PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15 PassengerRuby /usr/bin/ruby1.8 </IfModule> /etc/apache2/mods-available/passenger.load LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so

    Read the article

  • iphone dev: UIImageview subclass interface builder - how to call custom initializer

    - by ninjasmith
    hi. I messing with iphone developement. I have a uiimageview subclass that I want to use to detect touches. I have sucessfully added to interfacebuilder and I can detect a touch in my UIImageview subclass within my application so all is good on that front. however my UIImageView subclass has a custom initializer which is not called when it is created in interface builder. if I manually initialize the UIImageview and add it programmatically I think it will work but then I lose the ability to 'see' my positioning in Interface builder. how can I either 1) 'see' a uiimageview in interface builder that is added in code? (not possible?) 2) call my custom initializer when the subclass is instantiated in interfacebuilder. thanks

    Read the article

  • SQLite REGEXP initializer not working in production on Heroku

    - by morcutt
    I am using this to create a REGEXP in SQLite with rails because SQLite does not support REGEXP. When running this app on Heroku rather than the localhost it does not work. Is the initializer not being run when the app launches? The log files are providing .. 2011-03-04T18:35:36-08:00 app[web.1]: ActiveRecord::StatementInvalid (PGError: ERROR: syntax error at or near "REGEXP" 2011-03-04T18:35:36-08:00 app[web.1]: LINE 1: ... "posts".* FROM "posts" WHERE (message REGEXP '(?... 2011-03-04T18:35:36-08:00 app[web.1]: ^ 2011-03-04T18:35:36-08:00 app[web.1]: : SELECT "posts".* FROM "posts" WHERE (message REGEXP '(?:^|\s+)/(\w+)' and user_id = 1)): Which are similar to what the development files produced if I had deleted the implemented code. It seems as though the REGEXP initializer is not being run at startup.

    Read the article

  • Question on boost array initializer

    - by ArunSaha
    I am trying to understand the boost array. The code can be read easily from author's site. In the design rationale, author (Nicolai M. Josuttis) mentioned that the following two types of initialization is possible. boost::array<int,4> a = { { 1, 2, 3 } }; // Line 1 boost::array<int,4> a = { 1, 2, 3 }; // Line 2 In my experiment with g++ (version 4.1.2) Line 1 is working but Line 2 is not. (Line 2 yields the following: warning: missing braces around initializer for 'int [4]' warning: missing initializer for member 'boost::array<int, 4ul>::elems' ) Nevertheless, my main question is, how Line 1 is working? I tried to write a class similar to array.hpp and use statement like Line 1, but that did not work :-(. Can somebody explain me? Is there some boost specific thing happening in Line 1 that I need to be aware of? Thanks in advance. Regards,

    Read the article

  • Adding exclusive filter for <static initializer> in findbugs

    - by MilanAleksic
    Hi all, I want my findbugs report not show the following error: DM_NUMBER_CTOR: Method invokes inefficient Number constructor; use static valueOf instead The problem is that this happens in groovy-generated code files, so I can't control the source code - that is why I want to exclude it and add it to my exclude filter. I do not want to add explicitly class (since I make API that many tools will use, I want my filter to be generic). I would not like to completely remove this bug from the report by type, I would really like to only exclude this bug from appearing if it happenned in "static initializer" methods. Any idea? I tried the filter below but no luck, maybe somebody has better idea? <Match> <Method name="~.*static initializer.*" /> <Bug pattern="DM_NUMBER_CTOR" /> </Match> Here is the "stacktrace" of FindBugs in that case: In class net.milanaleksic.cuc.tools.sound.SoundPlayerTool In method net.milanaleksic.cuc.tools.sound.SoundPlayerTool.() Called method new Long(long) Should call Long.valueOf(long) instead In SoundPlayerTool.groovy

    Read the article

  • Two threads in a rails initializer file seems to not run them properly

    - by Luccas
    Initially I was using one thread to listen a queue from amazon and works perfectly. aws.rb Thread.new do queue1 = AWS::SQS::Queue.new(SQSADDR['my_queue']) queue1.poll do |msg| ... but now I appended another thread to listen another queue: ... Thread.new do queue2 = AWS::SQS::Queue.new(SQSADDR['my_another_queue']) queue2.poll do |msg| ... and now it seems to not work. Only the last one receives response... I have to join the threads? I can't understand What is going on?

    Read the article

  • Two threads in initializer on rails not working

    - by Luccas
    Initially I was using one thread to listen a queue from amazon and works perfectly. aws.rb Thread.new do my_queue = AWS::SQS::Queue.new(SQSADDR['my_queue']) my_queue.poll do |msg| ... but now I appended another thread to listen another queue: ... Thread.new do my_another_queue = AWS::SQS::Queue.new(SQSADDR['my_another_queue']) my_another_queue.poll do |msg| ... and now it seems to not work. Only the last one receives response... What is going on?

    Read the article

  • initializer not constant?

    - by fuzzygoat
    Quick question if I may: I am just curious about the following (see below) Xcode says "initializer element is not constant" why this does not work, I guess its the NSArray ... static NSArray *stuffyNames = [NSArray arrayWithObjects:@"Ted",@"Dog",@"Snosa",nil]; and this does ... static NSString *stuffyNames[3] = {@"Ted",@"Dog",@"Snosa"}; gary

    Read the article

  • Error message: uninitialized constant Rails::Initializer::MemCache

    - by tomeara
    I've installed just about every library/gem that I could find for memcached/memcache, but everytime I attempt to run my application I get this error: Error message: uninitialized constant Rails::Initializer::MemCache Exception class: NameError I have tried $ telnet localhost 11211 and memcached is definitely running. Any ideas? (I'm running Apache2/Passenger)

    Read the article

  • How to handle unknown initializer functions in lua?

    - by oofoe
    I want to load data written in a variant of lua (eyeonScript). However, the data is peppered with references to initialization functions that are not in plain lua: Redden = BrightnessContrast { Inputs = { Red = Input { Value = 0, }, }, } Standard lua gives "attempt to call a nil value" or "unexpected symbol" errors. Is there any way to catch these and pass it to some sort of generic initializer? I want to wind up with a nested table data structure. Thanks!

    Read the article

  • Activation Function, Initializer function, etc, effects on neural networks for face detection

    - by harry
    There's various activation functions: sigmoid, tanh, etc. And there's also a few initializer functions: Nguyen and Widrow, random, normalized, constant, zero, etc. So do these have much effect on the outcome of a neural network specialising in face detection? Right now I'm using the Tanh activation function and just randomising all the weights from -0.5 to 0.5. I have no idea if this is the best approach though, and with 4 hours to train the network each time, I'd rather ask on here than experiment!

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >