What does the function then() mean in JavaScript?
I’ve been seeing code that looks like: ``` myObj.doSome("task").then(function(env) { // logic }); ``` Where does `then()` come from?
- Modified
- 22 Apr at 05:27
Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from/to central (http://repo1.maven.org/maven2)
I have created a new maven project in SpringSource Tool Suite. I am getting this error in my new maven project. > Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from ...
ORA-30926: unable to get a stable set of rows in the source tables
I am getting > ORA-30926: unable to get a stable set of rows in the source tables in the following query: ``` MERGE INTO table_1 a USING (SELECT a.ROWID row_id, 'Y' FROM...
Left Join With Where Clause
I need to retrieve all default settings from the settings table but also grab the character setting if exists for x character. But this query is only retrieving those settings where character is = 1...
- Modified
- 20 Jan at 20:59
Make header and footer files to be included in multiple html pages
I want to create common header and footer pages that are included on several html pages. I'd like to use javascript. Is there a way to do this using only html and JavaScript? I want to load a heade...
- Modified
- 3 Jul at 16:53
Difference between DTO, VO, POJO, JavaBeans?
Have seen some similar questions: - [What is the difference between a JavaBean and a POJO?](https://stackoverflow.com/questions/1394265/what-is-the-difference-between-a-javabean-and-a-pojo)- [What is...
- Modified
- 23 May at 11:47
SSL and cert keystore
How does my Java program know where my keystore containing the certificate is? Or alternatively: How do I tell my Java program where to look for the keystore? After specifying the keystore in some way...
Deleting a file in VBA
Using VBA, how can I: 1. test whether a file exists, and if so, 2. delete it?
- Modified
- 28 Dec at 08:7
How to split one string into multiple strings separated by at least one space in bash shell?
I have a string containing many words with at least one space between each two. How can I split the string into individual words so I can loop through them? The string is passed as an argument. E.g. ...
Read file line by line in PowerShell
I want to read a file line by line in PowerShell. Specifically, I want to loop through the file, store each line in a variable in the loop, and do some processing on the line. I know the Bash equival...
- Modified
- 19 Sep at 20:4
Get total of Pandas column
I have a Pandas data frame, as shown below, with multiple columns and would like to get the total of column, `MyColumn`. `print df` ``` X MyColumn Y Z 0 A ...
jQuery: checking if the value of a field is null (empty)
Is this a good way to check if the value of a field is `null`? ``` if($('#person_data[document_type]').value() != 'NULL'){} ``` Or is there a better way?
- Modified
- 23 Apr at 09:24
If two cells match, return value from third
Here's a simple explanation of what I'm having trouble with. Column A: List of 2300 order numbers Column B: Email Address associated with an order number Column C: List of 100 specific order numbers ...
- Modified
- 17 Feb at 01:13
Java: convert List<String> to a join()d String
JavaScript has `Array.join()` ``` js>["Bill","Bob","Steve"].join(" and ") Bill and Bob and Steve ``` Does Java have anything like this? I know I can cobble something up myself with `StringBuilder`: `...
Python dictionary replace values
I have a dictionary with 20 000 plus entries with at the moment simply the unique word and the number of times the word was used in the source text (Dante's Divine Comedy in Italian). I would like to...
- Modified
- 4 Nov at 17:38
Most efficient way to remove special characters from string
I want to remove all special characters from a string. Allowed characters are A-Z (uppercase or lowercase), numbers (0-9), underscore (_), or the dot sign (.). I have the following, it works but I su...
- Modified
- 2 Dec at 12:33
What killed my process and why?
My application runs as a background process on Linux. It is currently started at the command line in a Terminal window. Recently a user was executing the application for a while and it died mysteriou...
How to verify that a specific method was not called using Mockito?
How to verify that a method is called on an object's dependency? For example: ``` public interface Dependency { void someMethod(); } public class Foo { public bar(final Dependency d) { ...
- Modified
- 27 Oct at 16:16
How to get the body's content of an iframe in Javascript?
``` <iframe id="id_description_iframe" class="rte-zone" height="200" frameborder="0" title="description"> <html> <head></head> <body class="frameBody"> test<br/> </body> </html> ...
- Modified
- 16 Nov at 08:37
How do I get the current absolute URL in Ruby on Rails?
How can I get the current URL in my Ruby on Rails view? The `request.request_uri` only returns the URL.
- Modified
- 29 Mar at 19:33
TypeError: $.ajax(...) is not a function?
I'm attempting to create an AJAX request. Here's my function definition: ``` function AJAXrequest(url, postedData, callback) { $.ajax({ type: 'POST', url: url, data: posted...
Logical operators ("and", "or") in DOS batch
How would you implement logical operators in DOS Batch files?
- Modified
- 26 Jun at 17:25
How to trigger the window resize event in JavaScript?
I have registered a trigger on window resize. I want to know how I can trigger the event to be called. For example, when hide a div, I want my trigger function to be called. I found `window.resizeTo(...
- Modified
- 23 Feb at 05:36
MySQL Cannot Add Foreign Key Constraint
So I'm trying to add Foreign Key constraints to my database as a project requirement and it worked the first time or two on different tables, but I have two tables on which I get an error when trying ...
- Modified
- 20 Mar at 21:55
How to request a random row in SQL?
How can I request a random row (or as close to truly random as is possible) in pure SQL?