row_id
int64
0
48.4k
init_message
stringlengths
1
342k
conversation_hash
stringlengths
32
32
scores
dict
12,455
Edit the following code so that the part where the “Polaroids” appear aren’t obscured or unable to appear: <style> /*Intro GIF Animation (fade out)*/ body:before { content: " "; height: 100vh; width: 100vw; display: block; position: fixed; top: 0; left: 0; z-index: 100; background-image: url('https://64.media.tumblr.com/tumblr_logupyytbL1qenzp6o1_500.gifv'); /*gif link here*/ background-size: cover; background-repeat: no-repeat; animation: yourAnimation 3s ease 0s 1 normal forwards; pointer-events: none; } @keyframes yourAnimation { 0.0%{ opacity: 1;} 75%{ opacity: 1; } 100%{ opacity: 0;} } </style> <style> main:before { width:auto; height: 130px; display: block; content: ""; background-image: url('https://i.imgur.com/5YAR1sY.gif'); background-position: center center; background-size: cover; } <iframe src="https://player.vimeo.com/video/79397198" width="640" height="360" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen=""> <style> /*==========⚠️========== * for colors go to https://htmlcolorcodes.com/color-names * for fonts go to https://fonts.google.com * for cursors go to https://icons8.com or https://www.cursors-4u.com ============⚠️==========*/ * { cursor: url('https://cur.cursors-4u.net/cursors/cur-11/cur1054.cur'), auto; } a:hover { cursor: url(https://cur.cursors-4u.net/cursors/cur-11/cur1049.cur), auto; } /* this is where the colors are rooted */ :root{ --headers: white; --text: gray; --names: white; --links: darkgray; --background_image: url('https://i.makeagif.com/media/8-01-2017/3CpKYi.gif'); --font-family: "Courier New", cursive; --curve: 10px; --borders: 2px solid darkgray; } /* this is where the colors for specific things are located */ h3, h4, h5{color: var(--headers)!important;} /* headings*/ a{color: var(--links) !important;} /* color of links */ p, h2, .count {color: var(--text);} /* color of text */ .friends a p{color: var(--names);} /* color of names, and friends counter */ nav label{color: var(--links);} /* color of search */ .section h4 {color: var(--headers);} /* aboutme & want2meet headings */ .blurbs .heading {display:none;} /* hides the blurbs title */ .details p:last-child{color: var(--text);} /* where the last login and status appears */ /* this is where your background image ends up being styled */ body{ background-image: var(--background_image); background-size: cover; background-position: center; background-color: black; } /* this is where your name appears */ h1{ color: white; font-family: var(--font-family); font-size:30px !important; font-weight: bold; border: var(--borders); background-color: black; padding:5px; text-align: center; } /* the navigation is adjusted here */ nav{ background-color: black; border: var(--borders); border-radius: var(--curve); text-align: center; } nav .top, nav .links { background-color: transparent; border-radius: var(--curve); } nav .links a{ text-shadow:none; } /* this is the line that appears between links in the header and footer. you can add an emoji or symbol instead of the default line it has */ nav .links li:not(:last-child)::after, footer .links li:not(:last-child)::after{ content: "|"; color: darkgray; } nav img.logo{ filter: brightness(0) saturate(100%) invert(50%) sepia(5%) saturate(326%) hue-rotate(174deg) brightness(92%) contrast(82%) !important; } /* the search wrapper and button */ .search-wrapper input[type=text] { background-color: transparent !important; border: 2px solid var(--links) !important; color:var(--links) !important; border-radius: var(--curve) !important; } button{ border-radius: var(-- curve) !important; border: 0px solid var(--links) !important; font-family: var(--font-family) !important; background-color: transparent !important; color:var(--links) !important; } /* the online symbol and text */ .online{ color: var(--links) !important; text-transform: lowercase; text-align: right; } .online img{ filter: brightness(0) saturate(100%) invert(50%) sepia(5%) saturate(326%) hue-rotate(174deg) brightness(92%) contrast(82%); !important; } /* font family for the headers, navigtion links, links, body text */ a, p, b, nav label, .section{ font-family: var(--font-family); font-size: 12px; font-weight: bold; text-shadow: 0px 0px 0px black; } h2, h3, h4, h5{ font-family: var(--font-family); font-size: 16px; text-align: center; font-weight: bold; text-shadow: 0px 0px 0px black; } /* the hr code. the hr is the horizontal line when you want to separate important info or add a break in your paragraphs*/ hr{ height:2px; background: darkgray; border: none; } /* this is where you adjust the borders and background */ .blurbs, .mood, .friends, .contact, .profile .table, .blog-preview, .profile .table-section{ border-radius: var(--curve); border: var(--borders)!important; background-color: black!important; } .comment-replies{border:4px groove darkgray;} /* this is the border around the replies */ .comment-reply:not(:first-child){border-top: 2px solid var(--links);} /* line in between comment replies*/ /* your interest and comments table row background color */ td{ background-color: transparent!important; } /* the middle section of your profile background color*/ main{ background: transparent; border-radius: var(--curve); border: transparent; outline: none; } /* the interest table */ .table-section{ border:none !important; border-radius: var(--curve) !important; } /* the header section of the boxes */ .heading{ background: none !important; } /* this is the box that says "Edit Info" when you're logged in, and to your friends it says "Profile Name is your friend". */ .profile-info { background-color: black !important; border: var(--borders) !important; border-radius: var(--curve) !important; } /* adjusting images borders and adding styling if you want to */ .profile-pic{ padding: 10px; } /* you can add text-align:center; if you want your friends to be centered */ .friends-grid{ text-align: center; } /* margin and padding */ h2, h3, h4, h5, p{padding-left:5px !important;} /* this is important when you have rounded corners */ .contact .heading, .profile .table-section .heading, .blog-preview .heading, .profile .friends .heading, .mood{padding: 5px!important;text-align: center;} .mood, .friends{margin-bottom: 10px;} .url-info{display: none;} .general-about .details{ background: black; border: var(--borders); padding-bottom: 70px; margin-bottom: 10px; } .contact{ padding : 5px } .contact .f-col{ padding: 0px 0px 7px; } .f-row{ margin:0px!important; } /* this is the comments table scroll code. you can delete this if you don't want a scroll box */ .comments-table { display: block; height: 500px!important; overflow-y: scroll; outline: none !important; border-radius: 3px; border-spacing: 6px; border: transparent; } .comments-table td{ border: 2px solid darkgray; } footer{ background: black; border: var(--borders); padding:10px; margin-top: 10px; } /* .details-table td:first-child{display:none;} this hides the movies,books,heroes titles*/ } /* blinking effect */ @keyframes blink { 0% { box-shadow: 0 0 10px white; } 50% { box-shadow: none; } 100% { box-shadow: 0 0 10px white; } } h1 { animation: blink 1s infinite; } </style> <br/> <br/> <br/> <style> :root { --image1: url("https://external-media.spacehey.net/media/sW9A0Utg_puHW5RS4UtNrWuyD7F4kTSo3h7awxojgNag=/https://pa1.narvii.com/6781/94cb48b77d8310c7de7a816d88ee454024790d19_hq.gif"); --image2: url("https://external-media.spacehey.net/media/soOzHYPE0vIx2MiU4wbiCzxpjjjOLOtE_XhJ82Zl4uB0=/https://lthumb.lisimg.com/443/15477443.jpg?width=320&sharpen=true"); --image3: url("https://external-media.spacehey.net/media/s92727buV5vhhdKNh3fanNQA-Ib5GROCDohwgIhkuzMk=/https://i.pinimg.com/564x/c0/84/f4/c084f42e40501707a98eda8c2d290328.jpg"); --image4: url("https://external-media.spacehey.net/media/suKBbYl65dwyI84W8OclHbnvTh3aOYqSF1kmeQagYh1o=/https://static.wikia.nocookie.net/theslenderman/images/4/4f/Jay_tied.png/revision/latest/scale-to-width-down/250?cb=20131026133102"); --image5: url("https://external-media.spacehey.net/media/sdu3lVTDmzARe8FGns5mao59l-lwYu9ePqvDqnK0Z3iY=/https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTb_zXE42OXfJTHH3j6hEy9x_-Rbm_eUXzGs64HiWJsbzqpO_yG0nEbphPJC4KrIujLawg&usqp=CAU"); --image6: url("https://external-media.spacehey.net/media/sgBkN5OlFUzhCYmQdm7Tu7jaarszEI1RVl6a3Rpuo95E=/https://lthumb.lisimg.com/445/15477445.jpg?width=320&sharpen=true"); --image7: url("https://external-media.spacehey.net/media/s2B1ud5j-IWuacO73qT30wsBKtwwcMFPbyV1k3Yf8Wi8=/https://images.mubicdn.net/images/film/152669/cache-132388-1459353916/image-w1280.jpg"); --image8: url("https://external-media.spacehey.net/media/se7CdAJVSYiy01cBPb0vcePNKofAV72PUVk8vcvdUw-0=/https://m.media-amazon.com/images/M/MV5BZjI1MDgwMWUtZmZkNC00MTZhLWE0OWMtNTI4MTM0ZThmOWU5XkEyXkFqcGdeQXVyNDg0ODA3NTY@._V1_.jpg"); --image9: url("https://external-media.spacehey.net/media/snrQXUWDJmwoMbshmp3tNnWK2xHueW1Q-7cj8LmeISJI=/https://static.wikia.nocookie.net/villains/images/5/5b/Hoody.jpg/revision/latest/scale-to-width-down/250?cb=20150112192228"); --image10: url("https://external-media.spacehey.net/media/srT9kgGdWnYGuCqG0CSFfmThWgJnqq7cymVGHLGaEYLU=/https://i.pinimg.com/564x/ee/7e/4d/ee7e4ddc648c4d54835cb43286779643.jpg"); --image11: url("https://external-media.spacehey.net/media/sVC8Sby2CggaN68gOrmWGUMMpBOn2BsxARJ96xdapN48=/https://static.wikia.nocookie.net/villains/images/3/3d/HoodyFall.jpg/revision/latest/scale-to-width-down/250?cb=20150319013155"); --image12: url("https://external-media.spacehey.net/media/s_vY38okWD6GEdOGChpg6ioE_3ZlaUyrrjlYGsqCIzc4=/http://pm1.narvii.com/6154/57b7c4bf301cb3a15683fb16700961efa971008f_00.jpg"); --image13: url("https://external-media.spacehey.net/media/so_95Wd4zmFg89C46NebOqCeVRsgz0z0vfpKSJ9MEJuE=/https://static.wikia.nocookie.net/theslenderman/images/4/47/Tim_awake.png/revision/latest/scale-to-width-down/250?cb=20131021202134"); --image14: url("https://external-media.spacehey.net/media/satv7cIOrr0oPzdilTaOhnYpqXfCzqxx3RZpJPRbtTok=/https://64.media.tumblr.com/7cda4d1fc5857f1b20ab8110366aad4b/66401ed8015f44a4-52/s1280x1920/096a4540190ae7a0f8e3be9056b541a30b88e93b.png"); } .container { margin-top: 300px; } .side-photos { display: flex; flex-direction: column; align-items: center; position: absolute; top: 300px; width: 270px; } .banner { display: flex; flex-direction: row; justify-content: center; position: absolute; top: 0; left: 0; width: 100%; height: 300px; padding: 30px; } .side-photos.leftside { left: -20px; } .side-photos.rightside { right: -20px; } .polaroid { background: #fff8ff; height: 266px; width: 214px; box-shadow: 5px 5px 10px #4d23cf50; padding: 12px; } .banner:hover, .side-photos:hover { z-index: 1; } .polaroid:hover { z-index: 1; } .banner.polaroid:not(div:first-child) { margin-left: -10px; } .side-photos.polaroid { margin-top: -10px; } .image { height: 190px; width: 190px; background-color: grey; background-size: cover; background-position: center; } #image1 { background-image: var(--image1); } #image2 { background-image: var(--image2); } #image3 { background-image: var(--image3); } #image4 { background-image: var(--image4); } #image5 { background-image: var(--image5); } #image6 { background-image: var(--image6); } #image7 { background-image: var(--image7); } #image8 { background-image: var(--image8); } #image9 { background-image: var(--image9); } #image10 { background-image: var(--image10); } #image11 { background-image: var(--image11); } #image12 { background-image: var(--image12); } #image13 { background-image: var(--image13); } #image14 { background-image: var(--image14); } .skewleft { transform: rotate(20deg); } .skewright { transform: rotate(-20deg); } .caption { display: flex; align-items: center; justify-content: center; max-width: 100%; height: 64px; overflow: hidden; text-align: center; line-height: 24px; color: #4d23cf; } @media screen and (max-width: 800px) { .container { margin-top: 525px; } .polaroid { height: 125px; width: 100px; padding: 10px; } .image { width: 80px; height: 80px; } .caption { height: 33px; font-size: 10px; line-height: 14px; margin: 1px 0; } .side-photos { flex-direction: row; top: 150px; } .side-photos.leftside { left: 30px; top: 275px; } .side-photos.rightside { right: 60px; top: 400px; } .banner { height: auto; flex-wrap: wrap; } } </style>
c4a81fac6480e0026e8cca253ea6251f
{ "intermediate": 0.3064826428890228, "beginner": 0.3207574188709259, "expert": 0.37275996804237366 }
12,456
Pretendo que atues como programador. Quero que faça as alterações neste script: from scipy.io.wavfile import write import sounddevice as sd import numpy as np import whisper import os import keyboard import pyperclip tex1 = "" model = 'c:\meu\medium.pt' samplerate = 44100 blocksize = 111 threshold = 0.0125 vocals = [20, 20000] endblocks = 8 noise_blocks = 3 ### ADDED paused = False pyperclip.copy("limpezaaaa") class StreamHandler: def __init__(self): self.running = True self.padding = 0 self.noise_counter = 0 ### ADDED self.prevblock = self.buffer = np.zeros((0, 1)) self.fileready = False print("\033[96mLoading Whisper Model…\033[0m", end='', flush=True) self.model = whisper.load_model(f'{model}') print("\033[90m Done.\033[0m") def check_pause_toggle(self): global paused if keyboard.is_pressed('F3'): print(" — Foi premida a tecla F3 — ") print("---------------- ") paused = not paused def process_audio_buffer(self, indata, frames, time, status): global paused self.check_pause_toggle() if paused: return if any(indata): freq = np.argmax(np.abs(np.fft.rfft(indata[:, 0]))) * samplerate / frames if indata.max() > threshold and vocals[0] <= freq <= vocals[1]: self.noise_counter = 0 ### ADDED print('.', end='', flush=True) if self.padding < 1: self.buffer = self.prevblock.copy() self.buffer = np.concatenate((self.buffer, indata)) self.padding = endblocks else: ### CHANGED (IF-ELSE structure) if self.noise_counter < noise_blocks: self.noise_counter += 1 else: self.padding -= 1 if self.padding > 1: self.buffer = np.concatenate((self.buffer, indata)) elif self.padding < 1 and 1 < self.buffer.shape[0] > samplerate: self.fileready = True write('dictate.wav', samplerate, self.buffer) self.buffer = np.zeros((0,1)) elif self.padding < 1 and 1 < self.buffer.shape[0] < samplerate: self.buffer = np.zeros((0,1)) print("\033[2K\033[0G", end='', flush=True) else: self.prevblock = indata.copy() else: print("\033[31mNo input or device is muted.\033[0m") self.running = False def process_transcription(self): global tex1, paused self.check_pause_toggle() if paused: return if self.fileready: print("\n\033[90mTranscribing…\033[0m") result = self.model.transcribe('dictate.wav', language='pt', task='transcribe') print(f"\033[1A\033[2K\033[0G{result['text']}") tex1 = str(result['text']) print('2 Fala agora, comprimento da frase já reconhecida é ', len(tex1)) print('-----------------------------------------------') print(tex1) tex1 = " ".join([word for word in tex1.split()]) if len(tex1) > 0: keyboard.write(tex1 + " ") tex1 = "" self.fileready = False def listen(self): print("\033[92mListening… \033[37m(Ctrl+C to Quit)\033[0m") with sd.InputStream(channels=1, callback=self.process_audio_buffer, blocksize=int(samplerate * blocksize / 1000), samplerate=samplerate) as stream: while self.running: self.process_transcription() def main(): try: handler = StreamHandler() handler.listen() except (KeyboardInterrupt, SystemExit): pass finally: print("\n\033[93mQuitting…\033[0m") if os.path.exists('dictate.wav'): os.remove('dictate.wav') if __name__ == '__main__': main() Que alterações podes fazer no código para que o problema apresentado a seguir se resolva: Quando eu digo a palavra apaga o sistema vai apagar a última palavra escrita na janela windows atual onde se está a fazer a transcrição.
3b9db2736ccaef7ea60e1daa9a6e2872
{ "intermediate": 0.37414103746414185, "beginner": 0.4387162923812866, "expert": 0.18714269995689392 }
12,457
hi
392701b13c8be8b72a2cb8bacab613ff
{ "intermediate": 0.3246487081050873, "beginner": 0.27135494351387024, "expert": 0.40399640798568726 }
12,458
Is there a way to prevent it from adding components one by one? template <typename... Components, typename... Args> void ECS::AddComponents(const EntityId entityId, Args&&... args) { AddComponentsHelper<0, Components...>(entityId, std::forward<Args>(args)...); } template <std::size_t I, typename T, typename... Ts, typename... Args> std::enable_if_t<I != sizeof...(Ts), void> ECS::AddComponentsHelper(const EntityId entityId, Args&&... args) { AddComponent<T>(entityId, std::get<I>(std::forward_as_tuple(args...))); AddComponentsHelper<I + 1, Ts...>(entityId, std::forward<Args>(args)...); } template <std::size_t I, typename T, typename... Ts, typename... Args> std::enable_if_t<I == sizeof...(Ts), void> ECS::AddComponentsHelper(const EntityId entityId, Args&&... args) { AddComponent<T>(entityId, std::get<I>(std::forward_as_tuple(args...))); }
fe9b8b3e88d630befa0e8220e408ffe2
{ "intermediate": 0.42472684383392334, "beginner": 0.3132936656475067, "expert": 0.26197949051856995 }
12,459
Make up the matlab code of "particle moving in a central force field"
f99ef68de09d2a6eb43204d85e688f94
{ "intermediate": 0.25112494826316833, "beginner": 0.1996661275625229, "expert": 0.5492088794708252 }
12,460
is U-net structure a transformer model? I'd like to use it to do CXR image segmentation. provide me the U-net code to help me to build my own U-net architecture, please.
1f994dc36257b5526a88b4a93a0940bc
{ "intermediate": 0.2845347225666046, "beginner": 0.12687300145626068, "expert": 0.5885922908782959 }
12,461
List<String> getAllText() { final textNodes = _document .findAllElements('w:t') .where((element) => element.getElement('w:rPr')); final textList = textNodes.map((node) => node.innerText).toList(); return textList; } i want find text in XML file from file docx use Flutter, i have problem is it get all text include text table, but i don't get text in table, i just want get text all exclude in table
39d8edc7ca47e613377134228c979256
{ "intermediate": 0.5584905743598938, "beginner": 0.24737097322940826, "expert": 0.19413846731185913 }
12,462
<w:p w14:paraId="00000001" w14:textId="77777777" w:rsidR="00641F93" w:rsidRPr="00FC52C5" w:rsidRDefault="00000000"> <w:pPr> <w:rPr> <w:rFonts w:ascii="Times New Roman" w:eastAsia="Roboto" w:hAnsi="Times New Roman" w:cs="Times New Roman"/> </w:rPr> </w:pPr> <w:r w:rsidRPr="00FC52C5"> <w:rPr> <w:rFonts w:ascii="Times New Roman" w:eastAsia="Roboto" w:hAnsi="Times New Roman" w:cs="Times New Roman"/> </w:rPr> <w:t>1. Tin học là ngành khoa học về:</w:t> </w:r> </w:p> i want get all text have path like this in flutter
ed8df2505497a881856ded8443c42530
{ "intermediate": 0.546639621257782, "beginner": 0.17459888756275177, "expert": 0.27876147627830505 }
12,463
this is my code to recognize user activity based on gyroscope and accelerometer firstly if you see any way to improve you are welcome to modifier my code the second thing is I want adding a jumping activity but i don't know the thresholds
238100af2ceb078dbe4e7c49dc0e9962
{ "intermediate": 0.35170602798461914, "beginner": 0.21902036666870117, "expert": 0.4292736053466797 }
12,464
Write python code for a simple calculator.
f3dc862e44521cf0cab80978d893f63b
{ "intermediate": 0.3568613827228546, "beginner": 0.41307276487350464, "expert": 0.23006582260131836 }
12,465
how to calculate the entropy for numerical variables in decision tree
258a4f82aa6102ab225e104cbb3dc59f
{ "intermediate": 0.20494244992733002, "beginner": 0.2619188725948334, "expert": 0.5331386923789978 }
12,466
this is my code to recognize user activity based on gyroscope and accelerometer firstly if you see any way to improve you are welcome to modifier my code the second thing is I want adding a jumping activity but i don’t know the thresholds import androidx.appcompat.app.AppCompatActivity; import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.graphics.Color; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; import android.widget.Toast; import androidx.core.app.NotificationCompat; import org.project.ayoub_akanoun_projet.databinding.ActivityRecogniweWsensorBinding; import org.project.ayoub_akanoun_projet.db.DatabaseHelper; import org.project.ayoub_akanoun_projet.entities.Activity; import java.util.ArrayList; import java.util.Date; import java.util.List; public class RecogniweWSensorActivity extends AppCompatActivity implements SensorEventListener { ActivityRecogniweWsensorBinding binding; private SensorManager sensorManager; private Sensor accelerometerSensor, gyroscopeSensor; private List<Float> accelerometerValues; private List<Float> gyroscopeValues; String email; DatabaseHelper db; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); binding = ActivityRecogniweWsensorBinding.inflate(getLayoutInflater()); setContentView(binding.getRoot()); email = getIntent().getStringExtra("email"); // Initialize sensor manager and sensors sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); accelerometerSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); gyroscopeSensor = sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE); accelerometerValues = new ArrayList<>(); gyroscopeValues = new ArrayList<>(); db = new DatabaseHelper(this); } @Override protected void onResume() { super.onResume(); // Register sensor listeners sensorManager.registerListener(this, accelerometerSensor, SensorManager.SENSOR_DELAY_NORMAL); sensorManager.registerListener(this, gyroscopeSensor, SensorManager.SENSOR_DELAY_NORMAL); } @Override protected void onPause() { super.onPause(); // Unregister sensor listeners to save battery sensorManager.unregisterListener(this); } @Override public void onSensorChanged(SensorEvent event) { /* The accelerometer measures the acceleration of the device in three axes (x, y, and z) and adds the result to the list accelerometerValues */ if (event.sensor == accelerometerSensor) { float x = event.values[0]; float y = event.values[1]; float z = event.values[2]; float acceleration = (float) Math.sqrt(x * x + y * y + z * z); accelerometerValues.add(acceleration); /* The gyroscope measures the rotation of the device in three axes (x, y, and z) and adds the result to the list gyroscopeValues */ } else if (event.sensor == gyroscopeSensor) { float x = event.values[0]; float y = event.values[1]; float z = event.values[2]; float rotation = (float) Math.sqrt(x * x + y * y + z * z); gyroscopeValues.add(rotation); } // Update activity based on the average of the sensors values updateActivity(getAverageAcceleration(), getAverageRotation()); } // private float getAverageAcceleration() { float sumAccelerations = 0; for (float acceleration : accelerometerValues) { sumAccelerations += acceleration; } return accelerometerValues.isEmpty() ? 0 : sumAccelerations / accelerometerValues.size(); } private float getAverageRotation() { float sumRotations = 0; for (float rotation : gyroscopeValues) { sumRotations += rotation; } return gyroscopeValues.isEmpty() ? 0 : sumRotations / gyroscopeValues.size(); } private long lastCleaningTime = 0; /* compares values to predefined thresholds for each activity. * If the average acceleration and rotation values are above the thresholds for a certain activity, * that activity is recognized * store the activity in the database * then notify the user */ private void updateActivity(float averageAcceleration, float averageRotation) { String activityText; int icon = R.drawable.sitting; // Clean sensor values every 20 seconds long currentTime = System.currentTimeMillis(); if (currentTime - lastCleaningTime >= 5000) { Toast.makeText(getApplicationContext(), "Update", Toast.LENGTH_SHORT).show(); accelerometerValues.clear(); gyroscopeValues.clear(); lastCleaningTime = currentTime; } if (averageAcceleration > 15 && averageRotation > 5) { activityText = "Running"; icon = R.drawable.activity_running; } else if (averageAcceleration > 10 && averageRotation > 2) { activityText = "Walking"; icon = R.drawable.activity_walking; } else if (averageAcceleration > 5 && averageRotation > 1) { activityText = "Standing"; icon = R.drawable.activity_still; } else { activityText = "Sitting"; icon = R.drawable.sitting; } if(!binding.tvStill.getText().toString().equals(activityText)) { Activity activity = db.getLastActivity(); if(activity.getEndDate().equals("")){ db.updateEndDate(new Date().toString(),activity.getId()); } binding.tvStill.setText(activityText); binding.imgActivity.setImageResource(icon); db.addActivity(new Activity(email, activityText, new Date().toString(),"")); makeNotification(activityText); } } public void makeNotification(String accActivity) { String channelid = "CHANNEL_ID_NOTIFICATION"; NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext(), channelid) .setSmallIcon(R.drawable.runner) .setContentTitle("Activity changed") .setContentText("Your are " + accActivity) .setAutoCancel(true) .setPriority(NotificationCompat.PRIORITY_DEFAULT); Intent intent = new Intent(getApplicationContext(), RecogniweWSensorActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0, intent, PendingIntent.FLAG_MUTABLE); builder.setContentIntent(pendingIntent); NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE); if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O){ NotificationChannel notificationChannel= notificationManager.getNotificationChannel(channelid); if(notificationChannel==null){ int importance = NotificationManager.IMPORTANCE_HIGH; notificationChannel = new NotificationChannel(channelid, "NOTIFICATION_CHANNEL_NAME", importance); notificationChannel.setLightColor(Color.GREEN); notificationChannel.enableVibration(true); notificationManager.createNotificationChannel(notificationChannel); } } notificationManager.notify(0,builder.build()); } @Override public void onAccuracyChanged(Sensor sensor, int accuracy) { // Do nothing } }
ab3ae30dbe2cf2191cb1ee5a28bbd17a
{ "intermediate": 0.30476272106170654, "beginner": 0.39405742287635803, "expert": 0.3011798560619354 }
12,467
A yardstick is placed on the 2 scale bowls of a large weighing scale while both scale bowls are empty and level with each other vertically, such that there are 2 points of contact between the yardstick and one of the scale bowls near one end of the yardstick, and also 2 points of contact between the yardstick and the other scale bowl near the other end of the yardstick. Assume that the yardstick is positioned such that the scale bowls do not move after the yardstick was placed on the 2 scale bowls. Then a piece of candy is put on top the yardstick near one end of the yardstick while simulaneously another piece of candy is put on top of the yardstick near the other end of the yardstick. Assume that the scale bowls do not move after the 2 pieces of candy were put on top of the yardstick. Then 2 pounds of feathers are put in one of the scale bowls while 1 pound of steel is simultaneously put in the other scale bowl, in a way that neither the feathers nor steel ever touched the yardstick or pieces of candy. What likely happens over the next minute, including the yardstick and 2 pieces of candy?
f4c9206eeaff19dec9321aee62b92c57
{ "intermediate": 0.38494443893432617, "beginner": 0.27000880241394043, "expert": 0.345046728849411 }
12,468
A yardstick is placed on the 2 scale bowls of a large weighing scale while both scale bowls are empty and level with each other vertically, such that there are 2 points of contact between the yardstick and one of the scale bowls near one end of the yardstick, and also 2 points of contact between the yardstick and the other scale bowl near the other end of the yardstick. Assume that the yardstick is positioned such that the scale bowls do not move after the yardstick was placed on the 2 scale bowls. Then a piece of candy is put on top the yardstick near one end of the yardstick while simulaneously another piece of candy is put on top of the yardstick near the other end of the yardstick. Assume that the scale bowls do not move after the 2 pieces of candy were put on top of the yardstick. Then 2 pounds of feathers are put in one of the scale bowls while 1 pound of steel is simultaneously put in the other scale bowl, in a way that neither the feathers nor steel ever touched the yardstick or pieces of candy. What likely happens over the next minute, including the yardstick and 2 pieces of candy? Also output a diagram of the final situation in SVG format.
21d59cf81c0209e59c4d7aeaa3b67384
{ "intermediate": 0.39312413334846497, "beginner": 0.2541996240615845, "expert": 0.3526762127876282 }
12,469
give me a javascript example about setcookie and getcookie
da46cb141e9dde968d75c7417a05c123
{ "intermediate": 0.47865673899650574, "beginner": 0.31160789728164673, "expert": 0.20973533391952515 }
12,470
Act as: MERN Developer Technology stack: Node.js, Express.js, MongoDB, Mongoose, ReactJS Functionality: Forecasting Task: Make APIs that takes in inputs and sends back forecasting data using various methods. Output Format: File Names with Code only
d28f7eaab93bdbfb8e4ecf8d3ccf0e77
{ "intermediate": 0.809461236000061, "beginner": 0.08597534149885178, "expert": 0.10456337779760361 }
12,471
A yardstick is placed on the 2 scale bowls of a large weighing scale while both scale bowls are empty and level with each other vertically, such that there are 2 points of contact between the yardstick and one of the scale bowls near one end of the yardstick, and also 2 points of contact between the yardstick and the other scale bowl near the other end of the yardstick. Assume that the yardstick is positioned such that the scale bowls do not move after the yardstick was placed on the 2 scale bowls. Then a piece of candy is put on top the yardstick near one end of the yardstick while simulaneously another piece of candy is put on top of the yardstick near the other end of the yardstick. Assume that the scale bowls do not move after the 2 pieces of candy were put on top of the yardstick. Then 2 pounds of feathers are put in one of the scale bowls while 1 pound of steel is simultaneously put in the other scale bowl, in a way that neither the feathers nor steel ever touched the yardstick or pieces of candy. What likely happens over the next minute, including the yardstick and 2 pieces of candy? Also output a diagram of the final situation in SVG format.
26089a19a7642d4be699d29df383f883
{ "intermediate": 0.39312413334846497, "beginner": 0.2541996240615845, "expert": 0.3526762127876282 }
12,472
Act as: Github Actions Developer Technology stack: Github Actions Functionality: Uptime monitor Task: Make a github action to perform uptime monitoring for a series of endpoints in a one minute interval. The code should be considering all the limits of Github Actions as well.
cf9d1c4dc7876c1b5022ed444a1fe3b5
{ "intermediate": 0.5259072780609131, "beginner": 0.2657334506511688, "expert": 0.2083592712879181 }
12,473
regex to exclude table in Flutter from w:tbl to w:tbl
7e953b1c94ae2db57e28a4f2f39aeb89
{ "intermediate": 0.43784675002098083, "beginner": 0.20627731084823608, "expert": 0.3558759391307831 }
12,474
Implement a game of hangman IN PYTHON
abcf2b713fe8c90cce3b4cd5b577f428
{ "intermediate": 0.30103781819343567, "beginner": 0.4033118188381195, "expert": 0.29565033316612244 }
12,475
исправь синтаксические ошибки в коде window.z = $; setInterval(function () { if (window.z('span[title=«в сети»]') !== null) { console.info(«ONLINE: » + (new Date())); }}, 5000);
6a4339b31ba8c0770acf9b8ffba3bcde
{ "intermediate": 0.28466519713401794, "beginner": 0.3676074743270874, "expert": 0.3477272689342499 }
12,476
дай инструкцию по компиляции программы на dosbox с linux ubuntu 22.04 так же напиши, как ее запускать #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <stdbool.h> #include <string.h> #include <unistd.h> #include <fcntl.h> typedef struct Context { size_t shiftCount; bool isNegShift; FILE *currFile; FILE *tempFile; char tempByte; bool isEnd; } Context; static char Usage[30]; void openFiles(Context *ctx, char **argv) { FILE* file = fopen(argv[1], "rb"); if (file == NULL) { fprintf(stderr, "No such file or directory.\n%s", Usage); exit(EXIT_FAILURE); } fseek (file, 0, SEEK_END); size_t size = ftell(file); if (size == 0) { fprintf(stderr, "File is empty.\n%s", Usage); exit(EXIT_FAILURE); } FILE* tmpFile = fopen("temp.file", "wb"); if (tmpFile == NULL) { fprintf(stderr, "Failed to create temp file.\n%s", Usage); exit(EXIT_FAILURE); } ctx->currFile = file, ctx->tempFile = tmpFile; } void rewriteFile(Context *ctx, char **argv) { FILE* file = fopen(argv[1], "wb"); if (file == NULL) { fprintf(stderr, "No such file or directory.\n%s", Usage); exit(EXIT_FAILURE); } FILE* tmpFile = fopen("temp.file", "rb"); if (tmpFile == NULL) { fprintf(stderr, "Failed to create temp file.\n%s", Usage); exit(EXIT_FAILURE); } ctx->currFile = file, ctx->tempFile = tmpFile; size_t bRead = 0; char buff[4096] = {0}; while ((bRead = fread(buff, 1, 4096, ctx->tempFile)) > 0) { for (size_t i = 0; i < bRead; i++) { fwrite(&buff[i], 1, 1, ctx->currFile); } } fflush(ctx->currFile); fclose(ctx->currFile); fclose(ctx->tempFile); } void getTempByte(Context *ctx) { if (ctx->isNegShift == true) { fseek(ctx->currFile, 0, SEEK_SET); uint result = fread(&ctx->tempByte, 1, 1, ctx->currFile); if (result == 0) { fprintf(stderr, "reading first byte failed."); exit(EXIT_FAILURE); } fseek(ctx->currFile, 0, SEEK_SET); } else { fseek(ctx->currFile, -1, SEEK_END); uint result = fread(&ctx->tempByte, 1, 1, ctx->currFile); if (result == 0) { fprintf(stderr, "reading last byte failed."); exit(EXIT_FAILURE); } fseek(ctx->currFile, 0, SEEK_SET); } } uint getShiftValue(char *str) { uint res = 0; while (*str && isdigit(*str)) { res = res * 10 + (*str - '0'); (str)++; } if (!isdigit(*str) && *str != '\0') { res = 10; } return res; } void circularShift(char* buff, size_t size, Context *ctx, size_t count) { size_t bitShift = ctx->shiftCount; char *temp = (char*)calloc(size, 1); memcpy(temp, buff, size); for (size_t i = 0; i < size; i++) { uint index = i; unsigned char byte = temp[index]; unsigned char shifted_byte = 0; uint index_neighbor = ctx->isNegShift ? (index + 1) % size : (index + size - 1) % size; unsigned char byte_neighbor = temp[index_neighbor]; if (ctx->isNegShift == true) { shifted_byte = (byte << bitShift) | (byte_neighbor >> (8 - bitShift)); if (i == size - 1 && ctx->isEnd) { shifted_byte = byte << bitShift | (ctx->tempByte >> (8 - bitShift)); } } else { shifted_byte = (byte >> bitShift) | (byte_neighbor << (8 - bitShift)); if (i == 0 && count == 0) { shifted_byte = byte >> bitShift | (ctx->tempByte << (8 - bitShift)); } } buff[index] = shifted_byte; fwrite(&shifted_byte, 1, 1, ctx->tempFile); } ctx->tempByte = temp[ctx->isNegShift ? size - 1 : 0]; free(temp); } void shiftBites(Context *ctx) { char buff[4096] = {0}; size_t bRead = 0, count = 0; while ((bRead = fread(buff, 1, 4096, ctx->currFile)) > 0) { if (bRead > 0 && bRead < 4096) { ctx->isEnd = true; } circularShift(buff, bRead, ctx, count); count++; } fflush(ctx->tempFile); fclose(ctx->tempFile); fclose(ctx->currFile); } void readBitesFromFile(FILE *file) { //debug func for read bites; int byte; while ((byte = fgetc(file)) != EOF) { for (int i = 7; i >= 0; i--) { printf("%d", (byte >> i) & 1); } printf(" "); } printf("\n"); } void readBitesFromByte(char byte) { for (int i = 7; i >= 0; i--) { printf("%d", (byte >> i) & 1); } printf(" "); printf("\n"); } void ruleCheck(Context *ctx, int argc, char **argv) { if (argc != 3) { fprintf(stderr, argc > 3 ? "Too many args.\n%s" : "Too few args.\n%s", Usage); exit(EXIT_FAILURE); } if (argv[2][0] == '-') { ctx->isNegShift = true; (argv[2])++; } uint val = getShiftValue(&argv[2][0]); if (val > 8) { fprintf(stderr, "shiftCount value must be between -8 and 8.\n%s", Usage); exit(EXIT_FAILURE); } ctx->shiftCount=val; } int main(int argc, char **argv) { Context ctx = {0}; sprintf(Usage, "Usage: %s file.any shiftCount", argv[0]); ruleCheck(&ctx, argc, argv); openFiles(&ctx, argv); getTempByte(&ctx); shiftBites(&ctx); rewriteFile(&ctx, argv); remove("temp.file"); fprintf(stderr, "Success!.\n"); exit(EXIT_SUCCESS); }
49185fe98a08eb326481529a4c4e5c1b
{ "intermediate": 0.4475509524345398, "beginner": 0.40049314498901367, "expert": 0.15195588767528534 }
12,477
Implement a game of snake IN PYTHON
af17de88d7d2935653f9808c6f1cae49
{ "intermediate": 0.3242512345314026, "beginner": 0.34019774198532104, "expert": 0.335550993680954 }
12,478
следующий код flask_admin class Gkno(db.Model): __tablename__ = 'gkno' id_gkno = db.Column(db.Integer, primary_key=True) # поле id скрыто из за primary_key=True code_gkno = db.Column(db.Integer) nasvanie_gkno = db.relationship('Vodoem', back_populates='gkno_nasvanie') def __repr__(self): return 'Код ГКНО %r' % (self.nasvanie_gkno) #def __unicode__(self): # return self.code_gkno #def __repr__(self): # return 'Код ГКНО %r' % (self.code_gkno) # __repr__ использовать для вывода текстового или строкового представления. Для вывода дат лучше использовать __str__. В %r падает строковое представление объекта. class Vodoem(db.Model): __tablename__ = 'vodoem' id_vodoem = db.Column(db.Integer, primary_key=True) # поле id скрыто из за primary_key=True code_vodoem = db.Column(db.Integer) nasvanie_vodoem = db.Column(db.String(255)) tip_vodoem_id = db.Column(db.Integer) # поле id скрыто tip_vodoem_code = db.Column(db.Integer) tip_vodoem_nasvanie= db.Column(db.String(255)) gkno_id = db.Column(db.Integer, db.ForeignKey('gkno.id_gkno')) gkno_code = db.Column(db.Integer) gkno_nasvanie = db.relationship('Gkno', back_populates='nasvanie_gkno') # идет в form_ajax_refs class VodoemModelView(ModelView): #column_exclude_list = ['tip_vodoem_id', 'gkno_id'] # удаляем столбцы из представления #form_excluded_columns = ['tip_vodoem_id', 'gkno_id'] # удаляем столбцы из форм создания и редактирования #can_export = True # экспорт вида модели в формате csv page_size = 50 # отображение 50 элементов на странице column_list = ('code_vodoem', 'nasvanie_vodoem', 'tip_vodoem_code', 'tip_vodoem_nasvanie', 'gkno_code', 'gkno_nasvanie') form_columns = column_list column_editable_list = form_columns #form_ajax_refs = { #'gkno_code': { # значения берем по foreign key из модели Gkno # 'fields': [Gkno.code_gkno], # поле поиска # 'minimum_input_length': 0, # 'placeholder': 'Выберите код отдела ГКНО', # 'page_size': 10, #}, #'gkno_nasvanie': { # значения берем по foreign key из модели Gkno # 'fields': [Gkno.nasvanie_gkno], # 'minimum_input_length': 0, # 'placeholder': 'Выберите название отдела ГКНО', # 'page_size': 10, #}, #'nasvanie_vodoem': { # 'fields': [Vodoem.nasvanie_vodoem], # 'minimum_input_length': 0, # 'placeholder': 'Выберите название отдела ГКНО', # 'page_size': 10, #}, #} admin.add_view(VodoemModelView(Vodoem, db.session)) выводит в поле gkno_nasvanie не содержимое ячеек базы данных а следующий вид записи <Vodoem 1> как это исправить? пример кода
6efb425b9afe11a1709b1fc1bea812f0
{ "intermediate": 0.2594369649887085, "beginner": 0.48153334856033325, "expert": 0.2590296268463135 }
12,479
Implement a game of checkers in python
a591fce17ccc3d32b00df5a2d1f178fb
{ "intermediate": 0.3262462317943573, "beginner": 0.3450193405151367, "expert": 0.32873448729515076 }
12,480
A yardstick is placed on the 2 scale bowls of a large weighing scale while both scale bowls are empty and level with each other vertically, such that there are 2 points of contact between the yardstick and one of the scale bowls near one end of the yardstick, and also 2 points of contact between the yardstick and the other scale bowl near the other end of the yardstick. Assume that the yardstick is positioned such that the scale bowls do not move after the yardstick was placed on the 2 scale bowls. Then a piece of candy is put on top the yardstick near one end of the yardstick while simulaneously another piece of candy is put on top of the yardstick near the other end of the yardstick. Assume that the scale bowls do not move after the 2 pieces of candy were put on top of the yardstick. Then 2 pounds of feathers are put in one of the scale bowls while 1 pound of steel is simultaneously put in the other scale bowl, in a way that neither the feathers nor steel ever touched the yardstick or pieces of candy. What likely happens over the next minute, including the yardstick and 2 pieces of candy? Also output a diagram of the final situation in SVG format.
63a313601d13c437f77339740090e954
{ "intermediate": 0.39312413334846497, "beginner": 0.2541996240615845, "expert": 0.3526762127876282 }
12,481
Want to design hpf driver 9watt?
a1b97e81cf910cde3a8e89ab352471c7
{ "intermediate": 0.22252027690410614, "beginner": 0.14865966141223907, "expert": 0.6288200616836548 }
12,482
следующий код flask_admin class Gkno(db.Model): __tablename__ = 'gkno' id_gkno = db.Column(db.Integer, primary_key=True) # поле id скрыто из за primary_key=True code_gkno = db.Column(db.Integer) nasvanie_gkno = db.relationship('Vodoem', back_populates='gkno_nasvanie') def __repr__(self): return self.nasvanie_gkno #def __unicode__(self): # return self.code_gkno #def __repr__(self): # return 'Код ГКНО %r' % (self.code_gkno) # __repr__ использовать для вывода текстового или строкового представления. Для вывода дат лучше использовать __str__. В %r падает строковое представление объекта. class Vodoem(db.Model): __tablename__ = 'vodoem' id_vodoem = db.Column(db.Integer, primary_key=True) # поле id скрыто из за primary_key=True code_vodoem = db.Column(db.Integer) nasvanie_vodoem = db.Column(db.String(255)) tip_vodoem_id = db.Column(db.Integer) # поле id скрыто tip_vodoem_code = db.Column(db.Integer) tip_vodoem_nasvanie= db.Column(db.String(255)) gkno_id = db.Column(db.Integer, db.ForeignKey('gkno.id_gkno')) gkno_code = db.Column(db.Integer) gkno_nasvanie = db.relationship('Gkno', back_populates='nasvanie_gkno') # идет в form_ajax_refs class VodoemModelView(ModelView): #column_exclude_list = ['tip_vodoem_id', 'gkno_id'] # удаляем столбцы из представления #form_excluded_columns = ['tip_vodoem_id', 'gkno_id'] # удаляем столбцы из форм создания и редактирования #can_export = True # экспорт вида модели в формате csv page_size = 50 # отображение 50 элементов на странице column_list = ('code_vodoem', 'nasvanie_vodoem', 'tip_vodoem_code', 'tip_vodoem_nasvanie', 'gkno_code', 'gkno_nasvanie') form_columns = column_list column_editable_list = form_columns #form_ajax_refs = { #'gkno_code': { # значения берем по foreign key из модели Gkno # 'fields': [Gkno.code_gkno], # поле поиска # 'minimum_input_length': 0, # 'placeholder': 'Выберите код отдела ГКНО', # 'page_size': 10, #}, #'gkno_nasvanie': { # значения берем по foreign key из модели Gkno # 'fields': [Gkno.nasvanie_gkno], # 'minimum_input_length': 0, # 'placeholder': 'Выберите название отдела ГКНО', # 'page_size': 10, #}, #'nasvanie_vodoem': { # 'fields': [Vodoem.nasvanie_vodoem], # 'minimum_input_length': 0, # 'placeholder': 'Выберите название отдела ГКНО', # 'page_size': 10, #}, #} admin.add_view(VodoemModelView(Vodoem, db.session)) if __name__ == '__main__': app.run() выводит в поле nasvanie_gkno не содержимое ячейки базы данных, а название модели в угловых скобках <Vodoem 1>, как это исправить? пример кода с пояснением
eeff91c3a2054dcc16087d467da4c77b
{ "intermediate": 0.25651079416275024, "beginner": 0.4918828308582306, "expert": 0.25160640478134155 }
12,483
Implement a game of solitaire in python
7351f42ad7e682ac1754cf18ae2d3755
{ "intermediate": 0.33238470554351807, "beginner": 0.3568771481513977, "expert": 0.31073814630508423 }
12,484
Implement a game of flappy bird
ed247760c738a0a2e46b8775500f576e
{ "intermediate": 0.33130958676338196, "beginner": 0.3673115670681, "expert": 0.30137893557548523 }
12,485
Implement a simple game of flappy bird
806b846e4081987e716bfea40db86a53
{ "intermediate": 0.3449835777282715, "beginner": 0.34627360105514526, "expert": 0.30874282121658325 }
12,486
Сейчас выводятся до 12 песен (карточек с обложками) по ширине/горизонтали. Мне нужно, чтобы после 6й карточки был переход на следующий ряд, как это сделано на soundcloud: 2 ряда по 6 песен. index: <!-- audio player --> <div class="audio-player"> <div class="audio-tracklist"> <% tracks.forEach((track, index) => { %> <div class="audio-track"> <audio id="audio-<%= index %>" src="/tracks/<%= track.filename %>"></audio> <div class="audio-track-info" onclick="togglePlay(<%= index %>)"> <div class="audio-track-image"> <img src="/img/<%= track.image_filename || 'default-track-image.png' %>" alt="<%= track.title %>"> </div> <h4><%= track.title %></h4> </div> </div> <% }); %> </div> <div class="audio-player-controls" style="display: none;"> <button class="audio-player-button" onclick="togglePlay()"> <i class="audio-player-icon fa fa-play"></i> </button> <div class="audio-player-progress-fullwidth"> <input type="range" class="progress-bar" value="0" onchange="setProgressFullwidth(this.value)"> <span class="progress-time" id="progress-time-fullwidth">0:00</span> </div> </div> </div> <!-- end --> css: /* audio player */ .audio-player { margin: 50px auto; max-width: 800px; } /* .audio-tracklist { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 20px; } */ .audio-tracklist { display: flex; flex-direction: row; justify-content: center; align-items: center; flex-wrap: nowrap; margin: 0; padding: 0; gap: 20px; list-style: none; } .audio-track { width: 300px; text-align: center; } .audio-track-info h4 { margin: 0; font-size: 1.2rem; } /* .audio-player-controls { display: flex; flex-direction: row; align-items: center; justify-content: center; width: 100%; margin-top: 20px; } */ .audio-player-controls { position: fixed; bottom: 0; left: 0; width: 100%; background-color: #fff; z-index: 1; } .audio-player-button { border: none; background-color: transparent; cursor: pointer; font-size: 2rem; color: #666; margin-right: 10px; } .audio-player-progress-fullwidth { display: flex; flex-direction: row; justify-content: center; align-items: center; flex-grow: 1; } .audio-player-progress-fullwidth input[type="range"] { flex-grow: 1; margin: 0 10px; -webkit-appearance: none; background-color: #eee; height: 4px; border-radius: 2px; } .audio-player-progress-fullwidth input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background-color: #666; margin-top: -6px; cursor: pointer; } .audio-player-progress-fullwidth .progress-time { font-size: 0.8rem; color: #666; } .audio-track-image { width: 200px; height: 200px; overflow: hidden; border-radius: 10px; } .audio-track-image img { width: 100%; height: 100%; object-fit: cover; }
b0ad5d81125c8fa588172ee207cb84fa
{ "intermediate": 0.3595724105834961, "beginner": 0.33553576469421387, "expert": 0.30489176511764526 }
12,487
how to add css property "!important" inside of ant design elements
7e3e91b0ae694d004e55bd57b1c1ed85
{ "intermediate": 0.35177913308143616, "beginner": 0.3750714063644409, "expert": 0.2731494903564453 }
12,488
LibreOffice SDK Используя TableAutoFormats задать режим вручную
da74f0a7b44c28d1fb00643aa76f8d37
{ "intermediate": 0.5323413610458374, "beginner": 0.21219070255756378, "expert": 0.2554679214954376 }
12,489
A yardstick is placed on the 2 scale bowls of a large weighing scale while both scale bowls are empty and level with each other vertically, such that there are 2 points of contact between the yardstick and one of the scale bowls near one end of the yardstick, and also 2 points of contact between the yardstick and the other scale bowl near the other end of the yardstick. Assume that the yardstick is positioned such that the scale bowls do not move after the yardstick was placed on the 2 scale bowls. Then a piece of candy is put on top the yardstick near one end of the yardstick while simulaneously another piece of candy is put on top of the yardstick near the other end of the yardstick. Assume that the scale bowls do not move after the 2 pieces of candy were put on top of the yardstick. Then 2 pounds of feathers are put in one of the scale bowls while 1 pound of steel is simultaneously put in the other scale bowl, in a way that neither the feathers nor steel ever touched the yardstick or pieces of candy. What likely happens over the next minute, including the yardstick and 2 pieces of candy? Also output a diagram of the final situation in SVG format.
e6f65348d97c0f0de70f471f5c637c30
{ "intermediate": 0.39312413334846497, "beginner": 0.2541996240615845, "expert": 0.3526762127876282 }
12,490
write a controller class for if we select the quote in the dropdown then the related quote list should show in the below table in the salesforce
856d8741f5b677cd13ae8c97d6f83f5a
{ "intermediate": 0.3090285658836365, "beginner": 0.48076456785202026, "expert": 0.21020691096782684 }
12,491
in this code: import json import requests import time url = 'https://dfbe-34-143-138-174.ngrok.io/detect' text = "This is great" # Make request response = requests.get(url, params={'text': text}) def animate_dots(): while response.status_code == 202: for i in range(3): print(".", end="") time.sleep(1) print("\r", end="") # Start animating after request print("Analyzing...", end="") animate_dots() result = response.json() # Get label and score label = result[0]['label'] score = result[0]['score'] score_perc = score * 100 # Print result print(f"Language: {label}") print(f"Confidence: {score_perc:.1f}%") I still have to wate until the request done then I see the Analyzing... appear. Here is the result: Analyzing...Language: English Confidence: 99.5% I want the Analyzing ... and the dot animation run paralell while wait for response. Then it will disppear when we have the result. LIke this: Analyzing... (and the dot animation) When we have result then we have this: Language: English Confidence: 99.5% do it
5418077df8272bf61c717af3040c98ce
{ "intermediate": 0.3228664696216583, "beginner": 0.3732353150844574, "expert": 0.3038981854915619 }
12,492
how to learn big data
6b56edb35f8b13bc034707e67be5b4c9
{ "intermediate": 0.3290189802646637, "beginner": 0.13842791318893433, "expert": 0.5325530767440796 }
12,493
Сейчас выводятся до 12 песен (карточек с обложками) по ширине/горизонтали. Мне нужно, чтобы после 6й карточки был переход на следующий ряд, как это сделано на soundcloud: 2 ряда по 6 песен, ГОРИЗОНТАЛЬНО. index: <!-- audio player --> <div class="audio-player"> <div class="audio-tracklist"> <% tracks.forEach((track, index) => { %> <div class="audio-track"> <audio id="audio-<%= index %>" src="/tracks/<%= track.filename %>"></audio> <div class="audio-track-info" onclick="togglePlay(<%= index %>)"> <div class="audio-track-image"> <img src="/img/<%= track.image_filename || 'default-track-image.png' %>" alt="<%= track.title %>"> </div> <h4><%= track.title %></h4> </div> </div> <% }); %> </div> <div class="audio-player-controls" style="display: none;"> <button class="audio-player-button" onclick="togglePlay()"> <i class="audio-player-icon fa fa-play"></i> </button> <div class="audio-player-progress-fullwidth"> <input type="range" class="progress-bar" value="0" onchange="setProgressFullwidth(this.value)"> <span class="progress-time" id="progress-time-fullwidth">0:00</span> </div> </div> </div> <!-- end --> css: /* audio player */ .audio-player { margin: 50px auto; max-width: 800px; } /* .audio-tracklist { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 20px; } */ .audio-tracklist { display: flex; flex-direction: row; justify-content: center; align-items: center; flex-wrap: nowrap; margin: 0; padding: 0; gap: 20px; list-style: none; } .audio-track { width: 300px; text-align: center; } .audio-track-info h4 { margin: 0; font-size: 1.2rem; } /* .audio-player-controls { display: flex; flex-direction: row; align-items: center; justify-content: center; width: 100%; margin-top: 20px; } */ .audio-player-controls { position: fixed; bottom: 0; left: 0; width: 100%; background-color: #fff; z-index: 1; } .audio-player-button { border: none; background-color: transparent; cursor: pointer; font-size: 2rem; color: #666; margin-right: 10px; } .audio-player-progress-fullwidth { display: flex; flex-direction: row; justify-content: center; align-items: center; flex-grow: 1; } .audio-player-progress-fullwidth input[type="range"] { flex-grow: 1; margin: 0 10px; -webkit-appearance: none; background-color: #eee; height: 4px; border-radius: 2px; } .audio-player-progress-fullwidth input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background-color: #666; margin-top: -6px; cursor: pointer; } .audio-player-progress-fullwidth .progress-time { font-size: 0.8rem; color: #666; } .audio-track-image { width: 200px; height: 200px; overflow: hidden; border-radius: 10px; } .audio-track-image img { width: 100%; height: 100%; object-fit: cover; }
8e1e622e42e481300b27d1b8332923b7
{ "intermediate": 0.3857578635215759, "beginner": 0.33452674746513367, "expert": 0.27971532940864563 }
12,494
Сейчас выводятся 3 карточки в ряд по 3 ряда. Мне нужно, чтобы после 6й карточки был переход на следующий ряд, как это сделано на soundcloud: 2 ряда по 6 песен. <!-- audio player --> <div class="audio-player"> <div class="audio-tracklist"> <% tracks.forEach((track, index) => { %> <div class="audio-track"> <audio id="audio-<%= index %>" src="/tracks/<%= track.filename %>"></audio> <div class="audio-track-info" onclick="togglePlay(<%= index %>)"> <div class="audio-track-image"> <img src="/img/<%= track.image_filename || 'default-track-image.png' %>" alt="<%= track.title %>"> </div> <h4><%= track.title %></h4> </div> </div> <% }); %> </div> <div class="audio-player-controls" style="display: none;"> <button class="audio-player-button" onclick="togglePlay()"> <i class="audio-player-icon fa fa-play"></i> </button> <div class="audio-player-progress-fullwidth"> <input type="range" class="progress-bar" value="0" onchange="setProgressFullwidth(this.value)"> <span class="progress-time" id="progress-time-fullwidth">0:00</span> </div> </div> </div> <!-- end --> css: /* audio player */ /* audio player */ .audio-player { margin: 50px auto; max-width: 800px; } /* .audio-tracklist { display: flex; flex-direction: row; justify-content: center; align-items: center; flex-wrap: nowrap; margin: 0; padding: 0; gap: 20px; list-style: none; } */ .audio-tracklist { display: flex; flex-direction: row; justify-content: center; align-items: center; flex-wrap: wrap; margin: 0; padding: 0; gap: 20px; list-style: none; max-width: 2500px; } /* .audio-track { width: 300px; text-align: center; } */ /* .audio-tracklist { display: flex; flex-direction: row; Изменено на row justify-content: center; gap: 20px; } */ .audio-track-info h4 { margin: 0; font-size: 1.2rem; } /* .audio-player-controls { display: flex; flex-direction: row; align-items: center; justify-content: center; width: 100%; margin-top: 20px; } */ .audio-player-controls { position: fixed; bottom: 0; left: 0; width: 100%; background-color: #fff; z-index: 1; } .audio-player-button { border: none; background-color: transparent; cursor: pointer; font-size: 2rem; color: #666; margin-right: 10px; } .audio-player-progress-fullwidth { display: flex; flex-direction: row; justify-content: center; align-items: center; flex-grow: 1; } .audio-player-progress-fullwidth input[type="range"] { flex-grow: 1; margin: 0 10px; -webkit-appearance: none; background-color: #eee; height: 4px; border-radius: 2px; } .audio-player-progress-fullwidth input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background-color: #666; margin-top: -6px; cursor: pointer; } .audio-player-progress-fullwidth .progress-time { font-size: 0.8rem; color: #666; } .audio-track-image { width: 200px; height: 200px; overflow: hidden; border-radius: 10px; } .audio-track-image img { width: 100%; height: 100%; object-fit: cover; } вот как это выглядит у меня: https://yadi.sk/d/mqrLeGxNzp9GEg А вот как это нужно: https://yadi.sk/d/xMwKhSui3uuqMg
73e7b5360833ddc569beaa35d46e08c9
{ "intermediate": 0.3647611141204834, "beginner": 0.3510887324810028, "expert": 0.2841501533985138 }
12,495
как на основе кода flask admin class Gkno(db.Model): tablename = ‘gkno’ id_gkno = db.Column(db.Integer, primary_key=True) # поле id скрыто из за primary_key=True code_gkno = db.Column(db.Integer) nasvanie_gkno = db.relationship(‘Vodoem’, back_populates=‘gkno_nasvanie’) def repr_full(self): return self.nasvanie_gkno #def unicode(self): # return self.code_gkno #def repr(self): # return ‘Код ГКНО %r’ % (self.code_gkno) # repr использовать для вывода текстового или строкового представления. Для вывода дат лучше использовать str. В %r падает строковое представление объекта. class Vodoem(db.Model): tablename = ‘vodoem’ id_vodoem = db.Column(db.Integer, primary_key=True) # поле id скрыто из за primary_key=True code_vodoem = db.Column(db.Integer) nasvanie_vodoem = db.Column(db.String(255)) tip_vodoem_id = db.Column(db.Integer) # поле id скрыто tip_vodoem_code = db.Column(db.Integer) tip_vodoem_nasvanie= db.Column(db.String(255)) gkno_id = db.Column(db.Integer, db.ForeignKey(‘gkno.id_gkno’)) gkno_code = db.Column(db.Integer) gkno_nasvanie = db.relationship(‘Gkno’, back_populates=‘nasvanie_gkno’) # идет в form_ajax_refs class VodoemModelView(ModelView): #column_exclude_list = [‘tip_vodoem_id’, ‘gkno_id’] # удаляем столбцы из представления #form_excluded_columns = [‘tip_vodoem_id’, ‘gkno_id’] # удаляем столбцы из форм создания и редактирования #can_export = True # экспорт вида модели в формате csv page_size = 50 # отображение 50 элементов на странице column_list = (‘code_vodoem’, ‘nasvanie_vodoem’, ‘tip_vodoem_code’, ‘tip_vodoem_nasvanie’, ‘gkno_code’, ‘gkno_nasvanie’) form_columns = column_list column_editable_list = form_columns #form_ajax_refs = { #‘gkno_code’: { # значения берем по foreign key из модели Gkno # ‘fields’: [Gkno.code_gkno], # поле поиска # ‘minimum_input_length’: 0, # ‘placeholder’: ‘Выберите код отдела ГКНО’, # ‘page_size’: 10, #}, #‘gkno_nasvanie’: { # значения берем по foreign key из модели Gkno # ‘fields’: [Gkno.nasvanie_gkno], # ‘minimum_input_length’: 0, # ‘placeholder’: ‘Выберите название отдела ГКНО’, # ‘page_size’: 10, #}, #‘nasvanie_vodoem’: { # ‘fields’: [Vodoem.nasvanie_vodoem], # ‘minimum_input_length’: 0, # ‘placeholder’: ‘Выберите название отдела ГКНО’, # ‘page_size’: 10, #}, #} admin.add_view(VodoemModelView(Vodoem, db.session)) сделать вывод содержимого ячейки базы данных в переменной nasvanie_gkno а не записи следующего вида <Gkno 1> пример кода
2557970d12b1a778077bc8e5ad01c064
{ "intermediate": 0.22304585576057434, "beginner": 0.603630781173706, "expert": 0.17332340776920319 }
12,496
карточки при данном коде выводятся 3 в ряд по 3 ряда, а надо 6 по 2 ряда <!-- audio player --> <div class="audio-player"> <div class="audio-tracklist"> <% tracks.forEach((track, index) => { %> <% / Добавляем перенос строки после каждых 6 карточек */ %> <% if (index % 6 === 0 && index !== 0) { %> <div style="flex-basis: 100%;"></div> <% } %> <div class="audio-track" style="width: 300px; text-align: center;"> <audio id="audio-<%= index %>" src="/tracks/<%= track.filename %>"></audio> <div class="audio-track-info" onclick="togglePlay(<%= index %>)"> <div class="audio-track-image"> <img src="/img/<%= track.image_filename || 'default-track-image.png' %>" alt="<%= track.title %>"> </div> <h4><%= track.title %></h4> </div> </div> <% }); %> </div> <div class="audio-player-controls" style="display: none;"> <button class="audio-player-button" onclick="togglePlay()"> <i class="audio-player-icon fa fa-play"></i> </button> <div class="audio-player-progress-fullwidth"> <input type="range" class="progress-bar" value="0" onchange="setProgressFullwidth(this.value)"> <span class="progress-time" id="progress-time-fullwidth">0:00</span> </div> </div> </div> <!-- end --> css: /* audio player */ .audio-player { margin: 50px auto; max-width: 800px; } .audio-tracklist { display: flex; flex-direction: row; justify-content: center; align-items: center; flex-wrap: wrap; margin: 0; padding: 0; gap: 20px; list-style: none; max-width: 1320px; } .audio-track { text-align: center; flex: 1; /* добавлено свойство flex: 1 */ } .audio-track-info h4 { margin: 0; font-size: 1.2rem; } .audio-player-controls { position: fixed; bottom: 0; left: 0; width: 100%; background-color: #fff; z-index: 1; } .audio-player-button { border: none; background-color: transparent; cursor: pointer; font-size: 2rem; color: #666; margin-right: 10px; } .audio-player-progress-fullwidth { display: flex; flex-direction: row; justify-content: center; align-items: center; flex-grow: 1; } .audio-player-progress-fullwidth input[type="range"] { flex-grow: 1; margin: 0 10px; -webkit-appearance: none; background-color: #eee; height: 4px; border-radius: 2px; } .audio-player-progress-fullwidth input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background-color: #666; margin-top: -6px; cursor: pointer; } .audio-player-progress-fullwidth .progress-time { font-size: 0.8rem; color: #666; } .audio-track-image { width: 200px; height: 200px; overflow: hidden; border-radius: 10px; } .audio-track-image img { width: 100%; height: 100%; object-fit: cover; }
67c2b5bd31e11318ee672a0bb11f3ca1
{ "intermediate": 0.3544178009033203, "beginner": 0.42172661423683167, "expert": 0.2238556444644928 }
12,497
can you know about adultvideosapi.com?
9ac3262082a870e089b976ba2127fcc8
{ "intermediate": 0.42579612135887146, "beginner": 0.3231860101222992, "expert": 0.25101789832115173 }
12,498
Forecast for the data
ff6b5c7060074b6c44fd253d683479fe
{ "intermediate": 0.3740800619125366, "beginner": 0.23871751129627228, "expert": 0.3872023820877075 }
12,499
код class Gkno(db.Model): __tablename__ = 'gkno' id_gkno = db.Column(db.Integer, primary_key=True) code_gkno = db.Column(db.Integer) nasvanie_gkno = db.Column(db.String(255)) class Vodoem(db.Model): __tablename__ = 'vodoem' id_vodoem = db.Column(db.Integer, primary_key=True) code_vodoem = db.Column(db.Integer) nasvanie_vodoem = db.Column(db.String(255)) tip_vodoem_id = db.Column(db.Integer) tip_vodoem_code = db.Column(db.Integer) tip_vodoem_nasvanie = db.Column(db.String(255)) gkno_id = db.Column(db.Integer, db.ForeignKey('gkno.id_gkno')) #gkno = db.relationship('Gkno', backref='vodoems') gkno_nasvanie = db.relationship('Gkno', backref='vodoems') gkno_code = db.Column(db.Integer) #gkno_nasvanie = db.Column(db.String(255)) class VodoemModelView(ModelView): page_size = 50 form_overrides = { 'gkno_nasvanie': SelectField } form_args = { 'gkno_nasvanie': { 'widget': Select2Widget(), 'get_label': 'nasvanie_gkno' } } form_ajax_refs = { 'gkno_nasvanie': { 'fields': ['nasvanie_gkno'] } } admin.add_view(VodoemModelView(Vodoem, db.session, endpoint='vodoem')) выводит ошибку min-test\venv\lib\site-packages\flask\app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() File "C:\WEB\flask-admin-test\venv\lib\site-packages\flask\app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File "C:\WEB\flask-admin-test\venv\lib\site-packages\flask_admin\base.py", line 69, in inner return self._run_view(f, *args, **kwargs) File "C:\WEB\flask-admin-test\venv\lib\site-packages\flask_admin\base.py", line 371, in _run_view return fn(cls=self, **kwargs) TypeError: edit_view() got an unexpected keyword argument 'cls' 127.0.0.1 - - [18/Jun/2023 13:33:26] "GET /admin/vodoem/edit/?id=1&url=/admin/vodoem/ HTTP/1.1" 500 - как исправить
bdc90126883ce13f3fca29ddf6eebf42
{ "intermediate": 0.27308356761932373, "beginner": 0.44025659561157227, "expert": 0.2866598665714264 }
12,500
Generate code for vs code extension to hit chatgpt for debugging code
2330cee2b5615a3f3f0283f895f814dd
{ "intermediate": 0.636029064655304, "beginner": 0.19688187539577484, "expert": 0.16708901524543762 }
12,501
ahk gui for crud operation in excel not open excel
4ae45565048a8d241ce277556c82bf3c
{ "intermediate": 0.38348013162612915, "beginner": 0.3168843686580658, "expert": 0.29963552951812744 }
12,502
i want a python script to scrape a youtube channel and get the uploader, the title, the date, the description of every video in a youtube channel
c41c06d2b9ed69a1c0406ff5ac994d4e
{ "intermediate": 0.38945165276527405, "beginner": 0.1841202676296234, "expert": 0.4264281392097473 }
12,503
усовершенствуй дизайн, чтоб больше было похоже на soundcloud. index: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta content="ie=edge" http-equiv="X-UA-Compatible"> <script src="/jquery/dist/jquery.min.js"></script> <script src="/jquery-ui/dist/jquery-ui.min.js"></script> <link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet"> <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> <link href="/css/main.css" rel="stylesheet"> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"> <link href="/jquery-ui/themes/base/all.css" rel="stylesheet"> <title>Home</title> </head> <body> <header class="header"> <nav class="navbar navbar-expand-lg navbar-light bg-light"> <div class="container"> <a class="navbar-brand" href="/"> <img src="/img/logo.png" alt="My Musician Site"> </a> <button aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation" class="navbar-toggler" data-target="#navbarNav" data-toggle="collapse" type="button"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav ml-auto"> <li class="nav-item"> <a class="nav-link" href="#find-musicians">Find Musicians</a> </li> <% if (!userLoggedIn) { %> <li class="nav-item"> <a class="nav-link" href="/register"><i class="fa fa-user-plus" aria-hidden="true"></i> Register</a> </li> <li class="nav-item"> <a class="nav-link" href="/login"><i class="fa fa-sign-in" aria-hidden="true"></i> Login</a> </li> <% } else { %> <li class="nav-item"> <a class="nav-link"><i class="fa fa-user" aria-hidden="true"></i> Hello, <%= username %></a> </li> <li class="nav-item"> <a class="nav-link" href="/logout"><i class="fa fa-sign-out" aria-hidden="true"></i> Logout</a> </li> <% } %> </ul> </div> </div> </nav> <div class="hero"> <div class="container"> <h1 class="hero-title">Find the Perfect Musician for Your Band or Project</h1> <p class="hero-subtitle">Join our community today and connect with talented musicians from around the world.</p> <a class="btn btn-primary btn-lg" href="/register">Register Now</a> </div> </div> </header> <main class="main"> <section class="section section-search" id="find-musicians"> <div class="container"> <h2 class="section-title"><i class="fa fa-search" aria-hidden="true"></i> Find Musicians</h2> <form class="form-search" action="/search" method="get"> <div class="form-group"> <label for="role"><i class="fa fa-users" aria-hidden="true"></i> Role:</label> <select class="form-control" id="role" name="role"> <option value="">All</option> <option value="Band">Band</option> <option value="Artist">Artist</option> </select> </div> <div class="form-group"> <label for="genre">Search by genre:</label> <select class="form-control" id="genre" name="genre"> <option value="">All</option> </select> </div> <div class="form-group"> <label for="city"><i class="fa fa-map-marker" aria-hidden="true"></i> Location:</label> <input id="city" name="city" type="text" class="form-control" autocomplete="on" value="<%= city %>" data-value=""> </div> <button class="btn btn-primary" type="submit"><i class="fa fa-search" aria-hidden="true"></i> Search</button> </form> </div> </section> <!-- AUDIO PLAYER --> <div class="audio-player"> <h1 class="nowplaying">Now playing</h1> <div class="audio-tracklist"> <% tracks.forEach((track, index) => { %> <div class="audio-track"> <audio id="audio-<%= index %>" src="/tracks/<%= track.filename %>"></audio> <div class="audio-track-image" onclick="togglePlay(<%= index %>)"> <img src="/img/<%= track.image_filename || 'default-track-image.png' %>" alt="<%= track.title %>"> </div> <h4><%= track.title %></h4> </div> <% }); %> </div> <div class="audio-player-controls" style="display: none;"> <button class="audio-player-button" onclick="togglePlay()"> <i class="audio-player-icon fa fa-play"></i> </button> <div class="audio-player-progress-fullwidth"> <input type="range" class="progress-bar" value="0" onchange="setProgressFullwidth(this.value)"> <span class="progress-time" id="progress-time-fullwidth">0:00</span> </div> </div> </div> <!-- END --> </main> <footer class="footer"> <div class="container"> <p class="text-center mb-0">My Musician Site &copy; 2023</p> </div> </footer> css: .musician-info { display: inline-block; margin-left: 10px; vertical-align: top; } .name { font-weight: bold; font-size: 1.2em; } .genre { display: block; font-size: 0.9em; color: #666; } ul li a img { max-width: 200px; height: 200px; object-fit: cover; } /* Normalize CSS */ body { margin: 0; font-family: 'Roboto', sans-serif; font-size: 16px; line-height: 1.5; } /* Header */ .header { background-color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); } .navbar-brand img { height: 50px; } /* Hero */ .hero { background-image: url('/img/hero.jpg'); background-size: cover; background-position: center; color: #fff; padding: 100px 0; } .hero-title { font-size: 48px; margin-bottom: 20px; } .nowplaying { font-size: 15px; margin-bottom: 50px; text-align: center; margin-top: 50px; } .hero-subtitle { font-size: 24px; margin-bottom: 40px; } .hero .btn-primary { background-color: #ffc107; border-color: #ffc107; } .hero .btn-primary:hover { background-color: #ffca2c; border-color: #ffca2c; } /* Search */ .section-search { background-color: #f8f9fa; padding: 80px 0; } .section-title { font-size: 36px; margin-bottom: 40px; text-align: center; } .form-search { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; max-width: 800px; margin: 0 auto; position: relative; /* add this */ } .form-search .btn-primary { position: relative; /* add this */ right: 0; /* add this */ top: 100%; /* add this */ margin-top: 20px; /* add this */ margin-left: 10px; } .form-group { margin: 10px; } .form-group select { margin-top: 10px; } .form-group label { margin-bottom: 5px; display: block; } .form-control { border-radius: 0; } .btn-primary { background-color: #ffc107; border-color: #ffc107; } .btn-primary:hover { background-color: #ffca2c; border-color: #ffca2c; } /* Results */ .section-results { padding: 80px 0; text-align: center; } /* Footer */ .footer { background-color: #212529; color: #fff; padding: 20px 0; } .footer p { margin-bottom: 0; font-size: 14px; } .footer a { color: #fff; } .footer a:hover { color: #ffc107; } /* audio player */ .audio-tracklist { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(auto, 1fr); grid-gap: 20px; list-style: none; max-width: 1200px; margin: 0 auto; padding: 0; } .audio-track { text-align: center; } .audio-track-image { width: 100%; height: 0; padding-bottom: 100%; position: relative; overflow: hidden; cursor: pointer; } .audio-track-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; } .audio-track h4 { margin: 10px 0 0; font-size: 1.2rem; } .audio-player-controls { position: fixed; bottom: 0; left: 0; width: 100%; background-color: #fff; z-index: 1; } .audio-player-button { border: none; background-color: transparent; cursor: pointer; font-size: 2rem; color: #666; margin-right: 10px; } .audio-player-progress-fullwidth { display: flex; flex-direction: row; justify-content: center; align-items: center; flex-grow: 1; } .audio-player-progress-fullwidth input[type="range"] { flex-grow: 1; margin: 0 10px; -webkit-appearance: none; background-color: #eee; height: 4px; border-radius: 2px; } .audio-player-progress-fullwidth input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background-color: #666; margin-top: -6px; cursor: pointer; } .audio-player-progress-fullwidth .progress-time { font-size: 0.8rem; color: #666; }
e491362103b6c52aba3b02bb26a6646d
{ "intermediate": 0.2525503635406494, "beginner": 0.3347000479698181, "expert": 0.41274964809417725 }
12,504
i have a code in c for stm32f103 c6 can you tell me what it does
a439303cdcbcb4f0aa68b17335721c2b
{ "intermediate": 0.40249723196029663, "beginner": 0.26579707860946655, "expert": 0.3317056894302368 }
12,505
hi
d0c41791f93e274759abb86a8854344f
{ "intermediate": 0.3246487081050873, "beginner": 0.27135494351387024, "expert": 0.40399640798568726 }
12,506
ahk gui form to show and add, update and delete to 3 column excel file without show excel application
40b677f6f859e1efec99c9afbb953ee5
{ "intermediate": 0.3844379484653473, "beginner": 0.27040714025497437, "expert": 0.34515491127967834 }
12,507
hello
729f14cdb52d452308b93a2b01fc0021
{ "intermediate": 0.32064199447631836, "beginner": 0.28176039457321167, "expert": 0.39759764075279236 }
12,508
Invoke
a5c525f8a89b3499ba51f53101a36e03
{ "intermediate": 0.2892383933067322, "beginner": 0.3787694275379181, "expert": 0.33199211955070496 }
12,509
struct sk { int a; float b; } data, *p; 若有 p = &data,则对 data 中的成员 a 的正确引用是 _____。 选择一项: A. (*p).data.a B. p.data.a C. (*p).a D. p->data.a
2c93eeb2005b6c206d6cb0fe00d34dee
{ "intermediate": 0.3269253373146057, "beginner": 0.3352450132369995, "expert": 0.33782967925071716 }
12,510
what command line converts HEIC images to jpg
cafc04a1ce8ea5d861e6bd5ac434a3cd
{ "intermediate": 0.3172086477279663, "beginner": 0.2690122723579407, "expert": 0.4137791097164154 }
12,511
give me a picture of saber in cartoon
3319f8b057116430f17ed45910200e75
{ "intermediate": 0.36742720007896423, "beginner": 0.348621666431427, "expert": 0.2839511036872864 }
12,512
Hi!
8db9ed717ff63e7a40aae4a2ffd7f66e
{ "intermediate": 0.3230988085269928, "beginner": 0.2665199935436249, "expert": 0.4103812277317047 }
12,513
Hi!
fefc813328037d52a70a59caffabeb9a
{ "intermediate": 0.3230988085269928, "beginner": 0.2665199935436249, "expert": 0.4103812277317047 }
12,514
Hi! Nice to meet you!
2542da26941ca912568d01e029397415
{ "intermediate": 0.34579595923423767, "beginner": 0.24770228564739227, "expert": 0.40650174021720886 }
12,515
"ERROR in ./src/App.js 308:25-32 export 'heroimg' (imported as 'heroimg') was not found in './hero.svg' (possible exports: ReactComponent, default)" "import { heroimg } from './hero.svg' "
b4e9ae86606edbed6dd4e67aff178500
{ "intermediate": 0.5201870203018188, "beginner": 0.25456729531288147, "expert": 0.2252456694841385 }
12,516
Please create a lua script for warcraft that targets a NPC called "Volatile Spore" and attacks it
50f859ea608c801c11aa25cdc0a5d2d2
{ "intermediate": 0.33410829305648804, "beginner": 0.27832382917404175, "expert": 0.3875678479671478 }
12,517
сделай мой сайт похожим на soundcloud. дизайн должен быть современным, отточеным, отзывчивым и красивым. index.ejs: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta content="ie=edge" http-equiv="X-UA-Compatible"> <script src="/jquery/dist/jquery.min.js"></script> <script src="/jquery-ui/dist/jquery-ui.min.js"></script> <link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet"> <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> <link href="/css/main.css" rel="stylesheet"> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"> <link href="/jquery-ui/themes/base/all.css" rel="stylesheet"> <title>Home</title> </head> <body> <header class="header"> <nav class="navbar navbar-expand-lg navbar-light bg-light"> <div class="container"> <a class="navbar-brand" href="/"> <img src="/img/logo.png" alt="My Musician Site"> </a> <button aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation" class="navbar-toggler" data-target="#navbarNav" data-toggle="collapse" type="button"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav ml-auto"> <li class="nav-item"> <a class="nav-link" href="#find-musicians">Find Musicians</a> </li> <% if (!userLoggedIn) { %> <li class="nav-item"> <a class="nav-link" href="/register"><i class="fa fa-user-plus" aria-hidden="true"></i> Register</a> </li> <li class="nav-item"> <a class="nav-link" href="/login"><i class="fa fa-sign-in" aria-hidden="true"></i> Login</a> </li> <% } else { %> <li class="nav-item"> <a class="nav-link"><i class="fa fa-user" aria-hidden="true"></i> Hello, <%= username %></a> </li> <li class="nav-item"> <a class="nav-link" href="/logout"><i class="fa fa-sign-out" aria-hidden="true"></i> Logout</a> </li> <% } %> </ul> </div> </div> </nav> <div class="hero"> <div class="container"> <h1 class="hero-title">Find the Perfect Musician for Your Band or Project</h1> <p class="hero-subtitle">Join our community today and connect with talented musicians from around the world.</p> <a class="btn btn-primary btn-lg" href="/register">Register Now</a> </div> </div> </header> <main class="main"> <section class="section section-search" id="find-musicians"> <div class="container"> <h2 class="section-title"><i class="fa fa-search" aria-hidden="true"></i> Find Musicians</h2> <form class="form-search" action="/search" method="get"> <div class="form-group"> <label for="role"><i class="fa fa-users" aria-hidden="true"></i> Role:</label> <select class="form-control" id="role" name="role"> <option value="">All</option> <option value="Band">Band</option> <option value="Artist">Artist</option> </select> </div> <div class="form-group"> <label for="genre">Search by genre:</label> <select class="form-control" id="genre" name="genre"> <option value="">All</option> </select> </div> <div class="form-group"> <label for="city"><i class="fa fa-map-marker" aria-hidden="true"></i> Location:</label> <input id="city" name="city" type="text" class="form-control" autocomplete="on" value="<%= city %>" data-value=""> </div> <button class="btn btn-primary" type="submit"><i class="fa fa-search" aria-hidden="true"></i> Search</button> </form> </div> </section> <!-- AUDIO PLAYER --> <div class="audio-player"> <h1 class="nowplaying">Now playing</h1> <div class="audio-tracklist"> <% tracks.forEach((track, index) => { %> <div class="audio-track"> <audio id="audio-<%= index %>" src="/tracks/<%= track.filename %>"></audio> <div class="audio-track-image" onclick="togglePlay(<%= index %>)"> <img src="/img/<%= track.image_filename || 'default-track-image.png' %>" alt="<%= track.title %>"> </div> <h4><%= track.title %></h4> </div> <% }); %> </div> <div class="audio-player-controls" style="display: none;"> <button class="audio-player-button" onclick="togglePlay()"> <i class="audio-player-icon fa fa-play"></i> </button> <div class="audio-player-progress-fullwidth"> <input type="range" class="progress-bar" value="0" onchange="setProgressFullwidth(this.value)"> <span class="progress-time" id="progress-time-fullwidth">0:00</span> </div> </div> </div> <!-- END --> </main> <footer class="footer"> <div class="container"> <p class="text-center mb-0">My Musician Site &copy; 2023</p> </div> </footer> main.css: .musician-info { display: inline-block; margin-left: 10px; vertical-align: top; } .name { font-weight: bold; font-size: 1.2em; } .genre { display: block; font-size: 0.9em; color: #666; } ul li a img { max-width: 200px; height: 200px; object-fit: cover; } /* Normalize CSS */ body { margin: 0; font-family: 'Roboto', sans-serif; font-size: 16px; line-height: 1.5; } /* Header */ .header { background-color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); } .navbar-brand img { height: 50px; } /* Hero */ .hero { background-image: url('/img/hero.jpg'); background-size: cover; background-position: center; color: #fff; padding: 100px 0; } .hero-title { font-size: 48px; margin-bottom: 20px; } .nowplaying { font-size: 15px; margin-bottom: 50px; text-align: center; margin-top: 50px; } .hero-subtitle { font-size: 24px; margin-bottom: 40px; } .hero .btn-primary { background-color: #ffc107; border-color: #ffc107; } .hero .btn-primary:hover { background-color: #ffca2c; border-color: #ffca2c; } /* Search */ .section-search { background-color: #f8f9fa; padding: 80px 0; } .section-title { font-size: 36px; margin-bottom: 40px; text-align: center; } .form-search { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; max-width: 800px; margin: 0 auto; position: relative; /* add this */ } .form-search .btn-primary { position: relative; /* add this */ right: 0; /* add this */ top: 100%; /* add this */ margin-top: 20px; /* add this */ margin-left: 10px; } .form-group { margin: 10px; } .form-group select { margin-top: 10px; } .form-group label { margin-bottom: 5px; display: block; } .form-control { border-radius: 0; } .btn-primary { background-color: #ffc107; border-color: #ffc107; } .btn-primary:hover { background-color: #ffca2c; border-color: #ffca2c; } /* Results */ .section-results { padding: 80px 0; text-align: center; } /* Footer */ .footer { background-color: #212529; color: #fff; padding: 20px 0; } .footer p { margin-bottom: 0; font-size: 14px; } .footer a { color: #fff; } .footer a:hover { color: #ffc107; } /* последние зарегистрированные пользователи */ .musician-card { background-color: #fff; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); margin-bottom: 30px; overflow: hidden; } .musician-info { padding: 20px; } .musician-info h3 { margin-top: 0; } .musician-info p { margin-bottom: 10px; } .musician-link { background-color: #f2f2f2; padding: 15px; text-align: center; } .musician-link a { color: #333; display: inline-block; font-size: 16px; text-decoration: none; } /* audio player */ .audio-tracklist { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(auto, 1fr); grid-gap: 20px; list-style: none; max-width: 1200px; margin: 0 auto; padding: 0; } .audio-track { text-align: center; } .audio-track-image { width: 100%; height: 0; padding-bottom: 100%; position: relative; overflow: hidden; cursor: pointer; } .audio-track-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; } .audio-track h4 { margin: 10px 0 0; font-size: 1.2rem; } .audio-player-controls { position: fixed; bottom: 0; left: 0; width: 100%; background-color: #fff; z-index: 1; } .audio-player-button { border: none; background-color: transparent; cursor: pointer; font-size: 2rem; color: #666; margin-right: 10px; } .audio-player-progress-fullwidth { display: flex; flex-direction: row; justify-content: center; align-items: center; flex-grow: 1; } .audio-player-progress-fullwidth input[type="range"] { flex-grow: 1; margin: 0 10px; -webkit-appearance: none; background-color: #eee; height: 4px; border-radius: 2px; } .audio-player-progress-fullwidth input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background-color: #666; margin-top: -6px; cursor: pointer; } .audio-player-progress-fullwidth .progress-time { font-size: 0.8rem; color: #666; }
5caffc66e36b08c8a57318fe9e104d98
{ "intermediate": 0.27041181921958923, "beginner": 0.4309462606906891, "expert": 0.29864197969436646 }
12,518
what do think AI
35b1574d14f4be98abf71216ab0f15fe
{ "intermediate": 0.05502041429281235, "beginner": 0.0485415980219841, "expert": 0.8964380025863647 }
12,519
I want to calculate Ellrod index in python. Ellrod index is one of the turbulence indexes. give me the script in python to calculate Ellrod index.
d842b8c7ccea16c430b54181d949a3c4
{ "intermediate": 0.375428706407547, "beginner": 0.15069207549095154, "expert": 0.47387924790382385 }
12,520
how to calculate Vertical wind shear with gfs data in python
6f52b2ab55a456d67689bc766b8968ce
{ "intermediate": 0.3516649305820465, "beginner": 0.15982769429683685, "expert": 0.48850739002227783 }
12,521
does tqdm library need to be installed?
0f2dc05d2efb6315380ba18e3037984e
{ "intermediate": 0.6600270867347717, "beginner": 0.09666644781827927, "expert": 0.2433064579963684 }
12,522
I have below html: <div id="imgcontainer"> <img src="image.jpg">
93d611b6c94239e73a73003fa446f5a4
{ "intermediate": 0.3458988666534424, "beginner": 0.2412889450788498, "expert": 0.41281214356422424 }
12,523
Can you show an example script using https://git.tinkr.site/Bastion/Bastion where it will target "Volatile Spore"
3c342706c61cc0a88fb82ad15a8f51af
{ "intermediate": 0.3904838562011719, "beginner": 0.16331808269023895, "expert": 0.44619807600975037 }
12,524
how to handle multiple data choices in JavaScript
5be0eddfe69aa87c1b44da68cbb50378
{ "intermediate": 0.6132307052612305, "beginner": 0.22958695888519287, "expert": 0.15718232095241547 }
12,525
what the difference between Chat GPT and Google Brower
fbb287f6dc7a1b9c3ffa26f4f490a520
{ "intermediate": 0.3876708447933197, "beginner": 0.16779157519340515, "expert": 0.44453760981559753 }
12,526
code documentaction
0b6cf70a1487d0160f7a62b8ba7841c0
{ "intermediate": 0.3162233531475067, "beginner": 0.32956987619400024, "expert": 0.35420680046081543 }
12,527
how to display an svg image in reactJSX
1f5b759501e9b85ffbea3bf1801e3263
{ "intermediate": 0.5038027763366699, "beginner": 0.2319919764995575, "expert": 0.2642052173614502 }
12,528
hi
7535300cf2ae93a266d73c4ffb1f9a5b
{ "intermediate": 0.3246487081050873, "beginner": 0.27135494351387024, "expert": 0.40399640798568726 }
12,529
other ways to say 1) The effect is real
3832e8dd6a3b8a674a4cdfc012c1e4e9
{ "intermediate": 0.32582369446754456, "beginner": 0.4294372498989105, "expert": 0.24473901093006134 }
12,530
multilateral netting algorithm to clear payments
cf953c4204c9eef558ce8beb44f68f96
{ "intermediate": 0.1473103165626526, "beginner": 0.09862388670444489, "expert": 0.754065752029419 }
12,531
Design a hero section for a reactJs landing page using antDesign. Make the hero section appealing, responsive and modern.
2baed7d34505d53c9674e1b8b2abdfa1
{ "intermediate": 0.3224354088306427, "beginner": 0.3043445646762848, "expert": 0.3732200264930725 }
12,532
there is an error on my emoji discord list code const emojiiList = { ‘7457quintsitsuki’ : ‘bton’ }
72b8afda83580a141449de8fc1abcc87
{ "intermediate": 0.3107250928878784, "beginner": 0.3467993438243866, "expert": 0.342475563287735 }
12,533
what can you do in code development
e040cbc68c6f3fe111cc08369165f842
{ "intermediate": 0.4692147970199585, "beginner": 0.2404756098985672, "expert": 0.2903095781803131 }
12,534
who is working on the Ecompensa system in Portugal
835695bac799351d467e67cc4f055a31
{ "intermediate": 0.21345698833465576, "beginner": 0.1251949965953827, "expert": 0.6613479852676392 }
12,536
I have a table inserted in a word macro enabled document. Is there a way to highlight cells in the table if their value is zero 0
40372a7de42044b4fc8136c9c9531c90
{ "intermediate": 0.4588916003704071, "beginner": 0.2331613004207611, "expert": 0.3079470992088318 }
12,537
hello I'm using vb.net and SQL Server as database can you please tell me the right statment to delete a full table data ?
57c6d907e29c1119d35d8378dcb5f180
{ "intermediate": 0.420701265335083, "beginner": 0.2949329614639282, "expert": 0.28436580300331116 }
12,538
generate a js code to connect to huggingface websocket and parse the results
e3575e497163680fac37b19c1dc2dea4
{ "intermediate": 0.5308277606964111, "beginner": 0.20902276039123535, "expert": 0.2601494789123535 }
12,539
> install.packages("clusterProfiler") WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding: https://cran.rstudio.com/bin/windows/Rtools/ Warning in install.packages : package ‘clusterProfiler’ is not available for this version of R A version of this package for your version of R might be available elsewhere, see the ideas at https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
6e7b8242bc239f5f1a92a337b86a127e
{ "intermediate": 0.3744870126247406, "beginner": 0.20209433138370514, "expert": 0.42341870069503784 }
12,540
how to solve this error : Failed to initialize QAudioOutput "Could not find the autoaudiosink GStreamer element"
26ecf1e4a31a8f875ecad768d752be6d
{ "intermediate": 0.6223166584968567, "beginner": 0.07788696885108948, "expert": 0.29979637265205383 }
12,541
this is my questions model in efcore dotnet public class Question { public int Id { get; set; } } public class TrueFalseQuestion { public int Id { get; set; } public required string Text { get; set; } public bool Answer { get; set; } // foreign key to parent public int QuestionId { get; set; } } public class FillBlanksQuestion { public int Id { get; set; } public required string Text { get; set; } public required ICollection<FillBlanksAnswer> Answers { get; set; } // foreign key to parent public int QuestionId { get; set; } } // more types like multiple choice, short answer, essay question, etc this is the quiz model: public class Quiz { public int Id { get; set; } // other props public required ICollection<Question> Questions { get; set; } } How can I query all quiz questions including all types using linq?
6bbdc57689d31e844e127527f8ae324d
{ "intermediate": 0.5871040225028992, "beginner": 0.22192120552062988, "expert": 0.19097481667995453 }
12,542
Hello, I want my React Form.Control type="date" to show the date inside the box as yyyy-mm-dd and not default browser behaviour. How can I force it?
cbbdc4efd0f63d297a8d6e1e629395af
{ "intermediate": 0.6250817179679871, "beginner": 0.19387027621269226, "expert": 0.18104799091815948 }
12,543
how to set default text to textarea
18464ec8410f2e15bfea68df31689784
{ "intermediate": 0.36724579334259033, "beginner": 0.3628613352775574, "expert": 0.2698928415775299 }
12,544
how can I auto size a picture to fit in a picture box in vb.net 2010
6c5202abfdc7e01b5c5750842c0713a4
{ "intermediate": 0.35367658734321594, "beginner": 0.2520749568939209, "expert": 0.39424845576286316 }
12,545
write for me a py script to create my own chatgpt offline
74d3126f59d4cd70e485b9dcd36993fa
{ "intermediate": 0.4810439348220825, "beginner": 0.2554498314857483, "expert": 0.2635062038898468 }
12,546
Write kubernets yaml files to deploy nginx:1.25 and expose usign service
5da72496e9888d34f0c8da417aba23d7
{ "intermediate": 0.36292821168899536, "beginner": 0.25898152589797974, "expert": 0.3780902624130249 }
12,547
Who is the owner of openAI ?
e5543d53f84bdf832dd8c1a92601dc61
{ "intermediate": 0.22703655064105988, "beginner": 0.1195344403386116, "expert": 0.6534290313720703 }
12,548
use xml library in Flutter to find node <w:tbl>.....</w:tbl> and remove it all data in node
d2c81e7c929621e8d99704464febbbb2
{ "intermediate": 0.7339072227478027, "beginner": 0.11655651032924652, "expert": 0.14953626692295074 }
12,549
i have a php array $arr = ['a','b','c']. I want to make a string $str = "a | b | c" from this array. how to do it?
5ec5bf107e4f211dd6fa8ea215a2befc
{ "intermediate": 0.46013689041137695, "beginner": 0.3112429678440094, "expert": 0.22862014174461365 }
12,550
I want to make bot respond to my emoji reaction and give role discord js
3dab567cfaeb9a7dc0a9055b84ded02e
{ "intermediate": 0.27911990880966187, "beginner": 0.3274340331554413, "expert": 0.39344605803489685 }
12,551
write sql\
30414f837a9e7a31a42b80c38f595601
{ "intermediate": 0.2802751660346985, "beginner": 0.4448384642601013, "expert": 0.27488628029823303 }
12,552
<!DOCTYPE html> <html> <head> <title>Shader Example</title> <style> body { margin: 0; overflow: hidden; } canvas { display: block; } </style> </head> <body> <canvas id="canvas"></canvas> <script type="x-shader/x-fragment" id="fragmentShader"> #define LOOK 1 mat3 setCamera( in vec3 ro, in vec3 ta, float cr ) { vec3 cw = normalize(ta-ro); vec3 cp = vec3(sin(cr), cos(cr),0.0); vec3 cu = normalize( cross(cw,cp) ); vec3 cv = normalize( cross(cu,cw) ); return mat3( cu, cv, cw ); } float noise( in vec3 x ) { vec3 p = floor(x); vec3 f = fract(x); f = f*f*(3.0-2.0*f); #if NOISE_METHOD==0 x = p + f; return textureLod(iChannel2,(x+0.5)/32.0,0.0).x*2.0-1.0; #endif #if NOISE_METHOD==1 vec2 uv = (p.xy+vec2(37.0,239.0)*p.z) + f.xy; vec2 rg = textureLod(iChannel0,(uv+0.5)/256.0,0.0).yx; return mix( rg.x, rg.y, f.z )*2.0-1.0; #endif #if NOISE_METHOD==2 ivec3 q = ivec3(p); ivec2 uv = q.xy + ivec2(37,239)*q.z; vec2 rg = mix(mix(texelFetch(iChannel0,(uv )&255,0), texelFetch(iChannel0,(uv+ivec2(1,0))&255,0),f.x), mix(texelFetch(iChannel0,(uv+ivec2(0,1))&255,0), texelFetch(iChannel0,(uv+ivec2(1,1))&255,0),f.x),f.y).yx; return mix( rg.x, rg.y, f.z )*2.0-1.0; #endif } #if LOOK==0 float map( in vec3 p, int oct ) { vec3 q = p - vec3(0.0,0.1,1.0)*iTime; float g = 0.5+0.5*noise( q*0.3 ); float f; f = 0.50000*noise( q ); q = q*2.02; #if USE_LOD==1 if( oct>=2 ) #endif f += 0.25000*noise( q ); q = q*2.23; #if USE_LOD==1 if( oct>=3 ) #endif f += 0.12500*noise( q ); q = q*2.41; #if USE_LOD==1 if( oct>=4 ) #endif f += 0.06250*noise( q ); q = q*2.62; #if USE_LOD==1 if( oct>=5 ) #endif f += 0.03125*noise( q ); f = mix( f*0.1-0.75, f, g*g ) + 0.1; return 1.5*f - 0.5 - p.y; } const int kDiv = 1; // make bigger for higher quality const vec3 sundir = normalize( vec3(-1.0,0.0,-1.0) ); vec4 raymarch( in vec3 ro, in vec3 rd, in vec3 bgcol, in ivec2 px ) { // bounding planes const float yb = -3.0; const float yt = 0.6; float tb = (yb-ro.y)/rd.y; float tt = (yt-ro.y)/rd.t; // find tigthest possible raymarching segment float tmin, tmax; if( ro.y>yt ) { // above top plane if( tt<0.0 ) return vec4(0.0); // early exit tmin = tt; tmax = tb; } else { // inside clouds slabs tmin = 0.0; tmax = 60.0; if( tt>0.0 ) tmax = min( tmax, tt ); if( tb>0.0 ) tmax = min( tmax, tb ); } // dithered near distance float t = tmin + 0.1*texelFetch( iChannel1, px&1023, 0 ).x; // raymarch loop vec4 sum = vec4(0.0); for( int i=0; i<190*kDiv; i++ ) { // step size float dt = max(0.05,0.02*t/float(kDiv)); // lod #if USE_LOD==0 const int oct = 5; #else int oct = 5 - int( log2(1.0+t*0.5) ); #endif // sample cloud vec3 pos = ro + t*rd; float den = map( pos,oct ); if( den>0.01 ) // if inside { // do lighting float dif = clamp((den - map(pos+0.3*sundir,oct))/0.3, 0.0, 1.0 ); vec3 lin = vec3(0.65,0.65,0.75)*1.1 + 0.8*vec3(1.0,0.6,0.3)*dif; vec4 col = vec4( mix( vec3(1.0,0.95,0.8), vec3(0.25,0.3,0.35), den ), den ); col.xyz *= lin; // fog col.xyz = mix(col.xyz,bgcol, 1.0-exp2(-0.075*t)); // composite front to back col.w = min(col.w*8.0*dt,1.0); col.rgb *= col.a; sum += col*(1.0-sum.a); } // advance ray t += dt; // until far clip or full opacity if( t>tmax || sum.a>0.99 ) break; } return clamp( sum, 0.0, 1.0 ); } vec4 render( in vec3 ro, in vec3 rd, in ivec2 px ) { float sun = clamp( dot(sundir,rd), 0.0, 1.0 ); // background sky vec3 col = vec3(0.76,0.75,0.86); col -= 0.6*vec3(0.90,0.75,0.95)*rd.y; col += 0.2*vec3(1.00,0.60,0.10)*pow( sun, 8.0 ); // clouds vec4 res = raymarch( ro, rd, col, px ); col = col*(1.0-res.w) + res.xyz; // sun glare col += 0.2*vec3(1.0,0.4,0.2)*pow( sun, 3.0 ); // tonemap col = smoothstep(0.15,1.1,col); return vec4( col, 1.0 ); } #else float map5( in vec3 p ) { vec3 q = p - vec3(0.0,0.1,1.0)*iTime; float f; f = 0.50000*noise( q ); q = q*2.02; f += 0.25000*noise( q ); q = q*2.03; f += 0.12500*noise( q ); q = q*2.01; f += 0.06250*noise( q ); q = q*2.02; f += 0.03125*noise( q ); return clamp( 1.5 - p.y - 2.0 + 1.75*f, 0.0, 1.0 ); } float map4( in vec3 p ) { vec3 q = p - vec3(0.0,0.1,1.0)*iTime; float f; f = 0.50000*noise( q ); q = q*2.02; f += 0.25000*noise( q ); q = q*2.03; f += 0.12500*noise( q ); q = q*2.01; f += 0.06250*noise( q ); return clamp( 1.5 - p.y - 2.0 + 1.75*f, 0.0, 1.0 ); } float map3( in vec3 p ) { vec3 q = p - vec3(0.0,0.1,1.0)*iTime; float f; f = 0.50000*noise( q ); q = q*2.02; f += 0.25000*noise( q ); q = q*2.03; f += 0.12500*noise( q ); return clamp( 1.5 - p.y - 2.0 + 1.75*f, 0.0, 1.0 ); } float map2( in vec3 p ) { vec3 q = p - vec3(0.0,0.1,1.0)*iTime; float f; f = 0.50000*noise( q ); q = q*2.02; f += 0.25000*noise( q );; return clamp( 1.5 - p.y - 2.0 + 1.75*f, 0.0, 1.0 ); } const vec3 sundir = vec3(-0.7071,0.0,-0.7071); #define MARCH(STEPS,MAPLOD) for(int i=0; i<STEPS; i++) { vec3 pos = ro + t*rd; if( pos.y<-3.0 || pos.y>2.0 || sum.a>0.99 ) break; float den = MAPLOD( pos ); if( den>0.01 ) { float dif = clamp((den - MAPLOD(pos+0.3*sundir))/0.6, 0.0, 1.0 ); vec3 lin = vec3(1.0,0.6,0.3)*dif+vec3(0.91,0.98,1.05); vec4 col = vec4( mix( vec3(1.0,0.95,0.8), vec3(0.25,0.3,0.35), den ), den ); col.xyz *= lin; col.xyz = mix( col.xyz, bgcol, 1.0-exp(-0.003*t*t) ); col.w *= 0.4; col.rgb *= col.a; sum += col*(1.0-sum.a); } t += max(0.06,0.05*t); } vec4 raymarch( in vec3 ro, in vec3 rd, in vec3 bgcol, in ivec2 px ) { vec4 sum = vec4(0.0); float t = 0.05*texelFetch( iChannel1, px&255, 0 ).x; MARCH(40,map5); MARCH(40,map4); MARCH(30,map3); MARCH(30,map2); return clamp( sum, 0.0, 1.0 ); } vec4 render( in vec3 ro, in vec3 rd, in ivec2 px ) { // background sky float sun = clamp( dot(sundir,rd), 0.0, 1.0 ); vec3 col = vec3(0.6,0.71,0.75) - rd.y*0.2*vec3(1.0,0.5,1.0) + 0.15*0.5; col += 0.2*vec3(1.0,.6,0.1)*pow( sun, 8.0 ); // clouds vec4 res = raymarch( ro, rd, col, px ); col = col*(1.0-res.w) + res.xyz; // sun glare col += vec3(0.2,0.08,0.04)*pow( sun, 3.0 ); return vec4( col, 1.0 ); } #endif void mainImage( out vec4 fragColor, in vec2 fragCoord ) { vec2 p = (2.0*fragCoord-iResolution.xy)/iResolution.y; vec2 m = iMouse.xy /iResolution.xy; // camera vec3 ro = 4.0*normalize(vec3(sin(3.0*m.x), 0.8*m.y, cos(3.0*m.x))) - vec3(0.0,0.1,0.0); vec3 ta = vec3(0.0, -1.0, 0.0); mat3 ca = setCamera( ro, ta, 0.07*cos(0.25*iTime) ); // ray vec3 rd = ca * normalize( vec3(p.xy,1.5)); fragColor = render( ro, rd, ivec2(fragCoord-0.5) ); } </script> <script> // Get the shader code from the script tag var fragmentShaderCode = document.getElementById("fragmentShader").textContent; // Initialize WebGL context var canvas = document.getElementById("canvas"); var gl = canvas.getContext("webgl"); if (!gl) { console.error("WebGL is not supported."); return; } // Create shader program var vertexShaderCode = ` void main() { gl_Position = vec4(0, 0, 0, 1); } `; var vertexShader = gl.createShader(gl.VERTEX_SHADER); gl.shaderSource(vertexShader, vertexShaderCode); gl.compileShader(vertexShader); var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER); gl.shaderSource(fragmentShader, fragmentShaderCode); gl.compileShader(fragmentShader); var program = gl.createProgram(); gl.attachShader(program, vertexShader); gl.attachShader(program, fragmentShader); gl.linkProgram(program); gl.useProgram(program); // Set up the vertex buffer var positionAttributeLocation = gl.getAttribLocation(program, "a_position"); var positionBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer); gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]), gl.STATIC_DRAW); gl.enableVertexAttribArray(positionAttributeLocation); gl.vertexAttribPointer(positionAttributeLocation, 2, gl.FLOAT, false, 0, 0); // Set up the resolution uniform var resolutionUniformLocation = gl.getUniformLocation(program, "iResolution"); gl.uniform2f(resolutionUniformLocation, canvas.width, canvas.height); // Set up other uniforms and variables here // Render loop function render() { gl.viewport(0, 0, canvas.width, canvas.height); gl.clearColor(0, 0, 0, 1); gl.clear(gl.COLOR_BUFFER_BIT); gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4); // Call the render function again on the next frame requestAnimationFrame(render); } // Start the render loop render(); </script> </body> </html>исправь ошибки
fde5818c7439d9847ed86267784ec0af
{ "intermediate": 0.2694861888885498, "beginner": 0.5314214825630188, "expert": 0.19909238815307617 }
12,553
"Anonymous 06/18/23(Sun)02:41:46 No.31513635▶>>31513707 >>31515331" With sed, how can I keep only "No.31513635" and delete everything else? This needs to work with any number before "▶".
bb3e16feb41b29d2386d91f70325893b
{ "intermediate": 0.34787094593048096, "beginner": 0.3136749267578125, "expert": 0.33845415711402893 }
12,554
Can you write me a guide for a complete newb, to get started with flutter.
d56f5ec61ec162bc3de6460f13c5fcfc
{ "intermediate": 0.4803679883480072, "beginner": 0.2637706995010376, "expert": 0.2558613121509552 }
12,555
I want to create matrix Input_2010 to Input_2060, write code for matlab.
cb6b16e0c0039fe8f25b00157e2319c7
{ "intermediate": 0.37875330448150635, "beginner": 0.18240660429000854, "expert": 0.4388400614261627 }