What is the meaning of [:] in python
What does the line `del taglist[:]` do in the code below? ``` import urllib from bs4 import BeautifulSoup taglist=list() url=raw_input("Enter URL: ") count=int(raw_input("Enter count:")) position=int...
- Modified
- 31 Aug at 05:39
How to enable a directory listing in Apache web server
I am not able to enable directory listing in my Apache web server. I have tried various solutions posted, but it is not working. I just freshly installed httpd 2.4.6 and enabled HTTPS using under the...
- Modified
- 19 Mar at 12:55
How to return a proper Promise with TypeScript
So I am learning Angular 2 with typescript. I am reaching a point to write a mocking service which (I believe) should return a Promise if the service get the Object Successfully and Return an Error i...
- Modified
- 18 Aug at 15:13
How to validate white spaces/empty spaces? [Angular 2]
I would like to avoid white spaces/empty spaces in my angular 2 form? Is it possible? How can this be done?
- Modified
- 28 Sep at 21:11
Drop database if model changes in EF Core without migrations
In previous version of entity framework, one could recreate the database if the model changes, using some of the classes DropDatabseIfModelChanges and other related classes. In EF7 or EF Core i don't...
- Modified
- 30 Aug at 19:28
Method overloading and inheritance
I have the following classes: ``` public class BaseRepository { public virtual void Delete(int id) { Console.WriteLine("Delete by id in BaseRepository"); } } public class EFRepos...
- Modified
- 30 Aug at 17:55
How do I access Configuration in any class in ASP.NET Core?
I have gone through [configuration documentation](https://docs.asp.net/en/latest/fundamentals/configuration.html#) on ASP.NET core. Documentation says you can access configuration from anywhere in the...
- Modified
- 6 Sep at 09:46
Kubernetes API - Get Pods on Specific Nodes
Reading the [Kubernets documentation](http://kubernetes.io/docs/user-guide/labels/#selecting-sets-of-nodes) it looks to be possible to select a certain range of pods based on labels. I want to select ...
- Modified
- 26 Jan at 00:7
.NET Core publishing to IIS problems - 403.14
I am trying to publish a Core 1.0 app to a 2012R2 box that runs fine locally in IIS Express. - - - - - All I get is: > HTTP Error 403.14 - ForbiddenThe Web server is configured to not list the conten...
- Modified
- 20 Jun at 09:12
Disable Chrome strict MIME type checking
Is there any way to disable `strict MIME type checking` in Chrome. Actually I'm making a JSONP request on cross domain. Its working fine on Firefox but, while using chrome its giving some error in co...
- Modified
- 23 Dec at 08:24
C# List all files with filename under an amazon S3 folder
Using C# and amazon .Net SDK, able to list all the files with in a amazon S3 folder as below: ``` ListObjectsRequest request = new ListObjectsRequest(); request.BucketName = _bucketName; //...
- Modified
- 6 Aug at 10:16
Upload a file to an FTP server from a string or stream
I'm trying to create a file on an FTP server, but all I have is either a string or a stream of the data and the filename it should be created with. Is there a way to create the file on the server (I d...
- Modified
- 30 Aug at 12:2
Path to LocalAppData in ASP.Net Core application
I have an ASP.Net Core application, and for the current purposes I've got to use LocalAppData. Usually I would write `Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)`, but u...
- Modified
- 31 Aug at 07:45
How to force Newtonsoft Json to serialize all properties? (Strange behavior with "Specified" property)
Fellow programmers, I've encountered a strange behavior in Newtonsoft.Json. When I'm trying to serialize an object looking like this: ``` public class DMSDocWorkflowI { [JsonProperty("DMSDocWork...
- Modified
- 30 Aug at 09:23
Multiple RUN vs. single chained RUN in Dockerfile, which is better?
`Dockerfile.1` executes multiple `RUN`: ``` FROM busybox RUN echo This is the A > a RUN echo This is the B > b RUN echo This is the C > c ``` `Dockerfile.2` joins them: ``` FROM busybox RUN echo This...
- Modified
- 24 Dec at 01:26
Maximum number of Threads available to Tasks
I'm Trying to get my head around the async-await functionality within C#. I've written the below code to run several tasks asynchronously - currently all they do is raise an event after a certain amou...
- Modified
- 23 May at 10:33
Method Overloading with Optional Parameter
I have a class as follows with two overload method. ``` Class A { public string x(string a, string b) { return "hello" + a + b; } public string x(string a, string b, string c...
- Modified
- 30 Aug at 05:36
Get Name of User from Active Directory
I need to show only the name of a user from Active Directory, I am using ``` lbl_Login.Text = User.Identity.Name; //the result is domain\username ``` This shows the users name but not the real nam...
- Modified
- 2 Feb at 15:36
Export the dataGridView to Excel with all the cells format
I have this code that I know that it works fast ``` CopyAlltoClipboard(dataGridViewControl); Microsoft.Office.Interop.Excel.Application xlexcel; Microsoft.Office.Interop.Excel.Workbook xlWorkBook; Mi...
- Modified
- 8 Sep at 06:59
How to override Custom Papersize in C#
I'm working on a project in C#. I have a labelprinter which needs to print a document that I send. The printer prints, however, I'm not able to override the following values of the `Custom` Paper form...
Is this the proper way to convert between time zones in Nodatime?
The goal is to create a function that converts a time from one timezone to another properly using Nodatime. I'm not just looking for feedback on whether the result appears correct, but feedback speci...
How to secure generated API documentation using swagger swashbuckle
I have implemented API documentation using swagger swashbukle. Now I want to publish generated documentation as a help file in my website. How to secure this link and publish?
- Modified
- 29 Aug at 13:15
How many bytes get allocated for 3 Point structs on a 64-bit processor?
There is a question: > Given:``` struct Point {int x; int y;} var p = new Point[3] ``` how many bytes of memory will be allocated in stack and in heap if we use a 64-bit processor? The correct answer ...
How to Use MVC Controller and WebAPI Controller in same project
I am trying to use an MVC Controller and a Web API controller in the same project, but I get 404 errors for the Web API. I started the project as an MVC project in VS 2015, but then added the Web API ...
- Modified
- 28 Jan at 03:45