Search Results

Search found 344 results on 14 pages for 'edward wong hau pepelu tivrusk'.

Page 12/14 | < Previous Page | 8 9 10 11 12 13 14  | Next Page >

  • What is the best way in Silerlight to make areas of a large graphic clickable?

    - by Edward Tanguay
    In a Silverlight application I have large images which have flow charts on them. I need to handle the clicks on specific hotspots of the image where the flow chart boxes are. Since the flow charts will always be different, the information of where the hotspots has to be dynamic, e.g. in a list of coordinates. I've found article like this one but don't need the detail of e.g. the outline of countries but just simple rectangle and circle areas. I've also found articles where they talk about overlaying an HTML image map over the silverlight application, but it has to be easier than this. What is the best way to handle clicks on specific areas of an image in silverlight?

    Read the article

  • How to get Firefox to not continue to show "Transferring data from..." in browser status bar after a

    - by Edward Tanguay
    The following silverlight demo loads and displays a text file from a server. However, in Firefox (but not Explorer or Chrome) after you click the button and the text displays, the status bar continues to show "Transferring data from test.development..." which erroneously gives the user the belief that something is still loading. I've noticed that if you click on another Firefox tab and then back on the original one, the message goes away, so it seems to be just a Firefox bug that doesn't clear the status bar automatically. Is there a way to clear the status bar automatically in Firefox? or a way to explicitly tell it that the async loading is finished so it can clear the status bar itself? XAML: <UserControl x:Class="TestLoad1111.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <StackPanel Margin="10"> <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Margin="0 0 0 10"> <Button Content="Load Text" Click="Button_LoadText_Click"/> </StackPanel> <TextBlock Text="{Binding Message}" /> </StackPanel> </UserControl> Code Behind: using System; using System.Net; using System.Windows; using System.Windows.Controls; using System.ComponentModel; namespace TestLoad1111 { public partial class MainPage : UserControl, INotifyPropertyChanged { #region ViewModelProperty: Message private string _message; public string Message { get { return _message; } set { _message = value; OnPropertyChanged("Message"); } } #endregion public MainPage() { InitializeComponent(); DataContext = this; } private void Button_LoadText_Click(object sender, RoutedEventArgs e) { WebClient webClientTextLoader = new WebClient(); webClientTextLoader.DownloadStringAsync(new Uri("http://test.development:111/testdata/test.txt?" + Helpers.GetRandomizedSuffixToPreventCaching())); webClientTextLoader.DownloadStringCompleted += new DownloadStringCompletedEventHandler(webClientTextLoader_DownloadStringCompleted); } void webClientTextLoader_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { Message = e.Result; } #region INotifiedProperty Block public event PropertyChangedEventHandler PropertyChanged; protected void OnPropertyChanged(string propertyName) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) { handler(this, new PropertyChangedEventArgs(propertyName)); } } #endregion } public static class Helpers { private static Random random = new Random(); public static int GetRandomizedSuffixToPreventCaching() { return random.Next(10000, 99999); } } }

    Read the article

  • Why would Visual Studio 2010 say it can't show a variable during debug?

    - by Edward Tanguay
    In Visual Studio 2010 sometimes when I want to get the value of a variable while debugging, it tells me that it "does not exist in this context" when it obviously does. I have found that if I use the variable, as in the screenshot below, then it is able to show it. Has anyone experienced this? Visual Studio 2008 never did this. How can I get Visual Studio 2010 to always show me variable values while debugging?

    Read the article

  • Why do firefox/chrome show a different page than IE8?

    - by Edward Tanguay
    When I look at this published Google Docs document, I see the latest version with Firefox and Chrome, but an older version with IE8. Also, screen-scraping it via PHP/Curl gives me an older version. I've tried CTRL-Refresh in IE8 but I can't get it to show me the newest version. No matter what headers I try to change in PHP/Curl, I can't get it to show me the newest version. What am I not understanding about browsers/headers/caching here? How can it be that different browsers show different contents of one page?

    Read the article

  • In MVVM are DataTemplates considered Views as UserControls are Views?

    - by Edward Tanguay
    In MVVM, every View has a ViewModel. A View I understand to be a Window, Page or UserControl to which you can attach a ViewModel from which the view gets its data. But a DataTemplate can also render a ViewModel's data. So I understand a DataTemplate to be another "View", but there seem to be differences, e.g. Windows, Pages, and UserControls can define their own .dlls, one type is bound with DataContect the other through attaching a template so that Windows, Pages, UserControls can can be attached to ViewModels dynamically by a ServiceLocator/Container, etc. How else are DataTemplates different than Windows/Pages/UserControls when it comes to rendering a ViewModel's data on the UI? And are there other types of "Views" other than these four?

    Read the article

  • Why don't I have access to setReadDataOnly() or enableMemoryOptimization() in PHPExcel?

    - by Edward Tanguay
    I've downloaded PHPExcel 1.7.5 Production. I would like to use setReadDataOnly() and enableMemoryOptimization() as discussed in their forum here and in stackoverflow questions. However when I use them, I get a Call to undefined method error. Is there another version or some plugin or library that I have not installed? What do I have to do to access these methods? $objPHPExcel = PHPExcel_IOFactory::load("data/".$file_name); $objPHPExcel->setReadDataOnly(true); //Call to undefined method $objPHPExcel->enableMemoryOptimization(); //Call to undefined method

    Read the article

  • Why would my Silverlight 4 Out-of-Browser application just display white?

    - by Edward Tanguay
    My Silverlight application works fine when running in a browser. But when I install it as an out-of-browser application, the Window frame comes up with an appropriate icon and title, but the content of the window is just white. It is in the start menu but when I close it and open again, it is still blank. I reproduced this on Windows 7 and Windows XP. What could be causing my silverlight application to show only white when running out-of-browser? Here are the settings I used:

    Read the article

  • Why does this textbox binding example work in WPF but not in Silverlight?

    - by Edward Tanguay
    Why is it in the following silverlight application that when I: change the default text in the first textbox move the cursor to the second text box (i.e. take focus off first textbox) click the button that inside the button handler, it still has the old value "default text"? What do I have to do to get the binding to work in Silverlight? The same code works fine in WPF. XAML: <UserControl x:Class="TestUpdate123.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> <StackPanel Margin="10" HorizontalAlignment="Left"> <TextBox Text="{Binding InputText}" Height="200" Width="600" Margin="0 0 0 10"/> <StackPanel HorizontalAlignment="Left"> <Button Content="Convert" Click="Button_Convert_Click" Margin="0 0 0 10"/> </StackPanel> <TextBox Height="200" Width="600" Margin="0 0 0 10"/> <TextBlock Text="{Binding OutputText}"/> </StackPanel> </UserControl> Code Behind: using System.Windows; using System.Windows.Controls; using System.ComponentModel; namespace TestUpdate123 { public partial class MainPage : UserControl, INotifyPropertyChanged { #region ViewModelProperty: InputText private string _inputText; public string InputText { get { return _inputText; } set { _inputText = value; OnPropertyChanged("InputText"); } } #endregion #region ViewModelProperty: OutputText private string _outputText; public string OutputText { get { return _outputText; } set { _outputText = value; OnPropertyChanged("OutputText"); } } #endregion public MainPage() { InitializeComponent(); DataContext = this; InputText = "default text"; } private void Button_Convert_Click(object sender, RoutedEventArgs e) { OutputText = InputText; } #region INotifiedProperty Block public event PropertyChangedEventHandler PropertyChanged; protected void OnPropertyChanged(string propertyName) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) { handler(this, new PropertyChangedEventArgs(propertyName)); } } #endregion } }

    Read the article

  • How to get the height of an Image in Silverlight?

    - by Edward Tanguay
    I have this code in Silverlight: Image image = new Image(); BitmapImage bitmapImage= TheDatasourceManager.GetBitmapImage("blackPencil"); image.Source = bitmapImage; image.Stretch = Stretch.None; image.HorizontalAlignment = HorizontalAlignment.Left; image.VerticalAlignment = VerticalAlignment.Top; image.Margin = new Thickness(88, 88, 0, 0); grid.Children.Add(image); Now I want to find out the height of the image. in WPF I can get it with image.Source.Height but this is not available in Silverlight bitmapImage.Height doesn't exist either when I debug and examine the image object, I eventually get to PixelHeight which has an accurate height, but I can't seem to access it I find image.ActualHeight but it is 0. How can I get the height of the image?

    Read the article

  • Is there an optimal way to render images in cocoa? Im using setNeedsDisplay

    - by Edward An
    Currently, any time I manually move a UIImage (via handling the touchesMoved event) the last thing I call in that event is [self setNeedsDisplay], which effectively redraws the entire view. My images are also being animated, so every time a frame of animation changes, i have to call setNeedsDisplay. I find this to be horrific since I don't expect iphone/cocoa to be able to perform such frequent screen redraws very quickly. Is there an optimal, more efficient way that I could be doing this? Perhaps somehow telling cocoa to update only a particular region of the screen (the rect region of the image)?

    Read the article

  • In Vim, what is the best way to select, delete, or comment out large portions of multi-screen text?

    - by Edward Tanguay
    Selecting a large amount of text that extends over many screens in an IDE like Eclipse is fairly easy since you can use the mouse, but what is the best way to e.g. select and delete multiscreen blocks of text or write e.g. three large methods out to another file and then delete them for testing purposes in Vim when using it via putty/ssh where you cannot use the mouse? I can easily yank-to-the-end-of-line or yank-to-the-end-of-code-block but if the text extends over many screens, or has lots of blank lines in it, I feel like my hands are tied in Vim. Any solutions? And a related question: is there a way to somehow select 40 lines, and then comment them all out (with "#" or "//"), as is common in most IDEs?

    Read the article

  • How to SELECT the last 10 rows of an SQL table which has no ID field?

    - by Edward Tanguay
    I have an MySQL table with 25000 rows. This is an imported CSV file so I want to look at the last ten rows to make sure it imported everything. However, since there is no ID column, I can't say: SELECT * FROM big_table ORDER BY id DESC What SQL statement would show me the last 10 rows of this table? The structure of the table is simply this: columns are: A, B, C, D, ..., AA, AB, AC, ... (like Excel) all fields are of type TEXT

    Read the article

  • What is the best way to return two values from a method?

    - by Edward Tanguay
    When I have to write methods which return two values, I usually go about it as in the following code which returns a List<string>. Or if I have to return e.g. a id and string, then I return a List<object> and then pick them out with index number and recast the values. This recasting and referencing by index seems inelegant so I want to develop a new habit for methods that return two values. What is the best pattern for this? using System; using System.Collections.Generic; using System.Linq; namespace MultipleReturns { class Program { static void Main(string[] args) { string extension = "txt"; { List<string> entries = GetIdCodeAndFileName("first.txt", extension); Console.WriteLine("{0}, {1}", entries[0], entries[1]); } { List<string> entries = GetIdCodeAndFileName("first", extension); Console.WriteLine("{0}, {1}", entries[0], entries[1]); } Console.ReadLine(); } /// <summary> /// gets "first.txt", "txt" and returns "first", "first.txt" /// gets "first", "txt" and returns "first", "first.txt" /// it is assumed that extensions will always match /// </summary> /// <param name="line"></param> public static List<string> GetIdCodeAndFileName(string line, string extension) { if (line.Contains(".")) { List<string> parts = line.BreakIntoParts("."); List<string> returnItems = new List<string>(); returnItems.Add(parts[0]); returnItems.Add(line); return returnItems; } else { List<string> returnItems = new List<string>(); returnItems.Add(line); returnItems.Add(line + "." + extension); return returnItems; } } } public static class StringHelpers { public static List<string> BreakIntoParts(this string line, string separator) { if (String.IsNullOrEmpty(line)) return null; else { return line.Split(new string[] { separator }, StringSplitOptions.None).Select(p => p.Trim()).ToList(); } } } }

    Read the article

  • How can I unattach an element from another element in the XAML tree?

    - by Edward Tanguay
    In my Silverlight application, I load all the images I need at application start and store them in a dictionary. Then as I need them I pick them out of the dictionary and attach them in XAML trees etc. However, I have the problem that if I attach an Image object to a Grid, then want to use that image again, it tells me: The image element is already a child of another element. How can I run through my dictionary and "detach all images from parent XAML elements"?

    Read the article

  • Is there a more elegant way to act on the first and last items in a foreach enumeration than count++

    - by Edward Tanguay
    Is there a more elegant way to act on the first and last items when iterating through a foreach loop than incrementing a separate counter and checking it each time? For instance, the following code outputs: >>> [line1], [line2], [line3], [line4] <<< which requires knowing when you are acting on the first and last item. Is there a more elegant way to do this now in C# 3 / C# 4? It seems like I could use .Last() or .First() or something like that. using System; using System.Collections.Generic; using System.Text; namespace TestForNext29343 { class Program { static void Main(string[] args) { StringBuilder sb = new StringBuilder(); List<string> lines = new List<string> { "line1", "line2", "line3", "line4" }; int index = 0; foreach (var line in lines) { if (index == 0) sb.Append(">>> "); sb.Append("[" + line + "]"); if (index < lines.Count - 1) sb.Append(", "); else sb.Append(" <<<"); index++; } Console.WriteLine(sb.ToString()); Console.ReadLine(); } } }

    Read the article

  • Why does VerticalScrollBarVisibility not work in a style in Silverlight?

    - by Edward Tanguay
    VerticalScrollBarVisibility works when I define it inline like this: <UserControl x:Class="TestScrollBar.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"> <UserControl.Resources> <Style TargetType="TextBox" x:Key="EditListContainerContentMultiLineTwoColumn"> <Setter Property="AcceptsReturn" Value="True"/> <Setter Property="Width" Value="400"/> <Setter Property="Height" Value="300"/> <Setter Property="IsReadOnly" Value="False"/> <Setter Property="Margin" Value="0 0 0 20"/> <Setter Property="HorizontalAlignment" Value="Left"/> <Setter Property="TextWrapping" Value="Wrap" /> </Style> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White" Margin="10"> <StackPanel HorizontalAlignment="Left"> <TextBox Text="this is a test" Style="{StaticResource EditListContainerContentMultiLineTwoColumn}" VerticalScrollBarVisibility="Auto" /> </StackPanel> </Grid> </UserControl> But when I put VerticalScrollBarVisibility in a style, it shows me a blank screen: <UserControl x:Class="TestScrollBar.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"> <UserControl.Resources> <Style TargetType="TextBox" x:Key="EditListContainerContentMultiLineTwoColumn"> <Setter Property="VerticalScrollBarVisibility" Value="Auto"/> <Setter Property="AcceptsReturn" Value="True"/> <Setter Property="Width" Value="400"/> <Setter Property="Height" Value="300"/> <Setter Property="IsReadOnly" Value="False"/> <Setter Property="Margin" Value="0 0 0 20"/> <Setter Property="HorizontalAlignment" Value="Left"/> <Setter Property="TextWrapping" Value="Wrap" /> </Style> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White" Margin="10"> <StackPanel HorizontalAlignment="Left"> <TextBox Text="this is a test" Style="{StaticResource EditListContainerContentMultiLineTwoColumn}" /> </StackPanel> </Grid> </UserControl> In WPF it works works fine. How can I get VerticalScrollBarVisibility to work in a style?

    Read the article

  • How to make a tooltip appear immediately in Silverlight?

    - by Edward Tanguay
    In WPF, I get a tooltip to appear immediately like this: TextBlock tb = new TextBlock(); tb.Text = name; ToolTip tt = new ToolTip(); tt.Content = "This is some info on " + name + "."; tb.ToolTip = tt; tt.Cursor = Cursors.Help; ToolTipService.SetInitialShowDelay(tb, 0); This makes the user experience better since if the user wants to look at the tooltips of five items on the page, he doesn't have to wait that long second for each one. But since Silverlight does not have SetInitialShowDelay, what is a workaround to make the tooltip appear immediately?

    Read the article

  • Why does a Silverlight application show a blank browser screen when created from exported template?

    - by Edward Tanguay
    I created a silverlight app (without website) named TestApp, with one TextBox: <UserControl x:Class="TestApp.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot"> <TextBlock Text="this is a test"/> </Grid> </UserControl> I press F5 and see "this is a test" in my browser (firefox). I select File | Export Template | name it TestAppTemplate and save it. I create a new silverlight app based on the above template. The MainPage.xaml has the exact same XAML as above. I press F5 and see a blank screen in my browser. I look at the HTML source of both of these and they are identical. Everything I have compared in both projects is identical. What do I have to do so that a Silverlight application which is created from my exported template does not show a blank screen? (creating a WPF application from an exported template like this works fine)

    Read the article

  • Is it possible to create nested classes in PHP as it is in C#?

    - by Edward Tanguay
    In C# you can have nested classes like this, which are useful if you have classes which do not have meaning outside the scope of one particular class, e.g. in a factory pattern: public abstract class BankAccount { private BankAccount() {} private sealed class SavingsAccount : BankAccount { ... } private sealed class CheckingAccount : BankAccount { ... } public BankAccount MakeSavingAccount() { ... } public BankAccount MakeCheckingAccount() { ... } } Is this possible in PHP? I've read that it was planned for PHP 5, then cancelled, then planned again, but can't find definitive info. Does anyone know how to create nested classes (classes within the scope of another class) as in the above C# example using PHP 5.3?

    Read the article

  • Is there a way to reduce the verbosity of using String.Format(...., p1, p2, p3)?

    - by Edward Tanguay
    I often use String.Format() because it makes the building of strings more readable and manageable. Is there anyway to reduce its syntactical verbosity, e.g. with an extension method, etc.? Logger.LogEntry(String.Format("text '{0}' registered", pair.IdCode)); public static void LogEntry(string message) { ... } e.g. I would like to use all my and other methods that receive a string the way I use Console.Write(), e.g.: Logger.LogEntry("text '{0}' registered", pair.IdCode);

    Read the article

  • loop for Cursor1.moveToPosition() in android

    - by Edward Sullen
    I want to get data in the first column of all row from my database and convert to String[] ... List<String> item1 = new ArrayList<String>(); // c is a cursor which pointed from a database for(int i=0;i<=nombre_row;i++) { c.moveToPosition(i); item1.add(c.getString(0)); } String[] strarray = new String[item1.size()]; item1.toArray(strarray ); I've tried to command step by step, and found that the problem is in the Loop for.... Please help... thanks in advance for all answer.

    Read the article

  • How to Create Steel Wool Light Paintings [Video]

    - by Jason Fitzpatrick
    Steel Wool Light Paintings are like regular long-exposure light paintings but they replace LEDs with flaming balls of steel; watch this video to see how to safely and successfully light paint with steal wool. In this video Benjamin Von Wong explains how to set up a steel wool light painting photoshoot, how to create your steel wool light source, and how to do it all safely without burning down your neighborhood or lighting nearby pedestrians on fire. [via DIYPhotography] What’s the Difference Between Sleep and Hibernate in Windows? Screenshot Tour: XBMC 11 Eden Rocks Improved iOS Support, AirPlay, and Even a Custom XBMC OS How To Be Your Own Personal Clone Army (With a Little Photoshop)

    Read the article

  • Open Source Survey: Oracle Products on Top

    - by trond-arne.undheim
    Oracle continues to work with the open source community to bring the most innovative and productive software to market (more). Oracle products received the most votes in several key categories of the 2010 Linux Journal Reader's Choice Awards. With over 12,000 technologists reporting, these product earned top spots: Best Office Suite: OpenOffice.org Best Single Office Program: OpenOffice.org Writer Best Database: MySQL Best Virtualization Solution: VirtualBox "As the leading open source technology and service provider, Oracle continues to work with the community stakeholders to rapidly innovate many open source products for use in fully tested production environments," says Edward Screven, Oracle's chief corporate architect. "Supporting open source is important to Oracle and our customers, and we continue to invest in it." According to a recent report by the Linux Foundation, Oracle is one of the top ten contributors to the Linux Kernel. Oracle also contributes millions of lines of code to these important projects: OpenJDK: 7,002,579 Eclipse: 1,800,000 (#3 in active committers) MySQL: 5,073,113 NetBeans: 7,870,446 JSF: 701,980 Apache MyFaces Trinidad: 1,316,840 Hudson: 1,209,779 OpenOffice.org: 7,500,000

    Read the article

  • MySQL 5.5

    - by trond-arne.undheim
    New performance and scalability enhancements, continued Investment in MySQL (see press release). "The latest release of MySQL further exemplifies Oracle's commitment to the MySQL community and investment in delivering rapid innovation and enhancements to the MySQL platform" said Edward Screven, Oracle's Chief Corporate Architect. MySQL is integral to Oracle's complete, open and integrated strategy. The MySQL 5.5 Community Edition, which is licensed under the GNU General Public License (GPL), and is available for free download, includes InnoDB as the default storage engine. We cannot stress the importance of using open standards enough, whether in the context of open source or non-open source software. For more on Oracle's Open Source offering, see Oracle.com/opensource or oss.oracle.com (for developers).

    Read the article

< Previous Page | 8 9 10 11 12 13 14  | Next Page >