Search Results

Search found 271 results on 11 pages for 'malcolm anderson'.

Page 6/11 | < Previous Page | 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • Display HTML page in Office 2003 or 2007 task pane via VBA

    - by Malcolm
    Is it possible to display an HTML page in an Office 2003 and/or 2007 task pane via VBA? Background: We have a complicated configuration file that our users maintain in Word (using a real editor is not an option for our audience). We would like to create several toolbar buttons that display a basic HTML page in a task pane as a form of online help for our users. The reason we want to use a task pane to display help (vs. an external browser or traditional help engine) is so that the help content is "embedded" in Word vs. displayed via a seperate application. The problem with using a regular browser or help engine to display help is that users have to manually size and position both applications so that they can see them simultaneously and its very easy to "lose" one application when togging between many applications. We don't want to go down the route of writing a VisualStudio based task pane component - we want to keep things simple (KISS) and encapsulate everything in an easy to distribute Word template file (.dot or dotx.). Suggestions?

    Read the article

  • UpdatePanel doesn't do partial-page update, and IsInAsyncPostBack is always false

    - by Joseph Anderson
    I'm attempting to use an UpdatePanel, but can't get partial-page updates to work. When I look at the ScriptManager's IsInAsyncPostBack property, it's always false. Here's a page that reproduces the issue. It has a ScriptManager, an UpdatePanel, a LinkButton within the update panel, and a Button wired up to the UpdatePanel via the Triggers collection. <%@ Page Language="C#" %> <script runat="server"> protected void Page_Load(object sender, EventArgs e) { Label1.Text = DateTime.Now.ToString(); if (IsPostBack) Label1.Text += " - Postback!"; if (ScriptManager1.IsInAsyncPostBack) Label1.Text += " - Async!"; } </script> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server" /> <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server"> <ContentTemplate>Panel 1:<asp:Label runat=server ID=Label1 /><br /> <asp:LinkButton runat=server ID="LinkButton1" Text="Update!"></asp:LinkButton></ContentTemplate> <Triggers><asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" /></Triggers> </asp:UpdatePanel> <asp:Button ID="Button1" Text="Refresh Panel 1" runat="server" UseSubmitBehavior=false /> </form> </body> </html> If I run this code and click on either of the buttons, I see "Panel 1:2/8/2010 3:38:41 PM - Postback!" I expected that clicking either button would cause a partial-page update for UpdatePanel1, that IsInAsyncPostBack would be true, and that " - Async!" would be appended to Label1. Any idea why IsInAsyncPostBack is always false?

    Read the article

  • For Nvarchar(Max) I am only getting 4000 characters in TSQL?

    - by Malcolm
    Hi, This is for SS 2005. Why I am i only getting 4000 characters and not 8000? It truncates the string @SQL1 at 4000. ALTER PROCEDURE sp_AlloctionReport( @where NVARCHAR(1000), @alldate NVARCHAR(200), @alldateprevweek NVARCHAR(200)) AS DECLARE @SQL1 NVARCHAR(Max) SET @SQL1 = 'SELECT DISTINCT VenueInfo.VenueID, VenueInfo.VenueName, VenuePanels.PanelID, VenueInfo.CompanyName, VenuePanels.ProductCode, VenuePanels.MF, VenueInfo.Address1, VenueInfo.Address2, '' As AllocationDate, '' As AbbreviationCode, VenueInfo.Suburb, VenueInfo.Route, VenueInfo.ContactFirstName, VenueInfo.ContactLastName, VenueInfo.SuitableTime, VenueInfo.OldVenueName, VenueCategories.Category, VenueInfo.Phone, VenuePanels.Location, VenuePanels.Comment, [VenueCategories].[Category] + '' Allocations'' AS ReportHeader, ljs.AbbreviationCode AS PrevWeekCampaign FROM (((VenueInfo INNER JOIN VenuePanels ON VenueInfo.VenueID = VenuePanels.VenueID) INNER JOIN VenueCategories ON VenueInfo.CategoryID = VenueCategories.CategoryID) LEFT JOIN (SELECT CampaignProductions.AbbreviationCode, VenuePanels.PanelID, CampaignAllocations.AllocationDate FROM (((VenueInfo INNER JOIN VenuePanels ON VenueInfo.VenueID=VenuePanels.VenueID) INNER JOIN CampaignAllocations ON VenuePanels.PanelID=CampaignAllocations.PanelID) INNER JOIN CampaignProductions ON CampaignAllocations.CampaignID=CampaignProductions.CampaignID) INNER JOIN VenueCategories ON VenueInfo.CategoryID=VenueCategories.CategoryID WHERE ' + @alldateprevweek + ') ljs ON VenuePanels.PanelID = ljs.PanelID) INNER JOIN (SELECT VenueInfo.VenueID, VenuePanels.PanelID, VenueInfo.VenueName, VenueInfo.CompanyName, VenuePanels.ProductCode, VenuePanels.MF, VenueInfo.Address1, VenueInfo.Address2, CampaignAllocations.AllocationDate, CampaignProductions.AbbreviationCode, VenueInfo.Suburb, VenueInfo.Route, VenueInfo.ContactFirstName, VenueInfo.ContactLastName, VenueInfo.SuitableTime, VenueInfo.OldVenueName, VenueCategories.Category, VenueInfo.Phone, VenuePanels.Location, VenuePanels.Comment, [Category] + '' Allocations'' AS ReportHeader, ljs2.AbbreviationCode AS PrevWeekCampaign FROM ((((VenueInfo INNER JOIN VenuePanels ON VenueInfo.VenueID = VenuePanels.VenueID) INNER JOIN CampaignAllocations ON VenuePanels.PanelID = CampaignAllocations.PanelID) INNER JOIN CampaignProductions ON CampaignAllocations.CampaignID = CampaignProductions.CampaignID) INNER JOIN VenueCategories ON VenueInfo.CategoryID = VenueCategories.CategoryID) LEFT JOIN (SELECT CampaignProductions.AbbreviationCode, VenuePanels.PanelID, CampaignAllocations.AllocationDate FROM (((VenueInfo INNER JOIN VenuePanels ON VenueInfo.VenueID=VenuePanels.VenueID) INNER JOIN CampaignAllocations ON VenuePanels.PanelID=CampaignAllocations.PanelID) INNER JOIN CampaignProductions ON CampaignAllocations.CampaignID=CampaignProductions.CampaignID) INNER JOIN VenueCategories ON VenueInfo.CategoryID=VenueCategories.CategoryID WHERE ' + @alldateprevweek + ') ljs2 ON VenuePanels.PanelID = ljs2.PanelID WHERE ' + @alldate + ' AND ' + @where + ') ljs3 ON VenueInfo.VenueID = ljs3.VenueID WHERE (((VenuePanels.PanelID)<>ljs3.[PanelID] And (VenuePanels.PanelID) Not In (SELECT PanelID FROM CampaignAllocations WHERE ' + @alldateprevweek + ')) AND ' + @where + ') UNION ALL SELECT VenueInfo.VenueID, VenueInfo.VenueName, VenuePanels.PanelID, VenueInfo.CompanyName, VenuePanels.ProductCode, VenuePanels.MF, VenueInfo.Address1, VenueInfo.Address2, CampaignAllocations.AllocationDate, CampaignProductions.AbbreviationCode, VenueInfo.Suburb, VenueInfo.Route, VenueInfo.ContactFirstName, VenueInfo.ContactLastName, VenueInfo.SuitableTime, VenueInfo.OldVenueName, VenueCategories.Category, VenueInfo.Phone, VenuePanels.Location, VenuePanels.Comment, [Category] + '' Allocations'' AS ReportHeader, ljs.AbbreviationCode AS PrevWeekCampaign FROM ((((VenueInfo INNER JOIN VenuePanels ON VenueInfo.VenueID = VenuePanels.VenueID) INNER JOIN CampaignAllocations ON VenuePanels.PanelID = CampaignAllocations.PanelID) INNER JOIN CampaignProductions ON CampaignAllocations.CampaignID = CampaignProductions.CampaignID) INNER JOIN VenueCategories ON VenueInfo.CategoryID = VenueCategories.CategoryID) LEFT JOIN (SELECT CampaignProductions.AbbreviationCode, VenuePanels.PanelID, CampaignAllocations.AllocationDate FROM (((VenueInfo INNER JOIN VenuePanels ON VenueInfo.VenueID=VenuePanels.VenueID) INNER JOIN CampaignAllocations ON VenuePanels.PanelID=CampaignAllocations.PanelID) INNER JOIN CampaignProductions ON CampaignAllocations.CampaignID=CampaignProductions.CampaignID) INNER JOIN VenueCategories ON VenueInfo.CategoryID=VenueCategories.CategoryID WHERE ' + @alldateprevweek + ') ljs ON VenuePanels.PanelID = ljs.PanelID WHERE ' + @alldate + ' AND ' + @where Select @SQL1

    Read the article

  • Different users get the same value in .ASPXANONYMOUS

    - by Malcolm Frexner
    My site allows anonymous users. I saw that under heavy load user get sometimes profile values from other users. This happens for anonymous users. I logged the access to profile data: /// <summary> /// /// </summary> /// <param name="controller"></param> /// <returns></returns> public static string ProfileID(this Controller controller ) { if (ApplicationConfiguration.LogProfileAccess) { StringBuilder sb = new StringBuilder(); (from header in controller.Request.Headers.ToPairs() select string.Concat(header.Key, ":", header.Value, ";")).ToList().ForEach(x => sb.Append(x)); string log = string.Format("ip:{0} url:{1} IsAuthenticated:{2} Name:{3} AnonId:{4} header:{5}", controller.Request.UserHostAddress, controller.Request.Url.ToString(), controller.Request.IsAuthenticated, controller.User.Identity.Name, controller.Request.AnonymousID, sb); _log.Debug(log); } return controller.Request.IsAuthenticated ? controller.User.Identity.Name : controller.Request.AnonymousID; } I can see in the log that user realy get the same cookievalue for .ASPXANONYMOUS even if they have different IP. Just to be safe I removed dependency injection for the FormsAuthentication. I dont use OutputCaching. My web.config has this setting for authentication: <anonymousIdentification enabled="true" cookieless="UseCookies" cookieName=".ASPXANONYMOUS" cookieTimeout="30" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" /> <authentication mode="Forms"> <forms loginUrl="~/de/Account/Login" /> </authentication> Does anybody have an idea what else I could log or what I should have a look at?

    Read the article

  • Add functions in gdb at runtime

    - by Michael Anderson
    I'm trying to debug some STL based C++ code in gdb. The code has something like int myfunc() { std::map<int,int> m; ... } Now in gdb, inside myfunc using "print m" gives something very ugly. What I've seen recommended is compiling something like void printmap( std::map<int,int> m ) { for( std::map<int,int>::iterator it = ... ) { printf("%d : %d", it->first, it->second ); } } Then in gdb doing (gdb) call printmap( m ) This seems like a good way to handle the issue... but can I put printmap into a seperate object file (or even dynamic library) that I then load into gdb at runtime rather than compiling it into my binary - as recompiling the binary every time I want to look at another STL variable is not fun .. while compiling and loading a single .o file for the print routine may be acceptable.

    Read the article

  • Web Application Project Deployment VS2010 - Precompile Views

    - by Malcolm Frexner
    Using Visual Studio 2010 Ultimate I created a ASP.NET MVC 2.0 Web Application. I read http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k%28WEBAPPLICATIONPROJECTS.PACKAGEPUBLISHOVERVIEW%29;k%28TargetFrameworkMoniker-%22.NETFRAMEWORK%2cVERSION%3dV4.0%22%29&rd=true. Its about the new features for Web Application Deployment. I dont see an option to precompile Views. Also I dont see other options that where available in previous version of Web Deployment Project: ie if the web is compiled into a single assembly or into one assembly per page. I had the impression that Application Project Deployment is the scuccessor of Web Deployment Project.. maybe I am wrong about it. How should I precompile views now?

    Read the article

  • How do I set scons system include path

    - by Michael Anderson
    Using scons I can easily set my include paths: env.Append( CPPPATH=['foo'] ) This passes the flag -Ifoo to gcc However I'm trying to compile with a lot of warnings enabled. In particular with env.Append( CPPFLAGS=['-Werror', '-Wall', '-Wextra'] ) which dies horribly on certain boost includes ... I can fix this by adding the boost includes to the system include path rather than the include path as gcc treats system includes differently. So what I need to get passed to gcc instead of -Ifoo is -isystem foo I guess I could do this with the CPPFLAGS variable, but was wondering if there was a better solution built into scons.

    Read the article

  • How do I set TargetNullValue to a date?

    - by Bryan Anderson
    I'm using the WPF toolkit's Calendar control to allow users to select a date. If the date is not yet selected then the property the SelectedDate is bound to is Null. This makes the Calendar default you January 1, 0 AD. I'd like to do something like SelectedDate="{Binding UserPickedDate, TargetNullValue=Today, Mode=TwoWay}" But both "Today" and "Now" throw binding errors. Can I use TargetNullValue to set the default date to Today or Now?

    Read the article

  • Linq query - multiple where, with extension method

    - by Cj Anderson
    My code works for ORs as I've listed it below but I want to use AND instead of OR and it fails. I'm not quite sure what I'm doing wrong. Basically I have a Linq query that searches on multiple fields in an XML file. The search fields might not all have information. Each element runs the extension method, and tests the equality. Any advice would be appreciated. refinedresult = From x In theresult _ Where x.<thelastname>.Value.TestPhoneElement(LastName) Or _ x.<thefirstname>.Value.TestPhoneElement(FirstName) Or _ x.<id>.Value.TestPhoneElement(Id) Or _ x.<number>.Value.TestPhoneElement(Telephone) Or _ x.<location>.Value.TestPhoneElement(Location) Or _ x.<building>.Value.TestPhoneElement(building) Or _ x.<department>.Value.TestPhoneElement(Department) _ Select x Public Function TestPhoneElement(ByVal parent As String, ByVal value2compare As String) As Boolean 'find out if a value is null, if not then compare the passed value to see if it starts with Dim ret As Boolean = False If String.IsNullOrEmpty(parent) Then Return False End If If String.IsNullOrEmpty(value2compare) Then Return ret Else ret = parent.ToLower.StartsWith(value2compare.ToLower.Trim) End If Return ret End Function

    Read the article

  • Validating Application Settings Key Values in Isolated Storage for Windows Phone Applications

    - by Martin Anderson
    Hello everyone. I am very new at all this c# Windows Phone programming, so this is most probably a dumb question, but I need to know anywho... IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings; if (!appSettings.Contains("isFirstRun")) { firstrunCheckBox.Opacity = 0.5; MessageBox.Show("isFirstRun not found - creating as true"); appSettings.Add("isFirstRun", "true"); appSettings.Save(); firstrunCheckBox.Opacity = 1; firstrunCheckBox.IsChecked = true; } else { if (appSettings["isFirstRun"] == "true") { firstrunCheckBox.Opacity = 1; firstrunCheckBox.IsChecked = true; } else if (appSettings["isFirstRun"] == "false") { firstrunCheckBox.Opacity = 1; firstrunCheckBox.IsChecked = false; } else { firstrunCheckBox.Opacity = 0.5; } } I am trying to firstly check if there is a specific key in my Application Settings Isolated Storage, and then wish to make a CheckBox appear checked or unchecked depending on if the value for that key is "true" or "false". Also I am defaulting the opacity of the checkbox to 0.5 opacity when no action is taken upon it. With the code I have, I get the warnings Possible unintended reference comparison; to get a value comparison, cast the left hand side to type 'string' Can someone tell me what I am doing wrong. I have explored storing data in an Isolated Storage txt file, and that worked, I am now trying Application Settings, and will finally try to download and store an xml file, as well as create and store user settings into an xml file. I want to try understand all the options open to me, and use which ever runs better and quicker

    Read the article

  • How does Windows decide which icon format to display when showing an exe's icon in Windows Explorer?

    - by Malcolm
    How does Windows decide which icon format to display when showing an exe's icon in Windows Explorer? Problem: When we look at our icon file and exe with embedded icon file in various Windows Explorer file views, the icon file is displayed in a higher quality mode than the icon displayed for our executable even though the icon in our executable contains the exact same icon. Our exe's icon has jaggier edges which leads me to believe that Windows Explorer may be trying to upsize a lower resolution icon rather than picking an icon appropriate for the actual display size. In a multi-format icon file, is there a specific order we should use for positioning each icon format? For example, we have an icon file with icons in the following formats: - 16x16 - 32x32 - 48x48 - 64x64 - 128x128 - 256x256 We are testing the appearance of our exe's icon using Windows Explorer under Windows XP, Vista and Windows 7. Any suggestions appreciated.

    Read the article

  • How to add a dynamic library to Android?

    - by Malcolm
    I want to add a non-native shared library to Android so every application on the device would be able to use it. I mean using packaged classes just like a core library as if they were present in the application itself. I studied Android source code to figure out a way to add a new path to the application ClassLoader and found out that it is created during startup and there's no way to change the paths later. I can use my own ClassLoader, but all I will get after loading a class will be a reference to a Class object. This way I will be bound to work through reflection mechanism, which is slower than the native execution system. Is there any way to organise a shared library on Android?

    Read the article

  • warnings emitted during 'easy_install'

    - by Matt Anderson
    When I easy_install some python modules, warnings such as: <some module>: module references __file__ <some module>: module references __path__ <some module>: module MAY be using inspect.trace <some module>: module MAY be using inspect.getsourcefile sometimes get emitted. Where (what package / source file) do these messages come from? Why is referencing __file__ or __path__ considered a bad thing?

    Read the article

  • In CAB is a service it's own module?

    - by David Anderson
    I'm learning Composite Application Block and I've hit a rock about services. I have my shell application in its own solution, and of course a test module in its own solution (developed and testing completely independent and external of the shell solution). If I created a service named "Sql Service", would I need to put this in it's own library, so that both the shell, and the module know the types? If that's the case, then for good practice, should I put the service project in the shell solution, or external just like a module (in it's own solution), even though it's not loaded as a module? Then, what about references? Should the shell reference this directly, add then add the service? Or load it as a module and add the service? I have a lot of confusion on where I should create my services, and if I should reference or load as modules..

    Read the article

  • Windows Phone - OnNavigatingFrom - problem

    - by Martin Anderson
    I believe this is just a problem for me, due to my lack of programming ability. I am currently exploring transitions between page navigation with Windows Phone apps. I was originally using storyboards, and completed event handlers to have my pages animate on and off screen. These leads to the a problem when you want to navigate to many pages from one page, using the same transition. So I have started looking at OnNavigatedTo, and OnNavigatingFrom events and while it is working nicely for OnNavigatedTo, the later just wont work. It seems the Microsoft.Phone.Navigation assembly does not contain OnNavigatingFrom, and referencing System.Windows.Navigation, compiles ok, but I cant get pages to animate off upon navigation. I have a button on my Page2, which I want to go back to my MainPage (after I over-rided the back key with a message box for testing). I have transitions made on the page, and I have this as the event handler code... private void btnP2_BackToP1Clicked(object sender, System.Windows.RoutedEventArgs e) { NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative)); } With this code for the OnNavigatedTo and OnNavigatingFrom events... protected override void OnNavigatedTo(PhoneNavigationEventArgs e) { PageTransition_In.Begin(); } // // protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) { PageTransition_Out.Begin(); base.OnNavigatingFrom(e); } I have the feeling that OnNavigatingFrom may not(yet) be supported for Windows Phone Apps. OnNavigatedFrom is part of Microsoft.Phone.Navigation, but it only performs actions once the page is no longer active, which is too late to perform any animation effects.

    Read the article

  • Searching a set of data with multiple terms using Linq

    - by Cj Anderson
    I'm in the process of moving from ADO.NET to Linq. The application is a directory search program to look people up. The users are allowed to type the search criteria into a single textbox. They can separate each term with a space, or wrap a phrase in quotes such as "park place" to indicate that it is one term. Behind the scenes the data comes from a XML file that has about 90,000 records in it and is about 65 megs. I load the data into a DataTable and then use the .Select method with a SQL query to perform the searches. The query I pass is built from the search terms the user passed. I split the string from the textbox into an array using a regular expression that will split everything into a separate element that has a space in it. However if there are quotes around a phrase, that becomes it's own element in the array. I then end up with a single dimension array with x number of elements, which I iterate over to build a long query. I then build the search expression below: query = query & _ "((userid LIKE '" & tempstr & "%') OR " & _ "(nickname LIKE '" & tempstr & "%') OR " & _ "(lastname LIKE '" & tempstr & "%') OR " & _ "(firstname LIKE '" & tempstr & "%') OR " & _ "(department LIKE '" & tempstr & "%') OR " & _ "(telephoneNumber LIKE '" & tempstr & "%') OR " & _ "(email LIKE '" & tempstr & "%') OR " & _ "(Office LIKE '" & tempstr & "%'))" Each term will have a set of the above query. If there is more than one term, I put an AND in between, and build another query like above with the next term. I'm not sure how to do this in Linq. So far, I've got the XML file loading correctly. I'm able to search it with specific criteria, but I'm not sure how to best implement the search over multiple terms. 'this works but far too simple to get the job done Dim results = From c In m_DataSet...<Users> _ Where c.<userid>.Value = "XXXX" _ Select c The above code also doesn't use the LIKE operator either. So partial matches don't work. It looks like what I'd want to use is the .Startswith but that appears to be only in Linq2SQL. Any guidance would be appreciated. I'm new to Linq, so I might be missing a simple way to do this. The XML file looks like so: <?xml version="1.0" standalone="yes"?> <theusers> <Users> <userid>person1</userid> <nickname></nickname> <lastname></lastname> <firstname></firstname> <department></department> <telephoneNumber></telephoneNumber> <email></email> </Users> <Users> <userid>person2</userid> <nickname></nickname> <lastname></lastname> <firstname></firstname> <department></department> <telephoneNumber></telephoneNumber> <email></email> </Users>

    Read the article

  • metaclass multiple inheritance inconsistency

    - by Matt Anderson
    Why is this: class MyType(type): def __init__(cls, name, bases, attrs): print 'created', cls class MyMixin: __metaclass__ = MyType class MyList(list, MyMixin): pass okay, and works as expected: created <class '__main__.MyMixin'> created <class '__main__.MyList'> But this: class MyType(type): def __init__(cls, name, bases, attrs): print 'created', cls class MyMixin: __metaclass__ = MyType class MyObject(object, MyMixin): pass Is not okay, and blows up thusly?: created <class '__main__.MyMixin'> Traceback (most recent call last): File "/tmp/junk.py", line 11, in <module> class MyObject(object, MyMixin): pass TypeError: Error when calling the metaclass bases Cannot create a consistent method resolution order (MRO) for bases object, MyMixin

    Read the article

  • PHP detmine numbers in between two numbers then query

    - by Joshua Anderson
    This should be simple but I can't figure it out <?php $testid = 240; $curid = 251; $cal = $curid - $testid; echo $cal; ?> I want to determine the numbers in between two other numbers so for this example it detects there are 11 numbers in between the $testid and $curid, but i dont need it to do that. I need it to literally figure the numbers in between $curid - $testid which in this example would be 241, 242, 243... all the way to 251 then i need to create a loop with those numbers and do a query below with each one $cal = $curid - $testid; mysql_query("SELECT * FROM wall WHERE id='".$cal."'") // and for each number mysql should out put each data field with those numbers. Thanks again, love you guys.

    Read the article

  • Remove querystring from URL

    - by Malcolm Frexner
    What is an easy way to remove the querystring from a Path in Javascript? I have seen a plugin for Jquery that uses window.location.search. I can not do that: The URL in my case is a variable that is set from AJAX. var testURL = '/Products/List?SortDirection=dsc&Sort=price&Page=3&Page2=3&SortOrder=dsc'

    Read the article

  • Is there a way to declare a variable that implements multiple interfaces in .Net?

    - by Bryan Anderson
    Similar to this Java question. I would like to specify that a variable implements multiple interfaces. For instance private {IFirstInterface, ISecondInterface} _foo; public void SetFoo({IFirstInterface, ISecondInterface} value) { _foo = value; } Requirements: I don't have the ability to add an interface to most type that would be passed in to Foo. So I can't create a third interface that inherits from IFirstInterface and ISecondInterface. I would like to avoid making the containing class generic if possible because the type of Foo doesn't have much to do with the class and the user isn't likely to know it at compile time. I need to use foo to access methods in both interfaces at a later time. I would like to do this in a compiler safe way, i.e. no trying to cast to the interface just before trying to use it. If foo does not implement both interfaces quite a bit of functionality won't work properly. Is this possible?

    Read the article

  • Binding the property to a control defined inside a listboxitem template

    - by Malcolm
    I have a class called ledgerObject : public class LedgerObject { public ChargeLine ChargeLine{ get; set; } public DelegateCommand Click_hyperbnCommand{ get; private set; } public LedgerObject() { this.Click_hyperbnCommand = new DelegateCommand(click_btn); } private void click_btn(object args) { } } The chargeLine which is the property of this class is itself a class and has some properties in it. So I am binding the datacontext of a listbox to an array of LedgerObject, and I want to bind the textblock control defined inside a listboxitem template to the property of a ChargeLine. Any idea or suggestion will help. I have tried this but not working: <TextBlock Margin="4 0 4 0" Grid.Column="3" Text="{Binding Path=ChargeLine.SimCode}" TextDecorations="Underline" Foreground="Red" />

    Read the article

  • SQL 2005 Express Edition - Install new instance

    - by Douglas Anderson
    Looking for a way to programatically, or otherwise, add a new instance of SQL 2005 Express Edition to a system that already has an instance installed. Traditionally, you run Micrsoft's installer like I am in the command line below and it does the trick. Executing the command in my installer is not the issue, it's more a matter of dragging around the 40 MBs of MS-SQL installer that I don't need if they have SQL Express already installed. This is what my installer currently executes: SQLEXPR32.EXE /qb ADDLOCAL=ALL INSTANCENAME=<instancename> SECURITYMODE=SQL SAPWD=<password> SQLAUTOSTART=1 DISABLENETWORKPROTOCOLS=0 I don't need assistance with launching this command, rather the appropriate way to add a new instance of SQL 2005 Express without actually running the full installer again. I'd go into great detail about why I want to do this but I'd simply bore everyone. Suffice to say, having this ability to create a new instance without the time it takes to reinstall SQL Express etc. would greatly assist me for the deployment of my application and it's installer. If makes any difference to anyone, I'm using a combination of NSIS and Advanced Installer for this installation project.

    Read the article

  • Button click event

    - by Malcolm
    I am binding an object of other class to a silverlight list box itemsource.I want to fire the click event of a button,but I don't want to define command under this class. I have defined other class and have defined command inside it. Now the question is how to bind the command of this class to the command property of that button. There are two classes A and B I am binding the item source of a listbox to A and i have defined a command in B and i need this command to bind with the button present inside the listbox.(ie..listbox-listboxitem-button) Is there any way to bind to a property outside of the current data context?

    Read the article

  • Passing youtube video id from video feed to flash

    - by Grant Anderson
    I'm working on a flash web application (Actionscript 2.0) for my honours project but am having trouble embedding youtube videos. Basically the user selects symbols which queries the youtube api with certain tags depending on the symbols chosenand a random video is then picked from the first 30 videos. I have this working using the following code: on (release) { url="http://gdata.youtube.com/feeds/api/videos?q=danger+passion&orderby=published&start-index="+random(30)+"&max-results=1&v=2" getURL(url); } but this just displays a webpage with a link to the youtube video. This is the code I'll be using as the foundations for the player: // create a MovieClip to load the player into var ytplayer:MovieClip = _root.createEmptyMovieClip("ytplayer", 1); // create a listener object for the MovieClipLoader to use var ytPlayerLoaderListener:Object = { onLoadInit: function() { // When the player clip first loads, we start an interval to // check for when the player is ready loadInterval = setInterval(checkPlayerLoaded, 250); } }; var loadInterval:Number; function checkPlayerLoaded():Void { // once the player is ready, we can subscribe to events, or in the case of // the chromeless player, we could load videos if (ytplayer.isPlayerLoaded()) { ytplayer.addEventListener("onStateChange", onPlayerStateChange); ytplayer.addEventListener("onError", onPlayerError); clearInterval(loadInterval); } } function onPlayerStateChange(newState:Number) { trace("New player state: "+ newState); } function onPlayerError(errorCode:Number) { trace("An error occurred: "+ errorCode); } // create a MovieClipLoader to handle the loading of the player var ytPlayerLoader:MovieClipLoader = new MovieClipLoader(); ytPlayerLoader.addListener(ytPlayerLoaderListener); // load the player ytPlayerLoader.loadClip("http://www.youtube.com/v/pv5zWaTEVkI", ytplayer); can anyone help me on how to get the id of the video (for example: pv5zWaTEVkI) from the feed? Or how to send a query from flash which will return the video url/id as opposed to the url of a feed. Any help would be much appreciated as my hand in rather soon. Thanks

    Read the article

  • ASP.NET MVC Creating a impersonated user.

    - by Malcolm
    Hi, I have a MVC app where I have a User class and the user can also impersonate another user(Admin users only). So I have this code below that authenticates the request and instantiates my version of a User class. It then tries to get the impersonated user from the Session object but Session is not available in this method in the global.asax. Hope this makes sense. How else could I do this? protected void Application_OnAuthenticateRequest(object sender, EventArgs e) { IMylesterService service = ObjectFactory.GetInstance(); if (Context.User != null) { if (Context.User.Identity.IsAuthenticated) { User user = service.GetUser(Context.User.Identity.Name); if (user == null) throw new ApplicationException("Context.user.Identity.name is not a recognized user"); User impersonatedUser = (User)this.Session["ImpersonatedUser"]; if (impersonatedUser == null) user.ImpersonatedUser = user; else user.ImpersonatedUser = impersonatedUser; System.Threading.Thread.CurrentPrincipal = Context.User = user; return; } } User guest = service.GetGuestUser(); guest.ImpersonatedUser = guest; System.Threading.Thread.CurrentPrincipal = Context.User = guest; }

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11  | Next Page >