Search Results

Search found 2536 results on 102 pages for 'initialize'.

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

  • WMI failed to initialize the IWbemLocator using CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_INPROC

    - by Rahul
    Hi All, I am using WMI to get SMBIOS data and for that I am using following code to initialize the IWbemLocator interface through a call to CoCreateInstance. CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWebLocator, (LPVOID *) &pLoc); But it always returns FAILURE. I think its due to some environment issue but wanted to know exact reason. Thanks in advance, Rahul

    Read the article

  • How to initialize an unsigned long long type?

    - by Sujay
    Hello all, I'm trying to initialize an unsigned long long int type. But the compiler is throwing an error "error: integer constant is too large for "long" type ". The initialization is shown below : unsigned long long temp = 1298307964911120440; Can anybody please let me know what the problem is and suggest a solution for the same. With Regards Sujay

    Read the article

  • Using jQuery live() to initialize plugins?

    - by cxfx
    Using jQuery, what's the best way to automatically initialize a plugin on all current and future elements of a specific class? For example, say I want all <input type="text" class="datepicker" /> elements to have the jQuery UI Datepicker plugin, including any I might create at runtime. Essentially, I want to do something like this: $('.datepicker').live('create', function() { $(this).datepicker(); }); But, of course, there isn't a create event I can use.

    Read the article

  • Initialize Tab Event in JQuery UI

    - by hunt
    Is there any initialize event in Jquery UI Tabs , which executes only once when particular tab loads ? As show function in Jquery UI tabs executes every time when tab gets load , i want an event that executes only once..

    Read the article

  • How to initialize log4j properly?

    - by Janusz
    After adding log4j to my application I get the following output every time I execute my application: log4j:WARN No appenders could be found for logger (slideselector.facedata.FaceDataParser). log4j:WARN Please initialize the log4j system properly. It seems this means a configuration file is missing. Where should this config file be located and what is a good start content? I'm using plain java for developing a desktop application. So no webserver etc...

    Read the article

  • Unable to initialize the automatic property in C#.

    - by isthatacode
    I have an automatic property public bool HasToolkit { get; set; } when i try to initialize it like this- Tandem t = new Tandem(GearCount = 5); It gives an error as below The name 'GearCount' does not exist in the current context Whats wrong here ? Also if i do normal intantiation it works fine. Tandem t = new Tandem();

    Read the article

  • How initialize array of classes? (C++)

    - by Kra
    Hello, I have this class constructor: Pairs (int Pos, char *Pre, char *Post, bool Attach = true); How can I initialize array of Pairs classes? I tried: Pairs Holder[3] = { {Input.find("as"), "Pre", "Post"}, {Input.find("as"), "Pre", "Post"}, {Input.find("as"), "Pre", "Post"} }; Apparently it's not working, I also tried to use () brackets instead of {} but compiler keeps moaning all the time. Sorry if it is lame question, I googled quite hard but wasn't able to find answer :/ Thanks.

    Read the article

  • Ruby Methods: how to return an usage string when insufficient arguments are given

    - by Shyam
    Hi, After I have created a serious bunch of classes (with initialize methods), I am loading these into IRb to test each of them. I do so by creating simple instances and calling their methods to learn their behavior. However sometimes I don't remember exactly what order I was supposed to give the arguments when I call the .new method on the class. It requires me to look back at the code. However, I think it should be easy enough to return a usage message, instead of seeing: ArgumentError: wrong number of arguments (0 for 9) So I prefer to return a string with the human readable arguments, by example using "puts" or just a return of a string. Now I have seen the rescue keyword inside begin-end code, but I wonder how I could catch the ArgumentError when the initialize method is called. Thank you for your answers, feedback and comments!

    Read the article

  • Ruby Methods: return an usage string when insufficient arguments are given

    - by Shyam
    Hi, After creating a serious bunch of classes, with initialize methods, loading them in IRb requires to look back at the code. However, I think it should be easy enough to return a usage message, instead of: ArgumentError: wrong number of arguments (0 for 9) So I prefer to return a string with the human readable arguments, by example using "puts" or just a return of a string. Now I have seen the rescue keyword inside begin-end code, but I wonder how I could catch the ArgumentError when the initialize method is called. Thank you for your answers, feedback and comments!

    Read the article

  • java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.POIXMLDocument on Jboss 5.0 EAP

    - by nidhin
    Getting following exception in Jboss 5.0 EAP but it work fine in JBoss 5.1 GA. we are using POI 3.7 and jars included are poi-3.7.jar poi-ooxml-schemas.jar poi-ooxml.jar The stack trace is ERROR [org.apache.catalina.core.ContainerBase.[jboss.ueb].[localhost].[fesbcon-Fig].[Faces Servlet]] 3;13;44.4g3pM (http-0.0.0.0-8280-1) Servlet.service() -For servlet Faces Servlet threu exception java.lang.NoClassDe-FFoundError: Could not initialize class org.apache.poi.POIXMLDocument at org.apache.poi.ss.usermodel.HorkbookFactory.create(HorkbookFactory.java:62) at com.-Ferguson.esb.con-Fig.controller.AssociationsExcelUploadController.submit(Unknoun Source) at sun.re-Flect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.re-Flect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.re-Flect.DelegatingMethodAccessorImpl.invoke(Delegating?ethodAccessorImpl.java:25) at java.lang.re-Flect.Method.invoke(Method.java:597) at org.apache.my-Faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132) at org.apache.my-Faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61) Please Advise how to solve this issue in JBoss 5.0 EAP

    Read the article

  • Using STL/Boost to initialize a hard-coded set<vector<int> >

    - by Hooked
    Like this question already asked, I'd like to initialize a container using STL where the elements are hard-coded in the cleanest manner possible. In this case, the elements are a doubly nested container: set<vector<int> > A; And I'd like (for example) to put the following values in: A = [[0,0,1],[0,1,0],[1,0,0],[0,0,0]]; C++0x fine, using g++ 4.4.1. STL is preferable as I don't use Boost for any other parts of the code (though I wouldn't mind an example with it!).

    Read the article

  • a better way to initialize database ONCE when rail server starts

    - by Hadi
    i would like to initialize database the first time the server is started, that involve calling a class method. Given the class name is: Product At first i put an .rb file config\initializers\init.rb as it gets automatically called. Everything works ok, until the database is deleted, and i am trying to do rake db:migrate. rake db:migrate fails saying that cannot find 'product' table. inside init.rb = Product.populate_db The solution i came up is: I took out init.rb do rake db:migrate put back init.rb run the server. My rails application is mainly for reporting and the data is seeded from other application, so i have to do the above step everyday Is there a better way to do the initialization?

    Read the article

  • initialize a numpy array

    - by Curious2learn
    Is there way to initialize a numpy array of a shape and add to it? I will explain what I need with a list example. If I want to create a list of objects generated in a loop, I can do: a = [] for i in range(5): a.append(i) I want to do something similar with a numpy array. I know about vstack, concatenate etc. However, it seems these require two numpy arrays as inputs. What I need is: big_array # Initially empty. This is where I don't know what to specify for i in range(5): array i of shape = (2,4) created. add to big_array The big_array should have a shape (10,4). How to do this? Thanks for your help.

    Read the article

  • Cannot initialize non-const reference from convertible type

    - by Julien L.
    Hi, I cannot initialize a non-const reference to type T1 from a convertible type T2. However, I can with a const reference. long l; const long long &const_ref = l; // fine long long &ref = l; // error: invalid initialization of reference of // type 'long long int&' from expression of type // 'long int' Most problems I encountered were related to r-values that cannot be assigned to a non-const reference. This is not the case here -- can someone explain? Thanks.

    Read the article

  • How to initialize one class from a library?

    - by daemonsvk
    Hi, I have a few classes in the class library (separate assembly). I referenced it to my project and I want to initialize one specific class from that library. I know only its name. All of the classes implements one interface. And here comes the problem. My code so far: using MyLibrary; ... IMyInterface dll = Activator.CreateInstance("MyLibrary", "MyLibrary.NameOfClass") as IMyInterface; But dll is always null. Any ideas? Thanks

    Read the article

  • C++ app fails to initialize (0xc0000005), when using C# dll

    - by Simon
    Hi, I have a C# DLL, which I call from a native C++ programm. As I use Qt and /clr compiler option did not work I followed this tutorial for a bridge. So I have a VS2008 project (compiled with /clr), which links to the C# DLL and contains the bridge class and the native class, which exposes interfaces to my C++ programm. Another VS2008 project (no .net stuff) calls the native class (statically linked). I had some issues, but now the programm at least compiles. However, if I try to run this programm, I get a (0xc0000005) error on initialization, when I try to use the native class. As this happens on initialization, I don't even see, which DLLs fail to initialize. All DLLs should be in the right place. Any hints? Thank you.

    Read the article

  • Rails always include (join) on initialize

    - by Seth
    Hello, I have a User model as illustrated below: class User < ActiveRecord belongs_to :college belongs_to :class_level end I want to ALWAYS join with those other two tables returning one simplified User object. How do I accomplish this in my User model. I'm aware that I can do this in another model: class Foo < ActiveRecord has_many :users, :include => [:college, :class_level] end But I want to do this in my User model, so Foo.users will either be eager loaded OR be joined already. Is there a way to create an initialize this in the User model?

    Read the article

  • Can we Initialize dynamic string array .

    - by SunilRai86
    is there any way to Initialize dynamic string array . public class CXmlFileHook { string vAppname; string vClassname; string vIdmark; string vExecname; string [] vApiName; string vCtor; public CXmlFileHook() { this.vAppname = "Not Set"; this.vIdmark = "Not Set"; this.vClassname = "Not Set"; this.vExecname = "Not Set"; this.vApiName = new string[9] { "Not Set", "Not Set", "Not Set", "Not Set", "Not Set", "Not Set", "Not Set", "Not Set" ,"Not Set"}; this.vCtor = "CXmlFileHook()"; } now i want the size of the string should increases dynamically and according to size it initializes it self is it possible????

    Read the article

  • Statically initialize anonymous union in C++

    - by wpfwannabe
    I am trying to statically initialize the following structure in Visual Studio 2010: struct Data { int x; union { char ch; const Data* data; }; }; The following is fails with error C2440: 'initializing' : cannot convert from 'Data *' to 'char'. static Data d1; static Data d = {1, &d1}; I have found references to some ways this can be initialized properly but none of them work in VS2010. Any ideas?

    Read the article

  • Why do they initialize pointers this way?

    - by Rob
    In almost all of the books I read and examples I go through I see pointers initialized this way. Say that I have a class variable NSString *myString that I want to initialize. I will almost always see that done this way: -(id)init { if (self = [super init]) { NSString *tempString = [[NSString alloc] init]; myString = tempString; [tempString release]; } return self; } Why can't I just do the following? -(id)init { if (self = [super init]) { myString = [[NSString alloc] init]; } return self; } I don't see why the extra tempString is ever needed in the first place, but I could be missing something here with memory management. Is the way I want to do things acceptable or will it cause some kind of leak? I have read the Memory Management Guide on developer.apple.com and unless I am just missing something, I don't see the difference.

    Read the article

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