Skip to content

Instantly share code, notes, and snippets.

View ozcankrks's full-sized avatar
🏠
Working from home

özcan karakuş ozcankrks

🏠
Working from home
View GitHub Profile
$result = mysql_query("SELECT * FROM persons");
$json = array();
$total_records = mysql_num_rows($result);
if($total_records > 0){
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){
$json[] = $row;
}
}
$mostReverse = array_reverse($most);
foreach($mostReverse as $key => $data1){
?>
<a href="watch/<?php echo seo($data1['KTName']). '/' .$data1['KTId']?>"><div class="card-movie"><
img src="<?php echo $data1['KTImage'] ?>" data-toggle="tooltip" data-placement="bottom" title="<?php echo $data1['KTName'] ?>" style="width: 100%" height="220" alt="movimg" />
</div></a>
$ref = "Kitaplar/";
$most = $database->getReference($ref)->orderByChild('BookView')->limitToLast(13)->getSnapshot()->getValue();
$data = $database->getReference($ref)->getSnapshot()->getValue();
require __DIR__.'/vendor/autoload.php';
use KreaitFirebaseFactory;
use KreaitFirebaseServiceAccount;
// This assumes that you have placed the Firebase credentials in the same directory
// as this PHP file.
$serviceAccount = ServiceAccount::fromJsonFile (__DIR__.'/FİREBASE_JSON_DOSYANIZ');
$firebase = (new Factory)
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.squareup.okhttp:okhttp:2.7.2'
public String GetJsonData(String _url) throws IOException
{
StringBuilder sb = new StringBuilder();
URL uri = new URL(_url); // Veri urlniz
HttpURLConnection urlConnection = (HttpURLConnection) uri.openConnection();
try {
InputStream in = new BufferedInputStream(urlConnection.getInputStream());
BufferedReader bin = new BufferedReader(new InputStreamReader(in));
String inputLine;
public class CardModal {
@SerializedName("associatedCards")
@Expose
private List<Object> associatedCards = null;
@SerializedName("associatedCardRefs")
@Expose
private List<String> associatedCardRefs = null;
@SerializedName("assets")
@Expose
try
{
// + Json verisi çekiliyor.
jsonData = GetJsonData(url);
// -
// + Gelen veri liste şeklinde olacağı için
// Modelimizin Liste tipinde olacağını belirtiyoruz.
Type postModelListType = new TypeToken<List<CardModal>>(){}.getType();
// -
[
{
"associatedCards": [],
"associatedCardRefs": [],
"assets": [
{
"gameAbsolutePath": "http://dd.b.pvp.net/1_0_0/set1/en_us/img/cards/01IO012T2.png",
"fullAbsolutePath": "http://dd.b.pvp.net/1_0_0/set1/en_us/img/cards/01IO012T2-full.png"
}
],
<com.luseen.spacenavigation.SpaceNavigationView
android:id="@+id/space"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom"/>