π±
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 endOfSheet(Optional targetSheet As Worksheet) As Long | |
'' returns the (actual) last row of the current sheet | |
' this is far better than using '65536' or whatever the current row size might be, | |
' especially since .xlsx has 2^20 (1048576), not 2^16. | |
If targetSheet Is Nothing Then | |
Set targetSheet = ActiveWorkbook.ActiveSheet | |
End If | |
endOfSheet = targetSheet.Rows.Count | |
End Function |
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
package exchangeRateApp; | |
import java.io.InputStream; | |
import java.math.BigDecimal; | |
import java.net.URL; | |
import java.util.ArrayList; | |
import java.util.List; | |
import javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction; | |
import javax.xml.parsers.DocumentBuilder; |
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
'source: http://techniclee.wordpress.com/2010/07/21/isletter-function-for-vba/ | |
Function IsLetter(strValue As String) As Boolean | |
Dim intPos As Integer | |
For intPos = 1 To Len(strValue) | |
Select Case Asc(Mid(strValue, intPos, 1)) | |
Case 65 To 90, 97 To 122 | |
IsLetter = True | |
Case Else | |
IsLetter = False | |
Exit For |
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
'+-------------------------------------+ | |
'| @author: Martin Pfundmair | | |
'| @version: 1.0 | | |
'| @date: 2014-05-31 | | |
'| | | |
'| $cript: | | |
'| creates shortcuts in ShortcutFolder | | |
'| for all Application files (*.exe) | | |
'| in all level-1 subfolders of the | | |
'| specified target folders | |
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
{"lastUpload":"2021-10-30T05:17:01.742Z","extensionVersion":"v3.4.3"} |
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
protocol SignInService { | |
func signIn(_ completion: @escaping (_ id: String?) -> Void) | |
func signOut() | |
} |
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
class SomeSignInService: SignInService { | |
init() { | |
// do whatever the provider needs to be set up | |
} | |
func signIn(_ completion: @escaping (String?) -> Void) { | |
// call the sign in service and receive a token | |
completion(token) | |
} |
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
class Authenticator { | |
let userDataService = UserDataService() | |
func auth(using signInService: SignInService, | |
_ completion: @escaping (_ user: User?) -> Void) { | |
signInService.signIn { token in | |
userDataService.load(forToken: token) { user in | |
completion(user) // note: error handling omitted for brevity |
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
// Starts the sign-in process. The delegate will be called at the end of this process. | |
// (...) | |
- (void)signIn; | |
// The sign-in flow has finished and was successful if |error| is |nil|. | |
- (void)signIn:(GIDSignIn *)signIn | |
didSignInForUser:(GIDGoogleUser *)user | |
withError:(NSError *)error; |
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
class GoogleSignInService: NSObject, SignInService, GIDSignInDelegate, GIDSignInUIDelegate { | |
// intermediary closure to be called when sign-in finishes | |
var signedIn: ((String) -> Void)? | |
func setup() { /* (...) */ } | |
func signIn(_ completion: @escaping (String) -> Void) { | |
// hand own completion block to intermediary closure |
OlderNewer