Search Results

Search found 88144 results on 3526 pages for 'first class functions'.

Page 101/3526 | < Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >

  • Is null a class in java?

    - by Somerandomeguy
    According to, http://www.freshvanilla.org:8080/display/www/Java+Interview+Questions Under, Which class is the superclass of every class? null seems to be the answer. I found that new Object().getClass().getSuperClass() verifies the answer as correct. But can null be considered a class? I see all primitive data types are represented as Class objects from java[dot]sun.com/j2se/1.4.2/docs/api/java/lang/Class.html

    Read the article

  • Calling private event handler from outside class

    - by Azodious
    i've two classes. One class (say A) takes a textbox in c'tor. and registers TextChanged event with private event-handler method. 2nd class (say B) creates the object of class A by providing a textbox. how to invoke the private event handler of class A from class B? it also registers the MouseClick event. is there any way to invoke private eventhandlers?

    Read the article

  • Can we instantiate abstract class?

    - by satheesh.droid
    I don't understand whether we can instantiate abstract class by any means because I have read we can inherit the abstract class but in have found we can create an object by calling method of other class.For example LocationProvider is an abstract class but we can create object for the same by calling getProvider() function in LocationManager class. By the following code LocationManager lm=getSystemService(Context.LOCATION_PROVIDER) LocationProvider lp=lm.getProvider("gps");

    Read the article

  • call a python function in another class from a class?

    - by user3527697
    hi i'am begginer in pYthon and openerp , i want to call a function exists in another class for example: i have 2 class : class a: def notif_personne_event(self, cr, uid,ids,context=None): and import a class b: notifier(self, cr, uid,ids,context=None): self.notifiernotif_personne_event() but when i do this an error is displayed telling me that class b have not an attribute notifiernotif_personne_event() someone help me please

    Read the article

  • Hibernate not Loading a class

    - by Noor
    Hi, I have a class Auction that contains a Class Item and Users but when I am getting the class, the class item and Users are not being loaded. Auction Class Mapping File: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- Generated Dec 28, 2010 9:14:12 PM by Hibernate Tools 3.4.0.Beta1 --> <hibernate-mapping> <class name="com.BiddingSystem.Models.Auction" table="AUCTION"> <id name="AuctionId" type="long"> <column name="AUCTIONID" /> <generator class="native" /> </id> <property name="StartTime" type="java.util.Date"> <column name="STARTTIME" /> </property> <property name="EndTime" type="java.util.Date"> <column name="ENDTIME" /> </property> <property name="StartingBid" type="long"> <column name="STARTINGBID" /> </property> <property name="MinIncrement" type="long"> <column name="MININCREMENT" /> </property> <many-to-one name="CurrentItem" class="com.BiddingSystem.Models.Item" fetch="join" cascade="all"> <column name="ItemId" /> </many-to-one> <property name="AuctionStatus" type="java.lang.String"> <column name="AUCTIONSTATUS" /> </property> <property name="BestBid" type="long"> <column name="BESTBID" /> </property> <many-to-one name="User" class="com.BiddingSystem.Models.Users" fetch="join"> <column name="UserId" /> </many-to-one> </class> </hibernate-mapping> When I am doing this: Query query=session.createQuery("from Auction where UserId="+UserId); List <Auction> AllAuctions= new LinkedList<Auction>(query.list()); The Users and Item are null

    Read the article

  • Asp.net mvc class reference in session

    - by Billy
    Hi, if I put a custom class in session, then in an action method I get an instance of that class from session, and populate some fields, I noticed that when a different controller gets that class from session, those fields are populated. Even though after the first call didn't save the updated class back in session. is this typical behavior for session objects? I thought I had to use keyword 'static' on the class in session for this to happen thanks

    Read the article

  • Php dynamic class construction

    - by pistacchio
    Hi to all, I'm trying to avoid the use of eval. I can dynamically instantiate a class like this: class myclass {} $my_class_name = 'myclass'; $obj = new $myclass(); If the constructor is like follows: class myclass { public function __construct( $argument1, $argument2 ) {} } and i have the values of the arguments in an array, how can i dynamically instantiate the class and pass it dynamic arguments? Mind that I have no way to modify the class, so I have to work on the way of using it. Thanks

    Read the article

  • Jquery remove class from image

    - by user1269625
    Hey ya'll I have these 3 images thumbnails here... <div class="wpcart_gallery" style="text-align:center; padding-top:5px;"> <a class="thickbox cboxElement" title="DSC_0118" href="http://www.taranmarlowjewelry.com/wp-content/uploads/2012/07/DSC_0118.jpg" rel="Teardrop Druzy Amethyst Ring" rev="http://www.taranmarlowjewelry.com/wp-content/uploads/2012/07/DSC_0118.jpg"> <img class="attachment-gold-thumbnails colorbox-736" width="50" height="50" title="DSC_0118" alt="DSC_0118" src="http://www.taranmarlowjewelry.com/wp-content/uploads/2012/07/DSC_0118-50x50.jpg"> </a> <a class="thickbox cboxElement" title="P7230376" href="http://www.taranmarlowjewelry.com/wp-content/uploads/2012/07/P7230376.jpg" rel="Teardrop Druzy Amethyst Ring" rev="http://www.taranmarlowjewelry.com/wp-content/uploads/2012/07/P7230376.jpg"> <img class="attachment-gold-thumbnails colorbox-736" width="50" height="50" title="P7230376" alt="P7230376" src="http://www.taranmarlowjewelry.com/wp-content/uploads/2012/07/P7230376-50x50.jpg"> </a> <a class="thickbox cboxElement" title="P7230378" href="http://www.taranmarlowjewelry.com/wp-content/uploads/2012/07/P7230378.jpg" rel="Teardrop Druzy Amethyst Ring" rev="http://www.taranmarlowjewelry.com/wp-content/uploads/2012/07/P7230378.jpg"> <img class="attachment-gold-thumbnails colorbox-736" width="50" height="50" title="P7230378" alt="P7230378" src="http://www.taranmarlowjewelry.com/wp-content/uploads/2012/07/P7230378-50x50.jpg"> </a> </div> What I am trying to do is come up with a jquery code that would remove the cboxElement from the first image and if I click on one of the images to remove cboxElement and place cboxElement to the other images... I also have this big image and when you click on one of the thumbnails, the image is replaced by the thumbnail and thats really the thumbnail I want to exclude...Could I possible just say if one of the 3 images src = this one image = src remove the class from this thumbnail? Which way would be better? I am very new at jquery :( I hope this makes sense. Here is the code for the big image... <a class="preview_link cboxElement" style="text-decoration:none;" href="http://www.taranmarlowjewelry.com/wp-content/uploads/2012/07/DSC_0118.jpg" rel="Teardrop Druzy Amethyst Ring"> <img id="product_image_736" class="product_image colorbox-736" width="400" src="http://www.taranmarlowjewelry.com/wp-content/uploads/2012/07/DSC_0118.jpg" title="Teardrop Druzy Amethyst Ring" alt="Teardrop Druzy Amethyst Ring"> <br> <div style="text-align:center; color:#F39B91;">Click To Enlarge</div> </a> Any help or a point in the right direction would be awesome!!

    Read the article

  • Adding procedural C openGL functions to an iPhone project

    - by user309595
    I want to add a few drawing functions to an iPhone project for drawing things. Something like drawTile(x,y,len,wid); which would call openGL to draw a box somewhere. I should just be able to write a procedural C file to do this but the openGL libraries are objective C and I'm getting weird errors. Do I have to make a class for all of my drawing commands and call class methods?

    Read the article

  • Grails many to many using a third 'join' class

    - by andy mccullough
    I read that a m:m relationship often means there is a third class that isn't yet required. So I have m:m on User and Project, and I created a third domain class, ProjectMembership The three domains are as follows (minimized for illustration purposes): User class User { String name static hasMany = [projectMemberships : ProjectMembership] } Project Membership class ProjectMembership { static constraints = { } static belongsTo = [user:User, project:Project] } Project: class Project { String name static hasMany = [projectMemberships : ProjectMembership] static constraints = { } } If I have the ID of the user, how can I get a list of Project objects that they are assigned to?

    Read the article

  • C++0x class factory with variadic templates problem

    - by randomenglishbloke
    I have a class factory where I'm using variadic templates for the c'tor parameters (code below). However, when I attempt to use it, I get compile errors; when I originally wrote it without parameters, it worked fine. Here is the class: template< class Base, typename KeyType, class... Args > class GenericFactory { public: GenericFactory(const GenericFactory&) = delete; GenericFactory &operator=(const GenericFactory&) = delete; typedef Base* (*FactFunType)(Args...); template <class Derived> static void Register(const KeyType &key, FactFunType fn) { FnList[key] = fn; } static Base* Create(const KeyType &key, Args... args) { auto iter = FnList.find(key); if (iter == FnList.end()) return 0; else return (iter->second)(args...); } static GenericFactory &Instance() { static GenericFactory gf; return gf; } private: GenericFactory() = default; typedef std::unordered_map<KeyType, FactFunType> FnMap; static FnMap FnList; }; template <class B, class D, typename KeyType, class... Args> class RegisterClass { public: RegisterClass(const KeyType &key) { GenericFactory<B, KeyType, Args...>::Instance().Register(key, FactFn); } static B *FactFn(Args... args) { return new D(args...); } }; Here is the error: when calling (e.g.) // Tucked out of the way RegisterClass<DataMap, PDColumnMap, int, void *> RC_CT_PD(0); GCC 4.5.0 gives me: In constructor 'RegisterClass<B, D, KeyType, Args>::RegisterClass(const KeyType&) [with B = DataMap, D = PDColumnMap, KeyType = int, Args = {void*}]': no matching function for call to 'GenericFactory<DataMap, int, void*>::Register(const int&, DataMap* (&)(void*))' I can't see why it won't compile and after extensive googling I couldn't find the answer. Can anyone tell me what I'm doing wrong (aside from the strange variable name, which makes sense in context)?

    Read the article

  • A question about making a C# class persistant during a file load

    - by Adam
    Apologies for the indescriptive title, however it's the best I could think of for the moment. Basically, I've written a singleton class that loads files into a database. These files are typically large, and take hours to process. What I am looking for is to make a method where I can have this class running, and be able to call methods from within it, even if it's calling class is shut down. The singleton class is simple. It starts a thread that loads the file into the database, while having methods to report on the current status. In a nutshell it's al little like this: public sealed class BulkFileLoader { static BulkFileLoader instance = null; int currentCount = 0; BulkFileLoader() public static BulkFileLoader Instance { // Instanciate the instance class if necessary, and return it } public void Go() { // kick of 'ProcessFile' thread } public void GetCurrentCount() { return currentCount; } private void ProcessFile() { while (more rows in the import file) { // insert the row into the database currentCount++; } } } The idea is that you can get an instance of BulkFileLoader to execute, which will process a file to load, while at any time you can get realtime updates on the number of rows its done so far using the GetCurrentCount() method. This works fine, except the calling class needs to stay open the whole time for the processing to continue. As soon as I stop the calling class, the BulkFileLoader instance is removed, and it stops processing the file. What I am after is a solution where it will continue to run independently, regardless of what happens to the calling class. I then tried another approach. I created a simple console application that kicks off the BulkFileLoader, and then wrapped it around as a process. This fixes one problem, since now when I kick off the process, the file will continue to load even if I close the class that called the process. However, now the problem I have is that cannot get updates on the current count, since if I try and get the instance of BulkFileLoader (which, as mentioned before is a singleton), it creates a new instance, rather than returning the instance that is currently in the executing process. It would appear that singletons don't extend into the scope of other processes running on the machine. In the end, I want to be able to kick off the BulkFileLoader, and at any time be able to find out how many rows it's processed. However, that is even if I close the application I used to start it. Can anyone see a solution to my problem?

    Read the article

  • Accessing initialized variable on different class C++

    - by d0pe
    I'm having some difficulties with this problem. The main idea is, I initialized a variable of class type B in class A, class A.h has the variable Z declared as public, like B *Z; In class A.cpp, I initialized it as Z = new B(); Now, I want to access that variable from class C and I'm unable to do so. C.h includes A.h and B.h

    Read the article

  • CNAME subdomain of subdomain with content on first subdomain

    - by BandonRandon
    Okay so maybe that title is a bit confusing but here is what I'm trying to do: I have a subdomain with content at my.example.com I want to set up something like sub.my.example.com This does not seem to work if there is content on my.example.com However if there is not content on the first subdomain it seems that it's okay to CNAME the record to example2.org This is my first real experiance with CNAME so I'm wondering about common errors to check for. my.example.com is an A record and sub.my.example.com is a CNAME EDIT I am managing the DNS though Web Host Manger (WHM) Dns records. The content is at http://vbx.knowconceptdw.net and I'm trying to set a voicemail CNAME to point to http://api.twillio.com at http://voicemail.vbx.knowconceptdw.net

    Read the article

  • Restore using time machine from an macbook to an macbook pro (first intel)

    - by Anders Nørgaard
    Hello.. My girlfriend have Macbook 10.6.3, the first plastic version. the screen broke an its at service store now. In the mean time, i have tried to restore from hers TM backup to my old macbook pro 10.6.3 (the first intel version). Everything seems to work out fine, but when its finish, it says reboot, but nothing happens. When i hold down the power button, powering down, and starts again, its come up with the grey roll down screen "you need to restart your machine again" in different languages. I have tried the restore procedure over again 2 times, and every time it ends up like this... Anyone have a suggestion what to do ? Thanks - Anders.

    Read the article

  • iMac G5 20" (First All-In-One White Screen) Cannot Connect To Internet

    - by Goober
    The Scenario I've got an iMac G5 20" (First All-In-One White Screen) PPC. It has an Airport Extreme Network card in order to wirelessly to connect to the internet. For the most part I connect using ethernet as opposed to wirelessly, but recently have had the need to connect using the wireless. The Hardware BT Home Broadband Wireless Router. iMac G5 20" From about 5 years ago (First All-In-One White Screen) The Issue Even though I know for a fact that It has connected to the internet wireslessly in the past, for some reason it can discover the wireless router, but upon entering the password it fails to connect. I have tried multiple times to no avail. I have 2 other Mac's on the network and a pc that can all connect wirelessly. However both the mac's. Question Any ideas as to why my really old iMac G5 can't connect wirelessly anymore!?

    Read the article

  • VLOOKUP and match functions appear to be searching the function rather than value

    - by Brandon S.
    Vlookup and match seem to be searching based on the function I have in my cell rather than the value i have in the cell. I have a column with dates, (ex: C2, which has the formula =E2&"/"&F2&"/"&D2 in them, for example). (where E2, F2, D2 are the year, month, and date). In another sheet and column, I have a bunch of dates, and i'm using the formula =VLOOKUP(C2,'sheet2'!A1:B252,2,FALSE), which doesn't work. (returns #N/A) If I replace C2 with the same date, but without the formula (just typing it in), VLOOKUP works. Why is this?

    Read the article

  • dhcpd: varying vendor-class-identifier

    - by jessicah
    I'm having trouble selectively sending parameters in response to a DHCP Inform packet using groups (or even without, just using host declarations) for bootp stuff. My configuration file right now looks like: subnet 130.123.131.128 netmask 255.255.255.128 { allow unknown-clients; } host dev-mac-09 { option vendor-class-identifier "example-identifier"; hardware ethernet 10:9a:dd:51:ff:83; } If I put vendor-class-identifier in the global scope, using tcpdump I can see that the client receives the vendor class option successfully. If I take it out, and just keep it in the host scope (or group scope), the client never receives the option. Specifying option dhcp-parameter-request list 60 doesn't help either. I did try using a class definition inside a group, but then it applied even if the host wasn't a part of the group. As an aside, how do I get detailed logging? At least something to indicate what groups and things got used to generate the response to the client.

    Read the article

  • DNS server redirect users on first visit

    - by Sihan Zheng
    I am looking for a DNS level solution, that redirects a user to a specific IP on the first visit, than directs them to the correct IP on subsequent visits. So the idea is, for example, if a user visits "malicioussite.com", the first time they try to resolve that DNS name, it resolves to the IP of an internal web server, showing them a warning. On subsequent resolves, the users would get the actual IP, so they can visit the site. How can this be achieved? I am really flexible on what I can use, as long as its on the DNS level.

    Read the article

  • Run one virtual machine on a Linux server + standard Linux functions

    - by fistameeny
    Hi, I am looking for a method to setup a Linux server (running Ubuntu Server) that uses Samba for file sharing, as well as hosting a Windows virtual machine (in this case, Windows Small Business Server 2003, which in turn hosts SQL Server Express - Exchange won't be used on this). I would like to have the Linux server serving the files over Samba, and hosting the Virtual Machine. This obviously rules ESXi out as it couldn't do Samba at the same time. What would be the next best solution to give reasonable speed? Vmware Server 2.0, VirtualBox, Xen? There will be 10-15 users accessing the Samba shares and the SQL Express virtual machine. Matt

    Read the article

  • Windows 8.1 Search does not automatically select first search match

    - by Miguel Sevilla
    When I search in Windows 8/8.1 (start menu-start typing), it doesn't automatically highlight the search term. For example, if I'm trying to open the "Internet Options" panel and type the entire thing out in search, I have to down arrow or tab to the "Internet Options" search result. This is retarded. I'm used to Windows 7 style search where the first match is highlighted and i can easily just hit return. First match highlighting does work for other built-in things like "Control Panel", but it should work for all things in general, as it did in Windows 7 search. Anyways, if there is an option to enable this in Windows 8/8.1, I'd appreciate the tip. Thanks!

    Read the article

< Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >