Skip to content

Instantly share code, notes, and snippets.

View pprathameshmore's full-sized avatar
🎯
Focusing

Prathamesh More pprathameshmore

🎯
Focusing
View GitHub Profile
@pprathameshmore
pprathameshmore / DoublePointer.cpp
Created January 22, 2019 03:05
Data Structure using C++
#include <iostream>
using namespace std;
int main(int argc, char const *argv[]) {
int a = 10;
int b = 20;
int c = 30;
//Pointer to variable
//int *newPtr;
#include <stdio.h>
#include <math.h>
#define rate 5
struct User {
char name[20];
int account_no;
float loanAmount;
float installments;
} user;
package com.prathameshmore.retrofit_android;
import com.google.gson.annotations.SerializedName;
public class Post {
private int userID;
private int id;
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.prathameshmore.retrofit_android">
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
package com.prathameshmore.retrofit_android;
import com.google.gson.annotations.SerializedName;
public class Post {
private int userID;
private int id;
package com.prathameshmore.retrofit_android;
import java.util.List;
import retrofit2.Call;
import retrofit2.http.GET;
public interface JsonPlaceHolderApi {
@GET("posts")
package com.prathameshmore.retrofit_android;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import java.util.List;
import retrofit2.Call;
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp"
tools:context=".MainActivity">
<androidx.core.widget.NestedScrollView
package com.prathameshmore.retrofit_android;
import java.util.List;
import retrofit2.Call;
import retrofit2.http.GET;
public interface JsonPlaceHolderApi {
@GET("posts/1")