Search Results

Search found 8286 results on 332 pages for 'defined'.

Page 93/332 | < Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >

  • CSS Inclusion Problem

    - by Panther24
    I have a jsp page with a couple of CSS files included. In this, each CSS has separately defined styles for table. The problem is that I need those different styles for different tables and I'm unable to differentiate them and the menu's css styles get overlapped with the new css style. How can I avoid this problem; the menu.jsp has been included into another page. Is there a way to avoid overriding of the styles?

    Read the article

  • error C2065: 'CComQIPtr' : undeclared identifier

    - by Ken Smith
    I'm still feeling my way around C++, and am a complete ATL newbie, so I apologize if this is a basic question. I'm starting with an existing VC++ executable project that has functionality I'd like to expose as an ActiveX object (while sharing as much of the source as possible between the two projects). I've approached this by adding an ATL project to the solution in question, and in that project have referenced all the .h and .cpp files from the executable project, added all the appropriate references, and defined all the preprocessor macros. So far so good. But I'm getting a compiler error in one file (HideDesktop.cpp). The relevant parts look like this: #include "stdafx.h" #define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <WinInet.h> // Shell object uses INTERNET_MAX_URL_LENGTH (go figure) #if _MSC_VER < 1400 #define _WIN32_IE 0x0400 #endif #include <atlbase.h> // ATL smart pointers #include <shlguid.h> // shell GUIDs #include <shlobj.h> // IActiveDesktop #include "stdhdrs.h" struct __declspec(uuid("F490EB00-1240-11D1-9888-006097DEACF9")) IActiveDesktop; #define PACKVERSION(major,minor) MAKELONG(minor,major) static HRESULT EnableActiveDesktop(bool enable) { CoInitialize(NULL); HRESULT hr; CComQIPtr<IActiveDesktop, &IID_IActiveDesktop> pIActiveDesktop; // <- Problematic line (throws errors 2065 and 2275) hr = pIActiveDesktop.CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER); if (!SUCCEEDED(hr)) { return hr; } COMPONENTSOPT opt; opt.dwSize = sizeof(opt); opt.fActiveDesktop = opt.fEnableComponents = enable; hr = pIActiveDesktop->SetDesktopItemOptions(&opt, 0); if (!SUCCEEDED(hr)) { CoUninitialize(); // pIActiveDesktop->Release(); return hr; } hr = pIActiveDesktop->ApplyChanges(AD_APPLY_REFRESH); CoUninitialize(); // pIActiveDesktop->Release(); return hr; } This code is throwing the following compiler errors: error C2065: 'CComQIPtr' : undeclared identifier error C2275: 'IActiveDesktop' : illegal use of this type as an expression error C2065: 'pIActiveDesktop' : undeclared identifier The two weird bits: (1) CComQIPtr is defined in atlcomcli.h, which is included in atlbase.h, which is included in HideDesktop.cpp; and (2) this file is only throwing these errors when it's referenced in my new ATL/AX project: it's not throwing them in the original executable project, even though they have basically the same preprocessor definitions. (The ATL AX project, naturally enough, defines _ATL_DLL, but I can't see where that would make a difference.) My current workaround is to use a normal "dumb" pointer, like so: IActiveDesktop *pIActiveDesktop; HRESULT hr = ::CoCreateInstance(CLSID_ActiveDesktop, NULL, // no outer unknown CLSCTX_INPROC_SERVER, IID_IActiveDesktop, (void**)&pIActiveDesktop); And that works, provided I remember to release it. But I'd rather be using the ATL smart stuff. Any thoughts?

    Read the article

  • struts 2 - where should I set global application variables?

    - by Nicola Montecchio
    Hi I'm using struts 2 and I'd like to read some custom-defined parameters (global variables), preferably from web.xml or some custom ".properties" file (i.e. not hardcoded in the Java sources). This problem has been driving me mad for the past half hour as I can't google any reasonable solution. What is the best way to do this? I find it strange that it is so difficult ... all the best Nicola Montecchio

    Read the article

  • How to get the last element by date of each "type" in LINQ or TSQL

    - by Mauro
    Imagine to have a table defined as CREATE TABLE [dbo].[Price]( [ID] [int] NOT NULL, [StartDate] [datetime] NOT NULL, [Price] [int] NOT NULL ) where ID is the identifier of an action having a certain Price. This price can be updated if necessary by adding a new line with the same ID, different Price, and a more recent date. So with a set of a data like ID StartDate Price 1 01/01/2009 10 1 01/01/2010 20 2 01/01/2009 10 2 01/01/2010 20 How to obtain a set like the following? 1 01/01/2010 20 2 01/01/2010 20

    Read the article

  • Char* vs std::string

    - by Lockyer
    Is there any advantage to using char*'s instead of std::string? I know char*'s are usually defined on the stack, so we know exactly how much memory we'll use, is this actually a good argument for their use? Or is std::string better in every way?

    Read the article

  • SQLAlchemy custom query column

    - by thrillerator
    I have a declarative table defined like this: class Transaction(Base): __tablename__ = "transactions" id = Column(Integer, primary_key=True) account_id = Column(Integer) transfer_account_id = Column(Integer) amount = Column(Numeric(12, 2)) ... The query should be: SELECT id, (CASE WHEN transfer_account_id=1 THEN -amount ELSE amount) AS amount FROM transactions WHERE account_id = 1 OR transfer_account_id = 1 My code is: query = Transaction.query.filter_by(account_id=1, transfer_account_id=1) query = query.add_column(func.case(...).label("amount") But it doesn't replace the amount column. Been trying to do this with for hours and I don't want to use raw SQL.

    Read the article

  • SimpleRepository auto migrations with indexes

    - by scott
    I am using subsonic simplerepo with migrations in dev and it makes things pretty easy but I keep running into issues with my nvarchar columns that have an index. My users table has an index defined on the username column for obvious reasons but each time I start the project subsonic is doing this: ALTER TABLE [Users] ALTER COLUMN Username nvarchar(50); which causes this: The index 'IX_Username' is dependent on column 'Username'.ALTER TABLE ALTER COLUMN Username failed because one or more objects access this column Is there any way around this issue?

    Read the article

  • Why do we need to use out keyword while calling a method

    - by Midhat
    When a method is defined with an out parameter, why do I have to specify the out keyword when calling it. Its already there in the method definition, and the runtime should know that any parameter passed will be an out parameter. It would make sense if the compiler will accept the argument with or without out keyword, with different semantic, but if you MUST add the keyword to make the code compile, whats the use? Shouldn't the compiler handle it automatically? Same for ref

    Read the article

  • R: How to plot a vector, grouped by a factor

    - by amarillion
    In R, given a vector casp6 <- c(0.9478638, 0.7477657, 0.9742675, 0.9008372, 0.4873001, 0.5097587, 0.6476510, 0.4552577, 0.5578296, 0.5728478, 0.1927945, 0.2624068, 0.2732615) and a factor: trans.factor <- factor (rep (c("t0", "t12", "t24", "t72"), c(4,3,3,3))) I want to create a plot where the data points are grouped as defined by the factor. So the categories should be on the x-axis, values in the same category should have the same x coordinate. Simply doing plot(trans.factor, casp6) does almost what I want, it produces a boxplot, but I want to see the individual data points.

    Read the article

  • Setting a variable to undefined

    - by AJ
    Hello, I'm a bit confused about Javascript undefined & null. Firstly what does if (!testvar) actually do? Does it test for undefined and null or just undefined? Secondly, once a variable is defined can I clear it back to undefined (therefore deleting the variable). Thirdly, can I pass undefined as a parameter? e.g: function test(var1, var2, var3) { } test("value1", undefined, "value2") Thanks, AJ

    Read the article

  • How do I put files in the TFS Build drop location

    - by Scott Langham
    Hi, I'm new to using TFS build. I've got a build defined that runs as a continuous integration. It creates a drop folder, but there's nothing in it. What's the best practice for moving stuff in the drop folder? I've seen a Binaries folder, do I need to copy things into their, or do I alter the TFSbuild.proj in some way to copy the files I want to the drop folder? Thanks.

    Read the article

  • UITableView Header Selection

    - by Reonarudo
    Hello, Can anyone explain me how can I detect a selection in a table view Header view like in tableView:didSelectRowAtIndexPath: ? It would be very useful for me. I've defined the header as UITableCellView so I could attach a UISwitch as an accessory view, and it worked great but now I can't detect the changes made in the switch. Any suggestions?

    Read the article

  • Problem getting correct parameters for C# P/Invoke call to C++ dll

    - by Jim Jones
    Trying to Interop a functionality from the Outside In API from Oracle. Have the following function: SCCERR EXOpenExport {VTHDOC hDoc, VTDWORD dwOutputId, VTDWORD dwSpecType, VTLPVOID pSpec, VTDWORD dwFlags, VTSYSPARAM dwReserved, VTLPVOID pCallbackFunc, VTSYSPARAM dwCallbackData, VTLPHEXPORT phExport); From the header files I reduced the parameters to: typedef VTSYSPARAM VTHDOC, VTLPHDOC * typedef DWORD_PTR VTSYSPARAM typedef unsigned long DWORD_PTR typedef unsigned long VTDWORD typedef VTVOID* VTLPVOID #define VTVOID void typedef VTHDOC VTHEXPORT, *VTLPEXPORT These are for 32 bit windows Going through the header files, the example programs, and the documentation I found: 1. That pSpec could be a pointer to a buffer or NULL, so I set it to a IntPtr.Zero (documentation). 2. That dwFlags and dwReserved according to the documentation "Must be set by the developer to 0". 3. That pCallbackFunc can be set to NULL if I don't want to handle callbacks. 4. That the last two are based on structs that I wrote C# wrappers for using the [StructLayout(LayoutKind.Sequential)]. Then instatiated an instance and generated the parameters by first creating a IntPtr with Marshal.AllocHGlobal(Marshal.SizeOf(instance)), then getting the address value which is passed as a uint for dwCallbackData and a IntPtr for phExport. The final parameter list is as follows: 1. phDoc as a IntPtr which was loaded with an address by the DAOpenDocument function called before. 2. dwOutputId as uint set to 1535 which represents FI_JPEGFIF 3. dwSpecType as int set to 2 which represents IOTYPE_ANSIPATH 4. pSpec as an IntPtr.Zero where the output will be written 5. dwFlags as uint set to 0 as directed 6. dwReserved as uint set to 0 as directed 7. pCallbackFunc as IntPtr set to NULL as I will handle results 8. dwCallBackDate as uint the address of a buffer for a struct 9. phExport as IntPtr to another struct buffer still get an undefined error from the API. Meaning that the call returns a 961 which is not defined in any of the header files. In the past I have gotten this when my choice of parameter types are incorrect. I started out using Interop Assistant which was helpful in learning how many of the parameter types get translated. It is however limited by how well I am able to glean the correct native type from the header files. For example the hDoc parameter used in the preceding function was defined as a non-filesytem handle, so attempted to use Marshal to create a handle, then used an IntPtr, and finally it turned out to be an int (actually it was &phDoc used here). So is there a more scientific way of doing this, other than trial and error? Jim

    Read the article

  • jQuery Tooltip widget well-suited to use with an IMAGE-MAP? suggestions/recommendations please

    - by Tim
    I would like to display different tooltip content for each of the areas defined in an image-map. Are there any jQuery plug-ins that have an API well-suited to use with image-maps? I would like it also be be flexible with regard to where the tooltip content comes from, e.g. the content might be contained in an anchor element of an invisible iframe or it might come from a database. Thanks

    Read the article

  • Can Box Layout accept size of included elements?

    - by Roman
    I used myPanel.setLayout(new BoxLayout(myPanel, BoxLayout.Y_AXIS)); to order panels vertically (one under another one). But myPanel defined in the shown way change the included panel. In more details, it tries to set the same hight and width for the included panels. Can it be changed? Can BoxLayout adopt size of the included elements?

    Read the article

  • sending an email using user input from android

    - by Rahul Varma
    Hey, I am designing an app in which the data is stored in the database. There's a button in the form which is on clicked to send an email to pre defined mail address with the data that is stored in the database. Since i am a newbie to android i need help regarding sending the mail... So please help me...

    Read the article

  • IE8 web slice - CSS problem

    - by rjovic
    Again me with IE8 web slice :) This time i have following problem. I created web slice for IE8 and created button for users where they can choice to add it to their browsers. Code is : <input class="add" type="button" value="Dodaj Xica web slice u IE8!" onclick='window.external.AddToFavoritesBar("http://localhost:51914/Home/GetWebSlice", "xica.rjovic.com", "slice");' /> There is everything fine, and web slice is added to IE8 and web page is displayed correct. But I have problem with CSS in web slice. I defined css in it, but when web slice i rendered there are only black fonts without any css properties. My web slice is defined as : <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>GetWebSlice</title> <style type="text/css"> p {color: white; } body {background-color: blue; } .container {background-color: red;} </style> </head> <body> <div class="hslice container" id="xica"> <h2 class="entry-title container">Xica web slice</h2> <div class="entry-content"> <h2>Saldo : <b><%= ViewData["total"] %></b></h2> <p><%= ViewData["cardNumber"] %></p> <p>Status : <%= ViewData["status"] %></p> </div> </div> </body> </html> When I try to see web slice directly in my browser then everything is ok, and css is show as expected. Thank you...! EDIT : here is the picture of problem : http://www.deviantpics.com/share-2F10_4BD73E25.html

    Read the article

  • How to @synthesize a C-Style array of pointers?

    - by Peter Hajas
    I have a property defined in a class like so: @interface myClass UIImageView *drawImage[4]; ... @property (nonatomic, retain) UIImageView **drawImage; ... @synthesize drawImage; // This fails to compile I have found similar questions on StackOverflow and elsewhere, but none that really address this issue. What is the most Objective-C kosher way to do this?

    Read the article

  • Correct way to set the driverOptions for Doctrine DBAL configuration in symfony2

    - by yesIcan
    I have set driverOptions in the config file as mentioned in the doctrine DBAL documentation. But this gives and error 1/1 InvalidConfigurationException: Unrecognized options "driverOptions" under "doctrine.dbal.connections.pdoDevCon" My config file is dbal: default_connection: pdoDevCon connections: pdoDevCon: driver: %dev_database_driver% # < host: %dev_database_host% # | port: %dev_database_port% # | Defined in user: %dev_database_user% # | password: %dev_database_password% # < charset: UTF8 driverOptions: {3: 2} mapping_types: enum: string set: string orm: auto_generate_proxy_classes: %kernel.debug% pdoDevCon: connection: pdoDevCon mappings: AcmeDemoBundle: ~ AcmeHelloBundle: ~ I am using PDO::ATTR_ERRMODE as 3 PDO::ERRMODE_EXCEPTION as 2, it does not work even if i use the strings.

    Read the article

  • How Do I Create Expand All and Collapse All Links Outside of the jQuery Treeview Plugin?

    - by Ben Griswold
    The jQuery Treeview Plugin adds Collapse All, Expand All and Toggle All links to the "treeviewcontrol" div when the control property is defined as follows: $("#black, #gray").treeview({ control: "#treecontrol", persist: "cookie", cookieId: "treeview-black" }); This works great, but I'd like the ability to expand and collapse the treeview from other page elements outside of the treeview itself. I've looked at the source, but I can't figure it out.

    Read the article

  • mocking superclass protected variable using jmockit

    - by shashi
    Hi, I couldnt able to mock the protected varibale defined in the superclass.i could able to mock the protected method in superclass but couldnt to mock the protected variable in to the subclass ,wherein am writing the testcase for subclass,Please if anybody out there has any soluton for it .please reply. Thanks Shashi

    Read the article

< Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >