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
| Task: Build a Secure File Upload Component | |
| Objective: | |
| Create a reusable React component for secure file upload with the following features: | |
| File Preview: Show a thumbnail preview for images and file icons for other types. | |
| File Size Limit: Enforce a 10 MB file size limit with a clear error message. | |
| Drag and Drop Support: Allow users to drag and drop files. |
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
| version: 3.3 |
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 me.ff.jtest; | |
| public class Test2 { | |
| static void solution(int n){ | |
| String [] result = new String[n+1]; | |
| for (int i=1;i<=n; i++){ | |
| result[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
| import java.util.LinkedHashMap; | |
| import java.util.Map; | |
| public class MaxSizeHashMap<K, V> extends LinkedHashMap<K, V> { | |
| private final int maxSize; | |
| public MaxSizeHashMap(int maxSize) { | |
| super(maxSize); | |
| this.maxSize = maxSize; | |
| } |
ln -s
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
| var stream = { | |
| map: function (list, fn) { | |
| var newList = []; | |
| for (item in list) { | |
| var mappedItem = fn(list[item]); | |
| newList.push(mappedItem); | |
| } | |
| return newList; | |
| }, | |
| filter: function (list, predicate) { |
NewerOlder


