mIcHaL MiChAl

1

votes
1

answer
57

views

How to index nested array

How to index (N1QL query in Couchbase) above document to speed up searching by SerialNumber field in nested array (doc => groups => items => item.SerialNumber)? Sample: { 'Id': '0012ed6e-41af-4e45-b53f-bac3b2eb0b82', 'Machine': 'Machine2', 'Groups': [ { 'Id': '0fed9b14-fa38-e511-893a-0011256...
Michał Zych
1

votes
2

answer
21

views

Reference to this in anonymous function Dart.js

Is it possible to get a reference to this of creating an object in an anonymous function: var marker = Marker( icon: BitmapDescriptor.defaultMarker, onTap: () { ///
Michał Jurczuk
38

votes
2

answer
2.8k

views

Why does Java have support for time zone offsets with seconds precision?

On Wikipedia time zone offsets are explained as the difference in hours and minutes from standard UTC time. However, DateTimeFormatter supports zone-offset pattern XXXXX, which 'outputs the hour and minute and optional second, with a colon, such as '+01:30:15'.' Are offsets like +01:30:15 ISO valid?...
Michal Kordas
5

votes
1

answer
55

views

Why Java has support for time zone offsets with seconds precision?

On Wikipedia time zone offsets are explained as difference in hours and minutes from standard UTC time. However, DateTimeFormatter supports pattern XXXXX which is explained as follows: Offset X and x: This formats the offset based on the number of pattern letters. One letter outputs just the hour, s...
Michal Kordas
1

votes
2

answer
27

views

Hey! How can i solve my code which apparently isnt properly taking .key property from KeyboardEvent from browser?

KeyboardEvent has its 'predefined' value = .key depending of what key you press on keyboard but even when mine console says that i clicked certain key i cannot 'define' key value.... i tried googling solutions & defining key value on its own but nothing worked im a bit clueless at this point let can...
Michal Platko
1

votes
2

answer
34

views

What does :2 mean when running Docker registry?

In every tutorial I've found regarding Docker registry there is a command like this: docker run -d -p 5000:5000 --name registry registry:2 Tag 2 is used here. Why? I've tried registry without the tag and it also worked. I think it has something to do with different API (?) of Docker registry but I a...
Michal Špondr
1

votes
3

answer
47

views

How to make div inside another divs on left, right, top and bottom

I have divs called bottom, left, right and top. I want to put inside them a div called 'center'. I want to make it look like this: ======top====== | left- center -right | ------bottom----------- Sound simple, but when I try to do this i have problems with my divs escaping from specified position....
1

votes
2

answer
74

views

What is the overhead of an asyncio task? [on hold]

What is the overhead of any asyncio task in terms of memory and speed? Is it ever worth minimising the number of tasks in cases when they don’t need to run concurrently?
Michal Charemza
1

votes
3

answer
1.5k

views

Ajax - getting separate lines of data

i would like to ask if it is possible in ajax technology (working with servlets) to get not the whole data from responseText but line by line. i mean when putting in servlet lines of text using println method (response object) i would like to get every seperate line on the client side (for displayin...
michal
1

votes
3

answer
272

views

How to TransferRequest to cshtml file?

I am looking at the ASP.NET MVC4 application which is calling Server.TransferRequest('Error.cshtml') while executing one of the requests where Foo.cshtml is a view page residing in the root folder of the application. Everything is working fine on our old server, but once I deployed this app to our n...
Michal Hosala
1

votes
1

answer
322

views

Celery + django - pdf generator

I have some question: how to catch a pdf file which I generated in tasks.py and start downloading it automatically after redirect to home page and put the download link into this page? My task.py works because I see the result in terminal. My tasks.py: @shared_task def html_to_pdf(ctx): html_string...
Michał Chmielewski
1

votes
1

answer
34

views

How are POST requests constructed?

How does a web browser construct a valid HTTP POST request from HTML source code? For example, the login form on https://stackexchange.com/users/login looks like: Email [email protected] Password Password If I intercept the request my browser sends, I can see the full POST request to be: POST /affili...
Michal Nerek
1

votes
3

answer
637

views

loop through rows and INSERT INTO SELECT from the same table

I'm trying to create a stored procedure in SQL-Server2012, that will update some rows, then re-insert them again into the same table but with NULLs or different calculated values. my table 'schedule': CREATE TABLE [cil].[schedule]( [id] [int] IDENTITY(1,1) NOT NULL, [taskFK] [int] NULL, [scheduledDa...
michal
1

votes
0

answer
23

views

Bootstrap classes render anchor tags disfunctional

I have a rather peculiar issue and can find nothing on it on the net. I have a following anchor tag, embedded in a aspx web form. The anchor tag, calls upon another form modal-forgotpassword.aspx. Forgot password? Easy enough right? Issue is that the link, while embedded in the web-form does not wor...
1

votes
1

answer
393

views

Angular 2+ and ASP.NET Core Web API - How to publish on Heroku?

I have applications: 1. Client-side which is Angular 2+/ASP.NET Core project 2. Server-side ASP.NET Core Web Api with MS SQL database (Entity Framework Core) This apps have configured CORS. How can I publish both of this apps on Heroku? I started with the server-side using this tutorial https:/...
Michał Ziobro
1

votes
0

answer
54

views

F# RProvider rworldmap joinCountryData2Map field, constructor or member 'joinCountryData2Map' is not defined

I am playing with F# RProvider and I am unable to make library plugin work. Rworldmap seems to be loaded successfully but F# doesn't recognize related functions like joinCountryData2Map. I am trying code from Mathias Brandewinder blog - Creating maps using R, Deedle and F# type providers I open thes...
Michal
1

votes
0

answer
107

views

Why can't I send packets between client and server using UDP

I have a problem with communication between client and server using UDP protocol in Java. I made Client and Server classes and two classes SingleCom responsible for sending and receiving packets. I tried to test the connection (I run client on one computer and server on another; both create Datagram...
Michał Bartoś
1

votes
0

answer
68

views

JsPlumb - drop Icon with Endpoints on already existing Connector line

The desired behaviour is that on drop on connector - we want to have this icon connected with Endpoints of others two Icons. I don't think that there is a build solution for such behaviour in jsPlumb, but maybe I'm wrong. I see oportunity to make it programically. At first I thought about mouseup ev...
Michał Lis
1

votes
2

answer
99

views

What is the best way to parse dynamic names in Json objects in Java?

I would prefer to use com.fasterxml.jackson if that possible. I'm looking for a way to parse json like this: { 'availability':{ '48':{ //this is dynamic (in next response that number can be different, like 1023) '2018-02-08':{ //this is dynamic 'temp':null }, '2018-02-09':{ //this i...
Michał Sobierski
1

votes
0

answer
74

views

Black-box combinatorial optimization over permutations

I am solving general black-box optimization problems like: x*: f(x) -> min, where x are permutations of length N (N = 50 for example, so brute force search is not possible). Objective function f(x) is represented by stand-alone computer code and x represents configuration of complex system with the...
michal
1

votes
0

answer
205

views

WPF application “bitmap-scaled” on Remote Desktop with Hi DPI

My WPF application works well on Hi-DPI display (e.g. My Yoga Pro 2 laptop, with 192 DPI display (13 inch, 3200x1800). All vector-defined GUI elements are crisp and sharp - without any explicit programming for that. Seems then WPF can pick the proper rendering DPI matching DPI of the display and au...
Michal.Jan008
1

votes
0

answer
192

views

UWP: How to get byte[] from AudioFrame and then play it?

I am trying to get the buffer from the AudioFrame and convert it to byte array, send over the network, and than play it. I am able to transfer the bytes no problem, but when I try to play it i only get static. I tested it and I know, that my microphoone works ok. Here is my code, MyRecorder.cs priva...
Michał Dutka
1

votes
1

answer
251

views

Srcipt vbs, moveFolder return Permission denied

Option Explicit dim fso Set fso = CreateObject('Scripting.FileSystemObject') If fso.FolderExists('C:\Users\michal\Desktop\mv_files_backup') then fso.MoveFolder 'C:\Users\michal.glowacki\Desktop\mv_files_backup\*.*', '\\192.168.10.245\backup\servers\backup_server' Else wscript.echo 'doesn't exist' En...
michal
1

votes
0

answer
81

views

Echo overrides the beginning of a line [duplicate]

This question already has an answer here: Variables overwriting text problem with “echo” in Bash 2 answers Why would a correct shell script give a wrapped/truncated/corrupted error message? [duplicate] 1 answer Printing output from grep in bash script yields broken string 1 answer I would lik...
Michał Szczech
1

votes
0

answer
34

views

cassandra-stress tool: [a-z] letters range for varchar column

Under cassandra-stress yaml config file, columnspec defines insert range of data. For a varchar column how to say I want a column to be populated with words built from letters [a-z]* only? If I say: columnspec: - name: id # varchar - population: uniform(100..110) I get stings like this: \x1c\x0b\x1...
Michal Wegorek
1

votes
1

answer
286

views

curl syntax in GET based HTTP logins

For practice purposes I decided to create a simple bruteforcing bash script, that I succesuly used to solve DWVA. I then moved to IoT - namely my old IP camera. This is my code as of now: #!/bin/bash if [ '${#@}' != '2' ]; then echo '' exit fi ip=$1 path=$2 for name in $(cat user.txt); do for pass i...
Michał Kowalik
1

votes
1

answer
31

views

Swift - how to make protocol to be both class and need to adopt certain type

I am trying to make protocol that need to have certain type using Self == MyCustomClass. But this protocol is used as delegate type and weak constraint requires it to be also class-only protocol with ProtocolName : class I have tried something like this protocol MusicPlayerViewDelegate : class wher...
Michał Ziobro
1

votes
0

answer
134

views

how to mock encryption code

I am using testng as my testing framework, mockito for mocks. What I have is: I am trying to write tests for one class that will be tested, the packet processor. The packet processor has two methods called send and receive, where the receive method receives one packet of a specific network protocol...
Michał Zegan
1

votes
1

answer
70

views

What is the meaning of the value set by CURLINFO_SSL_VERIFYRESULT?

I'm trying to verify a server's certificate before obtaining data from it using https. I'm assuming that after curl_easy_perform I should use: long out = -1; curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT, &out) I cannot find any documentation explaining the meaning of the value out is set to, ex...
Michał Trybus
1

votes
0

answer
26

views

Why do most Multi-Process apps have same name

Does anyone know why (if there is a reason at all, e.g. shared memory) applications that have multiple processes (usually per tab) all share the same name? E.g. chrome.exe edge.exe vscode.exe Why don't they have a parent process e.g. chrome-window.exe and chrome-tab.exe. Is there any benefit of ha...
Michal Ciechan
1

votes
0

answer
31

views

TypeScript syntax: someObject !.prop

I'm watching an Angular issue on Github and I've ran into interesting .ts syntax, I've never seen before. I've tried to understand it and check how it works in practice, but... I don't understand. Link to script on Github This script was reviewed by someone from Angular team and generally accepted....
Michał Salamon
1

votes
0

answer
21

views

Registering e-mail adress with my domain AWS

I am a begginner (18 y.o.) and I am lost in the AWS console. I have a static website on my domain, but I would like to have some emails ending with my domain, for example [email protected] In the SES Management Console I have verified my domain. In the Email adresses I have added e-mails that I...
Michal Dang
0

votes
0

answer
5

views

AWS CloudWatch logstream data completely missing

I am looking for help in troubleshooting a curious CloudWatch issue. I have a CloudWatch logshipping agent setup for /var/log/syslog on Ubuntu. The aws log is full of happy INFO messages such as the following. No errors, no exceptions: The log stream in CloudWatch console is completely empty - no...
Michal
1

votes
1

answer
34

views

Service methods operating on ManyToMany collection and Law of Demeter

I have problem designing service methods operating on @ManyToMany collection in my SpringMVC/Hibernate Rest Web Application without using long method chains that break Law of Demeter. My application has recipes, and inside recipe there is collection of ingredients. I'm not sure if operations like a...
Michal Ruszkowski
1

votes
1

answer
51

views

Add extra SELECT expression result to the existing entity

I have the project that allows to rate a company in many aspects. The following diagram could help you to understand the relations in my database. Of course, I have deleted from the scheme the fields, that are not important in the context of my problem. Currently, in my repository class of the Compa...
Michał Szczech
1

votes
2

answer
1.2k

views

OpenCV C++ error using cvSaveImage Error:Assertion failed ((flags & FIXED_TYPE) != 0) in cv::_InputArray::type

Im relativly new to OpenCV. In this case I tried to save an image using cvSaveImage after making some processing, but this error was thrown Assertion failed ((flags & FIXED_TYPE) != 0) in cv::_InputArray::type, file C:\build\master_winpack-build-win64-vc14\opencv\modules\core\src\matrix_wrap.cpp, li...
Michal Obert
1

votes
2

answer
110

views

Error when click on edit text android

After actualization android studio to version 3.1 I have problem with my project. When i click on edit text activity closing and throw exception. I have no idea why is this happening, pls help. E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! E/AndroidRuntime: Error reporting crash android.os.Transac...
Michał Woźniak
1

votes
0

answer
143

views

How to configure Restcomm jSS7 to receive and send dialogs from same SccpAddress

I have JAIN-SLEE application which runs on Restcomm SLEE. Application receives and sends USSD messages placing as Calling Party SccpAddress with AI=18 (pc, ssn, tt, digits). Now I would like to set up Restcomm Simulator and JBoss stack to reveive and send USSD from both sides. Is it possible to conf...
Michał Mielec
1

votes
1

answer
119

views

Xamarin Forms - Stuck on splash when change date to past on Android

I start the application for the first time. After killing it then changing the date on Android device to some past date, then starting the app again it gets frozen on splash screen. Checking Android Studio logcat returns nothing. When doing the steps from VS, the same does not happen. Checked XF v...
1

votes
1

answer
69

views

Convert an array of integers into a SymPy matrix of their ratios

I'd like to change a 3D array of integers into a SymPy matrix of rationals. I know that i should use Sympy(Rational and Matrix) but I don't know how do it. For example, [[[2, 1], [1, 3], [3, 2]], [[4, 3], [5, 2], [0, 1]]] should become 2 1/3 3/2 4/3 5/2 0 A Picture of how it should look
Michał Kubiak

View additional