my vim editor auto highlights php files, html files and so on.
but when i type: vim scriptname
and inside it write a bash script, it doesnt highlight it.
how come?
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.
Recently i was asked
(1) "How will you do performance optimization over your jQuery in ASP.net ?"
(2) "How many script manager can we have in ASP.net Application?" why? (Ajax related).
I have no ideas on both.Help me to grow.
Working on a Powershell script I had several places where I wanted A unless it was null, else B. Essentially the ?? operator in C#. I ended up writing the function shown below, but I can't help but think there is a built-in way to do this.
Is there a better, built-in, way?
function Get-ValueOrDefault()
{
foreach ($value in $args)
{
if ($value -ne $null) { return $value }
}
}
I think this works better:
function Get-ValueOrDefault() { $args | select -first 1 }
Hello
I have printer in CUPS that due driver problems (hp 1010) form time to time goes into pause.
I would like to write a shell script that will be once per hour resuming printer in cups.
But I have no idea after googling for couple of minutes how to resume printer from shell command line.
Regards Stan
How can I post a tweet directly to twitter without needing to use a server-side proxy script (ie, tweetr)? Can a twitter API call be made directly from a swf?
The second link does not work like the first one. How come?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Dynamic CSS Properties</title>
<script language="JavaScript">
function change(){
//document.getElementById("box1").style.visibility = "visible";
var spanArray = document.getElementsByTagName('span');
var number_spans = spanArray.length ;
for( var i = 0; i < number_spans ; i++ ){
var target = spanArray[ i ] ;
// do something with target like set visibility
target.style.visibility = "visible";
}
}
function change2(){
var spanArray=document.getElementsByTagName('span');var number_spans=spanArray.length;for(var i=0;i<number_spans;i++){var target=spanArray[i];target.style.visibility="visible";}
}
</script>
</head>
<body>
<a href="javascript:change2();">Change</a>
<br />
<a href="javascript:var spanArray=document.getElementsByTagName('span');va r number_spans=spanArray.length;for(var i=0;i<number_spans;i++){var target=spanArray[i];target.style.visibility='visible';};
">Show Spans</a>
<br />
<div style="position: relative; overflow: hidden;"><center>
<br><br>
<font size="5" color="blue">
1. just press the <img src="http://up203.siz.co.il/up1/jw2k4az1imny.jpg"> button on the top to see the picture i promise you its so funny!!!!:
<br><br><br>
<span style="background: none repeat scroll 0% 0% white;"><span style="visibility: hidden;">
<a onmousedown="UntrustedLink.bootstrap($(this), "77a0d", event)" rel="nofollow" target="_blank" onclick="(new Image()).src = '/ajax/ct.php?app_id=4949752878&action_type=3&post_form_id=3917211492ade40ee468fbe283b54b3b&position=16&' + Math.random();return true;" href="http://thebigbrotherisrael.blogspot.com/2010/04/all-family-guy-characters-in-real-life.html">Press here to see the picture!!!</a>
</span><span style="visibility: visible;"></span></span></font></center></div>
</body>
</html>
Hi 2ALL...
I've a tablesorter with attached pager plugin on my page with links 'Details' in the one of the cell. Links have a class='lightwindow' and after clicking is rising up a LightWindow script with a window. So it work's vell on the First Page .. when i click Next Page on SortTable.Pager and clickin on my link 'Details' it's doesnt work correctly, it looks like my links lost their class='lightwindow'.
Any suggestions?
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?
Hi I need to backup MySQL database and then deploy it on another MySQL server.
The problem is, I need it backup without data , just script which creates database, tables, procedures, users, resets autoincrements etc. ...
I tried MySQL administrator tool (Windows) and UNchecked "complete inserts check box", but it still created it ...
Thanks in advance
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..
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!
Hi folks,
I'm trying to build a small stress test script to test how quickly a set of requests gets done.
Need to measure speed for 100 requests.
Problem is that I wouldn't know how to implement it, as it would require parallel url requests to be called.
Any ideas?
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?
Good Morning,
Just a quick question what this field actually means?
I am trying to create an export script which follows this standard:
lname varchar(30) **NOT NULL**,
So if last name is_nullable=yes then would I put NULL rather than NOT NULL at the *'d code.
Many Thanks,
Joel
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've got a script to post some data to wordpress using xmlrpc.
If I use a simple string for the body like "This is a test" it works fine.
However, if it has any HTML formatting in it, it gets horribly mangled when trying to add the post.
How do I post html content to wordpress with xmlrpc?
G-Man
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 *?
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 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.
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.
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.
I have a script on my website that shows messsages from a mysql database. Now I want to make it so it only pops up one message at a time. Anyone wanna shed some light on this?
Windows Vista
PHP - Mysql - Ajax - JS
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?