Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

Kevin Schaefer

@Kevin Schaefer
About
Posts
13
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Vim (linux) regex to create links
    K Kevin Schaefer

    I've been working on about a dozen web pages that I updated. These pages have tables of courses that students can take, and the the page they link to changed. So, after a quick search, I used this regex in Vim (one of the best text editors):

    :%s/<td>\(\w\+\)\s\(\d\+\)<\/td>/<td><a href="courses.php?course=\1%20\2">\1 \2<\/a><\/td>/i

    Clever Code php linux regex question learning

  • export word
    K Kevin Schaefer

    I'm not sure how to do that, especially without the usage of some external library. If you have access to write a Perl CGI script, there might be a Word library you could include, but I'm not sure. If I had to do that, I would probably go for trying to export it as a RTF document as the file format is plain text (sort of like an analog of what HTML is to web pages). If I'm not mistaken, DOC files are actually compressed ZIP files that contain all the images, text, and metadata that describe the document.

    Linux, Apache, MySQL, PHP php html

  • Multi Player Sample Help
    K Kevin Schaefer

    Yes, you will need to do some stuff with network streams. The only network games I've written were over LANs (my home network). That's a lot easier, since you don't have to worry about security issues (at least at my house :) ), and you don't have to worry about dynamic ip addresses and all that... It is possible, but a little tricky. First, it's a good idea to do all of the network communications asyncronously (such as with a backgroundworker. I have a link to a vb source code I wrote to help me with developing a couple of network programs I wrote a while ago. It basically encapsulates all of the details of the network stuff in a class. You can take a look at it and how it works. You can take a look at http://lance.mckendree.edu/~klschaefer/temp/NetworkHelper.vb[^]. As the name suggests, it makes doing network stuff a little easier, but feel free to learn how it works and expand on it. If you haven't done any network stuff at all, I would suggest making a simple chat program just so you can get something under your belt. I would consider what I've done to be a server/client program, so one of the machines is designated as a "server" and the other as a "client", although beyond initially setting up the connection, that designation pretty much doesn't do anything: both can send and receive exactly the same. Anyways, I hope this helps!

    Visual Basic game-dev sysadmin help

  • Translater like google translate
    K Kevin Schaefer

    Quote:

    In fact most of the time the translations are more likely to be funny and wrong then right.

    So true! http://www.nst.com.my/opinion/columnist/poking-fun-at-online-translations-1.29393[^]

    Linux, Apache, MySQL, PHP help tutorial

  • I need help with this simple form intergration.
    K Kevin Schaefer

    Do you really want asyncronous results? If not, you can just handle the POSTed data back to the script...something like:

    if(isset($_POST['search']))
    {
    //do something with the search here
    }
    else
    {
    //print the search form since nothing's been submitted yet.
    }

    Of course using AJAX would be pretty nifty :)

    Linux, Apache, MySQL, PHP help

  • Red Hat Enterprise install issue...
    K Kevin Schaefer

    I would say its a bad iso, can you re-download it?

    Linux, Apache, MySQL, PHP help sysadmin linux

  • SELECTING OS
    K Kevin Schaefer

    What type of media server? Like a streaming media server? Normally, I prefer Fedora, but Ubuntu is the prefered flavor for Airtime (a streaming media server). Ubuntu would probably be the best as its the most popular.

    Linux, Apache, MySQL, PHP sysadmin linux

  • Reading Mails using PHP
    K Kevin Schaefer

    Do you know where the email actually resides? Is this a linux system or a Windows system? I know for Linux, there are several open source webmail projects, my favorite is Roundcube. If you have your mind set on actually writing it yourself, (again, assuming a Linux server), you would need to be able to parse the mbox files where postfix (I'm assuming you are using postfix) stores email at (/var/spool/mail). I've never done that, but I know you'll need to make sure your web browser (apache?) has permissions to read those files... Does that help?

    Linux, Apache, MySQL, PHP php help tutorial question

  • I Want a project using Global.asax file
    K Kevin Schaefer

    Global.asax files are used with ASP.Net applications, not PHP. You should post in that forum instead. PHP applications can do similar things, however, if you do something like: <pre lang="PHP"> There really isn't a direct analog for the global.asax file in php.

    Linux, Apache, MySQL, PHP

  • My php and Msql problems
    K Kevin Schaefer

    Try changing your query to:

    $query2 = MYSQL_QUERY("SELECT userid FROM users WHERE username='$username';") ;

    I also think you need to SELECT the username as well, since that is what you are comparing:

    $query2 = MYSQL_QUERY("SELECT userid,username FROM users WHERE username='$username';") ;

    Linux, Apache, MySQL, PHP help php database mysql

  • Windows CE not running PHP
    K Kevin Schaefer

    It's not a question of whether the device is "running" the php code. PHP is a server-side scripting language, meaning that when you go to a page with a ".php" extension, the server looks at the php code with an interpreter, and the php script generates html code which gets sent to your browser. In fact, you could name any static html file with a ".php" extension, or any other extension, and your browser wouldn't care. The only thing that matters is that the server tells your browser (through the headers) that the file that is being sent back is HTML text. If you really wanted, you could set up a server and have it tell browsers that ".bmp" files are html files and you could create a file with a .bmp extension and it be treated by any browser just like it had a .html extension.

    Quote:

    Page cannot be displayed / Cannot find server or DNS error

    It sounds like you have an incorrect setting with the browser. Can you access any other web page, such as google?

    Linux, Apache, MySQL, PHP php sysadmin help question

  • PHP
    K Kevin Schaefer

    It depends on how you are submitting your form for the username and password. If you are using POST, then something like:

    $username = $_POST['username'];
    $password = $_POST['password'];

    Otherwise, if you use GET:

    $username = $_GET['username'];
    $password = $_GET['password'];

    The "username" and "password" names are whatever you named your username and password input boxes in the html form. Let me know if this helps

    Linux, Apache, MySQL, PHP php html database tutorial question

  • Web Browsers: The unsung heros of the modern world
    K Kevin Schaefer

    I was thinking today about how complicated a web browser must be. Not only that, but it seems that everybody always expects their browser (be it IE, Chrome, Firefox...) to be perfect, load pages super fast, and be easy to use. So, when you go to a website, let's say codeproject.com, your browser first has to resolve the domain to an IP address by asking a DNS server. Then, it has to communicate using the HTTP(s) protocol to that server and ask for the correct page. Then, after receiving the HTML code back for that page, it has to load more images/scripts/css pages, and render it. Of course, let's not forget that almost every webpage contains invalid html (using w3c validator on codeproject reveals 170 errors and 112 warnings (see for yourself). Not to mention it has to execute javascript that might be present and apply css rules. And, to top it all off, the browser has to remain responsive if the user clicks on menu items or opens a new tab, and goes to ANOTHER website! Don't even get me started on what they do for security... It seems that web browsers must be pretty complicated. And of course nobody in the world would even think about paying for their browser. It must take a large team of programmers to actually produce a modern web browser. I was just wondering what your thoughts on this were. Do we take them for granted? Do web pages need to be held to higher standards when it comes to valid markup?

    The Lounge html javascript css mobile com
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups