zero_coding

1

votes
1

answer
561

views

SAP Web IDE does not recognize ES6

I want to write the code in ES6 on SAP Web IDE and follow the instruction https://blogs.sap.com/2017/11/01/next-generation-javascript-in-ui5-using-sap-web-ide/. But as you can see, I still get the error message. What am I doing wrong?
zero_coding
1

votes
1

answer
58

views

At the top level, results will persist in memory

I am working through the book https://www.packtpub.com/application-development/haskell-high-performance-programming and at moment, I am trying to understand the memoization. It shows the following memoization function: fib_mem :: Int -> Integer fib_mem = (map fib [0..] !!) where fib 0 = 1 fib 1 =...
zero_coding
1

votes
1

answer
73

views

What is associated data type in haskell?

In the routing section, the article says: We can see that the RenderRoute class defines an associated data type providing the routes for our application. What does associated data type mean? It means type families?
zero_coding
1

votes
2

answer
186

views

Multiple Given in one scenario

I have a scenario that looks as the following: scenario('Websocket client sends data to websocket server on SAP when is UP') { Given('Websocket server on SAP is ACTIVE') And('it supports websocket channel') When('Websocket client get started') Then('print message `Connection has been successfully e...
zero_coding
1

votes
1

answer
206

views

overloaded method value aggregate with alternatives

I have following function, that does not compile: private def save(pea: KStream[String, String]): Unit = { pea .groupByKey() .aggregate(() => '''{folder: ''}''', (_: String, _: String, value: String) => value, EventStoreTopology.Store) } the error message is: [error] [VR](x$1: org.apache.kafka.str...
zero_coding
1

votes
1

answer
326

views

“You may need an appropriate loader to handle this file type” with bsb react template

I have a file View.js, that contains a stateless component: import Button from 'material-ui/Button'; import React from 'react'; const View = (props) => ( {props.name} ); export default View; Then I wrote a wrapper ViewWrapper.re, to interoperate with reasonml [@bs.module] external viewJS : ReasonRe...
zero_coding
1

votes
0

answer
1.6k

views

Network error with axios on the test

I create my react app with CRA wrote a test file example.test.js. This file contains: import axios from 'axios'; axios.get('http://localhost:3000/coins') .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error.response); }); test('adds 1 + 2 to equal 3', ()...
zero_coding
1

votes
0

answer
105

views

The bopf does not generated after cds view activated

I have a CDS view and I would like to generate in addition a BOPF object. The CDS view looks as the following: @AbapCatalog.sqlViewName: 'ZPOC_CDS_ORDERS' @AbapCatalog.compiler.compareFilter: true @AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'Order for VALEAN POC' @ObjectMod...
zero_coding
1

votes
1

answer
933

views

Cannot find module @babel/preset-polyfill

I am trying to use @babel/preset-polyfill with webpack 4 as following: const HtmlWebPackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const path = require('path'); module.exports = { entry: './src/index.js', output: { path: path.resolve(__d...
zero_coding
1

votes
1

answer
72

views

Stretch the input field

I have a filterbar, that looks as following: The code of the view: As you can see, I changed the view to iPhone 6/7... The question is, how to stretch the input field more?
zero_coding
1

votes
2

answer
1.1k

views

Module not found: Error: Can't resolve './@fortawesome/fontawesome-free/css/fontawesome.css'

I am trying to use font-awesome 5.1.0 in webpack 4. The content of the webpack configuration file: const HtmlWebPackPlugin = require('html-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const path = require('path'); const autoprefixer = require('autoprefixer'); module....
zero_coding
1

votes
0

answer
141

views

Cannot read property 'getODataEntitySet' of undefined

I am trying to use SmartFilterBar as following: The view: The controller of the view: onInit: function () { const oModel = this.getModel('ClassSelect'); this.getView().setModel(oModel); }, The dataSources is defined in manifest as: 'dataSources': { 'ZMD_C_CLASS_OBJECT_CDS': { 'uri': '/sap/opu/odata...
zero_coding
1

votes
1

answer
54

views

How to bind element to the SmartForm?

I have the following dialog: and want to bind the SmartForm to a context. In the controller, there is a pressChangeButton, that is doing the context binding: pressChangeButton: function (e) { this.getView().setModel(this.getModel('EditOp'), 'Op'); ....... this.oDialogChangeOperations = this.getV...
zero_coding
1

votes
0

answer
26

views

How to figure out SmartForms is build?

I have a SmartForm that looks as following: As you can see, the SmartForm sit inside the Dialog. When I call the open method and want to access to SmartField, I've got undefined. The code looks like: First I created an instance of Dialog if (!this.oDialogChangeOperations) { // Begin of 0001 this.o...
zero_coding
1

votes
0

answer
58

views

How to run yesod hello world app with stack?

I've created a yesod project with following command: stack new yeplay yesodweb/simple and I've added a helloworld.hs file to app directory. The app directory contains the following files: ~/haskell/yeplay/app$ ls devel.hs DevelMain.hs helloworld.hs main.hs The helloworld.hs file has the follo...
zero_coding
1

votes
0

answer
45

views

How deliver an empty page?

I created a simple yesod application and would like to overwrite the default layout. It can be overwrite in the Foundation.hs file on the Yesod instance as following: instance Yesod App where defaultLayout :: Widget -> Handler Html defaultLayout widget = ([whamlet|This is my page. I hope you enjo...
zero_coding
1

votes
1

answer
21

views

How to broadcast the received messages to two different flows

How to broadcast the received messages to two different flows I am using akka stream websocket client to request and receive the data websocket server. With the received data from the websocket, I would like to broadcast into two different flows. The image below, should clarify the scenario: A...
zero_coding
0

votes
0

answer
4

views

What is the purpose of the composite flow(from Sink and Source)?

I am trying the understand composite flow (from Sink and Source) from the website https://doc.akka.io/docs/akka/2.5.3/scala/stream/stream-composition.html and they represent as the following: Could someone please provide an example for the usage of composite flow. And when should I use it?
zero_coding
1

votes
1

answer
664

views

Connect flash where is the session object from

I am using in my express app the message alert middleware connect-flash. I can find this middleware on github https://github.com/jaredhanson/connect-flash. When i look at connect-flash source code, i really don't know, where the this.session object come from. Consider the connect-flash source code:...
zero_coding
0

votes
0

answer
3

views

How to combine alpakka kafka with akka stream websocket

I am using https://doc.akka.io/docs/alpakka-kafka/current/consumer.html to consume data from kafka as the following: implicit val system: ActorSystem = ActorSystem('SAPEVENTBUS') implicit val materializer: Materializer = ActorMaterializer() val config = system.settings.config.getConfig('akka.kafka.c...
zero_coding
1

votes
1

answer
296

views

Confused whether using ngModelController on scope is possible

I am very confuse about using ngModelController. For example a controller from directive you can require like this. myModule.directive('amValidateName', ['validate', function (validate) { return { restrict: 'A', scope: { errorName: '=' }, require: 'ngModel', link: function (scope, elm, attrs, ngMode...
zero_coding
1

votes
1

answer
2.3k

views

AngularJS input event trigger

I searched in internet, how to implement jquery ui autocomplete into angularJS. I have found a very good sample and it is working. Here Sourcecode HTML selected = {{selected}} JS function DefaultCtrl($scope) { $scope.names = ['john', 'bill', 'charlie', 'robert', 'alban', 'oscar', 'marie', 'celine'...
zero_coding
1

votes
1

answer
102

views

Writing connection pool

How can I write a connection for example for database. The awesome package Redis provide the type pool for cache redis database connections. How can I write this kind of connection pool, that caches database connections?
zero_coding
1

votes
1

answer
266

views

Visual Studio 2013 scrolling issue [duplicate]

This question already has an answer here: Scrolling in Visual Studio causes text to become unreadable 7 answers When I am scrolling on editor I've got wired visual effect. Look at the pic It is a cache overflow? What is wrong with visual studio 2013? I restart the computer, but nothing help.
zero_coding
1

votes
1

answer
353

views

Testing request with cookie

I wrote a cookie getter and setter. Now I want to test it, and wrote following test function. func TestAuthorizationReader(t *testing.T) { tw := httptest.NewServer(testWriter()) tr := httptest.NewServer(Use(testReader())) defer tw.Close() defer tr.Close() c := &http.Client{} rs, err := c.Get(tw.URL)...
zero_coding
1

votes
1

answer
71

views

Why data parameter comes last

Why have the data parameter in F# to come last, like the following code snippet shows: let startsWith lookFor (s:string) = s.StartsWith(lookFor) let str1 = 'hello' |> startsWith 'h'
zero_coding
1

votes
1

answer
3k

views

Accept image header request

I wrote a route function, that accept only image request. Look at the following code. // Add image route paths func addImage(path string, handler httpImageFunc, name ...string) { //log.Println('Add image') if len(name) > 0 { router.Handle(path, httpImageFunc(handler)). Methods('GET'). Headers('Accep...
zero_coding
1

votes
1

answer
91

views

Why can I pass two parameter to Event class

When I look the definition of event class in f# type Event member this.Trigger : 'T -> unit member this.Publish : IEvent
zero_coding
1

votes
1

answer
636

views

Using svg file as html background [closed]

I have a svg file that I want to use as full page background. I tried as follow: Full Page Background Image | Progressive * { margin: 0; padding: 0; } html { background: url(city.svg) no-repeat center center fixed; background-size: cover; } The svg image is showing on browser, but very wired as yo...
zero_coding
1

votes
1

answer
152

views

Which OS for docker [closed]

I bought a server for experimenting with docker. Now I need an OS, that docker can run on it. Which OS would you recommended to me? CoreOs, RancherOS, etc. How about service discovery? I want to run my microservices on container, that is my target.
zero_coding
1

votes
1

answer
75

views

second ssh session can not connect to docker host

I have server with debian operating system. I installed docker on it and it works fine, as you can see as follow: [email protected]:/# which wget /usr/bin/wget [email protected]:/# An ubuntu based container is running. Then I started a second terminal, connect via ssh to server and type in console...
zero_coding
1

votes
1

answer
335

views

Start the logon script first before app in startup start

I assigned in the gpo a powershell script as logon script. All my clients are Windows 7 based machine. Every clients have an application in the startup folder, that will start, when the machine is getting started. The application that is getting started, depends on that powershell script. Because...
zero_coding
1

votes
1

answer
344

views

Build has_one relationship

I have schemas, that looks as follow: defmodule Busiket.LanguageCode do use Busiket.Web, :model schema 'languages_code' do field :code, :string field :text, :string timestamps end end the second schema: defmodule Busiket.CountryCode do use Busiket.Web, :model schema 'countries_code' do field :alpha2...
zero_coding
1

votes
3

answer
1.5k

views

Custom background color flexbox

I want to set background color on flexbox and tried as follow. Class definition on app: on FlexBox: in the css file: .weight-protocol .calendar-header-bg { background-color: #007DB2; } The custom background color is not going to apply at all as you can see: Look at the code inspector, the custom...
zero_coding
1

votes
1

answer
61

views

Why hot observable resubscribe

I have an observable that listen on table select event, it is also hot. The code snippet: const oTableRowSelect$ = TableOb.rowSelectionChangeEvent$(this.getById('ins-table')); const test = oTableRowSelect$ .do(function () { console.log('resubscribe'); }) .map(function () { return 4; }); test.subscr...
zero_coding
1

votes
1

answer
96

views

beta reduction on type

When translate the (+) operator into lambda calculus, then it would look like: λx.λy.x + y then do beta reduction (λx.λy.x + y) 1 --substitute x through 1 (λy.1 + y) (λy.1 + y) 2 --substitute y through 2 1 + 2 3 --is the normal form Now, I have a function with followi...
zero_coding
1

votes
1

answer
84

views

How to it make pure?

I have following scala code: import akka.Done import akka.actor.ActorSystem import akka.kafka.ConsumerMessage.CommittableOffsetBatch import akka.kafka.scaladsl.Consumer import akka.kafka.{ConsumerSettings, Subscriptions} import akka.stream.ActorMaterializer import akka.stream.scaladsl.Sink import...
zero_coding
1

votes
1

answer
165

views

Why do I get an empty list from Generator?

I want to test my function and use ScalaCheck. The property test looks as following: object WindowsSpec extends Properties('Windows') { val pathsGen = Gen.frequency( (3, 'C:\\Windows\\DigitalLocker'), (2, 'C:\\Temp'), (3, 'Invalid folder'), (1, 'C:\\Program Files\\Internet Explorer'), (4, 'C:\\Prog...
zero_coding
1

votes
1

answer
369

views

java.lang.Object cannot be converted to boolean

I call a function in the stream, that expression a predicate as return value: KTable store = source .filter((key, value) -> Path.store().apply(value)); The Path.store is written in Scala and looks as following: def store: String => Boolean = (v) => encode(v).error.isEmpty and the compiler complain...
zero_coding
1

votes
2

answer
121

views

How to get user information from ldap?

I am using apache shiro for ldap authentification: Factory ldapFactory = new IniSecurityManagerFactory('classpath:active.ini'); SecurityManager sManager = ldapFactory.getInstance(); SecurityUtils.setSecurityManager(sManager); Subject currentUser = SecurityUtils.getSubject(); if (!currentUser.isAuthe...
zero_coding

View additional