This file contains 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
//Collection Interface Example | |
import java.util.ArrayList; | |
import java.util.Collection; | |
public class CollectionDemo { | |
public static void main(String[] args) { | |
Collection < String > fruitCollection = new ArrayList < > (); | |
fruitCollection.add("banana"); |
This file contains 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.Map; | |
import java.util.TreeMap; | |
public class InterestCalculation { | |
public static void main(String[] args) { | |
// Creating a TreeMap to store account balances sorted by balance | |
TreeMap<Double, String> accountBalances = new TreeMap<>(); | |
// Adding account balances and account holder names | |
accountBalances.put(5000.00, "John Doe"); |
This file contains 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
/* | |
Usage: | |
Adding this script to your doc: | |
- Tools > Script Manager > New | |
- Select "Blank Project", then paste this code in and save. | |
Running the script: | |
- Tools > Script Manager | |
- Select "ConvertToMarkdown" function. | |
- Click Run button. | |
- Converted doc will be mailed to you. Subject will be "[MARKDOWN_MAKER]...". |
This file contains 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 'package:flutter/material.dart'; | |
class SizedText extends StatelessWidget { | |
final String text; | |
final Color color; | |
const SizedText({Key? key, required this.text,required this.color}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { |
This file contains 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
👉Arrays - | |
1. Two Sum | |
2. Container With Most Water | |
3. 3Sum | |
4. Search in Rotated Sorted Array | |
5. Maximum Subarray | |
6. Best Time to Buy and Sell Stock | |
7. Maximum Product Subarray | |
8. Find Minimum in Rotated Sorted Array | |
9. Contains Duplicate |
This file contains 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 'package:bizcard/model/business_card/business_card_model.dart'; | |
import 'package:bizcard/model/user/user_model.dart'; | |
import 'package:bizcard/util/testing.dart'; | |
import 'package:cloud_firestore/cloud_firestore.dart'; | |
import 'package:firebase_auth/firebase_auth.dart'; | |
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart'; | |
import 'package:google_sign_in/google_sign_in.dart'; | |
class FirebaseServiceRepository { | |
final FirebaseAuth _firebaseAuth; |
This file contains 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
initilize | |
------------------> | |
country_spinner = (SearchableSpinner) findViewById(R.id.country_spinner); | |
adapter setting | |
------------------------> | |
_countryAdapter = new ArrayAdapter(this, | |
R.layout.simple_text, countryList); | |
country_spinner.setAdapter(_countryAdapter); |
This file contains 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 CustomListenerService { | |
public interface MyCustomListener{ | |
public void onSetText(String text); | |
} | |
private List<MyCustomListener> myCustomListeners = new ArrayList<>(); | |
public static volatile CustomListenerService customListenerService; |
This file contains 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.syntax.gtcl.ui.activity.gmap; | |
import androidx.annotation.NonNull; | |
import androidx.appcompat.app.AppCompatActivity; | |
import androidx.appcompat.widget.Toolbar; | |
import androidx.core.app.ActivityCompat; | |
import androidx.core.content.ContextCompat; | |
import androidx.fragment.app.FragmentActivity; | |
import android.Manifest; |
This file contains 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 requests | |
def DownloadImage(pic_url_prefix, pic_name): | |
with open(pic_name, 'wb') as handle: | |
response = requests.get(pic_url_prefix, stream=True) | |
if not response.ok: | |
print(pic_url_prefix, response) | |
for block in response.iter_content(1024): |
NewerOlder