Jump to content

Caitlin-havener

Members
  • Content Count

    282
  • Joined

  • Last visited

Everything posted by Caitlin-havener

  1. Hey there! I'm trying to read in a csv and split the data at commas unless the string is encapsulated between double quotes. How would I do this? I know the function, its just the regular expression that confuses me!
  2. Text file attached. Current code, below. Some files were renamed, others disappeared into the twilight zone. <?php$file=fopen("img/emvivacesupplemental2012/filelist.txt","r");$workingDir=getcwd();$directory= "\\img\\emvivacesupplemental2012\\450pxw\\";$newDirectory="\\img\\emvivacesupplemental2012\\gallery\\";$allFiles[][]= array();while (!feof($file)){$fileLine=trim(fgets($file));var_dump(scandir($workingDir.$directory));//echo $workingDir.$directory.$fileLine." is...<br/>"; //var_dump(file_exists($workingDir.$directory.$fileLine)); for($i=1000;$i<=9999;$i++) { //if first f
  3. I've already made the gallery folder... next... lol. Still errors mehh
  4. Kay im still getting this error with and without the working directory specified: Warning: rename(C:\wamp\www\alluringassets\img\emvivacesupplemental2012\450pxw\8518_b.jpg,C:\wamp\www\alluringassets\img\emvivacesupplemental2012\gallery\8518_gallery_0.jpg) [function.rename]: The system cannot find the file specified. (code: 2) in C:\wamp\www\alluringassets\renamegalleryimgs.php on line 20 while (!feof($file)){$fileLine=trim(fgets($file)); for($i=1000;$i<=9999;$i++) { //if first four characters if ($i==substr($fileLine,0,4)) { $allFiles[$i][]=$fileLine; foreach ($allFiles as $v1
  5. Someone else helped me on facebook. I actually had to use trim function ! Will let you know if I have trouble with this next part shortly
  6. It's yielding all 1's!! Do I still need to change permissions??
  7. Forget those if statements for a moment. This is what I need to figure out. The following code is echoing does not exist for all the files. I need to first have them echoing that they do exist. $file=fopen("img/emvivacesupplemental2012/filelist.txt","r");$workingDir=getcwd(); $directory= "\\img\\emvivacesupplemental2012\\450pxw\\";$newDirectory="/img/emvivacesupplemental2012/gallery/"; $allFiles[][]= array(); while (!feof($file)){$fileLine=$workingDir.$directory.fgets($file);if (file_exists($fileLine)){ echo ($fileLine . "exists <br/>");}else{ echo ($fileLine. "does NOT exist </b
  8. I'm working on wamp local server trying to rename some files with the following code: <?php$file=fopen("img/emvivacesupplemental2012/filelist.txt","r");$workingDir=getcwd(); $directory= "\\img\\emvivacesupplemental2012\\450pxw\\";$newDirectory="/img/emvivacesupplemental2012/gallery/"; $allFiles[][]= array(); while (!feof($file)){/*$fileLine=$workingDir.$directory.fgets($file);if (file_exists($fileLine)){ echo ($fileLine . "exists <br/>");}else{ echo ($fileLine. "does NOT exist </br>");}*/ for($i=1000;$i<=9999;$i++) { //if first four characters if ($i==substr($fileL
  9. See: http://sulley.dm.ucf...nt2/viewer.html user enters a search term, then click submit. It should open the php file via the javascript click function which performs a cURL response then returns the JSON object to the javascript to parse. Right now im just trying to get the JSON object printed to the console in the javascript function. Can anyone see the issue? in developer tools the network response shows the JSON object but its not printing to console. html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="h
  10. When the user visits viewer.html, they should be prompted to enter a search term. Oncethey have entered the term and hit the submit button, an XHR request for getThumbs.phpshould occur that performs a cURL request of the Flickr API that returns 40 results forphotos that match the search term entered by the user as XML.-­‐ That XML response should be parsed using one of the following methods: OUTPUT 1 – XML to PHPo getThumbs.php should loop through the XML response and output a set of <img />elements that contain thumbnail URLs as the src attribute and the photo_id as the altattribute of
  11. <?phpsession_start();error_reporting(0);?><!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="text/html; charset=UTF-8" /><title>Caitlin's Acey Ducey</title><link rel="stylesheet" type="text/css" href="style.css" /></head><body><div class="roundedBox"><div class="top"><div class="bottom"><div class="left"><div class="right"><div class="topLeft"&g
  12. YAYY I got everything to work. Thank you so much! I used my own code though and implemented some of your stuff. Mine of course isn't as pretty but I didn't understand everything in yours and I had been looking at mine for so long so I just stuck to most of it
  13. You guys are so funny! LOL working on it this morning. Need to get it done today! MEHH
  14. Make some websites. For friends... whatever... can only get better by doing it.
  15. var numberQuestions = 8;var numberOfQuestions= new Array();//preload functionfunction init(){var anchor = document.getElementsByTagName('a');//set up flag for how many times a given anchor is clickedfor (i=1; i<=numberQuestions; i++){ anchor[i].addEventListener('click', function(e) { e.preventDefault(); getAnswers(this.name); }, false); //OWEN IM HAVING THE SAME PROBLEM HERE WHERE I WANT TO USE THE ELEMENTS OF AN ARRAY AS INDIVIDUAL COUNTERS FOR EACH QUESTION... will this work? var clickCounter= newArray(); //flag to count how many times a given link is clicked clickCounte
  16. pseudocode var numberQuestions = 8;var numberOfQuestions= new Array(); //preload functionfunction init(){var anchor = document.getElementsByTagName('a');//set up flag for how many times a given anchor is clicked for (i=1; i<=numberQuestions; i++){anchor[i].addEventListener('click', function(e) {e.preventDefault();getAnswers(this.name);}, false); //OWEN IM HAVING THE SAME PROBLEM HERE WHERE I WANT TO USE THE ELEMENTS OF AN ARRAY AS INDIVIDUAL COUNTERS FOR EACH QUESTION... will this work?var clickCounter= newArray(); //flag to count how many times a given link is clickedclickCounter[i] = 0
  17. function sendRequest(fileName) { var xhr = new XMLHttpRequest(); if (xhr) { xhr.onreadystatechange = function() { displayResponse(xhr); } xhr.open("GET", fileName, true); xhr.send(null); } } function displayResponse(xhr) { if (xhr.readyState == 4) { if (xhr.status == 200 || xhr.status == 304) { //console.log("responseText is: " + xhr.responseText); var allAnswers = xhr.responseText.split('\n'); var numberFlag= []; var numberQuestions = 8; for(var i=0; i<allAnswers.length; i++) { //console.log(i + ": " + allAnswers[i]); var divideAnsw
  18. function sendRequest(fileName) { var xhr = new XMLHttpRequest(); if (xhr) { xhr.onreadystatechange = function() { displayResponse(xhr); } xhr.open("GET", fileName, true); xhr.send(null); } } function displayResponse(xhr) { if (xhr.readyState == 4) { if (xhr.status == 200 || xhr.status == 304) { //console.log("responseText is: " + xhr.responseText); var allAnswers = xhr.responseText.split('\n'); var numberFlag= new Array(); var numberQuestions = 8; for(var i=0; i<allAnswers.length; i++) { //console.log(i + ": " + allAnswers[i]); var divideA
  19. Main html file (this will eventually contain a list of questions): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>DIG4503 - Caitlin Havener - Assignment 1</title><script type="text/javascript" src="a1.js"></script></head><body><a href="answers.txt">click here</a><div id="responseDiv"></div></body></html> Javascr
  20. Same problems on my android, plus it doesn't scroll horizontally on my android
  21. Hey thank you so much! It seemed to be working on my apache local server but now that I have uploaded it.. the scroller doesn't load on every page, sometimes it doesn't scroll vertically, and finally I don't think the wrapper style is being applied (?) http://sulley.dm.ucf.edu/~ca081919/DIG4104c/project1/project1.html <!DOCTYPE html><html><head><title>Garfield</title><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" /><link rel="stylesheet"
  22. Why couldn't this work function writeMenu(i){ var myScroll[i]; function loaded() { var wrapperIndex= "wrapper" + i; myScroll[i] = new iScroll(wrapperIndex, { hScroll: true, onBeforeScrollStart: function (e) { e.preventDefault(); e.stopPropagation(); } }); } When called... writeMenu(1).... writeMenu(2) etcetera
  23. Theres no way to get around creating 20ish different scroller variables? lol could i do the following maybe... im going to try it later In the function writeMenu set it up with parameter 'i' and every time its called give it a new number writeMenu(1)... im just not sure how i would put var myscroll+i??? lol or 'wrapper'+i ... or can i just make it an array var myScroll?? def not sure about that 'wrapper' part writeMenu(){ var myScroll; function loaded() { myScroll = new iScroll('wrapper', { hScroll: true, onBeforeScrollStart: function (e) { e.preventDefault(); e.stopPropagation();
  24. Hallelujaaaassss thanksss! that worked.. I only have one major issue now. Then I'm going to get this done and get started on an Ajax project WOOHOO! http://sulley.dm.ucf.edu/~ca081919/DIG4104c/project1/project1.html I've made a function to write the menu so to avoid being repetitive. The scrolling menu is now only working on the first comic... when you click the links for the other ones its just a regular old div with a html scroll bar. I'm hoping I don't have to make seperate id's for EACH wrapper... MEH... please advise Main code <!DOCTYPE html><html><head><title&g
  25. http://sulley.dm.ucf.edu/~ca081919/DIG4104c/project1/project1.html Main file<!DOCTYPE html><html><head><title>Garfield</title><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" /><link rel="stylesheet" href="mystyle.css" /><link rel="stylesheet" href="themes/comic.min.css" /><script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script><script type="text/javascript" src="http://code.jquery.com
×
×
  • Create New...