83 Posted Topics
Hi all, I'm working with a function that only accepts values between 0 and 1, so I need to scale my data first. The first part involved in this is calculating the high/low values of my inputs. I pass this into a function that churns out X and Y values … | |
Hi all, I have an array $pTimeseries with 365 items inside it. I use a simple for statement, as below: //Add TimeStamp to Historic Data for($i = 0; $i < (count($pTimeseries)); $i++) { $pTimeseries[$i][1] = $rawData[$i + $backdate][0]; } In my Apache error logs I get "Undefined offset: 366" all … | |
Hi all, For some reason, a white edge has appeared down the side of my website. It was never there before. The web suggested I should make sure to reset margins etc to 0 at the top of my stylesheet, which I already do. The edge is not due to … | |
Hi all, I've been trying to follow the basic Apple developer tutorial, where you create a food tracker app. I can not get one part of the code to work, and I can't see why. Not only is it exactly the same as in the example, but searches online also … | |
Hi all, I have a multidimensional array [0]:[0], [1], [2], [3] and I want to try and find the min and max values of each index of that array over the whole array. I am using: for ($i = 0; $i < count($input); $i++) { $string1[] = $input[$i][1]; $string2[] = … | |
Hey there, Over the past few weeks as an excerise I've been trying to create a C# image viewer. At the moment I have one window, with a list of images displayed in a ListBox. When I the F5 button, a second window pops up at fullscreen, and I want … | |
Here's a fun one... How would you solve a basic simultanous equation with PHP? I have an array with a range [high,low] of [378,395] and I want to normalise the data in that array between the values of [-1, 1]. From that, using `x => ax + b`you get the … | |
Hi all, I am using a for statement to generate lots of arrays, example: Array ( [0] => 2 [1] => 395.0 [2] => 0.33 ) Array ( [0] => 3 [1] => 394.0 [2] => 0.81 ) But, I want to have them all within 1 array, example: Array … | |
Hi all, I am able to pull data from a CSV file into a string array using the following code. public static string[,] ReadCSV(string filename) { //Read Text string whole_file = System.IO.File.ReadAllText(filename); //Split into Lines whole_file = whole_file.Replace('\n', '\r'); string[] lines = whole_file.Split(new char[] { '\r' }, StringSplitOptions.RemoveEmptyEntries); //Calucluate Rows … | |
I am using a mySQL query in PHP to pull content from rows into an array. A simple for statement is then displaying this data: for ($i = 0; $i < ($num_rows); $i++): //Find Author Name $query = 'SELECT firstname, lastname FROM vd_users WHERE id = ?'; $statement = $mySQL_con->prepare($query); … | |
Hi there, I'm still fairly new to programming. Would someone be able to explain exactly how different windows should be used in MS Visual Studio? It seems that variable sharing between different windows is problematic. So does that mean that if you are trying to do multiple things on one … | |
Hi all, I have a multi-dimensional array. Using a **for** function, I would like to display the information inside the array. This means using a variable $i for the first index of the array, which I think is causing the problem. I am getting the error message: `Undefined offset: 2` … | |
Hi there, I am trying to populate a page with multiple rows from a mySQL database. To grab the data, I am using: for ($i=1; $i < 5; $i++) { $query = 'SELECT * FROM table WHERE column = ?'; $statement = $mySQL_con->prepare($query); try { $statement->execute(array($i)); } catch (PDOException $error) … | |
Hi there, As an excerise I am trying to create a basic PHP blog. Creating the user login system was pretty straightforward, and I've 2 mySQL tables, one with user information, and one with the blog information (and with a foreign key referencing the user id). However, I'm stuck for … ![]() | |
Hi there, I created a new table and forgot to set the primary key with an auto_increment. I went back and use: `ALTER TABLE table ADD PRIMARY KEY AUTO_INCREMENT (column);` However, now whenever I try to insert a new row of data, I get the error message "Duplicate entry '0' … | |
Hey guys, Using PHP I store a datetime in a mySQL table. I am trying to draw that out and reformat the time. The datetime is contained within the array $user_data['6'] and the format in the mySQL table is set to datetime. The error I'm getting is Call to a … | |
Hi all, I am using the PHP Facebook SDK to login users. A login button validates the user and returns to a callback 'fb-callback.php'. On this page, I dump the returned data into a mySQL table, start a Session, and redirect to the homepage. As a test, I stopped the … | |
Hi guys, I can't get passed this error: Call to a member function bind_param() on a non-object. I have spent hours looking for insights, and can see that my $statement returns FALSE, but have no idea why? My understanding of PHP is limited, so it might help if I actually … | |
Does anyone know if it's possible to intercept the button presses off a presentation remote, just like we are able to listen for keyboard strokes? In this case, the buttons on the remote don't appear to be linked to a keyboard button. | |
Hi there, I have two WPF windows. The first (Window1) has a timer that moves an item down a list, then passes the new current selection to a global variable I defined in App.xaml.cs Window 2 then has another timer that is set to .1 of a second after the … | |
Could someone please explain to me the purpose or reasons for using Dispatcher.Invoke? I am getting the error: *The calling thread cannot access this object because a different thread owns it. * and a quick Google search suggested that was due to not using Dispatcher.Invoke (they also said it was … | |
Hi there, I've created a new C# WPF project. The first MainWindow displays a listbox of images within a folder and displays them inside a larger image object. I am trying to get Window1 to open a fullscreen version of the selected image, that changes depending on what image is … | |
Hi there, trying to do something I thought was pretty basic, but can't get around this error. I have a ListBox, List (AllImages) full of image paths, and two image elements. Image 1 displays the selected item, Image 2 displays selected item + 1 I have: `int inx = Convert.ToString(ImageList.SelectedIndex);` … | |
Hi all, I'm very new to software development. My main area is HTML/PHP/JavaScript, but have done a bit of C# before. I don't believe the idea I have is suited for a web development option, so am looking for ideas / a starting point for a solution to the below … | |
Hi all, I'm quite a new developer, and I've spent a long time trying to figure out what is causing this error: "SQLSTATE[HY093]: Invalid parameter number: parameter was not defined" As far as I can tell, all my parameters are defined? My code is below: $mySQL_query = "INSERT INTO vd_users … | |
Hi guys, Weird (maybe silly) isse with a CSS fade property using the following classes: /** CSS3 Animations **/ /* Key Frames ---------------------------------------------------- */ @-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:1; } } @-moz-keyframes fadeIn { from { opacity:0; } to { opacity:1; } } @-o-keyframes fadeIn … | |
Hi Guys, As part of an online store, I have a dropdown box where the user selects a size. If the user selects size L then the 'add to cart' button needs to link to a page different than if the user selected size M. I figured out that I … | |
Hi there, My PHP is appalling/non-existant. I have a HTML website with a PHP header that I've 'included' on all the pages. The problem is that this header colours red whichever page we are currently on, defined under the CSS as being 'active'. Therefore, from what I see, I need … | |
Hi there, I have a webpage in HTML, strong-links.org, and am tired of having to make changes to every single page when I update the header or footer, and someone suggested I can use PHP to reference the template within the HTML pages. As a test, I have test.strong-links.org/index2.html live … | |
Hi all, I am trying to populate text on my website from data stored in a MySQL database. I have this script before the <head> of my HTML to establish the connection: <?php $username = "USERNAME"; $password = "PASSWORD"; $hostname = "127.0.0.1:3306"; //connection to the database $dbhandle = mysql_connect($hostname, $username, … | |
Hi everyone, Just after some general advice. I have developed a website that contains several news widgets that will eventually need updating. I am not too fussed about keeping a record of past news events, but that could be nice. Basically my question is, what is the best way to … | |
Hi everyone, I am still quite new to HTML and PHP. I have a form in HTML pointing to a PHP script that sends an email. But it doesn't work - please tell me where I am going wrong! The HTML is: <div class="main-content three-fourths"> <h1>Get in touch</h1> <p class="lead">We'd … | |
Hi there, I have the following code to define the first article on the website I'm developing Strong-Links.org <article id="me" class="panel"> <img src="/images/Strong-Links.png"> <a href="#work" class="jumplink pic"> <span class="arrow icon fa-chevron-right"><span>See my work</span></span> <img src="images/me.jpg" alt="" /> </a> </article> This basically just places two images on the page, with me.jpg … |
The End.