|
If I were to try to make a 'goon auth' system for a website (Like the one on awful yearbook that basically does the following "what is your user id? Here's a randomly generated 20 character code put it in the location field of your profile. [script checks profile if it is there] OK you are a goon, carry on. [if it is not there] try again or get out." How would I go about doing this? I assume its all php. I don't need a full blown script for it I just need to know how it is done. If I have been unclear please ask me to clarify anything. http://www.awfulyearbook.net/register for reference I want it to be like that.
|
# ? Apr 6, 2008 14:23 |
|
|
# ? May 15, 2024 03:59 |
|
Just pull in the profile page and search for the string in what you get back. Haven't done php in a long time but I think you can use fopen. The url to use is like http://forums.somethingawful.com/member.php?action=getinfo&username=poopiehead
|
# ? Apr 6, 2008 15:44 |
|
I'm making a web page, but the table borders are somewhat stylized by default. I don't mind the look, but it looks weird colered, and I would prefer to be able to use a 1 pixel colored border if I can. How do I do it? This seems like something that should be obvious (and the default setting :/) border="1" doesn't work.
|
# ? Apr 7, 2008 05:50 |
|
This should probably help you play around with styles to get something you like: http://www.somacon.com/p141.php
|
# ? Apr 7, 2008 06:02 |
|
I'm doing something for my physics class and it involves a particle in a box problem in 3 dimensions. I have a function that generates further quantum states based on a starting state and a depth.code:
code:
What I'd like it to do is to generate an unlimited amount of states, not just the amount that is inferred from depth. However, if I change it to this code:
code:
So how could I modify this so that it gives me an infinite sequence but doesn't just keep going along the left branch?
|
# ? Apr 7, 2008 13:16 |
|
Bonus posted:So how could I modify this so that it gives me an infinite sequence but doesn't just keep going along the left branch? What you want in Haskell would be along the lines of: code:
code:
In Haskell, this code works well because the optimizer does the right thing and builds a cycle in the intermediate graph. I kind of doubt Python is going to be that smart, so you might want to build a wrapper that memoizes an appropriate window in order to avoid going linear in stack frames. Whether or not this is worth it depends largely on how expensive the continuations wind up being. ShoulderDaemon fucked around with this message at 17:32 on Apr 7, 2008 |
# ? Apr 7, 2008 16:35 |
|
Thanks man, both those pieces of code work great! I'm gonna write this thing in Haskell too, just for the heck of it.
|
# ? Apr 7, 2008 21:14 |
|
PHP/IIS/Windows XP I wrote a simple script in PHP to upload a file with the eventual intent to store it in MySQL as a blob. The script retrieved the file successfully with no error code but the copy was still unsuccessful: code:
Edit: question withdrawn, Internet Guest account needed write permission to temp directory and destination directory Dr.Zeppelin fucked around with this message at 18:45 on Apr 8, 2008 |
# ? Apr 8, 2008 17:49 |
|
What's the most efficient operating system for a web server? I'm running AssetNow CMS on Coldfusion. My current OS is Windows Server 2003 on a shared server. I'm moving to a dedicated server that I can call my own, and I'm looking for the best solution.
|
# ? Apr 8, 2008 20:57 |
|
Jam2 posted:What's the most efficient operating system for a web server? The most meaningful definition of "efficient" is strongly dominated by maintainence overhead, so the answer is "whatever operating system you are most familiar with and takes the least hassle to run the software you are already using." Operating systems do have different scheduling and memory behaviour, but the differences are going to be overwhelmed by even minor hardware changes like adding RAM. Unless you are in a situation where you need extremely high runtime or will be constantly running at close to 100% load, you shouldn't care. If you are in such a situation, then the solution needs to be finely and particularly tuned to your requirements.
|
# ? Apr 8, 2008 21:05 |
|
ShoulderDaemon posted:The most meaningful definition of "efficient" is strongly dominated by maintainence overhead, so the answer is "whatever operating system you are most familiar with and takes the least hassle to run the software you are already using." We will be streaming audio to thousands of concurrent listeners 24/7. I am just wondering what will handle the load the best. I'm thinking it's best to stick with Windows Server 2003 simply for Windows Media Services.
|
# ? Apr 8, 2008 21:18 |
|
Jam2 posted:We will be streaming audio to thousands of concurrent listeners 24/7. I am just wondering what will handle the load the best. If you are streaming the same audio source to all those clients, then it's hugely unlikely that the scheduling and cache differences between operating systems will be observable. If there are many different sources, then the Linux scheduling and pagecache might perform better, but adding RAM to a Windows-based server would overwhelm the difference. CPU usage is going to be comparable across the board. It sounds like Windows Server 2003 already has the software and working environment you are used to, and has tools that will work well for your case, so it's obviously the right thing to use. Any money you "saved" over a year by switching platforms would be lost in added wages for programmer and administrator time in less than a week (probably less than a day if you're anything more than a 3-man shop), and migrating would almost certainly take much longer than that.
|
# ? Apr 8, 2008 21:36 |
|
Is there a way to check if a read in string from fscanf() contains a newline in C? I know it ignores whitespace characters which presumably includes newlines, I just am looking for a way to tell if it has encountered and ignored these characters.
|
# ? Apr 8, 2008 23:01 |
|
clockwork automaton posted:Is there a way to check if a read in string from fscanf() contains a newline in C? I know it ignores whitespace characters which presumably includes newlines, I just am looking for a way to tell if it has encountered and ignored these characters. This probably isn't what you want to hear, but fscanf is a really terrible lexer, and when you get to the point of caring if a newline or something is present in the input, you should really consider moving to a lexer generated by lex or some other tool.
|
# ? Apr 8, 2008 23:15 |
|
ShoulderDaemon posted:This probably isn't what you want to hear, but fscanf is a really terrible lexer, and when you get to the point of caring if a newline or something is present in the input, you should really consider moving to a lexer generated by lex or some other tool. Actually, that's perfectly fine. The way I figure it there is an easier way to do what I am doing, I'm just being stubborn and not seeing it.
|
# ? Apr 9, 2008 02:12 |
|
clockwork automaton posted:Actually, that's perfectly fine. The way I figure it there is an easier way to do what I am doing, I'm just being stubborn and not seeing it. Can't you just do strchr('\n') (or strstr("\r\n") on windows)? Ohhhhhhhhh. I misread. Then, yes, seconding the idea that you may be approaching the problem wrong. vvvvvvvvvvvvvvv Plastic Jesus fucked around with this message at 17:50 on Apr 9, 2008 |
# ? Apr 9, 2008 13:51 |
|
Plastic Jesus posted:Can't you just do strchr('\n') (or strstr("\r\n") on windows)? No the problem is that when you use scanf it removes the endline characters from the string.
|
# ? Apr 9, 2008 16:09 |
|
Whoops, sorry, moving this to the .net thread. Thanks for the Fusion suggestion.
NotAok fucked around with this message at 18:33 on Apr 9, 2008 |
# ? Apr 9, 2008 18:13 |
|
NotAok posted:I've been able to successfully load these by just using the assembly class, but I used the easier LoadFile method. This method may be what's tripping me up here. Yup. Read up on Fusion to understand the semantics of how and where the Framework will look for an assembly to load using the Load() methods vs. LoadFile(). Also, make sure that the DLL's you're loading are valid .NET Assemblies, because I seriously doubt twain_32.dll is .NET edit: Also, the .NET Megathread is where this question belongs
|
# ? Apr 9, 2008 18:21 |
|
Plastic Jesus posted:Can't you just do strchr('\n') (or strstr("\r\n") on windows)? This was indeed true, I went back and rethought my logic. Each of the lines I was looking for was prefaced with a character to mark what the line did, so I just looked for those when I was reading in. The results are quite cool actually as I was reading in OBJ files.
|
# ? Apr 9, 2008 19:46 |
|
clockwork automaton posted:This was indeed true, I went back and rethought my logic. Each of the lines I was looking for was prefaced with a character to mark what the line did, so I just looked for those when I was reading in. The results are quite cool actually as I was reading in OBJ files. That is a lot of polys.
|
# ? Apr 9, 2008 21:02 |
|
more falafel please posted:That is a lot of polys. Yeah, that was my test mesh to make sure I could handle that many. The final meshes I will use wont have nearly that many. It takes way too long to read in something that massive.
|
# ? Apr 9, 2008 21:03 |
|
Hi. Not sure if I'm in the right place but here goes: I'm looking for a program that can auto-refresh a webpage until it finds a 'buy now' button. It should then add the item to a shopping cart and stop. I want to use it for artworks that get released online at a certain time. It's very popular so hitting f5 repeatedly is not enough usually. Does anyone have an idea if this sort of program exists or otherwise how difficult it would be to write? Thanks.
|
# ? Apr 10, 2008 10:27 |
|
What you are looking for is called 'Sniping software'
|
# ? Apr 10, 2008 10:42 |
|
tef posted:What you are looking for is called 'Sniping software' edit: great, thanks for your help Diatribe fucked around with this message at 11:05 on Apr 10, 2008 |
# ? Apr 10, 2008 10:44 |
|
It is a pretty similar mode of operation: Refresh until conditions are met, then execute an action. Another thing would be to look at macros for web browsers.
|
# ? Apr 10, 2008 10:49 |
|
I want to put together a site that will allow me to track fuel economy and maintenance for my car. I would like it to have separate pages for fuel and maintenance and also a couple other car-related costs I want to track, but I want to keep the databases separate from each other (hopefully that makes it less complicated). I want the page to show the data in a spreadsheet type format and at the top of the page it'll have an entry form for the date/#of gal/$per gal/etc... Would PHP work best for something like this? Also, at some point I would like to be able to update this from my cellphone. If the site is lightweight enough I could just pull it up using the built in browser, so I don't think I'd need any extra coding.
|
# ? Apr 12, 2008 18:38 |
|
two_beer_bishes posted:I want to put together a site that will allow me to track fuel economy and maintenance for my car. I would like it to have separate pages for fuel and maintenance and also a couple other car-related costs I want to track, but I want to keep the databases separate from each other (hopefully that makes it less complicated). I want the page to show the data in a spreadsheet type format and at the top of the page it'll have an entry form for the date/#of gal/$per gal/etc... Would PHP work best for something like this? Also, at some point I would like to be able to update this from my cellphone. If the site is lightweight enough I could just pull it up using the built in browser, so I don't think I'd need any extra coding. Have you looked at Google AppEngine? (Python/Django) Scaevolus fucked around with this message at 20:43 on Apr 12, 2008 |
# ? Apr 12, 2008 20:41 |
|
two_beer_bishes posted:I want to put together a site that will allow me to track fuel economy and maintenance for my car. I would like it to have separate pages for fuel and maintenance and also a couple other car-related costs I want to track, but I want to keep the databases separate from each other (hopefully that makes it less complicated). I want the page to show the data in a spreadsheet type format and at the top of the page it'll have an entry form for the date/#of gal/$per gal/etc... Would PHP work best for something like this? Also, at some point I would like to be able to update this from my cellphone. If the site is lightweight enough I could just pull it up using the built in browser, so I don't think I'd need any extra coding. Honestly, why not use Excel or Google Docs for this? It's really a spreadsheet kind of app.
|
# ? Apr 12, 2008 20:44 |
|
Thanks to both of you, I had no idea that existed!
|
# ? Apr 12, 2008 21:16 |
|
Is there an easy way to debug javascript on IE? My site works fine in mozilla browsers, but literally none of the javascript functions work in IE. All IE gives me is a vague "invalid argument" type error which makes it hard to figure out whats wrong.
|
# ? Apr 13, 2008 20:55 |
nbv4 posted:Is there an easy way to debug javascript on IE? My site works fine in mozilla browsers, but literally none of the javascript functions work in IE. All IE gives me is a vague "invalid argument" type error which makes it hard to figure out whats wrong. IE8 has a development mode that is like a lovely version of Firebug. You can also emulate IE7 with it.
|
|
# ? Apr 14, 2008 04:28 |
|
fletcher posted:IE8 has a development mode that is like a lovely version of Firebug. You can also emulate IE7 with it. Is the the only way? How do people debug JavaScript from within a UNIX environment?
|
# ? Apr 14, 2008 19:40 |
|
Does anyone in the world actually do web development exclusively in UNIX? Also, have you seen http://www.code101.com/Code101/DisplayArticle.aspx?cid=67 ?
|
# ? Apr 14, 2008 19:43 |
|
Avenging Dentist posted:Does anyone in the world actually do web development exclusively in UNIX? I do all my programing in Ubuntu. Every few days I'll load my stuff onto my laptop which runs XP too see how it looks, which is kind of a pain. I came across that script debugger, but I'm not about to pay hundreds of dollars to buy Office, just for that one tiny application.
|
# ? Apr 14, 2008 19:47 |
|
The Web Development Megathread has some words about web development too. Maybe too many words?
|
# ? Apr 14, 2008 19:47 |
|
nbv4 posted:I do all my programing in Ubuntu. Every few days I'll load my stuff onto my laptop which runs XP too see how it looks, which is kind of a pain. I pasted the wrong link originally. I edited my post above to the right one. I'm still confused as to why you think there should be a way to debug Javascript in Internet Explorer in Linux of all things, though... Why not just run a Windows VM?
|
# ? Apr 14, 2008 20:03 |
|
Avenging Dentist posted:Does anyone in the world actually do web development exclusively in UNIX? Of course. Firebug is godly.
|
# ? Apr 14, 2008 20:04 |
|
Sartak posted:Of course. Firebug is godly. That's fine if you're developing for a single browser.
|
# ? Apr 14, 2008 20:04 |
|
|
# ? May 15, 2024 03:59 |
|
ORLY
|
# ? Apr 14, 2008 20:06 |