What is the getLoggerRepository() method equivalent in 2.x - log4j2

we are currently using 1.x and have the following in the code
import org.apache.log4j.Logger;
Logger rLogger = Logger.getRootLogger();
Logger fileWriter = rLogger.getLoggerRepository().exists("name");
we are working on upgrading log4j to version 2.x and it looks like getLoggerRepository() is not supported in 2.x.
looking for some help for equivalent code/methods to use in 2.x.
greatly appreciate any help!

Related

when using exporting(highchart) in angular 7 got the the error

using exporting(highchart) getting below error:
ERROR in src/app/desktop/module/dashboard/dashboard.module.ts(24,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof import("C:/website/UI_Dashboard/node_modules/highchart
s/modules/exporting.src")' has no compatible call signatures.
in the module:
import {ChartModule, HIGHCHARTS_MODULES} from 'angular-highcharts';
import * as more from 'highcharts/highcharts-more.src';
import * as highcharts from 'highcharts';
import * as exporting from 'highcharts/modules/exporting.src';
import * as offline from 'highcharts/modules/offline-exporting';
exporting(highcharts);
offline(highcharts);
what should I do for solving this issue?
Have you tried with import exporting from 'highcharts/modules/exporting.src';?
It's the suggested way of module working as documented in the official Highcharts wrapper for Angular - https://github.com/highcharts/highcharts-angular#core
You should also load all Highcharts related files as src or minified - mixing might cause some TS issues.
An import path for src version of Highcharts core is 'highcharts/highcharts.src'.
Also (I'm not sure if this applies here since the code might not be complete), highcharts-more needs to be initialized as any other module. Usually it is loaded before other modules - initialization order is rarely important (some series types are based on optional modules) and you will get an error if the order is wrong, so it's important to test this.
In case anyone encounters this problem nowadays, changing this:
import * as exporting from 'highcharts/modules/exporting.src';
To this:
import Exporting from 'highcharts/modules/exporting';
Solved the problem for me.
I'm using Angular CLI 11.1.4 and the Highcharts npm package v9.2.2

Substitute for TemplateResolver in 3.0.0 version of thymeleaf

I have substituted Thymeleaf 3.0.0 from 2.1.6 version while doing refactoring because of which TemplateResolver and IResourceResolver cannot be resolved to a type.It is deprecated in 3.0.0 version .Can anyone tell me what is the substitute for TemplateResolver in 3.0.0 version.I am not using spring
For what purpose? My Thymeleaf 3.0 template resolver creation looks like this.
#Bean
public ITemplateResolver getTemplateResolver() {
SpringResourceTemplateResolver resolver = new SpringResourceTemplateResolver();
// ...
// configuration
// ...
return resolver;
}
Just swap TemplateResolver for SpringResourceTemplateResolver.

Could not load lang::java::jdt::Java

When trying to import JAVA modules I receive an error:
// JAVA imports
import lang::java::jdt::Java;
import lang::java::jdt::JDT;
import lang::java::jdt::JavaADT;
Could not load lang::java::jdt::Java
In the console:
rascal>import lang::java::jdt::Java;
|prompt:///|(0,29,<1,0>,<1,29>): Could not import module lang::java::jdt::Java: can not find in search path
Advice: |http://tutor.rascal-mpl.org/Errors/Static/ModuleImport/ModuleImport.html|
I'm using Eclipse and am trying to use the AstNode datatype. Any ideas?
The JDT modules have been replaced a while back by the m3 model.
While they are a bit different, the AST part should be comparable.
Check the m3 ast documentation and the Measuring java recipe.
Is this an old project you are trying to get up and running?

Routing in angular2 with Dart

I'm new to Angular2, till now I got succeeded to write the 5 Min Quickstart.
I want to learn how to use routing in Angular2 and Dart, unfortunately I couldn't find any example on the web yet. most of the articles are talking about routing with typescript which I couldn't get it work with dart.
I'm using webstorm with dart plugin.
import 'dart:html';
import 'package:angular2/angular2.dart';
import 'package:angular2/bootstrap.dart';
import 'package:angular2/router.dart';
#Component(selector: 'my-app', template: '<h1>My First Angular 2 App</h1>')
class AppComponent {}
void main() {
bootstrap(AppComponent);
}
Try this HashLocationStrategy example.
https://github.com/ng2-dart-samples/todomvc
I found this tutorial quite helpful to set up routing in my application.

Could not find class 'weka.core.FastVector',

I am using weka for my project. but get the error info"could not find class weka.core.FastVector" on the line below. I have already added weka.jar from the build path of the project by adding external jar file. How should I solve this problem? Thanks a lot for your time on reviewing my question.
import weka.core.Attribute;
import weka.core.FastVector;
import weka.core.Instance;
import weka.core.Instances;
FastVector atts;
private void setUpARFF(){
atts = new FastVector();}
I know that FastVector was marked as obsolete a while back, perhaps they've finally removed it. Are you using the dev version of weka (or what version are you using)? FastVector can be replaced with ArrayList (in dev version) so use that instead.

Resources