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
| @Composable | |
| fun PriceGraph( | |
| priceHistory: List<Double>, | |
| modifier: Modifier = Modifier, | |
| lineColor: Color = Color.Black | |
| ) { | |
| val path = remember { Path() } | |
| val offsetX = remember { androidx.compose.animation.core.Animatable(0f) } |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Ganache CLI Transactions</title> | |
| <style> | |
| table { | |
| border-collapse: collapse; |
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
| const { Web3 } = require('web3'); | |
| const EthereumTransaction = require('ethereumjs-tx').Transaction; | |
| // Step 1: Set up the appropriate configuration | |
| const web3 = new Web3(new Web3.providers.HttpProvider('http://127.0.0.1:7545')); | |
| async function transfer() { | |
| // Step 2: Set the sending and receiving addresses for the transaction | |
| const sendingAddress = 'sendingAddress'; | |
| const receivingAddress = 'receivingAddress'; |
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
| val client = OkHttpClient.Builder() | |
| .addInterceptor(MockInterceptor()) | |
| .build() | |
| //------------------------- | |
| import okhttp3.Interceptor | |
| import okhttp3.Protocol | |
| import okhttp3.Response | |
| import okhttp3.ResponseBody.Companion.toResponseBody |
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
| #!/bin/bash | |
| #hi | |
| SAVEIFS=$IFS | |
| IFS=$(echo -en "\n\b") | |
| for rootFolder in */ ; do | |
| if [ -d $rootFolder"build" ]; then | |
| echo "do you want to delete build folders of \"${rootFolder%?}\" project?" | |
| read ans | |
| if [ "$ans" = "y" ] || [ "$ans" = "Y" ]; then |
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
| Define these lines to the library gradle file: | |
| project.group = "io.github.rezaiyan" | |
| project.archivesBaseName = "LevelProgressBar" | |
| project.version = "1.0.0" | |
| apply from: '../publish.gradle' |
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 MainActivity extends AppCompatActivity { | |
| @Override | |
| protected void onCreate(@Nullable Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL, | |
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL); | |
| } | |
| } |
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
| liveData.observeLimit({ | |
| //asset 1 | |
| }, { | |
| //assert 2 | |
| })... |
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 MultipartHelper { | |
| private final String fileDir; | |
| private final String outputDir; | |
| public MultipartHelper(String fileDir, String outputDir) { | |
| this.fileDir = fileDir; | |
| String baseDir = BaseApplication.getAppContext().getObbDir() + File.separator + "uploads"; | |
| this.outputDir = baseDir + File.separator; | |
| File upload = new File(baseDir); |
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
| ViewGroup.LayoutParams layoutParams = itemView.getLayoutParams(); | |
| if (layoutParams instanceof StaggeredGridLayoutManager.LayoutParams) { | |
| if (getAdapterPosition() == 0) { | |
| ((StaggeredGridLayoutManager.LayoutParams) layoutParams).setFullSpan(true); | |
| } else { | |
| ((StaggeredGridLayoutManager.LayoutParams) layoutParams).setFullSpan(false); | |
| } | |
| } |
NewerOlder