w00t. sorted/solved it.
<form enctype="multipart/form-data" method=post action="{removed}">
<input type="file" name="file"/>
<input type="submit"/>
</form>
w00t. sorted/solved it.
<form enctype="multipart/form-data" method=post action="{removed}">
<input type="file" name="file"/>
<input type="submit"/>
</form>
you can't create objects/elements in CSS. you can layout objects and elements, and describe their properties to a certain extent. You would still need HTML objects to hold the parts of the menu (the menu hyperlinks,graphics,etc). The CSS could be used to arrange these elements in a menu-like fashion.
If you're using PHP, avoid creating one huge PHP file that inserts a HTML page into the middle. Create one tiny PHP file that inserts a number of HTML fragments. It's messy, but faster than (hyper)text processing a long file. You could do that a number of ways.
Ideally, don't use PHP atall. Serve well organised, automatically constructed HTML if you want to create a consistant look and feel. There's certain situations where that isn't appropriate, but unless your page content is going to change at a daily (or higher) frequency and be based on user input; you shouldn't ever need to process entire pages on-demand at the server.
In some "benchmark tests", I found that just renaming an index.html file to index.php made it load over 5 times slower. I didn't use a stopwatch, but it was very clearly visible.
I'm putting this here because I don't really know where would be best, if I could pick a language-categorised solution I probably wouldn't be asking atall...I don't need a solution so much as a pointer.
How do you get a file from a user's computer to a server, from a browser? I'm thinking the multitude of sites that do this: Browse > Upload > Image Sent for "Checking" >(some time layer)> Image appears on site.
How does the very first bit work? Javascript frontend to a SS backend? A binary post request initialised by JavaScript? How does it get past the security on browsers like Firefox? I found out by accident that I can view all my local files (if I know where they are) in Internet Explorer, but thats another topic entirely.
Any ideas?
It is believed that many users started by using Perl and moved on to the more powerful PHP
ROFL.
Perl is to PHP like Heroin is to Assorted-Solvents-In-A-Carrier-Bag
which STRICT? =P strict could be strict X(ML)HTML or strict SGML HTML, it could also be strict x.x where x.x is version/revision number...
If you use a browser like Firefox, it will tell you whether a page is in quirks or standards compliance mode. that can be helpful if you're not sure whether you're referencing a document type correctly.
The W3C also offer a tool that you can use to see just how compliant you are:
and an example pass:
http://validator.w3.org/check?uri=http%3A%2F%2Ffusiongroupuk.com%2Ffuse-data%2Findex.xrm
for: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
and an example fail:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.fusiongroupuk.com%2Fforum%2FYaBB.pl
for: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
and an example of an invalid doctype:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.fusiongroupuk.com%2Findex.html
for: <!DOCTYPE HTML PUBLIC >
use a better webhost :P
i find that on IIS (microsoft servers) i don't need to change permissions to use Perl files, and if i use FTP from the DOS prompt, it sets permissions to 755 automatically.
text-align:center will work in firefox, and ie. but it might not work in very old versions. you should also pick a document type for your page(s), otherwise the browser(s) will have something of a field day when it comes to how they make things look. if you pick a recent document type, then your page will probably look ok on all browsers* including opera.
http://alistapart.com/stories/doctype/
*that support CSS =P
i tried uploading your script, from dos, to an apache and an IIS server. it worked fine both times.
what editor did you save your file using? the editor could have put incorrect line terminators, that's quite unlikely though =S
i've attached a file, test.txt. rename it to test.pl, open it to look at it by all means but don't re-save it.
try uploading that, it worked the first time on both servers, i didn't even need to change permissions.
EDIT: by the way, if the Error 500 screen really annoys you (it really annoys me), add this use to any script functioning as a CGI:
use CGI::Carp qw/fatalsToBrowser warningsToBrowser/;
but of course, if Perl can't run, Perl can't use CGI::Carp.
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Works";
think the other way around. instead of deleting the history, don't create it in the first place. there's various methods, all require server side scripting or public web proxies. basic method is, have a blank page that inserts the "secret" page when it's neccessary.
the history will only see the blank page. use a recognised (secret of course) POSTDATA message to trigger the insertion of the secret page, otherwise the "blank" page will always show it.
using an iframe/frame to insert the "secret" page isn't good enough, the history will still see it.
i never let convention or heresay get in the way of what i want to do. if it comes to it, i'll try to force the appearance/flexibility i want by whatever means available.
but, the amount of people (admitadly, they're mostly in other forums) who want to move everything possible into CSS, and the "you must be joking" response to simple flexible solutions involving !tables!, i do feel like i must be in the opinion minority sometimes o_O
ah; i understand. when my comments are in that tone, it's purely satirical.
i thought center was outright deprecated in all current versions of HTML? i write in XHTML transitional because I usually generate pages from XML, and I don't care much for SGML anyway. my pages start life with a simple XML structure, and end up with a different (complex) HTML structure. that's why I'm firmly in the belief that a page must be defined by more than it's CSS, and any attempts to move certain aspects of a page into CSS will result in CSS looking more like HTML, and ending up needing it's own style descriptor.
i don't have any problem with "the powers that be" or the guidelines, or even following the guidelines. or conforming to a doctype, or using a doctype. infact, I like the doctypes. quirks mode aint so nice.
but I'll never agree that HTML isn't a means of presenting data. sometimes the structure is the presentation.
I know that if i use the center tag, tahat i cant use the position:absolute style in css to move to bottom. So what can i do??
why not? it should work o_O if not:
<div style="position:absolute;"><center>i'm in the middle</center></div>
of course. you shouldn't use <center> tags anymore. unless the powers that be have changed their minds again; you should use:
<div style="position:absolute;text-align:center;">i'm in the middle</div>
hmm, it is seeming difficult: a comparison of two hyperlinks one visited and one not visited shows differences in nothing except ID and content... checking in firefox shows some of the objects attributes are security restricted. checking in IE loops indefinately as the "frames" attribute seems to always have more "frames" inside.
on another note, i never realised you could do this:
div.one{
background-color:blue;
}
div.two{
color:red;
}
<div class="one two">I have 2 classes!</div>
it's cool, but not cool enough.
methinks CSS2 isn't worth the hype, unless they've come up with a better way of selecting things than by a number of unrelated classes, or class(es) plus a unique ID.
for my button :active could work, I haven't tested.
methinks I may have some hat-eating to do.
are you using forum software? does it let you change the content type/header of the email? In the header, a plaintext email has : Content-type:text/plain, and an HTML email has: Content-type:text/html. some email accounts turn HTML emails into an attachment aswell.
if there's no setting in the forum software, look for the module that deals with email, and look for the part that generates the mail. in php it'll be something like:
$to = "matt-at-somewhere.com";
$headers = 'Subject: lalala\n";
$headers .= 'From: matt-at-somewhere-else.com\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
$body = 'the message';
mail($to,$title,$body,$headers);
in perl it'll be something like:
open(MAIL, "|/usr/sbin/sendmail -t ");
print MAIL "From: #hidden#\n";
print MAIL "To: #hidden#\n";
print MAIL "Reply-To: #hidden#\n";
print MAIL "Content-Type: text/plain\n";
print MAIL "Subject: lalala\n\n";
print MAIL "[Start of message; this message is an automated message. You should reply to #hidden#]\n\n";
print MAIL "[End of message; this message is an automated message. You should reply to #hidden#]";
close(MAIL);
Set the content-type to HTML by whatever means, and your message will be HTML.
EDIT: quick disclaimer; I can't be held responsible for any damage to your forum should you follow my instructions =P they should be considered "informative". of course, you should make backups before you change anything. but that aside, provided your forum software is script based, it should be a very simple thing to change. finding it in the first place will be hard part.
how did you put your file onto the server? did you upload it in ASCII mode? binary mode wont work. I had big problems using Windows FTP as it assumes the filetype and doesn't seem to have any options.. try uploading the file using your domains control panel if you have one, or if you have a reasonable FTP client, just make sure it's in ASCII mode whenever you upload a Perl script.
by "the block" do you mean the "don't want javascript" block? do this:
<script>
javascript menu generating thing
</script>
<noscript>
html alternative
</noscript>
otherwise;have an element:
<div id="javascript_please_hide_me">
put your html alternative here
</div>
<script type="text/javascript">
document.getElementById("javascript_please_hide_me").style.display="none";
</script>
do you want the box to appear intelligent and assume one of the values from the options is what the user is typing?
http://www.devarticles.com/c/a/JavaScript/Javascript-AutoComplete/
don't know if it works, if it doesn't, search for "javascript autocomplete select" on a searchengine, without the quotes.
ok, that was a lame example. here's a better one. i have some javascript-controlled buttons in some places, their class is usually button_unpressed. when the mouse is down upon them, the javascript changes the class to button_pressed.
this is fine, but if i want several styles of button, (button_small,button_confirm,button_whatever) they either have to pass a half of their class to the script, or they'll all end up button_unpressed eventually. again, the solution is nesting them in a div and using some inheritance... but. psuedoclasses would look neater in the CSS:
button_small:unpressed, button_small:pressed
and in the markup.
i must admit, i don't know the half of CSS; but it seems like a simple thing, that would result in simpler markup/definitions all round. if it's impossible without rewriting browsers, i'll be astounded, and i'll eat my hat, and yours tgreer. =P
yeah, but there must be an invokation path that causes an object to be in the state :hover/:visited.. at some point that must enter the level of my page in order for the object on my page to enter that state. i don't want a new draft specification.. i want to map object X to a compound class rather than a 1-tier class.
lets say I have a class called display_area on a div type object:
div.display_area{
background-color:blue;
}
and i want some variance in my display areas, I.E one displays HTML code and one displays PHP code:
div.display_area:HTML{
color:red;
}
div.display_area:PHP{
color:yellow;
}
of course, I could do
div.display_area_PHP,div.display_area_HTML{
background-color:blue;
}
and then the relevant specific definitions.
However, I don't neccessarily know whether the displayed code will be PHP or HTML... the object is generated from code. it could be:
div.display_area_Perl, or div.display_area_VB
There's no inheritance of the div.display_area_XXX properties. At the moment, I just nest my divs, but it'd be nice if it were possible to hijack those psuedoclasses...
Can it be done? I'm thinking along the lines of :hover.. :visited etc; Could I register my own psuedoclasses? ;) X.Y:Z would be handy for situations where X.Y isn't definitive enough, and X.Y#Z wont work because there's more than 1 Z-type thing on a page.
Using Javascipt to bind objects is acceptable, but how could it be/can it be done? O_o
i know it's the ultimate cliché advice, but try searching for how to do each part on google/etc.
how do you want to connect to the servers? if you can do these things by getting into a servers filesystem, an ftp connection could work.. you'd be able to audit centralized then. there's guaranteed to be an FTP package on CPAN (http://www.cpan.org/)
If you control a physical or virtual link between the servers filesystems, you could write a script that just jumps around between them doing these things. that's preferable to an FTP connection.
Or if they're not linked and you need to execute system commands, install your perl script on each server, daemonize it to listen to a port, and invoke and control it via a telnet connection from the auditing server. that's a risky business though, and it'd probably take you longer to make it safe and configure it than it would to go round to each server and personally make the changes. alternatively, install your script on each server and invoke it via a HTTP request. you'll have alot of data flying around in order to keep a centralized audit, and it's as risky as running telnet daemons...
well, thats some issues to consider with the "connect" part.
EDIT:
SSH
- didn't even know what that was until I re-read your post and researched it; the same applies though, if you can find a module at CPAN (address above) to handle …
seems the problem was in:
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end @*/
it works when the odd comment-style directives are taken out... as in:
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
for compatibility/etc i've gone with a shortened version of the following block placed "conditionally-after" the Firefox/pure OO instancing attempts:
var versions = [
"Msxml2.XMLHTTP.7.0",
"Msxml2.XMLHTTP.6.0",
"Msxml2.XMLHTTP.5.0",
"Msxml2.XMLHTTP.4.0",
"MSXML2.XMLHTTP.3.0",
"MSXML2.XMLHTTP",
"Microsoft.XMLHTTP"];
var n = versions.length;
for (var i = 0; i < n; i++) {
try {
fwd_XMLHTTP._XMLHTTP_VER = versions[i];
if (new ActiveXObject(fwd_XMLHTTP._XMLHTTP_VER)) {
fwd_XMLHTTP.prototype.newXMLHttpRequest = function() {
return (new ActiveXObject(fwd_XMLHTTP._XMLHTTP_VER));
};
this.logger(fwd_XMLHTTP.XML_HTTP_SUPORT_IE+fwd_XMLHTTP._XMLHTTP_VER);
break;
}
} catch (e) {
// try next version
}
}
thanks for the help, it's strange that this syntax:
/*@if (@_jscript_version >= 5)
//do something version specific
@end @*/
works offline but not online o_O
yes, I was mainly referring to the font tags, however; some people make it a habbit to lay a site out with tables when they should be using css.
i'm going to absolutely disagree with you (and the w3c/wai) there. content is data; and until there's an effective replacement for tables, there's no way to do certain things without them.
for example, to make a page that fills the horizontal width of a screen always, has blocks of text and fixed sized blocks:
tables expand downwards rather than jump underneath each other, if the text is huge, the table compensates and all other parts of the table reflect that, and they degrade well if you're careful. They separate a page into clear areas, and you know they'll always be in the correct (relative) position, rather than having to "lock" or "push" things into place with css, which imo should be something that other people can change safely without knowing the inner workings of the designer's mind.
EDIT: i gotta add, table cells in xhtml strict/xhtml transitional/html 4 strict/transitional are possibly the only blocks that support vertical-align:center; that's a big thing.
solutions i've seen to split pages up how i'd like with divs/css have tons more markup than solutions with tables and css.
that one line by the wai is somewhat overquoted... the w3c have a good side and a bad side.. the good side provides a wealth of technical information and guidelines, and brings unrelated …
as an evil one-liner:
<input onBlur="alert(this.value.match(/[\w\d]/)!=null?'OK':'NOT OK');">
or more useably:
function check_field(ident){
var target = document.getElementById(ident);
return target.value.match(/[\w\d]/) != null;
}
function check_form(){
if(check_field('the_one_that_can't_be_spaces')){
//Everything's fine!
}else{
//Something's missing o_O
}
}
if the String.match(/regex/) function returns a valid match for \w (any alphabetic character) or \d (any number) (notation [\w\d]) then theres nothing valid in the field.. change the regex to change the matching cases.
Some reading may be helpful:
http://www.webreference.com/js/column5/
(^ this ones a bit lame to be honest, check out the PERL regex tutorials, the syntax once your in an expression is identical: http://www.perl.com/pub/a/2000/11/begperl3.html)
if you want to trim the string... you can do a String.split(/[ ]{1,}/) (returns a String array); but if you don't know what's been entered you may need alot of logic to work out where your (valid) values are... if you split by an indefinate number of spaces ([ ]{1,}) then if the string is all spaces; the length of the resulting array (should) be 0...
well. i did test in IE7 on my work pc, and it worked :|
the code is adapted from an online example, I'd never used XMLHTTPRequests before:
function request_message(path,field,default_message){
if(default_message){
showMessage(default_message);
}
var object = request_createObject();
var input = document.getElementById(field);
var uri = path + "?" + input.name + "=" + input.value + "&";
if(object){
object.open("GET", uri,true);
object.onreadystatechange=function() {
if (object.readyState==4) {
hideMessage();
insert_message(object.responseText);
}
}
object.send(null);
}else{
hideMessage();
alert("Couldn't create the request object. Maybe your security settings prevented it.");
}
}
// XMLHTTP setup code "borrowed" (with many thanks) from [URL]http://www.jibbering.com/2002/4/httprequest.html
function request_createObject(){
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp=false;
}
}
if (!xmlhttp && window.createRequest) {
try {
xmlhttp = window.createRequest();
} catch (e) {
xmlhttp=false;
}
}
return xmlhttp;
}
on firefox and ie7 i get back the correct message from whatever local/relative path I query... on ie6 i can't even create the object when my script is online :/
whatabout pipes?
open my($what), "| bin/what.exe -p whatever";
close ($what);
you should be able to read back live/streaming status if the program sends it... and you can definately send a bulk stream of data to the program; if the program wants to receive it.
EDIT/PS:
be careful you don't do:
open my($what), "> bin/what.exe -p whatever";
close ($what);
unless you're not concerned about losing the exe =P
hmmm that's strange... i start alot of my modules:
#!/usr/bin/perl
package X::X;
use Y::Y;
require Z::Z;
our(@ISA) = Z::Z;
1;
>>> and then put the code o_O
have you read this: http://search.cpan.org/~autrijus/PAR-0.85/script/pp?
are you using the GUI interface for PP? I would try from the command line, and takenote of:
-M, --module=MODULE Add the specified module into the package, along with its dependencies. Also accepts filenames relative to the @INC path; i.e. -M Module::ScanDeps means the same thing as -M Module/ScanDeps.pm.
If MODULE has an extension that is not .pm/.ix/.al, it will not be scanned for dependencies, and will be placed under / instead of /lib/ inside the PAR file. This use is deprecated -- consider using the -a option instead.
You may specify -M multiple times.
however, i would certainly expect that modules you include explicitly through code to be included automatically o_O
JavaScript is of course standardized. What confuses many is that it's a scripting language, so interacts with the underlying DOM, and that each doctype has its own DOM. Morever, JavaScript is used with other, non-HTML DOMs as well, such as Acrobat. However, the language itself is standardized.
ah, you got me there, but the ramifactions are a consideration; however small.
it's not just doctype aswell, different browsers need to be considered regardless of doctype.. non-browser-dependant js code is usually quite messy looking at the very least.
for me it's a very small consideration; because i minimize the importance of js code :P if i scripted a site entirely in js, it would be a bigger consideration, as some people are absolutely nuerotic about their security online, and disabling js isn't difficult.
admittadly though, it isn't as likely as someone not having flash installed/enabled, or not having an up-to-date version of java.
there has never been a situation where we had to code around a "non-JavaScript" user. Not once.
not to deliberately perpetuate the, already well-perpetuated js-fear.. but you wouldn't neccessarily know the amount of non-js user's who couldn't use your company/ies, or client(s) sites if elements of those sites were totally js dependant.
for the most part, users go elsewhere when things don't work as expected, regardless of whether the problem's on a page, or with a security setting.. and almost anything that's functionally js-dependant doesn't need to be..
to me, that seems to …
Not really sure what you want...
But wouldn't
HTML Code:
<a href="#" target="_blank"><input type="button" /></a>work for you?
(You may have to define height and width for IE though).
nope, not with my doctype anyway (transitional)
I don't think theres anything wrong with nesting forms?
yerp, there is. it seems the action is taken from the first form.
i didn't use any absolute positioning in the end, i let the button in the form float, and the second button (in a floating form) fits right in there [on either side, depending on the float direction]. it only works if both forms have margin-top:0px and margin-bottom:0px.
This entire discussion is very amusing. In short, you have to use JavaScript for most of the questions in this thread. There is no reason not to do so, either. If you want a real-world solution, don't impose silly restrictions. This is like saying "I need directions from my business to yours, but I'll only take left turns".
well. not everyone has js available or enabled; and it's not very well standardised. i prefer to keep all neccessary functions outside of javascript, and use it for effects only.. i write pages with js dependant things hidden by default... then, if js can work, it shows all of those things, otherwise; the user doesn't even know what (or even what it is) that they're missing.
still, a browser that doesn't support JS probably doesn't support CSS either.. :P
well. that's certainly better! i didn't realise i'd be able to access up there without using a different file access method. but seems as simple/even simpler than what i was doing before.
cool stuff, i will be moving my system folder there :P
IE 6 prints a generic error page.
>_<
I guess if they're not important, I'll just read my error page and output that. It would have been nice if the .htaccess was obeyed.. but only in this case... I'm certainly glad I can use .htaccess to easily deny access to "system" folders from the outside world, and then easily get data out of them in the inside world.
Hmm.. since i found out that query string was an environment variable; I only use CGI::Carp, everything else is just a print.
If the browser sees the Error Status Code, will it not just spit out a generic error page regardless of what follows? Next time I upload a script I will test with both... The thing with scripts is they go over .htaccess... it would be bad if they didn't!
My custom error pages (via.htaccess) work for browser requests, but when I print out an error status code from a cgi script, it bypasses .htaccess. I can't see any problem with just reading in an "error page" and printing it to STDOUT...
But, I have to use a Content-Type:text/html header then.. Is it ok to output a page with a Status: 404 header and a Content-Type header? If so, is it just a html page with a meaningless header line before the Content-Type line?
Maybe it is the Inline package itself that is missing from your resulting executable... do you reference any other packages that aren't in YOUR directory structure? i.e things from CPAN, and things that come with Perl but aren't available without being used/imported? If so, what happens when you use them in a compiled pl/pm?
When you downloaded Inline, did you put it in the Perl lib folder? or do you manually add it to the @INC of packages that use it?
onmouseup="somepage.htm"
is that not JS though?
EDIT: infact, it's not just JS, it's erroneous JS, should be
onmouseup="window.location='somepage.htm'"
you can hyperlink the entire contents of a div... put an enormous image inside it, set the overflow to hidden, and hyperlink the image :P
i have a q, i was gonna start a thread but this is close enough to my question:
can you hyperlink a form submit field? O_o it seems trivial but it isn't proving easy... I want a form with a normal submit button (so I can't use the form action) and another button that just opens a new page... i don't want to use JS, and I don't mind how much markup i need on the page.. (actually, i'm using "button" rather than input/submit) so i guess, i can stick i giant hyperlinked image in a overflow controlled div in a typeless button.
messy =)
any better solutions..? o_O
EDIT: bah... that doesn't work though! who decided you can't have hyperlinked anchors in buttons? :| as i'm overriding the button graphical style anyway, i guess i can just emulate it with a div... i have to use JS to toggle the edges and padding to give a "clicked" appearance... but at least i don't have JS depandant functionality...
another solution.. is to absolutely place another form and button next to the submit button and use the form action... methinks that's messier.
i use editplus for html and xml stuff... for a while i used komodo.
at work i use dreamweaver O_o..
for the most part html suites i've used have all been the same just with live previews/code-context menus/etc. Most of the time I need to to test things on a server anyway, so offline testing isn't a big thing.
I like edit plus though! unlike dreamweaver it never tries to do things for you (usually incorrectly), it "colors in" CSS better.. and it's generally easy to reconfigure it to nicely display "new" xml tagsets. Oh yeah, and it's about 1/20th of the price (of Dreamweaver).
Dreamweaver's offline SSI emulation is a nice touch, although it's hellabasic..
(sic)what about Microsoft Word? :-)
Isn't it? Any 10 year old child can program in that language. Most real professional programmer would not be caught dead using VB.
Theres making a popup message that says "I AM HAXOR" and writing good OO code good in the VB environment.
And my original point was: the fact the Visual Basic language is easy to learn and tightly linked with the VisualBasic IDE; doesn't make it any less of a language. Infact, it gains an amount of power for being "basic" yet flexible. VB.NET... dunno.. I don't like the idea of coding with a Microsoft-only product anymore. Consider Delphi before VB.NET.
And btw the article posted by Mr. Rashakil goes out to show that one language is always powerful than other. (thats what i got from the article).
I would say, it goes out to show that there is always a correct language to use in a given situation, and that that is not neccessarily "the most powerful language". Like the article says; the most powerful language is machine code. Would a professional programmer be caught dead writing user applications in machine code? O_o
hm, i didn't read your topic thouroughly, didn't realise you'd gone for the exe option in the end... there may be a problem with the linkage of things that you have compiled; are there complete linkage/include options in the compiler your using? you may have to compile all your resources (including modules) in a single exe, or you may have to call them externally...
Try compiling a pl + pm but try with something very, very simple structurally; it will help you to find a general solution without the cloudiness of complexity.
ah... i had to type it all out before i remembered that... -_-
I was playing around with XMLHTTPRequests recently, let me just start this by saying I prefer to never have a single JavaScript requirement... so my use of the request is merely... icing on a big webcake.
anyway.. In offline testing I can create requests ONLY in IE... in online tests I can create requests ONLY in FF. :| my js file doesn't change, I always request a local (same folder) file... ee.
It's annoying.. I figured the FF problem would go away when I put the file online, as these things do with FF, but I didn't expect the IE one to start failing.
Does anyone have experience of using the XMLHttpRequest object in IE6, in an online environment? The only reason I can see this being restricted is that IE has the worst (non-existant) local-file-system protection imaginable, and MS decided its better to be safe than sorry (sadly, all in the wrong order). Do any IE7 users know if this works in 7? From the Beta; I hate IE7, and I know if I download it that it'll systematically destroy my computer's knowledge of IE6...
:rolleyes:
make sure you have an open command prompt window rather than typing the command into the Start > Run box. to open a command prompt window that wont disapear on completion, type cmd in the Start > Run box.
if you want to use the syntax c:\myperlscripts\perl myscript.pl, rather than c:\ActivePerl\bin\perl c:\myperlscripts\myscript.pl you need to add the path to the perl interprettor to the PATH environment variable. You can do this from the command prompt, but whatever you do, don't try it, it'll more than likely overwrite PATH with just the path to perl, and PATH generally contains alot of important paths. In XP, you can set environment variables from the My Computer > Properties popup dialog... I don't know if that's the case in Win98... Try My Computer (desktop) Right click > properties > advanced tab > environment variables button. Look for a system variable called PATH (case is irrelevant) and append the path to the perl interprettor to that list (semicolon delimited). My Perl path is C:\ActivePerl\bin.. and my whole PATH string looks like this:
c:\PHP\;c:\ActivePerl\bin;C:\Program Files\ActiveState Komodo 3.5\;C:\Program Files\Borland\Delphi7\Bin;C:\Program Files\Borland\Delphi7\Projects\Bpl\;c:\JavaProfiler\lib;C:\WinAVR\bin;C:\WinAVR\utils\bin;C:\Program Files\Alias\Maya7.0\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Intel\Wireless\Bin\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;
Hey, I have two PATH strings, one for system and one for Matt... These paths screw up sometimes (they did more on my other PC)... But in general they should be concatenated when a program requests a named variable... So it doesn't matter if it's a user var or a system var.
c:\JavaProfiler\lib;C:\Program Files\Microsoft …
do you import (use/require) the pm properly? does the pm file return 1 by default? does the pm file have a package definition? is it in the correct folder? there's a long list of checks...
heres some blocks from two files, one that imports and uses a pm module, and the pm module itself:
top part of "render_xrm.pl"
#!/usr/bin/perl
use strict;
use General::PathArray;
my($root_array) = new General::PathArray($file_root);
my($clone) = $root_array->clone();
my($random) = General::PathArray::return_something_static()
top part of "General/PathArray.pm"
#!/usr/bin/perl
package General::PathArray;
sub new{
my($class,$init_path,$lock_depth) = @_;
my($self) = {};
bless ($self,$class);
if($init_path){
$self->setString($init_path);
}
#$self->lockRoot();
return $self;
}
[I]#/////OTHER FUNCTIONS[/I]
1; [I]#<<<< IMPORTANT!!![/I]
}
This isn't an especially nice way to import all things, as I import EVERYTHING from that module when I use it, including static variables... Still, it's a small, widely used object without static variables and it should be imported in full.
My files are arranged like this:
->cgi
__->General
_____~PathArray.pm
__~render_xrm.pl
where -> denotes folder and ~ denotes file.
what does your folder hierachy look like? does the Perl interpretter throw an error when you just try:
#!/usr/bin/perl
use test;
All peace and if it makes you happy, *damn it* long live VB programmers.:mrgreen:
it made me smile =)
hmm.. if there was a vote, it'd need to have lots of options, or be heavily grouped... =/
my choice would change every other month aswell.
On a completely different note, this thread has been open for ages! Is it possible to get a conclusive vote/poll on here? :/
You attacked VB programmers in general, implying that their art is "child's play" you also took on an air of superiority in your comment:
A C programmer can easily adapt himself to VB -- for him it will be a piece of cake, but someone who has always loved VB will bleed to death figuring out why the hell do you need the address of a variable.
Which you then edited (bold section did not originally appear when I replied, instead it read: "figuring out how to use C")
Which I decided, perhaps wrongly, was directed at myself. My reply was strictly a technical comeback, and not wrongly taking something personally. Had I taken it personally, I would probably not have replied. However, I felt, from a technical standpoint, it was right, or at least acceptable for me to contradict your comment.
Originally, the discussion was about programming languages, and I felt it neccessary to argue with your classification of what is and isn't a language. That was a personal choice, indeed.
=)
no need for a personal attack.
the only requirement for a language is a lexicon (dictionary) and a syntax. Js/As and Vb have unique lexicons, and well-honed syntaxes, based on Java/Perl/C++ and the many revisions of BASIC respectively.
while I guess AS is more a scripting language, it IS a language, and in the Flash environment, it certainly plays very well, in my eyes, sufficient for it to be considered "different" from JS itself.
this overplayed "BASIC programmers will never be C programmers" claim has never held much salt. I learnt programming in BASIC on a calculator and QBASIC on a 486, I have no problem with C or C++. I no longer use BASIC for much, BUT only because what I do has changed. If I wanted to make Windows utility programs quickly, theres's a large chance VB would be my first port of call. If I want to make CGI, I use Perl, If I don't really know what I'm doing, I use Java.
If I decided to make a high-end well defined game, I would use C++ with DX, and I know from experience, I am capable of doing that... Finishing anything I start would be a nice change though...
and I am neither bleeding, nor dead.
Syntactically ActionScript IS JavaScript. And JavaScript is a language.
Together with Flash, it is ActionScript, and it's as much a programming language as VB. If you don't consider VB to be a language... You miss a big point with programming, user simplicity.
Like I said, ActionScript is overlooked.
Coolest Programming Language is ACTION SCRIPT becos lot of animations can be done
ActionScript is actually a much-overlooked language!
To make a tile-based/maze type game with collision detection, screen-relative scrolling and all that la, is faster than any other language I've used, ever, including languages written specifically for that kind of purpose.
And I love its latebound objects/variables and lack of a strict variable defintion, etc.. It's JavaScript with a well-linked GUI system.
The concept of MovieClips being objects is very flexible to.
Its nice.