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
/* | |
* The Alphanum Algorithm is an improved sorting algorithm for strings | |
* containing numbers. Instead of sorting numbers in ASCII order like | |
* a standard sort, this algorithm sorts numbers in numeric order. | |
* | |
* The Alphanum Algorithm is discussed at http://www.DaveKoelle.com | |
* | |
* | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public |
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
public DomainContext() : base(""){ | |
Configuration.LazyLoadingEnable = false; | |
Configuration.ProxyCreationEnable = false; | |
} |
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
public class AutoMapperConfig | |
{ | |
public static void RegisterMappings() | |
{ | |
Mapper.Initialize(c => | |
{ | |
c.AddProfile<DomainToViewModelMappingProfile>(); | |
c.AddProfile<ViewModelToDomainMappingProfile>(); | |
}); | |
} |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <ctype.h> | |
#include <string.h> | |
int main() | |
{ | |
void leitura(char *valor); | |
int varrerString(char valor); |
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
<com.android.volley.toolbox.NetworkImageView | |
android:id="@+id/networkImageView" | |
android:layout_width="150dp" | |
android:layout_height="170dp" | |
android:layout_centerHorizontal="true" /> |
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
// Request a string response from the provided URL. | |
StringRequest stringRequest = new StringRequest(Request.Method.GET, url, | |
new Response.Listener<String>() { | |
@Override | |
public void onResponse(String response) { | |
// Display the first 500 characters of the response string. | |
etUser.setText("Response is: "+ response.substring(0,500)); | |
} | |
}, new Response.ErrorListener() { | |
@Override |
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
String url ="http://ip.jsontest.com/"; | |
JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, | |
new Response.Listener<JSONObject>() { | |
@Override | |
public void onResponse(JSONObject response) { | |
etUser.setText("Response :" + response.toString()); | |
} | |
}, new Response.ErrorListener(){ | |
@Override |
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
public interface IRepositoryBase<TEntity> where TEntity : class | |
{ | |
TEntity Add(TEntity item); | |
TEntity GetById(int id); | |
IEnumerable<TEntity> Get(); | |
bool Update(TEntity item); | |
int Count(); | |
void Dispose(); | |
} |
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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' | |
} | |
} | |
repositories { |
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
public static boolean is(Context context) { | |
try { | |
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); | |
if (cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI).isConnected()) { | |
return true; | |
} else if(cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).isConnected()){ | |
return true; | |
} else { | |
return false; | |
} |
OlderNewer