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
75,294,329
2
null
22,356,881
-1
null
you want to use matplotlib to select a 'sensible' scale just like me, there is one way can solve this question. using a Pandas dataframe index as values for x-axis in matplotlib plot. Code: ``` ax = plt.plot(site2['Cl']) x_ticks = ax.get_xticks() # use matplotlib default xticks x_ticks = list(filter(lambda x: x in range(len(site2)), x_ticks)) ax.set_xticklabels([' '] + site2.index.iloc[x_ticks].to_list()) ```
null
CC BY-SA 4.0
null
2023-01-31T08:19:22.820
2023-01-31T10:19:33.273
2023-01-31T10:19:33.273
13,496,666
13,496,666
null
75,294,986
2
null
75,294,842
0
null
And the answer to this is always: Delegate the button names and classes made is non-trivial to add and remove the special__ classes ``` const choices = document.getElementById("choices"); const buttons = choices.querySelectorAll("button"); const popupContainer = document.querySelector(".popup__container"); const recommend = document.getElementById("recommended"); //choices buttons choices.addEventListener("click", (e) => { const tgt = e.target; if (!tgt.matches("button")) return; const whichButton = tgt.dataset.target.replace("popup","") tgt.classList.add(`special__${whichButton}`); // document.getElementById(tgt.dataset.target).classList.add('open-Popup'); }); // close popupContainer.addEventListener("click", (e) => { const tgt = e.target; if (!tgt.matches(".close__btn")) return; const parentPopup = tgt.closest("div.popup"); const id = parentPopup.id; parentPopup.classList.remove('open-Popup'); const sourceButton = `[data-target=${id}]`; const className = `special__${id.replace("popup","")}`; document.querySelectorAll(sourceButton).forEach(button => button.classList.remove(className)) }); recommend.addEventListener("click", () => { // document.querySelectorAll(".popup").forEach(popup => popup.classList.add("open-Popup")); choices.querySelectorAll("button") .forEach(button => [...button.classList.entries()] // the buttons classes .forEach(([_,cls]) => { if (cls.startsWith("special__")) { // it was selected document.getElementById(button.dataset.target).classList.add('open-Popup'); } }) ); }); ``` ``` .special__1 { background-color: #4837ff; } .special__2 { background-color: #4837ff; } .popup { display: grid; grid-template-columns: 1fr 1fr; width: 800px; max-width: 800px; background: #FFF; border-radius: 6px; position: relative; bottom: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.1); text-align: center; justify-content: center; padding: 0 30px 30px; color: #333; align-items: center; justify-self: center; margin: 0 auto; height: 50vh; z-index: 1; visibility: hidden; transition: transform 0.4s ease; } .open-Popup { visibility: visible; transform: translate(-50%, -50%) scale(1); } .table__1 { font-family: arial, sans-serif; width: 100%; height: 50%; background: #fff; border-collapse: collapse; } td, th { border: 1px solid #acacac; text-align: left; padding: 8px; } tr:nth-child(even) { background-color: #dddddd; } .main__img_1 { width: 400px; margin-top: 20px; border-radius: 50%; box-shadow: 0 2px 4px rgba(8, 218, 255, 0.6); } .close__btn { position: relative; width: 50%; margin-top: 20px; left: 80px; background: hsla(204, 100%, 15%, 0.286); color: #fff; border: 0; outline: none; font-size: 18px; border-radius: 4px; cursor: pointer; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } ``` ``` <div id="choices"> <h2> Choose your CPU </h2> <div class="mainbtn__1"> <button type="button" class="btn__001" id="AMD" data-target="popup1">AMD</button> <button type="button" class="btn__001" id="Intel" data-target="popup2">Intel</button> </div> <h2> Choose your GPU </h2> <div class="mainbtn__2"> <button type="button" class="btn__002" id="RTX3060" data-target="popup1">RTX3060</button> <button type="button" class="btn__002" id="RTX3050" data-target="popup2">RTX3050</button> </div> </div> <div class="popup__container"> <button type="submit" class="popup__btn" id="recommended">Recommended</button> <!-- FIRST popup page --> <div class="popup" id="popup1"> <table class="table__1" id="tb_1"> <tr> <td>CPU</td> <td>AMD</td> </tr> <tr> <td>GPU</td> <td>RTX3060</td> </tr> </table> <button type="button" class="close__btn">Close</button> </div> <!-- second popup page --> <div class="popup" id="popup2"> <table class="table__1" id="tb_2"> <tr> <td>CPU</td> <td>Intel</td> </tr> <tr> <td>GPU</td> <td>RTX3050</td> </tr> </table> <button type="button" class="close__btn">Close</button> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.0/jquery.min.js"></script> <script src="app.js"></script> ```
null
CC BY-SA 4.0
null
2023-01-31T09:22:54.433
2023-02-02T06:43:32.657
2023-02-02T06:43:32.657
295,783
295,783
null
75,295,332
2
null
52,271,719
1
null
Add `-t` flag into command to prevent container(s) exit.
null
CC BY-SA 4.0
null
2023-01-31T09:51:46.337
2023-02-03T13:56:35.063
2023-02-03T13:56:35.063
2,915,423
21,116,920
null
75,295,382
2
null
75,245,706
0
null
This is about the messages you could probably see when you run or train your rasa. Rasa offers you the option to activate/desactivate logs for external libraries. You can do so by setting these environment variable. For example for MacOS you can do so by typing in your CLI: `export VARIABLE_NAME=VARIABLE_VALUE` You can read more about this here: - [For macos](https://apple.stackexchange.com/questions/106778/how-do-i-set-environment-variables-on-os-x)- [For windows](http://www.dowdandassociates.com/blog/content/howto-set-an-environment-variable-in-windows-command-line-and-registry/)
null
CC BY-SA 4.0
null
2023-01-31T09:56:08.857
2023-01-31T09:56:08.857
null
null
19,399,891
null
75,295,582
2
null
75,291,808
0
null
- repetitive spaces in latex are treated like a single space. If you'd like to manually increase the space, you could e.g. use `\qquad`- to avoid your `Child` node from colliding with the lines, you can increase its text width. This will move it a bit further away from the lines- don't use `\tikzstyle`, this macro is obsolete. ``` \documentclass{article} \usepackage[latin1]{inputenc} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} % Set the overall layout of the tree \tikzset{level 1/.style={level distance=3cm, sibling distance=2cm}} \tikzset{level 2/.style={level distance=3cm, sibling distance=1cm}} % Define styles for bags and leafs \tikzset{bag/.style={text width=1em, text centered}} \tikzset{end/.style={circle, minimum width=3pt,fill, inner sep=0pt}} % The sloped option gives rotated edge labels. Personally % I find sloped labels a bit difficult to read. Remove the sloped options % to get horizontal labels. \begin{tikzpicture}[grow=right] \node[bag,minimum width=2cm] {Child} child { node[bag] {G} child { node[end, label=right: {G\qquad$P(G\cap G)=\frac{1}{2}$}] {} edge from parent node[below] {0.5} } child { node[end, label=right: {B\qquad $P(G\cap B)=\frac{1}{2}$}] {} edge from parent node[above] {$0.5$} } edge from parent node[below] {$0.5$} } child { node[bag] {B} child { node[end, label=right: {G\qquad $P(B\cap G)=\frac{1}{2}$}] {} edge from parent node[below] {$0.5$} } child { node[end, label=right: {B\qquad $P(B\cap B)=\frac{1}{2}$}] {} edge from parent node[above] {$0.5$} } edge from parent node[above] {$0.5$} }; \end{tikzpicture} \end{document} ``` [](https://i.stack.imgur.com/tDbDp.png)
null
CC BY-SA 4.0
null
2023-01-31T10:13:00.053
2023-01-31T10:13:00.053
null
null
2,777,074
null
75,296,050
2
null
75,295,564
0
null
Do consider following points while adding raw HTML in email or creating email templates: Sloppy HTML tends to be characteristic of spammers, spammers are busy spamming, so they don't have the time and resources to test their email code to make sure the content renders well. While issues with your email rendering and broken HTML might not cause your emails to end up in spam right away, they can annoy your subscribers or they might find your message suspicious and hit the dreaded “mark as spam” button as a result. Also an email HTML is NOT equal to Web HTML. There are a lot of obvious HTML tags and CSS attributes that are not supported by major email clients. The button of the form will require you to use JavaScript (which is a problem). Most email clients simply don't support flash content as it is considered unsafe for something as sensitive as email. Email clients block emails containing flash. You can use GIFs as an alternative to make your emails more appealing. Spam filters and more importantly firewalls always take a "better to be safe than sorry" approach. So, all your well-intentioned emails with any type of script will go straight to the SPAM folder. If your email has different versions of HTML and plain text email or broken HTML, then your emails will go into the spam folder. Broken HTML will appear sloppy and unreadable on almost all email clients. Not only will users mark your email as SPAM, but it will also alert SPAM filters (they will think you could be a lazy spammer using unsophisticated tools). Try this and see if this works or else you can modify the HTML as per your need ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Email Template</title> </head> <body> <table> <tbody> <tr> <td style="font-size:0;height:24px;line-height:0;"></td> </tr> <tr> <td> <table cellpadding="0" cellspacing="0" style="border-collapse:collapse;font-family:Arial;line-height:1.15;color:#000;"> <tbody> <tr> <td style="height:1px;width:91px;vertical-align:top;padding:.01px 1px;"> <table cellpadding="0" cellspacing="0" style="border-collapse:collapse;"> <tbody> <tr> <td style="vertical-align:top;padding:.01px;width:91px;text-align:center;"> <a href="website" style="display:block;" target="_blank" rel="nofollow noreferrer"> <img src="logo" height="90" width="91" style="width:91px;vertical-align:middle;border-radius:0;height:91px;"> </a> </td> </tr> </tbody> </table> </td> <td valign="top" style="padding:.01px 0.01px 0.01px 18px;vertical-align:top;"> <table cellpadding="0" cellspacing="0" style="border-collapse:collapse;"> <tbody> <tr> <td style="line-height:1.32;padding-bottom:18px;;font-family:Arial;"> <span style="text-transform:initial;font-weight:bold;color:#62738C;letter-spacing:0;line-height:1.92;font-size:20px;"> First Last Name </span> <br> <span style="text-transform:initial;font-weight:;color:#62738C;line-height:1.2;font-size:14px;"> Astrobnb | Host Services </span> </td> <td style="vertical-align:bottom;"> <table cellpadding="0" cellspacing="0" style="border-collapse:collapse;" align="right"> <tbody> <tr> <td style="padding:.01px 0.01px 18px 50px;"> <table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td align="left" style="padding-right:6px;text-align:center;padding-top:0;"> <a href="fb" target="_blank" rel="nofollow noreferrer"> <img width="28" height="28" src="fb-icon" style="float:left;border:none;" border="0" alt="facebook"> </a> </td> <td align="left" style="padding-right:6px;text-align:center;padding-top:0;"> <a href="ig" target="_blank" rel="nofollow noreferrer"> <img width="28" height="28" src="ig-icon" style="float:left;border:none;" border="0" alt="instagram"> </a> </td> <td align="left" style="padding-right:6px;text-align:center;padding-top:0;"> <a href="yelp" target="_blank" rel="nofollow noreferrer"> <img width="28" height="28" src="yelp-icon" style="float:left;border:none;" border="0" alt="yelp"> </a> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </td> </tr> <tr> <td colspan="2" style="padding:.01px 0.01px 18px 0.01px;border-bottom:solid 1px #45668E;border-top:solid 1px #45668E;"> <table cellpadding="0" cellspacing="0" style="border-collapse:collapse;width:100%;"> <tbody> <tr> <td nowrap="" width="383" style="padding-top:18px;white-space:nowrap;width:383px;font-family:Arial;"> <p style="margin:.1px;line-height:1;"> <span style="font-size:12px;color:#62738C;white-space:nowrap;"> <img src="phone-icon" style="vertical-align:-2px;line-height:1.2;width:13px;" width="13"> <a href="tel:555-555-5555" target="_blank" style="font-family:Arial;text-decoration:unset;" rel="nofollow noreferrer"> <span style="line-height:1.2;font-family:Arial;color-scheme:only;color:#62738C;white-space:nowrap;"> 555-555-5555</span> </a> &nbsp; <img src="web-icon" style="vertical-align:-2px;line-height:1.2;width:13px;" width="13"> <a href="website" target="_blank" style="font-family:Arial;text-decoration:unset;" rel="nofollow noreferrer"> <span style="line-height:1.2;font-family:Arial;color-scheme:only;color:#62738C;white-space:nowrap;"> astrobnb.co</span> </a> &nbsp; <img src="email-icon" style="vertical-align:-2px;line-height:1.2;width:13px;" width="13"> <a href="mailto:[email protected]" target="_blank" style="font-family:Arial;text-decoration:unset;" rel="nofollow noreferrer"> <span style="line-height:1.2;font-family:Arial;color-scheme:only;color:#62738C;white-space:nowrap;"> [email protected]</span> </a> </span> </p> </td> </tr> </tbody> </table> </td> </tr> </tbody> <table cellpadding="0" cellspacing="0" border="0" style="max-width:600px;width:100%;"> <tbody> <tr> <td style="line-height:0;"></td> <span style="display: block; text-align: center;"> <br> <a target="_blank" rel="noopener noreferrer" href="website" color="#45668E" class="sc-eqIVtm kRufpp" style="border-width: 6px 85px; width: -webkit-fill-available; border-style: solid; border-color: rgb(36, 160, 237); display: inline-block; background-color: rgb(36, 160, 237); color: rgb(255, 255, 255); font-weight: 500; text-decoration: none; text-align: center; line-height: 30px; font-size: 15px; border-radius: 20px;">Book a Cleaning Today!</a> </table> </td> </tr> </tbody> </table> </body> </html> ```
null
CC BY-SA 4.0
null
2023-01-31T10:51:47.530
2023-01-31T15:25:33.733
2023-01-31T15:25:33.733
13,380,138
13,380,138
null
75,296,104
2
null
55,833,567
0
null
Update for 2023: You can solve this issue with [WebpackModuleFederation](https://webpack.js.org/concepts/module-federation/) you need to adjust your webpack.js to use a remote: ``` // webpack.prod.js module.exports = { plugins: [ new ModuleFederationPlugin({ name: 'host', remotes: { app1: 'app1@http://localhost:3001/remoteEntry.js', }, }), ], }; ``` and your second fronted would need to include: ``` // webpack.component.js module.exports = { plugins: [ new ModuleFederationPlugin({ name: 'remoteEntry', // this name needs to match with the entry name exposes: ['./public-path'], // ... }), ], }; ``` For further information follow the official documentation or get inspired by the [examples repository](https://github.com/module-federation/module-federation-examples)
null
CC BY-SA 4.0
null
2023-01-31T10:57:06.530
2023-01-31T10:57:06.530
null
null
1,921,982
null
75,296,507
2
null
75,051,613
0
null
I just added `export const dynamic = 'force-dynamic'` to my `page.tsx` file and it worked for me Found the solution in the documentation [https://beta.nextjs.org/docs/api-reference/segment-config](https://beta.nextjs.org/docs/api-reference/segment-config)
null
CC BY-SA 4.0
null
2023-01-31T11:33:20.070
2023-01-31T11:35:50.123
2023-01-31T11:35:50.123
14,670,347
14,670,347
null
75,297,211
2
null
5,484,922
0
null
The solutions proposed so far have one or two inconvenients: - Handles needs to be collected individually when plotting, e.g. `lns1 = ax.plot(time, Swdown, '-', label = 'Swdown')`. There is a risk of forgetting handles when updating the code.- Legend is drawn for the whole figure, not by subplot, which is likely a no-go if you have multiple subplots. This new solution takes advantage of [Axes.get_legend_handles_labels()](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.get_legend_handles_labels.html#matplotlib.axes.Axes.get_legend_handles_labels) to collect existing handles and labels for the main axis and for the twin axis. This numpy operation will scan all axes which share the same subplot area than `ax`, including `ax` and return merged handles and labels: ``` hl = np.hstack([axis.get_legend_handles_labels() for axis in ax.figure.axes if axis.bbox.bounds == ax.bbox.bounds]) ``` It can be used to feed `legend()` arguments this way: ``` import numpy as np import matplotlib.pyplot as plt t = np.arange(1, 200) signals = [np.exp(-t/20) * np.cos(t*k) for k in (1, 2)] fig, axes = plt.subplots(nrows=2, figsize=(10, 3), layout='constrained') axes = axes.flatten() for i, (ax, signal) in enumerate(zip(axes, signals)): # Plot as usual, no change to the code ax.plot(t, signal, label=f'plotted on axes[{i}]', c='C0', lw=9, alpha=0.3) ax2 = ax.twinx() ax2.plot(t, signal, label=f'plotted on axes[{i}].twinx()', c='C1') # The only specificity of the code is when plotting the legend h, l = np.hstack([axis.get_legend_handles_labels() for axis in ax.figure.axes if axis.bbox.bounds == ax.bbox.bounds]).tolist() ax2.legend(handles=h, labels=l, loc='upper right') ``` [](https://i.stack.imgur.com/vXyrk.png)
null
CC BY-SA 4.0
null
2023-01-31T12:33:19.033
2023-01-31T17:22:35.393
2023-01-31T17:22:35.393
774,575
774,575
null
75,297,247
2
null
75,167,487
0
null
I'm having the same problem in 17.4.4 cw will work sometimes, and other times it gives strange behavior Does cw (esc+tab) work for you? If it does, it is a problem with the language service If it also does not work correctly, it is a problem with the editor and you should check in Tools->Code Snippets Manager -> CSharp -> Visual C# and see if cw is there and correct.
null
CC BY-SA 4.0
null
2023-01-31T12:36:11.243
2023-01-31T12:36:11.243
null
null
9,142,178
null
75,297,277
2
null
75,296,903
0
null
Cleaning up the CSS should help. No need to separate .basket and .account. Give the surrounding div some width & height. Little fiddle here: [https://jsfiddle.net/k4nstox5/](https://jsfiddle.net/k4nstox5/) ``` .right-selection { display: flex; align-items: center; justify-content: center; width: 100px; margin-left: 80px; } .right-selection div { padding: 5px; border-radius: 50%; width: 24px; height: 24px; } .right-selection div:hover { background-color: rgba(165, 158, 158, 0.5); border: 2px rgba(165, 158, 158, 0.5); } ```
null
CC BY-SA 4.0
null
2023-01-31T12:38:07.370
2023-01-31T12:38:07.370
null
null
4,734,763
null
75,297,369
2
null
75,272,955
0
null
Consider this which works for the given sample showing only one AttributeSet: ``` Dim First As Variant, Second As Variant Dim items As Object, atts As Object Set items = jSon("Items") For Each First In items Debug.Print First("ProductCode") Debug.Print First("ProductDescription") Debug.Print First("AttributeSet")("SetName") Set atts = First("AttributeSet")("Attributes") For Each Second In atts Debug.Print Second("Name") Debug.Print Second("Value") Next Next ``` Guidance from [Parse JSON objects and collection using VBA](https://stackoverflow.com/questions/70016018/parse-json-objects-and-collection-using-vba)
null
CC BY-SA 4.0
null
2023-01-31T12:45:46.217
2023-02-01T02:12:07.920
2023-02-01T02:12:07.920
7,607,190
7,607,190
null
75,297,760
2
null
31,305,795
0
null
Workaround: 1. You need to use a external git configuration tool on "Global Configuration Tool" like this (You need to have this installed on the server): 2. Configure your project to use this Git setted above on "Source Code Management":
null
CC BY-SA 4.0
null
2023-01-31T13:16:42.890
2023-01-31T13:43:29.827
2023-01-31T13:43:29.827
4,102,241
4,102,241
null
75,297,756
2
null
59,433,286
0
null
I tried checking the "format on save" box but it didn't do it for me, even prettier selected as a default formatter. Editing the settings' json file worked for me : 1. Open the command palette with ctrl + maj + p 2. Search 'open settings json' 3. Select the user option enter image description here 4. In the file look for "editor.defaultFormatter" for html (line 16 in my case) 5. Set its value to "esbenp.prettier-vscode" enter image description here Done
null
CC BY-SA 4.0
null
2023-01-31T13:16:38.927
2023-01-31T13:16:38.927
null
null
19,972,329
null
75,297,772
2
null
75,297,190
2
null
Using this example file with a trailing comma: ``` writeLines( '{ "entry1": { "id": 1, "language": "en", } }', 'file.json' ) ``` Read the file in as text, use a regex to remove commas followed by `}`, write the corrected file back to disk, then read in again as JSON: ``` library(stringr) library(jsonlite) readLines("file.json") |> paste(collapse = "\n") |> str_remove_all(",(?=\\n\\s*\\})") |> writeLines("file_fixed.json") read_json("file_fixed.json") ``` Or if you don’t want to save corrected versions to disk, skip that step and use `fromJSON()`: ``` readLines("file.json") |> paste(collapse = "\n") |> str_remove_all(",(?=\\n\\s*\\})") |> fromJSON() ``` Result: ``` $entry1 $entry1$id [1] 1 $entry1$language [1] "en" ```
null
CC BY-SA 4.0
null
2023-01-31T13:17:39.570
2023-01-31T13:30:07.483
2023-01-31T13:30:07.483
17,303,805
17,303,805
null
75,297,939
2
null
18,010,980
0
null
The Windows C file conio.h lacks the definition of those functions, but they can be defined. You can find the functions you need here -> [Windows Console Functions](https://learn.microsoft.com/en-us/windows/console/console-functions?redirectedfrom=MSDN) Here are the requested functions defined ``` #include <stdio.h> #include <stdlib.h> #include <windows.h> void gotoxy(short int x, short int y) { COORD pos = { x, y }; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); } int wherex() { CONSOLE_SCREEN_BUFFER_INFO csbi; GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); return csbi.dwCursorPosition.X; } int wherey() { CONSOLE_SCREEN_BUFFER_INFO csbi; GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); return csbi.dwCursorPosition.Y; } ```
null
CC BY-SA 4.0
null
2023-01-31T13:32:29.140
2023-01-31T13:55:36.707
2023-01-31T13:55:36.707
2,352,665
2,352,665
null
75,299,658
2
null
48,956,952
0
null
In my case I had wrongly set up a cache plugin at [https://carmenhalffter.com/](https://carmenhalffter.com/) by compressing, combining and preloading the font awesome file. After I restored the settings, it was working again.
null
CC BY-SA 4.0
null
2023-01-31T15:50:22.047
2023-02-06T16:26:06.223
2023-02-06T16:26:06.223
2,072,528
21,119,312
null
75,299,786
2
null
73,355,818
0
null
I had this issue and needed to run.. ``` $ code Updating VS Code Server to version 97dec172d3256f8ca4bfb2143f3f76b503ca0534 Removing previous installation... Installing VS Code Server for x64 (97dec172d3256f8ca4bfb2143f3f76b503ca0534) Downloading: 100% Unpacking: 100% Unpacked 2389 files and folders to /home/dmitri/.vscode-server/bin/97dec172d3256f8ca4bfb2143f3f76b503ca0534. ``` in WSL2 to update the WSL2 server. Then uninstalling and reinstalling the WSL extension from VSCode did the trick.
null
CC BY-SA 4.0
null
2023-01-31T15:59:17.680
2023-01-31T16:03:30.470
2023-01-31T16:03:30.470
9,640,774
9,640,774
null
75,300,093
2
null
72,618,881
0
null
Assuming the following equation... > U(n+4) = 2U(n+3) + (-1)^(n+4) U(n+2) - 3U(n+1) + 2U(n) which can be simplified to... > U4 = 2U3 + (-1)^(n) U2 - 3U1 + 2U0 Adding more to the [Answer](https://stackoverflow.com/a/75227013/9444282) of [John Alexiou](https://stackoverflow.com/users/380384/john-alexiou) ``` int u0 = 0, u1 = 0, u2 = 0, u3 = 0, un = 0, n = 0; while (true) try { Console.WriteLine("Enter U0, U1, U2, U3, and n separated by spaces:"); string[] inputs = Console.ReadLine().Split(' '); u0 = int.Parse(inputs[0]); u1 = int.Parse(inputs[1]); u2 = int.Parse(inputs[2]); u3 = int.Parse(inputs[3]); n = int.Parse(inputs[4]); if (n >= 4) break; } catch (Exception ex) { Console.WriteLine("Try again! Please enter valid integers values for U0, U1, U2, U3 and n > 4\n"); } for (int i = 4; i <= n; i++) { var sign = i % 2 == 0 ? 1 : -1; un = 2 * u3 + sign * u2 - 3 * u1 + 2 * u0; u0 = u1; u1 = u2; u2 = u3; u3 = un; } Console.WriteLine($"U{n} = {un}"); ```
null
CC BY-SA 4.0
null
2023-01-31T16:23:05.877
2023-01-31T17:21:15.497
2023-01-31T17:21:15.497
9,444,282
9,444,282
null
75,300,316
2
null
75,299,186
0
null
There should be an iframe identifier that you can use (anything else for the iframe, a unique id, class or attribute, like `data-test`) ``` let iframe = cy.get(iframeIdentifier).its('0.contentDocument.body').should('not.be.empty').then(cy.wrap) iframe.find("body > div:nth-child(6) > div:nth-child(1) > div:nth-child(1) > form:nth-child(2) > table:nth-child(5) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(2) > div:nth-child(5) > p:nth-child(2)").click() ``` From what the output is suggesting, you've got two iframes on that page that it's trying to send commands to, and you have to pick one Answer adapted from source: [cypress.io blog post on working with iframes](https://www.cypress.io/blog/2020/02/12/working-with-iframes-in-cypress/)
null
CC BY-SA 4.0
null
2023-01-31T16:39:44.807
2023-01-31T16:39:44.807
null
null
5,114,911
null
75,300,337
2
null
75,300,007
1
null
The question concatenates raw input to generate a SQL query which exposes to SQL injection and bugs like this one. If `_IPAUK` contained `'; --` all the data in that column would be lost. In this case it seems the code is trying to pass Unicode data using ASCII syntax, resulting in mangled data. The solution to both SQL injection and conversion issues is to [use parameterized queries](https://mysqlconnector.net/tutorials/basic-api/). In a parameterized query, the actual parameter values never become part of the query itself. The server compiles the SQL query into an execution plan and executes that using the parameter values. ``` await using var connection = new MySqlConnection(connString); await connection.OpenAsync(); // Insert some data using (var cmd = new MySqlCommand()) { cmd.Connection = connection; cmd.CommandText = "UPDATE Words SET IPAUK=@IPAUK,IPAUS=@IPAUS WHERE WORD=@Word"; cmd.Parameters.AddWithValue("IPAUK", words.IPAUK); cmd.Parameters.AddWithValue("IPAUS", words.IPAUS); cmd.Parameters.AddWithValue("Word", words.Word); await cmd.ExecuteNonQueryAsync(); } ``` The example uses the open source [MySQLConnector](https://mysqlconnector.net/) ADO.NET Driver instead of Oracle's somewhat ... buggy driver. The code can be simplified even more by using [Dapper](https://github.com/DapperLib/Dapper) to construct the command, parameters and handle the connection automagically. Assuming `words` only has the IPAUK, IPAUS and Word properties, the code can be reduced to three lines : ``` var sql="UPDATE Words SET IPAUK=@IPAUK,IPAUS=@IPAUS WHERE WORD=@Word"; await using var connection = new MySqlConnection(connString); await connection.ExecuteAsync(sql,words); ``` Dapper will construct a MySqlCommand, add parameters based on the properties of the parameter object (words), open the connection, execute the command and then close the connection
null
CC BY-SA 4.0
null
2023-01-31T16:41:25.630
2023-01-31T16:41:25.630
null
null
134,204
null
75,300,453
2
null
75,299,807
0
null
You could do something like this. ``` ser = (df.groupby("Customer")['Store'].unique() .apply(sorted) .apply('|'.join) .value_counts()) ``` The resulting series `ser`: ``` A|B 4 B 4 A 4 A|B|C 3 A|C 3 C 1 B|C 1 Name: Store, dtype: int64 ``` The starting dataframe `df`: ``` Customer Store 0 1 B 1 1 A 2 2 C 3 2 B 4 2 A 5 3 B 6 4 B 7 4 A 8 5 A 9 6 C 10 6 A 11 7 B 12 7 A 13 8 A 14 9 B 15 9 A 16 10 B 17 11 A 18 12 C 19 12 B 20 12 A 21 13 B 22 14 C 23 14 A 24 15 C 25 15 A 26 16 C 27 17 A 28 18 C 29 18 B 30 19 C 31 19 B 32 19 A 33 20 B ```
null
CC BY-SA 4.0
null
2023-01-31T16:51:18.640
2023-01-31T17:20:44.303
2023-01-31T17:20:44.303
2,476,977
2,476,977
null
75,300,569
2
null
75,300,007
0
null
Try it like this: ``` command.CommandText = "UPDATE Words SET IPAUK= @IPAUK, IPAUS= @IPAUS WHERE WORD= @Word;"; // Match these to the column type and length in the DB command.Parameters.Add("@IPAUK", MySQlDbType.VarChar, 30); command.Parameters.Add("@IPAUS", MySQlDbType.VarChar, 30); command.Parameters.Add("@Word", MySQlDbType.VarChar, 30); foreach (Words words in Words_DB.Records) { command.Parameters["@IPAUK"].Value = words.IPAUK; command.Parameters["@IPAUS"].Value = words.IPAUS; command.Parameters["@Word"].Value = words.Word; command.ExecuteNonQuery(); } ``` Notice how the above minimizes the work done in the loop, which should improve performance, while also the in the question from using string concatenation to build the query. Separately, I have the impression `Words_DB.Records` is the result of a prior query. It's highly likely you could eliminate this entire section completely by updating the prior query to also do the update in one operation on the server. Not only would that greatly reduce your code, it will likely .
null
CC BY-SA 4.0
null
2023-01-31T17:01:51.747
2023-01-31T17:07:47.207
2023-01-31T17:07:47.207
3,043
3,043
null
75,300,597
2
null
75,299,922
1
null
Inside of your callback function you'll need to pull out the parent element and operate within that. I don't believe your HTML has enough detail to completely answer this, but the general idea is this. `.form-group.row` is my best guess as to where you want to operate ``` function() { const accountElement = $(this).closest('.form-group.row'); if (Number(this.value === 1) { accountElement.find('.mgconn').hide(); // additional changes using accountElement instead of $ ``` When jQuery triggers this handler, `this` is set to the object that received the change event. I do not recall if `this` is actually a jQuery object or an HTMLElement. But by wrapping it with `$(this)` we ensure it is a jQuery object and can then access the `.closest` function to search up the DOM tree and find the nearest `.form-group.row` so we can then find children later such as `.mgconn` that are only inside of the current `.form-group.row`. Again, this may not be exactly what you need to do. There doesn't seem to be enough HMTL in the example to provide an exact answer.
null
CC BY-SA 4.0
null
2023-01-31T17:04:42.250
2023-01-31T20:34:01.353
2023-01-31T20:34:01.353
9,398,523
9,398,523
null
75,300,679
2
null
75,300,007
1
null
Thanks a lot for your helps. This is my final code working properly. ``` string query = "UPDATE Words SET IPAUK=@IPAUK,IPAUS=@IPAUS WHERE WORD=@WORD"; var command = DatabaseConnection.MySql_Connection.CreateCommand(); try { foreach (Words words in Words_DB.Records) { MySqlParameter IPAUSp = new MySqlParameter("@IPAUS", MySqlDbType.VarChar, 60); MySqlParameter IPAUKp = new MySqlParameter("@IPAUK", MySqlDbType.VarChar, 60); MySqlParameter WORD = new MySqlParameter("@WORD", MySqlDbType.VarChar, 50); command.Parameters.Clear(); command.CommandText = query; command.Parameters.AddWithValue(IPAUKp.ToString(), words.IPAUK); command.Parameters.AddWithValue(IPAUSp.ToString(), words.IPAUS); command.Parameters.AddWithValue(WORD.ToString(), words.Word); int a = command.ExecuteNonQuery(); } ``` }
null
CC BY-SA 4.0
null
2023-01-31T17:10:47.920
2023-01-31T17:10:47.920
null
null
19,641,462
null
75,300,926
2
null
73,864,418
0
null
``` private async Task<BitmapImage> GetProfilePhotoAsync(Models.Models.OutlookUser authResult) { var bitmap = new BitmapImage(); try { var requestUserPhoto = authResult.GraphServiceClient.Me.Photo.Content.Request(); using (var resultsUserPhoto = await requestUserPhoto.GetAsync()) { using (var memStream = new MemoryStream()) { await resultsUserPhoto.CopyToAsync(memStream); memStream.Position = 0; bitmap.SetSource(memStream.AsRandomAccessStream()); } } } catch (Exception) { } return bitmap; } ```
null
CC BY-SA 4.0
null
2023-01-31T17:32:54.380
2023-01-31T17:32:54.380
null
null
19,473,398
null
75,301,068
2
null
72,618,881
0
null
Something like, ``` using System; public class Program { public static void Main() { var u0 = int.Parse(Console.ReadLine()); var u1 = int.Parse(Console.ReadLine()); var u2 = int.Parse(Console.ReadLine()); var u3 = int.Parse(Console.ReadLine()); var ng3 = int.Parse(Console.ReadLine()); if (ng3 < 3) throw new ArgumentOutOfRangeException(nameof(ng3)); for (int i = 4; i <= ng3; i++) { var u4 = (2 * u3) + ((-1)^i)*(u2 - (3 * u1) + (2 * u0)); u0 = u1; u1 = u2; u2 = u3; u3 = u4; } Console.WriteLine(u3); } } ``` It my be possible to create the identity function for the series and lose the loop.
null
CC BY-SA 4.0
null
2023-01-31T17:43:55.223
2023-01-31T17:43:55.223
null
null
659,190
null
75,301,076
2
null
18,165,863
2
null
I know this question is old but i would like to intoduce the cleanest way to do this with `ggh4x` ``` library(ggplot2) library(ggh4x) data <- read.table(text = "Group Category Value S1 A 73 S2 A 57 S1 B 7 S2 B 23 S1 C 51 S2 C 87", header = TRUE) # Only one more line of code with the function 'guide_axis_nested' # and changing the data from x axis to interaction(Group,Category, sep = "!") ggplot(data = data, aes(x = interaction(Group,Category, sep = "!"), y = Value, fill = Group)) + geom_col(position = 'dodge', show.legend = FALSE) + geom_text(aes(label = paste(Value, "%")), position = position_dodge(width = 0.9), vjust = -0.25) + scale_x_discrete(guide = guide_axis_nested(delim = "!"), name = "Category") ``` [](https://i.stack.imgur.com/Lyg1H.png)
null
CC BY-SA 4.0
null
2023-01-31T17:44:34.107
2023-01-31T17:44:34.107
null
null
9,900,368
null
75,301,302
2
null
75,295,444
0
null
For responsive height , width , margin , padding .. you can use this npm [https://www.npmjs.com/package/react-native-responsive-screen](https://www.npmjs.com/package/react-native-responsive-screen) For responsive font size , you can go with this npm [https://www.npmjs.com/package/react-native-responsive-fontsize](https://www.npmjs.com/package/react-native-responsive-fontsize) Regarding design issue you are facing , we can only inform after you put all code that you did As you added code for style of `headr` then it looks like `borderBottomLeftRadius` pending to curv from bottom left side same as right one to match expect result
null
CC BY-SA 4.0
null
2023-01-31T18:03:29.853
2023-01-31T18:03:29.853
null
null
5,696,047
null
75,301,484
2
null
75,300,724
0
null
You can pipe your observable and map it to the object you want. Only your data will be availible in the example below ``` Observable.pipe(map(resp => resp.data)).subscribe(data=> //do something) ```
null
CC BY-SA 4.0
null
2023-01-31T18:18:11.277
2023-01-31T18:18:11.277
null
null
19,433,398
null
75,301,729
2
null
75,301,313
0
null
Do you can run macro's from clipboard? Please try it for example with "alert(document.name)". Put this between "" to clipboard and select in menu macros - run clipboard. In normal case you get an popup with the actual document name.
null
CC BY-SA 4.0
null
2023-01-31T18:39:01.240
2023-01-31T18:39:01.240
null
null
20,537,009
null
75,301,851
2
null
75,300,689
0
null
: You could create an extra column with the x-axis position in numeric way to have the values dodged. You could use two x aesthetic columns for both the layer and `geom_point` and `geom_line`. Using `scale_x_continuous` to have the continuous axis to dodge the values and create labels like this: ``` library(ggplot2) library(stringr) library(dplyr) df %>% mutate(Treatment2 = c(0.8, 1.2, 2.8, 3.2, 1.8, 2.2, 3.8, 4.2)) %>% ggplot(aes(x=Treatment, y=Ratio, shape=Year, linetype=factor(Treatment))) + geom_point(aes(x = Treatment2), size=3.5)+ geom_line(aes(group = Treatment, x = Treatment2)) + scale_x_continuous(breaks = c(1,2,3,4), labels = c("Drill_Herb", "Herb_None", "Drill_None", "Herb_Drill")) + facet_wrap(~Comparison_Combo, drop = TRUE, scales = "free_x", nrow = 1) ``` ![](https://i.imgur.com/KQxrirx.png) [reprex v2.0.2](https://reprex.tidyverse.org) You should add a column that shows the combination of the points you want to connect like this: ``` library(ggplot2) library(stringr) library(dplyr) df %>% mutate(Treatment2 = c(1, 2, 3, 4, 1, 2, 3, 4)) %>% ggplot(aes(x=Treatment, y=Ratio, shape=Year, linetype=factor(Treatment2), group = factor(Treatment2))) + facet_wrap(~Comparison_Combo, drop = TRUE, scales = "free_x", nrow = 1) + geom_point(size=3.5, position=position_dodge(width=0.55))+ geom_path(lwd=1, position=position_dodge(width=0.55)) ``` ![](https://i.imgur.com/7EvdpXC.png) [reprex v2.0.2](https://reprex.tidyverse.org) --- You could use `group` in your aesthetics like this: ``` library(ggplot2) library(stringr) ggplot(df, aes(x=Treatment, y=Ratio, shape=str_wrap(Year,25), linetype=str_wrap(Treatment), group = 1)) + facet_wrap(~Comparison_Combo, drop = TRUE, scales = "free_x", nrow = 1) + geom_point(size=3.5, position=position_dodge(width=0.55))+ geom_path(aes(group=Treatment), lwd=1, position=position_dodge(width=0.55)) ``` ![](https://i.imgur.com/LWzx7Vo.png) [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2023-01-31T18:51:41.760
2023-01-31T22:07:57.290
2023-01-31T22:07:57.290
14,282,714
14,282,714
null
75,302,029
2
null
75,301,233
1
null
You're on the right track - this is exactly what `VLOOKUP` and `INDEX/MATCH` are for! Here's the solution in this case: ``` =INDEX($K$1:$K$10, MATCH($A1, $J$1:$J$10, 0)) ``` I'd generally prefer `INDEX/MATCH` to `VLOOKUP` especially if you plan to add columns to your spreadsheet. If you however prefer the `VLOOKUP` solution, it's as @Warcupine commented: ``` =VLOOKUP($A1,$J$1:$K$10,2,FALSE) ``` If you're rocking a newer version of Excel (2019+), `XLOOKUP` provides the best of both worlds in my opinion (stable and concise): ``` =XLOOKUP($A1,$J$1:$J$10,$K$1:$K$10) ```
null
CC BY-SA 4.0
null
2023-01-31T19:07:28.680
2023-02-01T08:19:42.000
2023-02-01T08:19:42.000
17,113,887
17,113,887
null
75,302,214
2
null
75,295,041
0
null
Use the `Developer: Inspect Editor Tokens and Scopes` action to open [the Scope Inspector](https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#scope-inspector). Then click on the token you want to inspect. Then find out its textmate scopes. In this case, the opening angle bracket is: ``` punctuation.definition.tag.begin.html meta.tag.structure.html.start.html text.html.derivative ``` Pick an appropriate textmate scope, and then use it in a token colour customization like so: ``` "editor.tokenColorCustomizations": { "[Tokyo Night Storm]": { "textMateRules": [{ "scope":"punctuation.definition.tag.begin.html", "settings": { "foreground": "#FF0000", "fontStyle": "bold" } },{ "scope":"punctuation.definition.tag.end.html", "settings": { "foreground": "#FF0000", "fontStyle": "bold" } }], } }, ``` See also [the docs for creating your own colour theme](https://code.visualstudio.com/docs/getstarted/themes#_creating-your-own-color-theme).
null
CC BY-SA 4.0
null
2023-01-31T19:26:35.240
2023-01-31T19:26:35.240
null
null
11,107,541
null
75,302,600
2
null
75,294,027
0
null
I used a working example to explain the color tag function for the rows: ``` # Source for base treeview https://www.pythontutorial.net/tkinter/tkinter-treeview/ # extendet with style and color line 11 to 13, 24, 33 to 38 and 60,61 import tkinter as tk from tkinter import ttk from tkinter.messagebox import showinfo root = tk.Tk() root.title('Treeview demo') root.geometry('620x200') # style the widget s = ttk.Style() s.theme_use('clam') # define columns columns = ('first_name', 'last_name', 'email') tree = ttk.Treeview(root, columns=columns, show='headings') # define headings tree.heading('first_name', text='First Name') tree.heading('last_name', text='Last Name') tree.heading('email', text='Email') s.configure('Treeview.Heading', background="green3") # generate sample data contacts = [] for n in range(1, 100): contacts.append((f'first {n}', f'last {n}', f'email{n}@example.com')) # add data to the treeview AND tag the row color i = 1 for contact in contacts: i += 1 if i%2: tree.insert('', tk.END, values=contact, tags = ('oddrow',)) else: tree.insert('', tk.END, values=contact, tags = ('evenrow',)) def item_selected(event): for selected_item in tree.selection(): item = tree.item(selected_item) record = item['values'] # show a message showinfo(title='Information', message=','.join(record)) tree.bind('<<TreeviewSelect>>', item_selected) tree.grid(row=0, column=0, sticky='nsew') # add a scrollbar scrollbar = ttk.Scrollbar(root, orient=tk.VERTICAL, command=tree.yview) tree.configure(yscroll=scrollbar.set) scrollbar.grid(row=0, column=1, sticky='ns') # style row colors tree.tag_configure('oddrow', background='lightgrey') tree.tag_configure('evenrow', background='white') # run the app root.mainloop() ``` Output: [](https://i.stack.imgur.com/kpl7k.png)
null
CC BY-SA 4.0
null
2023-01-31T20:07:58.940
2023-01-31T20:07:58.940
null
null
12,621,346
null
75,302,756
2
null
75,302,709
0
null
You mean like that: ``` a = int(input("Give me a number man: ")) b = int(input("Give me another number: ")) print(f'print({a} + {b}) = {a + b}') print(f'print({a} - {b}) = {a - b}') print(f'print({a} * {b}) = {a * b}') print(f'print({a} // {b}) = {a // b}') print("Look at all those maths!") ``` Output ``` Give me a number man: 3 Give me another number: 2 print(3 + 2) = 5 print(3 - 2) = 1 print(3 * 2) = 6 print(3 // 2) = 1 Look at all those maths! ```
null
CC BY-SA 4.0
null
2023-01-31T20:25:44.633
2023-01-31T20:31:12.770
2023-01-31T20:31:12.770
3,943,170
3,943,170
null
75,302,821
2
null
75,302,237
0
null
The data structure required by `radarchart` from the `fmsb` package is a bit special. First, you could keep the player names but have to move them to the row names. Second, the first two rows should contain the min and max values, where the max value should be in the first row and the min value in second row. From the docs: > If maxmin is TRUE, this must include maximum values as row 1 and minimum values as row 2 for each variables, and actual data should be given as row 3 and lower rows. The number of columns (variables) must be more than 2. Using some fake example data to mimic your real data you could achieve your desired result like so: ``` set.seed(123) dat <- data.frame( Player = c("A", "B", "Max", "Min"), Feature1 = c(runif(2, 0, 1), c(1, 0)), Feature2 = c(runif(2, 0, 2), c(2, 0)), Feature3 = c(runif(2, 0, 3),c(3, 0)), Feature4 = c(runif(2, 0, 4),c(4, 0)), Feature5 = c(runif(2, 0, 5), c(5, 0)) ) # Move max and min values to first two rows dat <- dat[c(3:4, 1:2), ] # Move Player names to rownames row.names(dat) <- dat$Player dat <- dat[-1] library(fmsb) cols <- c("black", "red") radarchart(dat, plty = 1, plwd = 3, pcol = cols) legend("topright", legend = row.names(dat)[-c(1:2)], bty = "n", pch = 20, col = cols, text.col = "grey25", pt.cex = 2) ``` ![](https://i.imgur.com/NLe7nyI.png)
null
CC BY-SA 4.0
null
2023-01-31T20:32:28.717
2023-01-31T20:32:28.717
null
null
12,993,861
null
75,302,853
2
null
59,617,766
0
null
VSCode tutorial: Open settings.json, then put this in the json: ``` "editor.fontFamily": "Fira Code Regular", "editor.fontLigatures": true ```
null
CC BY-SA 4.0
null
2023-01-31T20:35:13.933
2023-01-31T20:35:13.933
null
null
14,551,413
null
75,302,916
2
null
75,277,938
1
null
This is a solution that worked for me (Using relative numbers): ``` -- Sets colors to line numbers Above, Current and Below in this order function LineNumberColors() vim.api.nvim_set_hl(0, 'LineNrAbove', { fg='#51B3EC', bold=true }) vim.api.nvim_set_hl(0, 'LineNr', { fg='white', bold=true }) vim.api.nvim_set_hl(0, 'LineNrBelow', { fg='#FB508F', bold=true }) end ``` Calling this function in `colors.lua` right after a function for my neovim theme. Like so: ``` SetTheme() LineNumberColors() ```
null
CC BY-SA 4.0
null
2023-01-31T20:41:53.000
2023-01-31T20:41:53.000
null
null
12,934,510
null
75,302,940
2
null
75,302,709
1
null
You are mixing up printing a string vs. printing an expression. Printing a string like `print('hello world')` will print the literal message because you've indicated it's a string with quotes. However, if you provide an expression like `print(a+b)`, it will evaluate that expression (calculate the math) and then print the string representation of that evaluation. Now, what you want is actually a mix of both, you want to print a string that has certain parts replaced with an expression. This can be done by "adding" strings and expressions together like so: `print(a + '+' + b + '=' + (a+b))` Notice the difference between `+` without quotes and `'+'` with quotes. The first is the addition operator, the second is the literal plus character. Let's break down how the print statement parses this. Let's say we have `a = 5` and `b = 3`. First, we evaluate all the expressions: `print(5 + '+' + 3 + '=' + 8)` Now, we have to add a combination of numbers with strings. The `+` operator acts differently depending on context, but here it will simply convert everything into a string and then "add" them together like letters or words. Now it becomes something like: `print('5' + '+' + '3' + '=' + '8')` Notice how each number is now a string by the surrounding quotes. This parses to: `print('5+3=8')` which prints the literal `5+3=8`
null
CC BY-SA 4.0
null
2023-01-31T20:44:59.140
2023-01-31T20:44:59.140
null
null
21,021,990
null
75,303,075
2
null
75,230,023
1
null
It seems to me that ``` div .selectAll(".edge") .nodes() .forEach(...) ``` should iterate through the edges in the order in which they were laid down so there should be no need to sort. Taking that into account, here's some code that animates the drawing of the edges in response to a button push: ``` let source = `digraph Final_Graph { graph [center=true rankdir=LR ratio=compress size="15,10"] a b c d a -> b [label = 1 id=1] a -> c [label = 2 id=2] a -> d [label = 3 id=3] b -> d [label = 4 id=4] c -> d [label = 5 id=5] subgraph cluster_1{ color=lightgrey style=filled label="A" a b } subgraph cluster_2{ color=lightgrey style=filled label="B" a b } subgraph cluster_3{ color=lightgrey style=filled label="C" c d } }`; let div = d3.select("#graph") div.graphviz().renderDot(source, function() { div.selectAll("title").remove(); div.selectAll("text").style("pointer-events", "none"); }) d3.select('#button').on('click', draw_edges) function draw_edges() { div .selectAll(".edge") .nodes() .forEach(function (e, i) { let ee = d3.select(e); let path = ee.select("path"); let length = path.node().getTotalLength(); path.attr("stroke-dasharray", [0, length]); let head = ee.select("polygon"); head.attr("opacity", 0); setTimeout(() => { path .attr("stroke-dasharray", [0, length]) .transition() .duration(400) .attr("stroke-dasharray", [length, length]); setTimeout(() => head.attr("opacity", 1), 400); }, 400 * (i + 1)); }); } ``` ``` <script src="//d3js.org/d3.v5.min.js"></script> <script src="https://unpkg.com/@hpcc-js/[email protected]/dist/index.min.js"></script> <script src="https://unpkg.com/[email protected]/build/d3-graphviz.js"></script> <button id="button">Draw edges</button> <div id="graph" style="text-align: center;"></div> ``` I think the motion captures the users attention much better than the coloring. I've also [implemented this using Observable](https://observablehq.com/d/ddb320618d36b8fe) and you can see code for animating the process using color there as well.
null
CC BY-SA 4.0
null
2023-01-31T20:59:11.340
2023-02-02T03:19:03.380
2023-02-02T03:19:03.380
700,827
700,827
null
75,303,570
2
null
75,303,380
-1
null
This caused because templates are protected to unnecessary code from values. You should try `autoescape false` block which disables autoescape: ``` {% autoescape false %} <p>{{ gamertag }}</p> {% endautoescape %} {% autoescape false %} <p>{{ gamerpic }}</p> {% endautoescape %} ``` This should render your value even as html code
null
CC BY-SA 4.0
null
2023-01-31T21:56:36.513
2023-01-31T21:58:10.390
2023-01-31T21:58:10.390
17,301,296
17,301,296
null
75,304,226
2
null
75,300,697
0
null
Add a few extra CSS image parameters (see below). Overlay CSS parameters are fine (but set opacity: 0). We think that the DIV placements are out of sequence, as the text needs to be inside so it can stack (see example below). The class col-lg-3 may (or may not) need changed after its placed inside all of that. We used JS comments to make it a bit easier to see arrangement of closing DIV's. Example below uses only one (col-lg-3) DIV sets with image. ``` .resource-img-height { display: block; width: 100%; /*--height: auto;--*/ height: 400px; object-fit: cover; } .img-overlay { position: absolute; top: 0; bottom: 0; left: 0; right: 0; opacity: 0; transition: 0.5s ease-in; background-color: rgba(0, 0, 0, 0.8); } <div class="col-lg-3 img-div-pad-right img-div-pad-left book-img-div"><img src="https://via.placeholder.com/100" class="img-fluid resource-img-height" alt=""> <div class="img-overlay vw-100"> <div class="col-lg-3 my-auto"> <h5 class="font-color mt-1">Book</h5> <h1 class="font-color mt-1">Product Leadership</h1> <p class="font-color mt-3 resourse-book-txt-width font-size-resourse">How Top Product Managers Launch Awesome Products and Build Successful Teams.</p> </div><!--// End text--> </div><!--// End overlay--> </div><!--// End column container and image--> ```
null
CC BY-SA 4.0
null
2023-01-31T23:35:34.977
2023-01-31T23:35:34.977
null
null
19,217,876
null
75,304,271
2
null
72,522,765
0
null
In macos it is for permissions, I solved it by following these two tutorials - Enable root user [https://www.maketecheasier.com/enable-root-user-mac/](https://www.maketecheasier.com/enable-root-user-mac/)- Execute Unity Hub as root user [https://es.wikihow.com/abrir-aplicaciones-con-privilegios-de-ra%C3%ADz-en-una-Mac#:~:text=Es%20posible%20abrir%20cualquier%20aplicaci%C3%B3n,a%20la%20aplicaci%C3%B3n%20o%20computadora](https://es.wikihow.com/abrir-aplicaciones-con-privilegios-de-ra%C3%ADz-en-una-Mac#:%7E:text=Es%20posible%20abrir%20cualquier%20aplicaci%C3%B3n,a%20la%20aplicaci%C3%B3n%20o%20computadora).
null
CC BY-SA 4.0
null
2023-01-31T23:42:49.423
2023-01-31T23:42:49.423
null
null
12,513,041
null
75,304,420
2
null
75,283,614
0
null
That is not possible with smart alerts. You need to use the `on-send` feature and use the Dialog API for displaying a rich UI for the dialogs, see [Use the Office dialog API in Office Add-ins](https://learn.microsoft.com/en-us/office/dev/add-ins/develop/dialog-api-in-office-add-ins) for more information. Read more about the on-send feature in the [On-send feature for Outlook add-ins](https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/outlook-on-send-addins?tabs=windows) article. Note, you can also post or vote for an existing feature request on [Tech Community](https://aka.ms/M365dev-suggestions) where they are considered when the Office dev team goes through the planning process.
null
CC BY-SA 4.0
null
2023-02-01T00:11:58.693
2023-02-01T00:11:58.693
null
null
1,603,351
null
75,304,562
2
null
11,377,453
0
null
I wrote one handler recently for my own toy OS on Cortex-M. Works if tasks use PSP pointer. Idea: Get interrupted process's stack pointer, get process's stacked PC, it will have the instruction address of instruction after SVC, look up the immediate value in the instruction. It's not as hard as it sounds. ``` uint8_t __attribute__((naked)) get_svc_code(void){ __asm volatile("MSR R0, PSP"); //Get Process Stack Pointer (We're in SVC ISR, so currently MSP in use) __asm volatile("ADD R0, #24"); //Pointer to stacked process's PC is in R0 __asm volatile("LDR R1, [R0]"); //Instruction Address after SVC is in R1 __asm volatile("SUB R1, R1, #2"); //Subtract 2 bytes from the address of the current instruction. Now R1 contains address of SVC instruction __asm volatile("LDRB R0, [R1]"); //Load lower byte of 16-bit instruction into R0. It's immediate value. //Value is in R0. Function can return } ```
null
CC BY-SA 4.0
null
2023-02-01T00:41:58.690
2023-02-01T00:41:58.690
null
null
5,932,454
null
75,304,600
2
null
63,491,724
0
null
I edited the pudb config file at `~/.config/pudb/pudb.cfg` and set `theme = dark vim`. For example, here is the snippet from my `pudb.cfg` : ``` . . sidebar_width = 0.5 stack_weight = 1 stringifier = default theme = dark vim variables_weight = 1 wrap_variables = Tru . . ``` Available themes(Jan 2023) taken from [here](https://github.com/inducer/pudb/blob/main/pudb/theme.py) are : ``` THEMES = [ "classic", "vim", "dark vim", "midnight", "solarized", "agr-256", "monokai", "monokai-256", "mono", ] ```
null
CC BY-SA 4.0
null
2023-02-01T00:49:02.010
2023-02-01T00:49:02.010
null
null
3,646,014
null
75,304,833
2
null
75,304,408
0
null
Try this: ``` function checkValue(e) { var sh = e.range.getSheet(); if (sh.getName() == "Sheet1" && e.range.columnStart == 10 && e.range.rowStart > 1 && e.value == 'Approved') { let msg = `${sh.getRange(e.range.rowStart,1,1,sh.getLastColumn()).getDisplayValues().flat().join('\n')}` MailApp.sendEmail(sh.getRange(e.range.rowStart,2).getDisplayValue(), "Task Completed", msg); } } ``` Use installable onEdit trigger
null
CC BY-SA 4.0
null
2023-02-01T01:35:24.163
2023-02-01T02:03:16.250
2023-02-01T02:03:16.250
7,215,091
7,215,091
null
75,304,938
2
null
75,304,699
0
null
Using Word objects and properties seems overly complex for Outlook message. Here is example of building two tables using HTML code tags. ``` Dim strT As String, strC As String, strH As String strT = "width='500' style='text-align:left;border:2px;font-family:calibri;border-collapse:collapse;padding:5px'" strC = "style='border:3px solid black' width='50%'" strH = "<table " & strT & ">" & _ "<tr><td " & strC & ">Initial quote : </td><td " & strC & "></td></tr>" & _ "<tr><td " & strC & ">Discount rate : </td><td " & strC & "></td></tr>" & _ "<tr><td " & strC & ">Final quote : </td><td " & strC & "></td></tr></table><br>" & _ "<table " & strT & ">" & _ "<tr><td " & strC & ">Last spend on year 2020 : </td><td " & strC & "></td></tr>" & _ "<tr><td " & strC & ">Increment increase percentage : </td><td " & strC & "></td></tr>" & _ "<tr><td " & strC & ">Final quote : </td><td " & strC & "></td></tr></table>" ```
null
CC BY-SA 4.0
null
2023-02-01T01:56:55.563
2023-02-01T02:48:17.783
2023-02-01T02:48:17.783
7,607,190
7,607,190
null
75,305,118
2
null
71,591,971
-1
null
bash starting will be more slow, just suggest
null
CC BY-SA 4.0
null
2023-02-01T02:39:49.663
2023-02-01T02:39:49.663
null
null
6,799,716
null
75,305,499
2
null
75,305,180
0
null
Check the datetime you are using is the same as what is being used on Azure for the service/plan/account or whatever, these can differ on both sides.It could also be that Azure requires the datetime in GMT or a US format. So it may be that your request is being read as last month, but azure is only providing data for this in the upcoming month. To test this try switching to prior dates and see if any dates in the past give you the same data as what you are getting on the 1st. If so I would say that is what is happening. The fact it only occurs on the first but the data is available in the portal would indicate to me it is definitely something to do with the timezone, but I could be wrong.
null
CC BY-SA 4.0
null
2023-02-01T03:56:37.323
2023-02-01T03:56:37.323
null
null
4,105,658
null
75,305,578
2
null
75,304,715
0
null
1. Make sure that you enabled your "Code Runner" extension 2. Go to the top right corner of VS Code to find a button that looks like three dots (...) 3. Right click on it and press "Run Code" 4. The Run Code button should reappear now
null
CC BY-SA 4.0
null
2023-02-01T04:13:32.577
2023-02-01T04:13:32.577
null
null
11,067,496
null
75,305,593
2
null
75,066,015
0
null
If your prefab is a child of the anchor you could do something like this to save the position relative to the anchor: ``` var localPos = spawned.transform.localPosition; var localRot = spawned.transform.localEulerAngles; var localSca = spawned.transform.localScale; var prefab = new Prefab { AnchorId = anchorId, PosX = localPos.x, PosY = localPos.y, PosZ = localPos.z, RotX = localRot.x, RotY = localRot.y, RotZ = localRot.z, ScaX = localSca.x, ScaY = localSca.y, ScaZ = localSca.z }; ``` Save prefab to the cloud. And then when you are starting a new session and you locate the anchor, you'd spawn the prefab as a child of the anchor and set the transform from the data you stored previously: ``` spawned.transform.localPosition = new Vector3(prefab.PosX, prefab.PosY, prefab.PosZ); spawned.transform.localRotation = Quaternion.Euler(prefab.RotX, prefab.RotY, prefab.RotZ); spawned.transform.localScale = new Vector3(prefab.ScaX, prefab.ScaY, prefab.ScaZ); ```
null
CC BY-SA 4.0
null
2023-02-01T04:15:32.903
2023-02-01T04:15:32.903
null
null
5,000,637
null
75,306,047
2
null
75,305,933
0
null
I see you labeled the question with `multiclass-classification`. However, scikit-learns's [confusion_matrix()](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.confusion_matrix.html) returns an n_classes * n_classes matrix. You can't assign 9 or 16 or however many values you have here to `tn, fp, fn, tp`. That terminology is for binary classification. You can either calculate the metrics you want from the raw multiclass confusion matrix, or use some of the other methods in [sklearn.metrics](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.metrics)
null
CC BY-SA 4.0
null
2023-02-01T05:35:31.313
2023-02-01T05:35:31.313
null
null
1,404,505
null
75,306,087
2
null
75,297,594
0
null
I have created a sample `ASP.NET Core 6.0 Web API` and able to deploy the Application to `Azure App Service` without any errors. Generally, this type of error occurs when there is any error in the code or Configuration issues. > In my version of the project there is no Startup.cs but Program.cs `.Net6 Core` ![enter image description here](https://i.stack.imgur.com/xVfHx.png) Yes, we need to `Configure` the code related to `Swagger` in `Program.cs` itself. Check the below steps and make sure you are following the same to deploy without any issues. - Select the `ASP.NET Core Web API` template. ![enter image description here](https://i.stack.imgur.com/ahrfB.png)- Select `Enable openAPI support`. ![enter image description here](https://i.stack.imgur.com/17N0T.png) `.csproj` ``` <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>net6.0</TargetFramework> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> </PropertyGroup> <ItemGroup> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" /> </ItemGroup> </Project> ``` `Program.cs` ``` var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllers(); builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); var app = builder.Build(); if (app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(); } else { app.UseSwagger(); app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "v1"); options.RoutePrefix = string.Empty; }); } app.UseHttpsRedirection(); app.UseAuthorization(); app.MapControllers(); app.Run(); ``` ![enter image description here](https://i.stack.imgur.com/uvIcS.png) ![enter image description here](https://i.stack.imgur.com/CaF0s.png)
null
CC BY-SA 4.0
null
2023-02-01T05:41:56.937
2023-02-01T05:41:56.937
null
null
19,648,279
null
75,306,170
2
null
75,304,124
1
null
To solve this issue, you could obtain via `UIKeyboard.FrameEndUserInfoKey` and calculate the height need to change. ``` NSValue result = (NSValue)args.Notification.UserInfo.ObjectForKey(new NSString(UIKeyboard.FrameEndUserInfoKey)); CGSize keyboardSize = result.RectangleFValue.Size; ``` ``` private void Entry_Focused(object sender, FocusEventArgs e) { if (DeviceInfo.Current.Platform == DevicePlatform.iOS) { NFloat bottom; try { UIWindow window = UIApplication.SharedApplication.Delegate.GetWindow(); bottom = window.SafeAreaInsets.Bottom; } catch { bottom = 0; } var heightChange = (keyboardSize.Height - bottom); layout.TranslateTo(0, originalTranslationY.Value - heightChange, 50); } } private void Entry_Unfocused(object sender, FocusEventArgs e) { if (DeviceInfo.Current.Platform == DevicePlatform.iOS) { layout.TranslateTo(0, 0, 50); } } ``` Hope it works for you.
null
CC BY-SA 4.0
null
2023-02-01T05:56:58.600
2023-02-01T09:17:41.020
2023-02-01T09:17:41.020
8,448,193
8,448,193
null
75,306,206
2
null
75,305,933
0
null
Check the dimensions of the confusion matrix to ensure that it is a 2x2 matrix, and the dimensions of the predicted and actual labels to ensure that they match.
null
CC BY-SA 4.0
null
2023-02-01T06:02:19.597
2023-02-01T06:02:19.597
null
null
7,583,614
null
75,306,318
2
null
75,304,699
0
null
Decided to combine the 2 tables in 1. Leaving an empty row. ``` myitem.Display Set ins = oOutlook.ActiveInspector Set document = ins.WordEditor Set Word = document.Application Set selection = Word.selection selection.TypeText Text:="Dear Requester," selection.TypeParagraph selection.TypeParagraph With selection .Font.Bold = True End With selection.TypeText Text:="Please confirm that quotation of chosen vendor is suitable before proceeding with PR creation." selection.TypeParagraph selection.TypeParagraph 'add table here With selection.Tables.Add(Range:=selection.Range, NumRows:=6, NumColumns:=2) .Range.Font.Bold = True .Cell(1, 1).Range.Text = "Initial quote" .Cell(1, 2).Range.Text = "" .Cell(2, 1).Range.Text = "Discount rate" .Cell(2, 2).Range.Text = "" .Cell(3, 1).Range.Text = "Final quote" .Cell(3, 2).Range.Text = "" .Cell(4, 1).Range.Text = "" .Cell(4, 2).Range.Text = "" .Cell(5, 1).Range.Text = "Last spend on year _2020_ :" .Cell(5, 2).Range.Text = "" .Cell(6, 1).Range.Text = "Incremental increase percentage :" .Cell(6, 2).Range.Text = "" End With ```
null
CC BY-SA 4.0
null
2023-02-01T06:17:55.543
2023-02-01T06:17:55.543
null
null
21,047,272
null
75,306,404
2
null
75,297,494
0
null
you can use something like: ``` vec = x0+(x1-x0)*linspace(0,1,N).^alpha; ``` where x0 is the starting point, x1 is the end point, the vector length is N, and alpha is some nonlinear spacing ... example: ``` vec = 2+1*linspace(0,1,10).^4 2.0000 2.0002 2.0024 2.0123 2.0390 2.0953 2.1975 2.3660 2.6243 3.0000 ```
null
CC BY-SA 4.0
null
2023-02-01T06:31:54.317
2023-02-01T06:31:54.317
null
null
1,292,464
null
75,306,508
2
null
75,303,063
1
null
Since the question did not have sample data, I used the data in the [reference](https://plotly.com/python/choropleth-maps/#indexing-by-geojson-properties) and expanded it to the five-year district-by-district polling results. Now the data is ready for the animated slider. I also set up a CRS for the json in the reference as geometry and loaded it as a geopandas data frame. The geojson specification in my map creation code is using an interface that converts from the geopandas data frame I just created to geojson. Please replace the key column in the question with the district column in my answer. ``` import plotly.express as px import geopandas as gpd import pandas as pd import numpy as np df = px.data.election() dff = pd.DataFrame({'district': df['district'].tolist()*5,#np.repeat(df['district'],5), 'total': np.random.randint(5000,12000,len(df)*5), 'year': sum([[x]*len(df) for x in np.arange(2017, 2022,1)],[]) }) geojson = px.data.election_geojson() gdf = gpd.GeoDataFrame.from_features(geojson, crs='epsg:4326') fig = px.choropleth(dff, geojson=gdf.__geo_interface__, color="total", animation_frame='year', locations="district", featureidkey="properties.district", projection="mercator", color_continuous_scale="deep" ) fig.update_geos(fitbounds="locations", visible=False) fig.update_layout(height=500,width=500) fig.show() ``` [](https://i.stack.imgur.com/fdifN.png)
null
CC BY-SA 4.0
null
2023-02-01T06:44:29.907
2023-02-01T06:44:29.907
null
null
13,107,804
null
75,306,535
2
null
75,305,877
0
null
You should use only one `NavigationView` in your navigation stack. So you have to get rid of nested `NavigationView`'s in your components. You can simply delete `NavigationView` everywhere except `RedOneView`. But I suggest creating `RootView` component with `NavigationView` and get rid of `NavigationView` in all child components ``` struct RootView: View { var body: some View { NavigationView { RedOneView() } } } struct RedOneView: View { var body: some View { VStack { CircleViewNumber(color: .red, number: 1) .navigationTitle("Red one") .offset(y: -60) NavigationLink(destination: BlueTwoView(color: .orange), label: { Text("Blue View") .bold() .frame(width: 200, height: 50) .background(Color.blue) .foregroundColor(.white) .cornerRadius(10) }) } } struct BlueTwoView: View { var color: Color var body: some View { VStack { CircleViewNumber(color: color, number: 2) .navigationTitle("Blue two") .offset(y: -60) NavigationLink(destination: GreenThreeView(), label: { Text("Next Screen") }) } } } //... ```
null
CC BY-SA 4.0
null
2023-02-01T06:47:09.997
2023-02-01T06:47:09.997
null
null
7,309,962
null
75,306,814
2
null
75,196,124
0
null
You can Modify your theme style. Add this to your style.xml file. ``` <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowSwipeToDismiss">false</item> </style> ``` Then add theme style in your manifest file on targeted activity like this: ``` android:theme="@style/AppTheme" ``` This will disable swipe in the app or activity.
null
CC BY-SA 4.0
null
2023-02-01T07:26:13.593
2023-02-02T06:11:44.687
2023-02-02T06:11:44.687
18,715,502
18,715,502
null
75,307,471
2
null
75,281,183
0
null
It was non-obvious, but all you need is to add Android TV form factor to the Google Play Console: -> -> -> [How to add the form factor to the Play Console](https://i.stack.imgur.com/yIRYx.jpg) I waited over 24 hours before my application was approved. Now all TV devices are available.
null
CC BY-SA 4.0
null
2023-02-01T08:38:55.743
2023-02-01T08:38:55.743
null
null
19,338,636
null
75,307,724
2
null
75,305,659
1
null
> Neither clang's nor gcc's headers have comments on my macOS. That's part of the issue. The vscode-cpptools extension creates mousover popups based on documentation comments in the headers of the standard library being used for the project (see this question and my answer there: [Visual Studio Code Intellisense doesn't show function documentation for C++](https://stackoverflow.com/questions/73326790/visual-studio-code-intellisense-doesnt-show-function-documentation-for-c)). The clangd extension also does this from what I can see in the screenshot on [its readme's section on hover and inlay hints](https://github.com/clangd/vscode-clangd#hover-and-inlay-hints) (the screenshot of its inlay hints shows the same doc comment above my installation of gcc's `bits/basic_string.h` `size()` function). So if you want a solution, install a standard library where the headers have doc comments. --- Side note: I haven't used this, but you may be interested to try this VS Code extension: [Guyutongxue.cpp-reference](https://marketplace.visualstudio.com/items?itemName=Guyutongxue.cpp-reference), which > is a tool to browse cppreference.com from within vscode, instead of going to the browser to do so. You can use this extension to search for library and methods documentation of the C++ standard.
null
CC BY-SA 4.0
null
2023-02-01T09:01:02.227
2023-02-01T09:06:41.133
2023-02-01T09:06:41.133
11,107,541
11,107,541
null
75,307,823
2
null
70,947,176
0
null
Make project Android Stuio in C, then make folder, example then click on change to , then click and , then click or last click on change to (or on Embedded JDK), then click and , then click or Gradle [view screenshot](https://i.stack.imgur.com/jb9pD.png)
null
CC BY-SA 4.0
null
2023-02-01T09:10:18.930
2023-02-01T09:15:59.103
2023-02-01T09:15:59.103
14,186,146
14,186,146
null
75,307,846
2
null
75,299,253
0
null
A better approach is to use the build in .NET Libraries to generate your JWT tokens, just to make sure you get everything right. There are two different libraries in .NET for generating tokens and you can read about this here: [Why we have two classes for JWT tokens JwtSecurityTokenHandler vs JsonWebTokenHandler?](https://stackoverflow.com/questions/60455167/why-we-have-two-classes-for-jwt-tokens-jwtsecuritytokenhandler-vs-jsonwebtokenha) Here's a resource to explore for manually creating a token: [https://www.c-sharpcorner.com/article/jwt-validation-and-authorization-in-net-5-0/](https://www.c-sharpcorner.com/article/jwt-validation-and-authorization-in-net-5-0/)
null
CC BY-SA 4.0
null
2023-02-01T09:12:23.883
2023-02-01T09:12:23.883
null
null
68,490
null
75,307,826
2
null
75,306,252
0
null
I checked with the team apparently there is a back log for these messages so they may have detected a few weeks ago that you were still using the old library and the message is just getting sent now. You know you have upgraded and are no longer getting the error message so your all good.
null
CC BY-SA 4.0
null
2023-02-01T09:10:24.873
2023-02-01T17:57:25.637
2023-02-01T17:57:25.637
1,841,839
1,841,839
null
75,308,192
2
null
74,912,262
0
null
Use `GenericMultipleBarcodeReader` to read the QR code. ``` public void decodefile(String filename) { // Read an image to BufferedImage BufferedImage image = null; try { image = ImageIO.read(new File(filename)); } catch (IOException e) { System.out.println(e); return; } // ZXing BinaryBitmap bitmap = null; int[] pixels = image.getRGB(0, 0, image.getWidth(), image.getHeight(), null, 0, image.getWidth()); RGBLuminanceSource source = new RGBLuminanceSource(image.getWidth(), image.getHeight(), pixels); bitmap = new BinaryBitmap(new HybridBinarizer(source)); MultiFormatReader reader = new MultiFormatReader(); GenericMultipleBarcodeReader multiReader = new GenericMultipleBarcodeReader(reader); try { Result[] zxingResults = multiReader.decodeMultiple(bitmap); System.out.println("ZXing result count: " + zxingResults.length); if (zxingResults != null) { for (Result zxingResult : zxingResults) { System.out.println("Format: " + zxingResult.getBarcodeFormat()); System.out.println("Text: " + zxingResult.getText()); System.out.println(); } } } catch (NotFoundException e) { e.printStackTrace(); } pixels = null; bitmap = null; if (image != null) { image.flush(); image = null; } } ``` Here is my results: ``` ZXing result count: 1 Format: QR_CODE Text: https://mp-daily.bookln.cn/q?c=1201M9XUEDE ```
null
CC BY-SA 4.0
null
2023-02-01T09:40:57.177
2023-02-01T09:40:57.177
null
null
644,010
null
75,308,228
2
null
72,851,548
12
null
Check if "Read and write permissions" are enabled in Settings -> Actions -> General -> Workflow permissions: ![Workflow permissions Setting](https://i.stack.imgur.com/A5EEk.png)
null
CC BY-SA 4.0
null
2023-02-01T09:44:28.313
2023-02-02T23:35:36.723
2023-02-02T23:35:36.723
13,138,364
14,875,399
null
75,308,397
2
null
75,308,278
1
null
You could use the following code that was the [answer](https://stackoverflow.com/questions/1639463/matplotlib-border-width) on a similar question ``` import matplotlib.pyplot as plt import matplotlib as mpl plt.rcParams["axes.edgecolor"] = "black" plt.rcParams["axes.linewidth"] = 2.50 fig = plt.figure(figsize = (4.1, 2.2)) ax = fig.add_subplot(111) ```
null
CC BY-SA 4.0
null
2023-02-01T09:58:48.133
2023-02-01T09:58:48.133
null
null
16,781,682
null
75,308,407
2
null
75,308,278
1
null
You can set the width and colour of a border around the image like so: ``` from matplotlib import pyplot as plt # some data for demonstration purposes import numpy as np x = np.random.randn(100) # create figure fig, ax = plt.subplots() ax.plot(x) # set the border width fig.set_linewidth(10) # set the border colour (to black in this case) fig.set_edgecolor("k") # show the figure fig.show() ``` This gives: [](https://i.stack.imgur.com/8ATr7.png)
null
CC BY-SA 4.0
null
2023-02-01T09:59:22.300
2023-02-01T09:59:22.300
null
null
1,862,861
null
75,308,519
2
null
75,308,278
1
null
I would use the [set_linewidth](https://matplotlib.org/stable/api/_as_gen/matplotlib.patches.Patch.html#matplotlib.patches.Patch.set_linewidth) and [set_color](https://matplotlib.org/stable/api/_as_gen/matplotlib.patches.Patch.html#matplotlib.patches.Patch.set_color) parameters from [spines](https://matplotlib.org/stable/api/spines_api.html) : > An axis spine -- the line noting the data area . ``` import matplotlib.pyplot as plt C, W, L, T = "black", 4, 2, 7 # <- adjust here #Color, Width, Length, Tickness -------------- fig, ax = plt.subplots(figsize=(W, L)) list_of_spines = ["left", "right", "top", "bottom"] for sp in list_of_spines: ax.spines[sp].set_linewidth(T) ax.spines[sp].set_color(C) ax.set_xticks([]) ax.set_yticks([]) plt.show(); ``` Output : [](https://i.stack.imgur.com/ES9rE.png)
null
CC BY-SA 4.0
null
2023-02-01T10:08:28.857
2023-02-01T10:08:28.857
null
null
16,120,011
null
75,308,781
2
null
75,308,188
1
null
``` return Drawer( child: SafeArea( child: Column( children: [ for (int i = 0; i < 5; i++) buildExpansionTile(i), ], )), ); Widget buildExpansionTile(int position) { if (position != 4) { return ListTile( title: Text("Child Category $position"), ); } else { return ExpansionTile( title: Text("Parent Category 1"), leading: Icon(Icons.person), //add icon childrenPadding: EdgeInsets.only(left: 60), //children padding children: [ ListTile( title: Text("Child Category 1"), ), ListTile( title: Text("Child Category 2"), ), ], ); } } } ```
null
CC BY-SA 4.0
null
2023-02-01T10:26:10.253
2023-02-01T10:26:10.253
null
null
5,197,712
null
75,308,868
2
null
64,906,283
0
null
I face exactly this same issue. Looks like [it's not tailwindcss specific](https://stackoverflow.com/q/20400755/9157799). [This answer](https://stackoverflow.com/a/57860826/9157799) solves it for me: Place [min-w-fit](https://tailwindcss.com/docs/min-width) to the top element or the direct child of the body. ``` <div class="min-w-fit lg:min-w-0 lg:max-w-5xl lg:mx-auto"> <p>something</p> </div> ``` Just note that [min-width always override max-width](https://stackoverflow.com/q/16063771/9157799) so when you need max-width e.g. in larger screen, you might need to readjust the min-width. ## Update Turns out the root of the problem is , which in my case, is caused by long words e.g. URL. Note: Normally the default `min-width` of an HTML element is `0` but for flex items it's `auto`. The thing is, when the `min-width` is reached (which in my case is decided by the longest word), as they overflow as the screen gets smaller, the `min-width:auto` keep the element from shrinking and instead shrinks everything else. It shrinks the fixed font size to keep the element width and because it also shrinks the parent element, it's true that the element is actually overflowing (check with inspect element). Add `min-width: 0` to the outmost container that's overflowing its parent. If the overflow is caused by long words, don't forget to handle the text overflow with [text-overflow](https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow) or [overflow-wrap](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap). - [https://stackoverflow.com/a/66689926/9157799](https://stackoverflow.com/a/66689926/9157799)- [https://stackoverflow.com/a/53784508/9157799](https://stackoverflow.com/a/53784508/9157799)
null
CC BY-SA 4.0
null
2023-02-01T10:32:50.343
2023-02-05T05:06:54.937
2023-02-05T05:06:54.937
9,157,799
9,157,799
null
75,308,968
2
null
30,729,501
0
null
I used this code: ``` cnt = document.getElementById('your_select').childElementCount; if (cnt == 0) { ... } ``` There are no option elements in `your_select` element.
null
CC BY-SA 4.0
null
2023-02-01T10:40:53.123
2023-02-02T16:38:26.623
2023-02-02T16:38:26.623
14,267,427
19,818,808
null
75,309,031
2
null
61,475,883
0
null
You can use 2 methods to make it workable: Method 1: Use GestureDetector inside itemBuilder as below. ``` itemBuilder: (context, String suggestion) { return GestureDetector( onPanDown: (_) { print(suggestion); }, child: ListTile( dense: true, title: Text(suggestion), ), ); }, ``` by doing this, you still need the 'onSuggestionSelected' method, but you can leave it blank. Method 2: ``` itemBuilder: (context, String suggestion) { return Listener( child: Container( color: Colors.black, // <-- this gets rid of the highlight that's not centered on the mouse child: ListTile( title: Text(suggestion), ), ), onPointerDown: () { print(suggestion); // Do what you would have done in onSuggestionSelected() here }, ); }, ``` I got these answers from following link [onSuggestionSelected not called in Web](https://github.com/AbdulRahmanAlHamali/flutter_typeahead/issues/186)
null
CC BY-SA 4.0
null
2023-02-01T10:45:45.220
2023-02-01T10:45:45.220
null
null
4,453,027
null
75,309,357
2
null
72,904,218
0
null
Go to your customizer and on the custom css write: ``` .popup-container-class{ overlay-y:scroll: !important; } ``` Then inspect the scroll lines to find it's specific class in order to change respective color and sizes.
null
CC BY-SA 4.0
null
2023-02-01T11:14:08.790
2023-02-01T11:15:10.640
2023-02-01T11:15:10.640
21,124,937
21,124,937
null
75,309,895
2
null
75,309,852
0
null
Your lookup has typo, ``` $lookup: { form: <<-- this needs to be "from" } ```
null
CC BY-SA 4.0
null
2023-02-01T12:03:05.440
2023-02-01T12:03:05.440
null
null
1,118,978
null
75,309,946
2
null
75,309,722
0
null
You can use a data attribute and `selectedIndex` of the changed select to show and hide the other select options: ``` var $selects = $('select'); $selects.on('change', e => { $selects.not($(e.currentTarget)) // get selects that aren't current changed .each((index, select) => { if (e.currentTarget.dataset.selected) { select.options[e.currentTarget.dataset.selected].style.display = 'block'; // show any previous selected } select.options[e.currentTarget.selectedIndex].style.display = 'none'; // hide same index option in other selects }); e.currentTarget.dataset.selected = e.currentTarget.selectedIndex; // set data attrbiute for previous selected }) ``` ``` <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <select> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select> <select> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select> <select> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select> ```
null
CC BY-SA 4.0
null
2023-02-01T12:06:06.143
2023-02-01T12:52:42.370
2023-02-01T12:52:42.370
1,790,982
1,790,982
null
75,310,514
2
null
75,309,515
-1
null
You are looking this php function, if I understand right `apache_request_headers()`. If you have apache this will work. An you will get an array with your headers that you can loop over and take the `['Auth-Nonce']` key. If apache doesn't have the `$header['Auth-Nonce']` in the specific HTTP call, `null` will be returned. ``` $headers = apache_request_headers(); echo $header['Auth-Nonce']; ``` In case of Nginx and other webservers try this `getallheaders()`. If you get an error that says the function doesn't exist do it custom like this: ``` if (!function_exists('getallheaders')) { function getallheaders() { if (!is_array($_SERVER)) { return array(); } $headers = array(); foreach ($_SERVER as $name => $value) { if (substr($name, 0, 5) == 'HTTP_') { $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; } } return $headers; } } ``` In any case you will get your webserver headers on your call.
null
CC BY-SA 4.0
null
2023-02-01T12:57:03.417
2023-02-01T12:57:03.417
null
null
17,734,395
null
75,310,683
2
null
75,310,524
1
null
In order to remove the blank spaces around it, you should remove the margin you have added. In addition to that, I am not sure what you mean with your question, but you can try playing around with the `background-size` and `background-position` properties to make the image look the way you like. I played around with the code a bit, and came up with this simple fix, yet I am not completely sure if this is what you are looking for. By making the divs more fluid, you can get rid of the transparent spaces you are mentioning: ``` .imgBck { width: 100%; height: 200px; background-image: url('https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png'); background-position: 10px; background-size: cover; } .borderDiv { border-style: solid } ``` ``` <div class="borderDiv"> <div class="imgBck"> </div> </div> ```
null
CC BY-SA 4.0
null
2023-02-01T13:11:43.060
2023-02-01T13:51:33.227
2023-02-01T13:51:33.227
295,783
13,605,515
null
75,310,930
2
null
75,309,515
0
null
The data you need is within `$response_headers`, not `$Auth`. e.g. ``` echo $response_headers [11]; ``` would get you the specific value.
null
CC BY-SA 4.0
null
2023-02-01T13:31:06.727
2023-02-01T13:31:06.727
null
null
5,947,043
null
75,311,557
2
null
75,310,952
1
null
Try the following measure: ``` = VAR ThisCountry = MIN( CarSales[Country] ) RETURN RANKX( FILTER( ALLSELECTED( CarSales ), 'CarSales'[Country] = ThisCountry ), [NetSales] ) ```
null
CC BY-SA 4.0
null
2023-02-01T14:17:15.207
2023-02-01T14:17:15.207
null
null
17,007,704
null
75,311,653
2
null
72,781,647
0
null
``` use GuzzleHttp\Psr7\Stream; use Microsoft\Graph\Model\Message; use Microsoft\Graph\Model\Attachment; $filename = 'my_file.jpg'; $filepath = '/path/to/file/my_file.jpg'; $filetype = mime_content_type($filepath); $stream = Stream(fopen($filepath, 'r+')); $file_attachement = new FileAttachment(); $file_attachement->setODataType('#microsoft.graph.fileAttachment'); $file_attachement->setName($filename); $file_attachement->setContentType($filetype); $file_attachement->setContentBytes(base64_encode($stream)); $message = new Message(); $message->setAttachments(array($file_attachement)); ```
null
CC BY-SA 4.0
null
2023-02-01T14:24:45.777
2023-02-01T14:24:45.777
null
null
19,044,067
null
75,311,698
2
null
73,463,357
0
null
My two cents on this , if you are still facing authentication failure from javamail trying to connect to mailbox and read emails, First and foremost make sure the application setup in azure active directory has below permissions. Secondly, Create service principal with the as mentioned in the original post. Once done [check here](https://jwt.ms/) if your generated token has all the roles you have assigned. Even if you assigned necessary roles and you can able to connect to mailbox via powershell still you might get from javamail because you might be using this property (mail.imap.auth.mechanisms) wrongly , replace mail.imap with mail.imaps and it should solve the problem. ``` "mail.imaps.auth.mechanisms"="XOAUTH2" "mail.imap.host"="outlookoffice365.com" "mail.smtp.port"=993 "mail.store.protocol"="imaps" session.getStore("imaps") store.connect(host,port,user,token) ``` Good luck !!
null
CC BY-SA 4.0
null
2023-02-01T14:27:55.260
2023-02-01T15:43:59.720
2023-02-01T15:43:59.720
14,243,503
14,243,503
null
75,311,787
2
null
11,476,670
0
null
You can use `data-bs-parent="#accordion"` on child elements and `id="accordion"` on parent element, using Bootstrap 5. I needed similar functionality with cards, where clicking on one card button will expand current card and collapse other open/expanded card. ``` <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"/> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> <div class="d-flex justify-content-evenly align-items-center m-3 flex-wrap" id="accordion"> <div class="card col-md-3 m-2 p-2 text-center border border-dark-subtle rounded bg-primary-subtle" style="max-width:350px"> <img class="card-img-top mx-auto my-2" src="#" style="max-width:300px"> <div class="card-body text-center"> <button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#div1" aria-expanded="false" aria-controls="div1" > Colllapsable Div1 </button> <div class="collapse" id="div1" data-bs-parent="#accordion"> <ul class="list-unstyled text-center"> <li>Item1</li> <li>Item2</li> <li>Item3</li> <li>Item4</li> <li>Item5</li> <li>Item6</li> <li>Item7</li> </ul> </div> </div> </div> <div class="card col-md-3 m-2 p-2 text-center border border-dark-subtle rounded bg-primary-subtle" style="max-width:350px"> <img class="card-img-top mx-auto my-2" src="#" style="max-width:300px"> <div class="card-body text-center"> <button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#div2" aria-expanded="false" aria-controls="div2" > Colllapsable Div2 </button> <div class="collapse" id="div2" data-bs-parent="#accordion"> <ul class="list-unstyled text-center"> <li>Item1</li> <li>Item2</li> <li>Item3</li> <li>Item4</li> <li>Item5</li> <li>Item6</li> <li>Item7</li> </ul> </div> </div> </div> </div> ```
null
CC BY-SA 4.0
null
2023-02-01T14:35:15.093
2023-02-01T14:35:15.093
null
null
9,105,232
null
75,311,849
2
null
75,311,305
0
null
If you remove your `border-radius: 100px;` rule, then your button will have the shape you described as desirable in your question. ``` button { position: relative; overflow: hidden; } button::before, button::after { content: ""; width: 0; height: 2px; position: absolute; transition: all 0.2s linear; background: #fff; } span::before, span::after { content: ""; width: 2px; height: 0; position: absolute; transition: all 0.2s linear; background: #fff; } button:hover::before, button:hover::after { width: 100%; } button:hover span::before, button:hover span::after { height: 100%; } .btn-3::after { left: 0; bottom: 0; transition-delay: 0.6s; } .btn-3 span::after { transition-delay: 0.4s; right: 0; bottom: 0; } .btn-3::before { right: 0; top: 0; transition-delay: 0.2s; } .btn-3 span::before { transition-delay: 0s; left: 0; top: 0; } .btn-3:hover::after { transition-delay: 0s; } .btn-3:hover span::after { transition-delay: 0.2s; } .btn-3:hover::before { transition-delay: 0.4s; } .btn-3:hover span::before { transition-delay: 0.6s; } ``` ``` <button (click)="openDialog()" class="extended-fab-button btn-3" mat-fab color="primary"> <span class="extended-fab-button__text">Test File</span> </button> ```
null
CC BY-SA 4.0
null
2023-02-01T14:40:13.387
2023-02-01T14:40:13.387
null
null
436,560
null
75,311,980
2
null
75,311,928
0
null
You're trying to deserialize an object. But the JSON you show isn't an object. It's an array. Deserialize it into a collection: ``` var loadedPlayerData = JsonUtility.FromJson<List<Players>>(playersJson); ``` Or even just an array: ``` var loadedPlayerData = JsonUtility.FromJson<Players[]>(playersJson); ``` As an aside... Names are important. `Players` is a misleading name for . The class should be called `Player` instead. --- Additionally, this class not deserialize at all, depending on how the JSON serializer works. They tend to use , not . You'll likely want to use properties anyway: ``` public class Players { public int id { get; set; } public string name { get; set; } public string img { get; set; } } ``` For further improvements, you will probably also want to capitalize the property names. The JSON serializer be case-sensitive (I don't think they tend to be by default, but it's worth testing) and you may need to add attributes to the properties to specify their names in the JSON. But just to get the code , at the very least you'll most likely need properties here instead of fields.
null
CC BY-SA 4.0
null
2023-02-01T14:50:13.910
2023-02-01T14:56:27.893
2023-02-01T14:56:27.893
328,193
328,193
null
75,312,048
2
null
23,162,949
0
null
I had the exact same problem in 2023. To turn off the highlihgting alltogether, go to ReSharper settings > code inspection > settings > uncheck 'highlight usages of the element under the cursor'. Alternatively, the highlight color can be changed by going to the VS Options > Environment > Fonts and Colors and finding the entry in the list called: ''.
null
CC BY-SA 4.0
null
2023-02-01T14:54:19.710
2023-02-03T09:43:13.573
2023-02-03T09:43:13.573
2,413,673
2,413,673
null
75,312,233
2
null
58,234,437
0
null
Came here in 2023, was facing the same problem using formdata, but in postman, before handing it to the front end department. To handle it in postman, use the type of request body as `binary`: [](https://i.stack.imgur.com/rzqmx.png) And don't forget to add the proper headers.
null
CC BY-SA 4.0
null
2023-02-01T15:08:46.040
2023-02-01T15:08:46.040
null
null
13,558,035
null
75,312,258
2
null
72,778,818
0
null
Actually, your CRS is not the same as your buffer . buffer is meter but your CRS of your polygons is degree. change your polygon geometry to meter. for example EPSG:32630
null
CC BY-SA 4.0
null
2023-02-01T15:10:18.863
2023-02-01T15:10:18.863
null
null
21,126,529
null
75,312,317
2
null
11,989,983
0
null
I had this issue in Rider, and going to File | Invalidate Caches | Invalidate and Restart fixed it for me
null
CC BY-SA 4.0
null
2023-02-01T15:14:28.817
2023-02-01T15:14:28.817
null
null
4,921,052
null
75,312,600
2
null
75,309,848
1
null
That is weird. It smells like a permission issue but I can't imagine an environment where you cannot navigate outside the desktop. I do not experience the same thing when I click browse but to be honest, I've never clicked "Browse" before this question. [](https://i.stack.imgur.com/2pNnh.png) Use Windows Explorer and copy the path from there and paste into the `Folder` box of the Enumerator Configuration
null
CC BY-SA 4.0
null
2023-02-01T15:36:24.157
2023-02-01T15:36:24.157
null
null
181,965
null
75,313,005
2
null
75,310,524
0
null
The aspect ratio of the containing `div` is equal to the aspect ratio of the image => 300x200 (fixed 'px' units) and 800x600 (image physical size) => aspect ratio: `3:2`. Therefore, you cannot resize the background to 'lose' the excess space without cutting parts of the cubes or get some unwanted width vs. height stretching. This is due to the fact that to lose excess space, the actual aspect ratio of the containing `div` has to be `1.125:1`, or `width: 225px; height: 200px`. Once this has been established, you can use `background-position` and `background-size` to resize the `background-image` and lose the excess space. Please be aware that this method is very image specific and proper cropping of a single background image is likely the preferred method. ``` .imgBck { margin: 10px; width : 225px; /* from 300px */ height: 200px; background-image : url('https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png'); background-position: 47% 20%; /* ADDED */ background-size : 140%; /* from 'cover' */ background-repeat : no-repeat; border-style: dotted; } .borderDiv { border-style: solid } ``` ``` <div class="borderDiv"> <div class="imgBck"> </div> </div> ```
null
CC BY-SA 4.0
null
2023-02-01T16:06:45.223
2023-02-01T16:06:45.223
null
null
2,015,909
null
75,313,024
2
null
75,312,934
0
null
The `hyperref` package has an option `colorlinks` that can be used as follows: ``` \usepackage[colorlinks=false]{hyperref} ```
null
CC BY-SA 4.0
null
2023-02-01T16:07:46.490
2023-02-01T16:07:46.490
null
null
20,775,391
null
75,313,285
2
null
75,313,208
0
null
Use an `IF()` expression. ``` WITH t as( SELECT a.Id, a.Name, a.Description, b.Title, c.Role FROM aTable AS a INNER JOIN bTable AS b ON a.Id=b.uuid INNER JOIN cTable AS c ON b.uuid=c.roleId WHERE c.role='major' OR c.role='captain' GROUP BY a.Id) SELECT t.Id, t.Name, t.Description, t.Title, t.Role, IF(c.role = 'captain', d.Email, '') AS Email FROM t LEFT JOIN dTable AS d ON t.Id=d.Guid ```
null
CC BY-SA 4.0
null
2023-02-01T16:30:11.090
2023-02-01T16:30:11.090
null
null
1,491,895
null
75,313,343
2
null
65,645,510
0
null
[My solution is as shown below](https://i.stack.imgur.com/a4RLz.png) I tried but The method below didn't work. use in android studio android ver AndroidStudio2022.1 1. remove ~/Library/Caches/Google/AndroidStudio2022.1/caches 2. remove /.gradle/caches
null
CC BY-SA 4.0
null
2023-02-01T16:35:38.657
2023-02-01T16:35:38.657
null
null
5,777,265
null
75,313,477
2
null
75,311,386
0
null
The reason I think you have this issue is because your code runs after measure and arrange have been done for your window. I'm not sure why adding the grid doesn't force that again but I have a suggestion could make your problem go away. Add ``` Window1.InvalidateVisual(); ``` To the end of your code. If that still doesn't work then try instead: ``` Dispatcher.CurrentDispatcher.InvokeAsync(new Action(() => { Window1.InvalidateVisual(); }), DispatcherPriority.ContextIdle); ``` Still no joy then try not showing whatever this popup is. Maybe you're showing that as modal. This approach of building everything out in code is inadvisable. Datatemplating is perfectly capable of working fast enough for basic games.
null
CC BY-SA 4.0
null
2023-02-01T16:46:30.433
2023-02-01T16:46:30.433
null
null
426,185
null
75,313,547
2
null
75,312,295
1
null
> The sandbox environment created for a module is available for four consecutive hours to ensure that you can finish the module. The Microsoft Learn exercises are meant to be finished in one sitting, in an hour or less. You can actually verify this in the [Sandbox FAQ - How long does the sandbox stay around?](https://learn.microsoft.com/en-us/training/support/faq?pivots=sandbox#how-long-does-the-sandbox-stay-around)
null
CC BY-SA 4.0
null
2023-02-01T16:52:02.247
2023-02-01T17:00:38.177
2023-02-01T17:00:38.177
1,945,525
8,354,082
null
75,313,689
2
null
75,313,231
0
null
> Try this. It works well on my Galaxy XCover 5 to read the format (4096), but not the text (getRawValue()) for that format. Don't know why! No problem with QR-Code and Barcode EAN-13. ``` @ExperimentalGetImage //Notice: @ExperimentalGetImage. public class BarCodeImageAnalyzer implements ImageAnalysis.Analyzer { private final BarcodeScanner scanner; public BarCodeImageAnalyzer() { scanner = BarcodeScanning.getClient(); } @SuppressLint("SetTextI18n") @Override public void analyze(@NonNull ImageProxy imageProxy) { Image mediaImage = imageProxy.getImage(); if (mediaImage != null) { InputImage image = InputImage.fromMediaImage(mediaImage, rotation); // rotation coding in main class according to ML-Kit instructions. // https://developers.google.com/ml-kit/vision/barcode-scanning/android. scanner.process(image) .addOnSuccessListener(barcodes -> { for (Barcode barcode : barcodes) { codebarres.setText(""+barcode.getFormat()); // codebarres.setText(barcode.getRawValue()); // codebarres is a TextView in the mainactivity layout. } }) .addOnCompleteListener(results -> imageProxy.close()); } } } ```
null
CC BY-SA 4.0
null
2023-02-01T17:01:57.750
2023-02-01T17:01:57.750
null
null
20,315,230
null