Newest Questions

Q&A for professional and enthusiast programmers

Postgres Search Strategy

I have data that is segmented into:- postcode town place My aim is to construct a search function that will look for any text given using the above segmentations in order of precedence. ie. First ...

Access a webserver inside a docker container from outside

I want to access my tomcat webserver which is running inside a docker container from another computer. For now I have a docker-compose.yml file which I start with the command docker-compose up -d ...

Building Qt with external dependencies post the 5.8 build regression

Now that the regression, introduced with the new Qt build system in 5.8 is resolved, how do specify external dependencies when building Qt? Are we back to the old (bad) syntax that was removed in 5.8?...

How can I manually create a mask for my textbox?

I'm using the MetroFramework from the NuGet package thing, and it looks great. But it doesn't have a masked textbox. How can I manually make characters like . - () $ appear in the right place while ...

Sorting with SortableBindingList and DataGridView [C#]

I'm trying to tackle the issue of sorting a datagridview using a binding list. I've implemented a SortableBindingList and this works great when a user clicks the datagridview column header to sort. ...

Twilio video with UI drawing not running Concurrently iOS

I am developing a iOS native application for drawing with video calling for communication(Twilio video SDK), my video is getting struck while I am drawing on the view, how to concurrently run both ...

What is meant by “Max Application Master Resources” in the Resource Manager for the Cluster?

In our Cluster's RM I can see that for my queue the configuration is set as below: Max Application Master Resources: <memory:4163584, vCores:1> Max Application Master Resources Per User: <...

d3.v4 reset transformation on rect

As I do not see any possibility to create a multiple zoom chart, I created the folloing fiddle: https://jsfiddle.net/DaWa/wnxu7m04/3/ Here will all rects be reset to garantee that the transformation ...

sqlite3 crashes on “INSERT” query (python 3)

I have a Database Class built in Python 3.5.2, which I am built to have general functions other classes could use to connect to the DB. I am using SQLite and SQLite Studio to check my work. So far, I ...

Is there a better way of importing images in react?

I'm importing images into a component, and due to the our file structure a complex relative path is required: // TODO is there a better way of importing images? image helper? import browserImg from '...

Sequelize belongsToMany relationship not working as expected

User.belongsToMany(Character, { through: {model: UserRoom, unique: false}}); Room.belongsToMany(User, { through: {model: UserRoom, unique: false}}); I have this model. Pretty much a userRoom is a ...

Making lmmodel with demographic and dummy variables

im completly new in R and also in economteric. Im working on my school project and i need to run model, which should explain the dependecne of property prices on their position in the city. The model ...

Error using nativescript `tns run android`

I am very new to nativescript and just starting up a new project using nativescript. I am trying to run nativescript starter template using tns run android and its showing error saying The ...

Generated html of swagger file does not show example

The generated html and html2 pages of my swagger file doesn't show the examples. But I can see them on Swagger Editor output panel. Here is an example of what I am doing: /getMyObject post: .....

Rendering a nested object state

This problem is giving me a huge headache so any help is welcome :) In this component, I'm making 2 axios calls to different APIs: one for freegeoip and one for openweathermap. I'm storing the data ...

REST : Multiple collections under same root

I have 2 collections in my REST api. Queries and Users I am using POST @ /queries for creating a new query and POST @ /users to create a new user. What endpoint should i use for creating the whole (...

How to use a relative program path in a PhpStorm file watcher

In PhpStorm (as well as other JetBrains IDEs, I'm sure), I'm setting up a File Watcher. In the Watcher Settings section, it asks me to specify the path to the program to be executed. I want to use ...

How i can change phash in python?

I am a beginner in python and I am looking for a solution to change the phash of an image without making visible changes. thank you in advance.

Webrtc and signalr video chating

I hope you are all fine. I am working on a video chating application using signalr and webrtc but I really stuck on how to apply this because I new to both I preffer to read my code and give me tips ...

Saving and Restoring Lights (HMCharacteristics)

I'm using lights connected with HomeKit for notifications. I'd like to take the current state (color, brightness, on/off) of each light being used, and restore the lights to that state after the ...

XElement - how do I get descendants of an element into a string

I'm using an XElement object to load the following xml fragment. Example XML: <xmlfragment> <list id="1" value="one" /> <list id="2" value="two" /> <other stuff="here"> ...

Need a WPF Label that changes background color depending on a view model boolean value

I have a requirement to display around 50 Labels that would change background color depending on the value of a view model boolean property. Each Label is associated with a different view model ...

TestNG 6.11 Invoker

Recently upgraded from TestNG 6.9.10 to 6.11. Upon doing so I noticed that our TestNG Invoker class had a deprecated method: "addListener". String filePath = System.getProperty("user.dir") + "\\...

HttpClient under Mono throwing an error

I'm attempting to use HttpClient under Mono (runs fine under .NET Framework), but I'm getting error; 04-25 14:07:14.952 I/Choreographer( 3238): Skipped 144 frames! The application may be doing too ...

onRequestPermissionsResult never gets called in fragment

Below code is working fine in Activity but I cannot make it work inside a Fragment. The onRequestPermissionsResult is never gets called. There is a requestPermissions function in API level 23 (...

Spring Security CAS: show client error on login.jsp

I'm using Spring Security with CAS and have the following issue. When the authentication error is thrown from CAS Server (e.g. invalid username/password) it is shown well in form and is displayed ...

Smooth Scrolling -

I implemented the following code to enable smooth scrolling. The problem is it doesn't seem to allow bookmark links to work when they aren't on the page of the bookmark. For example, on the ...

I have the following xml that come as http request body. How can I map it to a java object?

This is the xml that I have from http request body. so how can I map it to a java object? Your help with a code example is highly appreciated. <search ...

Passing Sensitive Information Via SignalR

Would it ever be wise to pass along more sensitive information using SignalR for your application to process. I've been thinking about this for a while now as part of a concept for a personal project ...

Creating build target in eclipse that runs shell script

I want to debug using gdb in Eclipse neon3 in Linux. I read how to add shell script in eclipse project properties at Build where I can build using *.sh but I'm not able to build my project using shell ...

Adding a Mocked object to a typed list

I am trying to test this Box object (this is the simplified code): class Box { protected $boxTimes; protected $enabled; protected $number; public function __construct(int $number, ...

Light field viewer

I am trying to write an LF viewer on GPU. As far as I understand the task is similar to ray tracing where we need to look up in the texture and render. However, there are some technical things that I ...

Why the gameObject created in subclass of MaskableGraphic not be destroyed when unity stoped running?

I have a class inherit MaskableGraphic. In the function Awake(), I create a gameObject. The strange thing is when stop Unity, the GameObject is not be destroyed. public class Test : MaskableGraphic { ...

make a custom 404 with golang and mux

Here is my code about a little example webserver with golang and mux : package main import ( "fmt" "net/http" "github.com/gorilla/mux" ) func handler(w http.ResponseWriter, r *http.Request) { ...

How to add multi-sub-columns in gridExtra::tableGrob

I'm attempting to engineer an R function that will accept a list and plot a table with specialized formatting. Here is my data: pottery <- list( `Llanederyn` = c( 14.4, 13.8, 14.6, 11.5, 13.8,...

JQuery, Javascript, AJAX POST json to rest api

I have a problem with posting data to a REST API, it should be done like this: curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" \ -d '{"event":{"title":"event", "...

sequence of strings of letters in R

I have a data set (GRE) with about 40000 rows and 400 columns. I need to identify for each participant (Subject) and each trial (Trial) in column LABEL two sequences of strings: 1) pret1 followed by ...

Javascript - create and destroy a toast message

I want to create a toast notification in javascript. When the user has done fine, a message box (the toast) should appear with a green color and the text "successfull" or whatever. If not, the color ...

Algorithm to select 1 item from a list derived from a score

to explain what I mean, lets start with a list of items each with their own score [2,3,4] adding these up these gives 9, so I want to be able to select a random number in the total range, where this ...

Change alternative colour of TR in multiple TBODY

I want to change alternative color of all TR which resides multiple TBODY. My html code is like as following. <table> <thead> <tr><th>Customer</th><th>...

How to simulate large or slow upload to app hosted by vagrant?

I have a input of type=file. I am trying to work on loading bars but since I'm hosting the app on my local system (using vagrant+virtualbox) uploads go too quickly to work with even using 80MB files. ...

why is undefined being added to my filtered list?

I'm trying to make write a node program that will read a file director and filter out those without a certain file extension. (This is a challenge for learnyounode) For some reason it adds to the ...

Build a bot linked to a database by using PHP and MySql

I want to build a search/chat bot. its functionality is to only answer questions. but I have a big amount of data. almost 10.000 questions and answers. and these are divided into fields and subfields....

SSRS mail subscription XLSX issue

I have setup a SSRS mail subscription which generates XLSX format report and sends it via Clearswift Mimesweeper to clients. But the XLSX files generated in this method is getting quarantined in ...

Compile gcc for riscv

I already build a riscv32-unknown-linux-gnu-gcc cross compiler, how do I use it to compile a gcc that can run on riscv32 arch ? I am confused how to configure gcc source code to build a gcc that can ...

How to solve issue with getting Data using URL Session?

I am using URL Session to get Data from a web API and load them in a tableView. Every thing is working fine except that whenever I get the data the first time, the data is always returned the same ...

Is there any way to prevent transfer a package from A layer to B layer?

I'm Using .netstandard 1.4 in Xamarin.Forms. For example I'm using Microsoft.AspNetCore.Identity.EntityFrameworkCore in A layer. Because A layer referenced from B layer and B Layer referenced from ...

nginx ini file throwing error

When we run .ini file with sudo it's working fine. But without sudo it throwing following error, /home/ubuntu/.local/bin/uwsgi !!! no internal routing support, rebuild with pcre support !!! your ...

Scheme expression evaluation

I am going through the book - The Scheme Programming Language, 4th Edition. In an exercise, there is an expression ((car (list + - * /)) 2 3). Below are the steps in which I believe the expression ...

ThreeJs, Panorama environment with ground

I've created a scene using Three.js with a panoramic picture environment and an object in the center like this example: https://threejs.org/examples/#webgl_materials_envmaps The only problem is that ...
15 30 50 per page
Translating... 0%