Jump to content

skaterdav85

Members
  • Content Count

    874
  • Joined

  • Last visited

Posts posted by skaterdav85


  1. I found out what I was doing wrong. I created a template in my HTML like this:

    <script type="template" id="spanTmpl">   <span style="background-color:yellow;">{{match}}</span></script>

    and I was replacing {{match}} with the actual value. However, there is a text node before and after the span tag within that script block. If I put it all on one line, I dont have the text nodes anymore. I actually didn't think I was adding the text nodes until you suggested that I might be, so thanks! Here is a jsbin if you want to see a quick demo of what I was doing: http://jsbin.com/iwu...javascript,html


  2. I created a simple search box on my page. When the user makes a search, it takes the search term and finds it within a block of text. Whenever that search term is found, it is replaced by the same term wrapped in a span tag with a given class to highlight it in yellow. It works, but every time I insert new span elements within the block of text, it inserts a text node after it, causing there to be a space, and breaking up words. Can this be fixed using CSS?

    • Like 1

  3. Actually, my friend may have been doing something wrong, but I'm not sure what he was exactly doing wrong because I wasn't at his computer with him. However, he did create a repository on his account and added me as a collaborator and this was my workflow:

    1. git clone
    2. cd into the clone
    3. made some changes to the cloned copy
    4. git add .
    5. git commit -m 'new commits'
    6. git push origin master
    7. If step 6 failed because my local copy wasn't in sync with the remote copy, I had to first do: git pull origin master, and then do git push origin master

    The problem might have been because he didn't do an add and a commit to his local repository first before pushing to github, but I'm not sure.


  4. I have created a test project on git hub and added a github user as a collaborator to the project under the project admin settings. I had him clone the repo, make some changes, and try and push back to github, but it isn't working. Essentially he typed in these commands: $ git clone git://github.com/skaterdav85/TestProject.gitChanged the files and pushing to GitHub repo$ git push git@github.com/skaterdav85/TestProject.git master He gets this error though:Permission denied (publickey).fatal: The remote end hung up unexpectedly Any idea what this means or how to fix it? He has pushed to his own repo's before on github.


  5. i typed phing into mac's Finder and it didn't return anything. im not sure where PHP is on the mac. I wasn't using PHP through my MAMP stack. I didnt even have it turned on. I think PHP is enabled on mac by default, but im not sure where and im having trouble finding it. In Terminal, I did have to do sudo su to be able to attempt to install phing, which then returns that it is already installed


  6. More problems ... I ran these 2 commands and it installed phing. $> pear channel-discover pear.phing.info$> pear install phing/phing However, if I type in phing, it says command not found, but if I try and run those 2 commands above again, it says: Channel "pear.phing.info" is already initializedphing/phing is already installed and is the same as the released version 2.4.8install failed Any idea where it might be? If I type phing in Finder, it doesn't return anything. EDIT:I just uninstalled phing and reinstalled it and this is what it says:

    sh-3.2# pear install phing/phingUnknown remote channel: pear.phpunit.deUnknown remote channel: pear.phpunit.deWARNING: "pear/PEAR_PackageFileManager" is deprecated in favor of "pear/PEAR_PackageFileManager2"Unknown remote channel: pear.pdepend.orgUnknown remote channel: pear.phpmd.orgUnknown remote channel: pear.phpunit.deUnknown remote channel: pear.docblox-project.orgDid not download optional dependencies: phing/phingdocs, pear/VersionControl_SVN, pear/VersionControl_Git, channel://pear.phpunit.de/PHPUnit, channel://pear.phpunit.de/PHP_CodeCoverage, pear/PhpDocumentor, pecl/Xdebug, pear/PEAR_PackageFileManager, pear/Services_Amazon_S3, pear/HTTP_Request2, channel://pear.pdepend.org/PHP_Depend, channel://pear.phpmd.org/PHP_PMD, channel://pear.phpunit.de/phpcpd, channel://pear.docblox-project.org/DocBlox, pear/PHP_CodeSniffer, use --alldeps to download automaticallyphing/phing can optionally use package "phing/phingdocs" (version >= 2.4.8)phing/phing can optionally use package "pear/VersionControl_SVN" (version >= 0.3.4)phing/phing can optionally use package "pear/VersionControl_Git" (version >= 0.4.3)phing/phing can optionally use package "channel://pear.phpunit.de/PHPUnit" (version >= 3.6.0)phing/phing can optionally use package "channel://pear.phpunit.de/PHP_CodeCoverage" (version >= 1.1.0)phing/phing can optionally use package "pear/PhpDocumentor" (version >= 1.4.0)phing/phing can optionally use package "pecl/Xdebug" (version >= 2.0.5)phing/phing can optionally use package "pear/PEAR_PackageFileManager" (version >= 1.5.2)phing/phing can optionally use package "pear/Services_Amazon_S3" (version >= 0.3.1)phing/phing can optionally use package "pear/HTTP_Request2" (version >= 0.5.2)phing/phing can optionally use package "channel://pear.pdepend.org/PHP_Depend" (version >= 0.10.0)phing/phing can optionally use package "channel://pear.phpmd.org/PHP_PMD" (version >= 1.1.0)phing/phing can optionally use package "channel://pear.phpunit.de/phpcpd" (version >= 1.3.3)phing/phing can optionally use package "channel://pear.docblox-project.org/DocBlox" (version >= 0.15.0)phing/phing can optionally use package "pear/PHP_CodeSniffer" (version >= 1.3.0)downloading phing-2.4.8.tgz ...Starting to download phing-2.4.8.tgz (419,121 bytes).....................................................................................done: 419,121 bytesinstall ok: channel://pear.phing.info/phing-2.4.8


  7. So I installed SVN and it also told me to edit the path by creating a hidden file called .bash_profile and adding the line: export PATH=/opt/subversion/bin/:$PATH then you have to let terminal know the file has changed by running: . .bash_profile I did the same for pear and now it works! I'm not sure what .bashrc is but I think you're supposed to put new paths in a file called .bash_profile. (Im on a mac 10.6 so i dont know if that makes a difference). PATH editing: http://www.troubleshooters.com/linux/prepostpath.htmInstalling SVN and adding svn to your path: http://www.rubyrobot.org/tutorial/subversion-with-mac-os-x


  8. I just started playing around with HTML 5 video today. What is is the easiest way to convert an MP4 video to OGG? I did Google it but before I start downloading free trials for conversion software, I thought I'd get a second opinion.

    • Like 1

  9. Well I installed PEAR fine and after running those commands, it says I installed Phing. However, if I type in phing -v, it says 'command not found'. I browsed around on Google and I think it has to do with some path issue, but I'm not sure how to fix it.


  10. Thanks for the resources! I actually just installed Git on my work computer (a PC) and I noticed there was a Git GUI program along with Git Bash. I just used Git Bash since I am familiar with the terminal commands but maybe I should give the GUI version a shot. How do you like it? Easy to use? I guess for macs we're just left w the command line, which is fine i guess but it was a bit to learn when i first started. Thankfully, im over that hump now.


  11. thanks Installing Phing has been a huge pain. I found it painful to just install Pear, but once I did that thanks to your help, now it doesn't recognize the Phing command. It seems like using YUI Compressor to compress CSS and JS, and then manually concatenating files might be easier. Do you have a build process in place?


  12. i just tried it in superuser mode and it still doesnt recognize the command. basically I typed in sudo su, entered my password, and then ran: sudo php -d detect_unicode=0 go-pear.pharAfter typing that, I get this: Below is a suggested file layout for your new PEAR installation. Tochange individual locations, type the number in front of thedirectory. Type 'all' to change all of them or simply press Enter toaccept these locations. 1. Installation base ($prefix) : /var/root/pear 2. Temporary directory for processing : /tmp/pear/install 3. Temporary directory for downloads : /tmp/pear/install 4. Binaries directory : /var/root/pear/bin 5. PHP code directory ($php_dir) : /var/root/pear/share/pear 6. Documentation directory : /var/root/pear/docs 7. Data directory : /var/root/pear/data 8. User-modifiable configuration files directory : /var/root/pear/cfg 9. Public Web Files directory : /var/root/pear/www10. Tests directory : /var/root/pear/tests11. Name of configuration file : /var/root/.pearrc 1-11, 'all' or Enter to continue: I pressed Enter. I see a pear directory but when i type in pear in Terminal, it still doesnt recognize the command. Any ideas?


  13. I am generating an RSS feed from content in my database and I have a few questions that don't seem to be addressed anywhere. Hopefully someone who has worked with generating RSS feeds on their own may have an idea. 1. If you have custom tags or attributes, are they simply ignored in other RSS aggregators?2. Does the <author> element have to be an email address, or can it just be a name?3. Can you have multiple <author> elements per <item>?

    • Like 1

  14. I'm trying to install PEAR so that I can use the build tool Phing and I can't get the 'pear' command to work. Has anyone done this before? I went to this link to install PEAR on Mac. I installed wget fine and ran the first line:

    $ wget http://pear.php.net/go-pear.phar$ php -d detect_unicode=0 go-pear.phar

    Then, I ran the second line in the terminal, and it seems PEAR installed fine. However, if I just type in pear, it says 'command not found'. Anyone have any idea on installing PEAR?


  15. Woa, I havent heard of this. I have a mac and after you get used to the terminal, it's not all that hard to use. Looks like this is only for PC, which I may use whenever I'm on a PC. I've tried Tower before I was familiar with the terminal and I thought it was pretty good. Except you have to pay for it so I just went with learning the commands, which is probably a more valuable skill to have anyways.

×
×
  • Create New...