Search Results

Search found 600 results on 24 pages for 'satchmo brown'.

Page 13/24 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • HTML/Javascript Strange behavior with input field and TABBING

    - by Berlin Brown
    I have a strange error where if a user enters in data, say first name and then tabs, the text in the field is highlighted/selected as opposed to moving to the next. So, a person may type the first name and then tab to the next input item, text is selected and then they hit a character and now the name they typed in is deleted. If I use the default [input] tags, the tab works properly. But in the code below, with keyup, that may change the tabbing behavior. How can I get my code where it won't select the text. This is replicated in Firefox and Internet Explorer. function enableSearch(lnameObj) { var goButtonObj = document.getElementById('goButton'); var nextButtonObj = document.getElementById('nextButton'); var lastName = lnameObj.value; if (lastName == "") { goButtonObj.disabled = true; } else { goButtonObj.disabled = false; } } <input type="text" size="12" name="lastname" onKeyUp="return enableSearch(this);" value="">

    Read the article

  • Get screenshot on Windows with Python?

    - by Zachary Brown
    Hello, I am creating a Beta Testers reporting module so they can send in thier comments on my software, but I would like to have the option to include a screenshot with the report. How do I take a screenshot of the screen with Python on Windows? I have found several examples on Linux, but haven't had much luck on Windows.

    Read the article

  • How does Sentry aggregate errors?

    - by Hugo Rodger-Brown
    I am using Sentry (in a django project), and I'd like to know how I can get the errors to aggregate properly. I am logging certain user actions as errors, so there is no underlying system exception, and am using the culprit attribute to set a friendly error name. The message is templated, and contains a common message ("User 'x' was unable to perform action because 'y'"), but is never exactly the same (different users, different conditions). Sentry clearly uses some set of attributes under the hood to determine whether to aggregate errors as the same exception, but despite having looked through the code, I can't work out how. Can anyone short-cut my having to dig further into the code and tell me what properties I need to set in order to manage aggregation as I would like? [UPDATE 1: event grouping] This line appears in sentry.models.Group: class Group(MessageBase): """ Aggregated message which summarizes a set of Events. """ ... class Meta: unique_together = (('project', 'logger', 'culprit', 'checksum'),) ... Which makes sense - project, logger and culprit I am setting at the moment - the problem is checksum. I will investigate further, however 'checksum' suggests that binary equivalence, which is never going to work - it must be possible to group instances of the same exception, with differenct attributes? [UPDATE 2: event checksums] The event checksum comes from the sentry.manager.get_checksum_from_event method: def get_checksum_from_event(event): for interface in event.interfaces.itervalues(): result = interface.get_hash() if result: hash = hashlib.md5() for r in result: hash.update(to_string(r)) return hash.hexdigest() return hashlib.md5(to_string(event.message)).hexdigest() Next stop - where do the event interfaces come from? [UPDATE 3: event interfaces] I have worked out that interfaces refer to the standard mechanism for describing data passed into sentry events, and that I am using the standard sentry.interfaces.Message and sentry.interfaces.User interfaces. Both of these will contain different data depending on the exception instance - and so a checksum will never match. Is there any way that I can exclude these from the checksum calculation? (Or at least the User interface value, as that has to be different - the Message interface value I could standardise.) [UPDATE 4: solution] Here are the two get_hash functions for the Message and User interfaces respectively: # sentry.interfaces.Message def get_hash(self): return [self.message] # sentry.interfaces.User def get_hash(self): return [] Looking at these two, only the Message.get_hash interface will return a value that is picked up by the get_checksum_for_event method, and so this is the one that will be returned (hashed etc.) The net effect of this is that the the checksum is evaluated on the message alone - which in theory means that I can standardise the message and keep the user definition unique. I've answered my own question here, but hopefully my investigation is of use to others having the same problem. (As an aside, I've also submitted a pull request against the Sentry documentation as part of this ;-)) (Note to anyone using / extending Sentry with custom interfaces - if you want to avoid your interface being use to group exceptions, return an empty list.)

    Read the article

  • Using items in a list as arguments

    - by Travis Brown
    Suppose I have a function with the following type signature: g :: a -> a -> a -> b I also have a list of as—let's call it xs—that I know will contain at least three items. I'd like to apply g to the first three items of xs. I know I could define a combinator like the following: ($$$) :: (a -> a -> a -> b) -> [a] -> b f $$$ (x:y:z:_) = f x y z Then I could just use g $$$ xs. This makes $$$ a bit like uncurry, but for a function with three arguments of the same type and a list instead of a tuple. Is there a way to do this idiomatically using standard combinators? Or rather, what's the most idiomatic way to do this in Haskell? I thought trying pointfree on a non-infix version of $$$ might give me some idea of where to start, but the output was an abomination with 10 flips, a handful of heads and tails and aps, and 28 parentheses. (NB: I know this isn't a terribly Haskelly thing to do in the first place, but I've come across a couple of situations where it seems like a reasonable solution, especially when using Parsec. I'll certainly accept "don't ever do this in real code" if that's the best answer, but I'd prefer to see some clever trick involving the ((->) r) monad or whatever.)

    Read the article

  • Show surrounding words when searching for a specific word in a text file (Ruby)

    - by Ezra
    Hi, I'm very new to ruby. I'm trying to search for any instance of a word in a text file (not the problem). Then when the word is discovered, it would show the surrounding text (maybe 3-4 words before and after the target word, instead of the whole line), output to a list of instances and continue searching. Example "The quick brown fox jumped over the lazy dog." Search word = "jumped" Output = "...brown fox jumped over the..." Any help is appreciated. Thanks! Ezra def word_exists_in_file f = File.open("test.txt") f.each do line print line if line.match /someword/ return true end end false end

    Read the article

  • Codeigniter: Controller URI with Library

    - by Kevin Brown
    I have a working controller and library function, but I now need to pass a URI segment to the library for decision making, and I'm stuck. Controller: function survey($method) { $id = $this->session->userdata('id'); $data['member'] = $this->home_model->getUser($id); //Convert the db Object to a row array $data['manager'] = $data['member']->row(); $manager_id = $data['manager']->manager_id; $data['manager'] = $this->home_model->getUser($manager_id); $data['manager'] = $data['manager']->row(); if ($data['manager']->credits == '0') { flashMsg('warning',"You can't complete the assessment until your manager has purchased credit."); redirect('home','location'); } elseif ($data['manager']->test_complete == '3'){ flashMsg('warning',"You already completed the Assessment."); redirect('home','location'); } else{ $data['header'] = "Home"; $this->survey_form_processing->survey_form($this->_container,$data); } } Library: function survey_form($container) { if($method ==1){ $id = $this->CI->session->userdata('id'); // Setup fields for($i=1;$i<18;$i++){ $fields["a_".$i] = 'Question '.$i; } for($i=1;$i<17;$i++){ $fields["b_".$i] = 'Question '.$i; } $fields["company_name"] = "Company Name"; $fields['company_address'] = "company_address"; $fields['company_phone'] = "company_phone"; $fields['company_state'] = "company_state"; $fields['company_city'] = "company_city"; $fields['company_zip'] = "company_zip"; $fields['job_title'] = "job_title"; $fields['job_type'] = "job_type"; $fields['job_time'] = "job_time"; $fields['department'] = "department"; $fields['supervisor'] = "supervisor"; $fields['vision'] = "vision"; $fields['height'] = "height"; $fields['weight'] = "weight"; $fields['hand_dominance'] = "hand_dominance"; $fields['areas_of_fatigue'] = "areas_of_fatigue"; $fields['injury_review'] = "injury_review"; $fields['job_positive'] = "job_positive"; $fields['risk_factors'] = "risk_factors"; $fields['job_improvement_short'] = "job_improvement_short"; $fields['job_improvement_long'] = "job_improvement_long"; $fields["c_1"] = "Near Lift"; $fields["c_2"] = "Middle Lift"; $fields["c_3"] = "Far Lift"; $this->CI->validation->set_fields($fields); // Set Rules for($i=1;$i<18;$i++){ $rules["a_".$i]= 'hour|integer|max_length[2]'; } for($i=1;$i<17;$i++){ $rules["b_".$i]= 'hour|integer|max_length[2]'; } // Setup form default values $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(); } // Modify form, first load $this->CI->db->from('be_user_profiles'); $this->CI->db->where('user_id' , $id); $user = $this->CI->db->get(); $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; $data['header'] = 'Risk Assessment Survey'; $data['page'] = $this->CI->config->item('backendpro_template_public') . 'form_survey'; $this->CI->load->view($container,$data); } else{ redirect('home','location'); } } My library function doesn't know what to do with Method...and I'm confused. Does it have something to do with instances in my library?

    Read the article

  • When using the Auth component with CakePHP, I keep ketting this error. Why?

    - by Josh Brown
    Warning (2): Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/iframeworking/iframe/app/models/frame.php:7) [COREcake/libs/controller/controller.php, line 647] here is the code from frame.php: <?php class Frame extends AppModel { var $name = 'Frame'; var $belongsTo = array('User' => array('className' => 'User', 'dependent' => true)); } ?>

    Read the article

  • Codeigniter: Pass data to library funciton

    - by Kevin Brown
    I need my function to do one of two things based on the method variable, but I don't know how to get it done... My controller: function survey($method) { $id = $this->session->userdata('id'); $data['member'] = $this->home_model->getUser($id); $data['header'] = "Home"; $this->survey_form_processing->survey_form($this->_container,$data); } Library function: function survey_form($container,$method) { if($method == 1){ $this->CI->load->view($container,$data); } if($method == 2){ Do stuff... }

    Read the article

  • jQuery validation: .each with form

    - by Kevin Brown
    If I have a form of about 40 questions, how do I apply the same rules to questions 1-20, and 21-40? For example: $("#form_survey").validate({ rules: { a_ +i: {max:12, maxlength:2}, }, messages: { a_ +i:{ max: "That's too much!" } } Where the "+i" is the ideal increment of +1... Should be easy, I'm just stuck on syntax...

    Read the article

  • Is it possible to use JavaScript to break the HTML of a page?

    - by Karl Brown
    I've been asked at work whether it is possible to write, on purpose or by accident, JavaScript that will remove specific characters from a HTML document and thus break the HTML. An example would be adding some JavaScript that removes the < symbol in the page. I've tried searching online and I know JavaScript can replace strings, but my knowledge of the language is negligible. I've been asked to look into it as a way of hopefully addressing why a site I work on needs to have controls over who can add bespoke functionality to the page. I'm hoping it's not possible but would be grateful for the peace of mind!

    Read the article

  • Why does this php/ajax query fail?

    - by Ashley Brown
    I'm ajaxing over to this php file. $a = 'old'; $b = 'new'; if ($_POST['info-type'] == $a || $b) { $info = $_POST['info-type']; $query = "SELECT * FROM `tld` WHERE type = '".$var."'"; } $query = "SELECT * FROM `tld` "; $result = mysqli_query($link,$query); while($row = mysqli_fetch_assoc($result)) { echo '<div>'.$row['something'].'</div>'; } The data posted is either 'all' 'new' or 'old'. If i send the data as either new or old, the script works and outputs as expected. If the posted data is neither new or old but all instead, it fails and don't show any errors or respond anything back. (I've monitored via dev tools aswell) So, I tried this if ($_POST['info-type'] == $a || $b) { $info = $_POST['info-type']; $var = "SELECT * FROM `tld` WHERE type = '".$var."'"; } elseif ($_POST['info-type'] == 'all'){ $query = "SELECT * FROM `tld` "; } But the script still fails. If i fully remove the IF statements and use the query without the WHERE clause like it is after the elseif, it works?

    Read the article

  • Codeigniter: URI segments

    - by Kevin Brown
    How do I create an if statement saying something like this? $segment = "segment 2 or 3"; if($segment == 1{ do stuff } I know this is pretty elementary, but I don't totally understand the URI class...

    Read the article

  • jQuery: if value is true without user action

    - by Kevin Brown
    I want to show a div if the value of an input =='CP'. Right now this is my code: $(".register-type").change(function(){ var value = $(this).val(); if(value == 'CP'){ $('.cp-show').show(); This works fine if they change the input, but if things get validated false and the page reloads, this input is still 'CP', but the div doesn't show... Is there a way to correct this so that jquery checks if this is set on the page load?

    Read the article

  • Is there a free, smale-scale, not web-based issue/bug tracking system?

    - by Doc Brown
    I know, there were posts before here on SO before concerning issue or bug tracking systems, like this one, but the given answers point either to commercial systems or web-based systems, which both seem to be oversized for our needs. What I am looking for is a non-commercial tool for a team of 3 to 4 developers, which can be used on an existing fileserver, without the need of installing additional server software like a C/S database or a web server. Some things I expect from such a system: allows to remember bugs (with a priority) and issues / ideas for new features (mostly without a priority) description of the issue, perhaps some additional remarks short info who entered the bug/issue entry one or more tags allowing us to group or filter the list Any suggestions? EDIT: I should have said that, but we are using MS Windows clients, Visual Studio development, Tortoise SVN (the latter works fine without a subversion server). And yes, I am strict on "no server software", since all server based solutions I have seen so far seem much to oversized/heavy weighted/too-much-effort-to-be-worth-it. In fact, if no one has a better idea, we are going to use a spreadsheet, but I can't believe there are no ready-made, light weight solutions.

    Read the article

  • jQuery: exclude class on click

    - by Kevin Brown
    //Table select $("#reports-table tr").click( function() { var detail_id = $(this).attr('id'); $(this).addClass("selected"); $(this).siblings().removeClass("selected"); $('#reports-right').show().load('/members/details/'+detail_id); $('#reports-table').width(680); } ); I currently am using this code to add a selected class to a table row and show details of the row clicked in a right 'aside'. The problem is, I have action buttons in the row--when they are clicked, becausee they are children of the tr, this function still runs... How can I exclude a certain class?

    Read the article

  • null checking edit textbox android

    - by sara brown
    i want to make empty textbox checking for android. i tried try catch but it was force to close. below is my codes try{ name = (EditText)findViewById(R.id.name); }catch(NullPointerException ex){ new AlertDialog.Builder(KawalanAppXTVT.this).setTitle("Error" ) .setMessage("That's not a number") .setPositiveButton("OK", null).show(); can someone help me?

    Read the article

  • Creating seed model from data already in DB

    - by Nick Brown
    Is there a way to convert data in an existing database into objects that can easily be put into a seed method? Essentially I'd like to let some people add lines to my DB via a form and then convert that into an object that I can re-seed the DB anytime I need to make changes. The database itself is created via code-first using the following model: public class Combo { public int Id { get; set; } public string MainPrefix { get; set; } public string MainDescriptor { get; set; } public string MainDish { get; set; } public string Connector { get; set; } public string SecondaryDescriptor { get; set; } public string SecondaryDish { get; set; } }

    Read the article

  • Python - Removing duplicates from a string

    - by Daniel
    def remove_duplicates(strng): """ Returns a string which is the same as the argument except only the first occurrence of each letter is present. Upper and lower case letters are treated as different. Only duplicate letters are removed, other characters such as spaces or numbers are not changed. >>> remove_duplicates('apple') 'aple' >>> remove_duplicates('Mississippi') 'Misp' >>> remove_duplicates('The quick brown fox jumps over the lazy dog') 'The quick brown fx jmps v t lazy dg' >>> remove_duplicates('121 balloons 2 u') '121 balons 2 u' """ s = strng.split() return strng.replace(s[0],"") Writing a function to get rid of duplicate letters but so far have been playing around for an hour and can't get anything. Help would be appreciated, thanks.

    Read the article

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