Daily Archives

Articles indexed Thursday March 25 2010

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

  • dynamic ContextMenu in TreeView vs. MVVM

    - by bitbonk
    I have a tree of ViewModels displayed as a TreeView (using HierarchicalDataTemplate). Each ViewModel instance has different commands that can be executed on it wich again are exposed as a list of command ViewModels for each item ViewModel. How can I create a single ContextMenu that opens at the TreeViewItem that was rightclicked and that populates its commands from the underlying item ViewModel's command ViewModels list? All in a decent MVVM fashion ...

    Read the article

  • SQL SERVER Out of the Box Activty and Performance Reports from SSSMS

    SQL Server management Studio 2008 is wonderful tool and has many different features. Many times, an average user does not use them as they are not aware about these features. Today, we will learn one such feature. SSMS comes with many inbuilt performance and activity reports, but we do not use it to the full [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • MSDN Flash - MIX10 Special: What Happens in Vegas.

    This week the MSDN Flash is a wrap up of everything MIX. We all know the old adage "What Happens in Vegas, Stays in Vegas"; yet with live broadcasts, blogs and tweets that is no longer the case. I have just returned from MIX10 with a group of ten kiwis and I'll say that this year's event had some Te Awesome moments. We unveiled the developer story for Windows Phone 7 Series and announced that New Zealand will be among 30 countries where developers get paid at launch. I blogged about the Windows...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Perl -e insert new line

    - by lydonchandra
    Hi If I do this in bash perl -e '$x; $y' Is there any character that can behave like a new line? i.e. I want to do perl -e '$x; some_chars_as_new_line $y' where perl interpreter actually sees an actual new line. $x; $y; Many thanks

    Read the article

  • Very slow browsing shared folder XP client/host

    - by Ickster
    I have a pretty straightforward setup where I'm storing media files on an XP pro machine, and sharing the folder to be accessed by other XP pro machines around the house. (Typically, there's only one client accessing the share at a time, although there may be several with the share mounted.) It's been working just fine for years, but I've recently started having some problems. A couple of days ago, the host PC had power disconnected while it was running. It was restarted and everything seemed fine initially, but since then browsing the shared folder from client machines has been extremely slow and actually reading data is all but impossible. The problem exists in every access method I've tried: Windows Explorer, VLC dialogs, command line, etc. My first thought was that the disk was experiencing problems, but there are no problems viewing the files locally on the host machine. My second thought was that there was a network problem on the host machine, so I removed and reinstalled drivers for the NIC with no change. My third thought was that there might've been a problem elsewhere on the network, so I swapped out hardware to no avail. I'm regrouping and trying to come up with a methodical approach to figuring out what might be wrong. I would of course be thrilled if you can suggest specific problems (Microsoft KB articles, etc.) that I might check, but I'm not expecting a silver bullet. If you can help me outline an approach to identify the problem (including recommended tools, e.g., disk checkers, network analyzers, etc.) I'd greatly appreciate it.

    Read the article

  • Can Apache configuration check cookies?

    - by nickf
    My situation: We have a mobile version of our website, and want to start redirecting mobile users to it. The plan is to do this in Apache httpd.conf or .htaccess, using something like this: RewriteEngine On RewriteCond %{HTTP_USER_AGENT} (iPhone|Blackberry|...) RewriteRule (.*) mobile/$1 However we want there to be a way for users to override our default action of redirecting them. One way we thought to do it was to show a link on the mobile site directing back to the regular site, and store a cookie when they use that link. Could the Apache configuration file check a cookie before redirecting? Is there a better way?

    Read the article

  • ASP.Net MVC 2.0: EditorFor setting name via attributes

    - by vdh_ant
    Hey guys Just wondering how do I mimic the following using attributes... <%= Html.EditorFor(x => x.SportProgramIdList, "FormMultiSelectDropDownList", "SportProgramIds")%> I know I can specify the template by using [UIHint("FormMultiSelectDropDownList")] but I am left with the problem with how to set the name... Cheers Anthony

    Read the article

  • Using javascript to open a popup window

    - by newName
    I would like to open a popup window using javascript in my c#.net app. This is the code in the body tag in my webform <script language=javascript> function openWindow(strEmail) { window.open('CheckEmail.aspx?email=' + strEmail + , 'Check Email','left=100,top=100,toolbar=no,scrollbars=yes,width=680,height=350'); return false; } </script> this is my code in the Page_Load section this.btnCheck.Attributes.Add("onclick", "return openWindow(" + txtEmail.Text + ");"); right now I'm trying to pass the string from my textbox "txtEmail" so in my popup window i can get the request.querystring but Im a little unsure of how the syntax is.

    Read the article

  • UIViewController rotate methods

    - by Corey Floyd
    What object is responsible for dipatching the UIViewController rotation method calls, i.e: – shouldAutorotateToInterfaceOrientation: – willRotateToInterfaceOrientation:duration: – willAnimateFirstHalfOfRotationToInterfaceOrientation:duration: – willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration: – didRotateFromInterfaceOrientation: I imagine it is UIApplication (but maybe the AppDelegate or UIWindow). The next question, is how does the object know which UIViewController to talk to? How does it know which UIViewController has its view as the subview of the window? Is there a message you can send or a property you can set (of some object) that sets the "Active" UIViewController for the app?

    Read the article

  • confusing fork system call

    - by benjamin button
    Hi, i was just checking the behaviour of fork system call and i found it very confusing. i saw in a website that Unix will make an exact copy of the parent's address space and give it to the child. Therefore, the parent and child processes have separate address spaces #include <stdio.h> #include <sys/types.h> int main(void) { pid_t pid; char y='Y'; char *ptr; ptr=&y; pid = fork(); if (pid == 0) { y='Z'; printf(" *** Child process ***\n"); printf(" Address is %p\n",ptr); printf(" char value is %c\n",y); sleep(5); } else { sleep(5); printf("\n ***parent process ***\n",&y); printf(" Address is %p\n",ptr); printf(" char value is %c\n",y); } } the output of the above program is : *** Child process *** Address is 69002894 char value is Z ***parent process *** Address is 69002894 char value is Y so from the above mentioned statement it seems that child and parent have separet address spaces.this is the reason why char value is printed separately and why am i seeing the address of the variable as same in both child and parent processes.? Please help me understand this!

    Read the article

  • Dynamics of the using keyword

    - by AngryHacker
    Consider the following code: // module level declaration Socket _client; void ProcessSocket() { _client = GetSocketFromSomewhere(); using (_client) { DoStuff(); // receive and send data Close(); } } void Close() { _client.Close(); _client = null; } Given that that the code calls the Close() method, which closes the _client socket and sets it to null, while still inside the `using' block, what exactly happens behind the scenes? Does the socket really get closed? Are there side effects? P.S. This is using C# 3.0 on the .NET MicroFramework, but I suppose the c#, the language, should function identically. The reason i am asking is that occasionally, very rarely, I run out of sockets (which is a very precious resource on a .NET MF devices).

    Read the article

  • iPhone drag/drop

    - by Farid
    Trying to get some basic drag/drop functionality happening for an iPhone application. My current code for trying to do this is as follows: - (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event { UITouch *touch = [touches anyObject]; CGPoint location = [touch locationInView:self]; self.center = location; } This code has the result of a the touched UIView flickering while it follows the touch around. After playing around with it a bit, I also noticed that the UIView seemed to flicker from the 0,0 position on the screen to the currently touched location. Any ideas what I'm doing wrong?

    Read the article

  • How to check undefined javascript value in facebook?

    - by Murvinlai
    In normal javascript, I can check either if (i == undefined) or if (i === undefined) or the "typeof" however, within facebook, it will have the api_key append as the prefix in undefined. i.e. it will become if (a12345_i == a12345_undefined) which is NOT undefined so, what can I do to find out the variable is undefined or not?

    Read the article

  • Lost in UTF-8 hell. (Django and Python)

    - by user140314
    I am working through the Django RSS reader project here. The RSS feed will read something like "OKLAHOMA CITY (AP) — James Harden let". The RSS feed's encoding reads encoding="UTF-8" so I believe I am passing utf-8 to markdown in the code snippet below. The em dash is where it chokes. I get the Django error of "'ascii' codec can't encode character u'\u2014' in position 109: ordinal not in range(128)" which is an UnicodeEncodeError. In the variables being passed I see "OKLAHOMA CITY (AP) \u2014 James Harden". The code line that is not working is: content = content.encode(parsed_feed.encoding, "xmlcharrefreplace") I am using markdown 2.0, django 1.1, and python 2.4. What is the magic sequence of encoding and decoding that I need to do to make this work? Thanks.

    Read the article

  • How to access GMT time using VC

    - by sijith
    In my project i am using GetLocalTime() and GetSystemTime and set the current time into registry. But my problem is when i am changing the time of my machine the changed time only saving to registry. Is there any chance to access the GMT time so that its independent of machine and nobody can change the time.. Please give some help

    Read the article

  • Getting started with XSD validation with C#

    - by Rosarch
    Here is my first attempt at validating XML with XSD. The XML file to be validated: <?xml version="1.0" encoding="utf-8" ?> <config xmlns="Schemas" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="config.xsd"> <levelVariant> <filePath>SampleVariant</filePath> </levelVariant> <levelVariant> <filePath>LegendaryMode</filePath> </levelVariant> <levelVariant> <filePath>AmazingMode</filePath> </levelVariant> </config> The XSD, located in "Schemas/config.xsd" relative to the XML file to be validated: <?xml version="1.0" encoding="utf-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="config"> <xs:complexType> <xs:sequence> <xs:element name="levelVariant"> <xs:complexType> <xs:sequence> <xs:element name="filePath" type="xs:anyURI"> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Right now, I just want to validate the XML file precisely as it appears currently. Once I understand this better, I'll expand more. Do I really need so many lines for something as simple as the XML file as it currently exists? The validation code in C#: public void SetURI(string uri) { XElement toValidate = XElement.Load(Path.Combine(PATH_TO_DATA_DIR, uri) + ".xml"); // begin confusion string schemaURI = toValidate.Attributes("xmlns").First().ToString() + toValidate.Attributes("xsi:noNamespaceSchemaLocation").First().ToString(); XmlSchemaSet schemas = new XmlSchemaSet(); schemas.Add("", XmlReader.Create( SOMETHING )); XDocument toValidateDoc = new XDocument(toValidate); toValidateDoc.Validate(schemas, null); // end confusion root = toValidate; } Any illumination would be appreciated.

    Read the article

  • unhandeled exception occured in c#

    - by abid
    hey. i`m getting this error that system.data.datarowview is not permitted in this contexxt. valid expressions are constants expressions and ( in some contexts). column name are not permitted.. can any body guide me what this error says.. can any one provide me a suggestion whether where im wrong.. any guesses guys??? im not getting it.. :/

    Read the article

  • Blue pay integration in php

    - by testadmin
    Hai, I want to integrate Bluepay gateway in my project, I have download a Bluepay.php class but i don't know how to configure this file with my project? Please any one tell me the basic steps to implement bluepay payment service?

    Read the article

  • When creating a dialog with jquery, how do I hide the dialog div?

    - by stormist
    I am creating a dialog like in this page: http://jqueryui.com/demos/dialog/#modal-confirmation (click view source) on the bottom is the div that gets placed in the dialog. The dialog works perfect when called by the javascript but the dialog is apparent at the bottom of the page when it loads. (minus all the styling that gets applied when it is called by the javascript function) How can I hide the div and still allow the dialog to use it? I have tried setting style="visibility:hidden" but that prevents it from being shown when called by the javascript.

    Read the article

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