Stop being the product.
Become the owner.
fbAdvice on Background or Color selection and removal/change Hello everyone, So I've been trying to find the most accurate way to remove a certain color from an image (mostly for the purpose of removing the background but if there's a way to also select that color and replace it with another or adjust it for flexibility and allowing for other possibilities and usage purposes in the future that would be very cool also) I've tried many A.I. ackground removal tools and although they're easy and quick, They're not as accurate as I'm hoping for. I've tried GIMP's select by color by but no matter how much I adjust that settings there's either a trace of the color left or if I increase the tolerence a bit too much the other colors around it start getting selected which is very frustrating to say the least. Is there any straightforward method to select a color from an image (let's say by hexcode maybe, so #FFFFFF or the color white for example) and then remove it or replace it ? Thanks for your time reading this! #art
Eor)errray ban ...= = = []ectedFse=e ample.x= "e=Er)errarraan=rue; = al= =svent.= e==x");"0i1;+ =); : 0=:7 8.544L}}8-132;/h6&}}&l}"x""0i1+=:=:4}}5120143}Vue js CSS animation re-render Hello everyone, I am not an expert in Vue JS, I am learning for 1-2 weeks. I have a component where you upload the xls/xlsx file and if there are error in it? it display in another component. when everything is correct in the file then it displays a success check with animation. so the problem is about preventing the animation. i have 5 steps in the component and when change the step and then come back to step where i have success? it animates again but I want to prevent it. I can actually prevent it but now I face with another issue. when I reupload a file on succeed step it does not display the success check with animation. can anyone help me? this is the component where I display the errors and the success animation <template> <div class="accordion" v-if="items.length > 0"> <!-- Accordion Items --> <div v-for="(item, index) in items" :key="index" class="accordion-item" :class="{ 'accordion-item-active': activeIndexes.includes(index) " > <div class="accordion-header" ="toggleAccordion(index)"> <div class="head-and-total"> <h6>{{ item.sheet }}</h6> <span class="total"> ( <span>{{ sheetErrorCounts[index] }}</span> ) </span> </div> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> <path fill="#ffffff" d="M233.4 105.4c12.5-12.5 2.8-12.5 5.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 2.5-45.3 L256 173.3 86.6 342.6c-12.-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z" /> </svg> </div> <div class="accordion-content" :ref="'content' + index"> <div class="table"> <div class="headers"> <div class="no"><h4>№</h4></div> <div class="line"></div> <div class="location"><h4>Xəta xanası:</h4></div> <div class="line"></div> <div class="error"><h4>Xəta:</h4></div> </div> <li v-for="(error, errIndex) in item.errors" :key="errIndex" class="myLi" > <div class="no"> <span>{{ errIndex + 1 }}. </span> </div> <div class="line"></div> <div class="location"> <span>{{ error.location } </span> </div> <div class="line"></div> <div class="error"> <span>{{ error.message }</span> </div> </li> </div> </div> </div> </div> <div v-else class="empty"> <div v-if="stepTrue"> <div class="main-container"> <div class="check-container animated" > <div class="check-background"> <svg viewBox="0 0 65 51" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M7 25L27.3077 4L58.5 7" stroke="white" stroke-width="13" stroke-linecap="round" stroke-linejoin="round" /> </svg> </div> <div class="check-shadow"></div> </div> </div> </div> <span v-else class="unselectable">Məlumat yoxdur</span> </div> <div class="button-container"> <button ="nextStep()"disabled="!stepTrue">Növbəti</button> </div> </template> <script> import { state } from "../state"; export default { name: "Accordion", props: { items: { type: Array, required: true, }, stepTrue: { type: Boolean, required: true, }, step: { type: Number, required: true, }, }, data() { return { activeIndexes: [], }; }, computed: { sheetErrorCounts() { return this.items.map((item) > (item.errors ? item.errors.length 0)); }, }, methods: { nextStep() { state.currentStep state.currentStep 1; }, toggleAccordion(index) { const indexPosition = this.activeIndexes.indexOf(index); if (indexPosition > -1) { this.activeIndexes.splice(indexPosition, ); } else { this.activeIndexes.push(index); } this.$nextTick(() => { this.items.forEach((item, ) => { const content = this.$refs["content" + i]?.[0]; if (content) { if (this.activeIndexes.includes(i)) { content.style.setProperty( "--height", `${content.scrollHeight + 16}px` ); } else { content.style.setProperty("--height); } } }); }); }, }, }; </script><template> <div class="accordion" v-if="items.length > 0"> <!-- Accordion Items --> <div v-for="(item, index) in items" :key="index" class="accordion-item" :class="{ 'accordion-item-active': activeIndexes.includes(index > <div class="accordion-header" ="toggleAccordion(index)"> <div class="head-and-total"> <h6>{{ itegt; <span class="total"> ( <span>{{ sheetErrorCounts[index] }}</span> ) </span> </div> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> <path fill="#ffffff" d="M233.4 105.4c12.5-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z" /> </svg> </div> <div class="accordion-content" :ref="'content' + index"> <div class="table"> <div class="headers"> <div class="no"><h4>№</h4></div> <div class="line"></div> <div class="location"><h4>Xəta xanası:</h4></div> <div class="line"></div> <div class="error"><h4>Xəta:</h4></div> </div> <li v-for="(error, errIndex) in item.errors" :key="errIndex" class="myLi" > <div class="no"> <span>{{ errIndex + 1 }}. </span> </div> <div class="line"></div> <div class="location"> <span>{{ error.location } </span> </div> <div class="line"></div> <div class="error"> <span>{{ error.message }</span> </div> </li> </div> </div> </div> </div> <div v-else class="empty"> <div v-if="stepTrue"> <div class="main-container"> <div class="check-container animated" > <div class="check-background"> <svg viewBox="0 0 65 51" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M7 25L27." stroke="white" stroke-width="13" stroke-linecap="round" stroke-linejoin="round" /> </svg> </div> <div class="check-shadow"></div> </div> </div> </div> <span v-else class="unselectable">Məlumat yoxdur</span> </div> <div class="button-container"> <button ="nextStep()"disabled="!stepTrue">Növbəti</button> </div> </template> <script> import { state } from "../state"; export default { name: "Accordion", props: { items: { type: Array, required: true, }, stepTrue: { type: Boolean, required: true, }, step: { type: Number, required: true, }, }, data() { return { activeIndexes: [], }; }, computed: { sheetErrorCounts() { return this.items.map((item) > (item.errors ? item.errors.le }, }, methods: { nextStep() { state.currentStep state.currentSte }, toggleAccordion(index) { const indexPosition = this.activeIndexes.indexOf(index); if (indexPosition > -1) { this.activeIndexes.splice(indexPosition, ); } else { this.activeIndexes.push(index); } this.$nextTick(() => { this.items.forEach((item, ) => { const content = this.$refs["content" + i]?.[0]; if (content) { if (this.activeIndexes.includes(i)) { content.style.setProperty( `${content.scrollHeight + 16}px` ); } else { content.style.setProperty("--heig } } }); }); }, }, }; </script> this is the component where I upload the file <script setup> import { ref, computed } from "vue"; import { state } from "../state"; import Accordion from "./Accordion.vue"; import Steps from "./Steps.vue"; import { toRaw } from "vue"; const selectedFile = ref(null); const downloadFile = async () => { const url = "http://localhost:3000/personalInformation/download"; fetch(url) .then((response) => { if (response.ok) return response.blob(); throw new Error("File download failed."); }) .then((blob) => { const url = window.URL.createObjectURL(blob); const a = document.createElement("a"); a.href url; a.download "example.xlsx"; document.body.appendChild(a); a.click(); a.remove(); window.URL.revokeObjectURL(url); }) .catch((error) => console.error("Error:", rror)); }; const triggerFileSelect = () => { const fileInput = document.getElementById("fileInput"); fileInput.click(); }; const handleFileChange = (event) => { selectedFile.target.files[0]; uploadFile(); }; const uploadFile = async () => { if (!selectedFile.value) { alert("Please select a file to upload."); return; } const url = "http://localhost:3000/personalInformation/upload"; const formData = new FormData(); formData.append("file", electedFile.value); try { const response = await fetch(url, { method: "POST", body: formData, }); state.stepOneData []; state.firstStepTrse; if (response.ok) { state.firstSte } const result = await response.json(); if (Array.isArray(result)) { state.stepOneData [...toRaw(state.stepOneData), ...result]; } else { console.error("Expey but received:", result); } } catch (error) { console.error("Error; } }; </script> <template> <div class="topButtons"> <h3>Əməkdaş Məlumatlarının Miqrassiyası</h3> <Steps /> <div class="buttonField"> <button ="downloadFile">Şablonxcel-i yüklə (export)</button> <input type="file" id="fileInput" ="handleFileChange" style="display: none" accept=".xlsx, .xls" /> <button id="upload" ="triggerFileSelect"> Hazır Excel-i sistemə yüklə (upload) </button> </div> </div> <div class="list"> <Accordion v-if="state.currentStep == 1" :items="state.stepOneData" :stepTrue="state.firstStepTrue" :step="1" /> </div> </template> <script setup> import { ref, computed } from "vue"; import { state } from "../state"; import Accordion from "./Accordion.vue"; import Steps from "./Steps.vue"; import { toRaw } from "vue"; const selectedFile = ref(null); const downloadFile = async () => { const url = "http://localhost:3000/personalInformation/download"; fetch(url) .then((response) => { if (response.ok) return response.blob(); throw new Error("File download failed."); }) .then((blob) => { const url = window.URL.createObjectURL(blob); const a = document.createElement("a"); a.href url; alsx"; document.body.appendChild(a); a.click(); a.remove(); window.URL.revokeObjectURL(url); }) .catch((error) => console.error("Error:", rror)); }; const triggerFileSelect = () => { const fileInput = document.getElementById("fileInput"); fileInput.click(); }; const handleFileChange = (event) => { selectedFile.value event.target.files[0]; uploadFile(); }; const uploadFile = async () => { if (!selectedFile.value) { alert("Please select a file to upload."); return; } const url = "http://localhost:3000/personalInformation/upload"; const formData = new FormData(); formData.append("ile.value); try { const response = await fetch(url, { method: "POST", body: formData, }); state.st state.firstStepTrue = false; if (response.ok) { state.firstStepTrue true; } const result = await response.json(); if (Array.isArray(result)) { state.stepOneDtoRaw(state.stepOneData), ...result]; } else { console.error("Eut received:", result); } } catch (error) { console.error("Error; } }; </script> <template> <div class="topButtons"> <h3>Əməkdaş Məlumatlarının Miqrassiyası</h3> <Steps /> <div class="buttonField"> <button ="downloadFile">Şablonxcel-i yüklə (export)</button> <input type="file" id="fileInput" ="handleFileChange" style="display: none" accept=".xlsx, .xls" /> <button id="upload" ="triggerFileSelect"> Hazır Excel-i sistemə yüklə (upload) </button> </div> </div> <div class="list"> <Accordion v-if="state.currentStep == 1" :items="state.stepOneData" :stepTrue="state.firstStepTrue" :step="1" /> </div> </template> #technology #dev #programming :"r, xpectaed at[a epOneD;ata file"l, .downlxoad :o", cte d pTrute ufe valuee ht"p, "--height", 1p ng)th 30577 2..5 m.shteet ) "p, .5
}c042 #technology 54eed026cedd0cc2637c498e32a1f=5e8854fp;smp&awebfg&;autampoo=rmat=pnp;&am36h=6dti/pr?w56d4x.pngwjyc1eview.redd.it/l02s:/tpht 8 694e616d491aa1364eead39f614062f38dd76ecs=p;am&bpeh=5ng&t=woamp;au76&format=pdtig?wd.it/cpn1.8esivl3exwjyd.riewev/pr/e8ps:b1d htt038bfae6e972f6923886cb61d1a2atb68bo56=webp&s=uap;amag&pnt=mfor;png?wipdthm=1904&a1.ycwjxrd4.reeddd./32itwvieer/p:/)tpst; h } , 5 ,evn: aiotle 3 , 84.sha dowRadi u: s 0.25, s ty:aciOpdow }, ha 2, height 0,: w: thid { st: had ofsewOf '#000', shadowColor: 15, m argi nTop: 'en ter', cjt: neontCyutifs 'te enr', ca :emst li gnI '#0300 AD',br: olondCugroa ck 20,bo rderRadius: 40 ,h : the ig 2 50,w: thid { c: intano } , er "#FFFFFcF ",olor: 16, fSize: nto { t: xte } , '#FFFFFF',b or: oundCol ackgr 'center', j ustifyContent: 'er', ntcanCoentent: lig ' ent, er'ca: Itemsnlig 1 , fex: l { vs t y le: iew Styt .cte({reale= Sheess letyc onst } ); &l t;/View> <aci; /TouchableOp A<y>t;/Text> IPD comext ossc t.texnet}>ey;Conlest={tly& extT lt; o >h}tueAlsadn={hsernPse r}aintn.cosletystyle={<y Touch ableOpacit ss. viewstyle}> yleste={ylt&w Vie l;t ( ret urn []); }, {} ; => () return h ; )rl)uk(=&bacndCallle}agt; url() { L'url'r(ene, sttLienEvdd g.an inki { => useEffect(() } ; } er ror);re, uest:'qseconding r r'Er(rrroee.ol ons { () orrerch cat} r e);'m('/Hoteaigavnr.teou pa ge ho methe to back Redirect/ / c); taa Domexcdog(lle.oson r sp .text();ea itwa= da atcmDocoext ns } ); } $ {}`enTokaccess`BA ation: iz uthor earer { h :rseade ' ',mhToGEd: et { f l,(urchtea= resp const wit a { try `//egvs?${query}`; uselfers/s2/vmcom.ohttcps://dexsandbox-api.= url const `eg ?$}`; {eryquvs/elfus/sser.dexcom.com/v2/api//ps:tht=u crl onst // } );(ng).to Srit '200:00' 024-01-02T00:e e:atdDn '2024-0-01T00:00:00', 1sDate: trat geTo CSUThis is not a school project so I am nNeed help with Dexcom API integration in a react native app using expo go Hi, I am trying to integrate a Dexcom login feature for the API in my react native app using Expo Go. The problem is that it allows me to sign in, but it won't route back to the homescreen. It also will not correctly display the authorization information. Here is my code below, anot violating any academic integrity rules. Thank you so much! import React, { useEffect } from 'react'; import { View, Text } from 'react-native'; import axios from 'axios'; import { StyleSheet, TouchableOpacity, Linking } from 'react-native'; import { useRouter } from 'expo-router'; export default function Settings() { const router = useRouter(); // const baseUrl = 'https://api.dexcom.com/v2/oauth2/'; const baseUrl = 'https://sandbox-api.dexcom.com/v2/oauth2/'; const clientId = '<cliendId>'; const redirectUri = 'com.<COMPANY>.<APPNAME>://callback'; const loginUrl = `${baseUrl}login?client_id=${clientId}&redirect_uri=${redirectUri}&response_type=code&scope=offline_access`; const handleAuth = async () => { try { Linking.openURL(loginUrl); } catch (error) { console.error(error); } }; const handleCallback = async (url: string) => { console.log('Received RL:', url); try { const [, queryString] = url.split('?'); console.log('Query tring:', queryString); const params = new URLSearchParams(queryString); const code = params.get('code'); console.log('Authorization ode:', code); if (code) { await getAccessToken(code); } } catch (error) { console.error(error); } }; const getAccessToken = async (authorizationCode: string) => { const tokenEndpoint = `${baseUrl}token`; const tokenPayload = { client_id: clientId, client_secret: '<client_secret>', code: authorizationCode, grant_type: 'authorization_code', redirect_uri: redirectUri, }; try { const tokenResponse = await axios.post(tokenEndpoint new URLSearchParams(tokenPayload), { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } } ); const { access_token } = tokenResponse.data; console.log('Accesn:', access_token); await sendRequest(access_token); } catch (error) { console.error('Error etting access token:', error); } }; const sendRequest = async (accessToken: string) => { const query = new URLSearchParams({ // YYYY-MM-DDThh:mm: ss ks , y guidance would be appreciated. P.S. source
Please enable JavaScript to continue using this application.