What is working:
- Keyboard
- Backlight control
- Screenlight contro
- Volumne, Display on/off, Touchbad
- Seems like everything is working
- Trackpad is ok
- Wireless
using System.Threading.Tasks; | |
using Newtonsoft.Json; | |
using Refit; | |
using System.Net.Http; | |
using System; | |
namespace wms_xamarin | |
{ | |
public class LoginApi | |
{ |
Two months ago, I published an open source project, which went viral by gaining 1200+ stars in the first 24 hours. As of this writing, it has attracted 5000+ stars. The project is called HTTP Prompt:
https://github.com/eliangcs/http-prompt
Here I want to share its development story.
It all began with Vertica. Not long ago, I used Vertica every day for my work. Vertica is a powerful database, but the official client (vsql) is not powerful at all. The GUI alternative, DbVisualizer, is bad as well.
public static Action1<Throwable> crashOnError() { | |
final Throwable checkpoint = new Throwable(); | |
return throwable -> { | |
StackTraceElement[] stackTrace = checkpoint.getStackTrace(); | |
StackTraceElement element = stackTrace[1]; // First element after `crashOnError()` | |
String msg = String.format("onError() crash from subscribe() in %s.%s(%s:%s)", | |
element.getClassName(), | |
element.getMethodName(), | |
element.getFileName(), | |
element.getLineNumber()); |
Original solution sacrifices new api lint check.
Here my solution:
int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
import java.util.Arrays; | |
class NonCapturing { | |
public static void main(String... args) { | |
run(new Runnable() { | |
@Override public void run() { | |
System.out.println("Hey!"); | |
} | |
}); | |
} |
Spock + Espresso + Dagger2 + Runtime Permissions + RxJava | |
Test: | |
https://github.com/dbacinski/meteopl-unofficial/blob/master/app/src/androidTest/groovy/pl/dariuszbacinski/meteo/location/LocationSaveSpec.groovy#L25 | |
Test Stubs Setup: | |
https://github.com/dbacinski/meteopl-unofficial/blob/master/app/src/androidTest/groovy/pl/dariuszbacinski/meteo/location/LocationSetup.groovy#L38 | |
Stubbed Objects: | |
https://github.com/dbacinski/meteopl-unofficial/blob/master/app/src/main/java/pl/dariuszbacinski/meteo/location/model/CoarseLocation.java#L27 | |
Dagger2 local component provider: | |
https://github.com/dbacinski/meteopl-unofficial/blob/master/app/src/main/java/pl/dariuszbacinski/meteo/location/view/LocationFragment.java#L216 |
-- Please set your vpn connection name and password here | |
set VPNName to "VPN name" | |
set VPNpassword to "VPN password" | |
tell application "System Events" | |
tell current location of network preferences | |
set VPNService to service VPNName | |
end tell | |
set isConnected to connected of current configuration of VPNService |
public class SpringExceptionTranslationExecuteListener | |
extends DefaultExecuteListener { | |
/** {@inheritDoc} */ | |
@Override | |
public void exception(ExecuteContext ctx) { | |
SQLException e = ctx.sqlException(); | |
if (e != null) { | |
String name = ctx.configuration().dialect().thirdParty().springDbName(); |