See what the Stackoverflow community is most excited about today.
Date: 2018-01-20
-
Can (a ==1 && a== 2 && a==3) ever evaluate to true?
tags: javascript, ecmascript-6
1476 votes, 29 answers and 243869 views
\r\n Is it ever possible that (a ==1 && a== 2 && a==3) could evaluate to true, in JavaScript?\n\nThis is interview question asked by a major tech company. My answer was that it's impossible. ...\r\n
-
How do I delete (unset) an exported environment variable?
tags: linux, environment-variables, unset
967 votes, 3 answers and 547486 views
\r\n Before installing gnuplot I set the environment variable GNUPLOT_DRIVER_DIR = /home/gnuplot/build/src.\n\nDuring the installation something went wrong; now I want to remove the GNUPLOT_DRIVER_DIR ...\r\n
-
Extract value of attribute node via XPath
tags: xml, xpath
186 votes, 6 answers and 290319 views
\r\n How can I extract the value of an attribute node via XPath?\n\nA sample XML file is:\n\n\n \n \n &...\r\n
-
How to submit form on change of dropdown list?
tags: html, jsp
194 votes, 4 answers and 420308 views
\r\n I am creating a page in JSP where I have a dropdown list and once the user selects a value he has to click on the go button and then the value is sent to the Servlet.\n\n \n ...\r\n
-
How can I conditionally require form inputs with AngularJS?
tags: forms, validation, angularjs
205 votes, 4 answers and 123122 views
\r\n Suppose we're building an address book application (contrived example) with AngularJS.\n\nWe have a form for contacts that has inputs for email and phone number, and we want to require one or the other, ...\r\n
-
Schema for a multilanguage database
tags: database-design, localization, multilingual
186 votes, 10 answers and 73627 views
\r\n I'm developing a multilanguage software. As far as the application code goes, localizability is not an issue. We can use language specific resources and have all kinds of tools that work well with ...\r\n
-
Spring: @Component versus @Bean
tags: java, spring, annotations, autowired
188 votes, 5 answers and 90575 views
\r\n I understand that @Component annotation was introduced in spring 2.5 in order to get rid of xml bean definition by using classpath scanning.\n\n@Bean was introduced in spring 3.0 and can be used with @...\r\n
-
What does the C ??!??! operator do?
tags: c, operators, trigraphs
1486 votes, 5 answers and 203647 views
\r\n I saw a line of C that looked like this:\n\n!ErrorHasOccured() ??!??! HandleError();\r\nIt compiled correctly and seems to run ok. It seems like it's checking if an error has occurred, and if it has, it ...\r\n
-
HttpClient.GetAsync(…) never returns when using await/async
tags: c#, .net, asynchronous, async-await, dotnet-httpclient
236 votes, 5 answers and 120555 views
\r\n Edit: This question looks like it might be the same problem, but has no responses...\n\nEdit: In test case 5 the task appears to be stuck in WaitingForActivation state.\n\nI've encountered some odd ...\r\n
-
Getting Http Status code number (200, 301, 404, etc.) from HttpWebRequest and HttpWebResponse
tags: c#, .net, http, httpwebrequest
218 votes, 5 answers and 187448 views
\r\n I am trying to get the HTTP status code number from the HttpWebResponse object returned from a HttpWebRequest. I was hoping to get the actual numbers (200, 301,302, 404, etc.) rather than the text ...\r\n