Monday, 9 September 2013

Are there any programs for rapid PHP development?

Are there any programs for rapid PHP development?

I want to be able to run and test PHP scripts without have to upload it
every time to my webserver. I've tried searching online, but everything I
came across was a bit confusing. Is there anything like this?
Thanks

Why shouldn't commas be included in sql field names?

Why shouldn't commas be included in sql field names?

People keep telling me that spaces shouldn't be included in column names.
I was just wondering, why is that? It is an issue I am having with a few
database tables I am creating for school. The field names include Preble
and Darke.
Instead, they need to be "Preble County (OH)" and "Darke County (OH)". If
they were row names, I would just create an ID # column, and natural join
that with a table displaying names that I want them to be ("Darke County
(OH)" instead of "Darke").
However, I have no idea how I can go about changing these names since they
are my field names. Can anyone help me out? Any help would be greatly
appreciated.

Delphi 2009 Exception Tracking

Delphi 2009 Exception Tracking

I've inherited a big @$$ Delphi Application that by itself are so full of
problems, that I'm not sure how I will be able to track down a problem
that I'm currently getting.
The application crashes and terminates abnormally, and I'm unable to
establish a pattern. I've added madExcept, and that helped me a lot
getting some other problems, but when the application dies, not even
madExcept is able to stop it so that I can get an exception report. I've
downloaded Eurekalog as well to see if this can help me, but no luck.
Does anybody have a solution on what I can try. Any tool that will be able
to help me out in tracking down the problem. SmartInspect does have some
kind of solution, but I will have to change a lot of code for it to work,
and unfortunately the main unit of this application sit with over 53k
lines of code. (Just nasty).
Any help on what I can use to track this error will be appreciated. I need
to but this "tracker" on a user machine because this application is
running live at almost 2000 users.
If anybody also know why a random RICHEDIT20.DLL access violation will pop
up now and again, it will be very usefull, because why it happens just
baffles me completely.
Thanks Jaques

how do I fix this error in python 3.3? TypeError: unorderable types: str() < int()

how do I fix this error in python 3.3? TypeError: unorderable types: str()
< int()

i was trying to create a number guessing game but I get the error for
"guessestaken"I copied the code from
http://inventwithpython.com/IYOCGwP_book1.pdf page 57.Sorry I am a bit new
to python.
import random
guessestaken=0
print ("hello what ur name?")
myname=input()
number=random.randint(1,20)
print ("well " + myname + " i am thinking of a number guess it")
while guessestaken < 6 :
guessestaken=guessestaken+1
guess =input('take a guess')
guess = int(guess)
if guess <number:
print('too low')
if guess >number:
print ('too high')
if guess ==number:
break
if guess ==number:
guessestaken=str(guessestaken)
print ('good job ' + myname + ' you are right!')
print ('you guessed it in ' + guessestaken + ' guesses')
if guess !=number:
guessestaken = str(guessestaken)
print ("I am sorry but you couldn't get it right")
print ("you couldn't guess it in " + guessestaken + " guesses")

How do I set a storyboard from the XAML resources (in code behind)?

How do I set a storyboard from the XAML resources (in code behind)?

I am new to using WPF, I have made an animated Expander (seems to be a
popular first control :) ) using the blog post here, but I cannot seem to
get the Storyboard from the Resources...
Here is my XAML:
<Expander xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
x:Class="CustomControls.CustomExpanderControl"
x:Name="ExpanderAnimated"
d:DesignHeight="400" d:DesignWidth="150" Height="24"
Width="150" Opacity="0.5" Header="ExpanderAnimated">
<Expander.Resources>
<Storyboard x:Key="OnExpanded">
<DoubleAnimationUsingKeyFrames
Storyboard.TargetProperty="(UIElement.Opacity)"
Storyboard.TargetName="ExpanderAnimated">
<EasingDoubleKeyFrame KeyTime="0" Value="0.5"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames
Storyboard.TargetProperty="(FrameworkElement.Height)"
Storyboard.TargetName="ExpanderAnimated">
<EasingDoubleKeyFrame KeyTime="0" Value="24"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="150"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="OnCollapsed">
<DoubleAnimationUsingKeyFrames
Storyboard.TargetProperty="(UIElement.Opacity)"
Storyboard.TargetName="ExpanderAnimated">
<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.5"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames
Storyboard.TargetProperty="(FrameworkElement.Height)"
Storyboard.TargetName="ExpanderAnimated">
<EasingDoubleKeyFrame KeyTime="0" Value="150"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="24"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Expander.Resources>
<Expander.Triggers>
<EventTrigger RoutedEvent="Expander.Expanded"/>
<EventTrigger RoutedEvent="Expander.Collapsed"/>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource OnExpanded}"/>
<BeginStoryboard Storyboard="{StaticResource OnCollapsed}"/>
</EventTrigger>
</Expander.Triggers>
</Expander>
And the relevant code behind:
private Storyboard sbCollapsed
{
get { return (Storyboard)this.Resources["OnCollapsed"]; }
set { Resources["OnCollapsed"] = value; }
}
private Storyboard sbExpanded
{
get { return (Storyboard)this.Resources["OnExpanded"]; }
set { Resources["OnExpanded"] = value; }
}
private SplineDoubleKeyFrame CollapsedFromHeight
{
get
{
return (SplineDoubleKeyFrame)
((DoubleAnimationUsingKeyFrames)sbCollapsed.Children[0]).KeyFrames[0];
}
}
private SplineDoubleKeyFrame CollapsedToHeight
{
get
{
return (SplineDoubleKeyFrame)
((DoubleAnimationUsingKeyFrames)sbExpanded.Children[0]).KeyFrames[1];
}
}
private SplineDoubleKeyFrame ExpandedFromHeight
{
get
{
return (SplineDoubleKeyFrame)
((DoubleAnimationUsingKeyFrames)sbCollapsed.Children[0]).KeyFrames[0];
}
}
private SplineDoubleKeyFrame ExpandedToHeight
{
get
{
return (SplineDoubleKeyFrame)
((DoubleAnimationUsingKeyFrames)sbExpanded.Children[0]).KeyFrames[1];
}
}
(That is the whole XAML, I can post the whole c# if needed)
What do I need to change in the 2 private StoryBoard properties to set
them correctly?
The exception is as follows:
NullReferenceException: Object reference not set to an instance of an object.
StackTrace
at CustomControls.ExpanderAnimated.get_CollapsedToHeight() // This is the
private property as above
at CustomControls.ExpanderAnimated.get_CollapsedHeight() // This is the
public property
InnerException: None
EDIT
This is happening in the Designer
I click on the Expander:
And it shows this exception:

Bot getting value of attribute(Magento)

Bot getting value of attribute(Magento)

I have created an attribute named as 'specialtext' for every product.But
not getting value of this specialtext field in frontend.Any idea?

Sunday, 8 September 2013

How to deal MyISAM data corruption with myisamchk

How to deal MyISAM data corruption with myisamchk

How to deal MyISAM format data corruption with myisamchk in MySQL. If
Tables, Triggers, Views and Primary Keys become are corrupted. Then you
run access the tables through mysql while you run myisamchk and check
tables after run myisamchk and get a warning that a table is corrupt even
when it is not. After performing myisamchk the three files in the database
directory are shown in the following table.
tbl_name.frm Definition (format) file
tbl_name.MYD Data file
tbl_name.MYI Index file
Sometimes myisamchk is failure and cannot be guarantee to repair corrupt
MySQL database. If you are not able to repair corrupt database with
myisamchk, then find the tool which is repair corrupted MySQL database
automatically