Questions

Catch an exception thrown by an async void method

Using the async CTP from Microsoft for .NET, is it possible to catch an exception thrown by an async method in the calling method? ``` public async void Foo() { var x = await DoSomethingAsync(); ...

Web server failed to start. Port 8080 was already in use. Spring Boot microservice

I am trying to call webAPI from gradle project. My build.gradle is as following. ``` plugins { id 'org.springframework.boot' version '2.1.4.RELEASE' id 'java' } apply plugin: 'io.spring.depen...

12 Oct at 04:9

Android: View.setID(int id) programmatically - how to avoid ID conflicts?

I'm adding TextViews programmatically in a for-loop and add them to an ArrayList. How do I use `TextView.setId(int id)`? What Integer ID do I come up with so it doesn't conflict with other IDs?

24 Apr at 14:36

What is the difference between aggregation, composition and dependency?

What is the difference between aggregation, composition and dependency?

3 Nov at 01:49

How do I include a JavaScript script file in Angular and call a function from that script?

I have a JavaScript file called `abc.js` that has a 'public' function called `xyz()`. I want to call that function in my Angular project. How do I do that?

9 Aug at 17:47

How can I simulate an anchor click via jquery?

I have a problem with faking an anchor click via jQuery: Why does my thickbox appear the first time I click on the input button, but not the second or third time? Here is my code: ``` <input onclick...

16 Jul at 10:11

Download multiple files with a single action

I am not sure if this is possible using standard web technologies. I want the user to be able to download multiple files in a single action. That is click check boxes next to the files, and then get ...

26 Feb at 04:9

Generating statistics from Git repository

I'm looking for some good tools/scripts that allow me to generate a few statistics from a git repository. I've seen this feature on some code hosting sites, and they contained information like... - -...

29 May at 14:23

How do you make a div follow as you scroll?

I have a div on the left hand side which includes the business hours and weather. I would like that div to scroll down and up according to how the user scrolls. So it would follow and move up and down...

9 Jul at 16:45

IEnumerable<object> a = new IEnumerable<object>(); Can I do this?

I want to create a new instance of an object `IEnumerable<object>` Can I do this? ``` IEnumerable<object> a = new IEnumerable<object>(); ```

15 Jan at 13:14

Current date and time as string

I wrote a function to get a current date and time in format: `DD-MM-YYYY HH:MM:SS`. It works but let's say, its pretty ugly. How can I do but simpler? ``` string currentDateToString() { time_t n...

3 May at 11:54

SQL Server: What is the difference between CROSS JOIN and FULL OUTER JOIN?

What is the difference between CROSS JOIN and FULL OUTER JOIN in SQL Server? Are they the same, or not? Please explain. When would one use either of these?

INNER JOIN vs INNER JOIN (SELECT . FROM)

Is there any difference in terms of performance between these two versions of the same query? ``` --Version 1 SELECT p.Name, s.OrderQty FROM Product p INNER JOIN SalesOrderDetail s on p.ProductID = s...

20 Jul at 07:3

Codeigniter: does $this->db->last_query(); execute a query?

Does query execution happen at the `get_where()` clause of the following codeigniter active record statement? ``` $this->db->select('*'); $q = $this->db->get_where('Contacts', array('id' => $cont...

What's the difference between "Write-Host", "Write-Output", or "[console]::WriteLine"?

There are a number of different ways to output messages. What is the effective difference between outputting something via `Write-Host`, `Write-Output`, or `[console]::WriteLine`? I also notice that...

5 Mar at 09:46

What programming languages can one use to develop iPhone, iPod Touch and iPad (iOS) applications?

What programming languages can one use to develop iPhone, iPod Touch and iPad (iOS) applications? Also are there plans in the future to expand the amount of programming languages that iOS will suppor...

25 Aug at 12:37

Are the shift operators (<<, >>) arithmetic or logical in C?

In C, are the shift operators (`<<`, `>>`) arithmetic or logical?

C# how to use enum with switch

I can't figure out how to use switches in combination with an enum. Could you please tell me what I'm doing wrong, and how to fix it? I have to use an enum to make a basic calculator. ``` public enu...

How to build query string with Javascript

Just wondering if there is anything built-in to Javascript that can take a Form and return the query parameters, eg: `"var1=value&var2=value2&arr[]=foo&arr[]=bar..."` I've been wondering this for yea...

13 May at 15:54

How to save a list as numpy array in python?

Is possible to construct a NumPy array from a python list?

4 Sep at 07:28

How to use a class from one C# project with another C# project

In the same solution, I have two projects: P1 and P2. How can I make use of a class of P1 in P2?

23 Sep at 16:1

Using Selenium WebDriver to retrieve the value of an HTML input

In the HTML of a web application there is the following code: ``` <input type="text" name="prettyTime" id="prettyTime" class="ui-state-disabled prettyTime" readonly="readonly"> ``` A string displayi...

29 Mar at 00:6

Unzip All Files In A Directory

I have a directory of ZIP files (created on a Windows machine). I can manually unzip them using `unzip filename`, but how can I unzip all the ZIP files in the current folder via the shell? Using Ubun...

22 Dec at 17:30

Viewing full output of PS command

when I run `ps -aux` command on my linux server, to which I connected using putty, few processes are too long to fit in my current window width. Is there an alternative? -- Update -- I am sorry for ...

31 Mar at 21:36

How do I update the element at a certain position in an ArrayList?

I have one `ArrayList` of 10 `String`s. How do I update the index `5` with another `String` value?

19 Oct at 15:44