Building webpage: Possible to take input from an HTML form and use it as
input into a Python function?
Trying to build a webpage.
I would like to be able to take some user input from an HTML form, run a
python function on that input, and spit out some output back to the user.
Example: users input '2' into the HTML form, the python function doubles
it and returns '4' on the webpage (my actual function uses matrix algebra
so unlikely I could do it all in jQuery).
I'm using cherrypy but I am open to other modules. I'm at a loss as to how
to go about doing this as most cherrypy examples just print a string
without actually calling any python functions.
Monday, 2 September 2013
dt.last-child not working
dt.last-child not working
Here is a fiddle where I'd like to remove the white border:bottom on the
last child ('Headline Three').
I tried the following CSS, but it didn't work.
#containerr dt.last-child {
border-bottom:none;
}
Any idea what I'm doing wrong?
Here is a fiddle where I'd like to remove the white border:bottom on the
last child ('Headline Three').
I tried the following CSS, but it didn't work.
#containerr dt.last-child {
border-bottom:none;
}
Any idea what I'm doing wrong?
How can I make a SQL-script run after a certain time without waiting for it?
How can I make a SQL-script run after a certain time without waiting for it?
I'm trying to make a SQL-script delayed.
I could use:
blah blah
WAITFOR DELAY '00:30:00'
blah blah
but using a script like this requires that I sit through the 30 minutes.
Leaving the website will cancel the script.
The problem is that I want to change something in a table, and then change
it back automatically 30 minutes later.
The person making the change will leave the webpage, so any kind of
client-side script is out of the question.
Nor can I wait for the person to return and make the change if 30 minutes
have passed, the change must happen after 30 minutes regardless.
Is there anyway to do this without making a service or any other program
on the server?
Using only ASP/SQL programming.
If this is impossible, how do I make a service or program on the server to
make this change?
Must be able to start this from the website using ASP.
I'm trying to make a SQL-script delayed.
I could use:
blah blah
WAITFOR DELAY '00:30:00'
blah blah
but using a script like this requires that I sit through the 30 minutes.
Leaving the website will cancel the script.
The problem is that I want to change something in a table, and then change
it back automatically 30 minutes later.
The person making the change will leave the webpage, so any kind of
client-side script is out of the question.
Nor can I wait for the person to return and make the change if 30 minutes
have passed, the change must happen after 30 minutes regardless.
Is there anyway to do this without making a service or any other program
on the server?
Using only ASP/SQL programming.
If this is impossible, how do I make a service or program on the server to
make this change?
Must be able to start this from the website using ASP.
Problems occurred when invoking code from plug-in: "org.eclipse.jface"
Problems occurred when invoking code from plug-in: "org.eclipse.jface"
I'm working on Graphical Modelling Framework. I create one diagram file by
using GMF and launch it in eclipse running application but when i select
some items of this diagram file, I get this error:
An error has occurred. See error log for more details.
org/eclipse/gmf/runtime/gef/ui/internal/parts/CellEditorEx.
for more explanation, my created diagram file contains one class with one
Neme feature. when i select my class as one object and want to change Name
feature, i get above error. can every one help me? i don't know why this
error occur?!in fact, this error is related to my eclipse or is about one
mistake in my project!Thanks.
-------------details:----------------------
in my error log : Problems occurred when invoking code from plug-in:
"org.eclipse.jface".
Exception stack trace:
java.lang.NoClassDefFoundError:
org/eclipse/gmf/runtime/gef/ui/internal/parts/CellEditorEx
at
org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy.getDirectEditCommand(LabelDirectEditPolicy.java:67)
at
org.eclipse.gef.editpolicies.DirectEditPolicy.getCommand(DirectEditPolicy.java:59)
at
org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:502)
at
org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$1(GraphicalEditPart.java:1)
at
org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$1.run(GraphicalEditPart.java:482)
at
org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
at
org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.getCommand(GraphicalEditPart.java:477)
at org.eclipse.gef.tools.DirectEditManager.commit(DirectEditManager.java:144)
at
org.eclipse.gmf.tooling.runtime.directedit.DirectEditManagerBase.commit(DirectEditManagerBase.java:304)
at
org.eclipse.gef.tools.DirectEditManager$4.applyEditorValue(DirectEditManager.java:298)
at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:335)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at
org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(CellEditor.java:333)
at
org.eclipse.jface.viewers.TextCellEditor.handleDefaultSelection(TextCellEditor.java:293)
at
org.eclipse.jface.viewers.TextCellEditor$1.widgetDefaultSelected(TextCellEditor.java:148)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:119)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: java.lang.ClassNotFoundException:
org.eclipse.gmf.runtime.gef.ui.internal.parts.CellEditorEx at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source) ... 43 more
I'm working on Graphical Modelling Framework. I create one diagram file by
using GMF and launch it in eclipse running application but when i select
some items of this diagram file, I get this error:
An error has occurred. See error log for more details.
org/eclipse/gmf/runtime/gef/ui/internal/parts/CellEditorEx.
for more explanation, my created diagram file contains one class with one
Neme feature. when i select my class as one object and want to change Name
feature, i get above error. can every one help me? i don't know why this
error occur?!in fact, this error is related to my eclipse or is about one
mistake in my project!Thanks.
-------------details:----------------------
in my error log : Problems occurred when invoking code from plug-in:
"org.eclipse.jface".
Exception stack trace:
java.lang.NoClassDefFoundError:
org/eclipse/gmf/runtime/gef/ui/internal/parts/CellEditorEx
at
org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy.getDirectEditCommand(LabelDirectEditPolicy.java:67)
at
org.eclipse.gef.editpolicies.DirectEditPolicy.getCommand(DirectEditPolicy.java:59)
at
org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:502)
at
org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$1(GraphicalEditPart.java:1)
at
org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$1.run(GraphicalEditPart.java:482)
at
org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
at
org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.getCommand(GraphicalEditPart.java:477)
at org.eclipse.gef.tools.DirectEditManager.commit(DirectEditManager.java:144)
at
org.eclipse.gmf.tooling.runtime.directedit.DirectEditManagerBase.commit(DirectEditManagerBase.java:304)
at
org.eclipse.gef.tools.DirectEditManager$4.applyEditorValue(DirectEditManager.java:298)
at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:335)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at
org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(CellEditor.java:333)
at
org.eclipse.jface.viewers.TextCellEditor.handleDefaultSelection(TextCellEditor.java:293)
at
org.eclipse.jface.viewers.TextCellEditor$1.widgetDefaultSelected(TextCellEditor.java:148)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:119)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: java.lang.ClassNotFoundException:
org.eclipse.gmf.runtime.gef.ui.internal.parts.CellEditorEx at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source) ... 43 more
Sunday, 1 September 2013
IE8 is not showing properly page but after refreshing it is showing properly
IE8 is not showing properly page but after refreshing it is showing properly
I have strange problem. When I first load page
http://bmsc.tfei.info/en/staff in IE, it is showing photos and text in
wrong places. But when I refresh, it shows in proper places. Why it is
showing like this? I am using jQuery in all my pages in order to calculate
height of page, maybe it is because of jQuery? Please tell me what is
wrong?
I have strange problem. When I first load page
http://bmsc.tfei.info/en/staff in IE, it is showing photos and text in
wrong places. But when I refresh, it shows in proper places. Why it is
showing like this? I am using jQuery in all my pages in order to calculate
height of page, maybe it is because of jQuery? Please tell me what is
wrong?
Visual Basic call a sub
Visual Basic call a sub
I am teaching myself VB and am trying to call the sub Main() however, when
I include it after the End Sub it says Syntax error and when I run it
without calling, nothing happens. Please could you explain to me what I am
doing wrong and how to call the sub.
Imports System.IO
Public Class Form1
Sub Main()
HouseCalc(99800, 43100)
Call HouseCalc(380950, 49500)
End Sub
Sub HouseCalc(price As Single, wage As Single)
If 2.5 * wage <= 0.8 * price Then
MsgBox("You cannot afford this house.")
Else
MsgBox("This house is affordable.")
End If
End Sub
End Class
Thanks, Marcus
I am teaching myself VB and am trying to call the sub Main() however, when
I include it after the End Sub it says Syntax error and when I run it
without calling, nothing happens. Please could you explain to me what I am
doing wrong and how to call the sub.
Imports System.IO
Public Class Form1
Sub Main()
HouseCalc(99800, 43100)
Call HouseCalc(380950, 49500)
End Sub
Sub HouseCalc(price As Single, wage As Single)
If 2.5 * wage <= 0.8 * price Then
MsgBox("You cannot afford this house.")
Else
MsgBox("This house is affordable.")
End If
End Sub
End Class
Thanks, Marcus
asp.net get Last Id threats
asp.net get Last Id threats
I have to tables , first one is [TempTable1] and second is [Table1] .First
I insert data into [TempTable1] , after updating [confirmed] column in it
, a Trigger [trigger1] moves a specific record depend on ID to [Table1] ,
what I want here is to get currently added record ID of the [Table1] in c#
code , I thought about getting last record, but what I afraid of is
conflating , because when a user confirms its data , they will transformed
from [TempTable1] to [Table1] , and maybe user2 do the same , user3 also
and so on.. if I always get last added id , may some users net is slow and
it takes time for server to do the transformation , someones net is quick
, its data maybe added before first user get its respond by getting its
id, so may some ones id goes to another one when I get it in c# code and
do operation on it , am I true or there is no threat in doing this ?
I have to tables , first one is [TempTable1] and second is [Table1] .First
I insert data into [TempTable1] , after updating [confirmed] column in it
, a Trigger [trigger1] moves a specific record depend on ID to [Table1] ,
what I want here is to get currently added record ID of the [Table1] in c#
code , I thought about getting last record, but what I afraid of is
conflating , because when a user confirms its data , they will transformed
from [TempTable1] to [Table1] , and maybe user2 do the same , user3 also
and so on.. if I always get last added id , may some users net is slow and
it takes time for server to do the transformation , someones net is quick
, its data maybe added before first user get its respond by getting its
id, so may some ones id goes to another one when I get it in c# code and
do operation on it , am I true or there is no threat in doing this ?
Subscribe to:
Posts (Atom)