How do I delay a PHP script that writes to a text file and then reads from the same file long enough to make sure changes have been written before I attempt the read?
hello everybody, I've got strange problem with cut
I wrote script, there I have row:
... | cut -d" " -f3,4 >! out
cut recieves this data (I checked it with echo)
James James 033333333 0 0.00
but I recieve empty lines in out, can somebody explain why?
I am preparing a script. I am using AJAX(load()) with jQuery.
I am getting a page which includes textarea with ckeditor by load() jQuery AJAX function.
Although I include ckeditor's.js file, loaded page doesn't includes javascript file and shows a normal textarea without ckeditor.
How can I load file which includes textarea with ckeditor?
I have a searchbox with auto-suggest that pops a div up underneath it with multiple search string suggestions (like google). Is it possible to have drop shadow on the auto-suggest box with CSS or will I need a script of some sort? I tried a background image but the number of suggests can vary from 1 to 10 or 15.
I'd prefer something that works in IE6+ and FF2+ if possible. Thanks!
I am using Tomcat 6. I am running a php script using the JavaBridge. I get the following error when I run my code.
Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\xxxx\xxxxx.php on line 534
Please help.
I want to display ALL the blog post i've written to my visitors. Blogspot have 'Archive' widget but it display only the post posted in a particular month/year. I want to display all the posts.
Is there any solution to that without using javascript??
(i don't want to use javascript 'cuz some users might have their script disabled)
Thank You.
What is the best way to validate a crontab entry with PHP? Should I be using a regex, or an external library? I've got a PHP script that adds/removes entries from a crontab file, but want to have some way to verify that the time interval portion is in a valid format.
I was told I can add the -XX:+HeapDumpOnOutOfMemoryError parameter to my JVM start up options to my JBoss start up script to get a heap dump when we get an out of memory error in our application. I was wondering where this data gets dumped? Is it just to the console, or to some log file? If it's just to the console, what if I'm not logged into the unix server through the console?
Thanks
When the user clicks a logout button, I connect to a script that simply does this
session_destroy();
session_start();
I thought this would be enough to reset all $_SESSION variables such as $_SESSION['logged'] and $_SESSION['username'] but when I load the page again, it automatically logs me in as if the session is still active.
I'm having a problem displaying data from a function to text box within a tab.
If you run the code and click "Select Tab 2 and Fill..." I get an error;
"TypeError: Error #1009: Cannot access a property or method of a null object reference."
I'm guessing this is because "Tab 2" is/was not rendered yet. Now if I run the code,
select "Tab 2" then select "Tab 1" and click "Select Tab 2 and Fill..." it works
the way I would like. Dose any one know a way around this problem.
----Full Flex 4/Flash Builder Code just copy paste----
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
creationComplete=" ">
<fx:Script>
<![CDATA[
public function showtab2():void
{
mytextbox.text="I made it!";
tn.selectedIndex=1;
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<mx:Panel title="TabNavigator Container Example" height="90%" width="90%"
paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
<mx:Label width="100%" color="blue"
text="Select the tabs to change the panel."/>
<mx:TabNavigator id="tn" width="100%" height="100%">
<!-- Define each panel using a VBox container. -->
<mx:VBox label="Panel 1">
<mx:Label text="TabNavigator container panel 1"/>
<mx:Button label="Select Tab 2 and Fill with Text" click="showtab2()"/>
</mx:VBox>
<mx:VBox label="Panel 2">
<mx:Label text="TabNavigator container panel 2"/>
<s:TextInput id="mytextbox" />
</mx:VBox>
</mx:TabNavigator>
<mx:HBox>
</mx:HBox>
</mx:Panel>
</s:WindowedApplication>
I was wondering if anyone has come up with an ASP.net server tag for the HTML5 canvas? I was thinking of something where I could declaritively define paths, curves; etc in the aspx markup, and the control would deliver the js to do this (perhaps with support for browser detection, and delivery of an emulation script for IE browsers.)
Maybe a good idea for a Codeplex project for me to start up?
I've inherited a bunch of code that has server script inside of .htm files.
On IIS, a handler mapping pumps.Htm pages though the asp.net engine.
Unfortunately, visual studio doesn't notice that they should be treated as code.
Is there any way to make VS treat .Htm files as code/aspx files?
I have some data about place,road, city.
And I want to search the map by entering these values.
Now I have script that generate latitude and longitude using geocoding.
But I wonder if there is a way to generate google map code (iframe) by geocoding?
Could you please tell me the way or give me some links?
Hi, Disqus automatically places defined captions upon request. For example: Add new Comment
I've tried to change its value with jquery on ready():
$('#dsq-new-post h3').text('Paticipa con tu cuenta favorita');
No success :( ... how can i know when disqus script is finished parsing the data so i can change the caption value of h3?
I got a Silverlight App with-in a Web Project
Web
Silverlight
The web contains a service:
[WebService(Namespace = "svChat")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
//[System.Web.Script.Services.ScriptService]
public class GetIPService : System.Web.Services.WebService
{
public GetIPService ()
{
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string GetIp()
{
return HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
}
}
And I got a class in my Silverlight App using the Service:
public class Client
{
private string ip;
private string created;
#region Properties
public string Ip
{
get { return ip; }
set { ip = value; }
}
public string Created
{
get { return created; }
set { created = value; }
}
#endregion
public Client()
{
}
public void SetIp()
{
ServiceReference1.GetIPServiceSoapClient scIpClient = new svChat.ServiceReference1.GetIPServiceSoapClient();
scIpClient.GetIpCompleted += new EventHandler<svChat.ServiceReference1.GetIpCompletedEventArgs>(IpService_Completed);
scIpClient.GetIpAsync();
}
private void IpService_Completed(object sender, ServiceReference1.GetIpCompletedEventArgs e)
{
this.ip = e.Result;
}
}
After Client is created, SetIp() is called, and Client.Ip is added to a text box.
Nothing happens.
Ip = null.
Service itselfs works, tested it.
Getting Ip by the above code works.
Gettings Ip via service through Silverlight App does not work.
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="GetIPServiceSoap" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:2090/svChat.Web/GetIPService.asmx"
binding="basicHttpBinding" bindingConfiguration="GetIPServiceSoap"
contract="ServiceReference1.GetIPServiceSoap" name="GetIPServiceSoap" />
</client>
</system.serviceModel>
</configuration>
Any ideas?
regards,
Hi,
I'm using latest version of Xampp on 64bit Win7.
The problem is that, when I use mysql_connect with "bool $new_link" set to true like so:
mysql_connect('localhost', 'root', 'my_password', TRUE);
script execution time increases dramatically (about 0,5 seconds per connection, and when I have 4 diffirent objects using different connections, it takes ~2 seconds).
Is setting "bool $new_link" to true, generally a bad idea or could it just be some problem with my software configuration.
Thank you.
I would like to create a python script, which will:
Create a django project in the current directory. Fix settings.py, urls.py.
Do syncdb
Install new apache instance listening on specific port (command line argument), with WSGI configured to serve my project.
I can't figure out how to do point 3.
EDIT:
Peter Rowell:
I need the solution for both Linux and Windows
I have root access
This is a dedicated host
Apache only
The question is to know if there is a way to build an HTML email with inline style (no CSS file, nor tags) with the href links that react with the mouse passing over them : just to be able to change the color font.
So, no JS, no script, no , just link
What does the following code mean -
<a href="javacsript:;" onClick="addItem(160)">some link</a>
My basic doubt is which script is run when we click on the link
There is a simple way with php, a simple script or URL manipulation to build a URL for the gravatar image corresponding to an email?
Ex. http://gravatar.com/avatars/[email protected] and this return a jpeg or png image.
If there is no simple way like the example, what is the easiest way you know to resolve a url of the gravatar corresponding to an email?. Thanks
For my first windows gadget I'm trying to make one that displays the current time and date. The code below is what I have, but I can't figure out why the javascript is not running. Any ideas?
<html>
<head>
http-equiv="Content-Type" content="text/html; charset=Unicode" />
<title>Clock</title>
<style type="text/css">
body { width: 130px; height: 60px; margin: 1 1 1 2; }
body { font-family: Segoe UI, Arial; font-size: 11px; font-weight: bold; white-space: nowrap; }
</style>
<script type="text/javascript">
var background;
var interval;
var connection_id;
var timeZone;
var now;
function load() {
try {
interval = 1000;
connection_id = 0;
timeZone = System.Time.currentTimeZone;
update();
}
catch(e){}
}
function update() {
try {
now = new Date(Date.parse(System.Time.getLocalTime(timeZone)));
curDate.innerHTML = now.format('M jS, Y');
curTime.innerHTML = now.format('h:i:s A');
clearTimeout(connection_id);
connection_id = setTimeout("update()", interval);
}
catch(e) {}
</script>
</head>
<body onload="load()">
<div id="curDate">
</div>
<div id="curTime">
</div>
</body>
</html>
I am writing a script to run under the korn shell on AIX. I'd like to use the mkdir command to create a directory. But the directory may already exist, in which case I don't want to do anything. So I want to either test to see that the directory doesn't exist, or suppress the "File exists" error that mkdir throws when it tries to create an existing directory.
Any thoughts on how best to do this?
We have multiple maven projects depending on on our own common libraries.
When we upgrade a library it would be useful to quickly find out which projects have a dependency on the library (and might need to use the new version)
Obviously I can manually look in all the pom files or write a script to do it but this is less than ideal.
Are there any tools that provide this functionality. e.g. a hudson plugin, Nexus, artifactory etc?
I need to install a plugin like this:
script/plugin install git://github.com/apotonick/cells.git
and it just creates a new empty folder in the plugins dir, "cells"
(i use eclipse and rails)
Is that a bad question, i dont get it?(-6 votes)
Hi all
I'm attempting to write a PowerShell script that, among other things, runs two external programs, harvesting the output of one and providing it to the other.
The problem is that the second program is interactive and asks for:
- a password
- an option (1, 2, or 3)
- an option (Y or N)
- output of external program 1
Note also that this is on XP with PowerShell v1 and .net v2.0 (no I can't upgrade)
Any ideas how I would do this?
CC