Search Results

Search found 604 results on 25 pages for 'bruno lee'.

Page 15/25 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • flash as3 document class and event listeners

    - by Lee
    I think i have this document class concept entirly wrong now, i was wondering if someone mind explaining it.. I assumed that the above class would be instantiated within the first frame on scene one of a movie. I also assumed that when changing scenes the state of the class would remain constant so any event listeners would still be running.. Scene 1: I have a movieclip named ui_mc, that has a button in for muting sound. Scene 2: I have the same movie clip with the same button. Now the eventListener picks it up in the first scene, however it does not in the second. I am wondering for every scene do the event listeners need to be resetup? If that is the case if their an event listener to listen for the change in scene, so i can set them back up again lol.. Thanks in advance.. package { import flash.display.MovieClip; import flash.events.MouseEvent; import flash.media.Sound; import flash.media.SoundChannel; public class game extends MovieClip { public var snd_state:Boolean = true; public function game() { ui_setup(); } public function ui_setup():void { ui_mc.toggleMute_mc.addEventListener(MouseEvent.CLICK, snd_toggle); } private function snd_toggle(event:MouseEvent):void { // 0 = No Sound, 1 = Full Sound trace("Toggle"); } } }

    Read the article

  • How to generate SSH key pairs with Python

    - by Lee
    Hello, I'm attempting to write a script to generate SSH Identity key pairs for me. from M2Crypto import RSA key = RSA.gen_key(1024, 65337) key.save_key("/tmp/my.key", cipher=None) The file /tmp/my.key looks great now. By running ssh-keygen -y -f /tmp/my.key > /tmp/my.key.pub I can extract the public key. My question is how can I extract the public key from python? Using key.save_pub_key("/tmp/my.key.pub") saves something like: -----BEGIN PUBLIC KEY----- MFwwDQYJKoZIhvcNAQEBBQADASDASDASDASDBarYRsmMazM1hd7a+u3QeMP ... FZQ7Ic+BmmeWHvvVP4Yjyu1t6vAut7mKkaDeKbT3yiGVUgAEUaWMXqECAwEAAQ== -----END PUBLIC KEY----- When I'm looking for something like: ssh-rsa AAAABCASDDBM$%3WEAv/3%$F ..... OSDFKJSL43$%^DFg==

    Read the article

  • Is using jquery to call a WCF Data Service from the UI violating the MVC pattern.

    - by Lee Dale
    I'm fairly new to ASP.Net MVC 2 and understand the MVC pattern in itself. But my question is what's the best way to populate dropdownlists in the UI sticking to the MVC pattern. Should I be going through the controller? Every article I've seen to do this shows how to do it using javascript and jquery. I have a test application that I'm re-writing in MVC2 I have my dropdowns working with jquery basically calling a WCF Data Service that returns JSON which populates the dropdowns. Seems to me though that this is bypassing the controller and going straight to the model therefore strictly violating the MVC pattern. Or am I missing something obvious here. You thoughts or best practices would be greatly welcome here. Thanks

    Read the article

  • Server-side web browser for PHP?

    - by Lee
    If you wanted to re-create the DOM server-side and manipulate it in PHP, how would you choose to go about it? I'm looking for a fast, multi-user complete server-side web browser that can interface with PHP and run complete Javascript. Like Jaxer but something I can use with PHP... an extension would be fine, or even an Apache mod. Ideas?

    Read the article

  • Wordpress sidebar classes

    - by Chris J. Lee
    There any way i could add a class for the specific order of widget item? i.e. the class name would be widgetorder-1 (for the first appearing widget), widgetorder-2 (for the widget appearing in the 2nd order), etc. I looked into filters but wasn't sure how that worked.

    Read the article

  • Is there a best-practice approach for internationalization of an application?

    - by Lee Warner
    We need to have our apps be translated into other languages. This entails renaming the .text properties of our visible controls as well as other literals found within our apps to whatever language we need to translate into. Is this something that can easily be accomplished with .resx files? I was thinking of creating a master resx key/value list where the key would be the fully qualified name of the control/variable/constant etc. and then refactor our apps to look into this file to get their values based on the cultureinfo found at runtime? Is there a standard or simpler approach to this problem?

    Read the article

  • How can I specify the character encoding to be used by OLEDB when querying a DBF?

    - by Manga Lee
    Is it possible to specify which character encoding should be used by OLEDB when querying a DBF file? A possible work-around would be to encode the query string before the OLEDB call to the DBF file's character encoding and then encode all the results when they are returned. This will work but it would be nice if OLEDB or possibly ADO.NET could do this for me. UPDATE The suggestion by Viktor Jevdokimov does not seem to work automatically. But it made me investigate manual conversion of the strings. It is possible to use the TextInfo property of CultureInfo to find out the OemCodePage and the WindowsCodePage and use those to get the corresponding Encoding instances to perform manual conversion. But I can not get ADO.NET use these encondings to perform the conversion for me.

    Read the article

  • XAMPP is caching .html files running as PHP

    - by Lee
    I have XAMPP (latest version) installed on my Mac OS 10.6.3 I've added the following to .htaccess because I want .html to be interpreted as PHP. AddType application/x-httpd-php .php .html The problem is that the default XAMPP config seems to be caching .html files as static... so even though the PHP statements inside are being called (for example, 'echo time()' in index.html displays the dynamic output)... the actual file is being cached. When I make changes to a .html file, I've having to restart Apache for it to load the newest changes. Looking at httpd.conf, it looks like it's loading the following cache mods.. LoadModule file_cache_module modules/mod_file_cache.so LoadModule cache_module modules/mod_cache.so LoadModule disk_cache_module modules/mod_disk_cache.so LoadModule mem_cache_module modules/mod_mem_cache.so Any idea how to implement a system whereby it checks the timestamp of the file, before loading it from cache? Thanks!

    Read the article

  • Options for non-native form inputs for the web?

    - by Sam Lee
    I'm wondering if there are any good non-native form inputs for web development? I am currently using the built in <input> controls. They work just fine, but for my application they are too big (especially on OS X). I am wondering if there are any libraries that I can drop in as replacements. I am especially interested in ones that: Are a close to native control behavior as possible. Support for tabbing, highlighting current textbox, pressing up/down in <select>, etc. Have something that replicates <select> Look good and are compact I am aware that you can use CSS for some styling, but it's pretty minimal and looks different depending on the browser. Thanks for your help.

    Read the article

  • Handler for change of value using SliderBar in GWT

    - by Lee
    I'm using the SliderBar from the GWT Incubator in one of my current projects. I want to add a handler which fires whenever the value of the slider changes, but I'm not sure which handler I need to add to get this to work, or whether I need to write one of my own. Thanks

    Read the article

  • Silverlight MVVM ListBoxItem IsSelected

    - by Lee
    I have a collection of ViewModels bound to a ListBox. I am trying to bind the IsSelected properties of each together. In WPF it works by setting the style: <Style TargetType="{x:Type ListBoxItem}"> <Setter Property="IsSelected" Value="{Binding Path=IsSelected, Mode=TwoWay}" /> </Style> This does not work in Silverlight. How can I accomplish this?

    Read the article

  • Appending Dataset in Core Data execution of Update through iTuneStore

    - by Yoon Lee
    So I have completed my code work. This is first time releasing the app through iTuneStore. Current state of reading Core Data (.sqlite) file is already prefetched (already has information like apple's 'Reciepie' program). Assuming I have successfully released through apple store, and decide to update my application to existing users. Say I have sqlite contents but it contains bit more information than previous SQLite file under same structure. Question 1. Every time update held to the existing user, does it removes previous ones and move new updated application? Question 2. if it is not, then HOW can I append the existing sql value?

    Read the article

  • MYSQL Event to update another database table

    - by Lee
    Hey All, I have just taken over a project for a client and the database schema is in a total mess. I would like to rename a load of fields make it a relationship database. But doing this will be a painstaking process as they have an API running of it also. So the idea would be to create a new database and start re-writing the code to use this instead. But I need a way to keep these tables in sync during this process. Would you agree that I should use MYSQL EVENT's to keep updating the new table on Inserts / updates & deletes?? Or can you suggest a better way?? Hope you can advise !! thanks for any input I get

    Read the article

  • Why does setting this member in C fail?

    - by Lee Crabtree
    I'm writing a Python wrapper for a C++ library, and I'm getting a really weird when trying to set a struct's field in C. If I have a struct like this: struct Thing { PyOBJECT_HEAD unsigned int val; }; And have two functions like this: static PyObject* Thing_GetBit(Thing* self, PyObject* args) { unsigned int mask; if(!PyArg_ParseTuple(args, "I", &mask) Py_RETURN_FALSE; if((self->val & mask) != 0) Py_RETURN_TRUE; Py_RETURN_FALSE; } static PyObject* Thing_SetBit(Thing* self, PyObject* args) { unsigned int mask; bool on; if(!PyArg_ParseTuple(args, "Ii", &mask, &on)) Py_RETURN_FALSE; if(on) thing->val |= mask; else thing->val &= ~mask; Py_RETURN_TRUE; } Python code that calls the first method works just fine, giving back the value of the struct member. Calls to the SetBit method give an error about an object at address foo accessing memory at address bar, which couldn't be "written". I've poked around the code, and it's like I can look at the value all I want, both from C and Python, but the instant I try to set it, it blows up in my face. Am I missing something fundamental here?

    Read the article

  • Getting A File's Mime Type In Java

    - by Lee Theobald
    I was just wondering how most people fetch a mime type from a file in Java? So far I've tried two utils: JMimeMagic & Mime-Util. The first gave me memory exceptions, the second doesn't close its streams off properly. I was just wondering if anyone else had a method/library that they used and worked correctly?

    Read the article

  • jQuery animate on an image replacement

    - by Lee
    Hey All Hope you can advise I would like to add some simple fade in out of an image replacement which I have hooked into a select menu.ie, $("#vehicle").change(function(){ var selected = $(this).val(); $("#selectedVehicle").attr('src', '/assets/images/mini/'+selected+'.png'); }); <img id="selectedVehicle" src="/assets/v2/images/select-vehicle.png"> any suggestions how I can do it? Thanks in advanced

    Read the article

  • Rendering to a single Bitmap object from multiple threads

    - by Lee Treveil
    What im doing is rendering a number of bitmaps to a single bitmap. There could be hundreds of images and the bitmap being rendered to could be over 1000x1000 pixels. Im hoping to speed up this process by using multiple threads but since the Bitmap object is not thread-safe it cant be rendered to directly concurrently. What im thinking is to split the large bitmap into sections per cpu, render them separately then join them back together at the end. I haven't done this yet incase you guys/girls have any better suggestions. Any ideas? Thanks

    Read the article

  • Authenticate username and password

    - by Alice Lee
    I have a MMC client that runs on a .Net system, that invokes web methods on a server running on a linux box. The first task the client needs to do is to perform user login. It prompts the user for username and password. What is the best way for the client to authenticate the user's credentials. The password cannot be sent as plain text. The web server implements a web method called ValidateUser().

    Read the article

  • Windows Batch file to echo a specific line number

    - by Lee
    So for the second part of my current dilemma, I have a list of folders in c:\file_list.txt. I need to be able to extract them (well, echo them with some mods) based on the line number because this batch script is being called by an iterative macro process. I'm passing the line number as a parameter. @echo off setlocal enabledelayedexpansion set /a counter=0 set /a %%a = "" for /f "usebackq delims=" %%a in (c:\file_list.txt) do ( if "!counter!"=="%1" goto :printme & set /a counter+=1 ) :printme echo %%a which gives me an output of %a. Doh! So, I've tried echoing !a! (result: ECHO is off.); I've tried echoing %a (result: a) I figured the easy thing to do would be to modify the head.bat code found here: http://stackoverflow.com/questions/130116/dos-batch-commands-to-read-first-line-from-text-file except rather than echoing every line - I'd just echo the last line found. Not as simple as one might think. I've noticed that my counter is staying at zero for some reason; I'm wondering if the set /a counter+=1 is doing what I think it's doing.

    Read the article

  • Authlogic remember_me on signup

    - by Lee
    We want to have remember_me enabled when the user signs up. When logging in its really easy to do this, how do to we do this on signup though, as we're literally only creating a User object?

    Read the article

  • Why does Keychain Services return the wrong keychain content?

    - by Graham Lee
    I've been trying to use persistent keychain references in an iPhone application. I found that if I created two different keychain items, I would get a different persistent reference each time (they look like 'genp.......1', 'genp.......2', …). However, attempts to look up the items by persistent reference always returned the content of the first item. Why should this be? I confirmed that my keychain-saving code was definitely creating new items in each case (rather than updating existing items), and was not getting any errors. And as I say, Keychain Services is giving a different persistent reference for each item. I've managed to solve my immediate problem by searching for keychain items by attribute rather than persistent references, but it would be easier to use persistent references so I'd appreciate solving this problem. Here's my code: - (NSString *)keychainItemWithName: (NSString *)name { NSString *path = [GLApplicationSupportFolder() stringByAppendingPathComponent: name]; NSData *persistentRef = [NSData dataWithContentsOfFile: path]; if (!persistentRef) { NSLog(@"no persistent reference for name: %@", name); return nil; } NSArray *refs = [NSArray arrayWithObject: persistentRef]; //get the data CFMutableDictionaryRef params = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); CFDictionaryAddValue(params, kSecMatchItemList, refs); CFDictionaryAddValue(params, kSecClass, kSecClassGenericPassword); CFDictionaryAddValue(params, kSecReturnData, kCFBooleanTrue); CFDataRef item = NULL; OSStatus result = SecItemCopyMatching(params, (CFTypeRef *)&item); CFRelease(params); if (result != errSecSuccess) { NSLog(@"error %d retrieving keychain reference for name: %@", result, name); return nil; } NSString *token = [[NSString alloc] initWithData: (NSData *)item encoding: NSUTF8StringEncoding]; CFRelease(item); return [token autorelease]; } - (void)setKeychainItem: (NSString *)newToken forName: (NSString *)name { NSData *tokenData = [newToken dataUsingEncoding: NSUTF8StringEncoding]; //firstly, find out whether the item already exists NSDictionary *searchAttributes = [NSDictionary dictionaryWithObjectsAndKeys: name, kSecAttrAccount, kCFBooleanTrue, kSecReturnAttributes, nil]; NSDictionary *foundAttrs = nil; OSStatus searchResult = SecItemCopyMatching((CFDictionaryRef)searchAttributes, (CFTypeRef *)&foundAttrs); if (noErr == searchResult) { NSMutableDictionary *toStore = [foundAttrs mutableCopy]; [toStore setObject: tokenData forKey: (id)kSecValueData]; OSStatus result = SecItemUpdate((CFDictionaryRef)foundAttrs, (CFDictionaryRef)toStore); if (result != errSecSuccess) { NSLog(@"error %d updating keychain", result); } [toStore release]; return; } //need to create the item. CFMutableDictionaryRef params = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); CFDictionaryAddValue(params, kSecClass, kSecClassGenericPassword); CFDictionaryAddValue(params, kSecAttrAccount, name); CFDictionaryAddValue(params, kSecReturnPersistentRef, kCFBooleanTrue); CFDictionaryAddValue(params, kSecValueData, tokenData); NSData *persistentRef = nil; OSStatus result = SecItemAdd(params, (CFTypeRef *)&persistentRef); CFRelease(params); if (result != errSecSuccess) { NSLog(@"error %d from keychain services", result); return; } NSString *path = [GLApplicationSupportFolder() stringByAppendingPathComponent: name]; [persistentRef writeToFile: path atomically: NO]; [persistentRef release]; }

    Read the article

  • Set top level directory to be handled by Perl?

    - by Sam Lee
    I have an Apache server set up to use mod_perl. I have it set up to handle all requests using a Perl module MyModule. Here is part of my httpd.conf: LoadModule perl_module modules/mod_perl.so <Directory /> Order Deny,Allow Allow from all </Directory> PerlModule MyModule <Location /> SetHandler modperl PerlResponseHandler MyModule </Location> This seems to work fine, except top level directory (ie. www.mysite.com/) is not being sent to MyModule. What's going wrong?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >