I want to sell my application, but I wonder is there any cheap/free cms or script to validate the paypal transaction, and then send serial from a db to desired email?
Can i use powershell script to copy a set of files from a folder to Clear
Case..?? i have the task of synchronising files from TFS to Clear Case..
like i need to take a set of files aftr a certain date from tfs server and synchronise these files to Clear case..
I need to ensure that the input value contains at least one dot, so i use the following:
<asp:RegularExpressionValidator runat="server" ControlToValidate="MyInput" Text="*" ErrorMessage="must contain at least one dot" ValidationExpression="\.+" />
And that doesn't work. By inspecting the page source i can see that ASP.NET escapes the backslash character so in java-script it looks like "\\.+". Why does it do so and how do i prevent RegularExpressionValidator from escaping it?
Does anyone know of a open source 3d engine which can be operated via telnet?
What I'm looking for is scripting via a socket connection. To allow for world creation and/or camera movement.
Does anybody know of any that has this built in or very, very easy to add as a plugin or script?
The platform is not crucial.
Hi, i need to execute specific javascript instructions AFTER an external javascript finishes its own process.
(function(){
var dsq = document.createElement('script');
dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://xxxxxxxx.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
How can jQuery know when that .js has finished doing what it does?
i have a multiple textboxes in repeater and i will enter value in those textboxes at runtime. and i want sum of all value entered in those textboxes in one label.i want to do this thing using java script. so can u please help me.
What command can I use to print out the commit id of HEAD?
This is what I'm doing by hand:
$ cat .git/HEAD
ref: refs/heads/v3.3
$ cat .git/refs/heads/v3.3
6050732e725c68b83c35c873ff8808dff1c406e1
But I need a script that can reliably pipe the output of some command to a text file such that the text file contains exactly the commit id of HEAD (nothing more or less, and not just a ref). Can anyone help?
Hello,
I have an app with two packages..
My setup.py is like this:
sys.argv.append('py2exe')
setup(
options = {'py2exe': {'bundle_files': 1}},
windows = [{'script': "SoundLog.py"}],
zipfile = None,
)
After creating the .exe I have to put the packages in the same folder as the .exe file.
How can I include them in the .exe?
Thanks in advance!
I need a script to automatically delete the user profile left on ubuntu 9.04, anyone please send me this mail: [email protected] thank you, please indicate how I work not fluent in shellscript.
What's needed:
To move several directories between two Windows 2008 servers on a regular basis.
Due to security requirements, neither server is supposed to have network shares set up or extraneous software installed.
What's available:
Administrator access to both machines (including remote desktop access if that helps).
A third machine with:
Visual Studio 2010
Cygwin
Bonus extras
The script that does the rest of the work (apart from moving the files) is currently written in F#, but any .net/command line based solution would be fine.
I am taking an XML document and creating a word document using XSLT and OpenXML. The problem is that when I create the word document, all of the HTML that is within the CDATA tags are not escaped and look like this:
GET /recipe/recipe/cat.php/>"><script>alert(document.domain)</script>
I have tried defining "cdata-section-elements" in my xsl:output; however I receive an error stating that p tag doesn't match the w:t tag.(the p tag is apart of the CDATA HTML).
Here is what one of my xsl templates looks like:
<xsl:template match="SECTION">
<w:p w:rsidR="00272D24" w:rsidRPr="00272D24" w:rsidRDefault="00272D24">
<w:pPr>
<w:rPr>
<w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/>
</w:rPr>
</w:pPr>
</xsl:template>
<w:r w:rsidRPr="00272D24">
<w:rPr>
<w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/>
</w:rPr>
<w:t>
<xsl:value-of select="INFORMATION"/>
</w:t>
</w:r>
</w:p>
Here is what the xml looks like:
<INFORMATION>
<![CDATA[
<P> line 1 of information
<P> line 2 of information.......]]>
</INFORMATION>
Here is what the word output looks like: (white space and poor formatting)
DIAGNOSIS:
<P> line 1 of information. <P> line 2 of information
I need to be able to somehow render the HTML or strip out the HTML. If I strip out the HTML then I would have to search for every possible HTML element, which is madness! Any help at all would be appreciated...
Thanks.
I'm using a set of PNGs to run my cu3er slides. They keep the transparency, until the transition and then they're boxed with a white background. Is there a way to either keep it transparent or set the background color? http://205.186.139.193/ is the test site
Javascript:
<script type="text/javascript">
var flashvars = {};
flashvars.xml = "<?php bloginfo('stylesheet_directory');?>/slider/cu3er.php";
flashvars.font = "font.swf";
var attributes = {};
attributes.wmode = "transparent";
attributes.id = "slider";
swfobject.embedSWF("<?php bloginfo('stylesheet_directory');?>/slider/cu3er.swf", "cu3er-container", "963", "283", "9", "expressInstall.swf", flashvars, attributes);
</script>
CSS:
#cu3er-container{ background: #000; }
#header_cu3er { background: #000; }
cu3er Settings:
<cu3er>
<settings>
<auto_play >
<defaults symbol="circular" />
<tweenIn tint="0xFFFFFF" alpha="0.65" />
<tweenOut tint="0xffffff" alpha="0" />
<tweenOver alpha="0" />
</auto_play>
<prev_button>
<defaults round_corners="5,5,5,5"/>
<tweenOver tint="0xFFFFFF" scaleX="1.1" scaleY="1.1"/>
<tweenOut tint="0x000000" />
</prev_button>
<prev_symbol>
<tweenOver tint="0x000000" />
</prev_symbol>
<next_button>
<defaults round_corners="5,5,5,5"/>
<tweenOver tint="0xFFFFFF" scaleX="1.1" scaleY="1.1"/>
<tweenOut tint="0x000000" />
</next_button>
<next_symbol>
<tweenOver tint="0x000000" />
</next_symbol>
</settings>
I'm playing with the incomplete example found at http://www.w3.org/TR/offline-webapps/
But I'm distressed to see comments in it like:
"renders the note somewhere", and
"report error", and
"// …"
So, will someone please help me write a valid example? Here's what I've got so far:
<!DOCTYPE HTML>
<html manifest="cache-manifest">
<head>
<script>
var db = openDatabase("notes", "", "The Example Notes App!", 1048576);
function renderNote(row) {
// renders the note somewhere
}
function reportError(source, message) {
// report error
}
function renderNotes() {
db.transaction(function(tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS Notes(title TEXT, body TEXT)',
[]);
tx.executeSql(‘SELECT * FROM Notes’, [], function(tx, rs) {
for(var i = 0; i < rs.rows.length; i++) {
renderNote(rs.rows[i]);
}
});
});
}
function insertNote(title, text) {
db.transaction(function(tx) {
tx.executeSql('INSERT INTO Notes VALUES(?, ?)', [ title, text ],
function(tx, rs) {
// …
},
function(tx, error) {
reportError('sql', error.message);
});
});
}
</script>
<style>
label {
display:block;
}
</style>
</head>
<body>
<form>
<label for="mytitle">Title:</label>
<input name="mytitle">
<label for="mytext">Text:</label>
<textarea name="mytext"></textarea>
<!-- There is no submit button because I want to save the info on every keystroke -->
</form>
</body>
</html>
I also know that I have to incorporate this in there somewhere:
if (navigator.onLine) {
// Send data using XMLHttpRequest
} else {
// Queue data locally to send later
}
But I'm not sure what even I would tie that too.
Is there a way to detect when the disabled attribute of an input changes in JQuery. I want to toggle the style based on the value.
I can copy/paste the same enable/disable code for each change event (as I did below) but I was looking for a more generic approach.
Can I create a custom event that will monitor the disabled attribute of specified inputs?
Example:
<style type="text/css">.disabled{ background-color:#dcdcdc; }</style>
<fieldset>
<legend>Option 1</legend>
<input type="radio" name="Group1" id="Radio1" value="Yes" />Yes
<input type="radio" name="Group1" id="Radio2" value="No" checked="checked" />No
<div id="Group1Fields" style="margin-left: 20px;">
Percentage 1:
<input type="text" id="Percentage1" disabled="disabled" /><br />
Percentage 2:
<input type="text" id="Percentage2" disabled="disabled" /><br />
</div>
</fieldset>
<fieldset>
<legend>Option 2</legend>
<input type="radio" name="Group2" id="Radio3" value="Yes" checked="checked" />Yes
<input type="radio" name="Group2" id="Radio4" value="No" />No
<div id="Group2Fields" style="margin-left: 20px;">
Percentage 1:
<input type="text" id="Text1" /><br />
Percentage 2:
<input type="text" id="Text2" /><br />
</div>
</fieldset>
<script type="text/javascript">
$(document).ready(function () {
//apply disabled style to all disabled controls
$("input:disabled").addClass("disabled");
$("input[name='Group1']").change(function () {
var disabled = ($(this).val() == "No") ? "disabled" : "";
$("#Group1Fields input").attr("disabled", disabled);
//apply disabled style to all disabled controls
$("input:disabled").addClass("disabled");
//remove disabled style to all enabled controls
$("input:not(:disabled)").removeClass("disabled");
});
$("input[name='Group2']").change(function () {
var disabled = ($(this).val() == "No") ? "disabled" : "";
$("#Group2Fields input").attr("disabled", disabled);
//apply disabled style to all disabled controls
$("input:disabled").addClass("disabled");
//remove disabled style to all enabled controls
$("input:not(:disabled)").removeClass("disabled");
});
});
</script>
We're trying to document the performance difference of our site using different browsers. We use LoadRunner for load testing but I don't see a way to specify the "browser engine" it uses to run it's tests (perhaps it's using it's own?). In any event I'm not sure that LoadRunner is the right tool for this job but we own it so if we can use it, great.
If not, is there another tool out there that I can use to record a script and run it automatically against a site using several different browsers?
I have a file that contains filenames like this:
my_cool_file.xxx
my_cool_file2.xxx
my_cool_file3.xxx
I have a folder that has:
some_file.xxx
some_file2.xxx
some_file3.xxx
I would like to have a bash script to take one line from the filename file and rename one file in the folder.
Is there a way to do this?
i have the variable $a = 5; i want to show it in binary form, with length, equal 8, with writing * at white spaces, just like this, like this * * * * *101
here the script
$number = 5;
printf("%*8b", $number);
it doesn't work with *, but if "0"-s it works
printf("%08b", $number);
//returns 00000101
why it doesn't work with *?
It seems that I have more trouble getting standard Unix things to run on Snow Leopard than any other platform--including Windows cygwin
For the past couple of days, I've been trying to get ImageMagick to run on Snow Leopard.
The most obvious way, Mac Ports, fails:
tppllc-Mac-Pro:ImageMagick-sl swirsky$ sudo port install imagemagick
---> Computing dependencies for p5-locale-gettext
---> Configuring p5-locale-gettext
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_perl_p5-locale-gettext/work/gettext-1.05" && /opt/local/bin/perl Makefile.PL INSTALLDIRS=vendor " returned error 2
Command output: checking for gettext... no
checking for gettext in -I/opt/local/include -arch i386 -L/opt/local/lib -lintl...gettext function not found. Please install libintl at Makefile.PL line 18.
no
Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade xorg-libXt failed
Before reporting a bug, first run the command again with the -d flag to get complete output.
tppllc-Mac-Pro:ImageMagick-sl swirsky$
Not wanting to spend another two days figuring out why my libintl doesn't have a "gettext" function, I tried a different route: the script mentioned here: http://github.com/masterkain/ImageMagick-sl
This script downloads and installs an ImageMagic independently of MacPorts issues
tppllc-Mac-Pro:ImageMagick-sl swirsky$ /usr/local/bin/convert
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
Referenced from: /opt/local/lib/libfontconfig.1.dylib
Reason: Incompatible library version: libfontconfig.1.dylib requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
Trace/BPT trap
It downloads everything and compiles fine, but fails when I try to run it, with the message above.
So now I'm two steps away from ImageMagick, trying to get a newer libiconv on my machine.
I downloaded the latest libiconv, compiled and built it. I put the resulting library in /opt/local/lib, and I still get the same error message:
tppllc-Mac-Pro:.libs swirsky$ sudo mv libiconv.2.dylib /opt/local/lib/libiconv.2.dylib
tppllc-Mac-Pro:.libs swirsky$ convert
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
Referenced from: /opt/local/lib/libfontconfig.1.dylib
Reason: Incompatible library version: libfontconfig.1.dylib requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
Trace/BPT trap
Now here's something interesting. The error message shows it's looking in /opt/local/lib/libiconv.2.dylib.
otools -L shows that this does implement 8.0.0:
tppllc-Mac-Pro:.libs swirsky$ otool -L /opt/local/lib/libiconv.2.dylib
/opt/local/lib/libiconv.2.dylib:
/usr/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
tppllc-Mac-Pro:.libs swirsky$
And, for good measure, I set the DYLD_LIBRARY_PATH to make sure this directory is the one for dynamic libraries.
So even though I do have a library that provides 8.0.0, it's being seen as 7.0.0! Any ideas why this would happen?
So here's my question: Is it possible to get ImageMagick to run on OSX Snow Leopard? Are there any binary distributions that have static libraries baked in so I don't have to worry about these issue/
Hi,
I know using External Tools options i can run a batch script or a cmd prompt. But here is what i need to do
I want to be able to call a dos prompt inside visual studio, which must be interactive. That way i won't be outside visual studio and can run all my dos commands in it. Is it possible? Or can i extend the command window and capture the commands which are typed and process them using my custom code?
Thanks
Hi,
I know using External Tools options i can run a batch script or a cmd prompt. But here is what i need to do
I want to be able to call a dos prompt inside visual studio, which must be interactive. That way i won't be outside visual studio and can run all my dos commands in it. Is it possible? Or can i extend the command window and capture the commands which are typed and process them using my custom code?
Thanks
AppStore now rejects applications made with non-Apple like languages. (with modified contract)
However, is it allowed using declarative mark-up language formed with XML? (like XHTML, but different schema) The declarative mark-up is a code too, but not a script or logic code. Just a passive, static data, but forms some layout and part of an application logic.
Hi,
I use rich:inputNumberSpinner tag.
The problem is :
I set cursor focus to inside of rich:inputNumberSpinner field, then i hit the enter button from my keyboard, that time page will be automatically refresh.
But i don't need page refresh when i hit the enter button from my keyboard.
The code :
spinnerTagTest.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Spinner Tag Test</title>
</head>
<body>
<h:form id="SpinnerForm">
<rich:panel id="SpinnerPanel">
<h:outputText value="Input Spinner Tag : "/>
<rich:inputNumberSpinner id="spinnerField" value="" maxValue="23"
inputSize="2"/>
</rich:panel>
</h:form>
</body>
I also use rich:hotKey for that inputNumberSpinner field. But Page refreshed.
<rich:hotKey key="return"
selector="#spinnerField"
handler="event.stopPropagation();event.preventDefault();
return false;"/>
And i check anotherway using javasccript, but page refreshed.
The specific tag and javascript is :
<rich:inputNumberSpinner id="spinnerField" value="" maxValue="23" inputSize="2"
oninputkeypress="return stopPageRefresh();"/>
<script type="text/javascript">
function stopPageRefresh()
{
return false;
}
</script>
Here i use one alert message inside of stopPageRefresh().
But i hit enter button, first page refreshing and then alert message displayed.
Help me about this.
Thanks in advance.
Hi all,
I tried this script to copy release folder of one of my Xcode projects to desktop:
tell application "Finder"
set targetFolder to folder "release" of folder "build" of folder "8_15pm" of folder "26th_March" of folder "XYZ" of startup disk
set destinationFolder to folder "Desktop" of folder "miraaj" of folder "Users" of startup disk
copy targetFolder to destinationFolder
end tell
I was expecting that I will obtain a folder named as release on my desktop but I did not get any :(
Can anyone suggest me where I am wrong or some better way to do this??
Thanks,
Miraaj
I need to parse a command line like
script.rb <mandatory filename> [options]
with optparse.
Sure I can write some custom code to handle the filename, then pass ARGV to optparse, but maybe there's a simpler way to do it?
EDIT: there's another hacky way to parse such a command line, and that is pass '--mandatory-filename ' + ARGV to optparse, then handle the --mandatory-filename option.