Search Results

Search found 276 results on 12 pages for 'kenny anderson'.

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

  • #region in XAML

    - by kenny
    I actually don't like #region in my code. BUT for some reason call me crazy, I would like to have them in my XAML. I would like whole sections to have a #region-like thing and collapse them (e.g. my <Window.CommandBindings, <Grid.*Definitions, <Menu, <Toolbar, etc.. Does this exist? If not, how about <RegionCollapse

    Read the article

  • Word Counter Implementation

    - by kenny
    Is there a better way than the following brute foce implementation of a c# word counting class? UPDATED CODE: Sorry! /// <summary> /// A word counting class. /// </summary> public class WordCounter { Dictionary<string, int> dictTest = new Dictionary<string, int> (); /// <summary> /// Enters a word and returns the current number of times that word was found. /// </summary> /// <param name="word">The word or string found.</param> /// <returns>Count of times Found() was called with provided word.</returns> public int Found ( string word ) { int count = 1; return dictTest.TryGetValue ( word, out count ) ? ++dictTest[word] : dictTest[word] = 1; } }

    Read the article

  • Check if NSString "000001XX"is a number with intValue

    - by Kenny
    Now I am trying to add a front end check on my app to detect if user input only number in the textfield. I use: - (IBAction)checkID:(UITextField *)sender { if ([sender.text isEqualToString:@""]) { sender.text = @"This information is required"; sender.backgroundColor =[UIColor redColor]; }else if (![sender.text intValue]) { sender.text = [sender.text stringByAppendingString:@" is not valid number"]; sender.backgroundColor =[UIColor redColor]; } NSLog(@"send.text is %@, intValue is %d",sender.text,[sender.text intValue]); } But I found it text begins with number and ends with string, its intValue is still the number. In my text, text is "00001aa", but the intValue is 1. Is there any other way to filter out this "00001aa" text? Thanks in advance.

    Read the article

  • How do I create a no-javascript url hash handler for my website?

    - by Kenny Bones
    Ok, I'm not sure how this is normally done. But I've got a script that basically empties a div of content and then loads content from a div from a separate webpage, without reloading the current page. This works great. It's taken from this example actually, from net tuts (great site btw) http://nettuts.s3.amazonaws.com/011_jQuerySite/sample/index.html And the guy who wrote this even though about handling the url's since the url don't change when using his method. So he wrote a javascript snippet that looks up the url and loads the content accoringly. Which is not working btw. But I was thinking about people who don't have javascript enabled, or iPhone and iPad users ;) Copying URLs and sending to a friend won't work at all. So how is this typically done? And can it be done without javascript? Possibly by php?

    Read the article

  • Steps To Modify Popular Themes On Windows XP

    Personal computer users are familiar with the various exciting themes available with all versions of Microsoft Windows XP.In fact, almost each and every version of this hugely popular operating syste... [Author: Steffen Anderson - Computers and Internet - March 29, 2010]

    Read the article

  • Find Out Which PC Games Are Vista Compatible

    Do you know that for games, there is no other PC operating system that offers as great a variety as an operating system released by Microsoft? Therefore Windows Vista from Microsoft is no exception. ... [Author: Steffen Anderson - Computers and Internet - March 29, 2010]

    Read the article

  • Fix Your Email Problems In Simple Steps

    E-mail Fix up(http://www.onlinepc24x7.com/product.php?plan_id=p5&price=17&plan=Email%20Fixup&cur=USDℑ=emailfixup.jpg&cs=171d03aa25e2fcc64c4b3c69e42e9f94&) is a convenient way of dealing with em... [Author: Steffen Anderson - Computers and Internet - April 03, 2010]

    Read the article

  • Developing Essbase Applications de Cameron Lackpour, critique par Sébastien Roux

    Bonjour La rédaction de DVP a lu pour vous l'ouvrage suivant: Developing Essbase Applications - Advanced Techniques for Finance and IT Professionals de Dave Anderson, Joe Aultman, John Booth, Gary Crisci, Natalie Delemar, Dave Farnsworth, Michael Nader, Dan Pressman, Rob Salzmann, Tim Tow, Jake Turrell et Angela Wilcox, sous la direction de Cameron Lackpour paru aux Editions Auerbach Publications [IMG]http://images-eu.amazon.com/images/P/1466553308.01.LZZZZZZZ.jpg[/IMG] L'avez-vous lu ? Comptez-vous le lire bientô...

    Read the article

  • Google I/O 2012 - Google Compute Engine -- Technical Details

    Google I/O 2012 - Google Compute Engine -- Technical Details Joe Beda, Evan Anderson This session will provide an in depth overview of Google Compute Engine. Google Compute provides Virtual Machines optimized for large scale data processing and analytics. We will dive into the core concepts, API, unique features and architectural best practices in the context of concrete examples. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 2497 88 ratings Time: 01:01:39 More in Science & Technology

    Read the article

  • Rx Reactive extensions: Unit testing with FromAsyncPattern

    - by Andrew Anderson
    The Reactive Extensions have a sexy little hook to simplify calling async methods: var func = Observable.FromAsyncPattern<InType, OutType>( myWcfService.BeginDoStuff, myWcfService.EndDoStuff); func(inData).ObserveOnDispatcher().Subscribe(x => Foo(x)); I am using this in an WPF project, and it works great at runtime. Unfortunately, when trying to unit test methods that use this technique I am experiencing random failures. ~3 out of every five executions of a test that contain this code fails. Here is a sample test (implemented using a Rhino/unity auto-mocking container): [TestMethod()] public void SomeTest() { // arrange var container = GetAutoMockingContainer(); container.Resolve<IMyWcfServiceClient>() .Expect(x => x.BeginDoStuff(null, null, null)) .IgnoreArguments() .Do( new Func<Specification, AsyncCallback, object, IAsyncResult>((inData, asyncCallback, state) => { return new CompletedAsyncResult(asyncCallback, state); })); container.Resolve<IRepositoryServiceClient>() .Expect(x => x.EndRetrieveAttributeDefinitionsForSorting(null)) .IgnoreArguments() .Do( new Func<IAsyncResult, OutData>((ar) => { return someMockData; })); // act var target = CreateTestSubject(container); target.DoMethodThatInvokesService(); // Run the dispatcher for everything over background priority Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.Background, new Action(() => { })); // assert Assert.IsTrue(my operation ran as expected); } The problem that I see is that the code that I specified to run when the async action completed (in this case, Foo(x)), is never called. I can verify this by setting breakpoints in Foo and observing that they are never reached. Further, I can force a long delay after calling DoMethodThatInvokesService (which kicks off the async call), and the code is still never run. I do know that the lines of code invoking the Rx framework were called. Other things I've tried: I have attempted to modify the second last line according to the suggestions here: Reactive Extensions Rx - unit testing something with ObserveOnDispatcher No love. I have added .Take(1) to the Rx code as follows: func(inData).ObserveOnDispatcher().Take(1).Subscribe(x = Foo(x)); This improved my failure rate to something like 1 in 5, but they still occurred. I have rewritten the Rx code to use the plain jane Async pattern. This works, however my developer ego really would love to use Rx instead of boring old begin/end. In the end I do have a work around in hand (i.e. don't use Rx), however I feel that it is not ideal. If anyone has ran into this problem in the past and found a solution, I'd dearly love to hear it.

    Read the article

  • How to get a list of groups in an Active Directory group

    - by Douglas Anderson
    I'm trying to get a list of the groups that are in an AD group using .NET. As an example, I have a group called TestGroup and inside that group I have the group DomainAdministrators. Using the code below I can get all of the users including those from the DomainAdministrators group but not the group itself. PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "DomainName"); GroupPrincipal grp = GroupPrincipal.FindByIdentity(ctx, IdentityType.Name, "TestGroup"); ArrayList members = new ArrayList(); if (grp != null) { foreach (Principal p in grp.GetMembers(true)) { members.Add(p.Name) } } grp.Dispose(); ctx.Dispose(); Instead of GetMembers I've tried GetGroups but that doesn't return anything. How can I return the groups in the group?

    Read the article

  • API Failure Sqlite

    - by Joseph Anderson
    I ran the Windows 8 App Certification Kit on my app and it says it will fail because of Sqllite. Am I referencing code incorrectly or can I ignore this problem? Here is the response: Impact if not fixed: Using an API that is not part of the Windows SDK for Windows Store apps violates the Windows Store certification requirements. API __CppXcptFilter in msvcr110.dll is not supported for this application type. sqlite3.dll calls this API. API __clean_type_info_names_internal in msvcr110.dll is not supported for this application type. sqlite3.dll calls this API. API __crtTerminateProcess in msvcr110.dll is not supported for this application type. sqlite3.dll calls this API. API __crtUnhandledException in msvcr110.dll is not supported for this application type. sqlite3.dll calls this API. I am referencing this file: SQLite for Windows Runtime SQLite.WinRT, Version=3.7.14 C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0\ExtensionSDKs\SQLite.WinRT\3.7.14\ In my Windows 8 Metro app using XAML.

    Read the article

  • Can you access registers from python functions in vim

    - by Michael Anderson
    It seems vims python sripting is designed to edit buffer and files rather than work nicely with vims registers. You can use some of the vim packages commands to get access to the registers but its not pretty. My solution for creating a vim function using python that uses a register is something like this. function printUnnamedRegister() python >> EOF print vim.eval('@@') EOF Setting registers may also be possible using something like function setUnnamedRegsiter() python >> EOF s = "Some \"crazy\" string\nwith interesting characters" vim.command('let @@="%s"' % myescapefn(s) ) EOF However this feels a bit cumbersome and I'm not sure exactly what myescapefn should be. So I've never been able to get the setting version to work properly. So if there's a way to do something more like function printUnnamedRegister() python >> EOF print vim.getRegister('@') EOF function setUnnamedRegsiter() python >> EOF s = "Some \"crazy\" string\nwith interesting characters" vim.setRegister('@',s) EOF Or even a nice version of myescapefn I could use then that would be very handy.

    Read the article

  • Drools JEE Application

    - by Anderson
    Anyone build a JEE application using Drools?. I'm not found any example of application tha use drools, EJB, Jboss and JTA. I'm try to use drools-flow on my JEE project, and its break my project. His libraries (drools-process-task) has persitence.xml thats conflict with my persistence.xml. Help me please

    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

  • 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

  • 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

  • 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

  • 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

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