Jump to content

DerpDiamonds

Member
  • Posts

    30
  • Joined

  • Last visited

Awards

This user doesn't have any awards

Recent Profile Visitors

858 profile views

DerpDiamonds's Achievements

  1. Just out at the moment, will do when I get back.
  2. I am using the account when I setup the machine, and by "won't access the files within it" I mean that I cannot view the folders. Do you want the samba config?
  3. So I am trying to setup a samba server where I can regularly send my windows backups to this server. But windows can recognise the server, but won't access the files within it. I have been at this for a couple days and do not know the problem. If you need any logs or files I will send them. Please help! Thanks!
  4. So I am trying to make a website, here is the code: <!DOCTYPE html> <html> <meta charset="utf-8"> <title class=".title">Photography By Emily</title> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/theme.css" rel="stylesheet"> <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700,400italic,700italic" rel="stylesheet" type="text/css"> <link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"> <header class="intro"> <div class="intro-body"> <div class="container"> <div class="row"> <div class="col-md-8 col-md-offset-2"> <h1 class="brand-heading">Gallery</h1> <p class="intro-text">By Emily</p> <a href="#about" class="btn btn-circle page-scroll"><i class="fa fa-angle-double-down animated"></i></a></div> </div> </div> </div> </header> <body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top"> <nav class="navbar navbar-custom navbar-fixed-top" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse"> <i class="fa fa-bars"></i> </button> <a class="navbar-brand page-scroll" href="index.html">Emie Ashy Photography</a> </div> <div class="collapse navbar-collapse navbar-right navbar-main-collapse"> <ul class="nav navbar-nav"> <li> <a href="index.html">Home</a> </li> <li> <a href="pictures.html">Pictures</a> </li> <li> <a href="page-sample.html">Samples</a> </li> <li> <a href="contact.html">Contact</a> </li> </ul> </div> </div> </nav> <section id="portfolio"> <div class="gallery"> <div class="container content-section text-center"> <div class="row"> <h2>My Pictures</h2> </div> </div> <ul> <li class="col-md-3"><img src="http://unsplash.it/680/380?random=1" alt=""></li> <li class="col-md-3"><img src="http://unsplash.it/680/380?random=2" alt=""></li> <li class="col-md-3"><img src="http://unsplash.it/680/380?random=3" alt=""></li> <li class="col-md-3"><img src="http://unsplash.it/680/380?random=4" alt=""></li> <li class="col-md-3"><img src="http://unsplash.it/680/380?random=5" alt=""></li> <li class="col-md-3"><img src="http://unsplash.it/680/380?random=6" alt=""></li> <li class="col-md-3"><img src="http://unsplash.it/680/380?random=7" alt=""></li> <li class="col-md-3"><img src="http://unsplash.it/680/380?random=8" alt=""></li> </ul> </div> </section> <footer> <div class="container text-center"> <p class="credits"> Copyright &copy; Your Website 2017 </p> </div> </footer> <script src="js/jquery.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/jquery.easing.min.js"></script> <script src="js/theme.js"></script> </body> </html> But I would like a drop-down so people can pick if they would like a photo in a frame or something else and a add to cart button next to it, but can seem to find out how. Does anyone know how you would do this?
  5. So i have this code, but my LED won't turn on. Please help! /* Web Server A simple web server that shows the value of the analog input pins. using an Arduino Wiznet Ethernet shield. Circuit: * Ethernet shield attached to pins 10, 11, 12, 13 * Analog inputs attached to pins A0 through A5 (optional) created 18 Dec 2009 by David A. Mellis modified 9 Apr 2012 by Tom Igoe */ #include <SPI.h> #include <Ethernet2.h> // Enter a MAC address and IP address for your controller below. // The IP address will be dependent on your local network: byte mac[] = { 0x90, 0xA2, 0xDA, 0x10, 0x8B, 0xBF }; IPAddress ip(192, 168, 1, 195); // Initialize the Ethernet server library // with the IP address and port you want to use // (port 80 is default for HTTP): EthernetServer server(80); int led = 9; String readString; void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only } // start the Ethernet connection and the server: Ethernet.begin(mac, ip); server.begin(); Serial.print("server is at "); Serial.println(Ethernet.localIP()); pinMode(led, OUTPUT); } void loop() { // listen for incoming clients EthernetClient client = server.available(); if (client) { Serial.println("new client"); // an http request ends with a blank line boolean currentLineIsBlank = true; while (client.connected()) { if (client.available()) { char c = client.read(); Serial.write(c); // if you've gotten to the end of the line (received a newline // character) and the line is blank, the http request has ended, // so you can send a reply if (c == '\n' && currentLineIsBlank) { // send a standard http response header client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println("Connection: close"); // the connection will be closed after completion of the response client.println("Refresh: 5"); // refresh the page automatically every 5 sec client.println(); client.println("<!DOCTYPE HTML>"); client.println("<html>"); client.print(F("<button onclick=\"location.href='/LED=0'\" type='button'>LED OFF</button>")); client.print("</br>"); client.print("</br>"); client.print(F("<button onclick=\"location.href='/LED=1'\" type='button'>LED ON</button>")); client.println("</html>"); break; } if (c == '\n') { // you're starting a new line currentLineIsBlank = true; } else if (c != '\r') { // you've gotten a character on the current line currentLineIsBlank = false; } } } // give the web browser time to receive the data delay(1); if (readString.indexOf("LED=0") >0){ digitalWrite(led, LOW); } if (readString.indexOf("LED=1") >0){ digitalWrite(led, HIGH); } // close the connection: client.stop(); Serial.println("client disconnected"); } } Thanks!
  6. Here: #include <SPI.h> #include <Ethernet2.h> int led = "13"; // Enter a MAC address and IP address for your controller below. // The IP address will be dependent on your local network: byte mac[] = { 0x90, 0xA2, 0xDA, 0x10, 0x8B, 0xBF }; IPAddress ip(192, 168, 1, 179); String readString; // Initialize the Ethernet server library // with the IP address and port you want to use // (port 80 is default for HTTP): EthernetServer server(80); void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only } // start the Ethernet connection and the server: Ethernet.begin(mac, ip); server.begin(); Serial.print("server is at "); Serial.println(Ethernet.localIP()); pinMode(led, OUTPUT); //initalize the led as an output } void loop() { // listen for incoming clients EthernetClient client = server.available(); if (client) { Serial.println("new client"); // an http request ends with a blank line boolean currentLineIsBlank = true; while (client.connected()) { if (client.available()) { char c = client.read(); Serial.write(c); //read char by char HTTP request if (readString.length() < 100) { //store characters to string readString += c; //Serial.print(c); } if (c == '\n' && currentLineIsBlank) { // send a standard http response header client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println("Connection: close"); // the connection will be closed after completion of the response client.println("Refresh: 5"); // refresh the page automatically every 5 sec client.println(); client.println("<!DOCTYPE HTML>"); client.println("<html>"); client.print("HELLO"); client.println("<a href=\"/?0\"\">Turn On LED</a>"); client.println("<a href=\"/?1\"\">Turn Off LED</a><br />"); client.println("</html>"); break; } } } // give the web browser time to receive the data delay(1); if (readString.indexOf("?0") >0){ digitalWrite(led, HIGH); } if (readString.indexOf("?1") >0){ digitalWrite(led, LOW); } } } It now seem sot not be responding
  7. Here: #include <SPI.h> #include <Ethernet2.h> int led = "13"; // Enter a MAC address and IP address for your controller below. // The IP address will be dependent on your local network: byte mac[] = { 0x90, 0xA2, 0xDA, 0x10, 0x8B, 0xBF }; IPAddress ip(192, 168, 1, 179); String readString; // Initialize the Ethernet server library // with the IP address and port you want to use // (port 80 is default for HTTP): EthernetServer server(80); void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only } // start the Ethernet connection and the server: Ethernet.begin(mac, ip); server.begin(); Serial.print("server is at "); Serial.println(Ethernet.localIP()); pinMode(led, OUTPUT); //initalize the led as an output } void loop() { // listen for incoming clients EthernetClient client = server.available(); if (client) { Serial.println("new client"); // an http request ends with a blank line boolean currentLineIsBlank = true; while (client.connected()) { if (client.available()) { char c = client.read(); Serial.write(c); //read char by char HTTP request if (readString.length() < 100) { //store characters to string readString += c; //Serial.print(c); } if (c == '\n' && currentLineIsBlank) { // send a standard http response header client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println("Connection: close"); // the connection will be closed after completion of the response client.println("Refresh: 5"); // refresh the page automatically every 5 sec client.println(); client.println("<!DOCTYPE HTML>"); client.println("<html>"); client.print("HELLO"); client.println("<a href=\"/?0\"\">Turn On LED</a>"); client.println("<a href=\"/?1\"\">Turn Off LED</a><br />"); client.println("</html>"); break; } } } // give the web browser time to receive the data delay(1); if (readString.indexOf("?0") >0){ digitalWrite(led, HIGH); } if (readString.indexOf("?1") >0){ digitalWrite(led, LOW); } } }
  8. Sorry I haven't been responding, I have been doing other things. But now I have added that code. When I go to access the website it just downloads a file called download. Here is a picture:
  9. So I have updated my code (it should be much cleaner now): #include <SPI.h> #include <Ethernet2.h> // Enter a MAC address and IP address for your controller below. // The IP address will be dependent on your local network: byte mac[] = { 0x90, 0xA2, 0xDA, 0x10, 0x8B, 0xBF }; IPAddress ip(192, 168, 1, 179); // Initialize the Ethernet server library // with the IP address and port you want to use // (port 80 is default for HTTP): EthernetServer server(80); void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only } // start the Ethernet connection and the server: Ethernet.begin(mac, ip); server.begin(); Serial.print("server is at "); Serial.println(Ethernet.localIP()); pinMode(13, OUTPUT); //initalize the led as an output } void loop() { // listen for incoming clients EthernetClient client = server.available(); if (client) { Serial.println("new client"); // an http request ends with a blank line boolean currentLineIsBlank = true; while (client.connected()) { if (client.available()) { char c = client.read(); Serial.write(c); // if you've gotten to the end of the line (received a newline // character) and the line is blank, the http request has ended, // so you can send a reply if (c == '\n' && currentLineIsBlank) { // send a standard http response header client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println("Connection: close"); // the connection will be closed after completion of the response client.println("Refresh: 5"); // refresh the page automatically every 5 sec client.println(); client.println("<!DOCTYPE HTML>"); client.println("<html>"); client.print("HELLO"); client.println("<a href=\"/?0\"\">Turn On LED</a>"); client.println("<a href=\"/?1\"\">Turn Off LED</a><br />"); client.println("</html>"); break; } } } // give the web browser time to receive the data delay(1); if (readString.indexOf("?0") >0){ digitalWrite(led, HIGH); } if (readString.indexOf("?1") >0){ digitalWrite(led, LOW); } } } But I have another error: exit status 1 'readString' was not declared in this scope Do you know what this error is? If so how do I fix it?
  10. So first of all what I am asking is if I can have help with this. My Arduino code: #include <SPI.h> #include <Ethernet2.h> int led = 13; String POST = ""; String SET = ""; // Enter a MAC address and IP address for your controller below. // The IP address will be dependent on your local network: byte mac[] = { 0x90, 0xA2, 0xDA, 0x10, 0x8B, 0xBF }; IPAddress ip(192,168,1,179); // Initialize the Ethernet server library // with the IP address and port you want to use // (port 80 is default for HTTP): EthernetServer server(80); void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); // start the Ethernet connection and the server: Ethernet.begin(mac, ip); server.begin(); Serial.print("server is at "); Serial.println(Ethernet.localIP()); pinMode(led, OUTPUT); } void loop() { // listen for incoming clients EthernetClient client = server.available(); if (client) { Serial.println("new client"); // an http request ends with a blank line boolean currentLineIsBlank = true; while (client.connected()) { if (client.available()) { char c = client.read(); Serial.write(c); // if you've gotten to the end of the line (received a newline // character) and the line is blank, the http request has ended, // so you can send a reply if (c == '\n' && currentLineIsBlank) { // send a standard http response header client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println("Connnection: close"); client.println(); client.println(""); client.println("Jack's Arudino"); client.println(""); client.println(""); client.println(""); client.println("<h1>Control Jack's LED</h1>"); client.print("<form method=get>"); client.print("<input type='radio' value='0'> Off<br>"); client.print("<input type='radio' value='1'> On<br>"); client.print("<input type=submit value=submit></form>"); client.print("</form>"); client.println(""); break; } if (c == '\n') { // you're starting a new line currentLineIsBlank = true; } else if (c != '\r') { // you've gotten a character on the current line currentLineIsBlank = false; } } } // give the web browser time to receive the data delay(1); } if(SET == "on"){ digitalWrite(led, HIGH); } else{ digitalWrite(led, LOW); } } So when I run this code, I can connect to the web page 192.168.1.179 and it all works, but when I click, lets say the off box the LED switches off for a second and then comes back on. Like what is this magic? So I am asking for help to sort this out so the LED will actually turn off, and also my next step after this will be to make it so when I type say '192.168.1.179/?0' it turns the LED off and when I type '192.168.1.179/?1' it turns the LED on. This will then lead me to making my own Android app. Thanks
  11. When I have done that stuff and plugged the LCD and the button in the LCD responds, but just not with the button plugged in. What is this? Is it a bug or a problem with my arduino editor?
  12. So I have the grove starter kit for the Arduino Uno (https://www.seeedstudio.com/Grove-Starter-Kit-for-Arduino-p-1855.html#) and have started to play around with it, but what I am trying to do now it when you click the button that comes with the starter kit it changes the text on the LCD screen that comes in the starter kit also. I have tried to get it working but I can't. My Code: #include <Wire.h> #include "rgb_lcd.h" rgb_lcd lcd; // constants won't change. They're used here to // set pin numbers: const int buttonPin = 2; // the number of the pushbutton pin // variables will change: int buttonState = 0; // variable for reading the pushbutton status void setup() { // initialize the pushbutton pin as an input: pinMode(buttonPin, INPUT); // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. lcd.print("System Enabled!"); } void loop(){ } void activate(){ // read the state of the pushbutton value: buttonState = digitalRead(buttonPin); // check if the pushbutton is pressed. // if it is, the buttonState is HIGH: if (buttonState == HIGH) { lcd.print("System Disabled!"); } if (buttonState == LOW) { lcd.print("System Enabled!"); } } Thanks!
  13. So i would like to get a custom ROM for my S7 Edge, but the thing is which one. Can you guys link me some custom ROMs that have: A modern look. Has the edge function Doesn't look like normal stock Security And anything else i don't care about Thanks
  14. So I am trying to implement Goggle reCAPTCHA into my HTML contact form with PHP validation, but I keep getting this error: FATAL ERROR: USING $THIS WHEN NOT IN OBJECT CONTEXT IN/HOME/ASHWELM/PUBLIC_HTML/EZEEFIXPC.COM/FORM.PHP ON LINE 12 But I don't know what is happening. Here is my HTML: <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="shortcut icon" href="images/favicon.ico" /> <title>EzeeFixPC</title> <meta charset="utf-8"/> <link rel="stylesheet" href="assets/css/main.css" /> <script src='https://www.google.com/recaptcha/api.js'></script> <script> function validateForm() { var x = document.forms["contact"]["email"].value; var atpos = x.indexOf("@"); var dotpos = x.lastIndexOf("."); if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) { alert("Not a valid e-mail address"); return false; } } </script> </head> <body> <div class="loader"></div> <!-- Header --> <header id="header"> <div class="inner"> <a href="index.html" class="logo">EzeeFixPC</a> <nav id="nav"> <a href="index.html">Home</a> <a href="services.html">Services</a> <a href="about.html">About</a> <a href="customers.html">Customers</a> <a href="partners.html">Partners</a> <a href="media_services.html">Media Services</a> <a href="contact.html">Contact</a> </nav> </div> </header> <a href="#menu" class="navPanelToggle"><span class="fa fa-bars"></span></a> <!-- Main --> <section id="main"> <div class="inner"> <header> <h2>Contact</h2> </header> <form name="contact" method="post" action="form.php" onsubmit="return validateForm();"> <div class="field"> <label for="name">Name</label> <input type="text" name="name" id="name" /> </div> <div class="field"> <label for="email">Email</label> <input type="text" name="email" id="email" /> </div> <div class="field"> <label for="message">Message</label> <textarea name="message" id="message" rows="10"></textarea> </div> <div class="g-recaptcha" data-sitekey="6LeSHwcUAAAAADhShPBUWNmX2Et9smafxUMzLFFT"></div> <ul class="actions"> <li><input type="submit" value="Send Message" class="alt" /></li> </ul> </form> </div> </section> <!-- Footer --> <section id="footer"> <div class="inner"> <div class="copyright"> <h6> &copy; Design by <a href="http://mikeashwell.com/">EzeefixPC.com</a>. <img src="images/xhtml-verified.png" alt="" width="88" /> </h6> </div> </div> </section> <!-- Scripts --> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/skel.min.js"></script> <script src="assets/js/util.js"></script> <script src="assets/js/main.js"></script> </body> </html> And here is my PHP: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="contact.html; charset=utf-8" /> <link rel="stylesheet" href="assets/css/main.css" /> <link rel="shortcut icon" href="images/favicon.ico" /> <title>Confirmation Page</title> </head> <body><h1><center> <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $this->page); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $this->pageSource = curl_exec($ch); curl_close($ch); $name = $_POST['name']; $email = $_POST['email']; $subject ='Web form enquiry'; $message = $_POST['message']; $to = 'test@gmail.com'; $captcha = $_POST['g-recaptcha-response']; $headers = "From: ".$email . "\r\n" . "CC: test@gmail.com"; $secretKey = "secret key"; $ip = $_SERVER['REMOTE_ADDR']; $response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secretKey."&response=".$captcha."&remoteip=".$ip); $responseKeys = json_decode($response,true); if(intval($responseKeys["success"]) !== 1) { echo '<h2>You answered the captcha incorrectly!</h2>'; } else { if (mail ($to, $subject, $message, $headers)) { echo '<p>Your message has been sent!</p>'; } } ?> </body></h1></center> </html> Thanks.
×