31 Posted Topics
Re: $output='01/07/201521/08/201691754.0'; $var1 = substr($output, 0, 9); $var2 = substr($output, 10, 19); $var3 = substr($output, 20, 26); http://php.net/manual/en/function.substr.php | |
Re: You're fetching it as an associative array so you can do something like: $customer = $row['customer']; $customername = $row['costomername']; | |
Re: Great place to start: https://buckysroom.org/videos.php?cat=11 For more advanced stuff: https://www.youtube.com/user/phpacademy | |
Re: Shouldn't it be $_GET["test"]? if (isset($_GET['test'])) { $test = $_GET['test']; ... } | |
Re: https://github.com/PHPMailer/PHPMailer | |
How do you pass a value of an input field from angular to node? For HTML and PHP you would do something like $username = $_POST['field_name'];, is there something similar with angular and node? | |
I was trying to get the basics of angular.js down by following this video: http://www.youtube.com/watch?v=i9MHigUZKEM#t=44m52s The routing in the video is outdated so I tried to fix it with by including the new required arguments like ['ngRoute']. I can't figure out why it isn't working. Am I missing addtional things … ![]() | |
I'm new to Wordpress and from what I'm understanding if you're making a website with it, you don't have to write(or know(?)) code for anything unless you're making your own theme or plugin? Let's say you wanted to have a user registration/login system on your website, how would you do … | |
Is it possible to append a button with a id to a div and then give it a mouseclick event later in the code? I was trying it out and it wouldn't work. html: <body> <input type="button" id="button" value="Click me"/> <div id="add"></div> </body> js: $('#button').click(function() { $('#add').append('Hi, I am a … | |
In the graphic representation of Hoare's parititon: http://i.imgur.com/OtMaNsn.png Why does 'j' decrement by 1 when 'i' reaches 6? Since A[j] <= pivot and A[i] >= pivot at that point, shouldn't A[i] swap with A[j]? I am a bit confused about this part. The pseudo code I am following is this: … | |
Hi, I'm trying to enable a submit button only when all the input fields are filled. Is this the correct way of checking to see if an input field is empty? $(document).ready(function() { $('#submit_button').attr('disabled', 'disabled'); $.each(':input', function() { if ($(this).val() != "") { $('#submit_button').removeAttr('disabled'); } }); }); | |
I'm trying to get the hang of PDO and I can't seem to get this to work. I'm tyring to insert some data into a databse, but nothing shows up when I click submit. What am I doing wrong? <?php require 'connect.php'; if (isset($_POST['username'], $_POST['password'])) { $username = $_POST['username']; $password … ![]() | |
Is it possible to point to a certain index of a value? For example, int x = 2576, is it possible to do something like x[2]? I know you can do it with strings, but can you do it with numbers? | |
Hi, I'm trying to send data from a form to a page called "register.php" by using the POST method. Can this be done on a localhost? I'm quite new at this and I am practicing on a localhost server with phpmyadmin. When I click the "register" button it shows the … ![]() | |
Hi, is knowing HTML, CSS and Javascript sufficient enough for getting an internship somewhere? I'm currently a full-time college student. I'm really worried about not knowing enough for one. What was your first internship like? | |
Is this considered 2 loops? I was confused about it because it shared an end point so I assumed that it counted it 2 loops. Am I wrong? http://i.imgur.com/wvM3C.png | |
Why doesn't it display the output for mouseReleased and mouseClicked in console? Is there something that I am missing? import java.applet.*; import java.awt.*; import java.awt.event.*; public class MouseMotion extends Applet implements MouseMotionListener{ public void init() { addMouseMotionListener(this); } public void mouseDragged(MouseEvent e) { System.out.println("mouse is being dragged at location (" … | |
Hi, I just started learning about java applets recently and was wondering why the shapes won't appear on screen when I press a button. import java.applet.*; import java.awt.*; import java.awt.event.*; public class Buttons extends Applet implements ActionListener { public void init() { button1 = new Button("Button 1"); add(button1); button1.addActionListener(this); button2 … | |
If there were 2 nodes like this: [url]http://i.imgur.com/21x2m.png[/url] Would newNode be pointing to itself if there was a code like: [CODE]newNode->next = intNode->next[/CODE] Also what would intNode be pointing at if this code was right after the one above it: [CODE]intNode->next->prev = newNode[/CODE] | |
[CODE] template <typename T> int ct2 (tnode<T> *t) { int ctLeft, ctRight, ct; if (t == NULL) return 0; else { return ct2(t->left)+ct2(t->right)+ ((t->left != NULL && t->right != NULL) ? 1 : 0); } [/CODE] I tried running it and I still can't figure out what it does. Specifically … | |
Not getting any compile error, but I'm getting an output that looks like: -858993460 5 4 3 2 Instead of 5 4 3 2 1. What am I doing wrong? [CODE]#include <iostream> #include <stack> using namespace std; template <typename T> void reverse(stack<T> &sk) { stack<int> tempStack; while(!sk.empty()) { tempStack.push(sk.top()); sk.pop(); … | |
recommend using for singly and doubly linked lists? | |
I'm trying to mix it up with operator overloading and I can figure out what I'm doing wrong. Here's the code: [CODE]#ifndef TEST_H #define TEST_H using namespace std; template <typename T> class Test { private: T number; public: Test(T); friend Test operator+(Test<T> &a, Test<T> &b); friend ostream& operator<<(ostream& out, const … | |
How would I trace the steps for the function's output? [CODE]int f(int n) { if (n==0) return 1; else if(n==1) return 2; else return 2* f(n-2) + f(n-1); }[/CODE] Would it be something like: (Let's say n=6) step 1) 2 * f(6-2) + f(6-1) 2) 2 * f(4-2) + f(5-1) … | |
What does it mean if there is an ampersand right before the function name? Something like: int& myFunction(int& a, int& b) Also my book said something about how it doesn't create a copy of something if you pass it by reference, but what exactly does that mean? I never understood … | |
This topic is really hard for me to grasp. I tried making a program to test out operator overloading and I can't seem to get it to work. [CODE]#ifndef TESTCLASS #define TESTCLASS using namespace std; class testClass { public: testClass(double, double); friend testClass operator+(testClass& a, testClass& b); private: double num1, … | |
[CODE]void SortedNumberList::add(double number) { ListNode *nodePtr, *previousNodePtr; if (head == NULL || head->value >= number) { head = new ListNode(number, head); } else { previousNodePtr = head; nodePtr = head->next; while (nodePtr != NULL && nodePtr->value < number) { previousNodePtr = nodePtr; nodePtr = nodePtr->next; } previousNodePtr->next = new ListNode(number, … | |
linked lists? I recently started learning about it and it is really confusing. What tutorial would you recommend? | |
What is the difference between a stand-alone and a member-function operator? |
The End.