This file contains hidden or 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
| module.exports = { | |
| moduleDirectories: ["node_modules", "src"], | |
| // Transforms tell jest how to process our non-javascript files. | |
| // Here we're using babel for .js and .jsx files, and ts-jest for | |
| // .ts and .tsx files. You *can* just use babel-jest for both, if | |
| // you already have babel set up to compile typescript files. | |
| transform: { | |
| // "^.+\\.jsx?$": "babel-jest", | |
| "^.+\\.tsx?$": "ts-jest" // or @swc-node/jest | |
| // If you're using babel for both: |
This file contains hidden or 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
| var path = require('path'); | |
| module.exports = { | |
| entry: './app/main.js', | |
| output: { | |
| path: __dirname, | |
| filename: 'bundle.js' | |
| }, | |
| devServer: { |
This file contains hidden or 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
| (mainView.subviews as [UIView]).map { $0.removeFromSuperview() } |
This file contains hidden or 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
| 'use strict'; | |
| angular.module('coolModule') | |
| .directive('goFormatSpecialCharacters', function(){ | |
| return { | |
| restrict: 'A', | |
| require: 'ngModel', | |
| link: function(scope, elem, attrs, ctrl) { | |
| var PATTERN = /\&#{0,1}[A-Za-z0-9]+;/ig; |
This file contains hidden or 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
| function link(scope, element, attr) { | |
| var isDragging = false; | |
| element.addClass('cursor-pointer'); | |
| element.on('mousedown', function(){ | |
| element.on('mousemove', function(){ | |
| isDragging = true; | |
| element.unbind('mousemove'); | |
| }); |
This file contains hidden or 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
| @Override | |
| public void onActivityCreated(Bundle savedInstanceState) { | |
| super.onActivityCreated(savedInstanceState); | |
| final View rootView = getActivity().getWindow().getDecorView().findViewById(android.R.id.content); | |
| rootView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { | |
| @Override | |
| public void onGlobalLayout() { | |
| int height = rootView.getRootView().getHeight() - rootView.getHeight(); | |
| if(height > 100) { | |
| loginScrollView.post(new Runnable() { |
This file contains hidden or 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
| protected void setupParent(View view) { | |
| //Set up touch listener for non-text box views to hide keyboard. | |
| if(!(view instanceof EditText)) { | |
| view.setOnTouchListener(new View.OnTouchListener() { | |
| public boolean onTouch(View v, MotionEvent event) { | |
| hideSoftKeyboard(); | |
| return false; | |
| } | |
| }); | |
| } |