-
Posts
468 -
Joined
-
Last visited
Never
Everything posted by chiprivers
-
OK, for anybody that is interested and would like to particpate in this challenge, purely for a bit of competative fun: Create a script that will predict the results of a selecion of football (soccer) matches by means of analysing the data input from an uptodate results table. For the purpose of this challenge, we will use the UK Barclays Premier League for which you can see an uptodate results table here (http://news.bbc.co.uk/sport2/hi/football/eng_prem/table/default.stm) and upcoming fixtures here (http://news.bbc.co.uk/sport2/hi/football/eng_prem/fixtures/default.stm). Keep us uptodate with your progress here and when those who would like to participate are ready we will decide on a set period over which we can use our scripts to predicts the results and award ourselves points for accuracy.
-
Not sure if it is acceptable to post this here or not, apologies if this is not permitted! I have just started working on a script for preparing my football bets. I am not really a football fan and dont really know that much about it but I do know a little about statistics . This script I am working on is for a bit of fun and I dont expect to be able to come up with some fool proof system of winning millions. So what I was thinking, as I was working away on my script, why not challenge others to create a similare script and see who can come up with the most successful results. The basic idea behind my script is that I will have a database table that contains the data from the most recent league tables and I have a formula that will apply a pointing system to teams playing each other in the coming games to predict either a home or away win (I am ignoring the possibility of a draw result). Anyone who wants to have ago, see what you can come up with and post here if you would like to participate. We can then come up with a way of testing them over the course of a few weeks.
-
I am working on a little script to run a formula to pick football bets (more for the challenge of the scripting than the belief that I will create a winning system!!). I was wondering if there is anywhere I can get upto date UK football league data that I can feed straight into my database rather than having to do it all manually each week? Can anyone help?
-
I have written a basic PHP / MySQL driven online questionnaire to assist with my wifes college research. I don't currently have a hosting account and was wondering if anybody could point me to a free host where I could put the questionnaire online for about a month? or maybe somebody might be happy to host it on their own site? I'm not bothered about what the URL is going to be cos the people that will be filling it in will clicking a link to it!
-
I have only had a quick look at the one thing I noticed that could do with updating is your header - the image looks great but where you have set it as a background image, if the person viewing the site has a widescreen (like me) it repeats itself to fill up the space.
-
so you have various forms, the user enteres a number into a choice of the forms, you are then returned with a string of numbers where the first numbers are the values entered in the forms and the last number if the number of entries??
-
[quote author=steviewdr link=topic=119299.msg507829#msg507829 date=1169133842] It would be easier if it was Texas Holdem, as there would only be 2 cards that the player have. Quite do-able tho, if I had the time. -steve [/quote] Well how about a function for Texas Holdem then where you enter 7 arguments, 5 community cards and the 2 players cards and the function returns a point value for the best hand that can be created, this point value can the be compared against the points returned from another players hand to see who would win?
-
[quote] I enter the value of 1 in to form 1 I enter the value of 2 in to form 2 I want the output to be: 122 The current output is:121122 [/quote] What are you talking about????
-
If nobody else is setting a challenge, how about creating a function that compare two poker hands and returns the winning hand? The function could either accept two arguments where a hand is submitted in the form "3h7d9cJhAs" or each card could be submitted as an individual argument?
-
What is the latest challenge?
-
I have written a very basic applciation to make simple a job we do at my work and it makes use of PHP and MySQL. Problem is that they do not currently have a web server set up with PHP and MySQL. I told them that it was no problem as you can obtain Apache, PHP and MySQL free as it is open source. The it bod told me that despite this there was still licensing implications and they could not do it? Can anyone confirm one way or the other?
-
Is there any javascript commands that can be used to scroll the page (if there are scroll bars!)? I specifically want to create some floating controls that remain in the same in the display area of the window and can be used to scroll the rest of the content up and down or left and right. I will use CSS to create the controls and have them floating in a fixed position but I am unsre if there is any javascript to control the scrolling?
-
Having sorted my <div> width problem, I have a question about scrollbars. I know how to make a div scrollable for any overflow content but I was wondering if there is a way to put the horizontal scrollbar at the top of the div instead of the bottom, or aswell as?
-
I cant use percentages because the left div will contain a form which will always be a fixed width in pixels, the right hand div will contain a display of data which will always be a different size but I want the div to fill up the remaining space, irrespective of the window size. (I intend to make this right div scrollable).
-
I have a basic page layout of two <div>'s nestled side by side inside another <div>: ================================================================== = <div id="page"> = = =================== ========================================= = = = <div id="left"> = = <div id="right" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =================== ========================================== = = = ================================================================== #page should be the whole width of the display area, #left should have its width set by its content and #right should take up the remaining width. I have used the following CSS: #page { width: 100%; padding: 10px } #left { float: left } #right{ float: right: width: 100% } But using this CSS it puts #right down below #left and sets its width to 100% of #page instead of just the remaining space nestled next to #left. How can I get the desired result?
-
It is supposed to show the current time, ie the current time will default into the input box at the time the page loads. But for some reason, the time that is defaulting into the box is remaining at the time that it was when I first loaded up the script, when ever I refresh the page it should change to the current time, but it is not!
-
I have the following script to create a form on a project I am working on: [code] <? require 'connect.php'; if (isset($_POST['incident_number'])) { $hour = substr($_POST['incident_time'],0,2); $min = substr($_POST['incident_time'],2,2); $init = mktime($hour,$min,0,$_POST['date_month'],$_POST['date_day'],$_POST['date_year']); $qry = "INSERT INTO incidents (reference,title,init,status) VALUES (".$_POST['incident_number'].",\"".$_POST['incident_desc']."\",".$init.",1)"; $create = mysql_query($qry); } ?> <link href="style/new_incident.css" rel="stylesheet" type="text/css"> <div id="new_incident"> <h1>New Incident</h1> <h2>Enter details below and click '<span class="link">Continue</span>' to create a new relief plan</h2> <form id="new_incident_form" name="new_incident_form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td><label for="incident_number">Incident Number:</label></td> <td><input id="incident_number" name="incident_number" type="text"></td> </tr> <tr> <td> <label for="start_date">Date and Time of Call:</label> </td> <td> <select id="date_day" name="date_day"> <?php for ($d=1; $d<=31; $d++) { echo "<option "; if ($d == date("d")) { echo "selected "; } echo "value=\"$d\">$d</option>\n"; } ?> </select> <select id="date_month" name="date_month"> <?php for ($m=1; $m<=12; $m++) { echo "<option "; if ($m == date("m")) { echo "selected "; } $M = date("M",mktime(0,0,0,$m)); echo "value=\"$m\">$M</option>\n"; } ?> </select> <select id="date_year" name="date_year"> <?php for ($y=date("Y"); $y>=(date("Y")-1); $y--) { echo "<option "; if ($y == date("Y")) { echo "selected "; } echo "value=\"$y\">$y</option>\n"; } ?> </select> </td> <td> <input id="incident_time" name="incident_time" type="text" value="<?php echo date("Hm", time()); ?>"> </td> </tr> <tr> <td> <label for="incident_desc">Incident Description:</label> </td> <td colspan="2"> <input id="incident_desc" name="incident_desc" type="text"> </td> </tr> <tr> <td colspan="3"><span class="submit_link" onClick="document.new_incident_form.submit()">Continue</span></td> </tr> </table> </form> </div> [/code] The problem is the time is not updating! It just keeps showing the same time? Is this a problem with my script is there a problem with my server/bowser?
-
Never used gd library, is it easy? what does it do? any beginner tutorials anywhere?
-
I hadn't really got to the coding stage cos I struggling to get my head around away to approach this. Starting with the main display, first of all I am going to have to find away to draw the horizontal bars. Though this would be a table row and I would use a <td> for each 15 minute period. To get the start time on the left, I would query to get the earliest start time of any event. The end time on the right of the display would be the current time. I would then have to some how, one 15 minute block at a time, query to see if there was an event active for that time and for the current row that I was checking, then if so, shade the background of the <td>. Loop this process over for each of the 40 records. Can anybody suggest where to start coding?
-
[quote author=jesirose link=topic=121733.msg501048#msg501048 date=1168399462] Post in the freelancers forum. Remember, you get what you pay for. You want good code, hire a good coder. You want free code - you'll regret it. [/quote] This is just something I have been trying to work on myself, not for any commercial project but I have been unsuccessful so wondered if anybody had any ideas?!
-
Would anybody like to design a small application for me as something to test your skills? I will try and explain what I am requiring: # there will be a mysql table containing a list of approx 40 records # there will be a further table that will record events of items held in first table, this will consist of a start time/date and end time/date # main page of app will show a timeline for each of 40 records across the page in like a horizontal bar chart, a line for each record, with a shaded area between the start and end times of any events for each record # there should be a quick update form somewhere on this page to add a new event for any of the records I hope that makes enough sense, anybody that would like to have ago at this and isn't sure whats required, please post your questions. Many thanks.
-
any suggestions?
-
Is there away to customise the order inwhich results are returned form a database? other than just the standard ASC or DESC of a column? I have a database that contains a set of records, one column holds a ref number that starts with either a B, A, G or S followed by a number. When the results are returned, I want to display the records in an order first sorted by the letter but in the order given ( B A G S ) then ascending numerical order of the following digits that make up the ref. Is there a way to do this, either within the MySQL query statement or in PHP once the results are returned?
-
Intermiediate query assistance required please
chiprivers replied to chiprivers's topic in MySQL Help
Is this right: SELECT count(*) AS c FROM posts, threads, boards WHERE posts.threadID = threads.threadID AND threads.boardID = boards.boardID -
I have three tables containing details for a forum I am building, with columns including those listed below: Table: boards Columns: boardID | board Table: threads Columns: threadID | boardID | thread_title Table: posts Columns: postsID | threadID On the page that lists the discussion boards I would like to display the number of threads within each board and also the total number of posts. What would be the most efficient way to return these numbers?