Search Results

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

Page 10/332 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • get value of a property o => o.Property1 , defined in lambda

    - by Omu
    I need to get the value of a property defined in a lambda public static MvcHtmlString MyHelper<T, TProperty>( this HtmlHelper<T> html, Expression<Func<T, TProperty>> prop) { var value = \\ get the value of Prop1 (not the name "Prop1") ... } the intended usage is something like: public class FooViewModel { public string Prop1 { get;set; } } <%@ Page ViewPage<FooViewModel> %> <%=Html.MyHelper(o => o.Prop1) %>

    Read the article

  • Function defined but not used warning in C

    - by thetna
    I have a number of C source files(both .c and .h files). header files contains a number of functions. Out of those functions, only partially are used in a source .C file.Suppose a.h,b.h are header files and a.c and b.c are .c files. a.h is included in a.c. But only a number of functions those are in a. h are used and rest are not used. After compilation I find following warnings: function XXXX defined but not used. But those XXXX functions which are not used in a.c are used in b.c. So, i can't completely remove those functions too. So , i decided to make a separate file containing only those XXXX functions and included it wherever it is used.Doing this is creating multiple number of header files. Can anybody please suggest me to some effective way to solve this problem.

    Read the article

  • PHP fails silently when function not defined?

    - by John Isaacks
    I am migrating from PHP4 to PHP5 I have this in my .htaccess: php_flag display_errors on php_value error_reporting 2039 Which used to show all errors. I am still getting some errors but I used to get an error when I called a function that was not defined, but now it stops where it is at and send the client everything up to the error and nothing after. With no error message. Here is what phpinfo is telling me: Directive Local Value Master Value display_errors On Off error_reporting 2039 6143 I would like to be able to see my error messages for trouble shooting purposes. Can someone tell me what I need to do? Thanks!!

    Read the article

  • Choose between multiple options with defined probability

    - by Sijin
    I have a scenario where I need to show a different page to a user for the same url based on a probability distribution, so for e.g. for 3 pages the distribution might be page 1 - 30% of all users page 2 - 50% of all users page 3 - 20% of all users When deciding what page to load for a given user, what technique can I use to ensure that the overall distribution matches the above? I am thinking I need a way to choose an object at "random" from a set X { x1, x2....xn } except that instead of all objects being equally likely the probability of an object being selected is defined beforehand.

    Read the article

  • LNK2005: delete already defined error in VC++

    - by user333422
    Hi, I asked this question earlier as well: http://stackoverflow.com/questions/2773168/lnk2005-delete-already-defined-error-in-vc The answer I got was that I should be using dynamic version of DLLs. I did that and it compiled fine. Now, but when I gave the exe to one of my colleagues to run, they told me - they can't run it as it requires some shared dll, so they need a static one. When I try to do static build then I get the error as mentioned in my previous link. Do, I need to provide some other file as well with exe. I have got .lib file as well in the build directory. Shall I provide taht one as well? I can run it fine on my m/c in whichever directory I put it. Any help is much appreciated as I am really stuck. Thanks in advance, Suchita

    Read the article

  • Handling multiple post-defined datasource connections based on user

    - by choudeshell
    How should I handle multiple user-connection defined datasource connection in my .NET application? To illustrate this better; the user provides three (3) pieces of information, username, password and data source name. This data source name is then looked-up in a central database telling that application which main database this user should connect to. My question is, in the DataAccess layer, should we only pass down enough information to uniquely identify that user, and query the central database each time in the DAL; or, should we provide another way to pass the datasource connection down to the DAL?

    Read the article

  • Compare to a defined constants in C?

    - by J.W.
    I am trying to compare to a defined constants in C, and I have simplified my program to the following.. #include "stdio.h" #include "stdlib.h" #define INVALID_VALUE -999; int main(int argc, const char* argv[]) { int test=0; if(test==INVALID_VALUE) //The error line.. return INVALID_VALUE; return 0; }; And when I use gcc to compile. it gives out error "error: expected ‘)’ before ‘;’ token" Any reason that this cannot be done.

    Read the article

  • LNK2005: delete already defined error in VC++

    - by user333422
    Hi, I am newbie to VC++, so please forgive me if this is stupid. I have got 7 solutions under one project. Six of these build static libraries which is linked inside 7th to produce an exe. The runtime configuration of all the projects is MultiThreaded Debug. sln which is used to produce exe is using MFC other slns use standard runtiem library. I tried changing those to MFC, but still I am getting the same error. All the six slns build successfully. When I try to build exe - get the follwoing error: nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *,int,char const *,int)" (??3@YAXPAXHPBDH@Z) already defined in tara_common.lib(fileStream.obj) This is weird because tara_common is one of the libs that I generated and fileStream.cpp is file that is just using delete on a pointer. I built it in verbose mod, so I am attaching the output. ENVIRONMENT SPACE _ACP_ATLPROV=C:\Program Files\Microsoft Visual Studio 9.0\VC\Bin\ATLProv.dll _ACP_INCLUDE=C:\Program Files\Microsoft Visual Studio 9.0\VC\include;C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include _ACP_LIB=C:\fta\tara\database\build\Debug;C:\Program Files\Microsoft Visual Studio 9.0\VC\lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\lib\i386;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib;C:\Program Files\Microsoft Visual Studio 9.0\;C:\Program Files\Microsoft Visual Studio 9.0\lib _ACP_PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio 9.0\Common7\tools;C:\Program Files\Microsoft Visual Studio 9.0\Common7\ide;C:\Program Files\HTML Help Workshop;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 9.0\;C:\WINDOWS\SysWow64;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;C:\Program Files\GnuWin32\bin;C:\Python26 ALLUSERSPROFILE=C:\Documents and Settings\All Users CLIENTNAME=Console CommonProgramFiles=C:\Program Files\Common Files ComSpec=C:\WINDOWS\system32\cmd.exe FP_NO_HOST_CHECK=NO HOMEDRIVE=C: INCLUDE=C:\Program Files\Microsoft Visual Studio 9.0\VC\include;C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include LIB=C:\fta\tara\database\build\Debug;C:\Program Files\Microsoft Visual Studio 9.0\VC\lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\lib\i386;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib;C:\Program Files\Microsoft Visual Studio 9.0\;C:\Program Files\Microsoft Visual Studio 9.0\lib LIBPATH=c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\lib LOGONSERVER=\xxx NUMBER_OF_PROCESSORS=1 OS=Windows_NT PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio 9.0\Common7\tools;C:\Program Files\Microsoft Visual Studio 9.0\Common7\ide;C:\Program Files\HTML Help Workshop;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 9.0\;C:\WINDOWS\SysWow64;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;C:\Program Files\GnuWin32\bin;C:\Python26 PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 10, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=170a ProgramFiles=C:\Program Files SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS VisualStudioDir=C:\Documents and Settings\sgupta\My Documents\Visual Studio 2008 VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\ WecVersionForRosebud.710=2 windir=C:\WINDOWS COMMAND LINES: Creating temporary file "c:\fta\tools\channel_editor\IvoDB\Debug\RSP00011018082288.rsp" with contents [ /VERBOSE /OUT:"C:\fta\tools\channel_editor\Builds\IvoDB_1_35_Debug.exe" /INCREMENTAL /LIBPATH:"......\3rdparty\boost_1_42_0\stage\lib" /MANIFEST /MANIFESTFILE:"Debug\IvoDB_1_35_Debug.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DELAYLOAD:"OleAcc.dll" /DEBUG /PDB:"C:\fta\tools\channel_editor\Builds\IvoDB_1_35_Debug.pdb" /SUBSYSTEM:WINDOWS /DYNAMICBASE /NXCOMPAT /MACHINE:X86 ......\tara\database\build\Debug\tara_database.lib ......\tara\common\build\Debug\tara_common.lib ......\3rdparty\sqliteWrapper\Debug\sqliteWrapper.lib ......\3rdparty\sqlite_3_6_18\Debug\sqlite.lib ......\stsdk\modules\win32\Debug\modules.lib ......\stsdk\axeapi\win32\Debug\axeapi.lib DelayImp.lib ".\Debug\AntennaSettings.obj" ".\Debug\AudioVideoSettings.obj" ".\Debug\CMDatabase.obj" ".\Debug\CMSettings.obj" ".\Debug\ColorFileDialog.obj" ".\Debug\ColorStatic.obj" ".\Debug\DragDropListCtrl.obj" ".\Debug\DragDropTreeCtrl.obj" ".\Debug\FavouriteEdit.obj" ".\Debug\FavTab.obj" ".\Debug\FindProgram.obj" ".\Debug\HyperLink.obj" ".\Debug\IvoDB.obj" ".\Debug\IvoDBDlg.obj" ".\Debug\IvoDBInfo.obj" ".\Debug\IvoDBInfoTab.obj" ".\Debug\IvoDbStruct.obj" ".\Debug\LayoutHelper.obj" ".\Debug\MainTab.obj" ".\Debug\OperTabCtrl.obj" ".\Debug\ParentalLock.obj" ".\Debug\ProgramEdit.obj" ".\Debug\ProgramTab.obj" ".\Debug\PVRSettings.obj" ".\Debug\SatTab.obj" ".\Debug\SettingsBase.obj" ".\Debug\SettingsTab.obj" ".\Debug\STBSettings.obj" ".\Debug\stdafx.obj" ".\Debug\TimeDate.obj" ".\Debug\TransponderEdit.obj" ".\Debug\TreeTab.obj" ".\Debug\UserPreferences.obj" ".\Debug\Xmodem.obj" ".\Debug\IvoDB.res" ".\Debug\IvoDB_1_35_Debug.exe.embed.manifest.res" ] Creating command line "link.exe @c:\fta\tools\channel_editor\IvoDB\Debug\RSP00011018082288.rsp /NOLOGO /ERRORREPORT:PROMPT" **Processed /DEFAULTLIB:atlsd.lib Processed /DEFAULTLIB:ws2_32.lib Processed /DEFAULTLIB:mswsock.lib Processed /DISALLOWLIB:mfc90d.lib Processed /DISALLOWLIB:mfcs90d.lib Processed /DISALLOWLIB:mfc90.lib Processed /DISALLOWLIB:mfcs90.lib Processed /DISALLOWLIB:mfc90ud.lib Processed /DISALLOWLIB:mfcs90ud.lib Processed /DISALLOWLIB:mfc90u.lib Processed /DISALLOWLIB:mfcs90u.lib Processed /DISALLOWLIB:uafxcwd.lib Processed /DISALLOWLIB:uafxcw.lib Processed /DISALLOWLIB:nafxcw.lib Found "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) Referenced in axeapi.lib(ipcgeneric.obj) Referenced in axeapi.lib(ipccommon.obj) Referenced in axeapi.lib(activeobject.obj) Referenced in nafxcwd.lib(nolib.obj) Referenced in sqliteWrapper.lib(DbConnection.obj) Referenced in sqliteWrapper.lib(Statement.obj) Referenced in axeapi.lib(nvstorage.obj) Referenced in axeapi.lib(avctrler.obj) Referenced in tara_common.lib(trace.obj) Referenced in tara_common.lib(ssPrintf.obj) Referenced in tara_common.lib(taraConfig.obj) Referenced in tara_common.lib(stream.obj) Referenced in tara_common.lib(STBConfigurationStorage.obj) Referenced in tara_common.lib(STBConfiguration.obj) Referenced in tara_common.lib(configParser.obj) Referenced in tara_common.lib(fileStream.obj) Referenced in tara_database.lib(SatStream.obj) Referenced in tara_database.lib(Service.obj) Referenced in tara_database.lib(ServiceList.obj) Referenced in tara_common.lib(playerConfig.obj) Referenced in UserPreferences.obj Referenced in Xmodem.obj Referenced in tara_database.lib(init.obj) Referenced in tara_database.lib(Satellite.obj) Referenced in TransponderEdit.obj Referenced in TreeTab.obj Referenced in TreeTab.obj Referenced in UserPreferences.obj Referenced in stdafx.obj Referenced in TimeDate.obj Referenced in TimeDate.obj Referenced in TransponderEdit.obj Referenced in SettingsTab.obj Referenced in SettingsTab.obj Referenced in STBSettings.obj Referenced in STBSettings.obj Referenced in SatTab.obj Referenced in SatTab.obj Referenced in SettingsBase.obj Referenced in SettingsBase.obj Referenced in ProgramTab.obj Referenced in ProgramTab.obj Referenced in PVRSettings.obj Referenced in PVRSettings.obj Referenced in ParentalLock.obj Referenced in ParentalLock.obj Referenced in ProgramEdit.obj Referenced in ProgramEdit.obj Referenced in MainTab.obj Referenced in MainTab.obj Referenced in OperTabCtrl.obj Referenced in OperTabCtrl.obj Referenced in IvoDBInfoTab.obj Referenced in IvoDbStruct.obj Referenced in LayoutHelper.obj Referenced in LayoutHelper.obj Referenced in IvoDBDlg.obj Referenced in IvoDBInfo.obj Referenced in IvoDBInfo.obj Referenced in IvoDBInfoTab.obj Referenced in HyperLink.obj Referenced in IvoDB.obj Referenced in IvoDB.obj Referenced in IvoDBDlg.obj Referenced in FavTab.obj Referenced in FavTab.obj Referenced in FindProgram.obj Referenced in FindProgram.obj Referenced in DragDropTreeCtrl.obj Referenced in DragDropTreeCtrl.obj Referenced in FavouriteEdit.obj Referenced in FavouriteEdit.obj Referenced in ColorFileDialog.obj Referenced in ColorStatic.obj Referenced in DragDropListCtrl.obj Referenced in DragDropListCtrl.obj Referenced in CMDatabase.obj Referenced in CMDatabase.obj Referenced in CMSettings.obj Referenced in CMSettings.obj Referenced in AntennaSettings.obj Referenced in AntennaSettings.obj Referenced in AudioVideoSettings.obj Referenced in AudioVideoSettings.obj Loaded nafxcwd.lib(afxmem.obj) nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *,int,char const *,int)" (??3@YAXPAXHPBDH@Z) already defined in tara_common.lib(fileStream.obj)** Please help me out, I have already wasted 3 days looking on net and trying all the possible solutions I found. thanks in advance, SG

    Read the article

  • StructureMap Exception Code: 202 No Default Instance defined for PluginFamily

    - by Code Sherpa
    Hi. I am new to StructureMap. I have downloaded and am using version 2.6.1.0. I keep getting the below error: StructureMap Exception Code: 202 No Default Instance defined for PluginFamily Company.ProjectCore.Core.IConfiguration, Company.ProjectCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null My Global.asax.cs looks like: protected void Application_Start(object sender, EventArgs e) { var container = new Container(x => { x.For<ICache>().Use<Cache>(); x.For<IEmailService>().Use<EmailService>(); x.For<IUserSession>().Use<UserSession>(); x.For<IRedirector>().Use<Redirector>(); x.For<INavigation>().Use<Navigation>(); }); container.AssertConfigurationIsValid(); } I changed from ObjectFactory.Initialize to "new Container" to debug. When stepping through the AssertConfigurationIsValid() method, Cache works but EmailService fails at the GetInstance method in the following line: private readonly IConfiguration _configuration; public EmailService() { _configuration = ObjectFactory.GetInstance<IConfiguration>(); } If I remove IEmailService, the same 202 error is thrown at IUserSession. Should I be adding something else in Application_Start or in my class files? Thanks in advance...

    Read the article

  • How to pass SOAP headers into python SUDS that are not defined in WSDL file

    - by chrissygormley
    Hello, I have a camera on my network, I am trying to connect to it with suds but suds doesn't send all the information needed. I need to put extra soap headers not defined in the WSDL file so the camera can understand the message. All the headers are contained in a SOAP envelope and then the suds command be in the body of the message. I have checked the suds website and it says to pass in the headers like so: from suds.sax.element import Element client = client(url) ssnns = ('ssn', 'http://namespaces/sessionid') ssn = Element('SessionID', ns=ssnns).setText('123') client.set_options(soapheaders=ssn) result = client.service.addPerson(person) Now I am not sure how I would implement this, say for example I have the below header: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:p1="http://www.website.org/ver10/p/wsdl"> .<SOAP-ENV:Header> Using this or a similar example does anyone know hos I would get this passed into the soap command so my camera understands? Thanks

    Read the article

  • Custom Facelets components and attributes defined in taglib

    - by michael lucas
    Defining custom components in Facelets is easy and quick but there's one thing I can't figure out. Is it possible with Facelets to define what attributes my custom component has? I.e: I've created a component which is used in such a way: <blue:modalWindow id="editFeesWizard" width="500" height="440" title="Wizard"> and is defined in taglib.xml as follows: <!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "http://java.sun.com/dtd/facelet-taglib_1_0.dtd"> <facelet-taglib> <namespace>http://blue/</namespace> <tag> <tag-name>modalWindow</tag-name> <source>components/modalWindow.xhtml</source> </tag> </facelet-taglib> Taglib doesn't contain any information on component attributes (id, width, height, title) and IDE cannot therefore check my syntax nor can it suggest attributes while I'm typing. I cannot find anything on this subject in Facelets documentation. Thought you could help. Thanks!

    Read the article

  • Python class variables not defined with called from outside module

    - by Jimmy
    I am having some issues with calling a function outside of a module. The scenario is I have a small class library that is using turtle to do some drawing, the function within the module calls the classes also within the module and draws things, etc. This all works fine and dandy when I call the function from within the same file, but if I have another file and call myLib.scene() I get variable undefined errors. Code examples: a class class Rectangle(object): def __init__(self, pen, height=100, width=100, fillcolor=''): self.pen = pen self.height = height self.width = width self.fillcolor = fillcolor def draw(self, x, y): '''draws the rectangle at coordinates x and y''' self.pen.goto(x, y) if self.fillcolor: self.pen.fillcolor(self.fillcolor) self.pen.fill(True) self.pen.down() for i in range(0,4): self.pen.forward(self.height if i%2 else self.width) self.pen.left(90) and the calling function is this def scene(pen): rect = Rectangle(pen) rect.draw(100,100) when I put the line scene(turtle.Turtle()) into the same file I have no issues, the rectangle is drawn and everyone goes home happy. However, if I try to call it from a separate python file like so: myLib.scene(turtle.Turtle()) I get an error: NameError: global name 'pen' is not defined, in the for loop of my draw method. Even if the line above is in the same file it still bombs out. What is going on?

    Read the article

  • ASP.Net 2.0 VB WebSite Project "Type 'Exception' is not defined"

    - by AtlSteve
    All of a sudden our VB ASP.Net 2.0 WebSite Project started complaining that Exception was not defined. I have discovered that if I add "Imports System" to the header, or explicitly use System.Exception that it works, but this error permeates a lot of other System descendants like the Data namespace, and the DateTime object. We have hundreds and hundreds of pages, so adding Imports System to all of them not only would be time consuming, but it seems like a band-aid fix to the problem. I have checked the Project-Property Pages-References, and the web.config file, and the assembly is imported into the project, it is just not being "Auto Imported" into the Class Files like it USUALLY is. Note this does not JUST affect CodeBehind, but All className.vb files. I would like to fix this problem, but more importantly would like to understand what could cause the System namespace to all of a sudden stop being auto imported. There is obviously some file change that caused this, as my co-worker started seeing the problem this morning after he did a Full-Get on the project. MORE: The Web.Config file located in the Windows\Microsoft.Net...\Config\Web.Config file does have the , and System is added. Adding the tags, and adding System to the LOCAL web.config did nothing to mitigate the problem. Any help would be appreciated. First SO Question, so I hope I was descriptive enough.

    Read the article

  • WPF not applying default styles defined in MergedDictionaries?

    - by Burgberger
    In a WPF application I defined default control styles in separate resource dictionaries (e.g. "ButtonStyle.xaml"), and added them as merged dictionaries to a resource dictionary named "ResDictionary.xaml". If I refer this "ResDictionary.xaml" as merged dictionary in my App.xaml, the default styles are not applied. However, if I refer the "ButtonStyle.xaml", it works correctly. If I recompile the same code in .NET 3.5 or 3.0, it recognizes and applies the default styles referred in "App.xaml" through "ResDictionary.xaml", but not in .NET 4.0. At runtime if I check the Application.Current.Resources dictionary, the default styles are there, but they are not applied, only if I specify the Style property explicitly in the Button control. Are there any solutions to refer a resource dictionary (containig default styles) this way in .NET 4.0? App.xaml: <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Styles/ResDictionary.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> ResDictionary.xaml: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Default/ButtonStyle.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> ButtonStyle.xaml: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Style TargetType="Button"> <Setter Property="Background" Value="Yellow"/> </Style> </ResourceDictionary>

    Read the article

  • viewstack causing error 1065 variable not defined issue?

    - by jason
    I've got an flex application where I have a left side TREE control and a viewstack on the right and when someone selects the tree it loads the named viewstack based on the hidden node value of the XML of the tree. But it's throwing a error 1065 variable not defined on a viewstack which worked on the last browser refresh/reload. It's not related to a particular viewstack from what I can tell it just seems to throw the error on certain render events. I've tried to use creationpolicy="all" on the viewstack but it seems to not be of any help. public function treeChanged(event:Event):void { selectedNode=Tree(event.target).selectedItem as XML; //trace(selectedNode.@hidden); //Alert.show([email protected]() + " *"); if([email protected]() == '' || [email protected]() == null){ //Alert.show("NULL !"); return; } mainviewstack.selectedChild = Container(mainviewstack.getChildByName([email protected]())); //Container(mainviewstack.getChildByName(selectedNode.@hidden)); If I add in an alert box before the getchildbyname option the viewstack has time to render and everything works fine, so it leads me to believe the app is not giving it enough time to load the viewstack?

    Read the article

  • [Python] name 'OptionGroup' is not defined

    - by Cawas
    Ok, so I made this rookie mistake below, but in my defense I was led to it thanks to how the help about this subject is on python docs, which states how to use optparse. It is actually an error under the gigantic tutorial section. In contrast and to my offense, I may be one of the very few stupid people who can't read very well and pay close attention on what I do. But since this took me so long to discover, I wanted to "document" it here: Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) >>> from optparse import OptionParser >>> outputGroup = OptionGroup(parser, 'Output handling') Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'OptionGroup' is not defined This is strictly done with examples found on the docs, and you can't find anything about it anywhere, be it that long long docs page, google or stackoverflow. Plus, reading optparse.py shows OptionGroup is there, so that adds to the confusion. I bet it will take less than 1 minute for someone to spot my error. For that I'll only add proper tags and / or modify the title later on. :)

    Read the article

  • error on connecting to the server : socket io is not defined

    - by max
    i know there's been couple of question about the same problem , i've already check them . i have very simple node.js chat app i have a server running on 8000 port and it works fine my client pages are html , they are running on apache and i'm using socket.io to connect them to the server and it works fine on the local host but when i upload the app on the server i keep on getting this error in the firebug io is not defined var socket = io.connect('http://atenak.com:8000/'); or sometimes it doesn't show that but when i try to broadcast message from cliend i get this error : socket is undefined socket.emit('msg', { data: msg , user:'max' }); the only difference is i've changed the localhost with atenak.com ! here is my html code var socket = io.connect('http://atenak.com:8000/'); var user = 'jack'; socket.on('newmsg', function (data) { if(data.user == user ) { $('#container').html(data.data); } }); function brodcast(){ var msg = $('#fild').val(); socket.emit('msg', { data: msg , user:'max' }); } </script> </head> <body> <div id="container"> </div> <input id="fild" type="text"> <input name="" type="button" onClick="brodcast();"> </body> i have included the sockt.io.js and server is running ok which means socket.io is installed on the server here is the live page http://atenak.com/client.html

    Read the article

  • Cannot access resource defined in app.xaml

    - by DerKlaus
    I am using Visual Studio 2010 RC1. I define a resource "Brush2" in app.xaml_: <Application x:Class="VideoThumbnails.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> <Application.Resources> <RadialGradientBrush x:Key="Brush2" RadiusX="1" RadiusY="1" GradientOrigin="0.3,0.3"> <GradientStop Color="White" Offset="0"/> <GradientStop Color="#ffc0c0" Offset="1"/> </RadialGradientBrush> </Application.Resources> </Application> In my Mainwindow I am trying to use that resource: ... <Border Margin="4,2" BorderBrush="Black" BorderThickness="2" CornerRadius="4" ToolTip="{Binding Path=FullPath}" HorizontalAlignment="Stretch" Background="{StaticResource Brush2}"> ... No matter what I do it always raises an exception at runtime (Resource not found). I changed build action without success. How can I use resources defined in app.xaml?

    Read the article

  • Is private members hacking a defined behaviour ?

    - by ereOn
    Hi, Lets say I have the following class: class BritneySpears { public: int getValue() { return m_value; }; private: int m_value; }; Which is an external library (that I can't change). I obviously can't change the value of m_value, only read it. Even subclassing BritneySpears won't work. What if I define the following class: class AshtonKutcher { public: int getValue() { return m_value; }; public: int m_value; }; And then do: BritneySpears b; // Here comes the ugly hack AshtonKutcher* a = reinterpret_cast<AshtonKutcher*>(&b); a->m_value = 17; // Print out the value std::cout << b.getValue() << std::endl; I know this is a bad practice. But just for curiosity: is this guaranted to work ? Is it a defined behaviour ? Bonus question: Have you ever had to use such an ugly hack ? Thanks !

    Read the article

  • gcc compilation without using system defined header locations

    - by bogertron
    I am attempting to compile a c++ class using gcc. Due to the nature of the build, I need to invoke gcc from a non-standard location and include non-system defined headers, only to add a set from a different location. However, when I do this, I run into an issue where I cannot find some base symbols (suprise suprise). So i am basically running this command to compile my code: -->(PARENT_DIR)/usr/bin/gcc # invoke compiler -B$(PARENT_DIR)/usr/lib64/gcc/suselinux-x8664 -B$(PARENT_DIR)/usr/lib64 #C/C++ flags -fPIC -fvisibility=default -g -c -Wall -m64 -nostdinc # source files -I$(SRC_DIR_ONE)/ -I$(SRC_DIR_TWO) -I../include # 'Mock' include the system header files -I$(PARENT_DIR)/usr/include/c++/$(GCC_VERSION) -I$(PARENT_DIR)/usr/include/c++/$(GCC_VERSION)/backward -I$(PARENT_DIR)/usr/include/c++/$(GCC_VERSION)/x86_64-suse-linux -I$(PARENT_DIR)/usr/lib64/x86_64-suse-linux/$(GCC_VERSION)/include -I$(PARENT_DIR)/usr/lib64/gcc/x86_64-suse-linux/$(GCC_VERSION)/include -I$(PARENT_DIR)/usr/lib64/gcc/x86_64-suse-linux/$(GCC_VERSION)/include-fixed -I$(PARENT_DIR)/usr/src/linux/include -I$(PARENT_DIR)/usr/x86_64-suse-linux/include -I$(PARENT_DIR)/usr/include/suselinux-x8664 -I$(PARENT_DIR)/usr/suselinux-x8664/include -I$(PARENT_DIR)/usr/include -I$(PARENT_DIR)/usr/include/linux file.cpp I am getting several errors which indicate that the base headers are not being included: such as: $(PARENT_DIR)/usr/include/c++/$(GCC_VERSION)/cstddef ::prtdiff_t has not been declared $(PARENT_DIR)/usr/include/c++/$(GCC_VERSION)/cstddef ::size_t has not bee declared. Is there something that I am doing wrong when I include the header file directories? Or am I looking in the wrong place?

    Read the article

  • Clearly defined Rails routing problem - undefined method for Nil:NilClass

    - by sscirrus
    Guys and girls, I have been working on this problem for a while but still no joy. This is my second question within this general area, because the last question was getting too long and this is now more well-defined. Summary of the Problem: I am loading a page for my customers and I get error: undefined method 'name' for Nil:NilClass My Code #Link on views/users/show.html.erb: <%= link_to "Customer Account", :action => "home", :controller => "customers", :id => @user.user_type_id %> #Regular Route: map.connect 'customers/home/:id', :controller => 'customers', :action => 'home' #Rake Routes, first entry: /customers/home/:id :controller=>:"customers", :action=>"home" #Customers Controller: def home render :layout => 'home' @customer = Customer.find(params[:id]) @user = @current_user_session.user flash[:error] = "Customer not found" and return unless @customer @jobs = @customer.jobs end #views/customers/home.html.erb: <%= @customer.name %> I have absolutely no idea why this seemingly clear sequence of events is resulting in a NilClass. Search the console for Customer.find(2) returns the correct customer. What is this noob missing? Thank you very much.

    Read the article

  • Handling Types Defined in Plug-ins That Are No Longer Available

    - by Chris
    I am developing a .NET framework application that allows users to maintain and save "projects". A project can consist of components whose types are defined in the assemblies of the framework itself and/or in third-party assemblies that will be made available to the framework via a yet-to-be-built plug-in architecture. When a project is saved, it is simply binary-serialised to file. Projects are portable, so multiple users can load the same project into their own instances of the framework (just as different users may open the same MSWord document in their own local copies of MSWord). What's more, the plug-ins available to one user's framework might not be available to that of another. I need some way of ensuring that when a user attempts to open (i.e. deserialise) a project that includes a type whose defining assembly cannot be found (either because of a framework version incompatibility or the absence of a plug-in), the project still opens but the offending type is somehow substituted or omitted. Trouble is, the research I've done to date does not even hint at a suitable approach. Any ideas would be much appreciated, thanks.

    Read the article

  • Where clause on joined table used for user defined key/value pairs

    - by Steve Wright
    Our application allows administrators to add “User Properties” in order for them to be able to tailor the system to match their own HR systems. For example, if your company has departments, you can define “Departments” in the Properties table and then add values that correspond to “Departments” such as “Jewelry”, “Electronics” etc… You are then able to assign a department to users. Here is the schema: In this schema, a User can have only one UserPropertyValue per Property, but doesn’t have to have a value for the property. I am trying to build a query that will be used in SSRS 2005 and also have it use the PropertyValues as the filter for users. My query looks like this: SELECT UserLogin, FirstName, LastName FROM Users U LEFT OUTER JOIN UserPropertyValues UPV ON U.ID = UPV.UserID WHERE UPV.PropertyValueID IN (1, 5) When I run this, if the user has ANY of the property values, they are returned. What I would like to have is where this query will return users that have values BY PROPERTY. So if PropertyValueID = 1 is of Department (Jewelry), and PropertyValueID = 5 is of EmploymentType (Full Time), I want to return all users that are in Department Jewelry that are EmployeeType of Full Time, can this be done? Here's a full data example: User A has Department(Jewelry value = 1) and EmploymentType(FullTime value = 5)User B has Department(Electronics value = 2) and EmploymentType(FullTime value = 5)User C has Department(Jewelry value = 1) and EmployementType(PartTime value = 6) My query should only return User A using the above query UPDATE: I should state that this query is used as a dataset in SSRS, so the parameter passed to the query will be @PropertyIDs and it is defined as a multi-value parameter in SSRS. WHERE UPV.PropertyValueID IN (@PropertyIDs)

    Read the article

  • Defined outlets, connected them, they all returns (null)

    - by Tom
    Hi! I'm trying to play with a WebView. I made an outlet: IBOutlet UIWebView *browser; Defined it as a property: @property (nonatomic, retain) IBOutlet UIWebView *browser; Synthethized it: @synthesize browser; Finally, I connected it in Interface Builder, really it is. Then I try to do something with it i.e.: [browser loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://apple.com"]]]; Or also: Etape *etape = [[Etape alloc] init]; NSString *html = [etape generateHTMLforEtape:[current_etape objectAtIndex:0]]; [browser loadHTMLString:html baseURL:nil]; [etape release]; I get no errors, I tried to Build & Analyse, no notices or warnings or errors.. I've been searching for one whole day, please help me :/ Thanks a lot! EDIT: Here's screenshots of my connections for my WebView: EDIT: That is how I call the view: DetailViewController *dvController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:[NSBundle mainBundle]]; dvController.workflow_id = parent_id; Etape *etape = [[Etape alloc] init]; dvController.etapes = [etape getEtapes:parent_id]; [etape release]; [self.navigationController pushViewController:dvController animated:YES]; [dvController release];

    Read the article

  • Referencing not-yet-defined variables - Java

    - by user2537337
    Because I'm tired of solving math problems, I decided to try something more engaging with my very rusty (and even without the rust, very basic) Java skills. I landed on a super-simple people simulator, and thus far have been having a grand time working through the various steps of getting it to function. Currently, it generates an array of people-class objects and runs a for loop to cycle through a set of actions that alter the relationships between them, which I have stored in a 2d integer array. When it ends, I go look at how much they all hate each other. Fun stuff. Trouble has arisen, however, because I would like the program to clearly print what action is happening when it happens. I thought the best way to do this would be to add a string, description, to my "action" class (which stores variables for the actor, reactor, and the amount the relationship changes). This works to a degree, in that I can print a generic message ("A fight has occurred!") with no problem. However, ideally I would like it to be a little more specific ("Person A has thrown a rock at Person B's head!"). This latter goal is proving more difficult: attempting to construct an action with a description string that references actor and reactor gets me a big old error, "Cannot reference field before it is defined." Which makes perfect sense. I believe I'm not quite in programmer mode, because the only other way I can think to do this is an unwieldy switch statement that negates the need for each action to have its own nicely-packaged description. And there must be a neater way. I am not looking for examples of code, only a push in the direction of the right concept to handle this.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >