jsp not recognizing a class even though I have imported in under proper packagename in eclipse - database

As you can see that it's not recognising the class MySqlConnection. Thus not allowing me to create its object. The class and package name is correct and its still not working. Is there something I am missing?

Typo... Try to change from MySqConnection to MySqlConnection.

Related

What is the correct usage of the mixin classs for TCL language?

Im attempting to update an old version of the selenium-tcl package to work with the new W3C WebDriver (or Selenium 4.0).
Original packages uses a few mixins for the webdriver class.
So I modeled what I saw and created a mixin file named mixin_action_chains.tcl [1] which has a mixin class called Mixin_Action_Chains.
Whenever I attempt to use it I get the error:
% package require selenium
::selenium::Mixin_Action_Chains does not refer to an object
Im not sure why I've modeled it pretty much exactly as I have seen in the other files such as mixin_for_scrolling.tcl [2]* file. What am I missing.
Here is the entire GitHub Repo
Im not sure what else must be done for TclOO. Any thoughts.
Thanks
Im not sure what else must be done for TclOO. Any thoughts.
Update
pkgIndex.tcl: The placement of the mixin-defining script mixin_action_chains.tcl is wrong, it comes after the mixin has already been required in the previously sourced script webdriver.tcl, like entering directly:
% oo::class create C {
mixin ::not::defined
}
::not::defined does not refer to an object
You need to change the order of source command calls in the package ifneeded script.
For the records
Still, in the original version, there were unbalanced curly braces and brackets in your script, which broke sourcing of the file for me:
https://github.com/SavSanta/w3cselenium-tcl/pull/1

Is it possible to override BakeTasks in a plugin

I want Bake to add a custom TimestampBehavior to every table which has the fields created_at, modified_at, proved_at. I also want to remove the Validators for these fields.
Whether a model is added the TimestampBehavior is programmed in Bake/src/Shell/Task/ModelTask.php. I don't want to edit the file in the vendor folder, because my file might be overridden by an update.
Moving the file to my plugins folder doesn't work since i get the error message "class ModelTask is already defined".
Is it possible to extend the ModelTask somehow or to use a custom ModelTask.php in my plugins folder for bake to achieve my goal?
Thanks for your help!
Moving the file to my plugins folder doesn't work since i get the error message "class ModelTask is already defined".
It doesn't work because you probably haven't changed the namespace. Fix the namespace to the one the plugin uses and you're done. You can even extend classes of the same name by using uses Foo as Bar and then Foo extends Bar.

I am trying to create a new component ("hello.cmp") but when i try to run it on the server I always get error shown in the screen shot

I am trying to learn Aura. I am trying to create a new component ("hello.cmp") but when I try to run it on the server I always get the error shown in the screenshot. I have checked the server is up and running.
When I use this URL "http://localhost:8080/helloWorld/helloWorld.app"
it works fine:
however when i try the same with the newly created component "hello.cmp"
its doesn't work and i get the error as:
org.auraframework.throwable.AuraUnhandledException: Unable to process your request
org.auraframework.throwable.quickfix.DefinitionNotFoundException: No COMPONENT named markup://helloWorld:hello found
at org.auraframework.impl.DefinitionServiceImpl.getHelper(DefinitionServiceImpl.java:1427)
at org.auraframework.impl.DefinitionServiceImpl.compileDef(DefinitionServiceImpl.java:1551)
at org.auraframework.impl.DefinitionServiceImpl.compileDE(DefinitionServiceImpl.java:976)
at org.auraframework.impl.DefinitionServiceImpl.getUid(DefinitionServiceImpl.java:718)
at org.auraframework.impl.DefinitionServiceImpl.updateLoaded(DefinitionServiceImpl.java:588)
at org.auraframework.http.AuraServlet.internalGet(AuraServlet.java:306)
at org.auraframework.http.AuraServlet.doGet(AuraServlet.java:278)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1448)
at org.auraframework.http.AuraTestFilter.innerFilter(AuraTestFilter.java:314)
at org.auraframework.http.AuraTestFilter.doFilter(AuraTestFilter.java:186)
I have restarted the server many times but still the problem remains the same.
PLease advice how to proceed.
I was having a similar problem when I was trying to run the aura server locally.
I think you might have the same problem I had and that is using the correct namespace. If you created a hello component try including it in your app as <hello:hello/>
In Salesforce it the namespace seems to default to "c"
e.g.
<c:component_name> / <c:app_name>
Below I'll explain how I understand the namespace to work, and you should play with this to get your component working:
src
src/main
src/main/webapp
src/main/webapp/WEB-INF
src/main/webapp/WEB-INF/components
src/main/webapp/WEB-INF/helloWorld <- this is the namespace
src/main/webapp/WEB-INF/helloWorld/helloWorld <- this nested folder is the component for the "helloWorld" namespace
src/main/webapp/WEB-INF/helloWorld/helloWorld/helloWorld.app
src/main/webapp/WEB-INF/hello <- different namespace
src/main/webapp/WEB-INF/hello/hello <- don't forget this component folder for the hello namespace
src/main/webapp/WEB-INF/hello/hello/hello.cmp
helloWorld.app
<aura:application>
hello web, from the Aura sample app helloWorld
<hello:hello/>
</aura:application>
hello.cmp
<aura:component>
Hello, HTML!
</aura:component>
Now if you want everything in the same name space all you need to do is make sure you have the folder structure correct:
src/main/webapp/WEB-INF/helloWorld/helloWorld/helloWorld.app
src/main/webapp/WEB-INF/helloWorld/hello/hello.cmp
Now you can use
<helloWorld:helloWorld/> or <helloWorld:hello/>
I hope that helps.

Close method not working in Office

Im trying to use Microsoft.Office.Interop.Word._Document.Close() in a .net 3.5 windows form app.
No matter how much I search here and on Google I cannot find the correct parameters to put in the Close method.
I am using version 14.0.0.0 of Microsoft.Office.Interop.Word and I would like to close the document without saving and ideally ensure that the application can isolate the document thread so that users can still open word documents outside the running application.
See the Close method of the Document class described in MSDN. If you need to omit the parameter and use the default value - pass the Type.Missing parameter.
Try this:
object doNotSaveChanges = Word.WdSaveOptions.wdDoNotSaveChanges;
object missing = System.Reflection.Missing.Value;
_Document.Close(ref doNotSaveChanges, ref missing, ref missing);
This is the source
I'm not sure if you'll need the middle line or not. It's not from the original source it's from here

Can Not Refactor Class Name in XCode

I am trying to rename the class name for a view controller (which has an associated .xib file) via XCode's refactoring tool. After entering a new name, I get this error message (no preview of changes):
The selection is not a type that can be renamed.
Make a different selection and try again.
I have tried all the suggestions in this SO thread, but no luck.
What could prevent XCode from being able to refactor a class (and related file names), when other classes and variables can be refactored without any problem?
I think you tried to change the classname by selecting the file and press refactor or you select it in the #import "classname".
Instead try to select "classname" in the interface definition after #interface
I also met this problem
Here is my solution
Move the whole Project to another place Then it works(to me)

Resources