Search Results

Search found 13 results on 1 pages for 'quano'.

Page 1/1 | 1 

  • mac os x - detect file system read

    - by quano
    I want to know what files a specific application is trying to access on my disc. I know that you can use fs_usage, but this outputs events from all applications. I know that you can target a single application, but only one that is already running. I want to detect all readfile-events an application is trying to do, ever since it is started. I don't want to miss out on any event. How do you achieve this?

    Read the article

  • Mac OS X - detect file system read

    - by quano
    I want to know what files a specific application is trying to access on my disk. I know that you can use fs_usage, but this outputs events from all applications. I know that you can target a single application, but only one that is already running. I want to detect all readfile-events an application is trying to do, ever since it is started. I don't want to miss out on any event. How do you achieve this?

    Read the article

  • JavaScript - string regex backreferences

    - by quano
    You can backreference like this in JavaScript: var str = "123 $test 123"; str = str.replace(/(\$)([a-z]+)/gi, "$2"); This would (quite silly) replace "$test" with "test". But imagine I'd like to pass the resulting string of $2 into a function, which returns another value. I tried doing this, but instead of getting the string "test", I get "$2". Is there a way to achieve this? // Instead of getting "$2" passed into somefunc, I want "test" // (i.e. the result of the regex) str = str.replace(/(\$)([a-z]+)/gi, somefunc("$2"));

    Read the article

  • UITableViewCell background size

    - by quano
    I'm trying to set the size of my background to be a little shorter than the default, creating some space between the cells. This has proven to be difficult. Setting the frame of the background view seems to do nothing: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSString *reuseIdentifier = @"cell"; UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:reuseIdentifier]; if (!cell) cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:reuseIdentifier] autorelease]; // Set up the cell... cell.contentView.backgroundColor = [UIColor clearColor]; cell.backgroundView = [[[UIView alloc] initWithFrame:CGRectMake(0, 4, 320, 42)] autorelease]; cell.backgroundView.backgroundColor = [UIColor blackColor]; cell.backgroundView.alpha = .2; cell.selectedBackgroundView = [[[UIView alloc] initWithFrame:CGRectMake(0, 4, 320, 42)] autorelease]; cell.selectedBackgroundView.backgroundColor = [UIColor whiteColor]; cell.selectedBackgroundView.alpha = .2; cell.font = [UIFont fontWithName:@"MarkerFelt-Thin" size:22.0f]; cell.selectedTextColor = [UIColor blackColor]; cell.textColor = [UIColor whiteColor]; NSDictionary *dict = [files objectAtIndex:indexPath.row]; cell.text = [dict objectForKey:@"name"]; return cell; } Any help? Also, setting the selected background view doesn't do anything. When a cell is selected, the background is completely blank. Why is this? I'm using iPhone OS 2.2.1. I also do this: - (void)viewDidLoad { [super viewDidLoad]; self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; self.tableView.backgroundColor = [UIColor clearColor]; self.tableView.rowHeight = 50.0f; } You can download the code here (made a small project for this issue only): http://dl.dropbox.com/u/608462/tabletest2.zip

    Read the article

  • svn branch commit - experimental commit

    - by quano
    I've made some experimental code that I would like to save in the repository, but I don't want it on the main branch. How would you commit this to a branch? Maybe I got this wrong, but of what I've understood about branching, all you actually do is copying already checked in code to another directory in the repository. I suppose one could copy the main branch to another location, and then change the working copy repository location pointer to point at that location, and then commit the experimental code. But that seems a bit long-winded. Is this really how you do it?

    Read the article

  • Mixing sound files on an iPhone

    - by quano
    I've got a couple of wav files and possibly a mp3 that I'd like to mix to a single wav or mp3-file. I'm using C/C++/Obj-C (iPhone). I have really no experience with this sort of thing. If anyone could give me some pointers, I would be very grateful. Thanks.

    Read the article

  • Python - integer to byte

    - by quano
    Say I've got an integer, 13941412, that I wish to separate into bytes (the number is actually a color in the form 0x00bbggrr). How would you do that? In c, you'd cast the number to a BYTE and then shift the bits. How do you cast to byte in Python?

    Read the article

  • iPhone - Browsing iPhone files through computer

    - by quano
    I want to be able to send files from an iPhone app to a computer. What would be the easiest way of doing this? I've made simple server client programs before, but in those, the client has always needed to connect to the server before being able to receive messages from it. There is an app for the iPhone called iSimulate, where you put a server on a Mac (the iPhone simulator), and then you use the iSimulate app of an iTouch or iPhone to send touch events to the server. This app does not require you to type in an ip-address. Instead it presents a list of available computers that have this server up and running. How exactly is this being done? Can a server broadcast a message over a network, w/o anyone being connected to the server? How does that work? How does a client listen for that broadcast? Here's a video of the app I'm talking about: http://www.youtube.com/watch?v=N3Qpd1ycZh4

    Read the article

  • Integer to byte conversion

    - by quano
    Say I've got an integer, 13941412, that I wish to separate into bytes (the number is actually a color in the form 0x00bbggrr). How would you do that? In c, you'd cast the number to a BYTE and then shift the bits. How do you cast to byte in Python?

    Read the article

  • C++ - how does Sleep() and cin work?

    - by quano
    Just curious. How does actually the function Sleep() work (declared in windows.h)? Maybe not just that implementation, but anyone. With that I mean - how is it implemented? How can it make the code "stop" for a specific time? Also curious about how cin and those actually work. What do they do exactly? The only way I know how to "block" something from continuing to run is with a while loop, but considering that that takes a huge amount of processing power in comparison to what's happening when you're invoking methods to read from stdin (just compare a while (true) to a read from stdin), I'm guessing that isn't what they do.

    Read the article

1