ERROR 1067 (42000): Invalid default value for 'created_at'
When I tried to alter the table it showed the error: ``` ERROR 1067 (42000): Invalid default value for 'created_at' ``` I googled for this error but all I found was as if they tried to alter the ti...
- Modified
- 11 Feb at 13:13
Get current index from foreach loop
Using C# and Silverlight How do I get the index of the current item in the list? Code: ``` IEnumerable list = DataGridDetail.ItemsSource as IEnumerable; List<string> lstFile = new List<string>(); ...
- Modified
- 27 Apr at 08:9
What are functional interfaces used for in Java 8?
I came across a new term in Java 8: "functional interface". I could only find one use of it while working with . Java 8 provides some built-in functional interfaces and if we want to define any functi...
- Modified
- 5 Feb at 15:20
How do you implement a response filter in ServiceStack to filter out unwanted DTO's
I'm having trouble finding any complete tutorials on how to implement a Response Filter in ServiceStack. The best I've found is a portion of code: [https://github.com/ServiceStack/ServiceStack/wiki/R...
- Modified
- 27 Apr at 04:42
How to add a list of objects as a value for a key in redis using c#?
I have a `Model class -Person` with respective properties. I want to add a list of person (object) inside a list and set the list as value for a key. I am using `servicestack.redis` driver. I saw few ...
- Modified
- 27 Apr at 04:47
Can I use Entity Framework Version 6 or 7 to update an object and its children automatically?
I have three tables. Word -> WordForm -> SampleSentence. Each `Word` has different `WordForms` and then each form can have one or more `SampleSentence` ``` CREATE TABLE [dbo].[Word] ( [WordId] ...
- Modified
- 13 May at 10:18
Allow Access-Control-Allow-Origin header using HTML5 fetch API
I am using HTML5 fetch API. ``` var request = new Request('https://davidwalsh.name/demo/arsenal.json'); fetch(request).then(function(response) { // Convert to JSON return response.json(); })...
In C# What's the difference between Int64 and long?
In C#, what is the difference between Int64 and long? Example: ``` long x = 123; Int64 x = 123; ```
- Modified
- 26 Apr at 22:9
Close dialog window on webpage
I need to trigger some actions inside someone else's webpage. I have this code so far: ``` IHTMLElementCollection DeleteCollection = (IHTMLElementCollection)myDoc.getElementsByTagName("a"); for...
- Modified
- 6 May at 14:31
How to integrate Luis into bot builder
I'm trying to use the `FormBuilder` in combination with my intents as I created them in . I just can't find the documentation to do this. I would like to do the following things: 1. A user would en...
- Modified
- 24 Dec at 15:58
Running stages in parallel with Jenkins workflow / pipeline
> the question is based on the old, now called "scripted" pipeline format. When using "declarative pipelines", parallel blocks can be nested inside of stage blocks (see [Parallel stages with Declarat...
- Modified
- 1 Jul at 17:24
Can ASP.NET MVC + EF scaffolding be used after implementing EntityTypeConfiguration classes?
Visual Studio scaffolding for new ASP.NET MVC Controllers bound to Entity Framework work well when the models use or the direct lines within `OnModelCreating(DbModelBuilder)` to describe their char...
- Modified
- 1 Jun at 22:16
ServiceStack OAuth2 provider implementation
I have application developed with ServiceStack that used credential authentication for login. Now I need services of application to be consumed by other app. OAuth2 provider seems best to allow api a...
- Modified
- 7 May at 09:22
What is the impact of the `PersistKeySet`-StorageFlag when importing a Certificate in C#
In my application, a Certificate for Client-Authentication is programatically added to the `MY`-Store using the following code: ``` //certData is a byte[] //password is a SecureString X509Certificate...
- Modified
- 26 Apr at 14:2
Get viewport/window height in ReactJS
How do I get the viewport height in ReactJS? In normal JavaScript I use ``` window.innerHeight() ``` but using ReactJS, I'm not sure how to get this information. My understanding is that ``` React...
- Modified
- 24 Jan at 19:12
How to get ,update all keys and its values from redis database in c#?
I am using servicestack C# driver for connecting redis database which runs in 6379. I want to retrieve(GET/READ) all keys and its values from redis database(which is actually cached). I have to update...
- Modified
- 22 Sep at 18:1
Convert string to date in Swift
How can I convert this string `"2016-04-14T10:44:00+0000"` into an `NSDate` and keep only the year, month, day, hour? The `T` in the middle of it really throws off what I am used to when working with...
- Modified
- 29 Dec at 07:48
How to mock an IFormFile for a unit/integration test in ASP.NET Core?
I want to write tests for uploading of files in ASP.NET Core but can't seem to find a nice way to mock/instantiate an object derived from `IFormFile`. Any suggestions on how to do this?
- Modified
- 29 Jul at 22:28
Write / add data in JSON file using Node.js
I am trying to write JSON file using node from loop data, e.g.: ``` let jsonFile = require('jsonfile'); for (i = 0; i < 11; i++) { jsonFile.writeFile('loop.json', "id :" + i + " square :" + i * ...
- Modified
- 24 Sep at 14:6
The instance of entity type cannot be tracked because another instance of this type with the same key is already being tracked
I have a Service Object `Update` ``` public bool Update(object original, object modified) { var originalClient = (Client)original; var modifiedClient = (Client)modified; _context.Clients...
- Modified
- 26 Apr at 06:2
In MVC 6, how to code checkbox list in view and pass the checked values to the controller?
Sorry but most of my searches take me to old MVC codes. Any help will be appreciated. In MVC 6 with tag helpers, how do you code a set of checkboxes: - Use tag helper for label so clicking it will tog...
- Modified
- 23 May at 12:35
Show a Jenkins pipeline stage as failed without failing the whole job
Here's the code I'm playing with ``` node { stage 'build' echo 'build' stage 'tests' echo 'tests' stage 'end-to-end-tests' def e2e = build job:'end-to-end-tests', propagate:...
- Modified
- 26 Apr at 18:51
Jupyter Notebook 500 : Internal Server Error
I want to learn how to use Jupyter Notebook. So far, I have managed to download and install it (using pip), but I'm having trouble opening it. I am opening it by typing: ``` jupyter notebook ``` i...
- Modified
- 26 Apr at 11:35
Deserialize CSV with CustomHeaders using ServiceStack.Text
I'm trying to use ServiceStack.Text for deserializing a csv file containing custom headers. ``` var csv = "Col-1,Col-2" + Environment.NewLine + "Val1,Val2" + Environment.NewLine + "Val3,Val3" + Envir...
- Modified
- 28 Apr at 06:24
How can you store lists of objects in SQLite.net?
Let us assume I have these two objects ``` class Customer { [PrimaryKey] public string id; [??????] public List<int> addresses; } ``` and ``` class Address { [PrimaryKey, AutoIncr...
- Modified
- 25 Apr at 21:17