Categories
Ask Geographic Information System (GIS)

Finding source to destination and destination to source

I am using PostGIS 1.5 and want to achieve this below given goal. If A is my start point. I want to find all the nodes that are connected to A and find the nodes that does not have any connectivity. In the below example, A -> C A -> B, E, H, K A […]

Categories
Mastering Development

ifelse() used with all() on multiple columns

I have this data: library(tidyverse) data <- tribble( ~a, ~b , ~c , ~d, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1 ) and would like to get this output – if there is a zero in all columns TRUE is returned: # A tibble: 4 x […]

Categories
Mastering Development

Measure structure of xy points – python

I’m trying to measure the overall formation of xy points taken over time. To achieve this, I want to calculate the vector between each point and the rest of the points at every timestamp. The average of these vectors between each pair of points should then provide the overall structure. Once the averages have been […]

Categories
Ask Electrical Engineering Engineering

Bitwise expression in System Verilog causing Icarus Verilog to Hang

I have ripple carry adder in system verilog as shown below. The circuit isn’t functionally correct which is not my problem here. My problem is this line c_in[0] =~(c_in[63]) | carry_in ; cause my simulator (Icarus Verilog) to hang. When I change the operator | to ^ it simulates without hanging. I want to find […]

Categories
Mastering Development

Can anyone help a beginner as to why this simple JS wont work?

this is a simple color change project and on the surface it looks like it should work but either the JS file isn’t loading or ive made a simple error, i cant work it out! Any help appreciated! The idea is you press the button ands the BG changes to a random hex color and […]

Categories
Mastering Development System & Network

pcs status shows online but pcs cluster status shows offline

I have a problem to communicate with my servers. currently i have 3 debian 9 server (server1,server2,server3). pcs status Cluster name: vipcluster Stack: corosync Current DC: server1 (version 1.1.16-94ff4df) – partition with quorum Last updated: Mon Nov 30 13:54:24 2020 Last change: Mon Nov 30 13:03:09 2020 by root via cibadmin on server1 3 nodes […]

Categories
Mastering Development

How to allocate tickets

I have two files : Category: Category_File = data.frame(c("A","A","A","A","A","B","B","B","C","C","D","D")) colnames(Category_File)= c("Category") Agent: Agent_File = data.frame(c("A","A","B","B","C"),c("X","Y","X","Z","Y"),c(2,2,2,1,2)) colnames(Agent_File) = c("Category","Agent","Tickets") I need to allocate agents according to their category count. Desired Output: outputfile = data.frame(c("A","A","A","A","A","B","B","B","C","C"),c("X","X","Y","Y","NA","X","X","Z","Z","Y","NA","NA")) colnames(outputfile) = c("Category","Agent") Thanks

Categories
Mastering Development

Python Pandas improving calculation time for large datasets currently taking ~400 mins to run

I’m trying to improve performance of a DataFrame I need to build daily, and I wondered if someone had some ideas. I create a simplied example below: First, I have a dict of DataFrame‘s like this. This is time series data so updates daily. import pandas as pd import numpy as np import datetime as […]

Categories
Mastering Development

How do I make this table into a data frame? I’m using R. Trying to get the ANOVA table for it

enter image description here #Here’s what I have, but I don’t think it’s right: gas.test <- data.frame(gas=c(0, 14, 12, 13, 11, 17, 0, 13, 11, 10, 14, 14, 0, 12, 12, 13, 13, 12, 0, 11, 12, 10, 9, 8, 0), Test_Car = factor(rep(c("A","B","C","D", "E"),each=5)), Additive = factor(rep(c(1,2,3,4,5),5)))

Categories
Mastering Development

Calculate which day and periods applies and the duration per range [closed]

I need to calculate the wage for an employee per (worked) shift. The price per hour depends on the actual day and the range. The given input is per shift a date, start-time and end-time. Policy (ranges per day) +———-+–+———-+——-+———-+——-+———-+——-+–+ | Day | | Period A | Period B | Period C | | +———-+–+———-+——-+———-+——-+———-+——-+–+ […]