babel-preset-react outputting ansi for error - babeljs

How can I stop babel-preset-react from outputting garbledy gook like this?
[0m [90m 10 | [39m
[90m 11 | [39m[36mexport[39m [36mdefault[39m [36mfunction[39m [33mSVG[39m() {
[31m[1m>[22m[39m[90m 12 | [39m [36mreturn[39m [33m<[39m[33mdiv[39m id[33m=[39m[32m"svg-container"[39m [33m<[39m[33msvg[39m [36mclass[39m[33m=[39m[32m"circle"[39m xmlns[33m=[39m[32m"http://www.w3.org/2000/svg"[39m[33m>[39m
[90m | [39m [31m[1m^[22m[39m
[90m 13 | [39m [33m<[39m[33mcircle[39m
[90m 14 | [39m cx[33m=[39m[32m"50"[39m
[90m 15 | [39m cy[33m=[39m[32m"50"[39m[0m
to the browser console with webpack? It shows up fine in the terminal, but the browser console can't support ansi, I don't think

Related

vscode python comment togglging does not work

I'm new to vscode.
I have used shortcut (commad + /) for toggling comments. But nowadays, this does not work for python codes. (This still work for my java codes) I guess some problems exist with python extensions but not sure. Can anybody help me?
Below is my environment.
System information
CPUs | Intel(R) Core(TM) i5-5257U CPU # 2.70GHz (4 x 2700)
-- | --
GPU Status | 2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled
Load (avg) | 3, 3, 3
Memory (System) | 8.00GB (0.38GB free)
Process Argv | .
Screen Reader | no
VM | 0%
Extensions installed
Extension | Author (truncated) | Version
-- | -- | --
vscode-django | bat | 0.20.0
npm-intellisense | chr | 1.3.0
path-intellisense | chr | 2.2.1
bracket-pair-colorizer | Coe | 1.0.61
vscode-markdownlint | Dav | 0.36.3
vscode-eslint | dba | 2.1.8
githistory | don | 0.6.9
python-extension-pack | don | 1.6.0
LogFileHighlighter | emi | 2.9.0
json-tools | eri | 1.0.2
prettier-vscode | esb | 5.5.0
code-runner | for | 0.11.0
mdmath | goe | 2.5.1
gc-excelviewer | Gra | 3.0.40
vscode-auto-open-markdown-preview | hnw | 0.0.4
vsc-python-indent | Kev | 1.11.0
node-module-intellisense | lei | 1.5.0
sftp | lix | 1.12.9
MagicPython | mag | 1.1.0
rainbow-csv | mec | 1.7.1
dotenv | mik | 1.0.1
prettify-json | moh | 0.0.3
vscode-language-pack-ko | MS- | 1.48.3
python | ms- | 2020.8.106424
remote-containers | ms- | 0.134.1
remote-ssh | ms- | 0.51.0
remote-ssh-edit | ms- | 0.51.0
remote-wsl | ms- | 0.44.5
vscode-remote-extensionpack | ms- | 0.20.0
color-highlight | nau | 2.3.0
vscode-jsp | pth | 0.0.3
vscode-data-preview | Ran | 2.0.0
ruby | reb | 0.27.0
java | red | 0.66.0
code-settings-sync | Sha | 3.4.3
trailing-spaces | sha | 0.3.1
guides | spy | 0.9.3
addDocComments | ste | 0.0.8
vscodeintellicode | Vis | 1.2.10
vscode-java-debug | vsc | 0.28.0
vscode-java-dependency | vsc | 0.13.0
vscode-java-pack | vsc | 0.10.0
vscode-java-test | vsc | 0.24.1
vscode-maven | vsc | 0.24.2
vscode-icons | vsc | 10.2.0
vscode-wakatime | Wak | 4.0.7
jinja | who | 0.0.8
vscode-ruby | win | 0.27.0
JavaScriptSnippets | xab | 1.8.0
Settings.json
{
"editor.minimap.enabled": false,
"workbench.colorTheme": "Visual Studio Dark",
"editor.renderIndentGuides": false,
"window.zoomLevel": 0,
"git.ignoreLegacyWarning": true,
"terminal.integrated.scrollback": 50000,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"terminal.integrated.commandsToSkipShell": [
"workbench.action.quickOpen"
],
"editor.rulers": [
80,
120
],
"dashboard.projectData": null,
"java.requirements.JDK11Warning": false,
"java.semanticHighlighting.enabled": true,
"python.languageServer": "Microsoft",
}
Have you tried using Ctrl+K+C ?
and to uncomment use Ctrl+K+U .
And the issue with your vscode might be that the shortcut is not registered.
Follow this link to register the shortcut, if you prefer Ctrl+/.
https://marketplace.visualstudio.com/items?itemName=munyabe.ToggleComment

FormatException: Unexpected character (at character 7)

I'm getting this error. How to resolve this.
FormatException: Unexpected character (at character 7)
public static final int right_side = 0x7f050036;
flutter pub get
Running "flutter pub get" in shayari_card...
Failed to decode data using encoding 'utf-8', path = '.\pubspec.lock'
---- Log transcript ----
FINE: Pub 2.8.4
IO : Spawning "cmd /c ver" in C:\Users\Mahender\Desktop\FlutterApps\shayari_card\.
IO : Finished ver. Exit code 0.
| stdout:
| |
| | Microsoft Windows [Version 6.1.7601]
| Nothing output on stderr.
MSG : Resolving dependencies...
ERR : Failed to decode data using encoding 'utf-8', path = '.\pubspec.lock'
FINE: Exception type: FileSystemException
FINE: dart:io _File.readAsStringSync
| package:pub/src/io.dart 152:48 readTextFile
| package:pub/src/lock_file.dart 82:38 new LockFile.load
| package:pub/src/entrypoint.dart 96:28 Entrypoint.lockFile
| package:pub/src/entrypoint.dart 222:19 Entrypoint.acquireDependencies.<fn>
| package:pub/src/log.dart 394:18 progress
| package:pub/src/entrypoint.dart 216:24 Entrypoint.acquireDependencies
| package:pub/src/command/get.dart 46:23 GetCommand.run
| package:args/command_runner.dart 197:27 CommandRunner.runCommand
| package:pub/src/command_runner.dart 191:39 PubCommandRunner.runCommand.<fn>
| dart:async new Future.sync
| package:pub/src/utils.dart 113:12 captureErrors.wrappedCallback
| package:stack_trace Chain.capture
| package:pub/src/utils.dart 126:11 captureErrors
| package:pub/src/command_runner.dart 191:13 PubCommandRunner.runCommand
| ===== asynchronous gap ===========================
| dart:async Future.catchError
| package:pub/src/utils.dart 113:52 captureErrors.wrappedCallback
| package:stack_trace Chain.capture
| package:pub/src/utils.dart 126:11 captureErrors
| package:pub/src/command_runner.dart 191:13 PubCommandRunner.runCommand
| dart:async _completeOnAsyncReturn
| package:pub/src/command_runner.dart PubCommandRunner._validatePlatform
| dart:async _completeOnAsyncReturn
| package:pub/src/io.dart runProcess.<fn>
---- End log transcript ----
pub get failed (66; ---- End log transcript ----)
exit code 66

MongoDB doesn't work on Karaf 4.0.8 with Camel 2.18.1

We created a simple test bundle, but as soon as we try to use MongoDB in one of our Camel routes, the route does not start anymore.
The blueprint is quite simple:
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">
<bean id="mongo" class="com.mongodb.Mongo">
<argument value="localhost"/>
</bean>
<camelContext id="blueprint-bean-context"
xmlns="http://camel.apache.org/schema/blueprint">
<route id="testTimer">
<from uri="timer:testTimer?period=5000" />
<setBody>
<spel>{"type": "product"}</spel>
</setBody>
<to uri="mongodb:mongo?database=testdb&collection=mycollection&operation=findAll" />
<log message="Result was queried" />
</route>
</camelContext>
</blueprint>
MongoDB is added as a dependency in the POM. The excerpt of the log in DEBUG mode gives these lines:
2017-01-24 13:41:27,672 | DEBUG | raf-4.0.8/deploy | ReferenceRecipe | 12 - org.apache.aries.blueprint.core - 1.7.1 | Binding reference .camelBlueprint.languageResolver.spel to [org.apache.camel.spi.LanguageResolver]
2017-01-24 13:41:27,672 | DEBUG | raf-4.0.8/deploy | BlueprintLanguageResolver | 55 - org.apache.camel.camel-blueprint - 2.18.1 | Found language resolver: spel in registry: org.apache.camel.impl.osgi.Activator$BundleLanguageResolver#6841375f
2017-01-24 13:41:27,673 | DEBUG | raf-4.0.8/deploy | DefaultChannel | 58 - org.apache.camel.camel-core - 2.18.1 | Initialize channel for target: 'SetBody[spel{SpelExpression[{"type": "product"}]}]'
2017-01-24 13:41:27,673 | DEBUG | raf-4.0.8/deploy | BlueprintContainerImpl | 12 - org.apache.aries.blueprint.core - 1.7.1 | Instantiating component blueprintBundle
2017-01-24 13:41:27,676 | DEBUG | raf-4.0.8/deploy | DefaultManagementAgent | 58 - org.apache.camel.camel-core - 2.18.1 | Registered MBean with ObjectName: org.apache.camel:context=de.test.bundle-x1-blueprint-bean-context,type=tracer,name=BacklogTracer
2017-01-24 13:41:27,676 | DEBUG | raf-4.0.8/deploy | BlueprintContainerImpl | 12 - org.apache.aries.blueprint.core - 1.7.1 | Instantiating component blueprintBundle
2017-01-24 13:41:27,680 | DEBUG | raf-4.0.8/deploy | DefaultManagementAgent | 58 - org.apache.camel.camel-core - 2.18.1 | Registered MBean with ObjectName: org.apache.camel:context=de.test.bundle-x1-blueprint-bean-context,type=tracer,name=BacklogDebugger
2017-01-24 13:41:27,683 | DEBUG | raf-4.0.8/deploy | DefaultManagementAgent | 58 - org.apache.camel.camel-core - 2.18.1 | Registered MBean with ObjectName: org.apache.camel:context=de.test.bundle-x1-blueprint-bean-context,type=errorhandlers,name="DefaultErrorHandlerBuilder(ref:CamelDefaultErrorHandlerBuilder)"
2017-01-24 13:41:27,686 | DEBUG | raf-4.0.8/deploy | DefaultComponent | 58 - org.apache.camel.camel-core - 2.18.1 | Creating endpoint uri=[mongodb://mongo?collection=processing_requests&database=genex&operation=findAll], path=[mongo]
2017-01-24 13:41:27,686 | DEBUG | raf-4.0.8/deploy | BlueprintContainerImpl | 12 - org.apache.aries.blueprint.core - 1.7.1 | Instantiating component mongo
2017-01-24 13:41:27,687 | INFO | raf-4.0.8/deploy | BlueprintCamelContext | 58 - org.apache.camel.camel-core - 2.18.1 | Apache Camel 2.18.1 (CamelContext: blueprint-bean-context) is shutting down
2017-01-24 13:41:27,687 | DEBUG | raf-4.0.8/deploy | efaultAsyncProcessorAwaitManager | 58 - org.apache.camel.camel-core - 2.18.1 | Shutting down with no inflight threads.
2017-01-24 13:41:27,688 | DEBUG | raf-4.0.8/deploy | TimerListenerManager | 58 - org.apache.camel.camel-core - 2.18.1 | Removed TimerListener: org.apache.camel.management.mbean.ManagedCamelContext#1350b665
2017-01-24 13:41:27,688 | DEBUG | raf-4.0.8/deploy | DefaultManagementAgent | 58 - org.apache.camel.camel-core - 2.18.1 | Unregistered MBean with ObjectName: org.apache.camel:context=de.test.bundle-x1-blueprint-bean-context,type=context,name="blueprint-bean-context"
2017-01-24 13:41:27,688 | DEBUG | raf-4.0.8/deploy | DefaultInflightRepository | 58 - org.apache.camel.camel-core - 2.18.1 | Shutting down with no inflight exchanges.
Why does the Camel context start up and shutdown immediately? The timer is not executed and the log message never printed. As soon as we remove the to for calling MongoDB, it works.
Change the bean declaration
<bean id="mongo" class="com.mongodb.Mongo">
to
<bean id="mongo" class="com.mongodb.MongoClient">
you can read more about it in the official documentation of the Mongo component for Camel.

Error in org-table-sum org-mode?

I am just getting started with Emacs org-mode and I am already getting really confused about a simple column sum (org-table-sum). I start with
| date | sum |
|------+-------|
| | 16.2 |
| | 6.16 |
| | 6.16 |
| | |
When I hit C-c + (org-table-sum) below the second column I get the correct sum 28.52. If I add another line to make it
| date | sum |
|------+-------|
| | 16.2 |
| | 6.16 |
| | 6.16 |
| | 13.11 |
| | |
C-c + gives me 41.629999999999995. ???
If I change the last line from 13.11to 13.12, C-c +will give me (the correct) 41.64.
WTF?
Any explanation appreciated! Thanks!
Most decimal numbers cannot be represented exactly in binary floating point encoding (either single or double precision).
Test 13.11 here, to see that after conversion to double precision, the nearest number represented is 13.109999656677246.
This problem is not emacs related, but is a fundamental issue when working with floating point representation in a different base (binary rather than decimal).
Using calc's vsum, the result is OK:
| date | sum |
|------+-------|
| | 16.2 |
| | 6.16 |
| | 6.16 |
| | 13.11 |
|------+-------|
| | 41.63 |
#+TBLFM: #6$2=vsum(#I..#II)
This works because calc works with arbitrary precision and will not encode the numbers in a binary floating point format.

Getting NullPointerException from Play framework

I have been using play framework 2.2.4 version. While executing particular action getting NullPointerException, If its from my code I can fix it but it has come from play library.
could someone help on this??
# action #
public static Result getOverViewPage(final String errorMsg){
String autoBillStatusMsg = "";
//business logic is here
Logger.info("Final Auto-pay status message : "+autoBillStatusMsg);
return ok(rave_customer_index.render());
}
We are able to see the above logger statement. But after that we are getting NullPointerException
Exception StackTrace
INFO | jvm 1 | 2015/09/18 15:15:24 | [info] application - Final
Auto-pay status message :
INFO | jvm 1 | 2015/09/18 15:15:24 | [error] play - Cannot invoke
the action, eventually got an error: java.lang.NullPointerException
INFO | jvm 1 | 2015/09/18 15:15:24 | [error] application - INFO
| jvm 1 | 2015/09/18 15:15:24 | INFO | jvm 1 | 2015/09/18
15:15:24 | ! #6nfm0a093 - Internal server error, for (GET) [/] ->
INFO | jvm 1 | 2015/09/18 15:15:24 |
INFO | jvm 1 | 2015/09/18 15:15:24 |
play.api.Application$$anon$1: Execution
exception[[NullPointerException: null]]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
play.api.Application$class.handleError(Application.scala:296)
~[com.typesafe.play.play_2.11-2.3.2.jar:2.3.2]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
play.api.DefaultApplication.handleError(Application.scala:402)
[com.typesafe.play.play_2.11-2.3.2.jar:2.3.2]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320)
[com.typesafe.play.play_2.11-2.3.2.jar:2.3.2]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320)
[com.typesafe.play.play_2.11-2.3.2.jar:2.3.2]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
scala.Option.map(Option.scala:145)
[org.scala-lang.scala-library-2.11.1.jar:na] INFO | jvm 1 |
2015/09/18 15:15:24 |
Caused by: java.lang.NullPointerException: null
INFO | jvm 1 | 2015/09/18 15:15:24 | at
java.net.URLEncoder.encode(URLEncoder.java:205) ~[na:1.7.0_21]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
play.api.mvc.CookieBaker$$anonfun$3.apply(Http.scala:427)
~[com.typesafe.play.play_2.11-2.3.2.jar:2.3.2]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
play.api.mvc.CookieBaker$$anonfun$3.apply(Http.scala:426)
~[com.typesafe.play.play_2.11-2.3.2.jar:2.3.2]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
~[org.scala-lang.scala-library-2.11.1.jar:na]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
~[org.scala-lang.scala-library-2.11.1.jar:na]
DEBUG | wrapperp | 2015/09/18 15:15:25 | send a packet PING : ping
INFO | jvm 1 | 2015/09/18 15:15:26 | WrapperManager Debug:
Received a packet PING : ping
INFO | jvm 1 | 2015/09/18 15:15:26 | WrapperManager Debug: Send a
packet PING : ping