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
| val start = System.currentTimeMillis() | |
| // do something... | |
| Log.d("LogTag", "A: ${System.currentTimeMillis() - start}ms") |
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
| Imports System.Runtime.CompilerServices | |
| Module StringExtension | |
| <Extension()> | |
| Public Function Quote(original As String, Optional str As String = ControlChars.Quote) As String | |
| Return str & original & str | |
| End Function | |
| End Module |
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
| nuget pack Foo.xxproj -Prop Configuration=Release |
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
| def output_by_query(self, query, filename): | |
| with self.connection as conn: | |
| for chunk1 in pandas.read_sql(query, conn, chunksize=10000): | |
| chunk1.to_csv(filename, header=False, index=None,mode='a') |
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
| private fun checkPermission() { | |
| if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { | |
| ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.ACCESS_COARSE_LOCATION), 9999) | |
| } | |
| } | |
| override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) { | |
| if (requestCode != 9999) { | |
| super.onRequestPermissionsResult(requestCode, permissions, grantResults) | |
| return |