methods

Method throwing me out of parent method

I'm adding a User (custom class) through my Repository by hijacking the generic Add(T item) method and throwing it to a private AddUser method, if item == typeof(User). It does just that, but as soon as it hits the FlushMembership() call, it exits out too early, ie. it doesn't hit anything beyond that FlushMembership() call and thus no U...

Implement “intersection” method using java

How can i implement “intersection” method using java by recieve 2 integer parameters and return integer intersection point. ...

jQuery datepicker: manual firing of onChangeMonthYear()

Hey.. when I've got the function: $('#picker').datepicker({ // ... onSelect: function(currDate){ } }); I want to fire the function onSelect() manually, but $('#picker').datepicker.onSelect(); doesn't work.. how to fire? thanks for your answers and sorry for my bad english :-/ ...

how to pass a method from different class to another class in Java?

Hi. There are 2 files named: AnnuityDueGUI.java AnnuityDueResultGUI.java Under AnnuityDueGUI.java, there is this method as below: ============= public double calculateFADGUI(){ //FVA = A{[(1+i)^n – 1] / i} (1+i) String amountStr = amount.getText() ; //convert string to double dAmount = Double.parseDouble(am...

Call a method at a specific time for Django/Python?

Hello, In my Django web app, an event's status changes from 'upcoming' to 'completed' at a certain date/time. However, I want to update the database as soon as the event object's date/time has passed. Any ideas how I would code this? My only idea so far is to have a thread constantly running that that checks to see if the event object'...

undefined method `topics_path'

Not sure what this means and why... I got the undefined method error when I try to go to http://localhost:3000/forums, and after I generate my first forum. ActionView::TemplateError (undefined method `topics_path' for #<ActionView::Base:0x10319f2e0>) on line #25 of app/views/forums/index.html.erb: The area of code the error refers to...

QDBus problem: getting org.freedesktop.DBus.Error.UnknownMethod, but method exists

I'm programming C++ on Ubuntu, using QDBus and I've got the following code snippet: this->m_cRemoteInterface = new QDBusInterface("org.my.service", "/data", "org.freedesktop.DBus.Properties.Get"); QDBusReply<uint64_t> cResult = m_cRemoteInterface->call("property1"); The code throws the following error: org.freedesktop.DBus.Erro...

css methodology needed

Hi, i want to start the design of a website. I know i will need to: think of a general layout design banner/footer choose colors and font make sure everything is well positionned test the site with other browsers ... the problem is i don't know what is the good order to proceed in a efficient way. Should i design things from the gene...

How to pass method from class A to class B

There are 3 files: 1. Annuuity.java 2. AnnuityDueGUI.java // GUI for Annuity Due 2. AnnuityDueResultGUI.java //GUI for the result Under AnnuityDueGUI.java: public double calculateFADGUI(){ //FVA = A{[(1+i)^n – 1] / i} (1+i) String amountStr = amount.getText() ; //convert string to double dAmount = Double.pa...

log4j property configuration question

Hi, I have to stop showing logging messages of some methods within the system without changing a Java code (loggers)... I was thinking, is it possible to configure log4j.properties, where I could skip the logging for certain method? and is it possible to do log on method level at all with log4j? Thanks, K. ...

c# - should I use "ref" to pass a collection (e.g. List) by reference to a method?

Should I use "ref" to pass a list variable by reference to a method? Is the answer that "ref" is not needed (as the list would be a reference variable), however for ease in readability put the "ref" in? ...

Exclude items from autocomplete method

Hello all. I have the following code that pulls off a list of items used in an text box autocomplete extender: return autocomplete.tblAutoCompletes .Where(p => p.MemberId == memberid && p.LocationId == locationid && p.ACItem.Contains(prefixText)) .OrderBy(p => p.ACItem) .Select(p => p.ACItem) ...

Cannot implicitly convert type string to string[] in autocomplete method

Afternoon all - it's Friday th 13th so of course I am having an absolute mare!!! The code below, 'should' create a list of items that will be used in a textbox autocomplete. public string[] GetAutoComplete(string prefixText, int count) { try { string memberid = HttpContext.Current.Session["VDS_MemberID"]...

Linq - How to exclude items from autocomplete array

Hello all. I have the following code that gives me a an array in an autocomplete extender: return autocomplete.tblAutoCompletes .Where(p => p.MemberId == memberid && p.LocationId == locationid && p.ACItem.Contains(prefixText)) .OrderBy(p => p.ACItem) .Select(p => p.ACItem) ...

How do I avoid nil class in ruby on rails?

I get the following error, and thought by using the .nil? method I could avoid getting an error by identifying the exception. But I don't. Line 40 shows I am getting an error...it seems to think that contact.latest_event is nil. But shouldn't .nil? help me avoid getting the error? Thanks...! ActionView::TemplateError (undefined meth...

When to use Shared methods in .net

I'm kinda getting mixed messages about this so I'm hoping someone can clear this up for me. Should I be using Shared methods/functions in the following situation: I have a generic class named "Person". This class represents a person in the database. I have a manager class named "PersonManager". This class contains methods which adds, ...

What does the :: mean in C++?

void weight_data::rev_seq(string &seq){ //TODO std::reverse(seq.begin(), seq.end()); } In this C++ method, I think this method does not return anything, so the prefix is void, what does :: tell the relationships between weight_data and rev_seq(string &seq)? Thanks! ...

C# Override Method at Runtime

I have two questions. 1) I found a little gem of code for how to make a control scroll smoothly. Great. But it overrides the WndProc method, so to use it, I had to tear out the FlowLayoutPanel I'd dropped on the form at design time, subclass FlowLayoutPanel, and then finally instantiate my new class and create all the properties manual...

AS 3.0: Calling a method, which is defined in another class, from Main class gives Error 1120

I have two classes. The Main class calls a function, which is defined in a Second class. I'm getting the following error: Error 1120: Access of undefined property myFunction Basically, I am creating buttons in the Main class that will add a corresponding Child to an Object in the Second class (if you click one button, child x1 will be...

How to understand the syntax of message with multiple arguments in Objective C?

I know Objective C uses 'interleaved arguments', and it is by design. But I want to know why you think it makes life easier to merge the name of the first argument into the message name. See below: Correct: [myRectangle setOriginX: 30.0 y: 50.0] instead of Wrong: [myRectangle setOrigin x: 30.0 y: 50.0] [receiver message argument1:v...