Search Results

Search found 3177 results on 128 pages for 'david murrant'.

Page 88/128 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • Alternate User select interface in django admin to reduce page size on large site?

    - by David Eyk
    I have a Django-based site with roughly 300,000 User objects. Admin pages for objects with a ForeignKey field to User take a very long time to load as the resulting form is about 6MB in size. Of course, the resulting dropdown isn't particularly useful, either. Are there any off-the-shelf replacements for handling this case? I've been googling for a snippet or a blog entry, but haven't found anything yet. I'd like to have a smaller download size and a more usable interface.

    Read the article

  • Turning on multiple result sets in an ODBC connection to SQL Server

    - by David Griffiths
    I have an application that originally needed to connect to Sybase (via ODBC), but I've needed to add the ability to connect to SQL Server as well. As ODBC should be able to handle both, I thought I was in a good position. Unfort, SQL Server will not let me, by default, nest ODBC commands and ODBCDataReaders - it complains the connection is busy. I know that I had to specify that multiple active result sets (MARS) were allowed in similar circumstances when connecting to SQL Server via a native driver, so I thought it wouldn't be an issue. The DSN wizard has no entr y when creating a SystemDSN. Some people have provided registry hacks to get around this, but this did not work (add a MARS_Connection with a value of Yes to HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\system-dsn-name). Another suggestion was to create a file-dsn, and add "MARS_Connection=YES" to that. Didn't work. Finally, a DSN-less connection string. I've tried this one (using MultipleActiveResultSets - same variable as a Sql Server connection would use), "Driver={SQL Native Client};Server=xxx.xxx.xxx.xxx;Database=someDB;Uid=u;Pwd=p;MultipleActiveResultSets=True;" and this one: "Driver={SQL Native Client};Server=192.168.75.33\\ARIA;Database=Aria;Uid=sa;Pwd=service;MARS_Connection=YES;" I have checked the various connection-string sites - they all suggest what I've already tried.

    Read the article

  • How to Override a private set property

    - by David
    Hi, Im using the Microsoft.Office.Interop.MSProject.Resource assembly which has a "UniqueID" property, it has a get but not set. How can I actually set a value? An example would be very much appreciated. --Update-- Ok I can get the value for a property "Name" and set, but Im intersted in the "UniqueId" property that does not have a public set (get only): int ii = (int)resource.GetType().InvokeMember("UniqueID", BindingFlags.GetProperty, null, resource, new object[] { }); resource.GetType().InvokeMember("UniqueID", BindingFlags.SetProperty, null, resource, new object[] {iUid,}); I get the following error {"Number of parameters specified does not match the expected number."} anyway for me to work out how many paramters it needs?

    Read the article

  • Jetspeed 2.2 Nest or render one portlet inside another

    - by David Just
    I have a requirement to build an extensible wizard in a portlet. This wizard will list components that are installed and forward the user to a sub-wizard that is component specific. The requirement is that the components are to be developed by other people and dynamically plugged into this wizard (Jetspeed reboot is okay). I would like to be able to define the components as portlets themselves who's content is rendered into the primary portlet. Has anybody ever done something like this?

    Read the article

  • What are the barriers to understanding pointers and what can be done to overcome them?

    - by David McGraw
    Why are pointers such a leading factor of confusion for many new, and even old, college level students in the C/C++ language? Are there any tools or thought processes that helped you understand how pointers work at the variable, function, and beyond level? What are some good practice things that can be done to bring somebody to the level of, "Ah-hah, I got it," without getting them bogged down in the overall concept? Basically, drill like scenarios.

    Read the article

  • ActionScript: Determine wether superclass implements a particular interface?

    - by David Wolever
    Is there any non-hacky way to determine wether a class' superclass implements a particular interface? For example, assume I've got: class A extends EventDispatcher implements StuffHolder { private var myStuff = someKindOfStuff; public function getStuff():Array { if (super is StuffHolder) // <<< this doesn't work return super['getStuff']().concat([myStuf]); return [myStuff]; } class B extends A { private var myStuff = anotherKindOfStuff; } How could I perform that super is StuffHolder test in a way that, well, works? In this case, it always returns true.

    Read the article

  • Is there a way to animate on a Home Widget?

    - by David
    Hi All, I want to use an animation on a Home page Widget, i.e. an AppWidgetProvider. I was hoping to use the "Frame Animation" technique: http://developer.android.com/guide/topics/graphics/2d-graphics.html#frame-animation which I've used successfully in an activity. But I can't translate that code to an AppWidgetProvider. Basically, in an AppWidgetProvider, I create and work with a RemoteViews object, which AFAIK doesn't provide me with a method to get a reference to an ImageView in the layout for me to call start() on the animation. There is also not a handler or a callback for when the widget displays so I can make the start() call. Is there another way this can be done? I suppose that I can probably do the animation on my own with very fast onUpdate() calls on the widget, but that seems awfully expensive.

    Read the article

  • Recursion with Func

    - by David in Dakota
    Is it possible to do recursion with an Func delegate? I have the following, which doesn't compile because the name of the Func isn't in scope... Func<long, long, List<long>, IEnumerable<long>> GeneratePrimesRecursively = (number, upperBound, primeFactors) => { if (upperBound > number) { return new List<long>(); } else { if (!primeFactors.Any(factor => number % factor == 0)) primeFactors.Add(number); return GeneratePrimesRecursively(++number, upperBound, primeFactors); // breaks here. } };

    Read the article

  • Git using wrong email address when talking to Heroku

    - by David
    git clone [email protected]:myapp.git Results in a "myoldemailaddress not authorized to access myapp" myoldemailaddress was an email address I was using on an old heroku account, but it seems to be stuck using it, I can use my new one. I've removed the .heroku directory, and regenerated it, it has the correct user name and password, I can see my apps listed I've uploaded my key (I've regenerated my several times now) ssh-keygen -t rsa -C mynewaddress I uninstalled and reinstalled heroku on a different user in the same machine it works just fine. Something about my account has my old address, but I can't figure out where.

    Read the article

  • How can I differentiate a manual scroll (via mousewheel/scrollbar) from a Javascript/jQuery scroll?

    - by David Murdoch
    UPDATE: Here is a jsbin example demonstrating the problem. Basically, I have the following javascript which scrolls the window to an anchor on the page: // get anchors with href's that start with "#" $("a[href^=#]").live("click", function(){ var target = $($(this).attr("href")); // if the target exists: scroll to it... if(target[0]){ // If the page isn't long enough to scroll to the target's position // we want to scroll as much as we can. This part prevents a sudden // stop when window.scrollTop reaches its maximum. var y = Math.min(target.offset().top, $(document).height() - $(window).height()); // also, don't try to scroll to a negative value... y=Math.max(y,0); // OK, you can scroll now... $("html,body").stop().animate({ "scrollTop": y }, 1000); } return false; }); It works perfectly......until I manually try to scroll the window. When the scrollbar or mousewheel is scrolled I need to stop the current scroll animation...but I'm not sure how to do this. This is probably my starting point... $(window).scroll(e){ if(IsManuallyScrolled(e)){ $("html,body").stop(); } } ...but I'm not sure how to code the IsManuallyScrolled function. I've checked out e (the event object) in Google Chrome's console and AFAIK there is not way to differentiate between a manual scroll and jQuery's animate() scroll. How can I differentiate between a manual scroll and one called via jQuery's $.fn.animate function?

    Read the article

  • Did I implement clock drift properly?

    - by David Titarenco
    I couldn't find any clock drift RNG code for Windows anywhere so I attempted to implement it myself. I haven't run the numbers through ent or DIEHARD yet, and I'm just wondering if this is even remotely correct... void QueryRDTSC(__int64* tick) { __asm { xor eax, eax cpuid rdtsc mov edi, dword ptr tick mov dword ptr [edi], eax mov dword ptr [edi+4], edx } } __int64 clockDriftRNG() { __int64 CPU_start, CPU_end, OS_start, OS_end; // get CPU ticks -- uses RDTSC on the Processor QueryRDTSC(&CPU_start); Sleep(1); QueryRDTSC(&CPU_end); // get OS ticks -- uses the Motherboard clock QueryPerformanceCounter((LARGE_INTEGER*)&OS_start); Sleep(1); QueryPerformanceCounter((LARGE_INTEGER*)&OS_end); // CPU clock is ~1000x faster than mobo clock // return raw return ((CPU_end - CPU_start)/(OS_end - OS_start)); // or // return a random number from 0 to 9 // return ((CPU_end - CPU_start)/(OS_end - OS_start)%10); } If you're wondering why I Sleep(1), it's because if I don't, OS_end - OS_start returns 0 consistently (because of the bad timer resolution, I presume). Basically, (CPU_end - CPU_start)/(OS_end - OS_start) always returns around 1000 with a slight variation based on the entropy of CPU load, maybe temperature, quartz crystal vibration imperfections, etc. Anyway, the numbers have a pretty decent distribution, but this could be totally wrong. I have no idea.

    Read the article

  • Cucumber : Size of features

    - by David Lyod
    Im new to testing with cucumber and have a question regarding the size of a 'Feature'. Assume you can add a collection of items to a list and do the usual CRUD , is it preferred to create one feature for this complete set of CRUD actions or a feature for each? What is the preferred/accepted method ? At what point does an action become a feature itself ?

    Read the article

  • Aldon and .Net Development

    - by David Stratton
    I'm looking for feedback from .Net developers who have experience with Aldon as a lifecycle management platform. We're seriously considering using Aldon for lifecycle management including source control, automated builds, etc. I know there are a lot of other options out there, but ours is primary an AS/400 shop (with AS/400 programmers outnumbering .Net developers 6 to 1), and Aldon is used already by our iSeries team. The benefit we're looking for is having one lifecycle management suite. Basically, I'm looking for opinions from people who have used Aldon and another set of tools (perhaps TFS, or a combination of SVN, Cruise Control, etc). If you've worked with both, do you have a recommendation on whether this is a good idea, or a bad idea? It's obviously a big choice, so any feedback would be helpful.

    Read the article

  • Is there a Firebug -vsdoc?

    - by David Murdoch
    If not, does anyone care to write one? I would do it myself...but I don't have time right now...maybe next week (unless someone beats me to it). If you are bored and want to compile the vsdoc: Here is the Firebug API. Here is an example vsdoc (jquery-1.4.1-vsdoc.js). I create the following because I kept typing cosnole instead of console. You can use it as a starting point (ish). console = { /// <summary> /// 1: The javascript console /// </summary> /// <returns type="Object" /> }; console.log = function (object) { /// <summary> /// Write to the console's log /// </summary> /// <returns type="null" /> /// <param name="object" type="Object"> /// Write the object to the console's log /// </param> };

    Read the article

  • Facebook Like Button (<fb:like>) Height Always 80px

    - by David
    Why is the height of my Facebook Like button (technically the iframe that gets generated) always getting set to 80px? Example page is here: http://www.davidkasper.net/test.html I am using the javascript sdk and have had it work on other pages but for some reason the height will not change dynamically on this one! I can even do something like <fb:like style="height:40px"> and that will indeed set the visible height, but the iframe will still be 80px, whereas I can see it changing in the demo at http://developers.facebook.com/docs/reference/plugins/like

    Read the article

  • Making the #include square

    - by David
    I'm trying to write a makefile using CC on Solaris 10. [Only the first bit of that really matters, I think]. I have the following rule for foo.o: foo.o: foo.cc common_dependencies.h CC -c foo.cc -I../../common Unfortunately, common_dependencies.h includes all sorts of idiosyncratic trash, in directories not named '.' or '../../common' . Is this just going to have to be a brute force makefile where I ferret out all of the dependency paths? All of the dependencies are somewhere under '../..', but sometimes 1-level down and sometimes 2-levels down.

    Read the article

  • StructureMap - Injecting a dependency into a base class?

    - by David
    In my domain I have a handful of "processor" classes which hold the bulk of the business logic. Using StructureMap with default conventions, I inject repositories into those classes for their various IO (databases, file system, etc.). For example: public interface IHelloWorldProcessor { string HelloWorld(); } public class HelloWorldProcessor : IHelloWorldProcessor { private IDBRepository _dbRepository; public HelloWorldProcessor(IDBRepository dbRepository) { _dbRepository = dbrepository; } public string HelloWorld(){ return _dbRepository.GetHelloWorld(); } } Now, there are some repositories that I'd like to be available to all processors, so I made a base class like this: public class BaseProcessor { protected ICommonRepository _commonRepository; public BaseProcessor(ICommonRepository commonRepository) { _commonRepository = commonRepository; } } But when my other processors inherit from it, I get a compiler error on each one saying that there's no constructor for BaseProcessor which takes zero arguments. Is there a way to do what I'm trying to do here? That is, to have common dependencies injected into a base class that my other classes can use without having to write the injections into each one?

    Read the article

  • Doing without partial commits the "Mercurial way"

    - by David Moles
    Subversion shop considering switching to Mercurial, trying to figure out in advance what all the complaints from developers are going to be. There's one fairly common use case here that I can't see how to handle. I'm working on some largish feature, and I have a significant part of the code -- or possibly several significant parts of the code -- in pieces all over the garage floor, totally unsuitable for checkin, maybe not even compiling. An urgent bugfix request comes in. The fix is nice and local and doesn't touch any of the code I've been working on. I make the fix in my working copy. Now what? I've looked at "Mercurial cherry picking changes for commit" and "best practices in mercurial: branch vs. clone, and partial merges?" and all the suggestions seem to be extensions of varying complexity, from Record and Shelve to Queues. The fact that there apparently isn't any core functionality for this makes me suspect that in some sense this working style is Doing It Wrong. What would a Mercurial-like solution to this use case look like?

    Read the article

  • Mysql SQL join question

    - by David
    I am trying to find all deals information along with how many comments they have received. My query select deals.*, count(comments.comments_id) as counts from deals left join comments on comments.deal_id=deals.deal_id where cancelled='N' But now it only shows the deals that have at least one comment. What is the problem?

    Read the article

  • Android - Custom Widget doesnt update

    - by david
    Hi, I'm trying to make a widget to my app, but it doesnt update. I just need to change the textview text and open an activity when a press a button, but none of them works... the code public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.newswidget); views.setTextViewText(R.id.tvNews, "prueba1"); views.setString(R.id.tvNews, "setText", "prueba3"); Intent intent = new Intent(context, DoctorChatAndroid.class); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.ibNext, pendingIntent); for (int i = 0; i < appWidgetIds.length; i++) { appWidgetManager.updateAppWidget(i, views); } the layout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <ImageButton android:id="@+id/ibNext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@android:drawable/ic_media_ff" android:layout_alignParentRight="true"/> <ImageButton android:id="@+id/ibLast" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@android:drawable/ic_media_rew" android:layout_toLeftOf="@id/ibNext"/> <TextView android:id="@+id/tvNews" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/nwNoNewAnswer" android:layout_toLeftOf="@id/ibLast"/> </RelativeLayout> the other xml thx a lot!!!

    Read the article

  • Are there algorithms for increasing resolution of an image?

    - by David
    Are there any algorithms or tools that can increase the resolution of an image - besides just a simple zoom that makes each individual pixel in the image a little larger? I realize that such an algorithm would have to invent pixels that don't really exist in the original image, but I figured there might be some algorithm that could intelligently figure out what pixels to add to the image to increase its resolution.

    Read the article

  • How do I read an HttpResponse in ASP.NET 2.0?

    - by David
    For example, I have an ASP.NET form that is called by another aspx: string url = "http://somewhere.com?P1=" + Request["param"]; Response.Write(url); I want to do something like this: string url = "http://somewhere.com?P1=" + Request["param"]; string str = GetResponse(url); if (str...) {} I need to get whatever Response.Write is getting as a result or going to url, manipulate that response, and send something else back. Any help or a point in the right direction would be greatly appreciated.

    Read the article

  • Convert Google Analytics cookies to Local/Session Storage

    - by David Murdoch
    Google Analytics sets 4 cookies that will be sent with all requests to that domain (and ofset its subdomains). From what I can tell no server actually uses them directly; they're only sent with __utm.gif as a query param. Now, obviously Google Analytics reads, writes and acts on their values and they will need to be available to the GA tracking script. So, what I am wondering is if it is possible to: rewrite the __utm* cookies to local storage after ga.js has written them delete them after ga.js has run rewrite the cookies FROM local storage back to cookie form right before ga.js reads them start over Or, monkey patch ga.js to use local storage before it begins the cookie read/write part. Obviously if we are going so far out of the way to remove the __utm* cookies we'll want to also use the Async variant of Analytics. I'm guessing the down vote was because I didn't ask a question. DOH! My questions are: Can it be done as described above? If so, why hasn't it been done? I have a default HTML/CSS/JS boilerplate template that passes YSlow, PageSpeed, and Chrome's Audit with near perfect scores. I'm really looking for a way to squeeze those remaining cookie bytes from Google Analytics in browsers that support local storage.

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >