User Profile

Collapse

Profile Sidebar

Collapse
BaseballGraphs
BaseballGraphs
Last Activity: Mar 13 '13, 03:19 AM
Joined: Sep 9 '10
Location: Ann Arbor, Michigan, USA
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Exact Word Match in String with Regex in Python

    Hello,
    I've been trying to come up with a way to search for the exact match of one word (as a string) within another string.

    So, for example, if I were searching for the string, 'eligible', searching it against the string 'ineligible' would not yield a result.

    Here is the code I have thus far:
    Code:
    def findstring(string1, string2):
      if re.search(r'(^|[^a-z0-9])'+re.escape(string1)+r'($|[^a-z0-9])',
    ...
    See more | Go to post

  • BaseballGraphs
    started a topic Logistic Regression Algorithm?
    in PHP

    Logistic Regression Algorithm?

    Does anyone know of a Logistic Regression Algorithm written and implementable in PHP? I have found some for Linear Regression and Multiple Regression but no Logistic Regression.

    Thanks for your help!
    See more | Go to post

  • BaseballGraphs
    started a topic Why is PHPSESSID cookie not setting?
    in PHP

    Why is PHPSESSID cookie not setting?

    Hi,

    I am trying to start a user session when a user logs in to my website. The setup is pretty simple. Here is my checkLogin.php script that checks whether the user is a member of the website.
    Code:
    <?
      session_start();
      $username = $_POST["username"];
      $password = $_POST["password"];
    
      include '../connect.php';
    
      $sql = sprintf( "SELECT * FROM
    ...
    See more | Go to post

  • BaseballGraphs
    started a topic Chrome Bookmark Not Working

    Chrome Bookmark Not Working

    Hello,
    I've put together the following javascript that can be dragged and dropped to the favorites/bookmarks bar in Chrome (or any browser) and then when you click on it, it opens the links in the variable object:
    Code:
    javascript:(function(){ 
    var obj={"link1":"http://google.com", "link2":"http://yahoo.com"};
    for(key in obj){
    var val=obj[key];
    window.open(decodeURIComponent(val));
    ...
    See more | Go to post

  • BaseballGraphs
    started a topic Regex assistance

    Regex assistance

    I'm trying to extract several portions of a string and am having some issues.

    The string is: "http://www.google.com http://www.yahoo.com http://www.facebook.co m"

    I would like to extract google, yahoo, and facebook from that string.

    I've been trying this:
    Code:
    var string  = "http://www.google.com http://www.yahoo.com http://www.facebook.com";
    var several = string.match( /www.(\w+).com/g
    ...
    See more | Go to post

  • BaseballGraphs
    replied to Confirm with Ajax
    I just needed to add a little bit of logic to get it going. Thanks for your help!
    See more | Go to post

    Leave a comment:


  • BaseballGraphs
    started a topic Confirm with Ajax

    Confirm with Ajax

    Hello,

    I am trying to confirm whether a user wants to perform a desired action using AJAX and am having trouble getting it to work.

    I have this function:
    Code:
    function confirmPost() {
      var agree = confirm("Are you sure you want to remove?");
      if ( agree ) {
        return true;
      } else {
        return false;
      }
    }
    I then use the function...
    See more | Go to post

  • Remove 'radio button' from input type = radio

    I have an input that has type=radio. I am trying to figure out how to remove the actual radio button using CSS. The input is paired with a label. I am trying to get the input's label alone without the actual radio button.

    Please let me know if you're aware of a method to do this. Thanks!
    See more | Go to post

  • Hi Rabbit,
    Thanks for your reply. After messing around for a while, I finally got it to work:
    Code:
    var down = false;
      $('table.weekly_schedule').mousedown( function(){
        down = true;
      } );
      $('table.weekly_schedule').mouseup( function(){
        down = false;
      } );
      $('table.weekly_schedule td.hour').mouseenter( function(){
        if ( ! down )
          return;
        $(this).trigger(
    ...
    See more | Go to post

    Leave a comment:


  • Highlight <td> in table as dragging across?

    Hello,

    I am trying to find resources or an explanation on how to highlight several <td>'s within a table when a click is made and the mouse is dragged across the table while holding the click.

    Does anyone have any resources or examples on how to achieve this sort of functionality?

    Thanks!
    See more | Go to post

  • BaseballGraphs
    started a topic How to increment?

    How to increment?

    I'm performing an AJAX request where I populate a table. I want to provide a number in each row of the table to indicate where that row lies in relation to the whole table, AKA a column in my table that starts at 1 and increments by 1.

    I know that PHP has something built into it already where you can do something like i++ and it will increment the value for you, however, I'm having trouble implementing this with javascript.
    ...
    See more | Go to post

  • How to select radio button and then show more options?

    Hello,

    I was hoping someone could provide or suggest a resource where I may be able to see implementation of the following programming situation.

    I would like to create a simple radio button form. I would like it when a user clicks a radio button for the form to show more options that are related to that radio button and only that radio button.

    For example, if I have a form with two possibilities:
    ...
    See more | Go to post

  • BaseballGraphs
    started a topic How to fire a PHP function on button click?
    in PHP

    How to fire a PHP function on button click?

    Hello,

    I have a PHP function that currently triggers when the page loads.

    I would prefer that this function is only triggered when someone clicks a button.

    How can I accomplish this?

    Thanks for any of your help!
    See more | Go to post

  • How to use jQuery's formatItem, formatMatch, & formatResult options for autocomplete?

    Hello,

    I am making use of jQuery's .autocomplete plugin, and I would appreciate some assistance formating the results that show up in the dropdown menu that populates when text is written into the input field.

    In order to get the data to populate the autocomplete, I pull from mySQL using this PHP:
    Code:
     $sql = ( 'SELECT tag, title, author, content, id FROM labels' );
     $result = mysql_query( $sql );
     $Response
    ...
    See more | Go to post

  • How to use jQuery's formatItem with autocomplete?

    Hello,

    I am trying to format the output of my data with the autocomplete function from jQuery. So far, I've been able to build the entire process, however, I want to limit the information I show in the autocomplete, but I still want the autocomplete to search through the entire string to find possible matches.

    I understand that the formatItem function used in conjunction with the autocomplete from jQuery can accomplish...
    See more | Go to post

  • BaseballGraphs
    started a topic How to iterate over JSON array?

    How to iterate over JSON array?

    Hello,

    I am trying to iterate over a JSON array using JQuery's .getJSON method and am requiring assistance building the javascript function to iterate and return all values in my array.

    My JSON array takes the following form:
    Code:
    {
      -49: {
        -1: {
             value: "6.0366"
             name: "D. Aardsma"
             }
        -2: {
             value: "7.8261"
    ...
    See more | Go to post

  • BaseballGraphs
    replied to Not showing up in Console Log?
    Hi,
    Thanks so much for your response. I actually resolved the problem.

    It appears as though I had previously encoded $def, so performing the following was double encoding it and therefore the results were undefined and no errors were returning in the console.
    Code:
    definitions = <?= json_encode ($def); ?>
    I was using Google Chrome obviously. The best browser in all the land...
    See more | Go to post

    Leave a comment:


  • BaseballGraphs
    started a topic Not showing up in Console Log?

    Not showing up in Console Log?

    Hello,

    I am troubleshoot errors with my code, however, it is not showing up in the console log. Can you please take a look and let me know if anything stands out for why this may not be showing up in the log?

    Thanks for your help!
    Code:
    <script>
    definitions = <?= json_encode ($def); ?>
    
    function refreshDefinition( stat_id ) {
    var definition = definitions[ stat_id ];
    ...
    See more | Go to post

  • How to disable all checkboxes when one checkbox is selected

    Hello,

    I am looking to disable all checkboxes when one checkbox is selected. I cannot use radio buttons, so I need to be able to disable the checkboxes if 1 checkbox has been selected.

    Can you please assist if you know how to perform this sort of function.

    Thanks very much.
    See more | Go to post

  • The operation can be performed successfully by using the following syntax:
    Code:
    <span onclick="RGraph.showPNG(document.getElementById('myLine'), event);">Get PNG</span>
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...