-
Have you forgotten Carlyl Chessman?
Date: 12/21/04
(Java Web) Keywords: html
http://www.gadflyonline.com/10-29-01/ftr-caryl-chessman.html
Many years have passed since his death. Its time to look back again. He may have been a "smartass" as they say but did he deserve to die?
Source: http://feeds.feedburner.com/AngsumansBlogOnJavaAndWebTechnologies?m=112
-
Landmark judgement of 1 Billion $ awarded to ISP in Anti-SPAM suit
Date: 12/19/04
(Java Web) Keywords: html, technology, spam
A wonderful christmas/hanukkah present I must say :)
http://tech.nytimes.com/aponline/technology/AP-Spam-Lawsuit.html
Source: http://feeds.feedburner.com/AngsumansBlogOnJavaAndWebTechnologies?m=102
-
Hidden XP Goodies
Date: 11/30/04
(Java Web) Keywords: html
Check out -
http://www.itdepartmentuk.com/itdept/tips/48.html
Source: http://feeds.feedburner.com/AngsumansBlogOnJavaAndWebTechnologies?m=9
-
On the limits with JDK 1.5…
Date: 08/10/04
(Java Web) Keywords: html
Last few days I have been taking the features of JDK 1.5 to the limits, often for uses its wasn\'t envisioned and I have to say I am pleasantly surprised in most cases. My voyage was into JPDA, live code transformation capabilities, Swing text, shutdown hooks, rtf & html packages, new...
Source: http://feeds.feedburner.com/AngsumansBlogOnJavaAndWebTechnologies?m=41
-
An introduction
Date: 02/14/05
(PHP Community) Keywords: php, mysql, css, html, sql, web
I've been working with PHP for several years now in a web-based envoronment and have achieved a moderate level of proficiency - I'm still a little green when it comes to PHP and MySQL though.
Additionally, I'm fluent in XHTML and CSS (though a little out of date with my CSS hacks).
Source: http://www.livejournal.com/community/php/259798.html
-
Binary data
Date: 02/08/05
(PHP Community) Keywords: php, html
Hi all,
I have saved my images into a table as binary data. I can get it out again with the method that I found at phpbuilder. Here is the test code.
Header( "Content-type: image/jpeg");
echo $data;
The problem is that my real program pulls the images and text for the record and then displays it in an HTML page with tables and a bunch of other stuff. As soon as I added the Header line only the first image shows and thats it. I am assuming this has to do with HTTP headers and so forth which I am not entirely sure of. So if you could tell me how to display my binary image data or point to me some resources when I can learn how I would appreciate it.
Source: http://www.livejournal.com/community/php/256415.html
-
stripping HTML formatting
Date: 02/07/05
(PHP Community) Keywords: php, html, database, web
I'm doing something of a small content management system for a project I'm working on, and had a quick question about stripping html tags from database held text.
I plan on having a "news" section, updated via a web form or phpMyAdmin or something, but I would like the full news entries safe for HTML tags (bolding, italics, email links, etc). Additionally, I would like to display small 100-character or so blurbs of the "news" entries on other pages - my concern is that if a tag is opened before the 100-character cut-off and not closed, this will mess with the following code.
I've dabbled in solving this problem with little effort, and equally little success. Is there an easy way of stripping out HTML tags for a preview such as this? Am I better off not allowing HTML and providing my own tags, such as ::BOLD::here's some bold text::BOLD:: ? If this is the case, how do I prevent HTML tags at all?
Source: http://www.livejournal.com/community/php/256244.html
-
Just say no... to BB tags!
Date: 02/18/05
(PHP Community) Keywords: php, html
It's a common practice when implementing a system requiring content submission that might include html tags, to strip the input fields of all html and get the users to use psuedo-tags instead, such as [ b ] instead of < strong > which will be replaced by the content-view script. This serves it's purpose by removing any mallicious code from the input text. It also limits the extent to which a user can alter the appearence of their submission, eg unable to post IFRAME or MARQUEE tags.
The downside to this method is that it needs the user to adapt to a modified and often custom tag system. It is also cumbersome code as you are having to do a lot more work than necessary, coding a set of tags and ways to parse them etc.
Enter PHP's strip_tags function. It is likely you will already be using this library function to remove unwanted html (possibly along with htmlspecialchars). But you might not know strip_tags has an optional argument of allowed html tags. Using this function with an array passed in of "safe" html tags you can easily save yourself a lot of hassle and allow the user to operate within the realm of proper-html instead of some new tag set!
Not sure if this will help anyone but I found it very useful in my own projects... enjoy!
Source: http://www.livejournal.com/community/php/262371.html
-
Database Woes, x-posted in php...
Date: 12/29/04
(MySQL Communtiy) Keywords: php, mysql, html, database, sql
Ok, I figured something out.
When I run the mysql query at a mysql or phpmyadmin prompt I get the proper results...
SELECT * FROM fff_news WHERE month(date)=month(now()) and year(date)=year(now()) ORDER BY date DESC
But when I throw this into an array with php's mysql_fetch_array or mysql_fetch_row everything will display except for the top entry which would be the last date entered into the database. If I add a new entry for yesterday, it won't show until I add a second entry for yesterday(and then that one won't show) or a new entry for today(which won't show).
Why is php mangling my query like this, it's rather simple...
snip...(and I cut out my html which semagic won't let me display as code anyway...)
} else {
$sql = 'SELECT * FROM fff_news WHERE month(date)=month(now()) and year(date)=year(now()) ORDER BY date DESC';
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
if (!$result) {
echo("
Error performing query: " . mysql_error() . "\n");
exit();
}
while ($row = mysql_fetch_array($result)) {
echo $row[date];
echo $row[pagetitle];
echo $row[content];
}
...snip...
Source: http://www.livejournal.com/community/mysql/45003.html
-
Session Variables
Date: 02/21/05
(Web Development) Keywords: browser, html, asp, java
My ASP application uses several session variables. If the user exits properly - by using the in browser controls then they will clear (using session.abandon) and all will be good.
The problem is that there is a single HTML form with a javascript menu that remains open. If the user does not exit through the controls I have given them, but x's out of the browser, and then goes back in to the application - the session variables still exist.
I'm trying to figure out how/where I can clear these variables. I can't do it when the form loads because it reloads many times, and I need to keep the session variables. I can't put it in the HTML menu page either, because that one never reloads.
Any ideas/suggestions?
Thanks!
Source: http://www.livejournal.com/community/webdev/174225.html
-
Here's the questions
Date: 02/17/05
(Web Development) Keywords: php, html, web
Well, I got the OK, so here goes:
As someone who's never been an IT insider, I only have knowledge of *how* to do things, not how to get paid to do them. Almost everything I know I've taught myself, from HTML 3 way back in the day to PHP 5 over the past year. My only concept of what it's like to work in this field is based on my experience in my last job. So what's out there? I know that web design and web development are often considered separate fields, but is this always the case? What are the positions like? Should I go back and get a degree? If so, what kind? If not, what do I need to impress potential employers? I'm more interested in design than development at the moment, but I like both and would be happy doing either full-time... really, any information you can provide would be helpful at this point!
(cross-posted to webdesign)
Source: http://www.livejournal.com/community/webdev/172586.html
-
Better Javascript code
Date: 02/16/05
(Web Development) Keywords: html, java
I have been thinking about the quality of the Javascript code in some projects I have been working on, and its not very good. So what can be done to improve this?
1) Remember all those things my first year Computer Science professors taught me. Which is to say good programing practice. I have way to much code that has very poor encapsulation, if any at all. I’m thinking to start refactoring things so that only the first level code accesses the main document’s element via DOM. Everything inside of that uses objects or variables passed by a wrapper function.
2) Start working on unit tests. By doing #1 it will be much easier to write unit tests for javascript under firefox. Yes some real fancy DHTML stuff may be tricky to do but much of the basic application logic, which is the major thing that I am worried about should be just fine.
3) Look for a test framework.
4) Ensure that the SOAP servers that my app requires also have test frameworks.
Source: http://www.livejournal.com/community/webdev/171921.html
-
Automated tests for Javascript code
Date: 02/16/05
(Web Development) Keywords: html, java
I’ve been building a lot of javascript and DHTML code recently. The problem I have is that I don’t really have any good ideas on how to write good unit tests for my javascript code. Anyone have any ideas?
Source: http://www.livejournal.com/community/webdev/171746.html
-
ASP.NET Radio Button problem
Date: 02/07/05
(Web Development) Keywords: html, web
I am trying to read some radiobutton values into a a email function but
can't seem to get them to display if anyone has some ideas then let me
know, its doing my nut in.
Sub Page_Load(ByVal Sender As Object, ByVal e As EventArgs)
' radio button list one
dim NoOfStaff=New SortedList
NoOfStaff.Add("1","1-9")
NoOfStaff.Add("2","10-49")
NoOfStaff.Add("3","50-99")
NoOfStaff.Add("4","100-149")
NoOfStaff.Add("5","150-199")
NoOfStaff.Add("6","200-249")
tb9.DataSource=NoOfStaff
tb9.DataValueField="Key"
tb9.DataTextField="Value"
tb9.DataBind()
' Radio Button List One
dim TypeOfCompany=New SortedList
TypeOfCompany.Add("1","Engineering")
TypeOfCompany.Add("2","Clothing/Textiles")
TypeOfCompany.Add("3","Food/Drink")
TypeOfCompany.Add("4","Healthcare")
TypeOfCompany.Add("5","Creative Industry")
TypeOfCompany.Add("6","Other (Please specify below) * ")
tb10.DataSource=TypeOfCompany
tb10.DataValueField="Key"
tb10.DataTextField="Value"
tb10.DataBind()
' list of variables
Dim name, company, position, address, phone, fax, email, web, staff, type, other, comments, newsletter As String
request variables
name=request.querystring("tb1")
company=request.form("tb2")
position=request.form("tb3")
address=request.form("tb4")
phone=request.form("tb5")
fax=request.form("tb6")
email=request.form("tb7")
web=request.form("tb8")
staff=request.form("tb9")
type=request.form("tb10")
other=request.form("tb11")
comments=request.form("tb12")
newsletter=request.form("tb13")
End Sub
' Send Email Function
Sub send_email(Sender as Object, E as EventArgs)
If Page.IsValid Then
Dim comptype as String
If request.form("tb10")= 1 Then
comptype = "Engineering"
Elseif request.form("tb10")= 2 Then
comptype = "Clothing/Textiles"
Elseif request.form("tb10")= 3 Then
comptype = "Food/Drink"
Elseif request.form("tb10")= 4 Then
comptype = "Healthcare"
Elseif request.form("tb10")= 5 Then
comptype = "Creative Industry"
Elseif request.form("tb10")= 6 Then
comptype = "Other (Please specify below) * "
End If
Display1.text = comptype
Dim MsgBody as String
MsgBody = "Name: "
MsgBody = MsgBody + tb1.text
MsgBody = MsgBody + "
Company:"
MsgBody = MsgBody + tb2.text
MsgBody = MsgBody + "
Position in company: "
MsgBody = MsgBody + tb3.text
MsgBody = MsgBody + "
Address: "
MsgBody = MsgBody + tb4.text
MsgBody = MsgBody + "
Phone: "
MsgBody = MsgBody + tb5.text
MsgBody = MsgBody + "
Fax: "
MsgBody = MsgBody + tb6.text
MsgBody = MsgBody + "
Email: "
MsgBody = MsgBody + tb7.text
MsgBody = MsgBody + "
Web Address: "
MsgBody = MsgBody + tb8.text
'MsgBody = MsgBody + "
No of Staff: "
'MsgBody = MsgBody + tb9.text
MsgBody = MsgBody + "
Type: "
MsgBody = MsgBody + comptype
MsgBody = MsgBody + "
Other: "
MsgBody = MsgBody + tb11.text
MsgBody = MsgBody + "
Comments: "
MsgBody = MsgBody + tb12.text
MsgBody = MsgBody + ""
' Create new email and send it
Dim newMail As New MailMessage
newMail.BodyFormat = MailFormat.html
newMail.From = "info@accordia.org.uk"
newMail.To = tb7.text
newMail.Subject = "Ready2Change Feedback Form"
newMail.Body = MsgBody
' Sending mail
SmtpMail.SmtpServer = "192.168.1.2"
Smtpmail.Send(newMail)
End If
End Sub
Source: http://www.livejournal.com/community/webdev/169845.html
-
redirectMatch problem
Date: 02/03/05
(Apache) Keywords: php, html
this worked perfectly on one host, but I'm having problems with it on a
new host.
redirectMatch 301 ^(.*)bb.html/(.*)$
http://www.blogbloc.com/index.php?PID=1596581
#
The problem is that the ? get's translated to %3f so the url it
redirects to is.
http://www.blogbloc.com/index.php%3fPID=1596581
How do I fix this?
Source: http://www.livejournal.com/community/apache/16395.html
-
Deploying a simple servlet on Tomcat.
Date: 12/14/04
(Apache) Keywords: browser, html, xml, java, web
Edit: Thanks, solved.
Hi, I'm having problems deploying a very simple servlet on Tomcat 5.5. When I direct my browser to the expected URL, Tomcat just spits back a blank "Directory Listing for /" page, and I'm not seeing anything helpful in the logs.
I'm wondering if the problem is that I have not included any .html files in my webapp ... but I don't understand why I would need to, or what I would have to put in it.
Compiles fine.
Servlet Code:
public class HelloWorldExample extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("");
out.println("");
out.println("");
out.println("See my first demo work!");
out.println("");
out.println("");
}
}
The URL I type into my browser is
http://localhost:8080/Hello. No dice :(
Web.xml config:
Hello v2
Hello Demo
Hello
HelloWorldExamplelet-class>
Hello
/Hello
As I understand it, this configuration should allow me to access my servlet by http://localhost:8080/Hello
.war layout:
demo/
WEB-INF/web.xml
WEB-INF/classes/HelloWorldExample.class
WEB-INF/classes/HelloWorldExample.java
I've read the tomcat docs and "Tomcat - The Definitive Guide" (O'Reilly). Many thanks if anyone could offer me some pointers.
-Phil
Source: http://www.livejournal.com/community/apache/14800.html
-
Quick question...
Date: 07/31/04
(Apache) Keywords: html, apache
Hiya everyone,
Ok, this is a quick, perhaps idiotic, question that I *think* has to do with Apache..
I'm running OS X.3 built in Apacher server to run my personal site www.jubei-ruri.com. When I go to www.jubei-ruri.com/galleries/ it directs perfect however if I go to www.jubei-ruri.com/galleries it borks out and attempts to load off of the localhost, mechaserver.local.
I'm 100% new to Apache and 90% new to HTML so I had some friends look over the HTML and they said everything looks kosher to them. The offered up that it might just be something with the way Apahce handles that type of thing and to ask a person versed in Apache. Thus I'm here. ^_^
Any suggestions or ideas?
Thank you very much!
Source: http://www.livejournal.com/community/apache/10723.html
-
Security in websites, part deux....
Date: 01/02/05
(PHP Development) Keywords: php, html, database, sql, java, security, web
alright, so, i finally got around to designing my 'security system' for my family's website. here's how it'll work:
- user enters their username and password into an html form. a javascript function will confirm that both are between 6 and 16 characters long
- if they, are, they'll be passed to login.php which will double check the lenghts of the two strings, and then confirm that neither one contains anything but letters and numbers. if they don't pass muster, the user gets rerouted to the html login form.
- if the above two criteria evaluate to true, then a SQL query will run to see if there's a matching username and password row in a database.
- IF SO, the script calls session_start() and $_SESSION['UsrIsLogdIn']=true;. the script then redirects them to the rest of the site.
now, each page on the rest of the site will do a check like this:
if ($_SESSION['UsrIsLogdIn']!==true) {
header("Location:index.php");
exit();
}
do you all think that this is good security? do you see any problems, loopholes, other ways in or ways to emulate the session variable being set to true? is there anything else i should add or make the pages check for?
thanks for your help :)
[Edit: oh, and what do you think is the best way to handle the user logging out? just setting $_SESSION['UsrIsLogdIn'] to false?]
Source: http://www.livejournal.com/community/php_dev/51178.html
-
OK, take two...
Date: 11/28/04
(PHP Development) Keywords: php, html
Just VNCed in to my mom's machine to get the file. I did a test upload again to get the error.
Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 4096 bytes) in /srv/www/htdocs/jeff/phpnuke/html/modules/My_Album/thumbnail.php on line 42
Line 42: $this->img["src"] = ImageCreateFromJPEG ($imgfile);
It successfully uploads the two pictures. However, only the first thumbnail is created. It gets completely through the routine the first time around.
Not sure why it freaks the second time around. On a hunch, I took the files and tried them locally, but I get the same error.
Is there something that could be at issue with the images themselves? The are just digital camera pictures.
Looks like more testing.
Any ideas?
Source: http://www.livejournal.com/community/php_dev/50028.html
-
Smarty vs PEAR template packages
Date: 09/28/04
(PHP Development) Keywords: php, html, web
cross posted in php
i'm about to rewrite a website and i'd like to use a template engine for it. i'm going to base the bulk of it on PEAR, but i'm not sure about which template package to use.
of the PEAR template packages, at this stage i'm considering using HTML_Sigma. but i'm also looking into Smarty.
i haven't used Smarty or any of the PEAR template packages before and i've only just started playing with Smarty.
so what do people think is better: PEAR or Smarty?
and why?
Source: http://www.livejournal.com/community/php_dev/48674.html