Questions

Remove the last three characters from a string

I want to remove last three characters from a string: ``` string myString = "abcdxxx"; ``` Note that the string is dynamic data.

24 May at 13:36

How to get the code coverage report using Jest?

Is there a way to have code coverage in the JavaScript Jest testing framework, which is built on top of Jasmine? The internal framework [does not](https://github.com/facebook/jest/blob/db003d5dc76b966...

18 Mar at 18:55

Disable back button in android

How to disable back button in android while logging out the application?

24 Jul at 21:31

addEventListener, "change" and option selection

I'm trying to have dynamic select list populate itself, from a single selection to start: ``` <select id="activitySelector"> <option value="addNew">Add New Item</option> </select> ``` and the...

18 Oct at 16:45

What is the difference between JVM, JDK, JRE & OpenJDK?

What is the difference between , , & ? I was programming in Java and I encountered these phrases, what are the differences among them?

23 Mar at 08:54

SQL UPDATE all values in a field with appended string CONCAT not working

Here is what I want to do: current table: ``` +----+-------------+ | id | data | +----+-------------+ | 1 | max | | 2 | linda | | 3 | sam | | 4 | hen...

15 Aug at 20:44

Convert string to variable name in JavaScript

I’ve looked for solutions, but couldn’t find any that work. I have a variable called `onlyVideo`. `"onlyVideo"` the string gets passed into a function. I want to set the variable `onlyVideo` inside ...

1 Sep at 16:27

Redirect with CodeIgniter

Can anyone tell me why my redirect helper does not work the way I'd expect it to? I'm trying to redirect to the index method of my main controller, but it takes me `www.example.com/index/provider1/` w...

19 Dec at 21:13

Why is the console window closing immediately once displayed my output?

I'm studying C# by following the guides in . Now, I just tried the ([here](https://msdn.microsoft.com/en-US/office/aa288463(v=vs.90)) is the link to ), and I've encountered an issue: why is the co...

26 Jul at 00:44

grep for special characters in Unix

I have a log file (application.log) which might contain the following string of normal & special characters on multiple lines: ``` *^%Q&$*&^@$&*!^@$*&^&^*&^& ``` I want to search for the line numbe...

20 Oct at 05:9

How do I get the Git commit count?

I'd like to get the number of commits of my Git repository, a bit like SVN revision numbers. The goal is to use it as a unique, incrementing build number. I currently do like that, on Unix/Cygwin/ms...

12 Nov at 00:57

How do I clear all variables in the middle of a Python script?

I am looking for something similar to 'clear' in Matlab: A command/function which removes all variables from the workspace, releasing them from system memory. Is there such a thing in Python? EDIT: I...

3 Jul at 12:14

How to navigate to to different directories in the terminal (mac)?

I have just installed sass and I am now tryring to access the sass file. For example: ``` sass --watch ~/Desktop/sass/css/style.css:style.css ``` and the error is "no such file or directory" - So h...

8 Sep at 18:58

Use space as a delimiter with cut command

I want to use space as a delimiter with the `cut` command. What syntax can I use for this?

28 Oct at 18:10

How to show full column content in a Spark Dataframe?

I am using spark-csv to load data into a DataFrame. I want to do a simple query and display the content: ``` val df = sqlContext.read.format("com.databricks.spark.csv").option("header", "true").load(...

INNER JOIN vs LEFT JOIN performance in SQL Server

I've created SQL command that uses INNER JOIN on 9 tables, anyway this command takes a very long time (more than five minutes). So my folk suggested me to change INNER JOIN to LEFT JOIN because the pe...

14 Jul at 08:27

how to update spyder on anaconda

I have Anaconda installed (Python 2.7.11 |Anaconda custom (64-bit)| (default, Feb 16 2016, 09:58:36) [MSC v.1500 64 bit (AMD64)] on win32) and I am using Spyder 2.3.8 Would like to update Spyder to...

27 Nov at 22:41

What is the best way to do a substring in a batch file?

I want to get the name of the currently running batch file the file extension. Thanks to [this link](https://stackoverflow.com/questions/343518/finding-out-the-file-name-of-the-running-batch-file)...

22 Jan at 16:57

Send and receive messages through NSNotificationCenter in Objective-C?

I am attempting to send and receive messages through `NSNotificationCenter` in Objective-C. However, I haven't been able to find any examples on how to do this. How do you send and receive messages th...

How do you format code on save in VS Code

I would like to automatically format TypeScript code using the build-in formatter when I save a file in Visual Studio Code. I'm aware of the following options, but none of them is good enough: - `...

9 Apr at 11:26

How to move/rename a file using an Ansible task on a remote system

How is it possible to move/rename a file/directory using an Ansible module on a remote system? I don't want to use the command/shell tasks and I don't want to copy the file from the local system to th...

15 Jul at 16:44

How can I install Python's pip3 on my Mac?

I'm trying to install pip3, but I'm not having any luck. Also, I tried `sudo install` and it did not work. How could I install pip3 on my Mac? ``` sudo easy_install pip3 Password: Searching for pip3 R...

6 Dec at 07:9

How can I capture the result of var_dump to a string?

I'd like to capture the output of [var_dump](http://us3.php.net/manual/en/function.var-dump.php) to a string. The PHP documentation says; > As with anything that outputs its result directly to the b...

13 Jul at 21:20

MySQL Like multiple values

I have this MySQL query. I have database fields with this contents ``` sports,shopping,pool,pc,games shopping,pool,pc,games sports,pub,swimming, pool, pc, games ``` Why does this like query does...

19 Aug at 19:7

What does the error "JSX element type '...' does not have any construct or call signatures" mean?

I wrote some code: ``` function renderGreeting(Elem: React.Component<any, any>) { return <span>Hello, <Elem />!</span>; } ``` I'm getting an error: > JSX element type `Elem` does not have any ...

29 Mar at 07:20