import a yii package to the project - yii

I tried to work with CPasswordHelper and everytime I got an exception when trying to run one of its methods. I think the reason is that I didn't import the package(system.utils) that CPasswordHelper is belong to. My question is how do I do that?
If it matter I'm working with netBeans.

CPasswordHelper is a core class defined in YiiBase, you don't need import it before using.
It is added since 1.1.14, may be you should check your yii version.

Related

How to install vue-router 4 in vue ^2.6.14 version

Hi i have a requirement to use vue-router4 on vue:^2.6.14 app because i want to use the latest api regarding dynamically registering a route.
Problem: i tried to move vue:^2.6.14 app to vue:3.*.* as there is a requirement of using new vue-router api which supports https://router.vuejs.org/guide/advanced/dynamic-routing.html#adding-nested-routes based on that i asked a question which is un-answered Dynamically registered route is not working when it is just pushed
Note: i tried for complete migration but facing so many errors
My Expection: i want to use vue-router#4 in vue:^2.6.14 only for addRoute('parent',{...Route Object}) method https://router.vuejs.org/guide/advanced/dynamic-routing.html#adding-routes if overriding is possible to get this feature in vue-router3 for vue2 then it is most welcomed!
Note2: after overriding it should work as this example https://codesandbox.io/s/vue-router-test-hvzes5?file=/src/main.js , Note: in main.js only 2 routes are defined.
Issue with vue-router3 for vue2: https://github.com/vuejs/vue-router/issues/1156
Please help me thanks in advance !!
It's not possible to use vue-router#4 with vue#2. They're incompatible with each other.
And the question assumes that addRoute is only available in vue-router#4, but that's not true. addRoute() was introduced in vue-router#3.5.0, which is compatible with vue#2.
Based on your other question, I think the confusion might be caused by the answer you linked, which only applies to vue-router#2, which does not support addRoute. The workaround provided in that answer would not work properly with vue-router#3, as you had observed.
Here's a demo of your Codesandbox written in vue#2.6.14 with vue-router#3.5.4. Your original code to dynamically add routes was untouched.

How to import a dependency's .vue file

I encountered this line of code in a vue project here https://github.com/InfinetyEs/Nova-Filemanager/blob/c6595c29e23cab01be6b7e37a069b13844397c91/resources/js/modules/Image.vue#L42:
import Viewer from 'v-viewer/src/component.vue';
I know from other examples that v-viewer is the dependency, so src/component.vue isn't part of this project. However, those other examples are only importing the dependency, i.e. import Viewer from 'v-viewer'.
The issue I'm facing is that npm run dev is complaining that it cannot find the dependency and I have practically 0 experience with vue.
What is the proper way to write the above so that it is pulling component.vue from the dependency v-viewer?
Thank you!
UPDATE: I wrote this import { component } from 'v-viewer' and it compiled. Appreciate if someone can confirm and explain if what I'm doing is correct.
The project relies on v-viewer internals, which is a dangerous thing to do because they aren't guaranteed to exist.
This is the case here. There is loose version constraint, "v-viewer": "^1.4.2", and src was removed in later versions. You can either fix it to be "v-viewer": "1.4.2", or import and use it like shown in the documentation:
import { component as Viewer } from "v-viewer"
The latter solution is more preferable because this is the way the package was designed to be used without relying on its internals.

Migrating existing Karate project from Version 0.8.0 to 0.9.5

I'm trying to migrate existing Karate project from 0.8.0 to 0.9.5
but facing some issues like below
1)None of the below imports are working, Need to figure it out equalling ones from 0.9.5
Looking for help from other, who has already tried this
import com.intuit.karate.cucumber.CucumberUtils;
import com.intuit.karate.cucumber.FeatureWrapper;
import com.intuit.karate.cucumber.KarateFeature;
import com.intuit.karate.cucumber.KarateJunitAndJsonReporter;
import com.intuit.karate.cucumber.KarateJunitFormatter;
import com.intuit.karate.cucumber.KarateReporter;
import com.intuit.karate.cucumber.KarateRuntime;
import com.intuit.karate.cucumber.KarateRuntimeOptions;
import com.intuit.karate.cucumber.KarateStats;
import com.intuit.karate.filter;
2)import com.intuit.karate.cucumber.CucumberRunner;- stating as Deprecated already, need to know replacement of this, my baseClass extends CucumberRunner.
3)also need to know replacement for below also
import com.intuit.karate.cucumber.FeatureFilePath;
import com.intuit.karate.cucumber.FeatureWrapper;
import com.intuit.karate.ScriptContext;
above imports are using in parsing Feature file
public static FeatureFilePath parseFeaturePath(File file) {
Please suggest tips to get this migration done successfully.
Thank you,
Jay
Sorry, only KarateStats was designed as a public API which is replaced by com.intuit.karate.Results. And CucumberRunner is replaced by com.intuit.karate.Runner. These are clearly mentioned in the release notes for 0.9.0.
The core of Karate was completely written and things like the KarateFeature and FeatureWrapper don't even exist anymore. I would say whoever decided to use or extend these classes made a very bad decision, and we never documented or encouraged any such approach. All the best !

IntelliJ: cannot resolve smybol in "org.apache.commons.lang3.tuple.ImmutablePair"

I am working on a web visualisation for a given project (db with genes, proteins, task is to do some nice visualisation with springboot and thymeleaf). The project was provided with all files, yet I am missing some libraries (also leading to some errors in the code ofc).
When trying to import:
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
lang3 gives me a "cannot resolve symbol" error and automatically searching jars on web results in "no jars found".I found the lang3-jar manually and successfully added it to the project library. When importing:
import org.apache.commons.lang3.*;
All errors for tuple.Pair-usage are gone. Yet, usage of ImmutablePair still results in a "cannot resolve symbol" error.
Firstly, I am confused and now unsure, if my knowledge of imports is correct. I learned, if for example you import something.anything.x and something.anything.y, you could also just import something.anything.*; and x and y would be covered.
Secondly, if needed, where do I find the jars I need (I could not find them yet).
Thanks :)
So, I do not know, where this error results in, yet I do know a solution. When adding the library, select "From Maven" and search for Apache lang3 and add it. Resolves the problems.

"Error Loading USE or USELSX" when trying to import Script Library

I get this error when trying to import a script library from my project.
The Script Library does not use Java and I'm not Turkish. Also, recompiling did not help and it is not LSX.
I even removed the whole code from it and still get the problem. What could be wrong?
Try restarting the Domino Designer.
We have this problem here sometimes and it usually does the trick. It is easy to forget the obvious things sometimes.