Search Results

Search found 12194 results on 488 pages for 'reference counting'.

Page 34/488 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • How to set up my belongs_to and has_many reference

    - by dagda1
    Hi, I have an ExpenseType object that I have created with the following migration: class CreateExpenseTypes < ActiveRecord::Migration def self.up create_table :expense_types do |t| t.column :name, :string, :null => false t.timestamps end end I can see the table name is the pluralised expense_types. My question is, how do I reference this type in a belongs_to relationship? Is it: belongs_to :expensetype or is it belongs_to :expense_type I do not seem able to set it up correctly. Cheers

    Read the article

  • A reference that is not to 'const' cannot be bound to a non-lvalue

    - by Bert
    Hello, Am struggling a bit with this. Am declaring: BYTE *pImage = NULL; Used in call: m_pMyInterface-GetImage(i, &imageSize, &pImage); Visual C++ 2003 compiler error: error C2664: 'CJrvdInterface::GetImage' : cannot convert parameter 3 from 'BYTE **__w64 ' to 'BYTE **& ' A reference that is not to 'const' cannot be bound to a non-lvalue The method called is defined as: void CMyInterface::GetImage(const int &a_iTileId, ULONG *a_pulImageSize, BYTE** &a_ppbImage) { (...) Any help much appreciated, Bert

    Read the article

  • To Reference A Generic Method With A Lambda Expression

    - by SDReyes
    It is possible to reference a generic method using a Lambda Expression Object? For example, having: TheObject: public abstract class LambdaExpression : Expression TheMethod (an extension method of LINQ): public static TSource Last<TSource>( this IEnumerable<TSource> source ) I'm trying to create an instance of TheObject, that references to TheMethod. How do you do such thing?

    Read the article

  • WPF reference style in resource dictionary and use triggers

    - by Taylor
    I have a style defined in a resource dictionary that applies to all ComboBox controls. Within the ComboBox control, I reference the style like so: Style="{DynamicResource MyComboBoxStyle}" This works ok. I want to be able to add some triggers to some of the ComboBox controls. What is a good way to use the style referenced as a dynamic resource yet still be able to add triggers to some of the ComboBox controls?

    Read the article

  • Make Visual Studios "Add Service Reference" Feature use an existing Class

    - by gencha
    When I add a service reference to my Visual Studio 2010 C# project, a new class for one of the types defined in the WSDL will be generated. A de-facto equivalent definition of that type already exists in our solution in a different assembly. When adding the SoapTypeAttribute to the existing class and replacing the references to the generated class in the generated code, everything runs perfectly and as expected. How would I tell Visual Studio to use the existing class in the generated code?

    Read the article

  • Error 'duplicate definition' when compiling 2 c files that reference 1 header file

    - by super newbie
    I have two C files and one header that are as follows: Header file header.h: char c = 0; file1.c: #include "header.h" file2.c: #include "header.h" I was warned about 'duplicate definition' when compiling. I understand the cause as the variable c is defined twice in both file1.c and file2.c; however, I do need to reference the header.h in both c files. How should I overcome this issue?

    Read the article

  • add assembly reference dialog

    - by codymanix
    Is there a way to use visual studio's "add assembly reference dialog" (or something similar) in my own application? I need it for dynamic code generation and compilation. This is not simply an OpenFileDialog, since it additionally looks into the GAC and so on, so it will be very complicated to do it on my own, I think. If this is not possible, how can I get a list of all assemblies from the GAC?

    Read the article

  • doctrine reference?

    - by ajsie
    i've found one cheat sheet for doctrine: cheat sheet but it doesn't list all methods for Doctrine_Record, Doctrine_Core, Doctrine_Query etc. i wonder if there is a such reference? Would be very helpful.

    Read the article

  • Web reference problem on WCF

    - by kaivalya
    I have a WCF service which I am able to connect to from my web application and get data. I now added a web reference to this wcf project to a wsdl file that a shipping company provides. Intention is to get shipping quotes.. I am able to access the objects that are generated from this wsdl file but when I call service.Authenticate("DEMO"); method almost nothing happens. I debug and see the debugger continue to the next lines but there is no change on service parameters and service.isauthorized is null.. Can you lead me to how I should debug this further and things I should check, or if there are additional steps that I need to ensure to have a web reference working on wcf app Thanks using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; using ShippingCalculator.com.freight.api; namespace ShippingCalculator { public class ShippingService : IShippingService { freight_service service = new freight_service(); public string GetData(int value) { service.setConnectionType(".net"); service.Authenticate("DEMO"); OriginRequest origin = new OriginRequest(); origin.zip = "60101"; DestinationRequest destination = new DestinationRequest(); destination.zip = "10001"; PackageRequest package = new PackageRequest(); package.weight = "10"; ShipmentInfoRequest shipmentInfo = new ShipmentInfoRequest(); shipmentInfo.ship_date = DateTime.Now.AddDays(5); service.setOrigin(origin); service.setDestination(destination); service.setPackage(package); service.setShipmentInfo(shipmentInfo); Quote quote = service.getQuote(); return string.Format("Quote Number: {0}<br /> ", quote.QuoteNumber); } } } using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ShippingTestApp.ShippingServiceReference; namespace ShippingTestApp.Controllers { [HandleError] public class HomeController : Controller { public ActionResult Index() { ShippingServiceClient shipClient = new ShippingServiceClient(); shipClient.GetData(0); ViewData["Message"] = shipClient.GetData(0); return View(); } } }

    Read the article

  • Samsung Galaxy S2 ROM compilation error?

    - by Bashir
    I'm running Ubuntu 12.04 X64 and have installed all the tools(Toolchain: arm-2010q1 and Samsung Galaxy S2 source as given Here) to compile a ROM. When I run make Command I'm getting this error: kernel/built-in.o: In function `cpufreq_table_show': cpu_pm.c:(.text+0x39b64): undefined reference to `cpufreq_frequency_get_table' kernel/built-in.o: In function `cpufreq_max_limit_store': cpu_pm.c:(.text+0x39cd4): undefined reference to `omap_cpufreq_max_limit' cpu_pm.c:(.text+0x39d04): undefined reference to `omap_cpufreq_max_limit_free' cpu_pm.c:(.text+0x39d24): undefined reference to `omap_cpufreq_max_limit_free' kernel/built-in.o: In function `cpufreq_min_limit_store': cpu_pm.c:(.text+0x39dd4): undefined reference to `omap_cpufreq_min_limit' cpu_pm.c:(.text+0x39e04): undefined reference to `omap_cpufreq_min_limit_free' cpu_pm.c:(.text+0x39e24): undefined reference to `omap_cpufreq_min_limit_free' make: *** [.tmp_vmlinux1] Error 1

    Read the article

  • Why do i get a circular reference exception when calling to_json on an ActiveRecord::Relation

    - by midas06
    In Rails 3 (beta 3 on 1.8.7), when calling to_json on a relation i get a circular reference exception. Converting that relation to an array first, and THEN calling to_json works. Code That fails: Model.where().to_json (Where model is any model in your Rails 3 app) Code that works: Model.where().to_a.to_json This can be reproed on the console. Has anyone else run in to this? Is this expected?

    Read the article

  • MYSQL join - reference external field from nested select?

    - by PHP thinker
    Is it allowed to reference external field from nested select? E.g. SELECT FROM ext1 LEFT JOIN (SELECT * FROM int2 WHERE int2.id = ext1.some_id ) as x ON 1=1 in this case, this is referencing ext1.some_id in nested select. I am getting errors in this case that field ext1.some_id is unknow. Is it possible? Is there some other way?

    Read the article

  • Control Reference Static Method Performance

    - by dotnetguts
    I have just asked which one is better? Static Vs Non-Static? http://stackoverflow.com/questions/3016717/static-vs-non-static-method-performance-c I would like to take this discussion one step ahead. Consider If i pass reference of Panel control as parameter to Public static method, will static method still rules in performance?

    Read the article

  • C++ undefined reference

    - by klaus-johan
    Hi , My problem is the following : I have a class A that inherits from an abstract base class. I override all the virtual functions from the base class, and I have a constructor like this : A::A(B* b) { this->b=b; } In the constructor of class B , I have the following piece of code: A* a=new A(this) However this line of code gives the error : undefined reference to 'A::A(B*)' I have absolutly no idea why could this be happening , so any suggestion would be greatly appreciated !

    Read the article

  • Modify a reference numbered group to match against

    - by StuperUser
    I want to match YYYY-YY for sequential years. I at moment I'm trying to match where all the second YY is the 3rd and 4th characters in YYYY with 1 added to it. So far I've got {19|20}(\d{2})-(\d{2}), but not sure how to use ? with reference to (1) or whether I'm going about this the right way and finding out the inevitable "unknown unknowns" (like YY99) with this approach? Edit: Matches: 2010-11,2011-12,2029-30 Not matches: 2010-12, 2010-09,2011-2,2011-2012

    Read the article

  • win32:libs undefined reference

    - by hector
    I want to link a .lib in my Qt project and I get an error about an undefined reference to vhtIOConn::getDefault(vhtIOConn::DeviceType). I have already added the following specifications to the .pro file: ###################################################################### # Automatically generated by qmake (2.01a) vie 28. ago 12:48:10 2009 ###################################################################### TARGET = DEPENDPATH += . INCLUDEPATH += . LIBS += "C:\agregar\VirtualHandCore.lib" LIBS += "C:\agregar\VirtualHandDevice.lib" LIBS += "C:\agregar\VirtualHandRegistry.lib" # Input HEADERS += "C:/Documents and Settings/halvarado/Mis documentos/respaldos de Qt/Development/include/vhandtk/vhtBase.h" SOURCES += main.cpp What should I do?

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >