I'm currently building a new CakePHP app with version 3.0.0-RC1, and trying to install and use the jasig/phpCAS plugin. Using this guide, I've run the following command from the command prompt: composer require jasig/phpcas
This correctly copies the jasig/phpcas files into the vendor directory of my app, but one of the other files that the guide says should be updated (vendor/cakephp-plugins.php) doesn't even exist.
I've had a tough time accessing the plugin. I want to be able to call its static methods, and I keep getting errors of the form: Error: Class 'App\Controller\phpCAS' not found. (The exact directory in the error changes depending on where I'm calling the method from.)
I don't know if this is due to not having the cakephp-plugins.php file, or if I'm not calling the plugin correctly. It's my understanding that if the plugin is loaded I should just be able to call static methods on it like this: phpCAS::methodName()
First of all jasig/phpcas is not a CakePHP plugin. And the vendor/cakephp-plugins.php file is created by the CakePHP plugin installer, so if you don't see such a file, you seem to have either not installed any plugins yet, or you are not using a recent version of the installer, as the creation of this file has been introduced just recently.
Regarding the error about the class not being found, you are missing the leading namespace separator (\phpCAS::methodName()) to access the class in the global namespace, respectively you are missing a proper import (use phpCAS;) that would make the class available in the current namespace.
In case you are not familiar with namespaces, you may want to start with: http://php.net/namespaces
Related
I am using gradle 6.8 and MarkLogic version is 10.0-5.2,
My XQuery code is in directory \ml-gradle\src\main\common. When I run the command mlLoadModules to load XQuery into the modules database it loads with default URI /common/test.xqy.
I want to add some prefix to the URIs e.g. /rsc/common/test.xqy. How can I achieve that?
Note: I don't want to create an extra folder in my source for prefix "rsc".
It's not supported, though you could write a custom Gradle task to change the URI to whatever you like.
Why do you not want to create an "rsc" folder above "common"? I think other developers would find it much more intuitive that "rsc/common/test.xqy" becomes "/rsc/common/test.xqy" when loaded, rather than "common/test.xqy" becomes "rsc/common/test.xqy", which begs the question - where is "rsc" coming from? And then that developer would need to understand what property / custom code is adding that "rsc".
I want to use in my project ckeditor with active storage, but when I generate to install ckeditor using orm active record and active storage, it create an initializer but not create any migration file.
Running via Spring preloader in process 23128
create config/initializers/ckeditor.rb
route mount Ckeditor::Engine => '/ckeditor'
Could not find "active_record/active_storage/ckeditor/asset.rb" in
any of your source paths. Your current source paths are:
/home/arif/Development/Test
Project/cable_test/lib/templates/ckeditor/install
/home/arif/.rvm/gems/ruby-2.4.2/gems/ckeditor-
4.1.3/lib/generators/ckeditor/templates
So I ran into this as well, and after poking around the code I figured I'd just run the generator without the flags like the docs. If you run into this problem just run the generator with no flags rails g ckeditor:install. Also, you'll need to look at these files and make sure your models match.
https://github.com/galetahub/ckeditor/tree/master/lib/generators/ckeditor/templates/active_record/active_storage/ckeditor
EDIT: It looks like active_storage is only available on the master branch as of this post.
I have a JMeter test suite, which is working fine till apache-jmeter-2.13.
When upgrade to JMeter 3.2 and I get below exceptions in non GUI mode.
I didn't do any change in the JMeterscript, why this error is throwing in JMeter versions later 2.13 or in version 3.2?
jmeter -n -t E:\testsuite.jmx -l E:\tmp\RORlogs.csv
Error in NonGUIDriver org.apache.jorphan.util.JMeterStopTestException: ModuleCon
troller:Tracker_List_Artifacts has no selected Controller (did you rename some e
lement in the path to target controller?)
Test was shutdown as a consequence
Add an answer to close the problem:
In earlier versions of jmeter 2.13, it didn't validate the controllers which is disabled.
But from Jmeter version 3.2, irrespective of disabling all the controllers should have proper target values.
Fix the issue by assign proper target controller is assigned to disabled module controller.
Not sure if you've got the exact same situation, but what we've found is that JMeter has a problem where if you have a script with a module controller that includes another script that also has a module controller the file paths may be off and so the module controller of the included script will error.
For example. Say I have 'main.jmx' that has a module controller that points to 'external.jmx'. 'external.jmx' has a module controller that points to 'another_script.jmx'.
'main.jmx' is located in 'Documents/scripts', and this is also the directory we lauched JMeter from. 'main.jmx' has a relative path that points to 'external.jmx'. However, 'another_script.jmx' does not have the same relative path and so JMeter throws an error.
Pro tip: renaming your test elements to descriptive names will make debugging scripts far easier (it looks like you've done this, but this is more for other people reading this).
I am using Jmeter 5* and here irrespective of how many target controller names you modify, you finally need to touch all transactions/module controller from top to bottom once. Its kind of re-associating module controller with target controller. After that its working fine for me.
I'm building a project with webpack. The project uses materializecss. When I add materialize.js to the entry file, it complains with the error below
Cannot resolve module 'hammerjs'
When I open the file, I can see the definition there but it appears webpack is unable to identify it. Same thing with weakmap in knockout-es6. My solution to this was to add a reference to hammer.min.js in resolve.alias but not sure if that is the correct thing to do.
How do I get webpack to recognize these dependencies when they are bundled together with the library in question - in this case materialize.js?
As long as you have hammerjs installed to your project (ie. npm i hammerjs --save), it should find it. As pointed out by #egunays you should also have import 'expose?Hammer!hammerjs/hammer to get access to Hammer object.
In case you are worried about possible duplication (you can verify this by examining the generated bundle), you can use webpack.optimize.DedupePlugin. webpack.optimize.CommonsChunkPlugin can come in handy as well. That will allow you to separate your app code from a vendor bundle.
See official optimization docs for more info.
It's better to use ProvidePlugin for this.
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"Hammer": "hammerjs/hammer"
}),
This does not require an extra loader and is actually recommended in the docs:
There are cases where you want a module to export itself to the global context. Don't do this unless you really need this. (Better use the ProvidePlugin) 1
I have used the latest connector from Rally and set it up with Task Scheduler to run periodically. It works well, however I have encountered problems when trying to extend it.
Within the config.yml file used, there is an UpdateArtifactState flag that I believe, when set to True, will make use of the statex.rb file. This file handles how the commit message from SVN is parsed. It is here that I find my problem;
I want to extend the connector to allow for the # symbol to be included in the Rally task identifier (DE55555 -> #DE5555 for example). However, upon testing this file does not seem to be used.
Question: if my assumption is correct, and the statex.rb file is merely an example and not used in execution, how can I extend the Rally Connector to pick up tags the way I see fit?
You may try the following:
make a new Ruby class and put it in to the extension subdirectory.
Example: extension/my_state_extractor.rb
in this file he has a class defined as 'MyStateExtractor'
Pattern your file from the statex.rb file.
Then, in your config in the Rally section, you'll need an entry of
StateExtractorClass : MyStateExtractor(message)
Customarily this entry will follow the entry for UpdateArtifactState : True