Search Results

Search found 1597 results on 64 pages for 'dr edward morbius'.

Page 18/64 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • How can I determine in silverlight code where the silverlight instance is running?

    - by Edward Tanguay
    I have a silverlight app. When I develop I have it pick up its data from a local URL: http://localhost/theapp/data/... however, when it is online, I want it to pick up its data from an online URL: http://www.tanguay.info/... Currently I have a variable which I switch before I compile and upload: bool silverlightAppIsLive = true; which I use to determine whether or not to get data from the first or second URL above. Is there a way for me to determine this automatically in code without setting the variable manually?

    Read the article

  • How to dynamically choose two fields from a Linq query as a result

    - by Dr. Zim
    If you have a simple Linq query like: var result = from record in db.Customer select new { Text = record.Name, Value = record.ID.ToString() }; which is returning an object that can be mapped to a Drop Down List, is it possible to dynamically specify which fields map to Text and Value? Of course, you could do a big case (switch) statement, then code each Linq query separately but this isn't very elegant. What would be nice would be something like: (pseudo code) var myTextField = db.Customer["Name"]; // Could be an enumeration?? var myValueField = db.Customer["ID"]; // Idea: choose the field outside the query var result = from record in db.Customer select new { Text = myTextField, Value = myValueField };

    Read the article

  • How to RowTest with MSTest ?

    - by dr. evil
    I know that MSTest doens't support RowTest and similar tests. What MSTests users do? How is it possible to live without RowTest support? I've seen DataDriven test features but sounds like too much overhead, is there any 3rd patch or tool which allow me to do RowTest similar tests in MSTest ?

    Read the article

  • In your experience, what has inspired you to change a fundamental programming tool

    - by Dr J
    A lot of what I am working on is changing the mindset of a community of developers. Moving them from one tool to another, or to picking up a new tool. What are some of the suggested or recommended ways to get a community to pick up a new meme? While we can mandate tool usage, this is a last resort. I would rather have the developers move to any new tools of their own accord. I'm not a programmer, I need to understand why a programmer will move from one tool to another. Edited the title thanks to a fabulous comment! My world runs on Meme's, tipping points, and general pressures. This is why I needed to ask. And clarifying yet more- I am the middle manager needing to plan and manage an implementation and not a sales person.

    Read the article

  • How reliable is DateTime.Utc in Silverlight applications?

    - by Edward Tanguay
    I have a silverlight application which users will be running in various time zones. The applications load their data from the server at one time, then cache it in IsolatedStorage. When I make changes to the data on the server, I want to be able to change the "last updated time" so that all applications download the newest data the next time they check this date. However, I'm a bit confused as to how to handle the time zone issue since a if the server is in New York and the update time is set to 2010-01-01 17:00:00 and a client in Seattle checks compares it to its local time of 2010-01-01 14:00:00 it won't update and will continue to provide old data for three more hours. My solution is to always post the update time in UTC time, not with the time on the server, then make the Silverlight app check with DateTime.UtcNow. Is this as easy as it sounds or are their issues with this, e.g. that timezones are not set correctly on computers and hence the SilverlightApp does not report the correct UTC time. Can anyone say from experience how likely it is that using DateTime.UtcNow like this for cache refreshing will work in all cases? If DateTime.UtcNow is not reliable, I will just use an incremented "DataVersion" integer but there are other scenarios in which getting time zone sychronization down would make it useful thoroughly understand how to solve this in silverlight apps.

    Read the article

  • What could I add to this code to allow the cell height to dynamically change as I edit the JTextArea

    - by Dr. Plaguey
    The derived classes I am using public class TextAreaRenderer extends JTextArea implements TableCellRenderer { public TextAreaRenderer() { setLineWrap(true); setWrapStyleWord(true); } public Component getTableCellRendererComponent(JTable jTable, Object obj, boolean isSelected, boolean hasFocus, int row, int column) { setText((String)obj); int height_wanted = (int)getPreferredSize().getHeight() + 10; if (height_wanted != rootJTable.getRowHeight(row)) rootJTable.setRowHeight(row, height_wanted); return this; } } class TextEditor extends AbstractCellEditor implements TableCellEditor { protected JTextArea ta; String txt; public TextEditor() { ta = new JTextArea(); } //Implement the one CellEditor method that AbstractCellEditor doesn't. public Object getCellEditorValue() { return ta.getText(); } // Implement the one method defined by TableCellEditor. public Component getTableCellEditorComponent(javax.swing.JTable table, Object value,boolean isSelected, int row, int column) { txt = value.toString(); ta.setText(txt); ta.setLineWrap(true); return new JScrollPane(ta); } public boolean isCellEditable(EventObject anEvent) { return true; } } Set column renderer and editor rootJTable.getColumnModel().getColumn(1).setCellRenderer(new TextAreaRenderer()); rootJTable.getColumnModel().getColumn(1).setCellEditor(new TextEditor());

    Read the article

  • How to write this Linq SQL as a Dynamic Query (using strings)?

    - by Dr. Zim
    Skip to the "specific question" as needed. Some background: The scenario: I have a set of products with a "drill down" filter (Query Object) populated with DDLs. Each progressive DDL selection will further limit the product list as well as what options are left for the DDLs. For example, selecting a hammer out of tools limits the Product Sizes to only show hammer sizes. Current setup: I created a query object, sent it to a repository, and fed each option to a SQL "table valued function" where null values represent "get all products". I consider this a good effort, but far from DDD acceptable. I want to avoid any "programming" in SQL, hopefully doing everything with a repository. Comments on this topic would be appreciated. Specific question: How would I rewrite this query as a Dynamic Query? A link to something like 101 Linq Examples would be fantastic, but with a Dynamic Query scope. I really want to pass to this method the field in quotes "" for which I want a list of options and how many products have that option. from p in db.Products group p by p.ProductSize into g select new Category { PropertyType = g.Key, Count = g.Count() } Each DDL option will have "The selection (21)" where the (21) is the quantity of products that have that attribute. Upon selecting an option, all other remaining DDLs will update with the remaining options and counts. Edit: Additional notes: .OrderBy("it.City") // "it" refers to the entire record .GroupBy("City", "new(City)") // This produces a unique list of City .Select("it.Count()") //This gives a list of counts... getting closer .Select("key") // Selects a list of unique City .Select("new (key, count() as string)") // +1 to me LOL. key is a row of group .GroupBy("new (City, Manufacturer)", "City") // New = list of fields to group by .GroupBy("City", "new (Manufacturer, Size)") // Second parameter is a projection Product .Where("ProductType == @0", "Maps") .GroupBy("new(City)", "new ( null as string)")// Projection not available later? .Select("new (key.City, it.count() as string)")// GroupBy new makes key an object Product .Where("ProductType == @0", "Maps") .GroupBy("new(City)", "new ( null as string)")// Projection not available later? .Select("new (key.City, it as object)")// the it object is the result of GroupBy var a = Product .Where("ProductType == @0", "Maps") .GroupBy("@0", "it", "City") // This fails to group Product at all .Select("new ( Key, it as Product )"); // "it" is property cast though What I have learned so far is LinqPad is fantastic, but still looking for an answer. Eventually, completely random research like this will prevail I guess. LOL. Edit:

    Read the article

  • In the iPad SplitView template, where's the code that specifies which views are to be used in the Sp

    - by Dr Dork
    In the iPad Programming Guide, it gives the following code example for specifying the two views (firstVC and secondVC) that will be used in the SplitView... - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { MyFirstViewController* firstVC = [[[MyFirstViewController alloc] initWithNibName:@"FirstNib" bundle:nil] autorelease]; MySecondViewController* secondVC = [[[MySecondViewController alloc] initWithNibName:@"SecondNib" bundle:nil] autorelease]; UISplitViewController* splitVC = [[UISplitViewController alloc] init]; splitVC.viewControllers = [NSArray arrayWithObjects:firstVC, secondVC, nil]; [window addSubview:splitVC.view]; [window makeKeyAndVisible]; return YES; } but when I actually create a new SplitView project in Xcode, I don't see any code that specifies which views should be added to the SplitView. Here's the code from the SplitView template... - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after app launch rootViewController.managedObjectContext = self.managedObjectContext; // Add the split view controller's view to the window and display. [window addSubview:splitViewController.view]; [window makeKeyAndVisible]; return YES; } Thanks in advance for all your help! I'm going to continue researching this question right now.

    Read the article

  • XmlSerializer throws exception when serializing dynamically loaded type

    - by Dr. Sbaitso
    Hi I'm trying to use the System.Xml.Serialization.XmlSerializer to serialize a dynamically loaded (and compiled class). If I build the class in question into the main assembly, everything works as expected. But if I compile and load the class from an dynamically loaded assembly, the XmlSerializer throws an exception. What am I doing wrong? I've created the following .NET 3.5 C# application to reproduce the issue: using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.Reflection; using System.CodeDom.Compiler; using Microsoft.CSharp; public class StaticallyBuiltClass { public class Item { public string Name { get; set; } public int Value { get; set; } } private List<Item> values = new List<Item>(); public List<Item> Values { get { return values; } set { values = value; } } } static class Program { static void Main() { RunStaticTest(); RunDynamicTest(); } static void RunStaticTest() { Console.WriteLine("-------------------------------------"); Console.WriteLine(" Serializing StaticallyBuiltClass..."); Console.WriteLine("-------------------------------------"); var stat = new StaticallyBuiltClass(); Serialize(stat.GetType(), stat); Console.WriteLine(); } static void RunDynamicTest() { Console.WriteLine("-------------------------------------"); Console.WriteLine(" Serializing DynamicallyBuiltClass..."); Console.WriteLine("-------------------------------------"); CSharpCodeProvider csProvider = new CSharpCodeProvider(new Dictionary<string, string> { { "CompilerVersion", "v3.5" } }); CompilerParameters csParams = new System.CodeDom.Compiler.CompilerParameters(); csParams.GenerateInMemory = true; csParams.GenerateExecutable = false; csParams.ReferencedAssemblies.Add("System.dll"); csParams.CompilerOptions = "/target:library"; StringBuilder classDef = new StringBuilder(); classDef.AppendLine("using System;"); classDef.AppendLine("using System.Collections.Generic;"); classDef.AppendLine(""); classDef.AppendLine("public class DynamicallyBuiltClass"); classDef.AppendLine("{"); classDef.AppendLine(" public class Item"); classDef.AppendLine(" {"); classDef.AppendLine(" public string Name { get; set; }"); classDef.AppendLine(" public int Value { get; set; }"); classDef.AppendLine(" }"); classDef.AppendLine(" private List<Item> values = new List<Item>();"); classDef.AppendLine(" public List<Item> Values { get { return values; } set { values = value; } }"); classDef.AppendLine("}"); CompilerResults res = csProvider.CompileAssemblyFromSource(csParams, new string[] { classDef.ToString() }); foreach (var line in res.Output) { Console.WriteLine(line); } Assembly asm = res.CompiledAssembly; if (asm != null) { Type t = asm.GetType("DynamicallyBuiltClass"); object o = t.InvokeMember("", BindingFlags.CreateInstance, null, null, null); Serialize(t, o); } Console.WriteLine(); } static void Serialize(Type type, object o) { var serializer = new XmlSerializer(type); try { serializer.Serialize(Console.Out, o); } catch(Exception ex) { Console.WriteLine("Exception caught while serializing " + type.ToString()); Exception e = ex; while (e != null) { Console.WriteLine(e.Message); e = e.InnerException; Console.Write("Inner: "); } Console.WriteLine("null"); Console.WriteLine(); Console.WriteLine("Stack trace:"); Console.WriteLine(ex.StackTrace); } } } which generates the following output: ------------------------------------- Serializing StaticallyBuiltClass... ------------------------------------- <?xml version="1.0" encoding="IBM437"?> <StaticallyBuiltClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Values /> </StaticallyBuiltClass> ------------------------------------- Serializing DynamicallyBuiltClass... ------------------------------------- Exception caught while serializing DynamicallyBuiltClass There was an error generating the XML document. Inner: The type initializer for 'Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDynamicallyBuiltClass' threw an exception. Inner: Object reference not set to an instance of an object. Inner: null Stack trace: at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id) at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o, XmlSerializerNamespaces namespaces) at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o) at Program.Serialize(Type type, Object o) in c:\dev\SerTest\SerTest\Program.cs:line 100 Edit: Removed some extraneous referenced assemblies

    Read the article

  • How to get Firebug to tell me what error jquery's .load() is returning?

    - by Edward Tanguay
    I'm trying to find out what data/error jquery's .load() method is returning in the following code (the #content element is blank so I assume there is some kind of error). Where do I find in Firebug what content or error .load() is returning? How can I use console.log to find out at least what content is being returned? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1.3.2"); google.setOnLoadCallback(function() { $('#loadButton').click(loadDataFromExernalWebsite); }); function loadDataFromExernalWebsite() { console.log("test"); $('#content').load('http://www.tanguay.info/web/getdata/index.php?url=http://www.tanguay.info/knowsite/data.txt', function() { alert('Load was performed.'); }); } </script> </head> <body> <p>Click the button to load content:</p> <p id="content"></p> <input id="loadButton" type="button" value="load content"/> </body> </html>

    Read the article

  • VSTS Test Edition or HP's LoadRunner?

    - by Edward Leno
    I have had this debate with some peers off and on for a while. I am certified in the HP tools, but have been spending more and more time with VSTS Test Edition 2008. I am looking for opinions on what people think of the future of both products and how they compete. LoadRunner's strengths include its vast array of protocols supported. Unfortunately since HP took over from Mercury, they are beginning to lag behind, especially in the new internet spaces. VSTS Test, once very limited, is now quite impressive, especially in 2010. I don't know if it makes business sense, but I would love for VSTS Test to take on some additional protocols. Many of my clients would like to move away from HP and their licensing costs. Finally, I am looking for good resources for VSTS Test. I have been playing with it, but would like to see some dedicated courses/material, instead of just a part of the larger VSTS. Thanks!

    Read the article

  • Can I use two different look and feels in the same Swing application?

    - by DR
    I'm using the Flamingo ribbon and the Substance Office 2007 look and feel. Of course now every control has this look and feel, even those on dialog boxes. What I want is something like in Office 2007, where the ribbons have their Office 2007 look, but other controls keep their native Vista/XP look. Is it possible to assign certain controls a different look and feel? Perhaps using some kind of chaining or a proxy look and feel?

    Read the article

  • How to go to the next level integrating animations in WPF applications with Blend / VS2008?

    - by Edward Tanguay
    I have been able to create little animations with the storyline in Blend. And I have been able to copy in the isolated storylines and triggers into existing projects in visual studio to spruce them up on the edges a little bit. But after adding too many animations, they start to conflict or cancel each other out, etc., or I can make a panel slide down and slide it back up, then it no longer can slide down since it is not in its original state anymore. Does anyone have any links, video tutorials, books, resources which not only show you how to make a little animation and then leave you to figure out how to integrate numerous animations into a typical business application layout, but instead take you through the whole process of building a business application while integrating animations and WPF goodness with Blend and Visual Studio?

    Read the article

  • how to know location of return address on stack c/c++

    - by Dr Deo
    i have been reading about a function that can overwrite its return address. void foo(const char* input) { char buf[10]; //What? No extra arguments supplied to printf? //It's a cheap trick to view the stack 8-) //We'll see this trick again when we look at format strings. printf("My stack looks like:\n%p\n%p\n%p\n%p\n%p\n% p\n\n"); //%p ie expect pointers //Pass the user input straight to secure code public enemy #1. strcpy(buf, input); printf("%s\n", buf); printf("Now the stack looks like:\n%p\n%p\n%p\n%p\n%p\n%p\n\n"); } It was sugggested that this is how the stack would look like Address of foo = 00401000 My stack looks like: 00000000 00000000 7FFDF000 0012FF80 0040108A <-- We want to overwrite the return address for foo. 00410EDE Question: -. Why did the author arbitrarily choose the second last value as the return address of foo()? -. Are values added to the stack from the bottom or from the top? apart from the function return address, what are the other values i apparently see on the stack? ie why isn't it filled with zeros Thanks.

    Read the article

  • Why can't I create a database in an empty ASP MVC 2 project using Project->Add->New Item->SQL Server

    - by Dr Dork
    I'm diving head first into ASP MVC and am playing around with creating and manipulating a database. I did a search and found this tutorial for creating a database, however when I follow it, I get this error when trying to add a new database to my fresh, empty ASP MVC 2 project... A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) The only requirement the tutorial mentioned was SQL Server Express, but when I went to download it, it said it was already installed. I'm assuming it was part of the VS 2010 RC I installed and am running. So I don't know what else I need if I am missing something. This is all new to me, so I'm sure I'm missing something obvious here and after I'm done posting this question, I plan to do some more research into the topic of databases and how they work with ASP MVC. In the meantime, I was you could help me answer a couple high level questions... What am I missing/forgetting to do that is causing this error? Any suggestions for good resources/tutorials that focus on using databases with ASP MVC? I've done a lot of database programming in the past, so I'm familiar with the concepts of relational databases and the SQL language. I wish I could find a good resource for learning how to work with them in an ASP dev environment, as well as a good breakdown of all the related technologies used for working with them (i.e. LINQ to SQL). Thanks so much in advance for all your help! I'm going to start researching these questions right now.

    Read the article

  • Why are events and commands in MVVM so unsupported by WPF / Visual Studio?

    - by Edward Tanguay
    When creating an WPF application with the MVVM pattern, it seems I have to gather the necessary tools myself to even begin the most rudimentary event handling, e.g. AttachedBehaviors I get from here DelegateCommands I get from here Now I'm looking for some way to handle the ItemSelected event in a ComboBox and am getting suggestions of tricks and workarounds to do this (using a XAML trigger or have other elements bound to the selected item, etc.). Ok, I can go down this road, but it seems to be reinventing the wheel. It would be nice to just have an ItemSelected command that I can handle in my ViewModel. Am I missing some set of standard tools or is everyone doing MVVM with WPF basically building and putting together their own collection of tools just so they can do the simplest plumbing tasks with events and commands, things that take only a couple lines in code-behind with a Click="eventHandler"?

    Read the article

  • How to make multiple instances of RCVR, RQSTR and CLUSRCVR channels in WMQ?

    - by Dr. Xray
    This is a follow up on the question below, but it deserves another question. http://stackoverflow.com/questions/1821514/are-server-conn-and-client-conn-channels-the-only-channels-that-could-have-more-t To my understanding, a receiver (or cluster receiver) channel usually pair up with a single sender (or cluster sender) channel. How can one side being single instance while the other side being multiple instances? Thanks.

    Read the article

  • Normalizing URI to make it work correctly with MakeRelativeUri

    - by dr. evil
    Dim x AS New URI("http://www.example.com/test//test.asp") Dim rel AS New URI("http://www.example.com/xxx/xxx.asp") Console.Writeline(x.MakeRelativeUri(rel).Tostring()) In here output is: ../../xxx/xxx.asp Which looks correct almost all web servers will process the two of the following as same request: http://www.example.com/test//test.asp http://www.example.com/test/test.asp What's the best way to fix this behaviour is there any API to do this, or shall manually create a new URI and remove all // in the path?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >