Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
sequence
74,884,012
2
null
67,730,877
0
null
Now, Power BI embedded analytics have the ability to embed report with a custom theme applied. 1. One can set custom theme in PBI desktop and embed the report in your app and report gets embedded with custom theme applied. 2. One can set custom theme to report on report load. When passing embedConfig at the time of embed, you can set the theme inside the embedConfig and then pass the embedConfig. Report gets loaded with custom theme applied. 3. Using API applyTheme one can set custom theme to a report at runtime // Create a theme. const theme = { "name": "Sample Theme", "dataColors": ["#990011", "#cc1144", "#ee7799", "#eebbcc", "#cc4477", "#cc5555", "#882222", "#A30E33"], "background": "#FFFFFF", "foreground": "#007799", "tableAccent": "#990011" }; // Update the theme by passing in the custom theme. // Some theme properties might not be applied if your report has custom colors set. try { await report.applyTheme({ themeJson: theme }); console.log("Custom theme applied, to remove custom theme, reload the report using 'Reload' API."); } catch (error) { console.log(error); } Refereneces: [https://learn.microsoft.com/javascript/api/overview/powerbi/apply-report-themes](https://learn.microsoft.com/javascript/api/overview/powerbi/apply-report-themes) [https://learn.microsoft.com/power-bi/create-reports/desktop-report-themes#situations-when-report-theme-colors-wont-stick-to-your-reports](https://learn.microsoft.com/power-bi/create-reports/desktop-report-themes#situations-when-report-theme-colors-wont-stick-to-your-reports)
null
CC BY-SA 4.0
null
2022-12-22T04:04:10.590
2022-12-22T04:04:43.633
2022-12-22T04:04:43.633
20,820,286
20,820,286
null
74,884,051
2
null
74,883,999
0
null
Well, in simple terms, take point `ß` that is halfway between `A` and `B`. Assuming the use of RGB colors, if `A` is red `rgb(255, 0, 0)` and `B` is yellow `rgb(255, 255, 0)`, then `ß`'s color will be halfway between these: `rgb(255, 128, 0)`, that is, orange. As you can see this can be calculated by using a weighted average per color channel - weighted by how close your point is to `A` and `B`. Here's a code example you can run right here: ``` const slider = document.getElementById("range") const between = document.getElementById("between") slider.addEventListener("input", ev => { const distFromA = ev.target.value const G = distFromA / 3.92 // Not calculating R and B values, as these don't change in this specific example const R = 255 const B = 0 between.style.background = `rgb(${R}, ${G}, ${B})` }) ``` ``` #A { background: red; color: white; } #B { background: yellow; } #between { background: gainsboro; } #between, #A, #B { display: inline-block; width: 50px; height: 50px; } ``` ``` <aside id=A>A</aside> <aside id=between>ß</aside> <aside id=B>B</aside> <nav><input type=range min=0 max=1000 id=range /></nav> ``` Do this for each pixel and you get a gradient
null
CC BY-SA 4.0
null
2022-12-22T04:12:58.023
2022-12-22T05:37:02.697
2022-12-22T05:37:02.697
579,078
579,078
null
74,884,327
2
null
74,879,278
0
null
Again I create with "npm init" and again did same process .This time no errors .I used Expo App from started instead of Web as a emulator. The reason for this problem is in web Emulator not showing some errors related to the real emulators.
null
CC BY-SA 4.0
null
2022-12-22T05:06:25.110
2022-12-22T05:06:25.110
null
null
19,736,798
null
74,884,541
2
null
74,883,951
0
null
You can do it in CSS file or by using style tag inside the head element and by giving a class to that radio button.
null
CC BY-SA 4.0
null
2022-12-22T05:44:04.807
2022-12-22T05:44:04.807
null
null
20,820,331
null
74,884,585
2
null
4,419,983
0
null
I got ERROR: [](https://i.stack.imgur.com/5JrQ1.png) RESOLUTION : 1. in file eclipse.ini at below location : 2. make change as : -vm C:/Program Files/Java/jdk1.8.0_251/jre/bin/server/jvm.dll [](https://i.stack.imgur.com/I5XHX.png) Restart eclipse and error will be resolved
null
CC BY-SA 4.0
null
2022-12-22T05:49:57.823
2022-12-22T05:49:57.823
null
null
8,669,765
null
74,884,702
2
null
74,884,651
1
null
access like this: `timeGroup[formattedDate]` you need to use formattedDate value to get from the object.
null
CC BY-SA 4.0
null
2022-12-22T06:07:26.697
2022-12-22T06:07:26.697
null
null
20,760,580
null
74,884,734
2
null
74,884,275
0
null
First define a pseudo class root ``` :root { --color-val: blue; } ``` Note: In order to use the `--color-val` you need to write it as `color: var(--color-var)` in CSS --- Second use JavaScript to update the variable `--color-val` ``` let colors = var root = document.querySelector(':root'); const delay = ms => new Promise(res => setTimeout(res, ms)); const colorChange = async () => { await delay(1000); color = colors[Math.floor(Math.random() * colors.length)] console.log(color) root.style.setProperty('--color-val', color); }; colorChange() ``` Note: - [CodePen](https://codepen.io/hatguy68/pen/NWBPQaM)-
null
CC BY-SA 4.0
null
2022-12-22T06:11:30.173
2022-12-22T06:11:30.173
null
null
14,094,095
null
74,884,752
2
null
74,884,275
1
null
``` const boxes = document.querySelectorAll(".box"); const colors = ['red', 'blue', 'green', 'yellow', 'orange', 'violet'] boxes.forEach((box) => { const insideContent = box.innerText; box.style.border = `6px solid ${colors[insideContent]}` }) ``` ``` #app { display: flex; } .box { width: 50px; height: 50px; margin: 10px; background-color: cyan; display: flex; justify-content: center; align-items: center; } ``` ``` <div id="app"> <div class="box">1</div> <div class="box">2</div> <div class="box">3</div> </div> ``` As per your question I think this is what you are trying to achieve.
null
CC BY-SA 4.0
null
2022-12-22T06:13:59.050
2022-12-22T06:20:57.637
2022-12-22T06:20:57.637
8,635,479
8,635,479
null
74,884,792
2
null
74,883,951
0
null
Try this! ``` input[type="radio"] { /* ...existing styles */ display: flex; align-items: center; justify-content: center; } input[type="radio"]::before { content: ""; color: green; width: 1em; height: 1em; border-radius: 50%; transform: scale(.5); transition: 120ms transform ease-in-out; box-shadow: inset 1em 1em green; } ``` ``` <html> <body> <label>Radio Button</label> <input type="radio"> </body> </html> ```
null
CC BY-SA 4.0
null
2022-12-22T06:19:04.037
2022-12-22T06:19:04.037
null
null
16,612,350
null
74,884,853
2
null
74,883,951
0
null
You can use [accent-color](https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color) property ``` .green { accent-color: green; } ``` ``` <h3>group 1</h3> <input class="green" name="group1" type="radio" /> <input class="green" name="group1" type="radio" checked/> <h3>group 2</h3> <input class="green" name="group2" type="radio" checked/> <input class="green" name="group2" type="radio" checked/> <h3>group 3</h3> <input class="green" name="group3" type="radio" /> <input class="green" name="group3" type="radio" /> ``` If you want to use css counter to show number ``` .green { --size: 16px; width: var(--size); height: var(--size); accent-color: green; counter-increment: radioGreen; display: flex; align-items: center; } .green::after { margin-left: calc(var(--size) * 1.2); content: "No." counter(radioGreen, decimal-leading-zero); } .radio-group { display: flex; flex-direction: column; align-items: flex-start; counter-reset: radioGreen; } ``` ``` <div class="radio-group"> <h3>Group 1</h3> <input class="green" name="group1" type="radio" /> <input class="green" name="group1" type="radio" /> <input class="green" name="group1" type="radio" /> </div> <div class="radio-group"> <h3>Group 2</h3> <input class="green" name="group2" type="radio" /> <input class="green" name="group2" type="radio" /> <input class="green" name="group2" type="radio" /> </div> ```
null
CC BY-SA 4.0
null
2022-12-22T06:27:52.727
2022-12-22T06:37:21.017
2022-12-22T06:37:21.017
14,813,577
14,813,577
null
74,885,081
2
null
74,884,859
1
null
You need to do some changes to your code as below: ``` <mat-selection-list #list [(ngModel)]="selectedOptions" (ngModelChange)="selectUnselectAll($event)"> <mat-list-option *ngFor="let custom of filteredRows | orderBy: 'fieldHebKey'" [value]="custom.fieldHebKey"> {{custom.fieldHebKey}} </mat-list-option> </mat-selection-list> ``` Please let me know if any help required.
null
CC BY-SA 4.0
null
2022-12-22T07:00:38.180
2022-12-22T07:00:38.180
null
null
7,229,299
null
74,885,125
2
null
74,884,293
0
null
You can import source file using the 'Attach Source' button and selecting corresponding 'sources.jar' files. Ex. For WebDriver.class - click on the 'Attach Source' button > in Source Attachment Configuration window > External location > External File button > <navigate to the path of 'selenium-api-4.7.2-sources.jar' file and select that file, it will be available in the 'selenium-java-4.7.2.zip' file which you downloaded from Selenium.dev website> My suggestion is to use 'Maven' project, so you don't need to download the jar files manually.
null
CC BY-SA 4.0
null
2022-12-22T07:07:01.907
2022-12-22T07:07:01.907
null
null
7,671,727
null
74,885,637
2
null
74,885,341
2
null
You have to import it in child module separately, if that module will use at least one item from the module. That being said, you should consider having Shared module at all, since it's a bad practice. Imagine you have 20 items in your Shared module, and some of you child modules will use only one item from it. Well, you will have to import the whole Shared module (even you will use only one item from it), which will increase the final bundle for your child module and decrease the performance.
null
CC BY-SA 4.0
null
2022-12-22T08:03:54.743
2022-12-22T10:09:53.587
2022-12-22T10:09:53.587
14,389,830
14,389,830
null
74,885,721
2
null
74,881,686
0
null
Are the two machines the same version of the extension? Please make sure to install the latest version of . You can also ignore these errors using the following configuration. ``` "python.analysis.diagnosticSeverityOverrides": { "reportOptionalMemberAccess": "none", "reportUnboundVariable": "none" }, ```
null
CC BY-SA 4.0
null
2022-12-22T08:11:05.950
2022-12-22T08:11:05.950
null
null
19,133,920
null
74,885,742
2
null
74,857,528
0
null
On another read I believe I better understand what you goal is. As indicated you can do this with conditional formatting the code can separate each group to perform the necessary calc on that group only. In this case based on your example image; the code determines each of the three group ranges and implements the a formula to calculate the differences against the appropriate 'final' cell value and apply the necessary fill colour, Green and Red for each. This code applies 6 rules for conditional formatting on the sheet. The resultant sheet is per your image except the cell in the 'value' column next to 'c2' i.e. '-7.00%'. This cell is also highlighted in Red as its -18.60% different to 11.60%. ``` from openpyxl import load_workbook from openpyxl.styles import fills from openpyxl.formatting.rule import FormulaRule def create_cf(letter, start_cell, end_cell): ### Create range for the group, from 'range+top' to one row less than the final cell cf_range = f'{letter}{start_cell}:{letter}{end_cell-1}' ### Create a dict of the conditional formatting formula and colour to go with it ### Two colour criteria Green and Red colouring_range = {f'(${letter}${end_cell}-${letter}{start_cell})<=-0.03':'00FF00', f'(${letter}${end_cell}-${letter}{start_cell})>=0.03':'FF0000'} ### Loop the dictionary and apply criteria and colour to the group range for criteria, fill_color in colouring_range.items(): ws.conditional_formatting.add(cf_range, FormulaRule( formula=[criteria], fill=fills.PatternFill("solid", bgColor=fill_color), stopIfTrue=False ) ) path = 'foo.xlsx' wb = load_workbook(path) ws = wb['Sheet1'] final_search = 'final' ## Search word to find the range and calc cell range_top = 1 ## First cell in the group range (offset by 1) values_col = 'B' ## 'Value' Column letter ### Iterate columns A looking for the 'final' search word (starting @ row 2) for rows in ws.iter_rows(min_row=2,max_col=1): for cell in rows: cv = cell.value cr = cell.row ### If cell is empty we don't want to search the value, also use to increment the top of the range row number if cv is None: range_top = cr continue ### If the search word is in the cell then use as calc cell and range end elif final_search in cv: final_cell = cr ### Call create_cf to create the conditional format create_cf(values_col, range_top+1, final_cell) wb.save(path) ``` ###-------Alternate Code-----## If you don't want to use conditional formatting and instead make the updates static; ``` from openpyxl import load_workbook from openpyxl.styles import PatternFill greenfill = PatternFill(start_color='00FF00', end_color='00FF00', fill_type="solid") redfill = PatternFill(start_color='FF0000', end_color='FF0000', fill_type="solid") def update_background(current_cell, start_cell, end_cell, range_difference): final_value = current_cell.offset(row=0, column=1).value ### Use cell offsets to find get the cell values in the group range for i in range(1, end_cell-start_cell): row_offset = end_cell-(start_cell+i) compare_value = current_cell.offset(row=-row_offset, column=1).value ### Calc the difference between final and current cells calc_difference = final_value - compare_value ### Based on difference fill background colour if calc_difference >= range_difference: current_cell.offset(row=-row_offset, column=1).fill = redfill elif calc_difference <= -range_difference: current_cell.offset(row=-row_offset, column=1).fill = greenfill path = 'foo.xlsx' wb = load_workbook(path) ws = wb['Sheet1'] final_search = 'final' ## Search word to find the range and calc cell range_top = 1 ## First cell in the group range (offset by 1) difference = 0.03 ## Compare difference value for rows in ws.iter_rows(min_row=2,max_col=1): for cell in rows: cv = cell.value cr = cell.row ### If cell is empty we don't want to search the value, also use to increment the top of the range row number if cv is None: range_top = cr continue ### If the search word is in the cell then use as calc cell and range end elif final_search in cv: final_cell = cr ### Call function to check and update cells within the group range update_background(cell, range_top, final_cell, difference) wb.save('foo.xlsx') ```
null
CC BY-SA 4.0
null
2022-12-22T08:12:49.790
2022-12-27T08:07:11.893
2022-12-27T08:07:11.893
13,302
13,664,137
null
74,885,817
2
null
74,885,109
1
null
open this file /Users/{USER_NAME}/Library/LaunchAgents/jetbrains.vmoptions.plist and then remove all `launchctl setenv "*_OPTIONS"`. save and close it. reboot your mac. now you can use jetbrain
null
CC BY-SA 4.0
null
2022-12-22T08:20:11.593
2022-12-22T08:20:11.593
null
null
8,807,871
null
74,885,832
2
null
74,605,359
0
null
I have the same problem. I was able to work around the problem by putting the font and the text in the internal memory. Since my project is done I'm back to try to solve this issue. Things that I have found out: reading out the external memory data matches the bin generated; therefore the problem has to be reading from the external flash during run time.
null
CC BY-SA 4.0
null
2022-12-22T08:21:02.763
2022-12-22T08:21:02.763
null
null
6,846,000
null
74,885,853
2
null
74,051,866
1
null
`git bisect` told me that neovim broke backward compatibility for `exists('&t_Co')` in [PR #20375](https://github.com/neovim/neovim/pull/20375). After that commit was merged, the return value of `exists('&t_Co')` changed from 1 to 0, and even [built-in color schemes were also affected](https://github.com/neovim/neovim/pull/20602). Edit: I've reported the issue at [#21499](https://github.com/neovim/neovim/issues/21499), and it is now fixed in nightly builds and the upcoming 0.8.2 release.
null
CC BY-SA 4.0
null
2022-12-22T08:22:34.363
2022-12-23T11:18:41.733
2022-12-23T11:18:41.733
5,072,722
5,072,722
null
74,886,136
2
null
74,859,712
0
null
I have come up with `=IF(A2<>A1,"top no",IF(AND(A2<>A3,ABS(C2-C1)>TIME(0,30,0)),"bottom no",IF(AND(A2<>A3,ABS(C2-C1)<TIME(0,30,0)),"bottom yes",IF(ABS(C2-C1)>TIME(0,30,0),"mid no","mid yes"))))` and `=IF(ISERROR(MATCH("*no*",K2)),"",A2)` to solve my problem
null
CC BY-SA 4.0
null
2022-12-22T08:51:39.367
2022-12-22T08:51:39.367
null
null
20,819,555
null
74,886,178
2
null
74,884,275
0
null
I apologize if I misunderstood the question. Wrote in a hurry and without beautyful visualisation, if you disassemble the principle, you can customize it. ``` h1 { display: block; margin:0 auto; text-align: center; padding-top:20%; } .container { display:flex; width: 150px; height: 150px; border: 1px solid black; z-index: 110; margin:0; margin: -10px; } .top { display:block; background-color: green; height: 24px; width: 150px; /* gorizontal top */ animation: top 1s linear; animation-fill-mode: forwards; } @keyframes top { 0% { width: 0px; } 100% { width: 150px; } } .right { background-color: green; height: 0%;/* right */ width: 32px; animation: right 1s linear; animation-fill-mode: forwards; animation-delay: 1s; z-index: 10; } @keyframes right { 0% { height: 0%; } 100% { height: 100%; } } .box { position: fixed; top: 32.5px; left: 32.5px; width: 100px; height: 100px; border: 1px solid black; margin: auto; z-index: 120; margin: -10px -10px; } .bottom { position: absolute; top: 123px; left: 150px; background-color: green; width: 0px; height: 27px; z-index: 10; animation: bottom 1s linear; animation-fill-mode: forwards; animation-delay: 2s; /* animation-direction: reverse; */ } @keyframes bottom { 0% { transform: translate(0,0); } 100% { transform: translate(-250px,0); -webkit-transform: translate(-250px,0); /** Safari & Chrome **/ -o-transform: translate(-250px,0); /** Opera **/ -moz-transform: translate(-250px,0); /** Firefox **/ width: 250px; } } .left { position: absolute; top: 122px; background-color: green; width: 25px; height: 0px; animation: left 1s linear; animation-fill-mode: forwards; animation-delay: 3s; } @keyframes left { 0% { transform: translate(0,0); } 100% { transform: translate(0,-250px); -webkit-transform: translate(0,-250px); /** Safari & Chrome **/ -o-transform: translate(0,-250px); /** Opera **/ -moz-transform: translate(0,-250px); /** Firefox **/ height: 277px; } } ``` ``` <div class='head'> <div class='container'> <div class='top'></div> <div class='box'> <h1 id='timer'> 1 </h1> </div> <div class='right'></div> <div class='bottom'></div> <div class='left'></div> </div> </div> <script type="text/javascript"> init() function init() { sec = 0; setInterval(tick, 1000); } function tick() { if (sec<3) { sec++ document.getElementById("timer"). childNodes[0].nodeValue = sec; } else { clearInterval(0); } } </script> ``` Also, instead of the SetInterval script, you can take values from your block width and height styles and output a mathematical calculation in h1 instead of a stopwatch. After your comment, I decided to do what I wrote about above. You can play with values and math, I add a snippet of another solution that changes the progress bar from the entered values within the entered range. (of course, it would be easier on react than on pure js) ``` function grade () { let grade = +document.getElementById("grade").value; let range = +document.getElementById("range").value; document.getElementById("timer").innerHTML = `${grade}/${range}`; progress(grade,range) } function progress (value, grade) { document.getElementById('1').style.backgroundColor = `white` document.getElementById("left").className = "noactive"; document.getElementById('top').style.width = `0%` document.getElementById('right').style.height = `0%` document.getElementById('bottom').style.width = `0%` let GradeValuSide = grade/4; if (value <= GradeValuSide) { document.getElementById('top').style.width = `${value/GradeValuSide*100}%` } else if (value > GradeValuSide && value <= (GradeValuSide*2)) { document.getElementById('top').style.width = `100%` document.getElementById('right').style.height = `${(value-GradeValuSide)/GradeValuSide*100}%` } else if (value >= grade/2 && value < (grade/4)*3) { document.getElementById('top').style.width = `100%` document.getElementById('right').style.height = `100%` document.getElementById('bottom').style.width = `${((((value-(GradeValuSide*2)) / GradeValuSide) *100) / 100) *27}%` } else if (value >= grade-(grade/4) /* && value < value + 1 */) { document.getElementById('top').style.width = `100%` document.getElementById('right').style.height = `100%` document.getElementById('bottom').style.width = `100%` document.getElementById('1').style.backgroundColor = `green` document.getElementById("left").className = "left"; document.getElementById('left').style.height = `${(40 - (40 * ((((value-(GradeValuSide*3)) * 100) / GradeValuSide)/ 100)))}%` } } ``` ``` h1 { font-size:20px; position: absolute; left: 40px; display: block; margin: 0 auto; align-items: center; padding-top:10%; } .container { display:flex; width: 150px; height: 150px; border: 1px solid black; margin:0; margin: -10px; } div.top { display:block; background-color: green; height: 24px; width: 0%; /* gorizontal top */ z-index:999; } div.right { position:relative; background-color: green; height: 0%;/* right */ width: 32px; z-index: 9999; } .box { position: fixed; top: 32.5px; left: 32.5px; background-color:white; width: 100px; height: 100px; border: 1px solid black; margin: auto; z-index: 120; margin: -10px -10px; } .wrap{ position: relative; } div.bottom { position: absolute; top: 123px; background-color: green; width: 0%; /* 27 = 100% */ height: 27px; float: right; right: 78vw; z-index: 100; } div.left { position: absolute; background-color: white; width: 23px; height: 40%; top: 23px; bottom: 10px; left: 0; float: top; } div.noactive { position: absolute; background-color: white; width: 23px; height: 0%; top: 23px; bottom: 10px; left: 0; float: top; } .items { margin-top: 50px; text-align: center; } .grade, .value { height: 15px; width: 50px; align-items: center; } ``` ``` <div class='head'> <div id='1' class='container'> <div id='top' class='top'></div> <div class='box'> <h1 id='timer'>1</h1> <div class='items'> value<input id='grade' class='grade' type=number oninput="grade()"/> range<input id='range' class='value' type=number oninput="grade()"/> </div> </div> <div id='right' class='right'></div> <div id='bottom' class='bottom'></div> <div id='left' class='noactive'></div> </div> </div> <script src='app.js'></script> ```
null
CC BY-SA 4.0
null
2022-12-22T08:56:30.670
2022-12-24T10:10:24.173
2022-12-24T10:10:24.173
20,836,853
20,836,853
null
74,886,767
2
null
74,865,810
0
null
Looks like you are saving UnitPrice as a number, not exactly a decimal value. Drop your table and create again modifying UnitPrice as "UnitPrice" `decimal(18,2) NOT NULL`. ``` CREATE TABLE Products( "ProductId" serial PRIMARY KEY NOT NULL, "ProductName" character varying(15) NOT NULL, "CategoryId" smallint not null, "SupplierId" text NOT NULL, "UnitPrice" decimal(18,2) NOT NULL, "UnitsInStock" SMALLINT NOT NULL, "UnitsOnOrder" SMALLINT, "ImageUrl" text ); ```
null
CC BY-SA 4.0
null
2022-12-22T09:52:43.693
2022-12-22T09:52:43.693
null
null
9,810,921
null
74,886,787
2
null
71,918,905
-1
null
Had the same issue, I just ran the vscode as admin and it worked
null
CC BY-SA 4.0
null
2022-12-22T09:53:34.853
2022-12-22T09:53:34.853
null
null
997,820
null
74,886,804
2
null
74,885,359
1
null
Replace all values of `type_struc` with `NULL` when `proprietai = 'PRIVE'` That will ensure you only ever get one 'PRIVE' output row, and so all the lengths will be aggregated. ``` SELECT s.proprietai, CASE WHEN s.proprietai = 'PRIVE' THEN NULL ELSE s.type_struc END AS type_struc, SUM(ROUND((s.lgr_reel))) as "Longueur (m)" FROM support AS s GROUP BY s.proprietai, CASE WHEN s.proprietai = 'PRIVE' THEN NULL ELSE s.type_struc END ORDER BY CASE s.proprietai WHEN 'FT' THEN 1 WHEN 'FREE MOBILE' THEN 2 WHEN 'PRIVE' THEN 3 ELSE 4 END ```
null
CC BY-SA 4.0
null
2022-12-22T09:55:31.343
2022-12-22T09:55:31.343
null
null
53,341
null
74,886,905
2
null
74,886,813
3
null
From the image that you've shared, it seems that you're trying to run pip from (IDLE) ie: inside the python interpreter. That is why it is giving an error. The python interpreter is used to run python code and that is why it is giving a syntax error because 'pip' is not a python command. 'pip' is a separate utility that is used to install python packages. So I would recommend you to try again by running the same command `pip install opencv-python` in a separate terminal window in mac or linux or cmd/powershell for windows. Also if that doesn't work, try upgrading your pip using `pip install --upgrade pip`
null
CC BY-SA 4.0
null
2022-12-22T10:05:57.743
2022-12-22T10:05:57.743
null
null
16,976,728
null
74,886,909
2
null
74,886,813
1
null
You should type `pip install opencv-python` in a terminal/shell window. You are trying to run it inside IDLE, which accepts Python code, not Shell commands.
null
CC BY-SA 4.0
null
2022-12-22T10:06:25.743
2023-02-18T12:34:53.793
2023-02-18T12:34:53.793
225,647
15,814,754
null
74,886,977
2
null
74,875,774
0
null
I'm attaching the below code that works. To get values from the selection, we need to use `tree.item(i, "values")[0]` the 0 represents the column. `i` holds this strange value `I005` is from the tree view location (If the table has 5 items it shows 5th item as `I005`). Using the above command it takes out the value inside it & that can be stored in a variable (as shown below). That strange value they are calling it as `iid` (still no idea what it is). Below is the snippet attached that works in treeview as well as Database. ``` def DeleteRecord(id_num): con = sqlite3.connect("pythontut.db") cur = con.cursor() cur.execute("DELETE FROM anno WHERE mem_id = ?", (id_num,)) con.commit() con.close() def DeleteData(): try: messageDelete = tkMessageBox.askyesno("Confirmation", "Do you want to permanently delete this record?") if messageDelete > 0: select_items = tree.selection() for i in select_items: id_num = tree.item(i, "values")[0] #Returns data inside that treeview selection column 0 (iid) print(id_num) tree.delete(i) DeleteRecord(id_num) except Exception as e: print(e) ```
null
CC BY-SA 4.0
null
2022-12-22T10:11:57.770
2022-12-22T10:11:57.770
null
null
9,733,822
null
74,887,355
2
null
74,886,578
0
null
You can use the functionality of computeLuminance ([Reference Here](https://stackoverflow.com/questions/59909746/how-to-check-brightness-of-a-background-color-to-decide-text-color-written-on-it)) Or either, Check this package [Palette Generator](https://pub.dev/packages/palette_generator)
null
CC BY-SA 4.0
null
2022-12-22T10:43:04.430
2022-12-22T10:43:04.430
null
null
8,539,289
null
74,887,397
2
null
74,871,903
1
null
You can set `x_offset` and `y_offset` for each label as you did for `x` and `y` in the `LabelSet` as long as you are using as `ColumnDataSource` as `source`. This gives you some freedom to move the in labels in different directions. There is also `text_align` which can be useful. ## Example ``` import numpy as np import pandas as pd from bokeh.plotting import output_notebook, show, figure from bokeh.models import ColumnDataSource, LabelSet from bokeh.palettes import Spectral10 output_notebook() df_dict = { 'Plans': ['ABC ValueCharge', 'Bizbazar 200CarbonNatural', 'EqualiserClient SuperSaverCombo'], 'Rating': [17, 15, 14], 'Sales': [1330.443, 1312.271, 1312.168], 'Spends': [72.49, 47.7, 13.2417514], 'x_offset': [0, -50, 70], 'y_offset': [45, -5, -5], 'text_align': ['center', 'right', 'left'] } df = pd.DataFrame.from_dict(df_dict) source = ColumnDataSource(data = df) # figure p = figure( height = 300, width = 500, x_range = (10, 20), y_range = (1300, 1350) ) p.circle(x = 'Rating', y = 'Sales', size = 'Spends',source = source,alpha = 0.8 ) p.xaxis.axis_label = "Rating" p.yaxis.axis_label = "Sales" labels = LabelSet( x='Rating', y='Sales', text='Plans', x_offset= 'x_offset', y_offset='y_offset', text_font_size = '7pt', text_align='text_align', source = source, ) p.add_layout(labels) show(p) ``` ## Output [](https://i.stack.imgur.com/UlnQB.png) ## Comment It is possible that the labels will be over and under each other if you use the zoom tools. I hope this is a useable the solution to your problem.
null
CC BY-SA 4.0
null
2022-12-22T10:46:15.747
2022-12-22T10:46:15.747
null
null
14,058,726
null
74,887,717
2
null
74,881,892
0
null
Hello and welcome on SO @bellablot. Bokeh can parse `datetime` objects, if you set `x_axis_type` to `"datetime"`. The rest does bokeh for you. To fulfill the requirements, you have to make sure your date information is parsed by [pd.read_csv()](https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html?highlight=read_csv#pandas.read_csv). You can use the parameter `parse_dates` and `infer_datetime_format`. If your DataFrame has the correct form you can apply the steps below. ## Example ### pandas It is important to add the information about the datetime format to `pd.read_csv()`, because it is possible, that the detection mode sometimes fails. In the code below, I used a regular expression to find all whitespaces with the length of 2 or more as a separator. This is because I copied your table. The separator is normally `,` or `;`. Please adapt it in your code. The StringIO section is just for demonstration. Repleace this with your path to your file. The parsed DataFrame has the correct types and can be used in bokeh steight forward. ``` from io import StringIO import pandas as pd text="""Name Date Number Drink The Fountain 30/08/2019 1 N/A The Fox & Duck 01/09/2019 2 N/A King William IV 01/09/2019 3 N/A The Prince Albert 01/09/2019 4 N/A Drayman's Son 01/09/2019 5 N/A The Sussex Arms 02/09/2019 6 N/A King Arthur's Arms Inn 03/09/2019 7 N/A Old Mary's 03/09/2019 8 Estrella x2 Mitre Lancaster Gate 03/09/2019 9 Kronenbourg The Crown 04/09/2019 10 N/A """ df = pd.read_csv( StringIO(text), sep=r'\s{2,}', # use regular expression | \s is any kind of whitespace engine='python', parse_dates=[1], date_parser=lambda x: pd.to_datetime(x, format='%d/%m/%Y'), header=0 ) ``` ### bokeh Here I import HoverTool and Span as extra models. With Span it is possible to draw vertical or horizontal lines with no end. ``` from bokeh.plotting import figure, show, output_notebook from bokeh.models import HoverTool, Span output_notebook() df = pd.DataFrame({ 'Number':list(range(10)), 'Date': pd.date_range('2022-12-22', periods=10, freq='D') }) p = figure( title="Number of Pubs", x_axis_type="datetime", plot_height = 350, plot_width = 350 ) p.xaxis.axis_label = 'Date' p.yaxis.axis_label = 'Number' p.line(x=df.Date, y=df.Number, line_color="red", line_width = 3) p.add_tools(HoverTool( tooltips = [ ('year', '@x{%Y}'), # use ('date', '@x{%Y-%m-%d}') to show more than the year ('Number of crimes', '@y') ], formatters = {"@x": "datetime"}, )) # horizontal line hspan = Span(location=4, dimension='width', line_color='#bbbbbb', line_width=2) p.add_layout(hspan) # vertical line line # vspan = Span(location=df.Date[0]+pd.Timedelta(365*2.5, 'D'), dimension='height', line_color='#bbbbbb', line_width=2) # p.add_layout(vspan) show(p) ``` ## Output [](https://i.stack.imgur.com/cGIlt.png) ## Comment This solution adds one Hovertool with one formatter to show only the year. There are many more options and you can read about it [HoverTool.formatters](https://docs.bokeh.org/en/latest/docs/reference/models/tools.html#bokeh.models.HoverTool.formatters) and [DatetimeTickFormatter](https://docs.bokeh.org/en/latest/docs/reference/models/formatters.html#bokeh.models.DatetimeTickFormatter) in the bokeh documentation.
null
CC BY-SA 4.0
null
2022-12-22T11:15:17.127
2022-12-23T11:07:49.847
2022-12-23T11:07:49.847
14,058,726
14,058,726
null
74,887,811
2
null
74,885,697
0
null
Have you tried to run the pipeline via selfhosted agent? According to this post, [Upgrade of .NET agent for Azure Pipelines](https://devblogs.microsoft.com/devops/upgrade-of-net-agent-for-azure-pipelines/), .netcore 3.1 is gradually deprecated from microsoft-hosted agent. I suppose that you could upgrade your project to dotnet 6.0 or test with [selfhosted agent](https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops).
null
CC BY-SA 4.0
null
2022-12-22T11:22:27.717
2022-12-22T11:22:27.717
null
null
18,361,074
null
74,887,846
2
null
74,884,796
0
null
While creating virtual machine in Make sure to check login with Azure Ad like below: ![enter image description here](https://i.imgur.com/kay7iiH.png) In your virtual machine check whether is added: ![enter image description here](https://i.imgur.com/uCBOwB2.png) Try to assign role assignment `Virtual Machine User Login` or `Virtual Machine Administrator Login` to user Now, Download Rdp file and login. When I tried to check with `dsregcmd /status` Azure AD joined successfully: ![enter image description here](https://i.imgur.com/Y00CzTQ.png) To Login with Azure Ad credentials account try to change access in RDP to avoid an error: In RDP -> search box type -> uncheck the box like below: ![enter image description here](https://i.imgur.com/NAUslml.png) Now edit your RDP downloaded file, try to include ``` enablecredsspsupport:i:0 authentication level:i:2 username:s:xxxxx.onmicrosoft.com (Add your username here) domain:s:AzureAD ``` ![enter image description here](https://i.imgur.com/85g7Bgn.png) When I try to connect with login `AzureAd\UPN` with user it connected successfully like below: ![enter image description here](https://i.imgur.com/UQgyUJX.png)
null
CC BY-SA 4.0
null
2022-12-22T11:25:16.747
2022-12-22T12:15:13.747
2022-12-22T12:15:13.747
18,229,970
18,229,970
null
74,887,853
2
null
32,231,036
0
null
In my own case, after going through suggestions here, I had to remove an event listener. See code below: ``` // Did not work var myInterval = setInterval(() => { selectedDiv.click(selectedDiv.toggleClass("pressed")) }, 120); selectedDiv.click(function(){ selectedDiv.removeClass('pressed') clearInterval(myInterval); }) } //Worked for me var myInterval = setInterval(() => { (selectedDiv.toggleClass("pressed") }, 120); selectedDiv.click(function(){ selectedDiv.removeClass('pressed') clearInterval(myInterval); }) } ```
null
CC BY-SA 4.0
null
2022-12-22T11:25:48.673
2022-12-22T11:25:48.673
null
null
20,079,915
null
74,888,138
2
null
74,884,355
2
null
You found an interesting way to turn seaborn's bivariate histplot into columns of univariate heatmap-like histograms. The colorbar doesn't work well, as each hue value now has a separate range. You could just create one custom colorbar (using the colormap associated to the first hue value), and instead of exact values just put a text. Setting `thresh=None` seems to choose some arbitrary default threshold, which doesn't fit your situation. You can set `thresh=10` to cut off counts below 10. Or `pthresh=0.05` to cut off counts below 5% of the maximum. ``` import matplotlib.pyplot as plt import seaborn as sns diamonds = sns.load_dataset('diamonds') blue_palette = ['blue'] * len(diamonds["clarity"].unique()) # or 'dodgerblue', which is closer to the original ax = sns.histplot(diamonds, y="price", x="clarity", log_scale=(False, True), hue="clarity", palette=blue_palette, common_norm=False, cbar=False, legend=False, thresh=10) cbar = plt.colorbar(ax.collections[0], ticks=[], label='counts') for text, y in zip(["none", "many"], [0.02, 0.98]): cbar.ax.text(1.2, y, text, transform=cbar.ax.transAxes, ha='left', va='center') plt.tight_layout() plt.show() ``` [](https://i.stack.imgur.com/vGLeD.png) Note that areas with zero count get the "bad" color of the colormap. You can set that color the same as the "under" color to have everything filled. The adapted code also removes the white space around the plot (`ax.margins(x=0,y=0)`). ``` import matplotlib.pyplot as plt import seaborn as sns diamonds = sns.load_dataset('diamonds') blue_palette = ['dodgerblue'] * len(diamonds["clarity"].unique()) ax = sns.histplot(diamonds, y="price", x="clarity", log_scale=(False, True), hue="clarity", palette=blue_palette, common_norm=False, cbar=False, legend=False, thresh=0) ax.collections[0].cmap.set_bad(ax.collections[0].cmap.get_under()) cbar = plt.colorbar(ax.collections[0], ticks=[], label='counts') for text, y in zip(["none", "many"], [0.02, 0.98]): cbar.ax.text(1.2, y, text, transform=cbar.ax.transAxes, ha='left', va='center') ax.margins(x=0, y=0) sns.despine() plt.tight_layout() plt.show() ``` [](https://i.stack.imgur.com/ftPmQ.png)
null
CC BY-SA 4.0
null
2022-12-22T11:52:37.250
2022-12-26T11:53:59.677
2022-12-26T11:53:59.677
12,046,409
12,046,409
null
74,888,639
2
null
74,866,495
0
null
The biggest problem with this is that you need to somehow tell angular where to put the inner template. One solution I can think of is to use the context of the background-template to pass the inner template and let it handle the second template outlet by itself. Let me show you what I mean. Inside of the modal.component.html we do something like this: ``` <ng-container *ngTemplateOutlet="backdropTemplate; context: { dialogTemplate: dialogTemplate}" ></ng-container> ``` This tells the `*ngTemplateOutlet` directive to give the `backdropTemplate` the additional context specified. The `backdropTemplate` can now use this context like this: ``` <ng-template #modalBackdrop let-innerTemplate="dialogTemplate"> <div [ngClass]="{ 'modal-backdrop': true, 'backdrop-active': showModal }" (click)="toggleModal()"> <ng-container *ngTemplateOutlet="innerTemplate"></ng-container> </div> </ng-template> ``` So we essentially tell angular to bind the context variable `dialogTemplate` to the local variable `innerTemplate` and can use this to render it in another `*ngTemplateOutlet`. This is a technique often used in [structural directives](https://angular.io/guide/structural-directives). The closest example I could find for this in the documentation is [here](https://angular.io/api/common/NgTemplateOutlet#description).
null
CC BY-SA 4.0
null
2022-12-22T12:38:54.083
2022-12-22T12:38:54.083
null
null
5,625,089
null
74,888,652
2
null
74,884,427
0
null
It's much easier to help (and also know what you are looking for) with a reproducible example but it seems to me if you have two station values that are the same each year (which don't differ between the climate factors for that year) a secondary line graph would be more appropriate. Here is an example with dummy data for three years. You can play with the rescaling factor to position the lines. You can then use facets to add the station gauges into another graph or just add additional lines. Also I can't tell if you meant to have different color outlines for each bar, but I don't think so, so I corrected that, and it looks like you have some NAs in your data that is causing the extra blank categories in your legend. # Dummy data: ``` df <- data.frame(Year_climate_floods = c(2016, 2016, 2016, 2016, 2017, 2017, 2017, 2017, 2018, 2018, 2018, 2018), yearlyclimaticfactors = c('maxtemp','mintemp','RH','rainfall levels','maxtemp','mintemp','RH','rainfall levels','maxtemp','mintemp','RH','rainfall levels'), ClimateValue= sample(0:15000, 12, replace = TRUE), station1 = c('Station1_discharge','Station1_discharge','Station1_discharge','Station1_discharge','Station1_discharge','Station1_discharge','Station1_discharge','Station1_discharge','Station1_discharge','Station1_discharge','Station1_discharge','Station1_discharge'), Station1Value= c(950000, 950000, 950000, 950000, 1300000, 1300000, 1300000, 1300000,1050000, 1050000, 1050000, 1050000), station2 = c('Station2_discharge','Station2_discharge','Station2_discharge','Station2_discharge','Station2_discharge','Station2_discharge','Station2_discharge','Station2_discharge','Station2_discharge','Station2_discharge','Station2_discharge','Station2_discharge'), Station2Value= c(1150000, 1150000, 1150000, 1150000, 1200000, 1200000, 1200000, 1200000,1350000, 1350000, 1350000, 1350000)) ``` # Rescaling factor for secondary y-axis ``` max_cv=max(df$ClimateValue) max_sv=max(df$Station1Value,df$Station2Value) ``` rescale.factor=(max_sv/max_cv) # Plot ``` ggplot(data = df, aes(x = as.integer(Year_climate_floods), y = ClimateValue, fill = yearlyclimaticfactors)) + theme_classic() + geom_bar(stat = 'identity', position="dodge", color="black", size=.5, width=.8) + geom_line(data = df, aes(y = Station1Value/rescale.factor, x=Year_climate_floods , group=station1), linetype = "dashed")+ geom_line(data = df, aes(y = Station2Value/rescale.factor, x=Year_climate_floods , group=station2, size=1), linetype = "solid", size=1) +scale_x_continuous(name="Year", breaks=c(2016,2017, 2018))+ scale_y_continuous(name = "Climate value", sec.axis = sec_axis(trans = ~.*rescale.factor, name = "Station value", breaks=c(0,500000,1000000,1500000),labels = scales::comma)) + theme(axis.text=element_text(size=14),axis.title=element_text(size=16, face="bold"), legend.position = "bottom") + scale_fill_manual(name="Climate factor", values=c("red", "green", "blue", "yellow")) ``` [enter image description here](https://i.stack.imgur.com/6TB8H.png)
null
CC BY-SA 4.0
null
2022-12-22T12:40:19.300
2022-12-22T12:40:19.300
null
null
19,977,390
null
74,888,923
2
null
74,887,861
1
null
From the [documentation](https://www.crummy.com/software/BeautifulSoup/bs4/doc/), it looks like the import needs to look like this: ``` from bs4 import BeautifulSoup ```
null
CC BY-SA 4.0
null
2022-12-22T13:03:43.753
2022-12-22T13:03:43.753
null
null
5,625,089
null
74,889,004
2
null
74,888,615
0
null
optimization... instead of formulae you use in `B36:W54` use this one formula in `B35`: ``` =INDEX(REDUCE(IFERROR(B2:W2/0), A36:A54, LAMBDA(y, z, {y; BYCOL(B2:W2, LAMBDA(x, COUNTIFS(AF6:AF, "="&x, AG6:AG, "<>"&AD2, AE6:AE,">="&z, AE6:AE, "<"&OFFSET(z, 1, ))))}))) ``` [](https://i.stack.imgur.com/XYF6k.png)
null
CC BY-SA 4.0
null
2022-12-22T13:11:16.570
2022-12-22T13:11:16.570
null
null
5,632,629
null
74,889,035
2
null
74,586,467
0
null
Do: ``` import os from moviepy.editor import VideoFileClip,concatenate_videoclips import moviepy.editor as mpy from moviepy.video.fx.all import crop # path of the video file to be cropped path = '/home/lenovo/Videos/Youtube/ToCrop/' # path of the video file to be saved after cropping output_video = '/home/lenovo/Videos/Youtube/sample/' for filename in os.listdir(path): clip = mpy.VideoFileClip(path+filename) (w, h) = clip.size cropped_clip = crop(clip, width=600, height=5000, x_center=w/2, y_center=h/2) cropped_clip.write_videofile(output_video+filename) ``` Source: [https://github.com/JerlinJR/Crop-a-Video/blob/main/crop.py](https://github.com/JerlinJR/Crop-a-Video/blob/main/crop.py) --- [edit](https://stackoverflow.com/revisions/74586467/4)[Crop a video in Python, centered on a 16x9 video, cropped to 9x16, moviepy?](https://stackoverflow.com/questions/74586467/crop-a-video-in-python-centered-on-a-16x9-video-cropped-to-9x16-moviepy)[Levfo](https://stackoverflow.com/users/20610256/levfo)
null
CC BY-SA 4.0
null
2022-12-22T13:14:00.153
2022-12-22T13:14:00.153
null
null
5,446,749
null
74,889,567
2
null
74,883,082
0
null
You have not shown what result you expect. I think you have chosen a special style and font. With font 'Consolas' the plug-in works perfectly for me. [](https://i.stack.imgur.com/AHRfA.png) [](https://i.stack.imgur.com/M8B0B.png)
null
CC BY-SA 4.0
null
2022-12-22T14:00:01.143
2022-12-22T14:00:01.143
null
null
1,981,088
null
74,889,621
2
null
55,857,244
0
null
Just set the borderStyle ``` TabPageSelector( controller: _tabController, color: Color(0x21000000), selectedColor: Colors.white, borderStyle: BorderStyle.none, ), ```
null
CC BY-SA 4.0
null
2022-12-22T14:05:01.280
2022-12-22T14:05:01.280
null
null
9,849,193
null
74,889,836
2
null
74,884,630
0
null
What you want to do with this is to draw a page and within a second refresh it again or after each draw refresh the background image, so you might want to add a line of code which adds the black background again. the code does not know when you want to refresh the background. Try experimenting after how many draws you would like to show the background again. if the draw arrows / landmarks? are saved on your image or in an array, you might need a flush array function to clear the drawn object out of the array before putting the image back on again.
null
CC BY-SA 4.0
null
2022-12-22T14:22:10.087
2022-12-22T14:22:10.087
null
null
4,095,631
null
74,890,114
2
null
74,845,676
0
null
You should change `property:'status'` to `property:'Status'` ``` (async () => { const databaseId = 'a secret'; const response = await notion.databases.query({ database_id: databaseId, filter: { property: 'Status', status: { does_not_equal: 'Completed' } } }); console.log(response); })(); ```
null
CC BY-SA 4.0
null
2022-12-22T14:46:51.183
2022-12-24T22:49:15.437
2022-12-24T22:49:15.437
2,452,869
4,873,683
null
74,890,190
2
null
74,890,015
1
null
Your `vehicle_id` column is numeric, so you should use a numeric column model like `99999` rather than a string model like `A5`. But the column will still be displayed using the width of the column heading, so you can change that too, e.g.: ``` COLUMN vehicle_id FORMAT 99999 HEADING V_ID ``` However, that will still be six characters wide, not five, because it allows an extra digit for a possible minus sign. You may know the value won't ever be negative, but SQL*Plus doesn't. The behaviour you are seeing is explained [in the documentation](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqpug/COLUMN.html): > If a number format model does not contain the MI, S or PR format elements, negative return values automatically contain a leading negative sign and positive values automatically contain a leading space. ... SQL*Plus formats NUMBER data right-justified. A NUMBER column's width equals the width of the heading or the width of the FORMAT plus one space for the sign, whichever is greater. ... If a value cannot fit in the column, SQL*Plus displays pound signs (#) instead of the number.
null
CC BY-SA 4.0
null
2022-12-22T14:51:24.210
2022-12-22T14:59:46.840
2022-12-22T14:59:46.840
266,304
266,304
null
74,890,283
2
null
74,885,757
0
null
You can send the broadcast stream to multiple functions, so if your config state isn't big then that's likely what I'd do. If the config state is very small (relative to the size of records being processed) then you could attach it to every incoming record in your `BroadcastProcessFunction`, so downstream operators have it in hand when processing each of their records.
null
CC BY-SA 4.0
null
2022-12-22T14:59:12.963
2022-12-22T14:59:12.963
null
null
231,762
null
74,890,375
2
null
74,841,850
0
null
The line of ``` $groupe_tmp=$groupe_tmp->first('id_groupe',$val); ``` returns a boolean value (presumably `false`) instead of returning a proper record, so, when your code reaches ``` $client->nomGroupe=$groupe_tmp->nomGroupe; ``` you get the error that you described. You can do something like: ``` $client->nomGroupe = is_bool($groupe_tmp) ? $groupe_tmp->nomGroupe : ''; ``` Also, it is worth looking into your `first` `function` and see whether it's correct and why does it return a boolean. You might have a db issue as well.
null
CC BY-SA 4.0
null
2022-12-22T15:07:43.770
2022-12-22T15:07:43.770
null
null
436,560
null
74,890,444
2
null
74,889,670
1
null
Microsoft suggests the following if restore is not working: > 1. Select the Tools > NuGet Package Manager > Package Manager Settings menu command. 2. Set both options under Package Restore. 3. Select OK. 4. Build your project again. [https://learn.microsoft.com/en-us/nuget/consume-packages/package-restore-troubleshooting](https://learn.microsoft.com/en-us/nuget/consume-packages/package-restore-troubleshooting) Another suggestion: > Try deleting the project.assets.json file in the obj folder of your project and then right click on the solution and click Restore NuGet Packages again. [https://developercommunity.visualstudio.com/t/restore-nuget-packages-is-not-working/1367227](https://developercommunity.visualstudio.com/t/restore-nuget-packages-is-not-working/1367227) If those don't work here are other overflow suggestions: [NuGet Package Restore Not Working](https://stackoverflow.com/questions/9011889/nuget-package-restore-not-working) Hope this helps!
null
CC BY-SA 4.0
null
2022-12-22T15:12:20.063
2022-12-22T15:13:54.863
2022-12-22T15:13:54.863
6,025,833
6,025,833
null
74,890,793
2
null
13,202,855
0
null
I experienced this when I was debugging my code whilst the configuration mode was `Release`. Simply setting the configuration mode to `Debug` resolved the issue. [](https://i.stack.imgur.com/dJjSx.png)
null
CC BY-SA 4.0
null
2022-12-22T15:41:47.223
2022-12-22T15:41:47.223
null
null
19,214,431
null
74,890,841
2
null
73,532,574
0
null
I made this gremlin go away by closing the edit window in which it had been a minor visual annoyance for dozens of RStudio sessions. When I reopened the file for editing, hey presto, the gremlin had disappeared. My best-guess as to the origins of this gremlin is that it is a dysfunctional remnant of an affordance for the spell-corrector. In the screenshots below: a wavy red underline indicates a word that is not found in the spell-corrector's dictionary. Somewhat surprisingly, the spell-corrector's GUI affordance is not found by clicking on the underline, nor by mouse-hovering on the underlined word. At least not on my Win11 installation. YMMV. [](https://i.stack.imgur.com/mnV8b.png) Before I write anything more about this very minor but annoying GUI defect I want to say "Thank you, thank you, thank you, mille grazie to the RStudio GUI team!!! Well done!" Returning to my partial-localisation of this gremlin: a left-click on the small-box that's displayed somewhat below and to the right of the wavy underline will sometimes (but not always) reveal affordances for spell-correction options such as "Add to user dictionary". [](https://i.stack.imgur.com/suSg9.png) The small-box will sometimes (but not always) remain at a fixed location within the edit-display-window when the underlying text is scrolled -- and it may continue to appear even after the wavy-underlined word is no longer visible. [](https://i.stack.imgur.com/j4UZF.png) Editing the text when the small-box is displayed may convert it into a dysfunctional gremlin. I'm unable to reproduce this behaviour but I'm pretty sure the gremlin-creation process is associated, somehow, to edits in which the wavy-underlined word has been deleted or modified. I have opened a new issue at [https://community.rstudio.com/t/small-white-rectangle-gremlin-partial-localisation/156041](https://community.rstudio.com/t/small-white-rectangle-gremlin-partial-localisation/156041) I've had enough "fun" for now with trying to find a plausible origin-story for this gremlin ;-)
null
CC BY-SA 4.0
null
2022-12-22T15:45:36.233
2022-12-26T18:28:35.017
2022-12-26T18:28:35.017
3,630,588
3,630,588
null
74,890,892
2
null
74,890,279
3
null
This might be because the interval isn't cleared - there's neither an id provided in the call inside `typing` nor is it cleared when the component is destroyed > [clearInterval()](https://developer.mozilla.org/en-US/docs/Web/API/clearInterval) - If the parameter provided does not identify a previously established action, this method does nothing. ``` let interval const typing = () => { interval = setInterval(async () => { if (index < phrase.length) { typedChar += phrase[index]; index++; await aud.play() } else { clearInterval(interval) } }, 20) } onMount(() => { typing() return () => clearInterval(interval) }) ``` Alternatively to [onDestroy](https://svelte.dev/docs#run-time-svelte-ondestroy) > If a function is returned from onMount, it will be called when the component is unmounted. (playing the audio might be blocked if the user hasn't yet interacted with the page)
null
CC BY-SA 4.0
null
2022-12-22T15:50:31.943
2022-12-22T15:50:31.943
null
null
15,388,872
null
74,891,068
2
null
74,874,445
0
null
You don't need a transition from every state. Just use a transition from the State `State` to the `Error window` state. It will then fire no matter what states are currently active. Such a transition will also leave the `Some process` state. Since you didn't define initial states in the orthogonal regions, the right region of the state machine will then be in an undefined state. Some people allow this to happen, but for me it is not good practice. So, I suggest to add initial states to both regions. Then it is clear, which sub state will become active, when the `State` state is entered for any reason. The fork would also not be necessary then. How you have done it in your example would also be Ok. However, since the `Some process` state is left by this transition, this region is now in an undefined state. Again, the solution to this is to have an initial state here. I would only use such a transition between regions, when it contains more than one state and the `On error` event shall not trigger a transition in all of the states. If the `Some process` state is only there to allow for concurrent execution, there is an easier way to achieve this: The `State` state can have a do behavior, that is running while the sub states are active. Orthogonal regions should be used wisely, since they add a lot complexity.
null
CC BY-SA 4.0
null
2022-12-22T16:05:11.563
2022-12-22T16:05:11.563
null
null
9,430,250
null
74,891,474
2
null
74,861,755
0
null
You can give a try to [pdfminer.six](https://pdfminersix.readthedocs.io/en/latest/index.html). You can dump the XML, if this helps with the command line tool: `dumppdf.py -a example.pdf >PDF_TEXT.xml` Compare the manuals on the page, here is one as an example: ``` from pdfminer.high_level import extract_pages from pdfminer.layout import LTTextContainer for page_layout in extract_pages("example.pdf"): for element in page_layout: if isinstance(element, LTTextContainer): print(element.get_text()) ```
null
CC BY-SA 4.0
null
2022-12-22T16:45:48.103
2022-12-22T16:45:48.103
null
null
12,621,346
null
74,891,576
2
null
74,891,521
0
null
You should never be concerned about a yellow IDE warning, but IF it does happen to matter, I would use option 3. Option 1 will have an unnecessary assert, option 2 will throw your plans as a coder away. I would like to say it like this: If the IDE doesn't understand your code, add the if statement. It not only makes your code a lot easier to read, but also makes it as a precaution, where if you ever change your code it will be unaffected. Happy coding! :)
null
CC BY-SA 4.0
null
2022-12-22T16:54:38.913
2022-12-22T16:54:38.913
null
null
13,177,027
null
74,891,641
2
null
19,239,381
1
null
I encountered a similar situation with face detection, I wonder if there is a better way to execute this, here is my solution here as a reference. ``` from deepface import DeepFace import cv2 import matplotlib.pyplot as plt # import image and output img_path = "image.jpg" detected_face = DeepFace.detectFace(img_path, target_size = (128, 128)) plt.imshow(detected_face) # image color scaling and saving detected_face = cv2.cvtColor( detected_face,cv2.COLOR_BGR2RGB) detected_face = cv2.convertScaleAbs(detected_face, alpha=(255.0)) cv2.imwrite("image_thumbnail.jpg", detected_face) ```
null
CC BY-SA 4.0
null
2022-12-22T16:59:37.110
2022-12-22T16:59:37.110
null
null
14,344,536
null
74,891,796
2
null
74,891,521
0
null
> Should an assert be used to fix an IDE warning? No it shouldn't. The reason is that the `assert` is not guaranteed to prevent the NPE ... should the value be `null` at runtime. Why? Because the execution of `assert` statements is conditional on the JVM being run with an appropriate `-ea` option. The default is that assertion checking is off. And besides, I suspect that an `assert` wouldn't suppress the warning anyway, at least for IDEs and bug checkers. --- As @Aarav [writes](https://stackoverflow.com/a/74891576/139985) adding a possibly redundant `if` test for `null` is the best solution. Using a temporary variable is a good idea too, especially if it avoids a extra method call. There is no need to worry that the redundant test will have a runtime overhead. The JIT compiler is good at optimizing out redundant `null` checks. For example: ``` if (obj != null) { obj.someMethod(); } ``` In addition to the explicit `null` test, there is a 2nd implicit test for null when you call `someMethod` on `obj`. But the JIT compiler will remove the 2nd test because it "knows" that it has already checked that `obj` is not `null`.
null
CC BY-SA 4.0
null
2022-12-22T17:15:26.803
2022-12-23T01:12:21.813
2022-12-23T01:12:21.813
139,985
139,985
null
74,892,091
2
null
74,891,968
1
null
You can convert the number of weeks to a number of days using `7 * Obs` and add this value on to the start date (`as.Date('2017-01-01')`). This gives you a date-based x axis which you can format as you please. Here, we set the breaks at the turn of each year so the grid fits to them: ``` ggplot(HS, aes(as.Date('2017-01-01') + 7 * Obs, Total)) + geom_point(aes(color = YEAR)) + geom_smooth() + labs(title = "Weekly Sales since 2017", x = "Week", y = "Written Sales") + theme(axis.line = element_line(colour = "orange", size = 1)) + scale_x_date('Year', date_breaks = 'year', date_labels = '%Y') ``` [](https://i.stack.imgur.com/svyLF.png) --- Obviously, we don't have your data, so I had to create a reproducible set with the same names and similar values to yours for the above example: ``` set.seed(1) HS <- data.frame(Obs = 1:312, Total = rnorm(312, seq(1200, 1500, length = 312), 200)^2, YEAR = rep(2017:2022, each = 52)) ```
null
CC BY-SA 4.0
null
2022-12-22T17:44:28.907
2022-12-22T17:55:44.550
2022-12-22T17:55:44.550
12,500,315
12,500,315
null
74,892,287
2
null
74,892,063
0
null
According to TensorFlow [page](https://www.tensorflow.org/api_docs/python/tf/keras/utils/image_dataset_from_directory) for the `image_dataset_from_directory` method, you can either specify the labels as label argument or structure your directory in sub-directories (each one for each class, i.e. number of points). In case you want to go with the first option, you need to extract the labels in alphabetical order of the key. For instance, you could: ``` my_dict = {"im_10":7, "im_8": 5, "im_17":6} my_list_sorted = sorted(my_dict.items()) labels = list(zip(*my_list_sorted))[1] ``` Then you can use labels as argument for `image_dataset_from_directory` Regarding the model, you can try different architectures from dense to convolutional layers. There is no fixed rule for the number and size of layers
null
CC BY-SA 4.0
null
2022-12-22T18:03:19.187
2022-12-22T18:03:19.187
null
null
14,366,506
null
74,892,505
2
null
74,892,225
0
null
try: ``` =ARRAY_CONSTRAIN(QUERY({ALL!B3:K, FLATTEN(QUERY(TRANSPOSE(ALL!H3:K),,9^9))}, "where 2=2 "& IF(A2="",,IF(REGEXMATCH(A2, "ALL"), " and Col3 is not null", " and Col3 contains '"&VLOOKUP(A2, Conditions!A1:B, 2, )&"'"))& IF(A3="",," and Col11 contains '"&VLOOKUP(A3, Conditions!D1:E, 2, )&"'")), 9^9, 10) ``` [](https://i.stack.imgur.com/6CAuQ.png)
null
CC BY-SA 4.0
null
2022-12-22T18:22:27.993
2022-12-22T18:47:41.260
2022-12-22T18:47:41.260
5,632,629
5,632,629
null
74,892,665
2
null
74,884,069
0
null
I think you just have the columns flipped... You don't want the first 15 characters of column F. From the screenshot that is the shorter cell, you want to compare it to column A... ``` =INDEX('[HOCS LIST.xlsx]Sheet1'!$A:$B,MATCH($F3,LEFT('[HOCS LIST.xlsx]Sheet1'!$A:$A),0),2) ``` That being said I adjusted your index to include BOTH columns A:B along with adjusting it to return column 2 (B) assuming that's what you are looking for?
null
CC BY-SA 4.0
null
2022-12-22T18:42:25.047
2022-12-22T18:42:25.047
null
null
7,502,029
null
74,892,749
2
null
19,099,296
0
null
I faced some problems with specified solutions, but this library working perfectly with recycler view and solved my problems. Sample code: ``` <io.github.giangpham96.expandabletextview.ExpandableTextView android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/purple_100" android:padding="16dp" android:maxLines="10" app:expandAction="More" app:limitedMaxLines="2" app:expandActionColor="@color/blue_500" app:originalText="@string/long_text" /> ``` [](https://i.stack.imgur.com/1A2sD.png)
null
CC BY-SA 4.0
null
2022-12-22T18:51:18.420
2022-12-22T18:51:18.420
null
null
10,187,218
null
74,892,936
2
null
74,890,331
2
null
I have rewritten the function in order to make it more clear what it is computing, there is an error in the question's version (wrong parenthesis). - - - `U = 123.79` ``` fn <- function(U, args) { with(as.list(args), { term1 <- U - U_crit term2 <- U_max - U_crit lhs <- Y_crit + Q*term1 - Q/(p+1) * (term1/term2)^(p+1) * term2 rhs <- Y return(lhs - rhs) }) } U <- uniroot(fn, c(123.279, 350), args = args) U #> $root #> [1] 308.6662 #> #> $f.root #> [1] 0.0004746999 #> #> $iter #> [1] 7 #> #> $init.it #> [1] NA #> #> $estim.prec #> [1] 6.103516e-05 curve(fn(x, args), 123.3, 350, lwd = 2) abline(h = 0) points(U$root, U$f.root, col = "red", pch = 19) ``` ![](https://i.imgur.com/SWo4kxK.png) [reprex v2.0.2](https://reprex.tidyverse.org) --- # Edit According to its documentation, package `optimx` > Provides a replacement and extension of the optim() function to call to several function minimization codes in R in a single statement. But it only minimises the objective function, so write a wrapper around it, `gn` below. ``` ``` r library(optimx) gn <- function(x0, args) { with(as.list(x0), { args$Y <- Y -fn(U, args) }) } x0 <- c(U = 124, Y = 10000) optimx(par = x0, gn, method = c("Nelder-Mead", "BFGS", "CG", "L-BFGS-B"), args = args) #> U Y value fevals gevals niter #> Nelder-Mead 1.887090e+19 -7.002469e+34 -6.310914e+34 501 NA NA #> BFGS 1.917764e+02 8.128266e+03 -6.026305e+03 100 100 NA #> CG 1.983800e+02 9.853717e+03 -4.315391e+03 201 101 NA #> L-BFGS-B NA NA 8.988466e+307 NA NA NA #> convcode kkt1 kkt2 xtime #> Nelder-Mead 1 TRUE FALSE 0.00 #> BFGS 1 TRUE FALSE 0.06 #> CG 1 TRUE FALSE 0.02 #> L-BFGS-B 9999 NA NA 0.01 optimx(par = x0, gn, method = c("BFGS", "CG"), args = args) #> U Y value fevals gevals niter convcode kkt1 kkt2 xtime #> BFGS 191.7764 8128.266 -6026.305 100 100 NA 1 TRUE FALSE 0.04 #> CG 198.3800 9853.717 -4315.391 201 101 NA 1 TRUE FALSE 0.02 ``` [reprex v2.0.2](https://reprex.tidyverse.org) The first run with 4 methods gives similar results for methods BFGS and CG. The second run keeps only these two methods. The function's values are the symmetric of the values in column `value`. --- # Data Here is the posted arguments data set as copy&paste able code. ``` args <- "Y_crit U_crit Q p U_max Y 12327.9 123.2790 57.14286 0.75 198.38 11000" args <- read.table(textConnection(args), header = TRUE) ``` [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2022-12-22T19:13:38.150
2022-12-23T15:23:44.590
2022-12-23T15:23:44.590
8,245,406
8,245,406
null
74,893,031
2
null
74,892,991
0
null
there is powerful package plotly. It has lots of plot types and python api, you can check examples here [https://plotly.com/python/](https://plotly.com/python/). There are some which might suit for you Take a look to contour plot [https://plotly.com/python/contour-plots/](https://plotly.com/python/contour-plots/) and [https://plotly.com/python/knn-classification/#probability-estimates-with-gocontour](https://plotly.com/python/knn-classification/#probability-estimates-with-gocontour)
null
CC BY-SA 4.0
null
2022-12-22T19:24:20.907
2022-12-22T19:46:40.313
2022-12-22T19:46:40.313
14,633,739
14,633,739
null
74,893,092
2
null
74,892,917
1
null
Add a calculated column like so: [](https://i.stack.imgur.com/ZejaR.png)
null
CC BY-SA 4.0
null
2022-12-22T19:32:44.803
2022-12-22T19:32:44.803
null
null
7,108,589
null
74,893,109
2
null
74,892,533
0
null
As Dale K mentioned, just change ``` ROUND(((convert(decimal(11, 6), sum(pf1.NO_OF_RECONCILED_TRX)) / tot_tab.tot_trx) * 100.0),2) AS "% To Total Acct" ``` to ``` CONVERT(DECIMAL(11,2),ROUND(((convert(decimal(11, 6), sum(pf1.NO_OF_RECONCILED_TRX)) / tot_tab.tot_trx) * 100.0),2)) AS "% To Total Acct" ```
null
CC BY-SA 4.0
null
2022-12-22T19:34:44.217
2022-12-22T19:40:37.203
2022-12-22T19:40:37.203
5,868,158
5,868,158
null
74,893,196
2
null
74,892,917
0
null
If the condition is only on title, then this would work. ``` Calculated_Column = IF( 'Table'[title] = "b", "ok", BLANK() ) ``` [](https://i.stack.imgur.com/aNpWX.png) ``` Measure = IF( SELECTEDVALUE( 'Table'[title] ) = "b", "ok", BLANK() ) ``` In case of measure the results will shrink to only values different than BLANK. Instead of BLANK() you may use a value such as `not ok`. [](https://i.stack.imgur.com/Vik1X.png) Edit. To show the items with no data: [](https://i.stack.imgur.com/teud3.png)
null
CC BY-SA 4.0
null
2022-12-22T19:45:34.210
2022-12-23T21:36:44.857
2022-12-23T21:36:44.857
1,903,793
1,903,793
null
74,893,471
2
null
74,891,521
0
null
I agree with the other answers here, but just wanted to point out that, to me, the logic of that block is completely backwards. So instead, what I'd do would be to rewrite the whole block so that it flows more naturally. ``` private static boolean sendLore( Player player, ItemStack mainHandItem ) { if ( mainHandItem.getItemMeta().hasLore() ) { player.sendMessage( ChatColor.GREEN + "The lore is: " ); for ( Component loreItem : mainHandItem.getItemMeta().lore() ) { var Message = Component .text( ChatColor.GRAY + String.valueOf( i + 1 ) + ") " + ChatColor.RESET ) .append( lineMessage( loreItem ) ); player.sendMessage( Message ); } return true; } else { player.sendMessage( ChatColor.RED + "This item doesn't have a lore." ); return false; } } ``` Presumably this would also make the warning go away.
null
CC BY-SA 4.0
null
2022-12-22T20:18:41.407
2022-12-22T20:18:41.407
null
null
4,183,191
null
74,893,594
2
null
74,893,384
0
null
I tested it on a database here and just changed the regex you used. ``` select firstname, regexp_replace(firstname, '[^A-Za-zÀ-ÖØ-öø-ÿ]', ' ', 'g') from person where firstname ilike '%débora%'; ``` `Débora❤️,Débora`
null
CC BY-SA 4.0
null
2022-12-22T20:33:39.403
2022-12-23T13:16:29.500
2022-12-23T13:16:29.500
10,317,633
10,317,633
null
74,893,794
2
null
33,638,395
0
null
Thanks to [@Marco Del Toro's answer](https://stackoverflow.com/a/33638718/5446749), using `easy_install` worked for me: I could install the packages I needed for my project. I also managed to fix `pip` using `easy_install` so `pip` also works for me now. The solution to fixing `pip` was: `easy_install pip`. --- [edit](https://stackoverflow.com/revisions/33638395/2)[Pip not working on windows 10, freezes command promt](https://stackoverflow.com/questions/33638395/pip-not-working-on-windows-10-freezes-command-promt)[Olof H](https://stackoverflow.com/users/5548094/olof-h)
null
CC BY-SA 4.0
null
2022-12-22T20:59:56.833
2022-12-22T20:59:56.833
null
null
5,446,749
null
74,893,937
2
null
74,893,760
0
null
Here's your solution. Try it out, it solves your question! [](https://i.stack.imgur.com/inQU6.png)
null
CC BY-SA 4.0
null
2022-12-22T21:16:49.747
2022-12-22T21:16:49.747
null
null
7,108,589
null
74,893,956
2
null
74,893,052
1
null
You can't store a value in a service variable the way you are trying to do it. Every time you will call the service, this line : ``` private status: boolean = false; ``` will instantiate the variable to false. To keep track of states, you should store values in local storage, or use a token service.
null
CC BY-SA 4.0
null
2022-12-22T21:20:00.290
2022-12-22T21:20:00.290
null
null
15,310,319
null
74,894,125
2
null
74,893,847
0
null
``` import seaborn as sns my_dict = pd.DataFrame({'method1': {'scenario1': 10, 'scenario2': 20, 'scenario3': 1}, 'method2': {'scenario1': 15, 'scenario2': 5, 'scenario3': 1.5}}) my_dict = my_dict.reset_index() df = my_dict.melt(id_vars='index') g = sns.catplot(data=df, x="index", y="value", hue="variable", kind="bar") ``` This gives me the follow plot: [](https://i.stack.imgur.com/QYmjY.png)
null
CC BY-SA 4.0
null
2022-12-22T21:42:02.447
2022-12-22T21:42:02.447
null
null
7,391,520
null
74,894,274
2
null
74,892,687
0
null
As @ccprog said, size needs to be defined in the `<use>` element. This code works across all three browsers: ``` <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <symbol id="mark" viewBox="0 0 8 8"> <circle cx="4" cy="4" r="4"/> </symbol> </defs> <g> <use href="#mark" width="8" height="8" x="46" y="46" fill="black"/> <circle href="#mark" cx="50" cy="50" r="2" stroke="none" fill="red"/> <rect x="0" y="0" width="100" height="100" stroke="red" fill="none"/> </g> </svg> ```
null
CC BY-SA 4.0
null
2022-12-22T22:02:01.987
2022-12-22T22:02:01.987
null
null
5,828,663
null
74,894,565
2
null
74,894,214
0
null
There are 2 options here. Use the labels option in the `plot()` function or define the row names. Since this is a , I'll demonstrate with an abridged "mtcars" dataset. ``` #test data set. data_widened <-structure(list(mpg = c(21, 21, 22.8, 21.4, 18.7, 18.1, 14.3, 24.4, 22.8, 19.2, 17.8, 16.4, 17.3, 15.2, 10.4), disp = c(160, 160, 108, 258, 360, 225, 360, 146.7, 140.8, 167.6, 167.6, 275.8, 275.8, 275.8, 472), hp = c(110, 110, 93, 110, 175, 105, 245, 62, 95, 123, 123, 180, 180, 180, 205), drat = c(3.9, 3.9, 3.85, 3.08, 3.15, 2.76, 3.21, 3.69, 3.92, 3.92, 3.92, 3.07, 3.07, 3.07, 2.93), wt = c(2.62, 2.875, 2.32, 3.215, 3.44, 3.46, 3.57, 3.19, 3.15, 3.44, 3.44, 4.07, 3.73, 3.78, 5.25), qsec = c(16.46, 17.02, 18.61, 19.44, 17.02, 20.22, 15.84, 20, 22.9, 18.3, 18.9, 17.4, 17.6, 18, 17.98), Names = c("Mazda RX4", "Mazda RX4 Wag", "Datsun 710", "Hornet 4 Drive", "Hornet Sportabout", "Valiant", "Duster 360", "Merc 240D", "Merc 230", "Merc 280", "Merc 280C", "Merc 450SE", "Merc 450SL", "Merc 450SLC", "Cadillac Fleetwood")), row.names = c(NA,15L), class = "data.frame") #define the row names to match the desired labels rownames(data_widened) <- data_widened$Names #cluster distance_matrix <- dist(data_widened[ , 1:6], method = "minkowski", p = 1.5) hc <- hclust(distance_matrix, method = "ward.D2") #plot plot(hc) # or this if the row names are not defined. plot(hc, labels=data_widened$Names) ```
null
CC BY-SA 4.0
null
2022-12-22T22:45:07.827
2022-12-22T22:45:07.827
null
null
5,792,244
null
74,894,642
2
null
74,894,550
-1
null
If I understand your question correctly, you can just use `getUserByID()`. Something like this: ``` import sx.blah.discord.api.IDiscordClient; import sx.blah.discord.handle.obj.IUser; // Initiate your 'client' as an instance of IDiscordClient IDiscordClient client = ...; // String userId = "1234567890"; // <- Uncomment this for tests. // Get the user's profile information by some user ID IUser user = client.getUserByID(userId); // And then get the user's description and custom status String description = user.getDescription(); String customStatus = user.getCustomStatus(); ``` Hope, this will help you.
null
CC BY-SA 4.0
null
2022-12-22T22:58:01.027
2022-12-22T22:58:01.027
null
null
5,869,608
null
74,894,646
2
null
74,894,214
1
null
You have got the row and column indices round the wrong way, and you also need to transpose the data. ``` # Remove "values." from the names of each column names(data_widened) <- gsub("values\\.", "", names(data_widened)) distance_matrix <- dist(t(data_widened[,3:29]), method = "minkowski", p = 1.5) hc <- hclust(distance_matrix, method = "ward.D2") plot(hc) ``` [](https://i.stack.imgur.com/tqWmN.png)
null
CC BY-SA 4.0
null
2022-12-22T22:58:26.930
2022-12-22T22:58:26.930
null
null
12,500,315
null
74,894,838
2
null
34,543,108
0
null
I had to also import the stefanbirkner:system-rules library following implementing JUnit tests and experiencing error: ``` java: package org.junit.contrib.java.lang.system does not exist ``` I am using Maven in IntelliJ so the steps I took were: 1. From File menu select project structure 2. In Project Structure screen select libraries and plus sign in left pane to add new lib from Maven 3. search for stefanbirkner:system-rules and ok 4. Select module where library to be imported and ok then apply and ok on Project Structure screen 5. On import statement right click to show context options 6. add library to class path 7. add the dependency in pom.xml ``` <dependency> <groupId>com.github.stefanbirkner</groupId> <artifactId>system-rules</artifactId> <version>1.19.0</version> </dependency> ```
null
CC BY-SA 4.0
null
2022-12-22T23:35:41.793
2022-12-24T12:34:54.700
2022-12-24T12:34:54.700
3,557,430
3,557,430
null
74,894,870
2
null
74,894,373
0
null
Like said in the comment section, the `secondStep` is calling itself recursively, also without any arguments. This will cause an infinite loop. We fix it by calling `thirdStep`. Also in the `cardPayment` function, you are using `finalToken`, which is not defined in the function. We fix it that by making it the argument. ``` const API = 'APK_KEY' async function firstStep() { let data = { "api_key": API } let request = fetch('https://accept.paymob.com/api/auth/tokens', { method: 'post', headers: {'content-type' : 'application/json'}, body: JSON.stringify(data) }) let response = (await request).json() let token = (await response).token secondStep(token) } async function secondStep(token) { let data = { "auth_token": token, "delivery_needed": "false", "amount_cents": "100", "currency": "EGP", "items": [], } let request = await fetch('https://accept.paymob.com/api/ecommerce/orders', { method : 'POST', headers: {'content-type' : 'application/json'}, body: JSON.stringify(data) }) let response = request.json() let id = (await response).id thirdStep(token, id) } async function thirdStep(token, id) { let data = { "auth_token": token, "amount_cents": "100", "expiration": 3600, "order_id": id, "billing_data": { "apartment": "803", "email": "[email protected]", "floor": "42", "first_name": "Clifford", "street": "Ethan Land", "building": "8028", "phone_number": "+86(8)9135210487", "shipping_method": "PKG", "postal_code": "01898", "city": "Jaskolskiburgh", "country": "CR", "last_name": "Nicolas", "state": "Utah" }, "currency": "EGP", "integration_id": 13034 } let request = fetch('https://accept.paymob.com/api/acceptance/payment_keys', { method: 'post', headers: {'content-type' : 'application/json'}, body: JSON.stringify(data) }) let response = (await request).json() let finalToken = (await response).token cardPayment(finalToken) } async function cardPayment(finalToken) { let iframeURL = `https://accept.paymob.com/api/acceptance/iframes/18922?payment_token=${finalToken}` console.log(iframeURL) } firstStep() ```
null
CC BY-SA 4.0
null
2022-12-22T23:42:50.720
2022-12-22T23:42:50.720
null
null
8,011,544
null
74,895,212
2
null
18,503,410
0
null
This issue should be fixed in 3.8.1.
null
CC BY-SA 4.0
null
2022-12-23T00:55:44.660
2022-12-23T00:55:44.660
null
null
null
null
74,895,237
2
null
13,405,538
0
null
This question was asked before RGB-> BGR correction or just after, either way it has been resolved.
null
CC BY-SA 4.0
null
2022-12-23T01:00:22.083
2022-12-23T01:00:22.083
null
null
null
null
74,895,279
2
null
23,838,410
2
null
The 8086 processor has a 6-byte instruction prefetch queue. To answer the question, when an interrupt happens, the program counter (instruction pointer) is pushed on the stack and the queue is discarded. The tricky part is that the internal program counter points to the next byte to be prefetched, which is different from the next byte to execute. The solution is that the program counter value is corrected by subtracting the queue size, using a small constant table and the addressing adder. The same correction takes place for subroutine calls and relative jumps since they also require the real PC value. To quote from the [8086 patent](https://patents.google.com/patent/US4449184A) column 8 line 27: > PC is not a real or true program counter in that it does not, nor does any other register within CPU, maintain the actual execution point at any time. PC actually points to the next byte to be input into queue. The real program counter is calculated by instruction whenever a relative jump or call is required by subtracting the number of accessed instructions still remaining unused in queue from PC.
null
CC BY-SA 4.0
null
2022-12-23T01:10:41.827
2022-12-23T01:10:41.827
null
null
3,073,190
null
74,895,286
2
null
73,423,933
1
null
According to [vite 3 esbuildOptions docs](https://vitejs.dev/config/dep-optimization-options.html#optimizedeps-esbuildoptions) you need to wrap esbuildOptions with optimizeDeps and your config should look like this: ``` import {defineConfig} from 'vite' import react from '@vitejs/plugin-react' import {viteCommonjs, esbuildCommonjs} from '@originjs/vite-plugin-commonjs' export default defineConfig({ plugins: [viteCommonjs(), react()], build: { outDir: 'build', }, optimizeDeps: { esbuildOptions: { plugins: [esbuildCommonjs(['react-s3'])], }, } }) ```
null
CC BY-SA 4.0
null
2022-12-23T01:12:01.850
2022-12-23T01:12:01.850
null
null
13,784,193
null
74,895,467
2
null
74,894,502
0
null
The straight lines are probably due to missing values in the data, which have been removed prior to the plot. For example, ``` data(airquality) data <- transform(airquality, date=as.Date(paste("1973",Month,Day,sep="-")), windy=Wind>mean(Wind)) head(data) Ozone Solar.R Wind Temp Month Day date windy 1 41 190 7.4 67 5 1 1973-05-01 FALSE 2 36 118 8.0 72 5 2 1973-05-02 FALSE 3 12 149 12.6 74 5 3 1973-05-03 TRUE 4 18 313 11.5 62 5 4 1973-05-04 TRUE 5 NA NA 14.3 56 5 5 1973-05-05 TRUE 6 28 NA 14.9 66 5 6 1973-05-06 TRUE library(ggplot2) library(dplyr) filter(data, !is.na(Ozone)) %>% ggplot(aes(x=date, y=Ozone, col=windy)) + geom_line(lwd=1) ggplot(data, aes(x=date, y=Ozone, col=windy)) + geom_line(lwd=1) ``` Which one you prefer is subjective. [](https://i.stack.imgur.com/cjXee.png)
null
CC BY-SA 4.0
null
2022-12-23T01:58:18.390
2022-12-23T01:58:18.390
null
null
7,514,527
null
74,895,577
2
null
74,531,445
0
null
because in script json file use "DnsName" to create binding website I change DnsName to SiteName it work for me
null
CC BY-SA 4.0
null
2022-12-23T02:26:04.283
2022-12-23T02:26:04.283
null
null
20,549,795
null
74,895,622
2
null
74,895,138
-1
null
With Bootstrap classes, perhaps start by try adding [img-fluid](https://getbootstrap.com/docs/5.2/content/images/#responsive-images) class to `img` so that the images can scale with the parent width. Also, try define some [responsive classes](https://getbootstrap.com/docs/5.2/layout/grid/#responsive-classes) for `col`, such as `col-sm-6`, `col-md-6` and `col-lg-3` classes, so that the column placement of `div` changes with the viewport width. If the `button` need to fill the width of parent `div`, try wrap it with a `div` with `d-grid` as recommended by the Bootstrap [document](https://getbootstrap.com/docs/5.2/components/buttons/#block-buttons). Lastly, perhaps consider to add a [vertical gutter](https://getbootstrap.com/docs/5.2/layout/gutters/#vertical-gutters) in Bootstrap by also adding a `gy-3` class to the `div` as `row`, so that there will be spaces between the elements when wrapped. Example with the modifications: (changed the `src` to use dummy images) ``` <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous" /> <div class="container-md"> <div class="row gy-3"> <div class="col-sm-6 col-md-6 col-lg-3"> <img src="https://picsum.photos/1000?random=1" class="img-fluid" /> <div class="d-grid"> <button class="btn mt-2 btn-secondary">Button 1</button> </div> </div> <div class="col-sm-6 col-md-6 col-lg-3"> <img src="https://picsum.photos/1000?random=2" class="img-fluid" /> <div class="d-grid"> <button class="btn mt-2 btn-secondary">Button 2</button> </div> </div> <div class="col-sm-6 col-md-6 col-lg-3"> <img src="https://picsum.photos/1000?random=3" class="img-fluid" /> <div class="d-grid"> <button class="btn mt-2 btn-secondary">Button 3</button> </div> </div> <div class="col-sm-6 col-md-6 col-lg-3"> <img src="https://picsum.photos/1000?random=4" class="img-fluid" /> <div class="d-grid"> <button class="btn mt-2 btn-secondary">Button 4</button> </div> </div> </div> </div> ```
null
CC BY-SA 4.0
null
2022-12-23T02:35:32.223
2022-12-23T22:07:25.260
2022-12-23T22:07:25.260
20,436,957
20,436,957
null
74,895,988
2
null
74,895,845
0
null
When you get the value of a reference field, you get back a [DocumentReference object](https://firebase.google.com/docs/reference/js/firestore_.documentreference). If you just want to get its path, like is shown in your console screenshot, you can read the [path property](https://firebase.google.com/docs/reference/js/firestore_.documentreference.md#documentreferencepath) of the `DocumentReference`. --- If you want to get the data from the referenced document (so from the warehouse), you can call `get()` on the `DocumentReference`, same as you'd do for a `DocumentReference` that you'd have constructed in another way. For more examples of that, see the documentation on [getting a document](https://firebase.google.com/docs/firestore/query-data/get-data#get_a_document).
null
CC BY-SA 4.0
null
2022-12-23T04:02:37.147
2022-12-23T04:13:17.707
2022-12-23T04:13:17.707
209,103
209,103
null
74,896,251
2
null
74,890,369
0
null
Your assumption about the derivative of the function `f = @(x) c*sqrt(1-x)` is just wrong. The derivative goes to `-Inf` for `x` approaching `1`, therefore `max(abs(df))` should be `Inf`, not `c`. Matlab is returning the correct value, in the limit of the approximation introduced by the discretization.
null
CC BY-SA 4.0
null
2022-12-23T04:55:44.063
2022-12-23T04:55:44.063
null
null
11,334,020
null
74,896,398
2
null
74,889,738
1
null
This problem is triggered by radian's auto-indent and can be solved by adding following code to the profile of radian. ``` options(radian.auto_indentation = FALSE) ```
null
CC BY-SA 4.0
null
2022-12-23T05:25:08.060
2022-12-23T20:12:47.257
2022-12-23T20:12:47.257
12,505,251
20,840,230
null
74,896,539
2
null
10,142,748
0
null
My problem is that I need to generate a PNG image with a transparent background fixed to x * x pixels. I find that whatever I do with `EncodeHintType.MARGIN`, these is always some unexpected margin. After reading its source code, I find a way to fix my problem, this is my code. There is no margin in the output `BufferedImage`. ``` BufferedImage oriQrImg = getQrImg(CONTENT_PREFIX+userInfo, ErrorCorrectionLevel.L,BLACK); BufferedImage scaledImg = getScaledImg(oriQrImg,REQUIRED_QR_WIDTH,REQUIRED_QR_HEIGHT); private static BufferedImage getQrImg(String content, ErrorCorrectionLevel level, int qrColor) throws WriterException { QRCode qrCode = Encoder.encode(content, level, QR_HINTS); ByteMatrix input = qrCode.getMatrix(); int w=input.getWidth(),h=input.getHeight(); BufferedImage qrImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); Graphics2D g2d = qrImg.createGraphics(); qrImg = g2d.getDeviceConfiguration().createCompatibleImage(w,h, Transparency.BITMASK); g2d.dispose(); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { if (input.get(x,y) == 1) { qrImg.setRGB(x, y, qrColor); }else{ qrImg.setRGB(x, y, Transparency.BITMASK); } } } return qrImg; } static BufferedImage getScaledImg(BufferedImage oriImg,int aimWidth,int aimHeight){ Image scaled = oriImg.getScaledInstance(aimWidth,aimHeight,SCALE_DEFAULT); Graphics2D g2d = new BufferedImage(aimWidth,aimHeight, BufferedImage.TYPE_INT_RGB).createGraphics(); BufferedImage scaledImg = g2d.getDeviceConfiguration().createCompatibleImage(aimWidth,aimHeight, Transparency.BITMASK); g2d.dispose(); scaledImg.createGraphics().drawImage(scaled, 0, 0,null); return scaledImg; } ```
null
CC BY-SA 4.0
null
2022-12-23T05:50:53.907
2022-12-29T18:08:51.533
2022-12-29T18:08:51.533
14,267,427
20,738,585
null
74,896,562
2
null
25,182,303
0
null
``` list_display = ('title_name', 'description',) def title_name(self, obj): if obj.tracking_no: line_length = 20 lines = [obj.title[i:i+line_length] + '\n' for i in range(0, len(obj.title), line_length)] return ''.join(lines) return obj.title_name track.short_description = "title" ```
null
CC BY-SA 4.0
null
2022-12-23T05:54:36.367
2022-12-23T05:54:36.367
null
null
14,960,537
null
74,896,724
2
null
25,146,474
6
null
if you got this error in SQL Server Management Studio (SSMS) 18.12.1 in 2022, please download Download SQL Server Management Studio (SSMS) 19 (Preview) and install it, a link is [here](https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms-19?view=sql-server-ver16), download the latest one, this provided link is the current latest version.
null
CC BY-SA 4.0
null
2022-12-23T06:22:01.433
2022-12-23T06:27:42.013
2022-12-23T06:27:42.013
12,039,811
12,039,811
null
74,896,944
2
null
74,884,893
0
null
According to the screenshot, it seems task was complete. The warning: Not all files were uploaded. You could try to create a new repo and use the specific file to upload with a new service connection. Make sure the "Remote Directory" is available.
null
CC BY-SA 4.0
null
2022-12-23T06:58:12.173
2022-12-23T06:58:12.173
null
null
18,349,408
null
74,897,028
2
null
74,891,327
0
null
I would suggest to put `price_input` and `input_field` into a frame for easier layout management. I also use `sticky="w"` on the frame, `answer` and `button_return` so that they are aligned at the left. Below is the modified code: ``` import tkinter as tk FGCOLOR = "#FEFCF2" BGCOLOR = "#777474" ERRCOLOR = "#FF5F66" # Create the main window window = tk.Tk() window.title("Price Calculator") window.geometry("800x600") window.config(background="#777474") def calculate_price(): input_field_value = input_field.get() try: input = int(input_field_value) price = input * 0.1 answer.config(text=f"Your price is {price:.3f} KWD", fg=FGCOLOR) except ValueError as ve: answer.config(text='What you have just entered are not numbers whatsoever, try again!', fg=ERRCOLOR) # create a frame for price_input and input_field frame = tk.Frame(window, bg=BGCOLOR) frame.grid(column=0, row=0, padx=10, pady=10, sticky="w") price_input = tk.Label(frame, text="Total Pages:", font="Arial", bg=BGCOLOR, fg=FGCOLOR) price_input.grid(column=0, row=0) input_field = tk.Entry(frame, font="Arial", bg=FGCOLOR) input_field.grid(column=1, row=0) answer = tk.Label(window, bg=BGCOLOR) answer.grid(column=0, row=1, padx=10, pady=10, sticky="w") button_return = tk.Button(window, text="Calculate Price", command=calculate_price) button_return.grid(column=0, row=2, sticky="w", padx=10, pady=10) # Run the main loop window.mainloop() ```
null
CC BY-SA 4.0
null
2022-12-23T07:10:58.477
2022-12-23T07:10:58.477
null
null
5,317,403
null
74,897,134
2
null
74,549,086
0
null
I didn't find a way to fix this within Arch itself, but I believe it has something to do with how Arch saves sockets to systemd, which is not accessible in proot, thus the permission denied error. However, as termux can run ipykernel successfully, and you have access to termux directories in proot arch, you can simply do this: 1. create venv in termux home: python -m venv env-name 2. activate venv in termux: source ~/env-name/bin/activate 3. install ipykernel: pip install ipykernel 4. activate venv in arch: source /data/data/com.termux/files/home/env-name/bin/activate 5. add venv as kernel: python -m ipykernel install --user --name env-name 6. select kernel in vscode
null
CC BY-SA 4.0
null
2022-12-23T07:26:54.573
2022-12-23T07:26:54.573
null
null
20,845,406
null
74,897,565
2
null
74,896,513
0
null
The `Sequential` class is designed to only have one input and one output. In order to have multiple inputs, for example the sentence and the weights from the teacher model, you need to use the `Model` class. You will be able to design the setup you aim to. see [https://www.tensorflow.org/guide/kera/functional#models_with_multiple_inputs_and_outputs](https://www.tensorflow.org/guide/kera/functional#models_with_multiple_inputs_and_outputs) I might be able to provide additional help, if you add some more details.
null
CC BY-SA 4.0
null
2022-12-23T08:21:50.317
2022-12-23T08:21:50.317
null
null
11,466,416
null
74,897,644
2
null
74,884,488
0
null
I believe you need to add an 'await' prior to your 'useFetch' call as shown in [the docs](https://nuxt.com/docs/api/composables/use-fetch). @kishan for reference, here is a way to refactor your example: ``` <template> <div> <pre>{{ data }}</pre> </div> </template> <script setup> // api call (async implied in this context) // this call is a GET by default const { data, error } = await useFetch('https://api.nuxtjs.dev/mountains') // log response (data will be a ref) if (error.value) console.log('ERROR from useFetch: ', error.value) if (data.value) console.log('data returned from useFetch: ', data) </script> ```
null
CC BY-SA 4.0
null
2022-12-23T08:31:51.950
2022-12-23T09:05:07.910
2022-12-23T09:05:07.910
8,816,585
20,845,685
null
74,897,706
2
null
72,418,262
0
null
If you just need to dynamically get the path to a file that is in the same project directory, then the following code works for me - ``` string filePath = Directory.GetParent(Environment.CurrentDirectory).Parent.FullName + "\\excel\\Prices.xlsx"; ``` where "\excel" is the folder in my project and "\Prices.xlsx" the file in the project
null
CC BY-SA 4.0
null
2022-12-23T08:39:29.453
2022-12-23T08:40:00.040
2022-12-23T08:40:00.040
20,832,421
20,832,421
null
74,897,892
2
null
74,831,154
0
null
Try: ``` install.packages("png") ``` Click [here](https://cran.r-project.org/web/packages/png/index.html) to see more info about the png package.
null
CC BY-SA 4.0
null
2022-12-23T09:03:55.817
2022-12-23T09:03:55.817
null
null
20,524,021
null
74,897,897
2
null
74,897,586
0
null
You can check the blue-bordered setting below. [](https://i.stack.imgur.com/koZfj.png) If it does not work, you can try to seek other suggestion-related settings. For example this is checked for me too: [](https://i.stack.imgur.com/QGXzt.png) If it worked, you're welcome :)
null
CC BY-SA 4.0
null
2022-12-23T09:04:50.397
2022-12-23T09:04:50.397
null
null
10,926,848
null
74,897,908
2
null
74,897,739
0
null
You can wrap the row with a . ``` SingleChildScrollView( scrollDirection: Axis.horizontal, child : Row(children: [ SizedBox( width: //set width here, child: Widget1(), ), SizedBox( width: //define your width child: Widget2(), ), ]), ) ``` By doing this, you can swipe left to see the more of Widget2(). You can use `MediaQuery.of(context).size.width` to find the width of your screen, you can use this width to your widget.
null
CC BY-SA 4.0
null
2022-12-23T09:06:49.717
2022-12-23T09:06:49.717
null
null
8,539,289
null
74,897,928
2
null
74,897,739
0
null
You can try this code if you want a static non-sliding out of the screen implementation with a `Row`: ``` Stack(children: [ Positioned( top: 50, left: 150, child: Row(children: [ Container(height: 50,width: 50,color: Colors.red,), Container(height:50, width:200,color: Colors.blue,) ],), ) ],), ``` And this code if you want it to be dynamic(replicatable on every device): ``` Stack(children: [ Positioned( top: 50, left: MediaQuery.of(context).size.width/2, child: Row(children: [ Container(height: 50,width: 50,color: Colors.red,), Container(height:50, width:MediaQuery.of(context).size.width,color: Colors.blue,) ],), ) ],), ```
null
CC BY-SA 4.0
null
2022-12-23T09:09:22.103
2022-12-23T09:09:22.103
null
null
16,973,338
null
74,897,937
2
null
74,894,502
0
null
If I understand you correctly, each point on the plot is assigned to either 'Yes' or 'No', and you would like the line to change color according to this. In `geom_line`, the color aesthetic cannot vary along the length of the line. Perhaps the neatest way to achieve this effect is to plot the whole thing as a series of line segments, where the start point of each segment is your data, and the end point is the lagged data: ``` library(tidyverse) ggplot(df) + ggtitle(df$symbol) + geom_segment(aes(x = date, y = adjusted, xend = lag(date), yend = lag(adjusted), color = Signal)) + xlab('') + ylab('Price') + theme_bw() ``` [](https://i.stack.imgur.com/shQrM.png) Incidentally, I think this is a difficult plot to read. If you want to be able to read off the 'yes' and 'no' values more easily, you might consider using a `geom_rect` background instead: ``` ggplot(df) + ggtitle(df$symbol) + geom_rect(aes(xmin = date, xmax = lag(date), ymin = -Inf, ymax = Inf, fill = Signal), alpha = 0.2) + geom_line(aes(x = date, y = adjusted)) + xlab('') + ylab('Price') + theme_bw() ``` [](https://i.stack.imgur.com/hhgJn.png) --- You did not provide any data for this example, so I created some with the same names and similar values using the following code: ``` set.seed(5) df <- data.frame(date = seq(as.Date('2019-01-01'), as.Date('2022-12-22'), 'day'), adjusted = round(cumsum(rnorm(1452)) + 150, 1), symbol = 'QQQ') df$skew <- 0 for(i in seq(nrow(df))[-1]) { df$skew[i] <- ifelse(df$skew[i - 1] == 0, sample(0:1, 1, prob = c(0.9, 0.1)), sample(1:0, prob = c(0.9, 0.1))) } df <- df %>% mutate(Signal = if_else(skew >= 1, 'Yes', 'No')) ```
null
CC BY-SA 4.0
null
2022-12-23T09:10:25.983
2022-12-23T09:15:32.150
2022-12-23T09:15:32.150
12,500,315
12,500,315
null