Search Results

Search found 1007 results on 41 pages for 'kevin'.

Page 26/41 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Flex Text height

    - by kevin
    How can you get the height of the Text component that's been created dynamically from ActionScript. For instance, if you have something like: var temp:Text = new Text; temp.width = 50; temp.text = "Simple text"; how to get height of temp?

    Read the article

  • iphone simulator crashes when it tries to access user location

    - by kevin Mendoza
    for some reason my code causes my program to crash. does anyone know why or how to fix it? NSLog(@"here"); CLLocation *location = [locationManager location]; [mapView removeAnnotations:mapView.annotations]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; CLLocationCoordinate2D workingCoordinate = [location coordinate]; NSLog(@" this is %@", workingCoordinate.latitude); it makes it to the first NSLog, but somewhere between the first and second it crashes. My guess is that it has to do with the CLLocation *location line.

    Read the article

  • Java style FOR loop in a clojure interpeter ?

    - by Kevin
    I have a basic interpreter in clojure. Now i need to implement for (initialisation; finish-test; loop-update) { statements } inside my interpreter. I will attach my interpreter code I got so far. Any help is appreciated. Interpreter (declare interpret make-env) ;; (def do-trace false) ;; ;; simple utilities (def third ; return third item in a list (fn [a-list] (second (rest a-list)))) (def fourth ; return fourth item in a list (fn [a-list] (third (rest a-list)))) (def run ; make it easy to test the interpreter (fn [e] (println "Processing: " e) (println "=> " (interpret e (make-env))))) ;; for the environment (def make-env (fn [] '())) (def add-var (fn [env var val] (cons (list var val) env))) (def lookup-var (fn [env var] (cond (empty? env) 'error (= (first (first env)) var) (second (first env)) :else (lookup-var (rest env) var)))) ;; -- define numbers (def is-number? (fn [expn] (number? expn))) (def interpret-number (fn [expn env] expn)) ;; -- define symbols (def is-symbol? (fn [expn] (symbol? expn))) (def interpret-symbol (fn [expn env] (lookup-var env expn))) ;; -- define boolean (def is-boolean? (fn [expn] (or (= expn 'true) (= expn 'false)))) (def interpret-boolean (fn [expn env] expn)) ;; -- define functions (def is-function? (fn [expn] (and (list? expn) (= 3 (count expn)) (= 'lambda (first expn))))) (def interpret-function (fn [expn env] expn)) ;; -- define addition (def is-plus? (fn [expn] (and (list? expn) (= 3 (count expn)) (= '+ (first expn))))) (def interpret-plus (fn [expn env] (+ (interpret (second expn) env) (interpret (third expn) env)))) ;; -- define subtraction (def is-minus? (fn [expn] (and (list? expn) (= 3 (count expn)) (= '- (first expn))))) (def interpret-minus (fn [expn env] (- (interpret (second expn) env) (interpret (third expn) env)))) ;; -- define multiplication (def is-times? (fn [expn] (and (list? expn) (= 3 (count expn)) (= '* (first expn))))) (def interpret-times (fn [expn env] (* (interpret (second expn) env) (interpret (third expn) env)))) ;; -- define division (def is-divides? (fn [expn] (and (list? expn) (= 3 (count expn)) (= '/ (first expn))))) (def interpret-divides (fn [expn env] (/ (interpret (second expn) env) (interpret (third expn) env)))) ;; -- define equals test (def is-equals? (fn [expn] (and (list? expn) (= 3 (count expn)) (= '= (first expn))))) (def interpret-equals (fn [expn env] (= (interpret (second expn) env) (interpret (third expn) env)))) ;; -- define greater-than test (def is-greater-than? (fn [expn] (and (list? expn) (= 3 (count expn)) (= '> (first expn))))) (def interpret-greater-than (fn [expn env] (> (interpret (second expn) env) (interpret (third expn) env)))) ;; -- define not (def is-not? (fn [expn] (and (list? expn) (= 2 (count expn)) (= 'not (first expn))))) (def interpret-not (fn [expn env] (not (interpret (second expn) env)))) ;; -- define or (def is-or? (fn [expn] (and (list? expn) (= 3 (count expn)) (= 'or (first expn))))) (def interpret-or (fn [expn env] (or (interpret (second expn) env) (interpret (third expn) env)))) ;; -- define and (def is-and? (fn [expn] (and (list? expn) (= 3 (count expn)) (= 'and (first expn))))) (def interpret-and (fn [expn env] (and (interpret (second expn) env) (interpret (third expn) env)))) ;; -- define with (def is-with? (fn [expn] (and (list? expn) (= 3 (count expn)) (= 'with (first expn))))) (def interpret-with (fn [expn env] (interpret (third expn) (add-var env (first (second expn)) (interpret (second (second expn)) env))))) ;; -- define if (def is-if? (fn [expn] (and (list? expn) (= 4 (count expn)) (= 'if (first expn))))) (def interpret-if (fn [expn env] (cond (interpret (second expn) env) (interpret (third expn) env) :else (interpret (fourth expn) env)))) ;; -- define function-application (def is-function-application? (fn [expn env] (and (list? expn) (= 2 (count expn)) (is-function? (interpret (first expn) env))))) (def interpret-function-application (fn [expn env] (let [function (interpret (first expn) env)] (interpret (third function) (add-var env (first (second function)) (interpret (second expn) env)))))) ;; the interpreter itself (def interpret (fn [expn env] (cond do-trace (println "Interpret is processing: " expn)) (cond ; basic values (is-number? expn) (interpret-number expn env) (is-symbol? expn) (interpret-symbol expn env) (is-boolean? expn) (interpret-boolean expn env) (is-function? expn) (interpret-function expn env) ; built-in functions (is-plus? expn) (interpret-plus expn env) (is-minus? expn) (interpret-minus expn env) (is-times? expn) (interpret-times expn env) (is-divides? expn) (interpret-divides expn env) (is-equals? expn) (interpret-equals expn env) (is-greater-than? expn) (interpret-greater-than expn env) (is-not? expn) (interpret-not expn env) (is-or? expn) (interpret-or expn env) (is-and? expn) (interpret-and expn env) ; special syntax (is-with? expn) (interpret-with expn env) (is-if? expn) (interpret-if expn env) ; functions (is-function-application? expn env) (interpret-function-application expn env) :else 'error)))

    Read the article

  • CakePHP 1.3.4: EmailComponent error - Undefined property: EmailComponent::$Controller

    - by Kevin S.
    I'm trying to develop an invitation system for my website which runs on CakePHP 1.3.4. I am trying to use the built in EmailComponent to send an email. I'm getting this error (expanded): Notice (8): Undefined property: EmailComponent::$Controller [CORE/cake/libs/controller/components/email.php, line 428] Code | Context */ function _render($content) { $viewClass = $this-Controller-view; $content = array( "", "" ) EmailComponent::_render() - CORE/cake/libs/controller/components/email.php, line 428 EmailComponent::send() - CORE/cake/libs/controller/components/email.php, line 368 UsersController::send_quick_add_email() - APP/controllers/users_controller.php, line 77 UsersController::quick_add() - APP/controllers/users_controller.php, line 104 SinglesResultsController::quick_add() - APP/controllers/singles_results_controller.php, line 63 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 204 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 171 [main] - APP/webroot/index.php, line 83 I also get the following, which I can expand if necessary: Notice (8): Trying to get property of non-object [CORE/cake/libs/controller/components/email.php, line 428] Notice (8): Undefined property: EmailComponent::$Controller [CORE/cake/libs/controller/components/email.php, line 433] Notice (8): Trying to get property of non-object [CORE/cake/libs/controller/components/email.php, line 433] Notice (8): Undefined property: View::$webroot [CORE/cake/libs/view/view.php, line 805] Warning (2): Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/cake/cake/libs/debugger.php:673) [CORE/cake/libs/controller/controller.php, line 746] I think that the EmailComponent object holds a reference to the controller it's being called from. I don't know why it's undefined in this case. Here is the code that fails (specifically, it errors on the call to $this-Email-send()): function send_quick_add_email($email) { if($email) { $this->Email->reset(); $this->Email->to = $email; $this->Email->subject = 'Some subject text'; $this->Email->from = '[email protected]'; $this->Email->template = 'email_template'; $this->set('user', $user); $this->set('token', $token); $this->Email->delivery = 'debug'; $this->Email->send(); } } Ok, for more clarification: The main data I am collecting on the site is results of a game played in meatspace. SinglesResultsController has an action, quick_add, which expects email addresses of people not already registered on the site. If the email addresses aren't associated with Users, UsersController::quick_add is called, which creates an inactive user, and sends an invitation email in UsersController::send_quick_add_email() I think the problem is related to the fact that the email isn't being sent in the first controller initialized (SinglesResultsController). Any thoughts on how to make it work? The Email component is declared at the top of both Controllers.

    Read the article

  • iPhone: How to Trigger the Loading of a View Using a UI Element in a Previous View

    - by Kevin Horvath
    I've been reading the Head First iPhone Development book and I understand how to get to a new view from a table but how exactly would I be able to get to a new view or view controller, by just simply pressing a button? Is that even possible? I mean there are some apps where you click a button, not a table cell and it loads a new view. How exactly is that done? If someone could help out a newbie it would be greatly appreciated!

    Read the article

  • App logicstics & changes due to scope creep

    - by Kevin Brown
    I started an app that was initially a testing platform--user management, and managers that can view their employees tests. Recently, functionality has been extended (not built yet) to allow users to complete a test in place of an employee--basically adding a record, but no user. I have three tables in use for this: users(contains user info for login/security), profiles (all personal info: address, height, etc.), and survey (contains survey answers for user). How do I extend my application to encompass this functionality with minimal change to the structure? I assume that the best way to do this would be to insert records to the tables profiles and survey, and have no username/password/email? There MUST be a user_id associated b/c the tables are linked through the user_ids...

    Read the article

  • SplashScreen covers any MessageBoxes in wxPython?

    - by Kevin
    I have a SplashScreen shown while my application loads in the background. Unfortunately, if any errors occur during the application's initialisation a MessageBox is shown - but is behind the splash. This prevents the user from seeing the message, and from dismissing it (the only way to quit is through task manager). Q: Is there any way of hiding the SplashScreen if any errors occur, or allowing MessageBoxes to display above it? I am using wxPython 2.8.10.1 with Python 2.6.5 on Windows.

    Read the article

  • Hudson Free Temp Space location

    - by Kevin
    Hi I have just installed Hudson on a Weblogic server and I am having issues with the nodes going off line due to the Free Temp Space falling below the 1gig threshold. Now I have checked my /tmp folder (thinking Hudson uses that) but it is sitting at 10gigs free. Would anybody be able to point me to the folder Hudson uses? Also I am using a SunOS box. Thanks,

    Read the article

  • jQuery Validate - Require at least one from group, plus additional items.

    - by Kevin Pullin
    I'm attempting to use 'jQuery Validate' on a form that requires an email address plus either all items of a shipping address completed or none at all. Using the sample provided by the solution to this question: jQuery Validate - “Either skip these fields, or fill at least X of them”, I have been able to successfully solve the validation of the address group. The problem, however, is that the logic for validating the email address field does not work. From debugging the Validate scripts, the "re-entrant" validation code triggered by calling 'fields.data('being_validated', true).valid();' in the linked example results in a reset of all previously validated errors (i.e. the email validation error is cleared). I have modified some existing samples, the first in which removes the offending line and the second with it included. Email Validation Working Email Validation Fails Any tips or suggestions on how to properly solve this or work around the failure?

    Read the article

  • if statement is giving me some trouble

    - by kevin Mendoza
    For some reason, this if statement is giving me an "Expected : before ] token. if ([ [mine commodity] isEqualToString:@"Gold"] && [gold == YES]) { [tempMine setAnnotationType:iProspectLiteAnnotationTypeGold]; [mapView addAnnotation:tempMine]; } is there some typo here that I'm not seeing?

    Read the article

  • Writing datatable to database file, one record at a time in C#

    - by Kevin
    Hi! I want to write a C# program that will read a row from a datatable (named loadDT) and update a database file (named Forecasts.mdb). My datatable looks like this (each day's value is a number representing kilowatts usage forecast): Hour Day1 Day2 Day3 Day4 Day5 Day6 Day7 1 519 520 524 498 501 476 451 My database file looks like this: Day Hour KWForecast 1 1 519 2 1 520 3 1 524 ... and so on. Basically, I want to be able to read one row from the datatable, and then extrapolate that out to my database file, one record at a time. Each row from the datatable will result in seven records written to the database file. Any ideas on how to go about this? I can connect to my database, the connection string works, and I can update and delete from the database. I just can't wrap my head around how to do this one record at a time. Thanks in advance for any help and advice.

    Read the article

  • Approaches to wrapping access to functionality in .NET MVC?

    - by Kevin
    What are some different solutions to wrapping access to functionality within a .NET MVC application? For example, I have six tabs that represent different areas of the application and within area 1, there is the ability to add, edit, upload, whatever. I need a central way to say: Build some dictionary of what the user can do Wrap tabs, buttons, links, etc, validate the user can access this piece of functionality and show/hide appropriately. I know I can restrict access to actions via action filters and roles, but what about from the UI? Any help would be appreciated. I am sure I am not the only one who has needed to do this, thanks!

    Read the article

  • Better way to make a bash script self-tracing?

    - by Kevin Little
    I have certain critical bash scripts that are invoked by code I don't control, and where I can't see their console output. I want a complete trace of what these scripts did for later analysis. To do this I want to make each script self-tracing. Here is what I am currently doing: #!/bin/bash # if last arg is not '_worker_', relaunch with stdout and stderr # redirected to my log file... if [[ "$BASH_ARGV" != "_worker_" ]]; then $0 "$@" _worker_ >>/some_log_file 2>&1 # add tee if console output wanted exit $? fi # rest of script follows... Is there a better, cleaner way to do this?

    Read the article

  • WF -- how do I use a custom activity without creating it in a separate Workflow Activity Library?

    - by Kevin Craft
    I am trying to accomplish something that seems like it should be very simple. I have a State Machine Workflow Console Application with a workflow in it. I have created a custom activity for it. This activity will NEVER be used ANYWHERE ELSE. I just want to use this activity on my workflow, but: It does not appear in the toolbox. I cannot drag it from the Solution Explorer onto the workflow designer. I absolutely do not want to create a separate State Machine Workflow Activity Library, since that will just clutter my solution. Like I said, I will never use this activity in any other project, so I would like to keep it confined to this one...but I just can't figure out how to get it onto the designer! Am I going crazy!? Here is the code for the activity: public partial class GameSearchActivity: Activity { public GameSearchActivity() { InitializeComponent(); } public static DependencyProperty QueryProperty = System.Workflow.ComponentModel.DependencyProperty.Register("Query", typeof(string), typeof(GameSearchActivity)); [Description("Query")] [Category("Dependency Properties")] [Browsable(true)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] public string Query { get { return ((string)(base.GetValue(GameSearchActivity.QueryProperty))); } set { base.SetValue(GameSearchActivity.QueryProperty, value); } } public static DependencyProperty ResultsProperty = System.Workflow.ComponentModel.DependencyProperty.Register("Results", typeof(string), typeof(GameSearchActivity)); [Description("Results")] [Category("Dependency Properties")] [Browsable(true)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] public IEnumerable<Game_GamePlatform> Results { get { return ((IEnumerable<Game_GamePlatform>)(base.GetValue(GameSearchActivity.ResultsProperty))); } set { base.SetValue(GameSearchActivity.ResultsProperty, value); } } protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext) { IDataService ds = executionContext.GetService<IDataService>(); Results = ds.SearchGames(Query); return ActivityExecutionStatus.Closed; } } Thanks. EDIT: OK, so I've discovered that if I change the project type from Console Application to Class Library, the custom activity appears in the toolbox. However, this is not acceptable. It needs to be a Console/Windows Application. Anyone know a way around this?

    Read the article

  • Adding a Shadow to a NSImageView

    - by Kevin Sylvestre
    Sorry for the seemingly simple question. I have a NSImageView (added in interface builder) and want to add a shadow outline. I tried using the 'Image View Effects' section of the 'Inspector' but this required enabling a core animation layer. If I set it for the 'Content View' I have very strange appearance side effects. If I set it for the 'Image View' the shadow is cropped (sorry, can't resize the image view). Any ideas?

    Read the article

  • Object in Array is not recognised as having "methods"

    - by kevin Mendoza
    I got my application working Awhile back, but after completely and accidentally deleting it, I have tried to create it from square one. unfortunately my rewritten program is a bit cranky; does anyone see or know the possible sources of error? Also, my if statements are acting up. -(void)loadAnnotations { CLLocationCoordinate2D workingCoordinate; iProspectLiteAppDelegate *appDelegate = (iProspectLiteAppDelegate *)[[UIApplication sharedApplication] delegate]; NSMutableArray *mines =[[NSMutableArray alloc] initWithArray:(NSMutableArray *) appDelegate.mines]; BOOL gold = [[NSUserDefaults standardUserDefaults] boolForKey:@"goldControl"]; BOOL silver = [[NSUserDefaults standardUserDefaults] boolForKey:@"silverControl"]; BOOL copper = [[NSUserDefaults standardUserDefaults] boolForKey:@"copperControl"]; for(id mine in mines) { NSLog(@"in the loop"); workingCoordinate.latitude = [[mine latitudeInitial] doubleValue]; workingCoordinate.longitude = [[mine longitudeInitial] doubleValue]; iProspectLiteAnnotation *tempMine = [[iProspectLiteAnnotation alloc] initWithCoordinate:workingCoordinate]; [tempMine setTite:[mine mineName]]; if ([[mine commodity] isEqualToString:@"Gold"] && [gold == YES]) { [tempMine setAnnotationType:iProspectLiteAnnotationTypeGold]; [mapView addAnnotation:tempMine]; } if([[mine commodity] isEqualToString:@"Silver"] && [silver == YES]) { [tempMine setAnnotationType:iProspectLiteAnnotationTypeSilver]; } if([[mine commodity] isEqualToString:@"Copper"] && [copper == YES]) { [tempMine setAnnotationType:iProspectLiteAnnotationTypeCopper]; } } [mines dealloc]; } where the workingCoordinate.latitude = [[mine latitudeInitial] doubleValue], as well as the longitude, and [mine mineName],it says " No '-latitudeInitiallongitudeInitial' method found" or the mineName/LongitudeInitial. also, it complains about : before ] at all the if statement lines. I don't see any errors, do you?

    Read the article

  • I want to use the fleximage gem and s3 for storage, but don't want dev/qa/test env's to use s3

    - by Kevin Bedell
    I have a rails app that I'm going to host on engineyard and want to store image files on s3. But I don't know if I want all developer machines to beusing s3 for storage of all our test and dev images. Maybe it's not an issue -- but it seems like a waste to have everyone storing all our images in s3. I've heard of some ppl who store images on s3 'hacking' dev environments to store images locally on the file system -- and then using s3 in prod only. What are other people doing?

    Read the article

  • Getting method arguments with Roslyn

    - by Kevin Burton
    I can get a list from the solution of all calls to a particuliar method using the following code: var createCommandList = new List<MethodSymbol>(); INamedTypeSymbol interfaceSymbol = (from p in solution.Projects select p.GetCompilation().GetTypeByMetadataName("BuySeasons.BsiServices.DataResource.IBsiDataConnection")).FirstOrDefault(); foreach (ISymbol symbol in interfaceSymbol.GetMembers("CreateCommand")) { if (symbol.Kind == CommonSymbolKind.Method && symbol is MethodSymbol) { createCommandList.Add(symbol as MethodSymbol); } } foreach (MethodSymbol methodSymbol in createCommandList) { foreach (ReferencedSymbol referenceSymbol in methodSymbol.FindReferences(solution)) { foreach (ReferenceLocation referenceLocation in from l in referenceSymbol.Locations orderby l.Document.FilePath select l) { if (referenceLocation.Location.GetLineSpan(false).StartLinePosition.Line == referenceLocation.Location.GetLineSpan(false).EndLinePosition.Line) { Debug.WriteLine(string.Format("{0} {1} at {2} {3}/{4} - {5}", methodSymbol.Name, "(" + string.Join(",", (from p in methodSymbol.Parameters select p.Type.Name + " " + p.Name).ToArray()) + ")", Path.GetFileName(referenceLocation.Location.GetLineSpan(false).Path), referenceLocation.Location.GetLineSpan(false).StartLinePosition.Line, referenceLocation.Location.GetLineSpan(false).StartLinePosition.Character, referenceLocation.Location.GetLineSpan(false).EndLinePosition.Character)); } else { throw new ApplicationException("Call spans multiple lines"); } } } } But this gives me a list of ReferencedSymbol's. Although this gives me the file and line number that the method is called from I would also like to get the specific arguments that the method is called with. How can I either convert what I have or get the same information with Roslyn? (notice the I first load the solution with the Solution.Load method and then loop through to find out where the method is defined/declared (createCommandList)). Thank you.

    Read the article

  • How to capture each frame of a USB webcam using VB.net?

    - by Kevin Boyd
    While I have got some leads from an older SO post and from this site, I haven't been able to figure out how to capture each frame of a web-cam. What I would like to do is something like this capture a frame then do some image processing on it and display the output and then move on to the next frame. Can I can access to web-cam frame events or is there any efficient way to achieve this?

    Read the article

  • IDE framework for a dynamic language?

    - by Kevin Reid
    Let's say I have a super-wonderful new programming language, and I want there to be an IDE for it. What IDE platform/framework could I use to get this done efficiently? I mean things like: Collection of files in a project, searching them, tabbed/split editors etc. — the basics. Syntax highlighting and auto-indent/reformatting. Providing the user interface for code completion — hit tab, get a list (I'll have to implement the necessary partial evaluation myself (it's a dynamic language)). This is the feature I'm most wishing for. Built-in parser framework which is good at recovering from the sort of syntax errors occurring in code that is in the middle of being edited would be helpful. In-editor annotation of syntax/runtime error locations fed back from the language runtime. REPL (interactive evaluator) interaction with the same completion as in the editor. This system should be Linux/Mac/Windows cross-platform (in that priority order). Being implemented in Java (or rather, accepting language plugins written in Java) is possibly useful, but anything else is worth a try too.

    Read the article

  • nginx improperly forwards to https, adds two trailing slashes when rewriting

    - by Kevin
    I'm using nginx as a proxy for a django project on mod_wsgi and to serve the static content. I have two domain names for it: asdf-example.com and asdfexample.com. I want to use rewrites to redirect everything to www.asdf-example.com They're not quite working the way they should: asdf-example.com forwards to https:// www.asdf-example.com, which fails because I'm not using SSL. Though asdf-example.com/search forwards to http://.... asdfexample.com and www.asdfexample.com both forward to www.asdf-example.com//, which looks weird. My config file: server { listen 80; server_name asdf-example.com asdfexample.com; if ($host ~* ^asdf-example\.com){ rewrite ^(.*)$ http://www.asdf-example.com/$1 permanent; } if ($host ~* ^asdfexample\.com){ rewrite ^(.*)$ http://www.asdf-example.com/$1 permanent; } if ($host ~* ^www\.asdfexample\.com){ rewrite ^(.*)$ http://www.asdf-example.com/$1 permanent; } ... Thanks

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >