[email protected]
+48 507 063 286
Poland, Warsaw (Mokotów/Sadyba)
CV
- StackOverflow: profile (almost 8K), StackExchange
[email protected]
+48 507 063 286
Poland, Warsaw (Mokotów/Sadyba)
CV
public class CommonUtils { | |
private static NetworkInfo getNetworkInfo(Context context) { | |
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); | |
return cm.getActiveNetWorkInfo(); | |
} | |
// 是否存在网络 | |
public static boolean isNetworkAvailable(Context context) { | |
NetworkInfo info = getNetworkInfo(context); |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Main documentation index by microsoft.
var user = { | |
validateCredentials: function (username, password) { | |
return ( | |
(!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' } | |
: (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' } | |
: (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' } | |
: (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' } | |
: (!/^([a-z0-9_-]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' } | |
: false | |
); |
This guide is has moved to https://epicserve-docs.readthedocs.org/en/latest/django/ubuntu-server-django-guide.html.