Search Results

Search found 370 results on 15 pages for 'billy ninja'.

Page 9/15 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Anything like VisualSVN Server for Mercurial?

    - by Billy ONeal
    VisualSVN server is a nice piece of software; particularly in that it uses the builtin Windows authentication mechanism on my server. I'd like to try to start using Mercurial though, and I'd like to keep the Windows authentication scheme. Is there some way to set this kind of thing up using the tools available on Windows Server 2008 R2 Standard (in particular, IIS 7)?

    Read the article

  • Newbie: Render RGB to GTK widget -- howto?

    - by Billy Pilgrim
    Hi All, Big picture: I want to render an RGB image via GTK on a linux box. I'm a frustrated GTK newbie, so please forgive me. I assume that I should create a Drawable_area in which to render the image -- correct? Do I then have to create a graphics context attached to that area? How? my simple app (which doesn't even address the rgb issue yet is this: int main(int argc, char** argv) { GdkGC * gc = NULL; GtkWidget * window = NULL; GtkDrawingArea * dpage = NULL; GtkWidget * page = NULL; gtk_init( &argc, & argv ); window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); page = gtk_drawing_area_new( ); dpage = GTK_DRAWING_AREA( page ); gtk_widget_set_size_request( page, PAGE_WIDTH, PAGE_HEIGHT ); gc = gdk_gc_new( GTK_DRAWABLE( dpage ) ); gtk_widget_show( window ); gtk_main(); return (EXIT_SUCCESS); } my dpage is apparently not a 'drawable' (though it is a drawing area). I am confused as to a) how do I get/create the graphics context which is required in subsequent function calls? b) am I close to a solution, or am I so completely *#&@& wrong that there is no hope c) a baby steps tutorial. (I started with hello world as my base, so I got that far). any and all help appreciated. bp

    Read the article

  • How to implement image map type interface for a game board in Java 6

    - by Billy
    My group project at school is to implement a style of monopoly in which students can buy courses and land on various squares and move around the board. This is not a regular square board so we were wondering if anyone had any ideas on how we would implement an image map or something like it to create many clickable regions not in a perfect square. I have attached the image of the game board. Just a way to start is needed, not lots of code or anything as we all know java pretty well. If anyone has any ideas that would be great. Image of board is here. http://imgur.com/fH5WC.png

    Read the article

  • Why are functional languages considered a boon for multi threaded environments?

    - by Billy ONeal
    I hear a lot about functional languages, and how they scale well because there is no state around a function; and therefore that function can be massively parallelized. However, this makes little sense to me because almost all real-world practical programs need/have state to take care of. I also find it interesting that most major scaling libraries, i.e. MapReduce, are typically written in imperative languages like C or C++. I'd like to hear from the functional camp where this hype I'm hearing is coming from....

    Read the article

  • Different actions on multiple Keydown event

    - by Billy Mitchell
    Okay, so my question (im hoping) is fairly simple. I want to know what to do so that I can create different events for the same keycode. For instance Id like to fade out a div and fade a new one in on the first keypress, then fade that one out and fade a new one in on keypress. Thanks! $(document).keydown(function() { if (event.keyCode == '40') { $('.div-1').fadeOut("slow") $('.div-2').fadeIn("slow") // I'd like this event to occur on the Second keydown $('.div-2').fadeOut("slow") $('.div-3').fadeIn("slow") } });

    Read the article

  • are the A+ and MCSE courses worthwhile

    - by billy
    I'm new to this field and would like to acquire the knowledge necessary to work for myself, troubleshooting, repairs, setting up and maintaining networks for small businesses etc. Are the A+ and MCSE courses worth doing? I'm more interested in knowledge than certificates.

    Read the article

  • How can I make email template in Zend Framework?

    - by Billy
    I want to make email templates in Zend Framework. For example, <html> <body> Dear {$username$}, <br> This is a invitation email sent by your {$friend$}.<br> Regards,<br> Admin </body> </html> I want to make this file, get it in Zend framework, set those parameters (username, friend) and then send the email. How can I do that? Does Zend support this?

    Read the article

  • How might one implement FileTimeToSystemTime?

    - by Billy ONeal
    Hello :) I'm writing a simple wrapper around the Win32 FILETIME structure. boost::datetime has most of what I want, except I need whatever date type I end up using to interpolate with Windows APIs without issues. To that end, I've decided to write my own things for doing this -- most of the operations aren't all that complicated. I'm implementing the TimeSpan - like type at this point, but I'm unsure how I'd implement FileTimeToSystemTime. I could just use the system's built-in FileTimeToSystemTime function, except FileTimeToSystemTime cannot handle negative dates -- I need to be able to represent something like "-12 seconds". How should something like this be implemented? Billy3

    Read the article

  • How does one gets started with Winforms style applications on Win32?

    - by Billy ONeal
    EDIT: I'm extremely tired and frustrated at the moment -- please ignore that bit in this question -- I'll edit it in the morning to be better. Okay -- a bit of background: I'm a C++ programmer mostly, but the only GUI stuff I've ever done was on top of .NET's WinForms platform. I'm completely new to Windows GUI programming, and despite Petzold's excellent book, I'm extremely confused. Namely, it seems that most every reference on getting started with Win32 is all about drawing lines and curves and things -- a topic about which (at least at present time) I couldn't care less. I need a checked list box, a splitter, and a textbox -- something that would take less than 10 minutes to do in Winforms land. It has been recommended to me to use the WTL library, which provides an implementation of all three of these controls -- but I keep getting hung up on simple things, such as getting the damn controls to use the right font, and getting High DPI working correctly. I've spent two freaking days on this, and I can't help but think there has to be a better reference for these kinds of things than I've been able to find. Petzold's book is good, but it hasn't been updated since Windows 95 days, and there's been a LOT changed w.r.t. how applications should be correctly developed since it was published. I guess what I'm looking for is a modern Petzold book. Where can I find such a resource, if any?

    Read the article

  • Function for averages of tuples in a dictionary

    - by Billy Mann
    I have a string, dictionary in the form: ('the head', {'exploded': (3.5, 1.0), 'the': (5.0, 1.0), "puppy's": (9.0, 1.0), 'head': (6.0, 1.0)}) Each parentheses is a tuple which corresponds to (score, standard deviation). I'm taking the average of just the first integer in each tuple. I've tried this: def score(string, d): for word in d: (score, std) = d[word] d[word]=float(score),float(std) if word in string: word = string.lower() number = len(string) return sum([v[0] for v in d.values()]) / float(len(d)) if len(string) == 0: return 0 When I run: print score('the head', {'exploded': (3.5, 1.0), 'the': (5.0, 1.0), "puppy's": (9.0, 1.0), 'head': (6.0, 1.0)}) I should get 5.5 but instead I'm getting 5.875. Can't figure out what in my function is not allowing me to get the correct answer.

    Read the article

  • How can one check for a binary in the GAC in a WiX installer?

    - by Billy ONeal
    I have an application which depends on the Team Foundation Server "Object Model", and looks for such binaries in the GAC. This means that clients of the app need to install Visual Studio, or the standalone TFS object model in order to use the application. I would like the installer to detect that the TFS bits aren't installed, and fail to install appropriately if they are not. Is such a thing possible?

    Read the article

  • Is there a library available which easily can record and replay results of API calls?

    - by Billy ONeal
    I'm working on writing various things that call relatively complicated Win32 API functions. Here's an example: //Encapsulates calling NtQuerySystemInformation buffer management. WindowsApi::AutoArray NtDll::NtQuerySystemInformation( SystemInformationClass toGet ) const { AutoArray result; ULONG allocationSize = 1024; ULONG previousSize; NTSTATUS errorCheck; do { previousSize = allocationSize; result.Allocate(allocationSize); errorCheck = WinQuerySystemInformation(toGet, result.GetAs<void>(), allocationSize, &allocationSize); if (allocationSize <= previousSize) allocationSize = previousSize * 2; } while (errorCheck == 0xC0000004L); if (errorCheck != 0) { THROW_MANUAL_WINDOWS_ERROR(WinRtlNtStatusToDosError(errorCheck)); } return result; } //Client of the above. ProcessSnapshot::ProcessSnapshot() { using Dll::NtDll; NtDll ntdll; AutoArray systemInfoBuffer = ntdll.NtQuerySystemInformation( NtDll::SystemProcessInformation); BYTE * currentPtr = systemInfoBuffer.GetAs<BYTE>(); //Loop through the results, creating Process objects. SYSTEM_PROCESSES * asSysInfo; do { // Loop book keeping asSysInfo = reinterpret_cast<SYSTEM_PROCESSES *>(currentPtr); currentPtr += asSysInfo->NextEntryDelta; //Create the process for the current iteration and fill it with data. std::auto_ptr<ProcImpl> currentProc(ProcFactory( static_cast<unsigned __int32>(asSysInfo->ProcessId), this)); NormalProcess* nptr = dynamic_cast<NormalProcess*>(currentProc.get()); if (nptr) { nptr->SetProcessName(asSysInfo->ProcessName); } // Populate process threads for(ULONG idx = 0; idx < asSysInfo->ThreadCount; ++idx) { SYSTEM_THREADS& sysThread = asSysInfo->Threads[idx]; Thread thread( currentProc.get(), static_cast<unsigned __int32>(sysThread.ClientId.UniqueThread), sysThread.StartAddress); currentProc->AddThread(thread); } processes.push_back(currentProc); } while(asSysInfo->NextEntryDelta != 0); } My problem is in mocking out the NtDll::NtQuerySystemInformation method -- namely, that the data structure returned is complicated (Well, here it's actually relatively simple but it can be complicated), and writing a test which builds the data structure like the API call does can take 5-6 times as long as writing the code that uses the API. What I'd like to do is take a call to the API, and record it somehow, so that I can return that recorded value to the code under test without actually calling the API. The returned structures cannot simply be memcpy'd, because they often contain inner pointers (pointers to other locations in the same buffer). The library in question would need to check for these kinds of things, and be able to restore pointer values to a similar buffer upon replay. (i.e. check each pointer sized value if it could be interpreted as a pointer within the buffer, change that to an offset, and remember to change it back to a pointer on replay -- a false positive rate here is acceptable) Is there anything out there that does anything like this?

    Read the article

  • Can I have code that executes before and after tests are run by NUnit?

    - by Billy ONeal
    I've got a bunch of tests in NUnit which create garbage data on the filesystem (bad, I know, but I have little control over this). Currently we have a cleanup tool that removes these temporaries and such, but I'd like to be able to run that cleanup tool automatically. I'd have to be able to run it after all tests have finished running. I have similar checking that I'd like to do at the beginning, to ensure that there are none of these temporaries left from previous runs that might change the outcome of the tests. Is such a thing simple or am I going to have to implement a whole new test runner for such a thing?

    Read the article

  • Can I write a test that succeeds if and only if a statement does not compile?

    - by Billy ONeal
    I'd like to prevent clients of my class from doing something stupid. To that end, I have used the type system, and made my class only accept specific types as input. Consider the following example (Not real code, I've left off things like virtual destructors for the sake of example): class MyDataChunk { //Look Ma! Implementation! }; class Sink; class Source { virtual void Run() = 0; Sink *next_; void SetNext(Sink *next) { next_ = next; } }; class Sink { virtual void GiveMeAChunk(const MyDataChunk& data) { //Impl }; }; class In { virtual void Run { //Impl } }; class Out { }; //Note how filter and sorter have the same declaration. Concrete classes //will inherit from them. The seperate names are there to ensure only //that some idiot doesn't go in and put in a filter where someone expects //a sorter, etc. class Filter : public Source, public Sink { //Drop objects from the chain-of-command pattern that don't match a particular //criterion. }; class Sorter : public Source, public Sink { //Sorts inputs to outputs. There are different sorters because someone might //want to sort by filename, size, date, etc... }; class MyClass { In i; Out o; Filter f; Sorter s; public: //Functions to set i, o, f, and s void Execute() { i.SetNext(f); f.SetNext(s); s.SetNext(o); i.Run(); } }; What I don't want is for somebody to come back later and go, "Hey, look! Sorter and Filter have the same signature. I can make a common one that does both!", thus breaking the semantic difference MyClass requires. Is this a common kind of requirement, and if so, how might I implement a test for it?

    Read the article

  • How to handle images folder with many images

    - by Billy
    I'm developing a new aspnet website with 200k images in a /Images/ -folder. Many operations in Visual Studio is slow because it access the folder, adding a web service takes 10 minutes. The images is not checked into scm (svn). How should I structure the tree of code, to improve performance in VS? It would also be neat if not all developers needed to copy 200k images to their local disk to be able to develop on the site. Images as DB blobs is not an option.

    Read the article

  • Rails + simple role system through associative table

    - by user202411
    So I have the Ninja model which has many Hovercrafts through ninja_hovercrafts (which stores the ninja_id and the hovercraft_id). It is of my understanding that this kind of arrangement should be set in a way that the associative table stores only enough information to bind two different classes. But I'd like to use the associative table to work as a very streamlined authorization hub on my application. So i'd also like this table to inform my system if this binding makes the ninja the pilot or co-pilot of a given hovercraft, through a "role" field in the table. My questions are: Is this ugly? Is this normal? Are there methods built into rails that would help me to automagically create Ninjas and Hovercrafts associations WITH the role? For exemple, could I have a nested form to create both ninjas and hcs in a way that the role field in ninjas_hovercrafts would be also filled? If managing my application roles this way isn't a good idea, whats the non-resource heavy alternative (my app is being designed trying to avoid scalability problems such as excessive joins, includes, etc) thank you

    Read the article

  • How can I (is there a way to) convert an HRESULT into a system specific error message?

    - by Billy ONeal
    According to this, there's no way to convert a HRESULT error code into a Win32 error code. Therefore (at least to my understanding), my use of FormatMessage in order to generate error messages (i.e. std::wstring Exception::GetWideMessage() const { using std::tr1::shared_ptr; shared_ptr<void> buff; LPWSTR buffPtr; DWORD bufferLength = FormatMessageW( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetErrorCode(), 0, reinterpret_cast<LPWSTR>(&buffPtr), 0, NULL); buff.reset(buffPtr, LocalFreeHelper()); return std::wstring(buffPtr, bufferLength); } ) does not work for HRESULTs. How do I generate these kinds of system-specific error strings for HRESULTs?

    Read the article

  • Asp.net mvc class reference in session

    - by Billy
    Hi, if I put a custom class in session, then in an action method I get an instance of that class from session, and populate some fields, I noticed that when a different controller gets that class from session, those fields are populated. Even though after the first call didn't save the updated class back in session. is this typical behavior for session objects? I thought I had to use keyword 'static' on the class in session for this to happen thanks

    Read the article

  • How can I prevent infinite recursion when using events to bind UI elements to fields?

    - by Billy ONeal
    The following seems to be a relatively common pattern (to me, not to the community at large) to bind a string variable to the contents of a TextBox. class MyBackEndClass { public event EventHandler DataChanged; string _Data; public string Data { get { return _Data; } set { _Data = value; //Fire the DataChanged event } } } class SomeForm : // Form stuff { MyBackEndClass mbe; TextBox someTextBox; SomeForm() { someTextBox.TextChanged += HandleTextBox(); mbe.DataChanged += HandleData(); } void HandleTextBox(Object sender, EventArgs e) { mbe.Data = ((TextBox)sender).Text; } void HandleData(Object sender, EventArgs e) { someTextBox.Text = ((MyBackEndClass) sender).Data; } } The problem is that changing the TextBox fires the changes the data value in the backend, which causes the textbox to change, etc. That runs forever. Is there a better design pattern (other than resorting to a nasty boolean flag) that handles this case correctly? EDIT: To be clear, in the real design the backend class is used to synchronize changes between multiple forms. Therefore I can't just use the SomeTextBox.Text property directly. Billy3

    Read the article

  • What, *specifically*, makes DataMapper more flexible than ActiveRecord?

    - by Billy ONeal
    I'm comparing Doctrine 2 and Propel 1.5/1.6, and I'm looking in to some of the patterns they use. Doctrine uses the DataMapper pattern, while Propel uses the ActiveRecord pattern. While I can see that DataMapper is considerably more complicated, I'd assume some design flexibility comes from this complication. So far, the only legitimate reason I've found to use DataMapper over ActiveRecord is that DataMapper is better in terms of the single responsibility principle -- because the database rows are not the actual objects being persisted, but with Propel that doesn't really concern me because it's generated code anyway. So -- what makes DataMapper more flexible?

    Read the article

  • What's the best way to return something like a collection of `std::auto_ptr`s in C++03?

    - by Billy ONeal
    std::auto_ptr is not allowed to be stored in an STL container, such as std::vector. However, occasionally there are cases where I need to return a collection of polymorphic objects, and therefore I can't return a vector of objects (due to the slicing problem). I can use std::tr1::shared_ptr and stick those in the vector, but then I have to pay a high price of maintaining separate reference counts, and object that owns the actual memory (the container) no longer logically "owns" the objects because they can be copied out of it without regard to ownership. C++0x offers a perfect solution to this problem in the form of std::vector<std::unique_ptr<t>>, but I don't have access to C++0x. Some other notes: I don't have access to C++0x, but I do have TR1 available. I would like to avoid use of Boost (though it is available if there is no other option) I am aware of boost::ptr_container containers (i.e. boost::ptr_vector), but I would like to avoid this because it breaks the debugger (innards are stored in void *s which means it's difficult to view the object actually stored inside the container in the debugger)

    Read the article

  • clever way to conditionally split this string?

    - by sprugman
    I've got a string that could be in one of two forms: prefix=key=value (which could have any characters, including '=') or key=value So I need to split it either on the first or second equals sign, based on a boolean that gets set elsewhere. I'm doing this: if ($split_on_second) { $parts = explode('=', $str, 3); $key = $parts[0] . '=' . $parts[1]; $val = $parts[2]; } else { $parts = explode('=', $str, 2); $key = $parts[0]; $val = $parts[1]; } Which should work, but feels inelegant. Got any better ideas in php? (I imagine there's a regex-ninja way to do it, but I'm not a regex-ninja.;-)

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15  | Next Page >