Search Results

Search found 9 results on 1 pages for 'svick'.

Page 1/1 | 1 

  • IEnumerable<CustomType> in PowerShell

    - by svick
    I'm trying to use Enumerable.ToList() in PowerShell. Apparently, to do that, I have to explicitly convert the object to IEnumerable<CustomType>, but I am unable to do that. It seems I can't correctly write IEnumerable<CustomType> in PowerShell. Both IEnumerable<string> and CustomType itself work correctly (the custom type I'm trying to use is called WpApiLib.Page), so I don't know what can I be doing wrong. PS C:\Users\Svick> [Collections.Generic.IEnumerable``1[System.String]] IsPublic IsSerial Name BaseType -------- -------- ---- -------- True False IEnumerable`1 PS C:\Users\Svick> [WpApiLib.Page] IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Page System.Object PS C:\Users\Svick> [Collections.Generic.IEnumerable``1[WpApiLib.Page]] Unable to find type [Collections.Generic.IEnumerable`1[WpApiLib.Page]]: make su re that the assembly containing this type is loaded. At line:1 char:51 + [Collections.Generic.IEnumerable``1[WpApiLib.Page]] <<<<

    Read the article

  • Why do XML namespace URIs use the http scheme?

    - by svick
    A XML namespace should be a URI, but it can use any URI scheme, including those that are not URLs. Then why do all widely used XML namespaces use the http scheme (e.g. http://www.w3.org/XML/1998/namespace), considering that trying to use the URI as an URL by retrieving that document using the HTTP protocol is not guaranteed to do anything useful (and often doesn't)? I understand the usefulness of DNS domains in namespace names to help guarantee uniqueness. But that doesn't require the http scheme, there could be a separate scheme for that (something like namespace:w3.org/XML/1998/namespace). This would avoid the confusion between URIs and URLs, while maintaining domain-based uniqueness.

    Read the article

  • How to diagnose very slow pagefile

    - by svick
    Quite often, one of the applications I use freezes (“does not respond”) for a while, in extreme cases for few minutes. This happens especially when when switching apps. During this time, the HDD light flashes constantly and perfmon show that HDD is used 100% of the time (OTOH, CPU isn't) and that pagefile is being read (which is to be expected when switching apps), but at a very slow rate. When I sort the disk table in perfmon by read or write, the file read and wrote the most is the pagefile, but it's still quite low rate (I don't remember the numbers). How can I diagnose what's causing this? I use Windows Vista, and the computer is quite ordinary two years old laptop.

    Read the article

  • Network problems with Ubuntu on VMware

    - by svick
    I'm running Ubuntu 10.04 inside VMware Player running under Windows Vista and I can't connect to the internet or the host computer from the Ubuntu. I have set all the VMware services to “manual” (like VMware DHCP Service), but starting them manually doesn't help. In VMware, the network seems to work (there is a green dot beside the network icon) and I have tried both Bridged and NAT settings. ifconfig doesn't show the eth1 interface, unless I give it as a parameter (or use -a). I think this means that Ubuntu thinks that the network isn't connected at all. How do I fix this? ifconvadmin@ubu1004:~$ ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:56 errors:0 dropped:0 overruns:0 frame:0 TX packets:56 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:4192 (4.1 KB) TX bytes:4192 (4.1 KB) vadmin@ubu1004:~$ ifconfig eth1 eth1 Link encap:Ethernet HWaddr 00:0c:29:2d:a0:6f BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:18 Base address:0x2000

    Read the article

  • Disable selecting in WPF DataGrid

    - by svick
    How can I disable selecting in a WPFTooklit's DataGrid? I tried modifying the solution that works for ListView (from http://stackoverflow.com/questions/1051215/wpf-listview-turn-off-selection#comment-863179), but that doesn't work: <tk:DataGrid> <tk:DataGrid.ItemContainerStyle> <Style TargetType="{x:Type tk:DataGridRow}"> <Setter Property="Focusable" Value="false"/> </Style> </tk:DataGrid.ItemContainerStyle> <tk:DataGrid.CellStyle> <Style TargetType="{x:Type tk:DataGridCell}"> <Setter Property="Focusable" Value="false"/> </Style> </tk:DataGrid.CellStyle> </tk:DataGrid>

    Read the article

  • XML Schema and element with type string

    - by svick
    I'm trying to create an XML Schema and I'm stuck. It seems I can't define an element with string content. What am I doing wrong? Schema: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ponderka.wz.cz/MusicLibrary0" targetNamespace="http://ponderka.wz.cz/MusicLibrary0"> <xs:element name="music-library"> <xs:complexType> <xs:sequence> <xs:element name="artist" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Document: <?xml version="1.0"?> <music-library xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ponderka.wz.cz/MusicLibrary0 data0.xsd" xmlns="http://ponderka.wz.cz/MusicLibrary0"> <artist>a</artist> </music-library> The validator says: Element <artist> is not allowed under element <music-library>. Reason: The following elements are expected at this location (see below) <artist> Error location: music-library / artist Details cvc-model-group: Element <artist> unexpected by type '{anonymous}' of element <music-library>. cvc-elt.5.2.1: The element <music-library> is not valid with respect to the actual type definition '{anonymous}'.

    Read the article

  • Loading a WPF Window without showing it

    - by svick
    I create a global hot key to show a window by PInvoking RegisterHotKey(). But to do this I need that window's HWND, which doesn't exist until the window is loaded, that means shown for the first time. But I don't want to show the window before I can set the hot key. Is there a way to create a HWND for that window that is invisible to the user?

    Read the article

  • XAML resources aren't loaded when calling from different project

    - by svick
    I have a WPF project with some styles in XAML in Application.Resources. This works perfectly fine. But when I open a window from this project from another one (this one is a console application), the resources from XAML aren't loaded. When I first tried it, I got a XamlParseException on StaticResource calls in XAML, so I changed it to DynamicResource and now the style just doesn't get loaded. How do I fix this? The code I use: [STAThread] static void Main() { App app = new App(); MyWindow wnd = new MyWindow (); wnd.Show(); app.Run(); }

    Read the article

1