Posts Tagged ‘error message’

Weird bug on powerpoint vba

Monday, August 23rd, 2010

I have a “mynote” textbox on a slide. If I execute:

Sub test()

            If ActiveWindow.Selection.SlideRange.Shapes("mynote").Visible Then
                MsgBox "ok"
            End If
end sub

It works.

But If I attach a shape with this macro:

Sub test(oShape As Shape)

            If ActiveWindow.Selection.SlideRange.Shapes("mynote").Visible Then
                MsgBox "ok"
            End If
end sub

It doesn’t work (no error message, no “ok” message)

PS CS4 opening error message: OWL Orphanage

Monday, August 23rd, 2010

Had no problem installing the PS CS4 (update from CS3). On opening PS the first time, and every time after, I receive an error message:

“OWL Orphanage: Photoshop.exe – entry point not found.”

This is followed by a bunch of numbers or addresses. After I shut the message, the program opens normally, and as farr as I’ve explored it, functions OK. Haven’t had time to really explore things.

Any idea what is producing this message?

Am running Win XP SP3.

J. Lipmanson

Manage Authors interface does not appear

Sunday, August 22nd, 2010
Hello all you PHP people,
I am studying Kevin Yanks PHP/MySQL 4th ed. book and I am on page 202. Everything was working fine till I started this page. I’ve triple checked the code that I’ve typed to ensure that it is exactly as is in the book. I’ve ensured that the files are in the proper folders and that they are installed correctly in the htdocs folder on the Apache server.

The error message that returns is this:

Parse error: syntax error, unexpected ‘]’, expecting T_STRING or T_VARIABLE or T_NUM_STRING in E:Program FilesApache Software FoundationApache2.2htdocsadminauthorsindex.php on line 15.

Next is the code from the index.php file that I typed:

// Display author list

<?php
include $_SERVER['DOCUMENT_ROOT'] . ‘/includes/db.inc.php’;
$result = mysqli_query($link, ‘SELECT id, name FROM author’);
if (!$result)
{
$error = "Error fetching authors from database’;
include ‘error.html.php’;
exit();
}

while ($row = mysqli_fetch_array($result))
{
$authors[] = array(‘id’ => $row['id'], ‘name’ => $row['name']);
}

include ‘authors.html.php’;
?>

Does anyone have a clue of what is causing the error message.

Thank you, Jim

Is this an example of binary serialization

Sunday, August 22nd, 2010

Hi , I have write this code for write error message in .txt file and this code is working fine.

void writeToLogFile(string logMessage)

    {

        string strLogMessage = string.Empty;

        string strLogFile = System.Configuration.ConfigurationManager.AppSettings["logFilePath"].ToString();

        StreamWriter swLog;

        strLogMessage = string.Format("{0}: {1}", DateTime.Now, logMessage);

        if (!File.Exists(strLogFile))

        {

            swLog = new StreamWriter(strLogFile);

        }

        else

        {

            swLog = File.AppendText(strLogFile);

        }

        swLog.WriteLine(strLogMessage);

        swLog.WriteLine();

        swLog.Close();

    }

I want to know is this an example of binary serialization? 
If YES then please inform me from which line the serialization is done? 
If NO then please tell me an example of Binary Serialization ?

JQuery Validate multiple fields with one error

Sunday, August 22nd, 2010

How would I use the JQuery Validate plugin to have one error message for say 3 fields. For example 3 dob fields. By default I will get 3 error messages if all 3 fields are left blank. I only one one error linked to 3 fields. If any are blank the error comes up.

Why doesn’t this method work

Sunday, August 22nd, 2010

According to this documentation http://appscript.sourceforge.net/rb-appscript/doc/appscript-manual/04_gettinghelp.html the properties method should give me a list of all properties of Finder

puts app("Finder").properties

But I get an error message saying that method is missing.

Also, elements method doesn’t work.

Why is that?

matching array string values in nested for loop in PHP doesn’t recognize condition

Saturday, August 21st, 2010

I am trying to strip out string values from array $error_message_key that match string values from array $err_strings. And then assign the strings that are left to $postback. The particular code that does the filtering in the function below is if($error_message_key[$e] != $err_strings[$g]) but it doesn’t seem to work. I still get all the string values from array $error_message_key.

$err_strings = explode('+', $catch_value);

for($e = 0; $e < count($error_message_key); ++$e)
  {
   for($g = 0; $g < count($err_strings)-1; ++$g)
   {
    if($error_message_key[$e] != $err_strings[$g])
    {
     $postback .= '&'.$error_message_key[$e].'='.$_POST[$error_message_key[$e]];
    }
   }
  }

UPDATE: Here are the arrays:

$error_message_key = array('email','firstName','lastName','pwd','username','phone','street','city', 'country', 'postal','province');

$err_strings = array('lastName','pwd','username');

Array $err_strings actually comes from explode‘d string $catch_value which is in a form of "lastName+pwd+firstName+".

UPDATE:

The output should be in a form of:

$postback = 'lastName=value&firstName=value&phone=value&....'

UPDATE:
This is actually a script that responds if a user has wrong inputs in the form. The supposed to be stripped out string are names of the fields which would have the border color changed. The remaining string values are also names of the fields with correct inputs which would then be refilled with the same inputs… Please feel free to suggest another way of doing this if you think it’s inappropriate…

F# upcasting TextBlock to UIElement

Saturday, August 21st, 2010

What is wrong with:

let (x:UIElement) = upcast new TextBlock()

The error is: The type ‘System.ComponentModel.ISupportInitialize’ is required here and is unavailable. You must add a reference to assembly ‘System, Version=4.0.0….’

TextBlock is a subtype of UIElement…

Note that doing what the error message says does solve the issue, but why is that necessary to do something as basic as upcasting?

How do you stop a form submission by javascript

Saturday, August 21st, 2010
Thanks to everyone who has helped me previously. My progress is so slow! I can make a form with javascript alerts coming up when people do not enter things for certain fields. And I can gather a total addition of numbers entered and make a javascript alert if it falls short of a certain amount.

The form is sent to a php script for processing. But I have discovered that while the javascript alerts come up OK, it does not stop the submission of the form when the final alert is cleared (when you press OK on the alert box).

The form does not get processed if *required* fields are not filled in, the user is alerted by the php form script The form works without javascript. Yes, it could be better but my question is mainly about javascript control:

The alerts come up but the form is only temporarily stopped from being processed by the script if the submit button is pressed, after the alerts are cleared, the form goes through. I want it not to go through if the amount does not add up to $5.

Is there anything wrong with my javascript check? Is there anything I can add to form or javascript to stop the form being submitted if the amount is less than $5.

If the required asterisked fields are not filled, the php script sends an error message back, that is good. But I don’t know what to put to make the php script send the error message if the amount is less than $5. I am asking here in case the javascript alone can stop the form. Be very obliged if someone looks over my form and js to see if these at least are OK?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test form</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style type="text/css" media="screen">
table {border-collapse: collapse;}
td {border:1px solid; padding: .4em;}
</style>
<script type="text/javascript" charset="utf-8">
<!–
function validateForm(form)
{

if ("" == document.forms.form.realname.value)
{
alert("Please enter your name.");
return false;

}

if ("" == document.forms.form.phone.value)
{
alert("Please enter your phone number.");
return false;

}

var variable1 = document.getElementById(‘redname’).value;
variable1 = isNaN(variable1) ? 0: Number(variable1);
variable1 = variable1 * 1.20;

var variable2 = document.getElementById(‘bluename’).value;
variable2 = isNaN(variable2) ? 0: Number(variable2);
variable2 = variable2 * 1.50;

var total = variable1 + variable2;

if (total < 5.0) {
alert("Order is less than the minimum required of $5.0")
// return false;
//stops the order being submitted

}

else {
//order is above the min. $5.0
return true;
//allows the form to be submitted

}

}
//–>
</script>

</head>
<body>
<form id="form" method="post" name="form" action="formScript.php" onsubmit="return validateForm(form) ;">
<div>
<input type="hidden" name="recipients" value="recipient@example.com"><input type="hidden" name="required" value="realname,phone"> <input type="hidden" name="bad_url" value="http://example.com.au/error.html"> <input type="hidden" name="good_url" value="http://example.com.au/goodSub.html">
</div>
<table>
<tr>
<td style="border: 0;" colspan="3">
<table id="required">
<tr>
<td class="requiredLabel">*Your name:</td>
<td colspan="2"><input type="text" name="realname" id="realname" size="50"></td>
</tr>
<tr>
<td class="requiredLabel">*Phone&nbsp;number:</td>
<td colspan="2"><input type="text" name="phone" id="phone" size="50"></td>
</tr>
</table>
</td>
</tr>
<tr class="head">
<th>Color</th>
<th>Price</th>
<th>Quantity</th>
</tr>
<tr>
<td>Red</td>
<td>$1.20</td>
<td><input type="text" name="redname" id="redname" size="6"></td>
</tr>
<tr>
<td>Blue</td>
<td>$1.50</td>
<td><input type="text" name="bluename" id="bluename" size="6"></td>
</tr>
<tr>
<td colspan="3">
<p>NB. Minimum order value $5</p>
<p><input type="submit" value="Submit"></p>
</td>
</tr>
</table>
</form>
</body>
</html>

stanwiedeman on “redirect loop”

Friday, August 20th, 2010

My blog was working fine with my domain name, truthseekerblog.com. Then I was in the Dashboard and noticed a shaded tool bar that said I was one click away from making truthseekerblog.com the domain name for my blog, so I clicked it. Now when I click to that domain name I get the error message: The web page has a redirect loop, resulting from too many redirects.

How can I correct this problem?