|
Thanks Peter, will try that.
In the end we're all just the same
|
|
|
|
|
Hi.
I'm using wampserver on my local machine for testing purposes.
The problem is apache wont start.
I can't get it to start and don't know why it won't start.
help me please.
Thank u.
|
|
|
|
|
Could you be any more vague? Apache will always list a reason as to why it won't start in the error log. Which WAMP should provide a link to.
The most likely reason is that you are already using the port that Apache wants to use (80) is already binded to another application. An application that blocks this port without telling you is Skype for example.
|
|
|
|
|
Hi All -
After shaking my head with the output of xml.Elementry(root).write(fp), which dumps the entire XML tree structure onto one line, I started doing some research. I checked out prettyprint from effbot.org, which sort of inspired me to write the following.. It handles stand alone XML tags and XML tag pairs, attributes, tag text and tag tails. I hope people find it useful...
import xml.etree.ElementTree as xml
def DumpXMLElem(e,deep=0):
noneg = 0
# indent the tag according to the depth in the element tree.
for i in range(0,deep):
print ' ',
# find out if the elment has children or a text field, if so
# this is part of a tag-pair, otherwise it's a single stand-
# alone tag.
c = e.getchildren()
# print the beginning of the open tag
print '<'+e.tag,
# print the tag attributes within the opening tag
for i in e.attrib:
print ' '+i+"="+e.attrib[i],
# if this is a stand-alone tag (no children and no text)
# print out the proper tag terminator
if(len(c)==0 and e.text==None):
print '/>',
# print the tail, if supplied
if(e.tail):
print e.tail
print ' '
noneg=1 # flag to avoid printing the closing tag
else:
# this is part of a tag pair
print '>',
# print the tag's text, usually that stuff between the opening and closing tag.
if(e.text):
print e.text,
# if the element has children, end this line and go process the children.
if(len(c)>0):
print ' '
for s in c:
DumpXMLElem(s,deep+1)
# back from dealing with the kids, go line-up the ending tag with the
# same indent as the opening tag.
for i in range(0,deep):
print ' ',
# print that ending tag, and any tail that the element had...
if(noneg==0):
print '</'+e.tag+'>',
if(e.tail):
print e.tail
print ' '
|
|
|
|
|
hello guys... I want to close an opened window with a button on it. I know how to close a window in javascript but the problem is I need to perform a task (writing to a file) before I close the window. How can I do that AFTER I perform the required task in php? thnx
|
|
|
|
|
i think you can perform your task then send window.close() in the response
Help people,so poeple can help you.
|
|
|
|
|
You could use the code I posted in one of your above questions about submiting a form to a php file.
You would also probably want to use this function that I hacked together some time ago.
Basically, you can run the php script, then get a callback once it's done. In the call-back you'd just close the window of concern.
function myGetAjaxResponseWithCallback(target, url, callbackFunc)
{
AjaxRequest.get(
{
'url':url,
'onSuccess':function(req){ target.innerHTML=req.responseText; callbackFunc();}
}
);
}
I suppose a to use it you'd just
1) define a function named myCloseWindow, or whatever.
2) form the url based from the php script you wish to run, along with any arguments given to it
3) create an element on the page that will serve as a container for any response text returned (or just delete "target.innerHTML=req.responseText;" from the above function)
4) call myGetAjaxResponseWithCallback(target, url, myCloseWindow)
Alternately, you can avoid defining a function myCloseWindow (globally) and can do so thusly:
myGetAjaxResponseWithCallback(target, url, function(){** do whatever you want in here **});
I seem to remember using this method to process results of ajaxRequests as they came back in.
Best regards.
|
|
|
|
|
Hi
I have a folder called OTRS Ticketing system which is developed using Perl. I need to open the perl files in design mode so that i can make any changes in design layout . I can use toolbox controls like dropdown, textbox, Datagrid etc. Is there any Perl IDE for opening & changing design layout.
I downloaded Editplus, Komodo but all are one we can view code and make changes in code. But not able to see as design view.
How to do this. Any suggestion for Perl development tool which we can use for opening perl files in design mode.
Anybody knows, please reply.
Thanks in advance.
|
|
|
|
|
since a month ago, i was trying to achieve my thesis and search any coding. and i found this code in http://www.jimstoik13.comoj.com/?p=80[^]
but when i have run the program, the codes have some error message.
cause zero divition.
how to convert this code from OOP to ordinary function?couse because I have not been able to read and convert OOP codes.
thanks
|
|
|
|
|
please help me, or please explain that code...
|
|
|
|
|
edrianhadinatazz wrote: please explain that code
You should email the author of the code requesting an explanation.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Aren't we impatient...
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
I have run code, there is an error .. although I have change the value of $MatrixPointX retrieve values from a database ...
|
|
|
|
|
Hello all,
I'd like to know how to be able to click the tect on the checkbox to change it's value...
Like in the MFC checkbox in which you can change the value of the same checkbox via clicking on the square or the text.
I've tried to find it on the Internet but after tons of checkbox tutorials I've not seen it...
Thank you in advance!
|
|
|
|
|
The element you need for that is <label>[^]
|
|
|
|
|
Thank you very much for your help!
|
|
|
|
|
HTH[^]
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Thank you Luc...
I've searched for that before, but it is a pity not to speak english as the first language... I've tried a big set of strings without any good result...
Anyway, I've got help here as always!
Regards!
|
|
|
|
|
I have a two column page that am desperately trying avoid using an IFRAME as the target. I have spent the last two days unsuccessfully.
Is there anyone who has this problem solved or knows where or how to solve it.
Any help is greatly appreciated.
|
|
|
|
|
So what's the problem? Indeed, what is your question?
I just hope the lithium polymer cells in my Code Project Mind Reading Unit still have some charge left in them
Do I understand you to be saying that you have a 2 column layout using divs, and you'd like to perform some ajax work and would like to display the results in one of these two columns - but would like to avoid the use of an iframe as the target of the results of the ajax call?
As it stands, what it is that you would like to know is entirely unclear.
|
|
|
|
|
Am not getting your question clearly but hope this will help you...if not just say it..
you would like to create two columns with different content sources lets say an external page[.php,.html .. e.t.c].
For my web apps this is what i do:-i will use an example:
==>supposing this is my index.php file ===
<div1> [Shows my page header] </div>
<div2> [Shows my page content] </div>
<div3> [Shows my page footer content] </div>
Content posting --
--create your header.php file
--create your footer.php file
NB: save all the includes pages in one directory like /inc/...>
to show the header content this is what i will do: using php
===and my content will be displayed in here
do the same for other pages
==HOPE THIS HELPS ==
|
|
|
|
|
Curious, what are useful things you've used Perl for and why did you choose Perl over any other language?
|
|
|
|
|
I use it for things like build scripts[^]. Basically, Perl is a glue script that runs various other pieces of the system.
Albert Holguin wrote: why did you choose Perl over any other language
It is widely deployed, easy to use and samples are all over the internet.
|
|
|
|
|
I'm currently using it for automatic nightly builds, but I want to see what else people are using it for... thanks for the feedback though!
...Oh, I'm also using it to help our production guys make software licenses easily with very few options (since they're not very tech savvy)...
|
|
|
|
|
I use it for quick and dirty searches on "many" large text files. I use it when I need the power of RegEx and need to do it quickly. Overall, text file manipulation is quite easy and quite powerful. Some of our in-house software runs on Perl scripts as well.
Important note: If I am going to need to go a few steps more than I will write it in C#...usually.
|
|
|
|