How do I check if a given value is a generic list?

public bool IsList(object value) { Type type = value.GetType(); // Check if type is a generic list of any type } What's the best way to check if the given object is a...

A definitive guide to API-breaking changes in .NET

I would like to gather as much information as possible regarding API versioning in .NET/CLR, and specifically how API changes do or do not break client applications. First, let's define some...

append new row to old csv file python

I am trying to add a new row to my old csv file. Basically, it gets updated each time I run the Python script. Right now I am storing the old csv rows values in a list and then deleting the csv...

Generating an MD5 checksum of a file

Is there any simple way of generating (and checking) MD5 checksums of a list of files in Python? (I have a small program I'm working on, and I'd like to confirm the checksums of the files).

Convert Enumeration to a Set/List

Is there some one-liner bridge method to dump a given Enumeration to java.util.List or java.util.Set? Something built-in like Arrays.asList() or Collection.toArray() should exist somewhere, but...

Is it possible to check if a short sequence of text is random or not?

Is it possible to check if a short sequence of text, e.g. two or three words, is random or not? My first thought was to calculate the entropy on the string. H("hello world") =...

how to make a chat box like facebook using ajax, jquery and php

See I have made almost the chat box with only 2 problems. I don't know how to solve them. I'm trying hopeless methods to make it correct but it just won't work. I will explain my code...

Eloquent Specify Relation Columns of belongsToMany relationship

I have tried all kinds of methods of limiting the columns which are returned in my many-to-many relationship, and none seem to work. Background - Not really necessary, but to give the big...

Add List to Set is Possible in Java but not in Python?

I am new to Python and just stumbled on adding list to set. Now I know the reason why this is not possible is that list is mutable so its hashcode (or the Python corresponding concept) will...

Access videos both in internal storage and external SD card - Android

I've developed a simple android app, which will pull videos from path="storage/MicroSD/Videos" and present them in a list view, upon selecting the video, selected video will be played. The...

Django: Order_by multiple fields

I am getting order_by fields in the form of a list. I want to order_by by multiple fields with django orm. List is like below: orderbyList = ['check-in','check-out','location'] I am writing a...

how to display errors on the same page (php form)

Trying to display errors on the same page. How do I do that? As this stands right now, every time there are errors, it generates a blank page with all the errors listed. I don't want that. Here's...

Realm JS Create objects with primitive data type list

I am unable to create a list of only string objects This is how my model looks like class ProductSummary extends Realm.Object {} ProductSummary.schema = { name: 'ProductSummary', properties:...

Android emulator not showing in Visual Studio

I made an Android Virtual Device. It runs on the SDK emulator using Intel HAXM. I was able to see it in Visual studio (debug devices drop down list) and debug my applications on it. This is great...

Filter columns in a data frame by a list

I want to produce a new data frame from my existing one, where the columns in this new df are selected based on whether that variable is listed in a separate vector (i.e., as rows). The new df...

Sorting/grouping odd and even numbers in odd and even segregated list

I have a unsorted list of number with even and odd. I need to segregate odd and even numbers in sorted order. For example: List = [5,6,4,7,11,14,12,1,3] Expected output...

How to run Docker and Docker-Compose from a Dockerized Jenkins container?

I have this docker-compose to run a Dockerized Jenkins container, version: '2' services: jenkins: image: 'jenkinsci/blueocean' environment: - JENKINS_OPTS="--prefix=/jenkins" ...

how can insert value in list from user in for loop?

how many values he/she want to add and then he insert values using loop i use this loop for sorting value = int(input("how many number u want to add")) arr = [value] for n in range(0, value): ...

Python- Drop Down Change Content color

I am trying to change the dropdown content list background color to green in style in Python Dash, i am unable to do so. Can someone help me? I am new to CSS. dcc.Dropdown( ...

How to get all possible branch with python anytree

I'm using anytree currently to generate my search tree, how do I get all possible branch starting from the root node in list format from anytree import Node, RenderTree, AsciiStyle f =...

How to update "prevState" in react.js?

I have got a list of array of objects. I want to update the state. When I click on the 1st item of the array, it's giving isTrue: false, when I click on the second array of items, isTrue is given...

make height responsive amp-list

I'm trying to make the height of amp-list responsive <amp-list width="100" height="1980" [height]="660 * page.items.posts.length" layout="responsive" src="/get_posts/" [src]="'/get_posts?page=' +...

Angular Material Menu module: Export of name 'matMenu' not found

I have a little issue with Angular Material Menu module. I have this code in my app.module.ts: import { SharedModule } from './shared/shared.module'; @NgModule({ declarations: [ // ... ...

Usage of FactorizedTopK in TensorFlow Recommenders

I looked at all the quickstart tutorials and used the basic_retrieval example to adjust it to my dataset. views_df contains pairs of user_ids and content_ids and represent when a user viewed a...

Is it possible to parse json in Flutter/Dart with missing attributes (keys of json data)?

I have list of objects in json form that are coming from an API. These objects have some attributes, the problem is some of the objects have missing attributes. My Question is: Is it possible to...

How to set the values of args and args2 in Plotly's buttons in updatemenus?

I'm new to plotly and I am trying to understand how to set the values for args and args2 in the updatemenus functionality offered by plotly (as explained in the documentation Updatemenus...

Delphi FMX, change TComboBox images at runtime

If I programmatically change TComboBox.Images to a new TImageList, only the selected icon in the TComboBox changes, all other icons in the TComboBox (drop-down list) remain the same. I have two...

Find the sum of Two Arrays

I am trying to find the sum of two lists/arrays in Python. For example: You are given with two random integer lists as lst1 and lst2 with size n and m respectively. Both the lists contain numbers...

R values that go into matrix multiplication

What is the fastest approach to saving unique values that go into matrix multiplication (without 0)? For example, if I have a data.table object library(data.table) A =...