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
using System; | |
using System.Data; | |
using System.Collections.Generic; | |
public class TableSchema { | |
private Dictionary<string, TableSchemaColumn> columns; | |
public TableSchema(DataTable dataTable) { | |
this.columns = new Dictionary<string, TableSchemaColumn>(); |
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
@set DRIVE=%1 | |
@manage-bde -status %DRIVE% | find "Lock Status:" | find "Locked" > nul2 | |
@if "%ERRORLEVEL%"=="0" ( | |
@manage-bde -unlock -pw %DRIVE% | |
) else ( | |
@manage-bde -lock -ForceDismount %DRIVE% | |
) | |
@manage-bde -status %DRIVE% | find "Lock Status:" | find "Unlocked" > nul2 |
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 'package:bloc/bloc.dart'; | |
import 'package:connectivity/connectivity.dart'; | |
part 'connectivity_state.dart'; | |
class ConnectivityCubit extends Cubit<ConnectivityState> { | |
ConnectivityCubit() : super(const ConnectivityInitial()) { | |
final connectivity = Connectivity(); | |
connectivity.checkConnectivity().then(_onConnectivityChanged); | |
connectivity.onConnectivityChanged.listen(_onConnectivityChanged); |
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
final httpClient = Dio()..options.baseUrl = 'https://example.com'; | |
try { | |
var response = await httpClient.post( | |
'/auth/signup', | |
data: values, | |
); | |
if (response.data == null) { | |
throw const EmptyResponseException(); // Manually throw the exception |