Владимiръ

1

votes
2

answer
42

views

How to add into map in range loop

package main import ( 'fmt' ) func main() { m := make(map[int]int, 4) m[1] = 0 m[2] = 0 for k, _ := range m { i := 10 + k m[i] = 0 } fmt.Println(m) fmt.Println('len:', len(m)) } This code returns: 8 or 10 or 6 as length of map after loop. Video is here, playgroud here. I see that new added elements...
Vladimir Kovpak
1

votes
2

answer
40

views

Is it possible to insert row into the child table of FOREIGN KEY?

I have three tables in my database: COMPANY(ID, NAME) COUPON(ID, TITLE) COMPANY_COUPON(COMPANY_ID, COUPON_ID) Company can create coupons, so when it creates coupon, coupon's ID and ID of the company will be added into COMPANY_COUPON table. When company deletes coupon it also will be deleted fr...
Vladimir
1

votes
1

answer
68

views

Pushing branch without root to the new repository

Imagine I have master branch. Once new branch was created. Now I want to move exactly this branch to the new repository without comments that was commited before this branch was created. Picture: 1. Old repository newbranch C - D - E / master A - B Picture: 2. New repository newbranch C - D -...
vladimir
1

votes
0

answer
298

views

How to reduce amount of session locks in Cm_RedisSession_Model_Session::read

I have a question about Cm_RedisSession Module for Magento. It has built-in locking algorithm. Method code can be found here: https://github.com/colinmollenhour/php-redis-session-abstract/blob/4671d63212fe05802f21d2fe3086f3425900483e/src/Cm/RedisSession/Handler.php#L401 I get around ~10 failed lock...
Vladimir Samsonov
1

votes
1

answer
22

views

How in the method of POST, save the value of the variable of the Django class

How in the method of POST, save the value of the variable of the Django class. There is a select on the form, when selecting a value, the valuation needs to be saved to a variable and reload the page, already with the saved data. class MovementsListView(TemplateView, CurrentURLMixin): allow_empty =...
Vladimir
1

votes
0

answer
17

views

Ecclipse: Adding Javadoc comments in Php module fails

I am writing a Php module using Eclipse. If a function contains global $user; and the some assignment $user = user_load('Administrator'); then if I add Javadoc Comments to a function below, using /** I dont see auto-generated @param $var declaration anymore. The same comments for the function belo...
Vladimir Lev
1

votes
0

answer
358

views

Update application.yml in Spring

I have a tiny spring-boot app. I want to be able to update beans configuration via http endpoint. Going to do this via beans setters. I mean update injected via @Value or @ConfigurationProperties fields via java code. Nothing special here. But I want to store updated properties back to application....
Vladimir Filipchenko
1

votes
1

answer
905

views

Angular 5 and Angular Universal state transfer with http interceptor and localstorage

I have the problem on the server side, when I refresh page there is no way to retrieve jwt token on server from local storage because of localstorage only exists on the browser. Also when I log in I save token in the transfer state and again after the page is refreshed state variable disappear, is i...
Vladimir
1

votes
0

answer
54

views

Print commands executed by subprocess.call (subprocess.call trace)

My Pytnon script has a number of methods like: def clean_htmldir(self): super(Cov,self).clean0('rm -rf {:s}/*'.format(self.COV_HTMLDIR)) where clean0 is a method of the super class def clean0(self, rm_cmd): ret = subprocess.call(rm_cmd, shell=True) return ret Python script executes a number of shell...
Vladimir Zolotykh
1

votes
0

answer
83

views

Generic update with mapping in Slick

I'm writing a CRUD app using Slick, and I want my update queries to only update a specific set of columns and I use .map().update() for that. I have a function that returns a tuple of fields that can be updated in my table definition (def writableFields). And I have a funciton that returns a tuple o...
1

votes
1

answer
81

views

RangeError: Maximum call stack size exceeded in Twig

I create twig template with structure main.twig has block content with include 'card.twig' card.twig extends 'main.twig' and realise block content with block secondContent include 'rec.twig rec.twig extends 'card.twig' and realise block secondContent But I have RangeError: Maximum call stack size ex...
1

votes
0

answer
223

views

NodeJS. officegen

I'm using officegen to generate docx. To be be honest, I would like to have further information regarding to properties which might be used to config file more precise. For example, according to documentation if I would like to describe a column of table I need to use smth like that { val: 'No.', op...
Vladimir Topolev
1

votes
0

answer
86

views

Press Enter emits buttonClicked on QPushButton

I'm using C++ with Qt. I have this problem. I have QLineBox (lineBox) and QButtonGroup (buttonGroup) with buttons from type QPushButton. When I press enter on lineBox, signal buttonClicked is emitted for buttonGroup. lineBox is in QGraphicView. This QGraphicView is in same layout as buttonGroup. I d...
Vladimir Yanakiev
1

votes
1

answer
287

views

SonarQube. Custom rule needs to access to file

I implemented rule where I needed to extract data from external file. I put this file in resources folder and extract it with the following construction: CustomRuleCheck.class.getResource(/com/packagename/file.json) During JUnit testing is everething ok, but when I run an integration testing I canno...
Vladimir Topolev
1

votes
0

answer
87

views

Loop becomes Infinite when System.out.println() is added

I am working on a Swing Ti-Tac-Toe variation game. In the AI class I have a function that takes the board and a piece morpionType. It loops through all the available spots intersections on the board and returns the number of intersections which yield game over. It was behaving oddly so I decided to...
Vladimir Louis
1

votes
0

answer
238

views

How to correctly pass parameters in POST request to WebRequest?

I try to create a requester on the authorization form, if the data is correct - a redirect to another page will occur, if not correct - will return the authorization form. WebRequest request = WebRequest.Create ('http://www.request.com/'); request.Proxy = new WebProxy (new Uri ('http://myproxy.ru'))...
Владимир К
1

votes
0

answer
227

views

Qt Creator: run unit test automatically before main project

I have some widget application project on Qt 5.9.3. Now for a Unit testing I've created a new root 'subdir' project, which contains my main application project and the new Qt test project: Notice - how I create the root solution folder with an existing project: In Qt creator: File -> New File or Pro...
Vladimir Bershov
1

votes
1

answer
1k

views

Move angular component from one container to another

I'm building a component with multiple values, but instead of copying value itself I copy the whole input component: Add I refence to a @ContentChild and to a @ViewChild('Container') - that's not a big deal. However, I couldn't find a smooth way to move input component represented by ContentChild to...
Vladimir
1

votes
2

answer
451

views

Calling distinct test func in TestMain() in Golang

I'm trying to test my http controllers and I use TestMain func to prepare my testing, but before I run all test requests I need to first run TestAuthUserController test, which creates and authorizes the user. For this I use wrapper func, which helps me to call TestAuthUserController: func TestMain(m...
Vladimir Savostin
1

votes
0

answer
120

views

BluetoothServerSocket is not accepting Bluetoothsocket on some devices

I want to connect as a server from my device to client's device. In my application I am using following AcceptThread class: private class AcceptThread extends Thread { private final BluetoothServerSocket mmServerSocket; public AcceptThread() { BluetoothServerSocket tmp = null; try {...
Vladimír
1

votes
0

answer
121

views

React-big-calendar - sort(set order) allDay events

React big calendar receives an array with objects: allDay: true end: Sat Jan 13 2018 03:03:00 GMT+0200 (EET) {} eventType: 'video' start: Sat Jan 13 2018 03:03:00 GMT+0200 (EET) {} title: '0' There can be 3 types of EventType - video, duration and audio, but they are displaying completely in random...
Vladimir Martyniuk
1

votes
0

answer
251

views

git submodule update --checkout using TortoiseGit

I've got a git project with lots of submodules, and for one of those submodules there's update = none set in .gitmodules, so that it would not be cloned (but rather skipped) during git submodule update. This was made for convenience, so that smaller submodules would be downloaded all together with a...
Vladimir Bartosh
1

votes
0

answer
124

views

How can I use Youtube API to download my past Live Streaming event?

I'm trying to find a way to use the YouTube API to download a Live Streaming event that I hosted. There is such a functionality on the UI: But I can't find a YouTube API endpoint that would do that for me. Appreciate any help, thank you.
Vladimir
1

votes
0

answer
70

views

How to automatically convert a Matlab script into a Matlab function?

My problem is the following: I have very many (~1000) mutually calling Matlab scripts, which are very poorly written, regularly damage each other's environments and generally became unmanageable. One of the reasons I even got this problem is that I need to write a testsuite covering a big part of th...
1

votes
1

answer
378

views

Cockpit CMS reordering Repeater field

I have a repeater of set fields in my Collection in Cockpit CMS. Options is: { 'fields': [ { 'type': 'set', 'label': 'Some Block', 'options': { 'fields': [ { 'name': 'title', 'type': 'text' }, { 'name': 'picture', 'type': 'image' } ] } } ] } How to use display option in repeater for display title fi...
Vladimir Leontiev
1

votes
1

answer
26

views

GKScene SpriteKit error: [SKScene setEntities:]: unrecognized selector sent to instance

I have a code which imports GameplayKit fine, and I can get the GKScene like this: GKScene * scene = [GKScene sceneWithFileNamed:@'GameScene1']; Then, I am getting this to GameScene which extends a normal SKScene like this: GameScene1 * scene1 = (GameScene1 *)scene.rootNode; I then get an error [SK...
1

votes
0

answer
66

views

SIP or SIPREC integration

I need to integrate voice coming from SIP or SIPREC session to Micorsoft Speech or MS Bot. According to https://docs.microsofttranslator.com/speech-translate.html the voice should be streamed single channel, signed 16bit PCM audio sampled at 16 kHz. So seems need also to 'translate' those packets fr...
Vladimir B
1

votes
0

answer
186

views

Python Statsmodels: is there any way to program exogenous variables into the VAR framework the package provides?

Can't post my code as I'm typing on my phone (current employer doesn't allow posting on stackexchange from the computers) I'm trying to estimate and forecast with a VAR using statsmodels in python, just wondering if there's any way I can introduce exogenous variables into the mix? If not, would anyo...
1

votes
0

answer
762

views

Filter pipe for async data in Angular 5

I use a pipe to filter a table into which the data comes asynchronously from the server, and until the data arrives, the tunnel continuously returns undefined: My pipe: import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'filter', pure: false }) export class FilterPipe implements Pip...
Vladimir Humeniuk
1

votes
0

answer
257

views

Inject SSR React Components into CSR React application

I have quite interesting problem. I have a CSR React app. When the app is executed in browser, it makes an api call to the backed REST API. This API is returning SSR React Component. There are various reasons why this architecture exists. Rendering our SSR React Component is really expensive (so we...
Vladimir Gorej
1

votes
1

answer
23

views

How to place Images next to RadioButton in RadioGroup?

I am making a Q&A app. I will have text answers and images as answers, so I will check from DB and when I have text answers I will display it with the radio button because it's view is similar to TextView, but the problem comes if I have images as answers. So I'd like to place an ImageView next to m...
Vladimir Danoski
1

votes
0

answer
32

views

Can Hugo convert special characters to a html valid one

I want to know if there is a configuration in Hugo, that convert automatically all special characters to a html valid one. For example, if I have this content in my md fle Velásquez I want to my final html look like this Velásquez
Vladimir Venegas
1

votes
0

answer
170

views

gmail add on multipart/form-data app script

i'm building a gmail add on application to read a current email and retrieve the gmail attachment associated with the email. Once I get the blob of the attachment I try to upload it to my API via a multipart/form-data post request. Currently, my request is failing with a 500 while my postman reque...
Vladimir Castillo
1

votes
1

answer
78

views

How to insert a record with id (auto increment) PostgREST?

I have a function axios.post('http://localhost:3000/unitsmeasure', { id: 20, name: 'name' }) .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); }); It inserts an entry in the table. Its works. But when I do not specify the id it does not work. id (se...
Vladimir Golub
1

votes
0

answer
223

views

WWDG IRQHandler although WWDG disabled, sprintf fail - postponed

Hi talented girls and guys, Sorry if it shouldn't be here, but many thanks for each help ! I'm trying to use STMF411RE and its UART, SPI and EXT_INT. Of course, I am trying to solve my problem using google, but nothing I've found yet. However, SW looks after wireless NRF24L01+ module. This module h...
Vladimír Šustek
1

votes
1

answer
1.2k

views

Send video/audio over socket.io from browser

I am trying to send video and audio trought socket.io but I geting Buffer on the end how should I handle it? Here is my code: SERVER, HERE I RECIVE BUFFER: io.on('connection', function (socket) { socket.on('radio', function (image) { socket.broadcast.emit('radio-reciver', {count: 1, buff: image});...
Vladimir Djukic
1

votes
0

answer
92

views

How to prevent Eclipse formatter inserting blank lines in block comment before annotations

I have: /* * Search file * * @param folderPath - path to search. * @param resourceResolver - ResourceResolver. */ Eclipse format it to: /* * Search file * * @param folderPath - path to search. * * @param resourceResolver - ResourceResolver. */ How can I prevent such adding new line before '@param re...
1

votes
1

answer
25

views

how to send and receive Json?

I have a client (on xamarin.android) and there is a server (asp.net web forms). I want to pass a json POST request from the client to the server, to process the data in the database. I'm kind of like sending a json (although not sure), but I do not know how to accept it. Here is my send code: var us...
Владимир
1

votes
1

answer
112

views

How to create png file from View

I made dynamically some View. How can I export this View (its dimensions and color) into png file?
Vladimír
1

votes
2

answer
170

views

How to stop or suspend polling after batch job fail?

We use spring-batch-integration to process .json files from directory. It's necessary to stop processing after failure, to find out a problem (to change file with problem or other solutions) and then continue. Current configuration continue polling after error. How to change it? or maybe there are d...

View additional