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
| @Root(name = "item") | |
| data class ItemData( | |
| //use var instead of val and set required = false | |
| @field:Element(name = "date_created", required = false) | |
| var dateCreated: String = "", | |
| @field:Element(name = "language", required = false) | |
| var language: String = "", | |
| @field:Element(name = "country", required = false) |
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
| import org.simpleframework.xml.Element | |
| import org.simpleframework.xml.ElementList | |
| import org.simpleframework.xml.Root | |
| @Root(name = "list") | |
| data class languageDto( | |
| @field:ElementList(entry = "item", inline = true) | |
| var items: List<ItemData> = mutableListOf() | |
| ) |
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
| <list> | |
| <item> | |
| <date_created>2023-09-10</date_created> | |
| <language>English</language> | |
| <country>United States</country> | |
| </item> | |
| <item> | |
| <date_created>2023-08-15</date_created> | |
| <language>Spanish</language> | |
| <country>Spain</country> |
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
| class MainActivity : AppCompatActivity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_main) | |
| checkPermission() | |
| displayPdfFiles(this) | |
| } | |
| fun displayPdfFiles(context: Context) { |
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.apphub.ea3.ui.features.earnCash | |
| import android.annotation.SuppressLint | |
| import android.os.Bundle | |
| import android.util.Log | |
| import androidx.fragment.app.Fragment | |
| import android.view.LayoutInflater | |
| import android.view.MotionEvent | |
| import android.view.View | |
| import android.view.View.OnTouchListener |
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
| private fun startSpinner() { | |
| isAnimationRunning = true | |
| mSpinRevolution = 3600f | |
| mSpinDuration = 5000 | |
| when { | |
| (count in 30..59) -> { | |
| mSpinDuration = 1000 | |
| mSpinRevolution = (3600 * 2).toFloat() | |
| } |
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
| import java.util.*;; | |
| public class comparable implements Comparable<comparable> { | |
| private String name; | |
| private int age; | |
| public comparable(String name, int age) { | |
| this.name = name; | |
| this.age = age; | |
| } |
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
| import java.util.*;; | |
| public class BriefExampleGC<T> { | |
| private List<T> items; | |
| public BriefExampleGC() { | |
| this.items = new ArrayList<>(); | |
| } | |
| public void add(T item) { | |
| this.items.add(item); |
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 class GenricMethod { | |
| public void printList(String []s){ | |
| for(int i=0;i<s.length;i++){ | |
| System.out.println(s[i]); | |
| } | |
| } | |
| public <T> void printlist(T []s){ | |
| for( T x :s){ | |
| System.out.println(x); |
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
| interface name { | |
| String getName(); | |
| } | |
| interface age { | |
| double getage(); | |
| } | |
| interface country{ | |
| String getcountry(); |