Questions

How to SELECT a dropdown list item by value programmatically

How to SELECT a drop down list item by value programatically in C#.NET?

4 Apr at 12:7

JS map return object

I got this array, ``` const rockets = [ { country:'Russia', launches:32 }, { country:'US', launches:23 }, { country:'China', launches:16 }, { country:'Europe(ESA)', launches:7 }, {...

15 Nov at 16:40

Loaded nib but the 'view' outlet was not set

I added a new nib file to my project, and tried to load it. However, when I click on the toolbar icon that is supposed to take me to the view that I created, I get an `NSInternalInconsistencyExceptio...

30 Jul at 13:32

How to solve SQL Server Error 1222 i.e Unlock a SQL Server table

I am working in a database where I load data in a raw table by a data loader. But today the data loader got stuck for unknown reasons. Then I stopped the data loader from windows task manager. But the...

Get week of year in JavaScript like in PHP

How do I get the current weeknumber of the year, like PHP's `date('W')`? It should be the [ISO-8601](http://en.wikipedia.org/wiki/ISO_8601) week number of year, weeks starting on Monday.

4 Jun at 07:8

How to call a function after delay in Kotlin?

As the title, is there any way to call a function after delay (1 second for example) in `Kotlin`?

11 Apr at 14:33

OWIN Startup Class Missing

I'm getting this error as my project is not able to find the reference for `OWIN` startup class. I've even installed all the OWIN reference packages through Nuget still getting the same issue. I'm usi...

Exercises to improve my Java programming skills

I have learned basics of Java but want to practice more. I was looking via Google and couldn't find many beginner level problems that I can solve using Java. Any suggestions?

15 Aug at 14:48

Java check if boolean is null

How do you check if a boolean is null or not? So if I know "hideInNav" is null. How do I stop it from further executing? Something like the below doesn't seem to work but why? ``` boolean hideInNav...

1 Mar at 10:6

AWS CloudFront: Font from origin has been blocked from loading by Cross-Origin Resource Sharing policy

I'm receiving the following error on a couple of Chrome browsers but not all. Not sure entirely what the issue is at this point. > Font from origin `https://ABCDEFG.cloudfront.net` has been blocked fr...

Maven dependency for Servlet 3.0 API?

How can I tell Maven 2 to load the Servlet 3.0 API? I tried: ``` <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>3.0</version> <scope>prov...

26 Sep at 13:24

What are the differences between Abstract Factory and Factory design patterns?

I know there are many posts out there about the differences between these two patterns, but there are a few things that I cannot find. From what I have been reading, I see that the factory method pat...

ImportError: No module named 'Queue'

I am trying to import `requests` module, but I got this error my python version is 3.4 running on ubuntu 14.04 ``` >>> import requests Traceback (most recent call last): File "/usr/local/lib/python...

30 Oct at 09:17

Add 2 hours to current time in MySQL?

Which is the valid syntax of this query in MySQL? ``` SELECT * FROM courses WHERE (now() + 2 hours) > start_time ```

26 Feb at 09:34

How to remove files that are listed in the .gitignore but still on the repository?

I have some files in my repository that should be ignored, i added them to the .gitignore but, of course, they are not removed from my repository. So my question is, is there a magic command or scrip...

11 Mar at 17:37

Command CompileSwift failed with a nonzero exit code in Xcode 10

After updating to the latest version of Xcode at the moment (version 10.0) the project is unable to build because it found some errors regarding some "Command CompileSwift failed with a nonzero exit c...

17 Jun at 08:54

Obtain smallest value from array in Javascript?

Array justPrices has values such as: ``` [0] = 1.5 [1] = 4.5 [2] = 9.9. ``` How do I return the smallest value in the array?

19 Jan at 23:51

In .NET, which loop runs faster, 'for' or 'foreach'?

In C#/VB.NET/.NET, which loop runs faster, `for` or `foreach`? Ever since I read that a `for` loop works faster than a `foreach` loop a [long time ago](https://learn.microsoft.com/previous-versions/d...

22 Feb at 00:1

Convert a string to a datetime

I am developing `asp.net` site using `vb` . Im having difficulties converting string data into Date I tried using cdate function, I have a variable sdate which is a string variable and date is stor...

18 Oct at 04:45

Add PHP variable inside echo statement as href link address?

I'm trying to use a PHP variable to add a href value for a link in an echo statement. Here's a simplified version of the code I want to use. I know that I can't just add the variable into the echo sta...

20 Apr at 18:16

Getting multiple values with scanf()

I am using scanf() to get a set of ints from the user. But I would like the user to supply all 4 ints at once instead of 4 different promps. I know I can get one value by doing: ``` scanf( "%i", &min...

11 Sep at 18:19

Proper use of 'yield return'

The [yield](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/yield) keyword is one of those [keywords](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/key...

24 Oct at 19:2

Creating Accordion Table with Bootstrap

I have a table that's populated from a database which has lots of columns (around 30). A solution someone thought of was to create an accordion out the table, where each row is clickable and will acco...

Response.Redirect with POST instead of Get?

We have the requirement to take a form submission and save some data, then redirect the user to a page offsite, but in redirecting, we need to "submit" a form with POST, not GET. I was hoping there w...

9 Sep at 21:13

Select multiple columns using Entity Framework

Maybe an easy question, but can't find it easily so forgive me =) I try to select multiple columns. The statement I use is: ``` var dataset2 = from recordset in entities.processlists ...

2 Sep at 02:17