Search Results

Search found 10 results on 1 pages for 'splicer'.

Page 1/1 | 1 

  • strange behaviour - dhclient needs to be run twice in order to connect to wireless

    - by splicer
    I am trying to connect my to my wlan without the use of NetworkManager. I run the following commands after boot: iwconfig wlan0 enc <WEP passwd> mode managed essid <name> channel 6 ifconfig wlan0 up dhclient wlan0 At this point, dhclient stalls for ages (perhaps 2 minutes), then it returns with PING 192.168.1.254 (192.168.1.254) from 192.168.1.65 wlan0: 56(84) bytes of data. --- 192.168.1.254 ping statistics --- 3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3000ms pipe 3 .. The strange thing is that when I run pkill dhclient; dhclient wlan0 right after this, it connects in about <3 seconds. Any idea what could be the cause of this problem? Edit: oh, and I did try using the -timeout flag on dhclient but that didn't seem to make any difference (it still stalled for ages).

    Read the article

  • Cornerstone vs Versions for Mac OS X

    - by splicer
    I've been using svn on the command line for 5+ years, but I'm thinking of switching to GUI. The two kings of Mac subversion apps seem to be Versions and Cornerstone. Most of the reviews/comments I've seen comparing the two are from way back in 2008, when Cornerstone was first released. It's now 2010, and both apps have undergone significant changes. I've been running trial copies of both apps for the past week, and I still can't make up my mind. Which would you recommend and why?

    Read the article

  • How do I use local memory in OpenCL?

    - by splicer
    I've been playing with OpenCL recently, and I'm able to write simple kernels that use only global memory. Now I'd like to start using local memory, but I can't seem to figure out how to use get_local_size() and get_local_id() to compute one "chunk" of output at a time. For example, let's say I wanted to convert Apple's OpenCL Hello World example kernel to something the uses local memory. How would you do it? Here's the original kernel source: __kernel square( __global float *input, __global float *output, const unsigned int count) { int i = get_global_id(0); if (i < count) output[i] = input[i] * input[i]; } If this example can't easily be converted into something that shows how to make use of local memory, any other simple example will do. Thanks!

    Read the article

  • Compiler warning when passing NSError ** as a method parameter

    - by splicer
    I've been scratching my head about this for the last 4 hours, trying out all kinds of little experiments, but I can't seem to figure out what's going wrong. Could this be a compiler bug? Test.m: - (id)initWithContentsOfURL:(NSURL *)aURL error:(NSError **)error { if (!(self = [super init])) { return nil; } return self; } main.m: NSError *error; Test *t = [[Test alloc] initWithContentsOfURL:[NSURL fileURLWithPath:@"/"] error:&error]; Here's the compiler warning (from main.m): warning: incompatible Objective-C types 'struct NSError **', expected 'struct NSDictionary **' when passing argument 2 of 'initWithContentsOfURL:error:' from distinct Objective-C type I'm using the latest versions of Xcode and Snow Leopard.

    Read the article

  • How would you build a "pixel perfect" GUI on Linux?

    - by splicer
    I'd like build a GUI where every single pixel is under my control (i.e. not using the standard widgets that something like GTK+ provides). Renoise is a good example of what I'm looking to produce. Is getting down to the Xlib or XCB level the best way to go, or is it possible to achieve this with higher level frameworks like GTK+ (maybe even PyGTK)? Should I be looking at Cairo for the drawing? I'd like to work in Python or Ruby if possible, but C is fine too. Thanks!

    Read the article

  • Legality Of Re-Implementing An Existing API (e.g. GNU implementing the UNIX APIs)

    - by splicer
    I've often wondered about this. I'm not looking for legal advice, just casual opinions ;) If some company publishes an API on the web for their closed-source library, would it be legal for another party to release an open-source implementation of that API? Are function declarations considered source code? Take GNU implementing the UNIX APIs, for example. The UNIX standard gives the following function declaration and defines its required behaviour in English: char * mktemp(char *template); Now, consider an API that lists and declares and describes several thousand (more much complex) functions, enums, etc.; an API which defines a solution to a non-trival set of problems. If an open-source project publishes C headers that copy (verbatim) the function definitions contained in the closed-source company's published API, doesn't that violate some sort copyright law?

    Read the article

  • Can't delete a file created by mkstemp() on Mac OS X

    - by splicer
    Apparently, NSFileManager is unable to delete files created by mkstemp(). Here's some test code to demonstrate this: char pathCString[] = "/tmp/temp.XXXXXX"; int fileDescriptor = mkstemp(pathCString); if (fileDescriptor == -1) { NSLog(@"mkstemp failed"); } else { close(fileDescriptor); NSURL *url = [NSURL URLWithString:[NSString stringWithCString:pathCString encoding:NSASCIIStringEncoding]]; NSLog(@"URL: %@", url); NSError *error; if (![[NSFileManager defaultManager] removeItemAtURL:url error:&error]) { NSLog(@"could not delete file: %@", error); } } Here's what I see in the log when I run the above code: URL: /tmp/temp.A7DsLW could not delete file: Error Domain=NSCocoaErrorDomain Code=4 UserInfo=0x1001108a0 "The file “temp.A7DsLW” doesn’t exist." I'm running this on Snow Leopard. Any ideas on why the problem is occurring and/or how to work around it? Thanks!

    Read the article

  • What's a good way to add a large number of small floats together?

    - by splicer
    Say you have 100000000 32-bit floating point values in an array, and each of these floats has a value between 0.0 and 1.0. If you tried to sum them all up like this result = 0.0; for (i = 0; i < 100000000; i++) { result += array[i]; } you'd run into problems as result gets much larger than 1.0. So what are some of the ways to more accurately perform the summation?

    Read the article

  • How can I add floats together in different orders, and always get the same total?

    - by splicer
    Let's say I have three 32-bit floating point values, a, b, and c, such that (a + b) + c != a + (b + c). Is there summation algorithm, perhaps similar to Kahan summation, that guarantees that these values can be summed in any order and always arrive at the exact same (fairly accurate) total? I'm looking for the general case (i.e. not a solution that only deals with 3 numbers). Is arbitrary precision arithmetic the only way to go? I'm dealing with very large data sets, so I'd like to avoid the overhead of using arbitrary precision arithmetic if possible. Thanks!

    Read the article

  • How can I speed-up this loop (in C)?

    - by splicer
    Hi! I'm trying to parallelize a convolution function in C. Here's the original function which convolves two arrays of 64-bit floats: void convolve(const Float64 *in1, UInt32 in1Len, const Float64 *in2, UInt32 in2Len, Float64 *results) { UInt32 i, j; for (i = 0; i < in1Len; i++) { for (j = 0; j < in2Len; j++) { results[i+j] += in1[i] * in2[j]; } } } In order to allow for concurrency (without semaphores), I created a function that computes the result for a particular position in the results array: void convolveHelper(const Float64 *in1, UInt32 in1Len, const Float64 *in2, UInt32 in2Len, Float64 *result, UInt32 outPosition) { UInt32 i, j; for (i = 0; i < in1Len; i++) { if (i > outPosition) break; j = outPosition - i; if (j >= in2Len) continue; *result += in1[i] * in2[j]; } } The problem is, using convolveHelper slows down the code about 3.5 times (when running on a single thread). Any ideas on how I can speed-up convolveHelper, while maintaining thread safety?

    Read the article

1