This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Given a positive integer, output a truthy/falsy value as to whether the number can eat itself. | |
* | |
* Rules: | |
* Leftmost is the head, rightmost is the tail | |
* If the head is greater than or equal to the tail, the head eats the tail and the new head becomes their sum. | |
* If sum >= 10 then the head is replaced by sum % 10 sum=0 cannot be ignored, input number will never have any zeroes to the left. | |
* | |
* Test Cases: | |
* True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is a dark theme for slack. | |
* Scroll down to line 92 to edit the theme's main colors. | |
* This file needs to be placed at | |
* "slack\app-3.2.0\resources\app.asar.unpacked\src\static\ssb-interop.js" | |
* in order for Slack to load it. | |
*/ | |
/** | |
* The preload script needs to stay in regular ole JavaScript, because it is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ExampleFragment : Fragment() { | |
// this is the instance of our parent activity's interface that we define here | |
private var mListener: OnFragmentInteractionListener? = null | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
} | |
fun onButtonPressed(uri: Uri) { | |
if (mListener != null) { | |
mListener!!.onFragmentInteraction(uri) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Field; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
/** | |
* Creates a domain object from a matching form object. | |
* Spring parses JSON response into a form, where the | |
* data from the form can first be validated. Then, the |