text
stringlengths
0
14.1k
int count = 0;
while (enumerator.MoveNext())
{
count++;
}
Assert.Equal(2, count);
}
}
}" mit
dushantSW/ip-mobile 7.3.1/DeviceInternetInformation/app/src/main/java/se/dsv/waora/deviceinternetinformation/ConnectionActivity.java 2212 "package se.dsv.waora.deviceinternetinformation;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.widget.TextView;
/**
* <code>ConnectionActivity</code> presents UI for showing if the device
* is connected to internet.
*
* @author Dushant Singh
*/
public class ConnectionActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Initiate view
TextView connectivityStatus = (TextView) findViewById(R.id.textViewDeviceConnectivity);
// Get connectivity service.
ConnectivityManager manager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
// Get active network information
NetworkInfo activeNetwork = manager.getActiveNetworkInfo();
// Check if active network is connected.
boolean isConnected = activeNetwork != null && activeNetwork.isConnectedOrConnecting();
if (isConnected) {
// Set status connected
connectivityStatus.setText(getString(R.string.online));
connectivityStatus.setTextColor(getResources().getColor(R.color.color_on));
// Check if connected with wifi
boolean isWifiOn = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;
if (isWifiOn) {
// Set wifi status on
TextView wifiTextView = (TextView) findViewById(R.id.textViewWifi);
wifiTextView.setText(getString(R.string.on));
wifiTextView.setTextColor(getResources().getColor(R.color.color_on));
} else {
// Set mobile data status on.
TextView mobileDataTextView = (TextView) findViewById(R.id.textViewMobileData);
mobileDataTextView.setText(getString(R.string.on));
mobileDataTextView.setTextColor(getResources().getColor(R.color.color_on));
}
}
}
}
" mit
unfoldingWord-dev/uw-ios app/UnfoldingWord/UnfoldingWord/Constants.h 2540 "//
// Constants.h
//
//
#define LANGUAGES_API @""https://api.unfoldingword.org/obs/txt/1/obs-catalog.json""
#define SELECTION_BLUE_COLOR [UIColor colorWithRed:76.0/255.0 green:185.0/255.0 blue:224.0/255.0 alpha:1.0]
#define TEXT_COLOR_NORMAL [UIColor colorWithRed:32.0/255.0 green:27.0/255.0 blue:22.0/255.0 alpha:1.0]
#define BACKGROUND_GRAY [UIColor colorWithRed:42.0/255.0 green:34.0/255.0 blue:26.0/255.0 alpha:1.0]
#define BACKGROUND_GREEN [UIColor colorWithRed:170.0/255.0 green:208.0/255.0 blue:0.0/255.0 alpha:1.0]
#define TABBAR_COLOR_TRANSPARENT [UIColor colorWithRed:42.0/255.0 green:34.0/255.0 blue:26.0/255.0 alpha:0.7]
#define FONT_LIGHT [UIFont fontWithName:@""HelveticaNeue-Light"" size:17]
#define FONT_NORMAL [UIFont fontWithName:@""HelveticaNeue"" size:17]
#define FONT_MEDIUM [UIFont fontWithName:@""HelveticaNeue-Medium"" size:17]
#define LEVEL_1_DESC NSLocalizedString(@""Level 1: internal — Translator (or team) affirms that translation is in line with Statement of Faith and Translation Guidelines."", nil)
#define LEVEL_2_DESC NSLocalizedString(@""Level 2: external — Translation is independently checked and confirmed by at least two others not on the translation team."", nil)
#define LEVEL_3_DESC NSLocalizedString(@""Level 3: authenticated — Translation is checked and confirmed by leadership of at least one Church network with native speakers of the language."", nil)
#define LEVEL_1_IMAGE @""level1Cell""
#define LEVEL_2_IMAGE @""level2Cell""
#define LEVEL_3_IMAGE @""level3Cell""
#define LEVEL_1_REVERSE @""level1""
#define LEVEL_2_REVERSE @""level2""
#define LEVEL_3_REVERSE @""level3""
#define IMAGE_VERIFY_GOOD @""verifyGood""
#define IMAGE_VERIFY_FAIL @""verifyFail.png""
#define IMAGE_VERIFY_EXPIRE @""verifyExpired.png""