Search Results

Search found 1013 results on 41 pages for 'kevin vermeer'.

Page 22/41 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Codeigniter: Using URIs with forms

    - by Kevin Brown
    I'm using URIs to direct a function in a library: $id = $this->CI->session->userdata('id'); $URI = $this->CI->uri->uri_string(); $new = "new"; if(strpos($URI, $new) === FALSE){ $method = "update"; } elseif(strpos($URI, $new) !== FALSE){ $method = "create"; } So I have two if statements directing what information to if ($method === 'update') { // Modify form, first load $this->CI->db->from('be_survey'); $this->CI->db->where('user_id' , $id); $survey = $this->CI->db->get(); $user = array_merge($user->row_array(),$survey->row_array()); $this->CI->validation->set_default_value($user); // Display page $data['user'] = $user; } $this->CI->validation->set_rules($rules); if ( $this->CI->validation->run() === FALSE ) { // Output any errors $this->CI->validation->output_errors(); } else { // Submit form $this->_submit($method); } Submit function: function _submit($method) { //Submit and Update for current User $id = $this->CI->session->userdata('id'); $this->CI->db->select('users.id, users.username, users.email, profiles.firstname, profiles.manager_id'); $this->CI->db->from('be_users' . " users"); $this->CI->db->join('be_user_profiles' . " profiles",'users.id=profiles.user_id'); $this->CI->db->having('id', $id); $email_data['user'] = $this->CI->db->get(); $email_data['user'] = $email_data['user']->row(); $manager_id = $email_data['user']->manager_id; $this->CI->db->select('firstname','email')->from('be_user_profiles')->where('user_id', $manager_id); $email_data['manager'] = $this->CI->db->get(); $email_data['manager'] = $email_data['manager']->row(); // Fetch what they entered in the form for($i=1;$i<18;$i++){ $survey["a_".$i]= $this->CI->input->post('a_'.$i); } for($i=1;$i<15;$i++){ $survey["b_".$i]= $this->CI->input->post('b_'.$i); } for($i=1;$i<12;$i++){ $survey["c_".$i]= $this->CI->input->post('c_'.$i); } $profile['firstname'] = $this->CI->input->post('firstname'); $profile['lastname'] = $this->CI->input->post('lastname'); $profile['test_date'] = date ("Y-m-d H:i:s"); $profile['company_name'] = $this->CI->input->post('company_name'); $profile['company_address'] = $this->CI->input->post('company_address'); $profile['company_city'] = $this->CI->input->post('company_city'); $profile['company_phone'] = $this->CI->input->post('company_phone'); $profile['company_state'] = $this->CI->input->post('company_state'); $profile['company_zip'] = $this->CI->input->post('company_zip'); $profile['job_title'] = $this->CI->input->post('job_title'); $profile['job_type'] = $this->CI->input->post('job_type'); $profile['job_time'] = $this->CI->input->post('job_time'); $profile['department'] = $this->CI->input->post('department'); $profile['vision'] = $this->CI->input->post('vision'); $profile['height'] = $this->CI->input->post('height'); $profile['weight'] = $this->CI->input->post('weight'); $profile['hand_dominance'] = $this->CI->input->post('hand_dominance'); $profile['areas_of_fatigue'] = $this->CI->input->post('areas_of_fatigue'); $profile['job_description'] = $this->CI->input->post('job_description'); $profile['injury_review'] = $this->CI->input->post('injury_review'); $profile['job_positive'] = $this->CI->input->post('job_positive'); $profile['risk_factors'] = $this->CI->input->post('risk_factors'); $profile['job_improvement_short'] = $this->CI->input->post('job_improvement_short'); $profile['job_improvement_long'] = $this->CI->input->post('job_improvement_long'); if ($method == "update") { //Begin db transmission $this->CI->db->trans_begin(); $this->CI->home_model->update('Survey',$survey, array('user_id' => $id)); $this->CI->db->update('be_user_profiles',$profile, array('user_id' => $id)); if ($this->CI->db->trans_status() === FALSE) { flashMsg('error','There was a problem entering your test! Please contact an administrator.'); redirect('survey','location'); } else { //Get credits of user and subtract 1 $this->CI->db->set('credits', 'credits -1', FALSE); $this->CI->db->update('be_user_profiles',$profile, array('user_id' => $manager_id)); //Mark the form completed. $this->CI->db->set('test_complete', '1'); $this->CI->db->where('user_id', $id)->update('be_user_profiles'); // Stuff worked... $this->CI->db->trans_commit(); //Get Manager Information $this->CI->db->select('users.id, users.username, users.email, profiles.firstname'); $this->CI->db->from('be_users' . " users"); $this->CI->db->join('be_user_profiles' . " profiles",'users.id=profiles.user_id'); $this->CI->db->having('id', $email_data['user']->manager_id); $email_data['manager'] = $this->CI->db->get(); $email_data['manager'] = $email_data['manager']->row(); //Email User $this->CI->load->library('User_email'); $data_user = array( 'firstname'=>$email_data['user']->firstname, 'email'=> $email_data['user']->email, 'user_completed'=>$email_data['user']->firstname, 'site_name'=>$this->CI->preference->item('site_name'), 'site_url'=>base_url() ); //Email Manager $data_manager = array( 'firstname'=>$email_data['manager']->firstname, 'email'=> $email_data['manager']->email, 'user_completed'=>$email_data['user']->firstname, 'site_name'=>$this->CI->preference->item('site_name'), 'site_url'=>base_url() ); $this->CI->user_email->send($email_data['manager']->email,'Completed the Assessment Tool','public/email_manager_complete',$data_manager); $this->CI->user_email->send($email_data['user']->email,'Completed the Assessment Tool','public/email_user_complete',$data_user); flashMsg('success','You finished the assessment successfully!'); redirect('home','location'); } } //Create New User elseif ($method == "create") { // Build $profile['user_id'] = $id; $profile['manager_id'] = $manager_id; $profile['test_complete'] = '1'; $survey['user_id'] = $id; $this->CI->db->trans_begin(); // Add user_profile details to DB $this->CI->db->insert('be_user_profiles',$profile); $this->CI->db->insert('be_survey',$survey); if ($this->CI->db->trans_status() === FALSE) { // Registration failed $this->CI->db->trans_rollback(); flashMsg('error',$this->CI->lang->line('userlib_registration_failed')); redirect('auth/register','location'); } else { // User registered $this->CI->db->trans_commit(); flashMsg('success',$this->CI->lang->line('userlib_registration_success')); redirect($this->CI->config->item('userlib_action_register'),'location'); } } } The submit function is similar, updating the db if $method == "update", and inserting if the method == "create". The problem is, when the form is submitted, it doesn't take into account the url b/c the form submits to the function "survey", which passes data to the lib function, so things are always updated, never created. *How can I pass $method to the _submit() function correctly?!*

    Read the article

  • NSKeyedArchiver save method ( that i made) crashed the iphone simulator

    - by Kevin
    i saw this approach on a tutorial, and the message is working for their example but when i implement this it does not work. from what i can tell the iphone simulator crashes when i do a [ self saveSettingsData]. TheSettings is class object that i declare and initialize in the appdelagate with these methods. the error says terminating due to uncaught exception. i am new to the iphone sdk and objective, so i really can't figure out what is going on thanks to any one who can help, i am ready to literally pull my hair out. (NSString *) SettingsDataFilePath { NSString * settingsDataFilePath ; NSArray * paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) ; NSString * documentsDirectory = [paths objectAtIndex:0] ; settingsDataFilePath = [[documentsDirectory stringByAppendingPathComponent: @"SetggggtingsData.plist" ] retain] ; return settingsDataFilePath ; } (void) saveSettingsData { [NSKeyedArchiver archiveRootObject:[TheSettings copy] toFile:[self SettingsDataFilePath]] ;

    Read the article

  • ActiveMerchant - Optimal method of sending money to user? PayPal account or Credit

    - by Kevin
    I have a website that will take payments from user A, hold them in our escrow account, then transfer the money minus a fee to user B. I have the first part figured out, in terms of taking credit card payments from user A, but I'm trying to figure out the optimal method of taking that money and sending it to user B. I'm not storing credit card info due to privacy and I don't mind requiring user B to sign up for a PayPal account if they're going to use the system but I don't know how to directly send payments to a PayPal account. I'm using ActiveMerchant and the PayPal gateway on Rails 2.3.5. I'm also open to any suggestions as to what the optimal method is to take money from user A, hold it for 1-60 days, then transfer it to user B while incurring minimal fees and something I can implement in Rails hopefully that won't cause me to have an aneurysm.

    Read the article

  • Can a .csv file be used as a data source in Visual Studio 2008 (C#)?

    - by Kevin
    I'm pretty new to C# and Visual Studio. I'm writing a small program that will read a .csv file and then write the records read to a MS SQL database table. I can manually parse the .csv file, but I was wondering if it is possible to somehow "describe" the .csv file to Visual Studio so that I can use it as a data source? I should mention that the first two lines in the .csv file contain header information and the following lines are the actual comma-delimited data.

    Read the article

  • Creating a custom ribbon button in VS 2008 Standard

    - by Kevin L.
    I want to create a custom ribbon button within Outlook 2007 using Visual Studio 2008 Standard, but am unsure how to proceed. Most of the resources I've found mention VS 2008 Pro, and this SO answer mentions that VSTO is not even included in Standard. Is creating custom ribbon buttons possible using Visual Studio 2008 Standard? If so, where should I start?

    Read the article

  • Binding Many-to-Many Core Data relationships in UI

    - by Kevin
    Basically my setup is this. I have a many-to-many relationship in Core Data where a student entity can have multiple courses, and a course entity can have multiple students. My problem is in trying to figure out how to bind this relationship to the UI in Interface Builder. I want to be able to add courses to a course array controller, then have those courses displayed in a popup menu in a NSTableView in the Edit Student window where you can add courses to a student. This is what I have so far: http://vimeo.com/10671726 It's probably easier to understand from the video. Thanks

    Read the article

  • Obfuscating Geocode results to protect privacy?

    - by Kevin
    I have an app that finds other users within a 20 mile radius on a google map and associates an icon with each of them. However, I do not want their exact points to be given but rather an approximation. I've wrestled with a few ideas on how to do this: Only Geocode the Zip Code, make graphic icons for 1-99, use the icon to represent how many results are within the zip code, and use the info window to show hyperlinks to the individual results. The only problem is, I'd like each individual icon to be shown because it just looks a lot better. Add/Subtract a random number to the lat/lng values stored with each user and add a translucent circle around the icon. What do you guys suggest?

    Read the article

  • Python Solitaire

    - by Kevin
    This is more of a thought i had awhile rather than an actual problem to solve, maybe more a discussion, but i was wondering if it would be possible to design the game of solitaire and be abkle to play it in the python GUI or some other form of iterface? I know you can get a deck of cards fairly easily and i know yuo can play simple games like snap and so on but i thought solitaire would be more challenging and fun because there is alot more logic behind it than just laying out the cards randomly. Any ideas? (I would be intrested to hear about or see any solutions if anyone had any links etc..)

    Read the article

  • How would I merged nested dictionaries in a list in python?

    - by Kevin
    for example if i had the result [{'Germany': {"Luge - Men's Singles": 'Gold'}}, {'Germany': {"Luge - Men's Singles": 'Silver'}}, {'Italy': {"Luge - Men's Singles": 'Bronze'}}] [{'Germany': {"Luge - Women's Singles": 'Gold'}}, {'Austria': {"Luge - Women's Singles": 'Silver'}}, {'Germany': {"Luge - Women's Singles": 'Bronze'}}] [{'Austria': {'Luge - Doubles': 'Gold'}}, {'Latvia': {'Luge - Doubles': 'Silver'}}, {'Germany': {'Luge - Doubles': 'Bronze'}}] how would I sort this so that all of the events germany and so on had won could be under one single title. i.e germany would be germany:Luge - Men's Singles: Gold, Silver, Luge - Women's Singles: Gold, Bronze, Luge - Doubles: Bronze. thanks for any help

    Read the article

  • Algorithm for Negating Sentences

    - by Kevin Dolan
    I was wondering if anyone was familiar with any attempts at algorithmic sentence negation. For example, given a sentence like "This book is good" provide any number of alternative sentences meaning the opposite like "This book is not good" or even "This book is bad". Obviously, accomplishing this with a high degree of accuracy would probably be beyond the scope of current NLP, but I'm sure there has been some work on the subject. If anybody knows of any work, care to point me to some papers?

    Read the article

  • Why does Visual Studio sometimes add a number when creating page events in codebehinds?

    - by Kevin Pang
    When writing up a codebehind in Visual Studio for ASP.NET web forms applications, I often use the dropdowns at the top of the window to autogenerate page event handlers (e.g. Page_Load, Page_PreRender). I've noticed that sometimes Visual Studio likes to add numbers to these function names like "Page_Load1" or "Page_PreRender2". Programatically speaking, this has no effect on the code. But stylistically, I find it a bit ugly. Is there any way to get rid of this behavior?

    Read the article

  • C# 4.0: casting dynamic to static

    - by Kevin Won
    This is an offshoot question that's related to another I asked here. I'm splitting it off because it's really a sub-question: I'm having difficulties casting an object of type dynamic to another (known) static type. I have an ironPython script that is doing this: import clr clr.AddReference("System") from System import * def GetBclUri(): return Uri("http://google.com") note that it's simply newing up a BCL System.Uri type and returning it. So I know the static type of the returned object. now over in C# land, I'm newing up the script hosting stuff and calling this getter to return the Uri object: dynamic uri = scriptEngine.GetBclUri(); System.Uri u = uri as System.Uri; // casts the dynamic to static fine Works no problem. I now can use the strongly typed Uri object as if it was originally instantiated statically. however.... Now I want to define my own C# class that will be newed up in dynamic-land just like I did with the Uri. My simple C# class: namespace Entity { public class TestPy // stupid simple test class of my own { public string DoSomething(string something) { return something; } } } Now in Python, new up an object of this type and return it: sys.path.append(r'C:..path here...') clr.AddReferenceToFile("entity.dll") import Entity.TestPy def GetTest(): return Entity.TestPy(); // the C# class then in C# call the getter: dynamic test = scriptEngine.GetTest(); Entity.TestPy t = test as Entity.TestPy; // t==null!!! here, the cast does not work. Note that the 'test' object (dynamic) is valid--I can call the DoSomething()--it just won't cast to the known static type string s = test.DoSomething("asdf"); // dynamic object works fine so I'm perplexed. the BCL type System.Uri will cast from a dynamic type to the correct static one, but my own type won't. There's obviously something I'm not getting about this...

    Read the article

  • Recursive Syntax in Oslo

    - by Kevin Lawrence
    I'm writing my first DSL with Oslo and I am having a problem with a recursive syntax definition. The input has sections which can contain questions or other sections recursively (composite pattern) like this: Section: A Question: 1 Question: 2 Section: B Question: 1 End End My definition for a Section looks like this syntax Section = "Section:" id:Text body:(SectionBody)* "End Section"; Which works (but doesn't handle recursive sections) if I define SectionBody like this syntax SectionBody = (Question); but doesn't work with a recursive definition like this syntax SectionBody = (Question | Section); What am I missing?

    Read the article

  • How do I disable "eager" validation entirely using jquery validate ?

    - by Kevin J
    Is there a way to disable "eager" validation using the jquery.validate plugin? Either through an option in the script or as a hack? "Eager" validation kicks in once the form has been validated once - after that, invalid fields are validated onfocusout. I want to disable this behavior, and change my forms to only be validated when the submit button is pressed. I don't mind hacking through the validate script itself also, so if that's what the solution requires that's acceptable.

    Read the article

  • Multiple accordion panes open

    - by Kevin
    We are using a jquery accordion on our site : http://www.racedayworld.com It basically lists events under each month... Apparently people are finding difficulties knowing how it really works and they don't see at first glance that there are more events under each month (that you click to expand) So I was thinking about opening two at a time (the current month and the next) .. but I'm not sure how to enable both to be open at once ... any ideas?

    Read the article

  • Jquery Table sorter and special characters

    - by kevin
    Hi there, am using jquery tablesorter plugin and in my "country" column i got special characters like this: Índia. The fact is that when i hit the header of the column to sort it, it puts my "Índia" at the end of the column. I guess the nav sees the Í instead of the real "I" with an accent. Any clue on how to make it work even with accents ? Here's the js code in my domready: $.tablesorter.defaults.widgets = ['zebra']; $.tablesorter.defaults.sortList = [[0,0]]; $("table").tablesorter(); Thanks in advance.

    Read the article

  • Google Analytics Widget Tracking

    - by Kevin Lamb
    Hello, I have a form that is generated on a customer's website (lets say customer.com) with javascript that a user fills out and it sends to my site (app.com). I would like to be able to provide information to the customer such as how effective their AdWords campaign was and what search engines users used to end up filling out the form. I have started looking at the multiple domain linking option but I am not sure this is the right way. Is there a way to query what search engine and key words they used and pass this along with the form?

    Read the article

  • Display a input type=file over another input type=file

    - by Kevin Sedgley
    WARNING: Lengthy description coming up! I have written an uploader based upon APC progress uploader for PHP. This works fine and dandy, but the script as a whole (apc etc) is intended to be used only for those with Javascript. To achieve this, I have searched for any input type=file, and replaced these with an absolutely positioned form that appears over the original area where the old file input area was. The reasons for this are so the new uploader can submit to a hidden in page IFrame has to be in a seperate <form> in order to submit to the APC reciever to display the progress upload bar. allows it to be used within any form with an input type=file throughout the site I have used JQuery to do this, with the following code: Original HTML form code: <div><input type="file" name="media" id="media" /></div> Find position of div block code: // get the parent div, and properties thereof parentDiv = $(this).closest('div'); w = $(parentDiv).width(); h = $(parentDiv).height(); loc = $(parentDiv).offset(); Locate new block over old block: $('#_sender').appendTo('body').css({left:loc.left,top:loc.top,position:'absolute',zIndex:400,height:h,width:w}).show(); This works fine, and shows over the old block OK. The problem: When other elements in the DOM before or above it change (in this case a "tree view" selector is pushing the old block down) the new upload form gets moved over other elements. Is there a JQuery (or JS) method for changing this upon DOM change? Some kind of .onchange for the page?! Or an .onmove for the original block? Thanks in advance you lovely people Before DOM change: . After: .

    Read the article

  • How to properly force a Blackberry Java application to install using Loader.exe

    - by Kevin White
    I want to include the Application Loader process in a software installation, to ensure that users get our software installed on their Blackberry by the time our installer software finishes. I know this is possible, because Aerize Card Loader (http://aerize.com/blackberry/software/loader/) does this. When you install their software, if your Blackberry is connected the Application Loader will come up and force the .COD file to install to the device. I can't make it work. Looking at RIM's own documentation, I need to: Place the ALX and COD files into a subfolder here: C:\Program Files\Common Files\Research In Motion\Shared\Applications\ Add a path to the ALX file in HKCU\Software\Research In Motion\Blackberry\Loader\Packages Index the application, by executing this at the command line: loader.exe /index Start the force load, by doing this: loader.exe /defaultUSB /forceload When I execute that last command, the Application Loader comes up and says that all applications are up to date and nothing needs to be done. If I execute loader.exe by double-clicking on it (or typing in the command with no parameters), I get the regular Application Loader wizard. It shows my program as listed, but un-checked. If I check it and click next, it will install to the Blackberry. (This is the part that I want to avoid, and that Aerize Card Loader's install process avoids.) What am I missing? It appears that the Aerize installer is doing something different but I haven't been able to ascertain what.

    Read the article

  • GEM Version Requirements Deprecated

    - by Kevin Sylvestre
    When creating a new Rails project using: rails sample Then creating a model using: script/generate model person first_name:string last_name:string Everything is fine. However, if I add any gems to my environment.rb: config.gem "authlogic" And run the same generator, I get the following: /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. The warning just recently appeared (I think), but I would like to fix it if possible. Any hints or similar experiences? Thanks.

    Read the article

  • Can I detect if higher subview has been touched?

    - by Kevin Beimers
    I've got a big UIView that responds to touches, and it's covered with lots of little UIViews that respond differently to touches. Is it possible to touch anywhere on screen and slide around, and have each view know if it's being touched? For example, I put my finger down on the upper left and slide toward the lower right. The touchesBegan/Moved is collected by the baseView. As I pass over itemView1, itemView2, and itemView3, control passes to them. If I lift my finger while over itemView2, it performs itemView2's touchesEnded method. If I lift my finger over none of the items, it performs baseView's touchesEnded. At the moment, if I touch down on baseView, touchEnded is always baseView and the higher itemViews are ignored. Any ideas?

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >