I have a query that simply counts how many items exist for a particular status within a given data range. The query works...
SELECT DATE(MY_TIMESTAMP) AS DATE,
SUM(CASE WHEN STATUS_ID=10 THEN 1 ELSE 0 END) AS STATUS10,
SUM(CASE WHEN STATUS_ID=20 THEN 1 ELSE 0 END) AS STATUS20
FROM...
I have a very large ASCII text file. It's an Apache webserver log. It contains 4,783,012 lines and is 1.66GB. I need to look at each line of the file independently. This makes using "java.nio" a bit more difficult because I'll have to parse out a line from a buffer by looping through the buffer...
You know those sites out there such as pricegrabber.com and bestbookbuys.com. You know, the ones that pull information such as prices and shipping and availability etc from other websites and then compare them against each other to find the best price etc. I’m wondering how this is done?
Now, I...
Quick question, after I insert a block of text into my database after running it through "mysql_real_escape_string" it contains \' and \". Now, when I display the text back on a page somewhere it also contains those "\" slash characters. How should I deal with this? I do not want to do...
Here's a simple example to illustrate my question. Say you have this table...
<table border=1>
<tr>
<td valign=top>text1</td>
<td rowspan=2>text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text 2 text2 text2 text2 text2 text2 text2 text2</td>
</tr>
<tr>
<td...
I have a simple problem I hope someone has a CSS solution for. I have a table with a width of 100% - no problems there. Inside that table I have a row with a text box:
<tr><td>
<input type='text' class='textSubject' name='subject' value='My Text'>
</td></tr>
FYI, the CSS class "textSubject"...
I'm implementing a basic forum. My database contains a FORUM table, a TOPICS table, and a POSTS table. Basically, a "forum" contains "topics" and a topic contains "posts". Pretty standard.
When I want to display a forum with all its topics I obviously want to order the topics by the one that...
This isn't a new topic, and I've read what some people do, but if you don't mind, I would like to get some best practices around this from others.
On all my secured pages near the top of the file I do something equivalent to this:
<?php if(!login) { header("Location: /login/"); } ?>
Let's...
Does anyone have any idea what is going on here? Look at this super simple form first and I'll explain:
<?php
if(isset($_POST['submit'])) {
echo $_POST['test'] . "<br>";
}
?>
<form method=post action="form.php">
<input type=text name=test value="">
<input type=submit name=submit...
Is there anyway to have a print block such as:
<?php
print<<<HTML_DUMP
...
...
...
HTML_DUMP;
?>
And in that block of HTML can you switch back to PHP and execute some statements? For example,
<?php
print<<<HTML_DUMP
...
<input type="hidden" name="example" value="<?php echo $var; ?>">
...
If I store a user’s password in the database using a one-way encryption scheme, how can I send the user their password if they request it? Well, I can't. All I could do is reset their password; however, then anyone with simply their username could request the password to be reset. Now, this...
Hello, I'm new to PHP, but not to programming by any means. I just wanted to run this by more experienced PHP programmers to see if I'm on the right track.
To authenticate a username/password to login to a website I'm thinking the basic process would go something like this pseudo-code...
How important is it that the voltage and the amps on a given power adapter match the power requirements listed for the laptop? In the three questions below assume that the laptop in question requires an 18.5V / 2.5amp power adapter.
#1. Would it be ok to use a 18.5V / 3.5amp power adapter?
#2...
Quick question, how do I use a space in a batch file in a path to a file name?
I'm trying to install DOTNET framework from a batch file. The path to the installer has spaces in the directory names. I do not have control over this. The path is:
DIAGNOSTIC\WINDOWS UPDATES\NET Framework\v2.0\...
Hello, I just upgraded OpenSSH to the latest version (4.0p1) on my Slackware box; however, it doesn't let me login? Using an SSH client I can connect just fine to the machine from within or from without my local network. However, when I try to authenticate (i.e. user/password), it always gives...
Why won't my simple VB.net app that was compiled on a Win2000 machine work on WinXP? I'm new to VB.net, but I've never had problems with Visual C++ apps compiled on Win2000 running on a different MS operating system. Is there something special I have to do to make the app work on Win2000 and...
System: Red Hat 9
Kernel: 2.4.20-8
As root, I edit the /etc/crontab file and add my line:
01 13 * * * /root/myscript.sh
Also, the crond server is running; however, my script never runs. What am I missing? Is there a service in chkconfig that I need to also turn on?
Thanks,
-bitwise
Where is the best place in Redhat 9 to place user defined shutdown commands? There is some stuff I want to do when the computer is shutdown...nothing to complicated just some logging. Where is the best place to put these commands?
Thanks,
-bitwise
Can you setup SQUID on a linux box that is your router and just redirect all web request from clients to squid like this:
$IPTABLES -t nat -A PREROUTING -i $INTERNAL -p tcp --dport 80 -j REDIRECT --to-port 3128
And then can you have squid just request information from another proxy?
I know...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.