A Pen by Trimikha Valentius on CodePen.
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
| export const dynamic = "force-dynamic"; | |
| export default async function handler(req, res) { | |
| if (req.method === "POST") { | |
| res.setHeader("Content-Type", "text/event-stream"); | |
| res.setHeader("Cache-Control", "no-cache"); | |
| const { prompt } = req.body; | |
| const completion = await llama.chat.completions.create( |
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 bali = [ | |
| { regency:'Jembrana', population:114863 }, | |
| { regency:'Tabanan', population:209308 }, | |
| { regency:'Badung', population:277536 }, | |
| { regency:'Gianyar', population:208443 }, | |
| { regency:'Klungkung', population:79233 }, | |
| { regency:'Bangli', population:106166 }, | |
| { regency:'Karangasem', population:193787 }, | |
| { regency:'Buleleng', population:294418 }, | |
| { regency:'Denpasar', population:403292 } |
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 bilanganDesimal = [1,2,3,4,5]; | |
| var bilanganBiner = bilanganDesimal.map( (element) => { | |
| return element.toString(2); | |
| }) | |
| console.log(bilanganBiner); // ["1", "10", "11", "100", "101"] |
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 arrayBaru = array.filter(function(element, i, array) { | |
| return (element % 2 === 0); | |
| }); |
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
| for(var i = 0; i < array.length; i++) { | |
| if( array[i] % 2 ) === 0 ) { | |
| arrayBaru.push(array[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
| 0x8b2a39946e41f5a0e2935cc25cfcf66d249daa6e |
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
| module.exports = { | |
| 'askingLocationForPlace':[ | |
| { | |
| 'message':'Coba deh ketik nama lokasi yang kamu cari', | |
| 'packageId':1, | |
| 'stickerId':2 | |
| }, | |
| { | |
| 'message':'Hai ###, ketik dulu nama lokasinya ya', | |
| 'packageId':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
| border: no | |
| license: MIT |
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
| border: no | |
| license: MIT |
NewerOlder