D3 v4 Update-Pattern for Groups

Given the following layout: <g> ... // many nodes <g> <circle></circle> <text></text> </g> ... </g> How would a correct update pattern look like in d3 v4? What do I have to use as parameter in merge(?), how

Compare 2 instances of subclass with the same class

I have 2 sub-class (Student, Teacher) and a superclass (Occupation). I have created Object A from Student and Object B from Teacher. Student A = new Student(); Teacher B = new Teacher(); And I already created a static method that takes objects as arg

Determine the number of seconds in a year

What SQL expression would be able to calculate the number of seconds in any particular year?For non leap years: SELECT 365 * 24 * 60 * 60 AS secInYear FROM dual And in general: SqlFiddleDemo SELECT 24 * 60 * 60 * ( CASE WHEN MOD(EXTRACT(YEAR FROM sys

C ++ 14 combining generic lambdas and variable models

I know about generic lambdas, and I know about variable templates, but, what does this do? Is it even allowed? template<typename T> auto f = [](auto a, T b){ /**/ }; If it's allowed, can it be used as expected? That is, as f<type>(var_a, var_b

Excel VBA to Count and Print Separate Values

I have to count number of distinct values from a column and print it with the distinct value and count in another sheet. I am working with this piece of code, but for some reason, it is not returning any result. Could anyone tell me where I am missin

Opaque UIView does not let me scroll to UIV behind

I have a view hierarchy that looks like this. buttonsView <-- UIView with 1-3 small buttons MKMapView <-- bottom most view When my buttonsView is shown I still want the user to be able to scroll the MKMapView if the user is NOT touching any of the b

C # Specify the client port

I have the following code regarding asynchronous sockets programming: public void ServerBeginAceept(ushort ServerPort) { try { ServerSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); IPEndPoint ipEndPoint = new IPE

Component sparse Component Sparse Row (CSR)

I want to test some of the newer sparse linear solvers and I want to know if there is a fast way of filling in the matrix. The format I'm interested is CSR (http://goo.gl/hLXYd). Let's say the matrix, in CSR format, is given by: values(num non-zero e

Golang Array Type Confusion

I'm trying to provide arguments to a Google Drive GoLang API (though you probably don't need to know anything about the API to answer the question). I'm new to Go and my build error message is confusing me. One of the optional arguments is an array o

Echo DATETIME of SQL SERVER Launches 500 Error

I'm running the following code: <?php include "php/connection.php"; $data = $_GET['data']; $tsql = "SELECT * FROM Customer WHERE CustomerNumber = ".$data; $result = sqlsrv_query($link, $tsql); $row = sqlsrv_fetch_array($result); ech

Add a space between two Divs

I have a screen split in two, using two columns. <div class="row"> <div class="col-md-6 well"> Left Box </div> <div class="col-md-6 well"> Right </div> </div> I need a small (approx 10px) g

Error message if I try to copy an array to another in C

This question already has an answer here: Cannot assign an array to another 3 answers The compiler gives me an error message if I try to copy one array into another by using the assignment operator. Why is that? Even though this looks good to me, the

View image on a report based on two dates

I am using sql server 2005 reporting service to generate report base on a database. There are two columns which are datetime type ColumnA and ColumnB. The report would display a KPI image on this report by comparing these two columns.Below is the exp

Pagination of the encoder with web service

So I was wondering if it's possible to use Codeigniter's pagination when using a Web Service? We're using REST and since we're not connecting to a database per se, I was wondering how I would handle the total rows call required in the pagination setu

analysis complicates json to javascript

I get JSON object from Mongo DB. This is JSON. **JSON** { "_id" : ObjectId("5265347d144bed4968a9629c"), "name" : "ttt", "features" : { "t" : { "visual_feature" : "t", "ty

The file is used by another C # visual studio process

I have created a (Web application) web scheduler to call a method every 5min in global.asax file. It is getting triggered successfully. In the method I am creating excel using interop dll and doing 'save as' as operation. First I am checking if file

Highlight color changes for different conditions

How do I change the area map color for different condition when the area is already highlighted? This is my code: if(partyname = "Democrat") { var data = $('#MT').data('maphilight') || {fillColor:'ff0000'}; data.alwaysOn = !data.alwaysOn; $('#MT

Google Maps API V3: Closes all infobox when a new one is opened

I'm working with Google Maps API V3 and infoboxes, and I'm trying to set it up so that only one infobox is open at any given time. I've seen a ton of related threads, but I can't figure out how to modify them to get them to work. I vaguely know that

How to search for a string from a file in java?

I have written a program to download a file in java. Now i need to search for a string in that file and if the search is true it should notify through email. And furthermore have to schedule this program.. Needed HelpWell, you've got several differen

Git merges a branch into two other branches

How can I merge one branch in to two other branches? So here's our scenario: We use two branches master for production and UAT for testing purposes. All local development is made on a new branch made off of Master so before starting on something, we