I am doing the below in a perl script:
my @pm1_CS_missing_months = `sqlplus -s $connstr \@DLmissing_months.sql`;
it takes the output of an sql query.
if i have to check for no rows selected,how could i do it?
i want to do like this:
if(no rows selected)
{
do this;
}
I'm trying to output in bibtex format in Django and the template looks like this:
@{{ pubentry.type }{,
author = {{% for author in pubentry.authors.all %}{{ author.first_name }} {{ author.middle_name }} {{ author.last_name }}{% if not forloop.last %} and {% endif %}
{% endfor %}},
title = {{{ pubentry.title }}},
journal = {{{ pubentry.journal }}}
}
The problem is with the "{{{" or "{{%". One way to go around the problem is to add a space after the first "{", but that kind of tamper the format. What's the right way to escape { in Django templates?
In a web page using jQUery 1.7.1 and jQUery-UI 1.8.18, if I output $.ui in an alert box when the document is ready, I get [object Object]. However when using Firefox, if I output $.ui in a click event handler, I get 'undefined' as result. With other browsers (latest versions of IE, Chrome and Safari), the result is still [object Object] when clicking on the link.
Here is my HTML Page:
<!doctype html>
<html>
<head>
<title></title>
<script src="Scripts/jquery-1.7.1.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui-1.8.18.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
alert($.ui); // ALERT A
$(document).on("click", ".dialogLink", function () {
alert($.ui); // ALERT B
return false;
});
});
</script>
</head>
<body>
<a href="#" class="dialogLink">Click me!</a>
</body>
</html>
In this post, I reduced to its simplest form another problem I was having described here: $(this).dialog is not a function. I created a new post for the sake of clarity, since the real question is different from the original one now that pin-pointed where the problem resided.
UPDATE:
IF I replace my alerts with simply alert($); I get this result for alert A:
function (selector, context) {
return new jQuery.fn.init(selector, context, rootjQuery);
}
and this one for alert B:
function (a, b) {
return new d.fn.init(a, b, g);
}
This does not make sense to me, although I may not be understanding well enough what $ is...
UPDATE 2:
I can only reproduce this problem using Firefox on OS X. On Firefox running on Windows 7, everything is fine.
I have a email address like [email protected] and [email protected][email protected] ... etc
I want a Mysql select query so that it would trim user names and .com an returns output as
gmail,ymail,hotmail etc
We have an existing PHP page (from an earlier project) which could be described as cryptic and ancient. It basically displays a form, catches the input and runs an external application to process the input and then pipes the output to the user.
I would really like not to modify this file any more than is required. Would there be an easy way to just make this file magically work by copying it to some location in the CakePHP's directory and have it receive $POST etc. as usual?
i need the code for sorting of numbers in ascending order using visual c++ in the windows forms,the output comes on the forms text box and i am doing it in visual studio....
anyone please help...provide the code
I noticed that when I build a given C# source to produce a DLL, the binary output is different each time. It would be helpful for our build / deployment process if this was not the case. Can I control this?
hi,
How can I make upper-case the first character of each word in a string accept a couple of words which I don't want to transform them, like - and, to, etc?
For instance, I want this - ucwords('art and design') to output the string below,
'Art and Design'
is it possible to be like - strip_tags($text, '<p><a>') which we allow and in the string?
or I should use something else? please advise!
thanks.
When I format a text field to be displayed in "Bold"..it appears as bold in the ireport output, but is not displayed in bold when the same is viewed as a PDF..
any suggestions...?
I'm looking for a way to create a vCards from Outlook Contacts. Ive seen plenty of examples of how to do the reverse, but that's not what i want. I believe it will involve either the OpenSharedItem method or the OpenSharedFolder method but I havent seen any examples of how to implement this. Does anyone know of where I might find a sample or two? My end goal is to output all my Contacts as vCards to a folder.
In Zend Framework how can I set the title properties of option elements within a select?
Desired output:
<option value="foo" title="bar">option</option>
I need to know the referring server for a page on my site.
Is there any safe method to check where the user "came" to the page FROM?
I tried uploading this to my server, but this wont output anything at all when I write the adress to the file in the browsers adress bar:
<?php echo $_SERVER['HTTP_REFERER']; ?>
I need to check this in order to display a link on the page or not...
Thanks
I need to run a lot of Django management commands in the crontab and want to log the output of each run to a special timestamped file. Is there a Django or Python module to help me do this or do I just have to roll my own?
I have a simple slideshow (list items) but a combination of portrait and landscape images. I'm working on a fluid grid so everything is, essentially, 100% of itself.
I'm wondering if there's a way for all the images to remain the same height, but the widths stay true to their proportions. All the images have the same height - 2000px - when uploaded.
See the site here: http://goo.gl/BdFUj
See here for the desired output: http://d.pr/i/HJUH
Thanks,
R
I would like to add a certain number of leading zeroes (say up to 3) to all numbers of a string. For example:
Input: /2009/5/song 01 of 3
Output: /2009/0005/song 0001 of 0003
What's the best way to do this with regular expressions?
Hello, I need in analyzing system output sound runtime. OS: Linux. The first thing I need is get different frequency values. Programming language: c++.
Hi!
I am wanting to concatenate two nodeset values using XPath in XForms.
I know that XPath has a concat(string, string) function, but how would I go about concatenating two nodeset values?
BEGIN EDIT:
I tried concat function.. I tried this.. and variations of it to make it work, but it doesn't
<xf:value ref="concat(instance('param_choices')/choice/root, .)"/>
END EDIT
Below is a simplified code example of what I am trying to achieve.
XForms model:
<xf:instance id="param_choices" xmlns="">
<choices>
<root label="Param Choices">/param</root>
<choice label="Name">/@AAA</choice>
<choice label="Value">/@BBB</choice>
</choices>
</xf:instance>
XForms ui code that I currently have:
<xf:select ref="instance('criteria_data')/criteria/criterion" appearance="full">
<xf:label>Param choices:</xf:label>
<br/>
<xf:itemset nodeset="instance('param_choices')/choice">
<xf:label ref="@label"></xf:label>
<xf:value ref="."></xf:value>
</xf:itemset>
</xf:select>
(if user selects "Name" checkbox..) the XML output is:
<criterion>/@BBB</criterion>
However! I want to combine the root nodeset value with the current choice nodeset value.
Essentially:
<xf:value ref="(instance('definition_choices')/choice/root) + ."/>
to achieve the following XML output:
<criterion>/param/@BBB</criterion>
Any suggestions on how to do this? (I am fairly new to XPath and XForms)
p.s. what I am asking makes sense to me when I typed it out, but if you have trouble figuring out what I'm asking, just let me know..
thanks!
I made a prolog program posAt(List1,P,List2) that tests whether the element at position P of List1 and List2 are equal:
posAt([X|Z],1,[Y|W]) :- X=Y.
posAt([Z|X],K,[W|Y]) :- K1, Kr is K - 1, posAt(X,Kr,Y).
When testing:
?- posAt([1,2,3],X,[a,2,b]).
I expected an output of X=2 but instead I got the following error: ERROR: /2: Arguments are not sufficiently instantiated
Why am I getting this error?