This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="tr.edu.gyte.android.cellinfogsm" | |
| android:versionCode="1" | |
| android:versionName="1.0" > | |
| <uses-sdk | |
| android:minSdkVersion="18" | |
| android:targetSdkVersion="18" /> |
This file contains hidden or 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 class DatePickerFragment extends DialogFragment | |
| implements DatePickerDialog.OnDateSetListener { | |
| @Override | |
| public Dialog onCreateDialog(Bundle savedInstanceState) { | |
| // Use the current date as the default date in the picker | |
| final Calendar c = Calendar.getInstance(); | |
| final int year = c.get(Calendar.YEAR); | |
| final int month = c.get(Calendar.MONTH); | |
| final int day = c.get(Calendar.DAY_OF_MONTH); |
This file contains hidden or 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
| <?php | |
| class ModelName extends Eloquent { | |
| // Ref: http://stackoverflow.com/a/23750526 | |
| // Assuming Point is entered as text. Eg: 41,29 | |
| public function setLocationAttribute($value) { | |
| $loc = explode(',',$value); | |
| $this->attributes['location'] = DB::raw("ST_GeomFromText('POINT(".$loc[0]." ".$loc[1].")', 4326)"); | |
| } |
This file contains hidden or 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
| <?php | |
| /** | |
| * PointValidator class for Yii. | |
| * Author: Furkan Tektas github.com/furkantektas | |
| * Date: 2014/09/05 | |
| * Version: v1.0 | |
| */ | |
| class PointValidator extends CValidator | |
| { |
This file contains hidden or 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
| <?php | |
| require_once('SpatialGeoJSONValidator.php'); | |
| /** | |
| * PointValidator class for Yii. | |
| * Author: Furkan Tektas github.com/furkantektas | |
| * Date: 2014/09/12 | |
| * Version: v1.0 | |
| * Sample GeoJSON: {"type":"Point","coordinates":[41.00603847483829,29.009458422660828],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}} | |
| */ | |
| class PointValidator extends SpatialGeoJSONValidator { |
This file contains hidden or 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
| package com.furkantektas.braingames.ui; | |
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.support.v7.widget.CardView; | |
| import android.util.AttributeSet; | |
| import com.furkantektas.braingames.R; | |
| /** |
This file contains hidden or 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
| package com.furkantektas.braingames.ui; | |
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.os.CountDownTimer; | |
| import android.util.AttributeSet; | |
| import android.widget.TextView; | |
| import java.text.SimpleDateFormat; | |
| import java.util.Date; |
This file contains hidden or 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
| # Reference : http://stackoverflow.com/a/7227944/1360267 | |
| SELECT | |
| t1.*, | |
| count(DISTINCT r2.relation2) as relevance | |
| FROM pivot_table r1 | |
| INNER JOIN pivot_table r2 ON (r1.relation2 = r2.relation2 | |
| AND r1.relation1 <> r2.relation1) | |
| INNER JOIN table1 t1 ON (r2.relation1 = t1.id) | |
| WHERE r1.relation1 = '14' -- this is the id results should be related to. | |
| GROUP BY t1.id |
This file contains hidden or 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
| #!/bin/sh | |
| # This script creates a seperate training and test datasets | |
| # using data*.log file. wsize is the window size, i.e. how | |
| # many lines will be gathered from each data*.log file. | |
| # This script creates 20 seperate test & training files | |
| wsize=100 | |
| filelen=9999 | |
| for i in $(find . -name 'data*.log'); do | |
| templen=$(wc -l < $i) |
This file contains hidden or 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
| #!/bin/sh | |
| # This script assumes that the working directory contains 20 training and test arff files | |
| # with prefix training- and test-, respectively. It trains a model using RotationForest (with | |
| # default parameters) and saves the statistical data to results-n.arff where n is the number of | |
| # trainig file. | |
| # Then it prints out the correctly classified instances information to all-results.txt | |
| for i in {1..20}; do |