Search Results

Search found 1499 results on 60 pages for 'extending the clipboard'.

Page 14/60 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Extending Zend_Auth_Adapter_DbTable for Extra Checks

    - by Urda
    My google fu is weak today, but I cannot find a good article to do so. I would like to extend the Zend Adapter to check n extra columns on my database table. What is the best way to fully extend the adapter, so I can use it in the future without needing to dig through documentation again.

    Read the article

  • Extending the method pool of a concrete class which is derived by an interface

    - by CelGene
    Hello, I had created an interface to abstract a part of the source for a later extension. But what if I want to extend the derived classes with some special methods? So I have the interface here: class virtualFoo { public: virtual ~virtualFoo() { } virtual void create() = 0; virtual void initialize() = 0; }; and one derived class with an extra method: class concreteFoo : public virtualFoo { public: concreteFoo() { } ~concreteFoo() { } virtual void create() { } virtual void initialize() { } void ownMethod() { } }; So I try to create an Instance of concreteFoo and try to call ownMethod like this: void main() { virtualFoo* ptr = new concreteFoo(); concreteFoo* ptr2 = dynamic_cast(ptr); if(NULL != ptr2) ptr2->ownMethod(); } It works but is not really the elegant way. If I would try to use ptr-ownMethod(); directly the compiler complains that this method is not part of virtualFoo. Is there a chance to do this without using dynamic_cast? Thanks in advance!

    Read the article

  • Java: Make a method abstract for each extending class

    - by Martijn Courteaux
    Hi, Is there any keyword or design pattern for doing this? public abstract class Root { public abstract void foo(); } public abstract class SubClass extends Root { public void foo() { // Do something } } public class SubberClass extends SubClass { // Here is it not necessary to override foo() // So is there a way to make this necessary? // A way to obligate the developer make again the override } Thanks

    Read the article

  • Django design question: extending User to make users that can't log in

    - by jobrahms
    The site I'm working on involves teachers creating student objects. The teacher can choose to make it possible for a student to log into the site (to check calendars, etc) OR the teacher can choose to use the student object only for record keeping and not allow the student to log in. In the student creation form, if the teacher supplies a username and a password, it should create an object of the first kind - one that can log in, i.e. a regular User object. If the teacher does not supply a username/password, it should create the second type. The other requirement is that the teacher should be able to go in later and change a non-logging-in student to the other kind. What's the best way to design for this scenario? Subclass User and make username and password not required? What else would this affect?

    Read the article

  • Django extending user model and displaying form

    - by MichalKlich
    Hello, I am writing website and i`d like to implement profile managment. Basic thing would be to edit some of user details by themself, like first and last name etc. Now, i had to extend User model to add my own stuff, and email address. I am having troubles with displaying form. Example will describe better what i would like achieve. This is mine extended user model. class UserExtended(models.Model): user = models.ForeignKey(User, unique=True) kod_pocztowy = models.CharField(max_length=6,blank=True) email = models.EmailField() This is how my form looks like. class UserCreationFormExtended(UserCreationForm): def __init__(self, *args, **kwargs): super(UserCreationFormExtended, self).__init__(*args, **kwargs) self.fields['email'].required = True self.fields['first_name'].required = False self.fields['last_name'].required = False class Meta: model = User fields = ('username', 'first_name', 'last_name', 'email') It works fine when registering, as i need allow users to put username and email but when it goes to editing profile it displays too many fields. I would not like them to be able to edit username and email. How could i disable fields in form? Thanks for help.

    Read the article

  • problem in extending a class

    - by Vineeth
    there are two classes public class Account { public Acconut() { //constructor } } public class SavingsAccount extends Account { } while doing the inheritance i have got an error message "cannont find symbol Symbol: constructor Account()" what might be the error in my code...??

    Read the article

  • Extending ClaimsIdentity in MVC3

    - by Steoates
    I've got my claims set-up with MVC3 using azure and everything is going well. What I need to do now is extend the Claims Identity that's in the current thread / http context and add my own information (DOB, Address.. that sort of stuff) so my question is - where is the best place to do this? any examples would be great.. I presume that when the user is authenticated id then have to go to the DB and pull back the relevant record for the user then add it to the custom Claims Identity object? cheers. ste.

    Read the article

  • ThreadStateException when using QueueUserWorkItem in a Timer

    - by Tim
    Hi all, I have a ThreadStateException in my winforms application. Step to reproduce : Create simple winforms app Add a button In click event, do : timer1.Interval = 1000; timer1.Tick += timer1_Tick; timer1.Start(); void timer1_Tick(object sender, EventArgs e) { ThreadPool.QueueUserWorkItem(delegate { StringCollection paths = new StringCollection { @"c:\my.txt", @"c:\my.png" }; Clipboard.SetFileDropList(paths); }); } The exception tells me : Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. But the main has already the [STAThread] attribute. How to solve it ? Thanks in advance for any help

    Read the article

  • iPhone - extending a class delegate

    - by Digital Robot
    OK, I know how to create a class extension, using something like that: on .h @interface UIButton (myExtensionName) // my extended methods @end and then on .m @implementation UIButton (myExtensionName) // my implementations @end But how do I declare the extended delegates I may create? If this was a normal class I would do @protocol myExtensionName <NSObject> // my delegate declarations @end but how do I do that on a class extension? thanks

    Read the article

  • Extending / changing how Zend_Search_Lucene searches

    - by Grant Collins
    Hi, I am currently using Zend_Search_Lucene to index and search a number of documents currently at around a 1000 or so. What I would like to do is change how the engine scores hits on a document, from the current default. Zend_Search_Lucene scores on the frequency of number of hits within a document, so a document that has 10 matches of the word PHP will score higher than a document with only 3 matches of PHP. What I am trying to do is pass a number of key words and score depending on the hits of those keywords. e.g. I pass 5 key words say,PHP, MySQL, Javascript, HTML and CSS that I search against the index. One document has 3 matches to those key words and one document has all 4 matches, the 4 matches scores the highest. The number of instances of those words in the document do not concern me. Now I've had a quick look at Zend_Search_Lucene_Search_Similarity however I have to confess that I am not sure (or that bright) to know how to use this to achieve what I am after. Is what I want to do possible using Lucene or is there a better solution out there?

    Read the article

  • extending spring form tag library attributes

    - by TimmyJ
    I'm using Spring's form tag library in a Spring MVC application that I am developing. The company I am working for has implemented some company-wide policies based on the definition of custom attributes for certain tags. For instance, by default (though the inclusion of a standard javascript file) all tags have their values automatically converted to upper case. In order to disable this one would define their tag with a custom attribute in the following way: <input type="text" uppercase="false" /> The problem is that the addition of these custom attributes to a spring:form tag causes an error at runtime. I've pasted the error below. org.apache.jasper.JasperException: /WEB-INF/jsp/reportCriteria.jsp(45,5) Attribute uppercase invalid for tag input according to TLD My question is: is there any way to extend the TLD to allow for these attributes, or is there any other way add these custom attributes to these spring:form tags?

    Read the article

  • php extending but with a new constructor...possible?

    - by Patrick
    I have a class: class test { function __construct() { print 'hello'; } function func_one() { print 'world'; } } what I would like to do is a have a class that sort of extends the test class. I say 'sort of', because the class needs to be able to run whatever function the test class is able to run, but NOT run the construct unless I ask it to. I do not want to override the construct. Anyone has any idea how to achieve this?

    Read the article

  • Extending Eclipse product

    - by zeroin23
    A spawn off of an existing eclipse product is required for customization for a client. (hence parallel product development) The intention was to use Eclipse Fragment, but "Fragments are additive, they cannot override content found in the host." how can we maintain one set of codes in the svn, yet allow customization by overriding some classes?

    Read the article

  • Extending fluent nhibernate mappings in another assembly

    - by Jarek
    Hi, I'm using NHibernate with my ASP.Net MVC application. I'm writing some extensions (plugins) for my application. And I'm loading those plugin dynamically (from different assemblies). In my base application I have many entities and mappings defined (User, Group, etc...) I need to create new entities in my extensions, so i.e. I'm creating News module, so I need to create News mapping. In database News table has a foreign key to User table. Is there any way I can modify my User mapping, so it will have: HasMany(x => x.Courses) .KeyColumn("GroupId") .Inverse(); Or the only way to do it is to change code in my User class and recompile project ? I'm not NHibernate advanced user, so any help will be appreciated. TIA.

    Read the article

  • Extending existing data structure in Scala.

    - by Lukasz Lew
    I have a normal tree defined in Scala. sealed abstract class Tree case class Node (...) extends Tree case class Leaf (...) extends Tree Now I want to add a member variable to all nodes and leaves in the tree. Is it possible with extend keyword or do I have to modify the tree classes by adding [T]?

    Read the article

  • Design patter for extending Android's activities?

    - by Carl
    While programming on Android, I end up writing a parent activity which is extended by several others. A bit like ListActivity. My parent activity extends Activity. if I intend to use a Map or a List, I can't use my parent activity as superclass - the child activity can only extend one activity obviously. As such I end up writing my parent activities with the same logic for Activity, ListActivity, MapActivity and so forth. What am I looking for is some sort of trait functionality/design pattern which would help in this case. Any suggestions?

    Read the article

  • Extending a form field to add new validations.

    - by duallain
    I've written an app that uses forms to collect information that is then sent in an email. Many of these forms have a filefield used to attach files to the email. I'd like to validate two things, the size of the file (to ensure the emails are accepted by our mail server. I'd also like to check the file extension, to discourage attaching file types not useable for our users. (This is the python class I'm trying to extend) class FileField(Field): widget = FileInput default_error_messages = { 'invalid': _(u"No file was submitted. Check the encoding type on the form."), 'missing': _(u"No file was submitted."), 'empty': _(u"The submitted file is empty."), 'max_length': _(u'Ensure this filename has at most %(max)d characters (it has %(length)d).'), } def __init__(self, *args, **kwargs): self.max_length = kwargs.pop('max_length', None) super(FileField, self).__init__(*args, **kwargs) def clean(self, data, initial=None): super(FileField, self).clean(initial or data) if not self.required and data in EMPTY_VALUES: return None elif not data and initial: return initial # UploadedFile objects should have name and size attributes. try: file_name = data.name file_size = data.size except AttributeError: raise ValidationError(self.error_messages['invalid']) if self.max_length is not None and len(file_name) > self.max_length: error_values = {'max': self.max_length, 'length': len(file_name)} raise ValidationError(self.error_messages['max_length'] % error_values) if not file_name: raise ValidationError(self.error_messages['invalid']) if not file_size: raise ValidationError(self.error_messages['empty']) return data

    Read the article

  • Extending Zend_Log for application-specific need

    - by spdaly
    I am building a Zend Framework application that performs jobs submitted by the user. The actions taken need to be logged to a database. I would like to correlate the job with its log entries. Instead of creating my own logging class, I would like to extend Zend_Log since it provides 99% of the functionality that I need. All I need to do is add a foreign key of the job id to the log data model. Is this possible? I'm also looking for a good example of Zend_Log writing to a database. I haven't searched SO yet. I will do that after I post this. Thanks in advance... Steve

    Read the article

  • CSS/IE7: The Case of the Extending Background-Image

    - by dmr
    The situation: There a collapsible advanced search box. It is made up of a search box div that contains a boxhead div and a boxbody div. Inside the boxbody div, there is a searchToggle div. When the user clicks "Show/Hide", the display style property of the searchToggle div is toggled between block and none. (The search fields are hidden and the search boxbody gets much smaller). The 2 background-images for the body of the search box are set via the css of the searchBox div and the boxbody div. In IE7, when the searchToggle div is hidden, the background-image from the searchBox div extends on the left more than it should (see Here). It shows up correctly when the display of the searchToggle div is block (see Here). Everything show up correctly, in both cases, in IE8 and FF. The relevant HTML: <div class="searchBox"> <div class="boxhead"> <h2></h2> </div> <div class="boxbody"> <div id="searchToggle" name="searchToggle"> </div> </div> </div> The relevant CSS: .searchBox { margin: 0 auto; width: 700px; background: url(/images/myImageRight-r.gif) no-repeat bottom right; font-size: 100%; text-align: left; overflow: hidden; } .boxbody { margin: 0; padding: 5px 30px 31px; background-image: url(/images/myImageLeft.gif); background-repeat: no-repeat; background-position: left bottom; }

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >