Questions

Getting file names without extensions

When getting file names in a certain folder: ``` DirectoryInfo di = new DirectoryInfo(currentDirName); FileInfo[] smFiles = di.GetFiles("*.txt"); foreach (FileInfo fi in smFiles) { builder.Append...

12 Sep at 23:37

How can I get the current page's full URL on a Windows/IIS server?

I moved a [WordPress](http://en.wikipedia.org/wiki/WordPress) installation to a new folder on a Windows/[IIS](http://en.wikipedia.org/wiki/Internet_Information_Services) server. I'm setting up 301 red...

13 Apr at 11:11

Working with TIFFs (import, export) in Python using numpy

I need a python method to open and import TIFF images into numpy arrays so I can analyze and modify the pixel data and then save them as TIFFs again. (They are basically light intensity maps in greysc...

Where can I find the TypeScript version installed in Visual Studio?

Maybe it's obvious, but I checked everywhere (besides the right place) and googled it. Nothing.

30 May at 06:24

CSS align images and text on same line

I have been searching and trying different methods for hours now. I just can't seem to get these two images and text all on one line. I want both the images and both text to all be on one line arrang...

28 Nov at 02:31

Setting a global PowerShell variable from a function where the global variable name is a variable passed to the function

I need to set a global variable from a function and am not quite sure how to do it. ``` # Set variables $global:var1 $global:var2 $global:var3 function foo ($a, $b, $c) { # Add $a and $b and set...

20 Jan at 00:27

SQL Server function to return minimum date (January 1, 1753)

I am looking for a SQL Server function to return the minimum value for datetime, namely January 1, 1753. I'd rather not hardcode that date value into my script. Does anything like that exist? (For co...

30 Sep at 05:1

How to get distinct values for non-key column fields in Laravel?

This might be quite easy but have no idea how to. I have a table that can have repeated values for a particular non-key column field. How do I write a SQL query using Query Builder or Eloquent that w...

17 Nov at 15:12

Tool to generate JSON schema from JSON data

We have this json schema [draft](https://datatracker.ietf.org/doc/html/draft-zyp-json-schema-03). I would like to get a sample of my JSON data and generate a skeleton for the JSON schema, that I can r...

What is the purpose of a question mark after a value type (for example: int? myVariable)?

Typically the main use of the question mark is for the conditional, `x ? "yes" : "no"`. But I have seen another use for it but can't find an explanation of this use of the `?` operator, for example. ...

15 Jul at 19:44

How to execute an .SQL script file using c#

I'm sure this question has been answered already, however I was unable to find an answer using the search tool. Using c# I'd like to run a .sql file. The sql file contains multiple sql statements, so...

9 Feb at 15:14

#1064 -You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version

I'm new to `PHP` and `MySQL` and ran into a little trouble with a learning project I'm working on. Whenever I try to create a table ``` CREATE TABLE transactions( id int NOT NULL AUTO_INCREMENT, loc...

28 Mar at 06:7

I am getting Failed to load resource: net::ERR_BLOCKED_BY_CLIENT with Google chrome

I am getting white page after running my project but its work with .net Client properly Do I need any settings in the browser? and the link will come after the error ``` Failed to load resource: net:...

29 Mar at 10:1

Force Internet Explorer to use a specific Java Runtime Environment install?

When viewing someone else's webpage containing an applet, how can I force Internet Explorer 6.0 to use a a particular JRE when I have several installed?

How to use filter, map, and reduce in Python 3

`filter`, `map`, and `reduce` work perfectly in Python 2. Here is an example: ``` >>> def f(x): return x % 2 != 0 and x % 3 != 0 >>> filter(f, range(2, 25)) [5, 7, 11, 13, 17, 19, 23] >>> de...

Why is my locally-created script not allowed to run under the RemoteSigned execution policy?

> Since this question continues to attract responses that are either refuted by the question body or don't address the actual problem, of what you need to know:- - - `RemoteSigned`- `RemoteSigned...

Splitting string into multiple rows in Oracle

I know this has been answered to some degree with PHP and MYSQL, but I was wondering if someone could teach me the simplest approach to splitting a string (comma delimited) into multiple rows in Oracl...

24 Dec at 10:17

How to get current user in asp.net core

I want to get the current user, so I can access fields like their email address. But I can't do that in asp.net core. This is my code: `HttpContext` almost is null in of controller. It's not good to ...

18 May at 13:46

What is the "assert" function?

I've been studying OpenCV tutorials and came across the `assert` function; what does it do?

25 Jun at 18:51

Why are there no ++ and --​ operators in Python?

Why are there no `++` and `--` operators in Python?

9 Dec at 13:36

Check whether a request is GET or POST

> [PHP detecting request type (GET, POST, PUT or DELETE)](https://stackoverflow.com/questions/359047/php-detecting-request-type-get-post-put-or-delete) This should be an easy one. I have a sc...

23 May at 12:26

Convert a comma-delimited string into array of integers?

The following code: ``` $string = "1,2,3" $ids = explode(',', $string); var_dump($ids); ``` Returns the array: ``` array(3) { [0]=> string(1) "1" [1]=> string(1) "2" [2]=> string(1) "3" }...

2 Jun at 18:51

sklearn plot confusion matrix with labels

I want to plot a confusion matrix to visualize the classifer's performance, but it shows only the numbers of the labels, not the labels themselves: ``` from sklearn.metrics import confusion_matrix im...

8 Oct at 12:44

MySQL Server has gone away when importing large sql file

I tried to import a large sql file through phpMyAdmin...But it kept showing error > 'MySql server has gone away' What to do?

14 Sep at 13:12

Is it possible to have a multi-line comments in R?

I found this [old thread](http://r.789695.n4.nabble.com/How-to-comment-in-R-tt882882.html#none) (from over a year ago), which explains how come R doesn't support a multi-line comments (like /* commen...

9 Nov at 07:25