half (276)


cuda - How well do common programming tasks translate to GPUs?

I have recently begun working on a project to establish how best to leverage the processing power available in modern graphics cards for general programming. It seems that the field general purpose G…


How can I display just a portion of an image in HTML/CSS?

Let's say I want a way to display just the the center 50x50px of an image that's 250x250px in HTML. How can I do that. Also, is there a way to do this for css:url() references? I'm aware of clip in C…


graphics - Bezier clipping

I'm trying to find/make an algorithm to compute the intersection(a new filled object) of two arbitrary filled 2D objects. The objects are defined using either lines or cubic beziers and may have hol…


java - Why is it impossible, without attempting I/O, to detect that TCP socket was gracefully closed by peer?

As a follow up to a recent question, I wonder why it is impossible in Java, without attempting reading/writing on a TCP socket, to detect that the socket has been gracefully closed by the peer? This s…


Multiple mouse pointers?

Is there a way to accept input from more than one mouse separately? I'm interested in making a multi-user application and I thought it would be great if I could have 2 or more users holding wireless…


iphone - How can I change the animation style of a modal UIViewController?

I'm currently displaying a UIViewController like this:[[self navigationController] presentModalViewController:modalViewController animated:YES]; and hiding it like this:[self.navigationController d…


How can I set cron to run certain commands every one and a half hours?

How can I set cron to run certain commands every one and a half hours?…


c# - Split List into Sublists with LINQ

Is there any way I can separate a List<SomeObject> into several separate lists of SomeObject, using the item index as the delimiter of each split? Let me exemplify: I have a List<SomeObject> and I nee…



c# - Split a collection into `n` parts with LINQ?

Is there a nice way to split a collection into n parts with LINQ? Not necessarily evenly of course. That is, I want to divide the collection into sub-collections, which each contains a subset of the e…


calculate exponential moving average in python

I have a range of dates and a measurement on each of those dates. I'd like to calculate an exponential moving average for each of the dates. Does anybody know how to do this? I'm new to python. It…




how split css into size circle example with parent swift