Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
sequence
74,817,149
2
null
66,564,465
0
null
Partially solving the issue, some images can be added using metadata (like cover images), those cannot be added within the content itself, just above or bellow actual content. ``` --- title: Sample image: test.jpg --- Here the markdown (without images) ``` In the view you can render that image after or before the content using something like: ``` <img :src="require(`~/assets/images/${ page.image }`)"> <nuxt-content :document="page"/> ```
null
CC BY-SA 4.0
null
2022-12-15T20:23:17.313
2022-12-15T20:23:17.313
null
null
337,772
null
74,817,228
2
null
47,056,432
0
null
For anyone still looking for this: I had a similar problem some time ago: Matching librosa's to a tensorflow implementation. The solution was to use a different windowing approach for the spectrogram and librosa's matrix as constant tensor. See [here](https://gitlab.com/Jaco-Assistant/Scribosermo/-/blob/b23ff4eb34b74d90b0f9037ad3b5946aec57bd4d/training/scode/pipeline.py#L225) and [here](https://gitlab.com/Jaco-Assistant/Scribosermo/-/blob/b23ff4eb34b74d90b0f9037ad3b5946aec57bd4d/training/scode/pipeline.py#L256).
null
CC BY-SA 4.0
null
2022-12-15T20:30:43.137
2022-12-15T20:30:43.137
null
null
4,948,711
null
74,817,535
2
null
72,431,616
0
null
restore command needs block formatted as value block example for block 12: FF00000000FFFFFFFF0000000CF30CF3
null
CC BY-SA 4.0
null
2022-12-15T21:02:25.680
2022-12-15T21:02:25.680
null
null
20,788,199
null
74,817,649
2
null
74,808,711
0
null
If you look at the full URL of your resources, they're ``` qrc:/main.qml qrc:/Images/cross.png qrc:/Images/empty.png qrc:/Images/nought.png ``` If you're accessing your images from the `main.qml`, I would recommend relative references. i.e. it would be enough for you to go: ``` Image { source: "Images/empty.png" anchors.centerIn: parent visible: true } ``` Whilst it didn't appear to be a problem in your case, be wary of some platforms that are case sensitive and be sure you're folder is `Images` and not `images` which requires diligent naming of the folder and the corresponding reference in the source code.
null
CC BY-SA 4.0
null
2022-12-15T21:15:09.843
2022-12-15T21:15:09.843
null
null
881,441
null
74,817,987
2
null
74,809,354
1
null
Your current diagram says that: - - - - The way it should work would be: - - - - Note that the UML specifications do not specify how parallelism is implemented. And neither does your scheduler: whether it is true parallelism using multithreaded CPUs or multiple CPUs, or whether it is time slicing where some interruptions are used to switch between tasks that are executed in reality in small sequential pieces is not relevant for this modeling. The remaining challenges are: - - `«parallel»`[expansion region](https://sparxsystems.com/enterprise_architect_user_guide/15.2/model_domains/expansionregion.html)-
null
CC BY-SA 4.0
null
2022-12-15T21:53:25.070
2022-12-15T21:53:25.070
null
null
3,723,423
null
74,818,077
2
null
74,817,104
1
null
See the documentation for `createElement` in the MSXML SDK DOM reference [https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms757047(v=vs.85)](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms757047(v=vs.85)) stating clearly: > You cannot create a namespace-qualified element using the createElement method. Regardless of whether a namespace prefix is included in the tagName parameter*,* the namespaceURI property for the new element node is set to an empty string, "". An element node constructed as part of an XML document load operation will never have both a prefix and an empty namespace Uniform Resource Identifier (URI). You can only create a namespace-qualified element using the createNode method of the DOMDocument object. So any element node you want to create in a certain namespace with MSXML needs to be created with e.g. `createNode(1, "form:Document", "http://www.abbyy.com/FlexiCapture/Schemas/Export/FormData.xsd")`, i.e. using `createNode` with the type number 1 for element node as the first argument, the qualified named as the second and the namespace URI as the third argument.
null
CC BY-SA 4.0
null
2022-12-15T22:05:28.693
2022-12-15T22:05:28.693
null
null
252,228
null
74,818,305
2
null
74,815,348
0
null
The usual scale types will not work for you. You will need to use the [MATRIX](https://developer.android.com/reference/android/widget/ImageView.ScaleType#MATRIX) scale type. Here is how to apply it: ``` binding.matrixImage.doOnNextLayout { // We will use a Matrix to shift the image left. binding.matrixImage.scaleType = ImageView.ScaleType.MATRIX // Compute how far to shift the image val dx = (binding.matrixImage.drawable.intrinsicWidth - binding.matrixImage.width) / 2f // Create and set the Matrix. val matrix = Matrix() matrix.postTranslate(-dx, 0f) binding.matrixImage.imageMatrix = matrix } ```
null
CC BY-SA 4.0
null
2022-12-15T22:36:21.703
2022-12-15T23:56:39.663
2022-12-15T23:56:39.663
6,287,910
6,287,910
null
74,818,342
2
null
53,653,021
0
null
You select the label and then in the attributes inspector in the LINES property you leave it at 0 and the AUTOSHRINK property you leave it set to (minimum font scale)[enter image description here](https://i.stack.imgur.com/VHms4.png)
null
CC BY-SA 4.0
null
2022-12-15T22:41:06.247
2022-12-15T22:41:06.247
null
null
19,573,751
null
74,818,498
2
null
74,817,950
0
null
It doesn't look like the alert is affecting anything while it's invisible. The alert has `1rem` of margin on the bottom, which calculates out to make the entirety of the alert 90px tall. The available space of the nav by default is less than 90px, so including the alert in that space forces the nav to expand to accommodate the alert. Note the yellow area (margin) in the image. [](https://i.stack.imgur.com/4SuB4.png) The reason your nav has a height larger than expected when the alert is missing is because the `navbar-brand` class has some top and bottom padding, probably coming from bootstrap. Note the purple area (padding) in the image. [](https://i.stack.imgur.com/Enzev.png)
null
CC BY-SA 4.0
null
2022-12-15T23:02:27.753
2022-12-15T23:02:27.753
null
null
7,232,783
null
74,818,579
2
null
19,922,186
0
null
I faced the same problem to find out that i was missing The `Host` Header, make sure that is checked.
null
CC BY-SA 4.0
null
2022-12-15T23:14:26.543
2022-12-15T23:14:26.543
null
null
16,169,640
null
74,819,785
2
null
74,819,219
0
null
just following up. I realized I was overcomplicating things and ended up working it out. This is what ended up working. It turns out what I was doing before was not even the right thing to do. Thank you to GSerg for the comment as well, it allowed me to realize my mistake. ``` 'Check the current inventory level With Sheets("Inventory") currentinventory = Sheets("Inventory").Range("C" & (7 * k - 2)).Cells(i, j).Value newinventory = currentinventory - cases 'Update the inventory level inventorysheet.Range("C" & (7 * k - 2)).Cells(i, j).Value = newinventory End With ```
null
CC BY-SA 4.0
null
2022-12-16T03:06:19.107
2022-12-16T03:09:54.373
2022-12-16T03:09:54.373
20,728,331
20,728,331
null
74,819,917
2
null
74,819,880
0
null
``` #top-half { position: absolute; left: 0; width: 100%; height: 50%; background-color: black; } #bottom-half { position: absolute; left: 0; top: 50%; width: 100%; height: 50%; background: linear-gradient(90deg, rgba(255,0,209,1) 0%, rgba(151,0,255,1) 100%); } ``` ``` <div id="bottom-half"></div> <div id="top-half"></div> ``` 2 divs for each half position: absolute and left: 0 and top: 50% sets the position width: 100% sets it to screen width height: 50% sets the height for each one to half the screen width background-color: black obviously sets the background color to black, and background: linear-gradient(90deg, rgba(255,0,209,1) 0%, rgba(151,0,255,1) 100%) sets the background to a gradient (you can generate nice CSS gradients at [https://cssgradient.io/](https://cssgradient.io/) )
null
CC BY-SA 4.0
null
2022-12-16T03:34:27.390
2022-12-16T03:48:33.717
2022-12-16T03:48:33.717
20,671,133
20,671,133
null
74,819,973
2
null
74,819,880
0
null
You cannot have multiple `background`, the newer one will overwrite the old ones. What you can do is to have multiple gradients in a single `background` such as (try scrolling): ``` body { height: 200vh; background: linear-gradient(to bottom, transparent 50%, black 50%), linear-gradient(100deg, #8a07ff, #f500d7); } ```
null
CC BY-SA 4.0
null
2022-12-16T03:45:28.647
2022-12-16T03:45:28.647
null
null
10,289,265
null
74,820,104
2
null
74,819,880
0
null
You can do this with just one background setting. This snippet separates out each of the CSS background settings to make it clearer what is going on. The whole element gets a black background, then a background-image which is a linear-gradient is defined. This will sit on top of the black background-color. It is given a size and a position and is made not to repeat. Obviously change the colors and the size to what you want. ``` .bg { width: 100vw; height: 100vh; background-color: black; background-image: linear-gradient(to right, purple, magenta); background-size: 80% 50%; background-position: center top; background-repeat: no-repeat; } ``` ``` <div class="bg"></div> ```
null
CC BY-SA 4.0
null
2022-12-16T04:13:30.973
2022-12-16T04:13:30.973
null
null
10,867,454
null
74,820,272
2
null
38,727,240
-1
null
you should modify number of bins, for exam ``` number_of_bins = 200 bin_cutoffs = np.linspace(np.percentile(x,0), np.percentile(x,99),number_of_bins) ```
null
CC BY-SA 4.0
null
2022-12-16T04:41:47.560
2022-12-16T04:41:47.560
null
null
19,438,717
null
74,821,088
2
null
74,818,746
0
null
I faced similar problem while printing table using similar javascript function. You have to provide all css to the print window as well. I am pasting my code here. You will have to modify that to suit your requirements. ``` function PrintElem(elem) { var orgPrint = document.getElementById(elem).innerHTML; document.querySelectorAll(".no-print").forEach(el => el.remove()); // removes some elements from the table that are not to be pronted var toPrint = document.getElementById(elem).innerHTML; var mywindow = window.open('', 'PRINT', 'height=400,width=600'); mywindow.document.write('<html><head><title>My Title</title>'); mywindow.document.write('<style>'); mywindow.document.write('* { font-family: Roboto, \'Segoe UI\', Tahoma, sans-serif; }'); mywindow.document.write('#invTable { border-collapse: collapse; width: 100%; }'); mywindow.document.write('#invTable td, #invTable th { border: 1px solid #ddd; padding: 8px; }'); mywindow.document.write('.text-end { text-align: right !important; }'); mywindow.document.write('.text-center {text-align: center !important; }'); mywindow.document.write('body { display: flex; flex-direction: column;}'); mywindow.document.write('.print-footer { margin-top: auto; position:fixed; bottom:0;text-align: center; width:100%; border-top: 1px solid #ddd; }'); mywindow.document.write('</style>'); mywindow.document.write('</head><body >'); mywindow.document.write('<br/><br/><br/>'); mywindow.document.write(toPrint); mywindow.document.write('</body></html>'); mywindow.document.close(); // necessary for IE >= 10 mywindow.focus(); // necessary for IE >= 10*/ mywindow.print(); mywindow.close(); document.getElementById(elem).innerHTML = orgPrint; // restores the table as is return true; } ```
null
CC BY-SA 4.0
null
2022-12-16T06:57:48.643
2022-12-16T06:57:48.643
null
null
5,518,817
null
74,821,104
2
null
74,820,948
-1
null
Give the dynamically created tablename and rowId in following snippet, should work. ``` document.getElementById('tablename').rows[rowId].cells.length ```
null
CC BY-SA 4.0
null
2022-12-16T06:59:30.983
2022-12-17T10:07:25.590
2022-12-17T10:07:25.590
4,161,024
18,875,576
null
74,821,344
2
null
74,819,447
0
null
The Revit API provides a [MacroManager class](https://www.revitapidocs.com/2023/49eb4b8a-ae13-95e7-fef4-11347bbb67d3.htm) with a [RemoveModule method](https://www.revitapidocs.com/2023/c22a452e-578c-d468-e041-e70fd72cc78f.htm). You could use that to delete the entire module. Or, to remove a single macro, you can use the [RemoveMacro method](https://www.revitapidocs.com/2023/66e8c11a-60fc-3046-de82-55020a2ceb3f.htm).
null
CC BY-SA 4.0
null
2022-12-16T07:26:14.360
2022-12-16T07:26:14.360
null
null
3,552,305
null
74,821,524
2
null
63,405,597
0
null
I have a solution, hope it can help you: ``` let blobToImageData = (blob: File): Promise<ImageData> => { let blobUrl = URL.createObjectURL(blob) return new Promise((resolve, reject) => { let img = new Image(200, 200) img.onload = () => resolve(img) img.onerror = (err) => reject(err) img.src = blobUrl }).then((img: any) => { URL.revokeObjectURL(blobUrl) // Limit to 256x256px while preserving aspect ratio let [w, h] = [img.width, img.height] let aspectRatio = w / h // Say the file is 1920x1080 // divide max(w,h) by 256 to get factor let factor = Math.max(w, h) / 256 w = w / factor h = h / factor // REMINDER // 256x256 = 65536 pixels with 4 channels (RGBA) = 262144 data points for each image // Data is encoded as Uint8ClampedArray with BYTES_PER_ELEMENT = 1 // So each images = 262144bytes // 1000 images = 260Mb let canvas = document.createElement('canvas') canvas.width = w canvas.height = h let ctx = canvas.getContext('2d') ctx!.drawImage(img, 0, 0) return ctx!.getImageData(0, 0, w, h) // some browsers synchronously decode image here }) } ``` ``` const model = await nsfwjs.load() const imgData = await blobToImageData(file) const predictions = await model.classify(imgData) console.log('Predictions: ', predictions) ```
null
CC BY-SA 4.0
null
2022-12-16T07:49:24.343
2022-12-16T07:49:24.343
null
null
20,791,458
null
74,821,666
2
null
74,815,418
1
null
This looks like SQL Server, and the date values in the images look like `datetime` values. There's no reason to convert dates to strings, even from the date picker controls. In fact, the current SQL query runs far slower than it should and may even return the wrong results due to the string conversions. The SQL query should look like this, using the date-typed parameters @from and @to ``` Select Loaive, LoaiXe, Count(*) As Tongxe, Sum(Phi) As Tongphi, phi From View_XeQuaTramreport As a Where NgayCa between @from and @to Group by Loaive,Loaixe,phi Order by Loaive,Loaixe,phi ``` EF Core allows creating an equivalent query with LINQ : ``` public ActionResult Index(DateTime start, DateTime end ) { using (var context = new DongphuocDbContext()) { var results=context.View_XeQuaTramReport .AsNoTracking() .Where(r=>r.NgayCa >= start.Date && r.NgayCa < end.Date.AddDays(1)) .GroupBy(r=>new{r.Loaive,r.Loaixe,r.phi}) .Select(g=>new View_XeQuaTramReport { LoaiVe = g.Key.LoaiVe, LoaiXe = g.Key.LoaiXe, Phi = g.Key.Phi, Tongxe = g.Count(), Tongphi = g.Sum(r=>r.Phi) }) .OrderBy(r=>new {r.Loaive,r.Loaixe,r.Phi}) .ToList(); return View(results); } } ``` LINQ has no `Between` clause. Date comparisons are tricky too, if the database field contains a time component. The `Where` clause in this query will return all rows with a date value greater or equal than the `start` date (`start.Date`) and `end` (`end.Date.AddDays(1)`). This way, there's no reason to trim `r.NgayCa` from its date component, if it has one : ``` .Where(r=>r.NgayCa >= start.Date && r.NgayCa < end.Date.AddDays(1)) ``` `AsNoTracking()` is used to tell EF to track the entities it loads. Normally EF will track all the entities it loads so it can detect any changes and generate modification SQL statements when `SaveChanges` is called. This takes more memory and slows down the query. Finally, the DbContext is defined in a `using` block to ensure it's disposed when it's no longer needed. Otherwise the DbContext the entities it tracks will remain in memory until the garbage collector runs. The question's action uses nullable dates. That's only meaningful if we want the same action to search before, after or between dates. In that case both the SQL and LINQ queries would have to be rewritten. None of these would work with a NULL date: `Convert(varchar(10),NgayCa,111) >=NULL`, `Ngayca>= NULL` or `Ngayca between NULL and ...`. In LINQ, the query can be build dynamically : ``` public ActionResult Index(DateTime? start, DateTime end ) { var query=context.View_XeQuaTramReport .AsNoTracking() .AsQueryable(); if(startDate.HasValue) { query=query.Where(r=>r.NgayCa >= start.Value.Date); } if(endDate.HasValue) { query=query.Where(r=>r.NgayCa < end.Value.Date.AddDays(1)); } var results=query.GroupBy(r=>new{r.Loaive,r.Loaixe,r.phi}) .Select(g=>new View_XeQuaTramReport { LoaiVe = g.Key.LoaiVe, LoaiXe = g.Key.LoaiXe, Phi = g.Key.Phi, Tongxe = g.Count(), Tongphi = g.Sum(r=>r.Phi) }) .OrderBy(r=>new {r.Loaive,r.Loaixe,r.Phi}) .ToList(); ```
null
CC BY-SA 4.0
null
2022-12-16T08:05:34.947
2022-12-19T08:03:37.083
2022-12-19T08:03:37.083
134,204
134,204
null
74,821,808
2
null
74,727,395
0
null
Thanks to @Xianxun Ye , When I added " FOR SYSTEM_TIME AS OF" clause after table name , lookup functionality runs as expected as defined at link [https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/sql/queries/joins/#lookup-join](https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/sql/queries/joins/#lookup-join) I think flink documentation page [https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/table/jdbc/#lookup-cache](https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/table/jdbc/#lookup-cache) should refer the the lookup-join page also.
null
CC BY-SA 4.0
null
2022-12-16T08:19:40.753
2022-12-16T08:19:40.753
null
null
3,549,151
null
74,822,057
2
null
74,820,410
2
null
If it is a GRID, the syntax you are looking for should look like this: ``` amt = session.findById("wnd[0]/usr/cntlFDBL_BALANCE_CONTAINER/shellcont/shell").getcellvalue (6, "DEBIT") ``` Regards, ScriptMan
null
CC BY-SA 4.0
null
2022-12-16T08:46:42.833
2022-12-16T08:46:42.833
null
null
4,523,059
null
74,822,180
2
null
69,890,533
0
null
i realized when i have more than one project open in vscode that are binded to different repository, creates big waiting times. What i do is to close other projects and commit one project at a time. i hope it helps : Also when you do commit without commit, it can create bug in vscode.
null
CC BY-SA 4.0
null
2022-12-16T08:57:59.693
2022-12-20T16:29:47.830
2022-12-20T16:29:47.830
18,656,290
18,656,290
null
74,822,207
2
null
74,821,943
0
null
first of all your `updateQuery` variable will never be null because you're setting it by yourself before. So the low in stock part will never be executet. You need to query the datebase first to get the current quantity. Something like this: ``` string query = "SELECT ProdQty FROM Product WHERE ProdID=@id"; SqlCommand command = new SqlCommand(query); command.Parameters.AddWithValue("id", Convert.ToInt32(TextBox_id.Text)); var qty = command.ExecuteScalar(); ``` then you can check the quantity stored in the database against your order. To decide either to process or discard it with an message. ``` if (qty < Convert.ToInt32(TextBox_qtys.Text)) { // MSG BOX LOW Stock } else { // Update query to store order } ``` Take a look at the parameterized query already mentioned in the comments. Also check the datatypes I asume here the quantity is an integer.
null
CC BY-SA 4.0
null
2022-12-16T09:00:33.113
2022-12-16T09:06:53.930
2022-12-16T09:06:53.930
11,862,795
11,862,795
null
74,822,285
2
null
74,808,464
1
null
Your code seems to be almost correct for what you are trying to do. However, in the very last line of your function there's `list.appendChild.row;`, you are trying to access an undefined property `row` of `appendChild`, but the method [Node.appendChild()](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild) needs to take a child node as an argument. In your case it should be: ``` list.appendChild(row); ```
null
CC BY-SA 4.0
null
2022-12-16T09:07:27.907
2022-12-16T09:07:27.907
null
null
13,970,434
null
74,822,548
2
null
74,821,917
0
null
- - - [Xamarin.Forms](https://www.nuget.org/packages/Xamarin.Forms/5.0.0.2545?_src=template)
null
CC BY-SA 4.0
null
2022-12-16T09:31:43.403
2022-12-16T09:31:43.403
null
null
19,335,715
null
74,822,674
2
null
74,819,748
2
null
`'0'` isn't zero, it's the that represents zero. Lose the quotes and you should be OK: ``` UPDATE `calendario`.`evento` SET `Tarea` = 0 WHERE (`idevento` = '6'); -- Here -----------------------------------^ ```
null
CC BY-SA 4.0
null
2022-12-16T09:43:54.370
2022-12-16T09:43:54.370
null
null
2,422,776
null
74,822,733
2
null
74,819,860
1
null
You can add a header for group columns via [kableExtra::add_header_above()](https://cran.r-project.org/web/packages/kableExtra/vignettes/awesome_table_in_pdf.pdf#page=17). When you insert such a header into a table, you can specify the width of that header by using a LaTeX command `\parbox{..width..}{..contnets..}`. To use any LaTeX command in a table created using `knitr::kable()` and `kableExtra`'s functions, you have to set [escape = FALSE](https://bookdown.org/yihui/rmarkdown-cookbook/kable.html#escape-special-characters) in these functions. [](https://i.stack.imgur.com/fEcy5.png) ``` mtcars |> head() |> knitr::kable( "latex", booktabs = TRUE ) |> kable_styling( latex_options = "scale_down", full_width = FALSE ) |> column_spec( 1:2, width = "5em" ) |> add_header_above( c( " ", "\\\\parbox{5em}{this header for group columns is way too long and I want to wrap this but I don't know how}" = 5, "Group 2" = 6 ), escape = FALSE ) ```
null
CC BY-SA 4.0
null
2022-12-16T09:50:45.660
2022-12-16T09:50:45.660
null
null
10,215,301
null
74,822,751
2
null
74,822,720
-2
null
``` window.addEventListener('DOMContentLoaded', (event) => { console.log(event); // THIS IS THE VALUE OF YOUR EVENT }); ```
null
CC BY-SA 4.0
null
2022-12-16T09:52:23.817
2022-12-16T09:52:23.817
null
null
4,200,334
null
74,822,758
2
null
74,820,948
0
null
I would use the [calculate](https://docs.sencha.com/extjs/7.6.0/classic/Ext.data.field.Field.html#cfg-calculate) feature to compute a new [field](https://docs.sencha.com/extjs/7.6.0/classic/Ext.data.field.Field.html) in the [store](https://docs.sencha.com/extjs/7.6.0/classic/Ext.data.Store.html). ``` { name: 'summary', calculate: function (data) { let summary = 0; Ext.Object.eachValue(data, function (value) { if(Ext.isNumber(value)) { summary += value; } }); return summary; } } ``` You can just use this new computed field as a new column in your [grid](https://docs.sencha.com/extjs/7.6.0/classic/Ext.grid.Panel.html). Here is a working example: [sencha fiddle](https://fiddle.sencha.com/#view/editor&fiddle/3ma4)
null
CC BY-SA 4.0
null
2022-12-16T09:52:56.010
2022-12-16T09:52:56.010
null
null
12,397,027
null
74,822,887
2
null
74,822,835
0
null
Your statement `print(i)` is polluting the output. Remove it.
null
CC BY-SA 4.0
null
2022-12-16T10:03:31.047
2022-12-16T10:03:31.047
null
null
8,338,100
null
74,822,917
2
null
74,822,835
0
null
## tldr: Use tqdm.write instead of print This is due to you using `print`. Since `tqdm` is a very simple progress bar (no curses, only uses the standard output), it can only print on the current line. Since you are using `print`, you change the current line. If you still need to print messages to stdout, you can use the `.write` method of tqdm instead, like this: ``` from tqdm import tqdm from time import sleep def test(): my_list = ['a', 'b', 'c', 'd', 'a', 'b', 'c', 'd', 'a', 'b', 'c', 'd'] for i in tqdm(my_list): tqdm.write(i) sleep(.1) ``` See more details here: [https://github.com/tqdm/tqdm#writing-messages](https://github.com/tqdm/tqdm#writing-messages)
null
CC BY-SA 4.0
null
2022-12-16T10:06:31.703
2022-12-16T10:06:31.703
null
null
4,948,719
null
74,822,921
2
null
74,822,835
1
null
Just end your print with `end="\033[K"`. ``` from tqdm import tqdm from time import sleep def test(): my_list = ["a", "b", "c", "d", "a", "b", "c", "d", "a", "b", "c", "d"] for i in tqdm(my_list): print(i, end="\033[K") sleep(0.1) ```
null
CC BY-SA 4.0
null
2022-12-16T10:06:55.703
2022-12-16T10:06:55.703
null
null
12,767,387
null
74,822,925
2
null
74,822,835
0
null
Not using the `print(i)` ``` from tqdm import tqdm from time import sleep def test(): my_list = ['a', 'b', 'c', 'd', 'a', 'b', 'c', 'd', 'a', 'b', 'c', 'd'] for i in tqdm(my_list): sleep(.1) test() ```
null
CC BY-SA 4.0
null
2022-12-16T10:07:10.780
2022-12-16T10:07:10.780
null
null
12,829,151
null
74,823,065
2
null
74,811,757
0
null
Here is a compilable example that uses icons to change the face. ``` import javax.swing.*; import java.awt.image.*; import java.awt.*; public class Icony{ static JButton make(Color r){ BufferedImage img = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB); Graphics g = img.getGraphics(); g.setColor(r); g.fillRect(0, 0, 64, 64); g.dispose(); JButton button = new JButton(); button.setOpaque(false); button.setBackground( Color.RED); button.setIcon( new ImageIcon(img) ); return button; } public static void main(String[] args){ JFrame frame = new JFrame("button"); JPanel panel = new JPanel(new GridLayout(2,2)); panel.add(make(Color.RED)); panel.add(make(Color.BLUE)); panel.add(make(Color.GREEN)); panel.add(make(Color.YELLOW)); frame.setContentPane(panel); frame.pack(); frame.setVisible(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } } ```
null
CC BY-SA 4.0
null
2022-12-16T10:20:46.440
2022-12-16T10:20:46.440
null
null
2,067,492
null
74,823,178
2
null
74,791,559
-1
null
To set a element's height to 100% of the browser window, you can simply use the `vh` property of CSS: ``` div { height: 100vh; width: 100%; } ``` It's good to give this height to the root element of your app, so the root's height will always be equal to the browser window's height. If you see a vertical scrollbar after applying `vh` this is because of extra margin and padding of the body, so do this- ``` html, body { margin: 0; padding: 0; } ``` Read more about [viewport vs percentage units](https://bitsofco.de/viewport-vs-percentage-units/)
null
CC BY-SA 4.0
null
2022-12-16T10:31:22.517
2022-12-16T10:31:22.517
null
null
11,834,856
null
74,823,418
2
null
74,823,341
-1
null
``` // Assume that 'richTextBox' is a RichTextBox control richTextBox.LoadFile("file.rtf", RichTextBoxStreamType.RichText); // Select the first character in the RichTextBox richTextBox.SelectionStart = 0; richTextBox.SelectionLength = 1; // Set the font for the selected text to Arial richTextBox.SelectionFont = new Font("Arial", 12); ```
null
CC BY-SA 4.0
null
2022-12-16T10:52:28.693
2022-12-19T17:24:29.187
2022-12-19T17:24:29.187
10,655,742
19,071,593
null
74,824,471
2
null
21,757,179
0
null
For me it worked as below: 1. Brought my server into Targeted Runtime by going into ProjectExplorer--> Properties --> Target Runtime --> Select the server 2. Then I moved my Web app libraries( I copied Spring jar files in web-inf during setting up the project) from Classpath to modulepath. Apply and Save. Restart the IDE.
null
CC BY-SA 4.0
null
2022-12-16T12:29:14.030
2022-12-16T12:29:14.030
null
null
19,224,225
null
74,824,820
2
null
74,824,678
0
null
I did the same on my PC, entering the date in cells "A2" to "A10". I selected those cells, and used this as a formula: ``` =WEEKDAY(A2,2)>5 ``` As you see, `A2` is the top left cell of the range, and as relative cell referencing is used (no dollarsigns), this makes the formula to be "modified" along with the next cell.
null
CC BY-SA 4.0
null
2022-12-16T13:01:30.713
2022-12-16T13:01:30.713
null
null
4,279,155
null
74,825,061
2
null
74,807,318
0
null
Please check your AGP version first. If it's lower than 7.2 (flutter by default use 4.1) you have to use different approach that described here — [https://android-developers.googleblog.com/2022/03/freeing-up-60-of-storage-for-apps.html](https://android-developers.googleblog.com/2022/03/freeing-up-60-of-storage-for-apps.html) As it mentioned there: > For older Bundletool and AGP versions you can opt-out by including an opt-out file in your resources: res/xml/com_android_vending_archive_opt_out.xml. ``` <?xml version="1.0" encoding="utf-8"?> <optOut /> ```
null
CC BY-SA 4.0
null
2022-12-16T13:24:10.647
2022-12-16T13:24:10.647
null
null
13,568,724
null
74,825,114
2
null
16,953,812
0
null
Creating a new AppID and removing the "com.yourcompany" from the name solved it for me.
null
CC BY-SA 4.0
null
2022-12-16T13:29:04.700
2022-12-16T13:29:04.700
null
null
2,944,908
null
74,825,134
2
null
71,863,302
0
null
I had the same problem a couple of days ago and I found out that it has something to do with your device pixel ratio. See, one pixel in CSS is not one physical pixel on your phone, it is 1/96th of an inch. If you just want the version of your project to run on just one device, find out what your device pixel ratio is and divide every pixel by that. For example, I have a Xiaomi Redmi Note 9 pro with a screen resolution of 1080p x 2400p but the device pixel ratio is 2.75. That means in HTML/CSS I have to divide every pixel by 2.75 (the resolution on my browser window is now 1080/2.75 and 2430/2.75 -> 393p x 873p). Just adjust your pixel sizes and your images height and width and your good to go. To find out your device pixel ratio: Go to this link: [https://yesviz.com/viewport/](https://yesviz.com/viewport/)
null
CC BY-SA 4.0
null
2022-12-16T13:30:31.680
2022-12-20T06:37:55.720
2022-12-20T06:37:55.720
8,708,364
20,522,888
null
74,825,160
2
null
74,824,764
1
null
``` Private Sub CommandButton1_Click() Dim rng As Range Set rng = Range(UserForm1.ListBox1.RowSource) UserForm1.ListBox1.RowSource = "'[Calculette_form.xlsm]Calcul'!" & _ rng.Resize(rng.Rows.Count + 1, rng.Columns.Count).Address(0, 0) End Sub ```
null
CC BY-SA 4.0
null
2022-12-16T13:33:11.680
2022-12-16T13:33:11.680
null
null
12,704,593
null
74,825,328
2
null
74,821,219
0
null
it's Angular.js project, not Angular. so ng comang will not work look inside gulpfile.js for command to start your app or run in project's root folder `gulp --tasks`
null
CC BY-SA 4.0
null
2022-12-16T13:47:09.913
2022-12-16T13:47:09.913
null
null
6,265,440
null
74,825,833
2
null
74,825,699
1
null
Calling Vim with the `-y` flag is equivalent to calling `evim`: ``` $ vim -y ``` See `:help evim`. If you prefer to type `evim` instead of `vim -y`, you can add an alias to your shell's configuration file: ``` $ echo 'alias evim="vim -y"' > ~/.zshrc ``` Now, your real problem seems to be that you have the string `evim` at the top of `~/.zshrc`. Could you show us the file's content? ``` $ cat ~/.zshrc ```
null
CC BY-SA 4.0
null
2022-12-16T14:31:02.607
2022-12-16T15:33:52.737
2022-12-16T15:33:52.737
546,861
546,861
null
74,825,971
2
null
69,528,137
0
null
``` const colors = ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet']; //PLEASE DON'T CHANGE THIS LINE! //YOU CODE GOES HERE: const allh=document.querySelectorAll('span'); let i=0; for(let h of allh){ h.style.color = colors[i++]; } ``` ``` <!DOCTYPE html> <head> <title>Rainbow</title> <!--LEAVE THESE LINES ALONE, PLEASE! THEY MAKE THE LIVE PREVIEW WORK!--> <script src="node_modules/babel-polyfill/dist/polyfill.js" type="text/javascript"> </script> <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script> </head> <body> <!--DON'T TOUCH THIS FILE PLEASE!--> <h1> <span>R</span> <span>A</span> <span>I</span> <span>N</span> <span>B</span> <span>O</span> <span>W</span> </h1> </body> </html> ```
null
CC BY-SA 4.0
null
2022-12-16T14:43:27.950
2022-12-16T14:43:27.950
null
null
20,794,510
null
74,826,046
2
null
74,825,594
0
null
Those arrows are added by browser because the field is number type, you can't just remove one if them. You could add some Javascript to trigger when the value of this field is changed and allow only increase, check my code sample. This is not a really secure solution but I think it covers your requirement. ``` function disable_stock_decrease_button( ) { ?> <script> document.getElementById('_stock').setAttribute('min', document.getElementById('_stock').value); </script> <?php } add_action( 'woocommerce_product_options_inventory_product_data', 'disable_stock_decrease_button', 10, 0 ); ``` This action is triggered after the quantity field is created and we simply output some javascript code below the field. This javascript will set the 'min' attribute on the stock field to the initial value of that field. The browser will then stop user from decreasing the value to less than initial and if they write it manually, the validation error will be triggered. This is not very safe solution because one could simply open dev tools and undo the change but I assume you need this to prevent accidental errors. If you need a secure solution, then you have to do the validation on the server side, after the product is saved.
null
CC BY-SA 4.0
null
2022-12-16T14:50:04.013
2022-12-16T16:38:53.120
2022-12-16T16:38:53.120
20,774,857
20,774,857
null
74,826,242
2
null
67,000,943
1
null
``` cout << "\033[5mExit?\033[0m"; //Blinking text /*Where \033[5m turns on blinking and \033[0m turns off every attribute including blinking (in short resets) but previously applied attributes are not effected */ cout << "uneffected line"; //No attributes applied(using default attributes) ``` See the complete documentation/Manual or Codes for different colors or actions [https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797](https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797) ``` HANDLE Console = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(Console, 10); //for Green SetConsoleTextAttribute(Console, 175); //for white text with green background like you asked in image in Option C. ``` Use this Image as : [](https://i.stack.imgur.com/yxqoq.jpg)
null
CC BY-SA 4.0
null
2022-12-16T15:06:40.230
2022-12-18T15:48:18.800
2022-12-18T15:48:18.800
18,568,732
18,568,732
null
74,826,244
2
null
74,824,678
0
null
Instead of `=WEEKDAY(Roster!$K$6:$NL$6, 2) > 5` I used `=WEEKDAY(Roster!$K$6:NL6, 2) > 5` the major difference being I am dynamically applying this formula from left to right so making `NL6` No longer a constant and a variable allowed the formula to be used across the document.
null
CC BY-SA 4.0
null
2022-12-16T15:06:52.867
2022-12-16T15:06:52.867
null
null
20,460,417
null
74,826,252
2
null
71,658,855
0
null
``` You have to see this implementation [for css only] from 'https://codepen.io/matthewbeta/pen/OJmmmr' Or original from your code ``` ``` .container { overflow: auto; max-width: 400px; max-height: 200px; margin: 0px auto; background-image: /* Shadows */ linear-gradient(to right, white, white), linear-gradient(to right, white, white), /* Shadow covers */ linear-gradient(to right, rgba(0,0,0,.25), rgba(255,255,255,0)), linear-gradient(to left, rgba(0,0,0,.25), rgba(255,255,255,0)); background-position: left center, right center, left center, right center; background-repeat: no-repeat; background-color: white; background-size: 20px 100%, 20px 100%, 10px 100%, 10px 100%; /* Opera doesn't support this in the shorthand */ background-attachment: local, local, scroll, scroll; } span { width : 75px; display: table-cell; padding: 1em; border: 1px solid #bebebe } ``` ``` <div class="container"> <ul> <span>BO</span> <span>C</span> <span>D</span> <span>O</span> <span>G</span> <span>P</span> <span>S</span> <span>U</span> <span>S</span> <span>Lorem</span> <span>Ipsum</span> </ul> </div> ```
null
CC BY-SA 4.0
null
2022-12-16T15:07:36.123
2022-12-16T15:07:36.123
null
null
14,146,055
null
74,826,375
2
null
67,310,199
0
null
To use a NN, you need to rephrase your problem as a minimisation problem. I'm sure more intelligent people than me have worked out how to do that, but here's a way I just came up with: - - - - So the input to the NN is an x-value, and the output is a t-value. The loss function should be defined in terms of minimising the difference between your solution and the ode.
null
CC BY-SA 4.0
null
2022-12-16T15:16:46.067
2022-12-16T15:16:46.067
null
null
19,625,920
null
74,826,428
2
null
74,826,313
1
null
That is because of [global/implicit using](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-directive#global-modifier). They are automatically generated by the build system. Example: ``` global using global::System; ``` They could really be in an C# file of the project, but the default that the project system generates is in a file called `<projectdir>\obj\<Release|Debug>\<tfm>\<projectname>.GlobalUsings.g.c`. So in a project called `ConsoleApp1.csproj`, targeting .NET 6.0, in Release mode, the file is `obj\Release\net6.0\ConsoleApp1.GlobalUsings.g.cs`. You can view the file using Windows Explorer, or show all files in Visual Studio. Example: [](https://i.stack.imgur.com/ZQKYR.png) For a standard console project, the content of the file is: ``` // <auto-generated/> global using global::System; global using global::System.Collections.Generic; global using global::System.IO; global using global::System.Linq; global using global::System.Net.Http; global using global::System.Threading; global using global::System.Threading.Tasks; ``` Those are defined by MSBuild files, by the [Using](https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#using) item group: ``` <ItemGroup> <Using Include="System.Collections.Generic"/> ... </ItemGroup> ``` So you could add your own namespaces if you like. To disable implicit global usings, that is the generation of the `<projectname>.GlobalUsings.g.cs` file, set the `ImplicitUsings` property to `disable` in your csproj file: ``` <PropertyGroup> <ImplicitUsings>disable</ImplicitUsings> </PropertyGroup> ``` Make sure to rebuild (or clean) your project after that change, because the originally generated file would otherwise still linger around.
null
CC BY-SA 4.0
null
2022-12-16T15:21:04.930
2022-12-16T15:41:12.667
2022-12-16T15:41:12.667
21,567
21,567
null
74,826,487
2
null
74,788,344
1
null
Adjust your vercel.json to use version 0.23.0. See sample code below. ``` { "builds": [ { "src": "nuxt.config.js", "use": "@nuxtjs/[email protected]", "config": {} } ] } ``` FYI: Not specifying a version for vercel builder defaults to 0.24.0 (At the time of posting) which I'm not too sure of but seems to be using node 18
null
CC BY-SA 4.0
null
2022-12-16T15:26:13.147
2022-12-16T15:26:13.147
null
null
4,784,387
null
74,826,575
2
null
74,820,607
0
null
If I understand your question correctly, it should be possible to use SUMPRODUCT to accomplish this. Try: `=IF(SUMPRODUCT(--(A:A=A2),--(D:D=D2))>1,"mutiple","single")`
null
CC BY-SA 4.0
null
2022-12-16T15:33:56.800
2022-12-16T15:33:56.800
null
null
18,896,384
null
74,826,576
2
null
63,183,190
0
null
Try to add `android:minHeight="100dp"` in xml file to your ImageView: ``` <ImageView android:id="@+id/photo_iv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:adjustViewBounds="true" android:minHeight="100dp" android:scaleType="centerInside" tools:src="@drawable/img_haji" /> ``` I had the same issue and it worked for me.
null
CC BY-SA 4.0
null
2022-12-16T15:33:58.657
2022-12-20T19:08:03.890
2022-12-20T19:08:03.890
15,749,574
19,698,685
null
74,827,012
2
null
74,826,947
3
null
``` for(int i = 0; i <= l; i++) { if(word.charAt(i) == guess) ``` when i is equal to l, i will be the length of `word`, and word.charAt(i) will be out of bounds (since the index (i) in this function is 0 based) To understand better ``` String test = "a"; char c1 = test.charAt(0); // this will be "a" char c2 = test.charAt(1); // this is out of bounds - there's no character after "a" ```
null
CC BY-SA 4.0
null
2022-12-16T16:09:01.950
2022-12-16T16:09:01.950
null
null
1,291,492
null
74,827,059
2
null
74,817,699
0
null
Here table 1 = employees; table 2 = departments; output is dbms_output. ``` DECLARE v_sql VARCHAR2(1000); lc_cur SYS_REFCURSOR; ln_employee_id VARCHAR2(10); ln_department_id NUMBER; ln_calc_amt NUMBER; BEGIN FOR rec IN (SELECT e.department_id, br.metric_code FROM employees e INNER JOIN business_rule br on e.department_id = br.department_id ) LOOP SELECT 'SELECT e.employee_id, d.department_id,'||calculation_rule||' from employees e inner join departments d on e.department_id = d.department_id where e.department_id = '||rec.department_id INTO v_sql FROM business_rule WHERE department_id = rec.department_id; OPEN lc_cur FOR v_sql; LOOP FETCH lc_cur INTO ln_employee_id, ln_department_id, ln_calc_amt; EXIT WHEN lc_cur%NOTFOUND; dbms_output.put_line(ln_employee_id||' - '||ln_department_id||' - '||rec.metric_code||' - '||ln_calc_amt); END LOOP; CLOSE lc_cur; END LOOP; END; ```
null
CC BY-SA 4.0
null
2022-12-16T16:12:57.533
2022-12-16T16:12:57.533
null
null
11,876,380
null
74,827,086
2
null
74,823,774
0
null
This can be the answer code of your question. ``` import random ### number of overs overs = 20 bowlers = ['Wasim','Hasan','Fazal','Rumman','Abrar','Shadab'] lineup = [] for i in range(overs): lineup.append(random.choice(bowlers)) if (i != 0) & (lineup[i-1]==lineup[i]): lineup.pop() bowlers_notprev = bowlers.copy() bowlers_notprev.remove(lineup[i-1]) lineup.append(random.choice(bowlers_notprev)) ``` Double for loops should not be used in this case. If the first `for` loop of your code is to add one person to the `lineup` list, and the second `for` loop is to check if it is the same as the previous one, you can also write the code as below. ``` for i in range(overs): z = random.choice(bowlers) lineup.append(z) for x in range(overs-1): if lineup[x] == lineup[x+1]: rmv = lineup.pop(x) bowlers_notprev = bowlers.copy() bowlers_notprev.remove(rmv) lineup.insert(x, random.choice(bowlers_notprev)) ``` And you can use list comprehension like below when sampling `lineup` from `bolwers`. ``` lineup = [random.choice(bowlers) for a in range(overs)] ```
null
CC BY-SA 4.0
null
2022-12-16T16:15:01.037
2022-12-16T16:15:01.037
null
null
20,693,218
null
74,827,219
2
null
74,827,116
1
null
The [Public ID](https://cloudinary.com/documentation/upload_images#public_id) on Cloudinary is the asset's identifier and it'll contain a filename (could be a randomly generated string of characters or the actual filename of the asset) + any containing folder(s). In this case, and based on your screenshot, the `cld-sample-5` asset is in the root folder but you're requesting it by passing the public_id set to `samples/cld-sample-5` so unless you have an asset in the `samples` folder called `cld-sample-5`, the expected response is 404 as no asset exists for that public_id. If you want to target the `cld-sample-5` asset then your public_id (that is passed to the `image()` method) should just be `cld-sample-5`. In addition, in Cloudinary, an asset is unique/identified by not only the 'public_id' but only when that is in combination with the ['resource_type'](https://cloudinary.com/documentation/upload_images#asset_types) ('image', 'video' or 'raw') and ['type'](https://cloudinary.com/documentation/image_transformations#delivery_types) (e.g. 'upload', 'private', 'authenticated', 'fetch' etc). Therefore the below assets with the same public_id (sample) are actually different entities: ``` image/upload/cld-sample-5 image/private/cld-sample-5 video/upload/cld-sample-5 video/authenticated/cld-sample-5 ``` The public_id is returned in the response for each successful upload and you can store the 'public_id', 'resource_type' and 'type' parameters in your database and then you can reference any asset on Cloudinary both for delivery and via the API. Finally, API methods, such as `upload()` and others, default the value of certain optional parameters if they are not provided. This includes the 'resource_type' (defaulted to "image") and also 'type' (defaulted to "upload"). This is why if you're uploading a "video" rather than an image, you will either need to pass `resource_type: "video"` or `resource_type: "auto"` to the upload() method - otherwise it'll default to "image" resource_type and you'll get an error back.
null
CC BY-SA 4.0
null
2022-12-16T16:26:57.123
2022-12-16T16:38:07.490
2022-12-16T16:38:07.490
11,707,957
11,707,957
null
74,827,250
2
null
74,820,030
0
null
Yes, this is a bug in PyPDF2. We have issues with filling out forms for a long time, see [https://github.com/py-pdf/PyPDF2/issues/355](https://github.com/py-pdf/PyPDF2/issues/355)
null
CC BY-SA 4.0
null
2022-12-16T16:29:50.550
2022-12-16T16:29:50.550
null
null
562,769
null
74,827,704
2
null
74,827,283
1
null
From [Pyinstaller installation guide](https://pyinstaller.org/en/stable/installation.html#verifying-the-installation): > If you cannot use the `pyinstaller` command due to the scripts directory not being in `PATH`, you can instead invoke the `PyInstaller` module, by running `python -m PyInstaller` (pay attention to the module name, which is case sensitive). This form of invocation is also useful when you have PyInstaller installed in multiple python environments, and you cannot be sure from which installation the `pyinstaller` command will be ran. So you may run it as e.g.: ``` python -m PyInstaller some_system.py ``` Or, as the issue seems that `PATH` Windows environment variable doesn't include Python's `Script` folder, it'd better to fix it. From the same guide: > If the command is not found, make sure the execution path includes the proper directory:Windows: C:\PythonXY\Scripts where XY stands for the major and minor Python version number, for example C:\Python38\Scripts for Python 3.8) To fix you may run `where python` to get exact location of Python on your machine (let's say it shows `C:\Python38\`). Then add to `PATH` env variable `Scripts` folder inside it (in this example it'd be `C:\Python38\Scripts\`)
null
CC BY-SA 4.0
null
2022-12-16T17:14:33.397
2022-12-16T17:14:33.397
null
null
1,075,282
null
74,827,983
2
null
74,827,955
-2
null
The "No secret key" error in Git usually occurs when you are trying to push changes to a repository that is configured to use SSH authentication, but you don't have a valid SSH keypair configured on your local machine. To fix this error, you'll need to generate an SSH keypair and add the public key to your Git hosting service (e.g., GitHub, GitLab, etc.). Here's a general outline of the steps you can follow to do this: Open a terminal window and run the ssh-keygen command. This will generate a new SSH keypair and prompt you to enter a file in which to save the keys. Follow the prompts to set the passphrase for your SSH keypair (optional). Go to your Git hosting service's website and log in to your account. Navigate to the SSH keys settings page, which is usually located under "Settings" or "Profile Settings". Click the "Add SSH key" button and follow the prompts to add your public SSH key to your account. Test your SSH connection by running the ssh -T git@ command, replacing with the hostname of your Git hosting service (e.g., ssh -T [email protected] for GitHub). If you've set up your SSH keypair correctly, you should now be able to push changes to your repository without encountering the "No secret key" error. If you're still having trouble, it's possible that your local Git configuration is using the wrong SSH key or that there's an issue with your SSH configuration. You can try checking your local Git configuration with the git config -l command, and you can troubleshoot your SSH configuration by running the ssh -vT git@ command, which will provide verbose output that may help you identify any issues.
null
CC BY-SA 4.0
null
2022-12-16T17:39:59.423
2022-12-16T17:39:59.423
null
null
10,358,465
null
74,828,061
2
null
63,264,883
0
null
I had a similar problem, but with a PHP backend. The unique `formData` keys work, but I found that the classic HTML notation worked just fine and simply results in an array on the server. ``` formData.append('file[]', data[i]); ``` I like that a lot better, since I can use the same methods to process this as with a classic `<input type="file" multiple />`.
null
CC BY-SA 4.0
null
2022-12-16T17:46:54.007
2022-12-16T17:46:54.007
null
null
3,625,228
null
74,828,067
2
null
74,827,481
0
null
Don't conflate - - They're two different things, although the latter typically form a subset of the former. Sure, your CORS configuration allows the `DELETE` method: ``` Access-Control-Allow-Methods: GET,PUT,POST,DELETE,PATCH,OPTIONS ``` But allowing a method in your CORS configuration doesn't automatically make the resource support that method! Note the absence of `DELETE` from the [Allow header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Allow), which lists the set of methods supported by the resource: ``` Allow: GET, HEAD, OPTIONS, TRACE ``` The absence of `DELETE` from this list indicates that your resource currently doesn't support that method. The response status ([405 Method Not Allowed](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405)) is another clue. You need to fix that in your routes or whatever.
null
CC BY-SA 4.0
null
2022-12-16T17:47:30.630
2022-12-16T17:55:48.010
2022-12-16T17:55:48.010
2,541,573
2,541,573
null
74,828,085
2
null
47,738,642
0
null
I mentioned this on a [similar question](https://stackoverflow.com/a/74828061/3625228): I had the same problem, but with a PHP backend. The unique `formData` keys work, but I found that the classic HTML notation worked just fine and simply results in an array on the server. ``` formData.append('file[]', data[i]); ``` I like that a lot better, since I can use the same methods to process this as with a classic `<input type="file" multiple />`.
null
CC BY-SA 4.0
null
2022-12-16T17:48:52.060
2022-12-16T17:48:52.060
null
null
3,625,228
null
74,828,457
2
null
8,412,810
0
null
This statement working correctly: ``` Dim PutBackColor As Boolean = False Private Sub TabControl1_DrawItem(sender As System.Object, e As System.Windows.Forms.DrawItemEventArgs) Handles TabControl1.DrawItem If Me.PutBackColor = False Then e.Graphics.FillRectangle(New SolidBrush(<YourColor>), 0 , 0, e.Bounds.Width + 2, e.Bounds.Height + 2) Me.PutBackColor = True End If e.Graphics.FillRectangle(New SolidBrush(<YourColor>), 0 , 0, e.Bounds.Width + 2, e.Bounds.Height + 2) e.Graphics.DrawString(Me.TabControl1.TabPages(e.In dex).Text, e.Font, Brushes.White, e.Bounds.X + 5, e.Bounds.Y + 5) If e.State = DrawItemState.Selected Then Me.PutBackColor = False End If End Sub ```
null
CC BY-SA 4.0
null
2022-12-16T18:28:34.533
2022-12-31T08:50:04.347
2022-12-31T08:50:04.347
14,303,948
14,303,948
null
74,828,930
2
null
74,828,650
0
null
There are answer [https://stackoverflow.com/a/29168276/3815660](https://stackoverflow.com/a/29168276/3815660) Read carefully and try `ItemDecorator` to achieve it for `GridLayout`.
null
CC BY-SA 4.0
null
2022-12-16T19:24:53.453
2022-12-16T21:08:58.723
2022-12-16T21:08:58.723
7,954,210
3,815,660
null
74,829,710
2
null
66,049,899
0
null
Add your IP address in the network access since mongo server has a list of IP addresses who can access the database.
null
CC BY-SA 4.0
null
2022-12-16T20:59:29.193
2022-12-16T20:59:29.193
null
null
20,797,063
null
74,830,048
2
null
74,829,150
4
null
You can try the code below using `edgelist` ``` el <- get.edgelist(g) pmid <- setNames( rowMeans(matrix(V(g)$Elevation[match(el, names(V(g)))], ncol = 2)), paste0("P-", 1:nrow(el)) ) w <- c(setNames(V(g)$Elevation, V(g)$name), pmid) out <- graph_from_edgelist(rbind( cbind(el[, 1], paste0("P-", 1:nrow(el))), cbind(paste0("P-", 1:nrow(el)), el[, 2]) ), directed = FALSE) %>% set_vertex_attr(name = "name", value = paste0(V(.)$name, ": ", w[V(.)$name])) %>% set_vertex_attr(name = "color", value = startsWith(V(.)$name, "P")) ``` [](https://i.stack.imgur.com/7WqE0.png)
null
CC BY-SA 4.0
null
2022-12-16T21:46:03.137
2022-12-16T21:46:03.137
null
null
12,158,757
null
74,830,200
2
null
74,829,592
1
null
``` .container{ display:flex; justify-content:center; align-items:center; height:95vh; flex-direction:column; } .line{ height:15vh; border:solid 1px red; } ``` ``` <div class='container'> <div id='text'> Hi my name is <br> </div> <div class='line'></div> </div> ```
null
CC BY-SA 4.0
null
2022-12-16T22:07:38.220
2022-12-16T22:07:38.220
null
null
4,398,966
null
74,830,452
2
null
74,821,671
1
null
, you haven't entered an expression, you've entered text. That will never work. , even if you did set that as an expression, I don't think you'll be able to make it work over an array, at least, not without specifying more properties and making it a little more complex. I think the easiest way is to use a `contains` statement after turning the item into a string ... [](https://i.stack.imgur.com/vkknJ.png) The expression I am using on the left hand side is ... ``` string(item()?['Responsible']) ``` ... and this is the result ... [](https://i.stack.imgur.com/2x84X.png)
null
CC BY-SA 4.0
null
2022-12-16T22:43:49.533
2022-12-16T22:43:49.533
null
null
5,772,095
null
74,830,581
2
null
74,810,620
0
null
Although it's a multi-categorical axis, the range works as if there's a simple numerical axis. There are six values, starting at x=0 going to x=5. To show all values ``` fig.update_xaxes(range=[0,5]) ``` [](https://i.stack.imgur.com/a015Q.png) To use the range in your example ``` fig.update_xaxes(range=[1,4]) ``` [](https://i.stack.imgur.com/jo0Ke.png)
null
CC BY-SA 4.0
null
2022-12-16T23:03:48.567
2022-12-16T23:03:48.567
null
null
17,142,551
null
74,830,926
2
null
45,798,703
0
null
``` private void txtSearch_TextChanged(object sender, EventArgs e) { if (txtSearch.Text != string.Empty) { foreach (DataGridViewRow row in gvProducts.Rows)//gvProducts is demo Grid { string text = ""; foreach (DataGridViewCell cell in row.Cells) { if ((cell.ColumnIndex != 0 && cell.ColumnIndex != 1)) { text += cell.Value.ToString(); } } if (text.ToUpper().Contains(txtSearch.Text.ToUpper())) {//to Uppper is not compulsory but its for case insensitivity CurrencyManager currencyManager1 = (CurrencyManager)BindingContext[gvProducts.DataSource]; currencyManager1.SuspendBinding(); row.Visible = true; currencyManager1.ResumeBinding(); } else { CurrencyManager currencyManager1 = (CurrencyManager)BindingContext[gvProducts.DataSource]; currencyManager1.SuspendBinding(); row.Visible = false; currencyManager1.ResumeBinding(); } } } else { foreach (DataGridViewRow row in gvProducts.Rows) { CurrencyManager currencyManager1 = (CurrencyManager)BindingContext[gvProducts.DataSource]; currencyManager1.SuspendBinding(); row.Visible = true; currencyManager1.ResumeBinding(); } } } ```
null
CC BY-SA 4.0
null
2022-12-17T00:10:48.573
2022-12-17T00:10:48.573
null
null
20,796,630
null
74,830,912
2
null
32,788,836
0
null
i stumbled upon this post having the same problem with trying to achieve smooth circular waves from fft averages. i've tried normalizing, smoothing and wildest math to spread the dynamic of an array of averages between 0 and 1. it is of course possible but the sharp increases in averaged values remain a bother that basically makes these values unfeasable for direct display. instead i use the fft average to increase amplitude, frequency and wavelength of a separately structured clean sine. imagine a sine curve across the screen that moves right to left at a given speed(frequency) times the current average and has an amplitude of current average times whatever will then be mapped to 0,1 in order to eventually determine 'the wave's' z. the function for calculating size, color, shift of elements or whatever visualizes 'the wave' will have to be based on distance from center and some array that holds values for each distance, e.g. a certain number of average values. that very same array can instead be fed with values from a sine - that is influenced by the fft averages - which themselves thus need no smoothing and can remain unaltered. the effect is pleasingly clean sine waves appearing to be driven by the 'energy' of the sound. like this - where 'rings' is an array that a distance function uses to read 'z' values of 'the wave's x,y positions. ``` const wave = { y: height / 2, length: 0.02, amplitude: 30, frequency: 0.5 } //var increment = wave.frequency; var increment = 0; function sinewave(length,amplitude,frequency) { ctx.strokeStyle = 'red'; ctx.beginPath(); ctx.moveTo(0, height / 2); for (let i = 0; i < width; i+=cellSize) { //ctx.lineTo(i, wave.y + Math.sin(i * wave.length + increment) * wave.amplitude) ctx.lineTo(i, wave.y + Math.sin(i * length + increment) * amplitude); rings.push( map( Math.sin(i * length + increment) * amplitude,0,20,0.1,1) ); rings.shift(); } ctx.stroke(); increment += frequency; } ``` the function is called each frame (from draw) with the current average fft value driving the sine function like this - assuming that value is mapped to 0,1: ``` sinewave(0.006,averg*20,averg*0.3) ``` allowing fluctuating values to determine wavelength or frequency can have some visually appealing effect. however, the movement of 'the wave' will never seem natural. i've accomplished a near enough result in my case. for making the sine appear to be driven by each 'beat' you'd need beat detection to determine the exact tempo of 'the sound' that 'the wave' is supposed to visualize. continuous averaging of distance between larger peaks in the lower range of fft spectrum might work there with setting a semi fixed frequency - with edm... i know, the question was about smoothing array values. forgive me for changing the subject. i just thought that the objective 'sound wave' is an interesting one that could be achieved differently. and just so this is complete here's a bit that simply draws circles for each fft and assign colour according to volume. with linewidths relative to total radius and sum of volumes this is quite nice: ``` //col generator function getCol(n,m,f){ var a = (PIx5*n)/(3*m) + PIdiv2; var r = map(sin(a),-1,1,0,255); var g = map(sin(a - PIx2/3),-1,1,0,255); var b = map(sin(a - PIx4/3),-1,1,0,255); return ("rgba(" + r + "," + g + "," + b + "," + f + ")"); } //draw circles for each fft with linewidth and colour relative to value function drawCircles(arr){ var nC = 20; //number of elem from array we want to use var cAv = 0; var cAvsum = 0; //get the sum of all values so we can map a single value with regard to this for(var i = 0; i< nC; i++){ cAvsum += arr[i]; } cAv = cAvsum/nC; var lastwidth = 0; //draw a circle for each elem from array //compute linewith a fraction of width relative to value of elem vs. sum of elems for(var i = 0; i< nC; i++){ ctx.beginPath(); var radius = lastwidth;//map(arr[i]*2,0,255,0,i*300); //use a small col generator to assign col - map value to spectrum ctx.strokeStyle = getCol(map(arr[i],0,255,0,1280),1280,0.05); //map elem value as fraction of elem sum to linewidth/total width of outer circle ctx.lineWidth = map(arr[i],0,cAvsum,0,width); //draw ctx.arc(centerX, centerY, radius, 0, Math.PI*2, false); ctx.stroke(); //add current radius and linewidth to lastwidth var lastwidth = radius + ctx.lineWidth/2; } } ``` codepen here: [https://codepen.io/sumoclub/full/QWBwzaZ](https://codepen.io/sumoclub/full/QWBwzaZ) always happy about suggestions.
null
CC BY-SA 4.0
null
2022-12-17T00:09:07.690
2022-12-23T12:24:11.307
2022-12-23T12:24:11.307
20,444,814
20,444,814
null
74,831,595
2
null
74,831,504
1
null
As I understand it, you want to plot the province vs. its spending. I'm not even sure if you need/want ML for this as without any other features than the amount spent, simply plotting and analyzing the graphs yourself may be easier. If you have access to a list of the possible provinces, e.g. ``` provinces = ["CA", "UT", ...] ``` Then you shouldn't even need to convert them to integers to plot them. For example, simple plot them with matplotlib (a bar graph makes more sense than a scatter plot here): ``` import matplotlib.pyplot as plt plt.bar(provinces, provinces_spending) ``` If i've misunderstood and you do need to convert them to integer values, try this: ``` import numpy as np provinces_as_ints = np.unique(L, return_inverse=True)[1] ```
null
CC BY-SA 4.0
null
2022-12-17T03:27:04.773
2022-12-17T03:27:04.773
null
null
18,273,778
null
74,831,601
2
null
74,753,857
1
null
With regards to MongoDB update, instead of using 'localhost' one is required to use '127.0.0.1'. Example instead of: `mongodb://localhost:27017/Company`, one is supposed to write it as; `mongodb://127.0.0.1:27017/Company`
null
CC BY-SA 4.0
null
2022-12-17T03:29:31.830
2022-12-19T16:15:58.780
2022-12-19T16:15:58.780
14,267,427
20,531,278
null
74,831,661
2
null
74,824,051
0
null
If I understand you correctly.... Before running the sub [](https://i.stack.imgur.com/gu0GG.png) Expected result : In sheet1, there will be two more AAA item with bin a1 and a3, and one more DDD item with bin d2. Something like the image below: [](https://i.stack.imgur.com/e5mzO.png) Please note, that in sheet2 there is GGG item. But since the code just check what is in sheet1 against what is in sheet2, it doesn't check what is in Sheet2 against what is in Sheet1, so GGG item is ignored. GGG item is not added to sheet1. > I need to auto insert rows underneath the item numbers If the images above is similar with your case and if you don't mind that the code is not inserting row, but adding data to the cell below the last row with data (then sorting it) ... maybe you want to have a look the code below : ``` Sub test() Dim rgS1 As Range: Dim rgS2 As Range: Dim c1 As Range: Dim c2 As Range Dim cd As String: Dim concat As String 'set data range in column A of both sheets as rgS1 and rgS2 variable With Sheets("Sheet1") Set rgS1 = .Range("A2", .Range("A" & Rows.Count).End(xlUp)) End With With Sheets("Sheet2") Set rgS2 = .Range("A2", .Range("A" & Rows.Count).End(xlUp)) End With 'loop to each cell in rgS1 as c1 variable 'get the bin code as cd variable 'concatenate c1 value and the cd as concat variable 'check, if the cd is found in rgS2 'get the cells in sheet2 which contain the c1 value as rg variable 'then loop to each cell in rg as c2 variable 'if the looped cell value & the looped cell.offset(0,1) value <> concat 'write the needed value from sheet2 to sheet1 For Each c1 In rgS1 cd = c1.Offset(0, 2).Value: concat = c1.Value & cd If Not rgS2.Offset(0, 1).Find(cd, lookat:=xlWhole) Is Nothing Then With rgS2 .Replace c1.Value, True, xlWhole, , False, , False, False Set rg = .SpecialCells(xlConstants, xlLogical) .Replace True, c1.Value, xlWhole, , False, , False, False End With For Each c2 In rg If c2.Value & c2.Offset(0, 1).Value <> concat Then With rgS1.End(xlDown) .Offset(1, 0).Value = c2.Value .Offset(1, 1).Value = c2.Offset(0, 3).Value .Offset(1, 2).Value = c2.Offset(0, 1).Value .Offset(1, 4).Value = c2.Offset(0, 2).Value End With End If Next End If Next 'sort the table in sheet1 based on ITEM and BIN With Sheets("Sheet1").Sort .SortFields.Add Key:=Range("A1"), Order:=xlAscending .SortFields.Add Key:=Range("C1"), Order:=xlAscending .SetRange Sheets("Sheet1").UsedRange .Header = xlYes .Apply End With End Sub ```
null
CC BY-SA 4.0
null
2022-12-17T03:47:34.967
2022-12-17T04:30:21.793
2022-12-17T04:30:21.793
7,756,251
7,756,251
null
74,831,831
2
null
74,828,650
0
null
You need to remove this line ``` android:layout_margin="5dp" ``` You will look like this. ``` <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="120dp" android:layout_gravity="center" android:layout_marginBottom="30dp" app:cardCornerRadius="10dp" app:cardElevation="5dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> </LinearLayout> </androidx.cardview.widget.CardView> ```
null
CC BY-SA 4.0
null
2022-12-17T04:38:33.500
2022-12-17T04:38:33.500
null
null
20,440,272
null
74,832,213
2
null
20,142,606
0
null
Here is the snippet used and worked, ``` <div class="container-fluid py-5 h-100"> <div class="row d-flex justify-content-center align-items-center h-100"> <div class="col col-md-8"> <div class="card"></div> </div> </div> </div> ```
null
CC BY-SA 4.0
null
2022-12-17T06:26:10.947
2022-12-17T06:26:10.947
null
null
11,419,020
null
74,832,294
2
null
74,829,342
1
null
You can try this: ``` df[df['secret'].str.len() == 0] ``` This removes any rows that have empty string as a value. Not sure that this is exactly what you are looking for.
null
CC BY-SA 4.0
null
2022-12-17T06:52:25.773
2022-12-17T06:52:25.773
null
null
2,631,229
null
74,833,378
2
null
61,956,746
0
null
I added `cogs.remove('Owner')` which removed the cog and its commands. It only removes its presence from the help menu and not the actual cog itself. I did this on line 29 of the code. --- [edit](https://stackoverflow.com/revisions/61956746/2)[How to hide owner commands in a embedded help command [discord.py rewrite]](https://stackoverflow.com/questions/61956746/how-to-hide-owner-commands-in-a-embedded-help-command-discord-py-rewrite)[NeonNingen](https://stackoverflow.com/users/12476276/neonningen)
null
CC BY-SA 4.0
null
2022-12-17T10:31:42.250
2022-12-17T10:31:42.250
null
null
5,446,749
null
74,833,629
2
null
74,806,501
0
null
Bar chart doesn't support slantedText, You need to switch to ColumnChart instead if you want to use slantedText you can verify by checking the supported properties in the docs for both [BarChart](https://developers.google.com/chart/interactive/docs/gallery/barchart) and [ColumnChart](https://developers.google.com/chart/interactive/docs/gallery/columnchart) Also, The supported slantedTextAngle values are -90 and 90 ``` <body> <script src="https://www.gstatic.com/charts/loader.js"></script> <div id="chart_div"></div> </body> <script> google.charts.load('current', { callback: drawBasic, packages: ['corechart'] }); function drawBasic() { var data = google.visualization.arrayToDataTable([ ['Example', 'Example', ], ["a", 12], ["b", 10], ["c", 15], ["d", 13], ["e", 54], ["f", 20], ["g", 30] ]); var options = { title: 'title', subtitle: "subtitle", vAxis: { title: 'vTitle', }, hAxis: { title: 'hTitle', direction: -1, slantedText: true, }, colors: ['#e91e63'] }; var chart = new google.visualization .ColumnChart(document.getElementById('chart_div')); chart.draw(data, options); } </script> ```
null
CC BY-SA 4.0
null
2022-12-17T11:10:47.470
2022-12-17T11:10:47.470
null
null
14,900,930
null
74,833,662
2
null
69,431,297
1
null
# Q) Why Vite.js translate " linked content " into Base64 ? > - [https://vitejs.dev/config/build-options.html#build-assetsinlinelimit](https://vitejs.dev/config/build-options.html#build-assetsinlinelimit)- [https://vitejs.dev/guide/assets.html#importing-asset-as-url](https://vitejs.dev/guide/assets.html#importing-asset-as-url) file `./vite.config.js` code ``` export default defineConfig({ build: { assetsInlineLimit: 4096, }, }) ``` ref - [https://github.com/vitejs/vite/discussions/11405#discussioncomment-4437161](https://github.com/vitejs/vite/discussions/11405#discussioncomment-4437161)
null
CC BY-SA 4.0
null
2022-12-17T11:18:00.373
2022-12-17T11:18:00.373
null
null
1,347,601
null
74,833,717
2
null
54,537,127
2
null
as of the time of writing this answer the "Compact middle packages" is located here : [](https://i.stack.imgur.com/vedSo.png)
null
CC BY-SA 4.0
null
2022-12-17T11:31:45.190
2022-12-17T11:31:45.190
null
null
15,182,215
null
74,833,910
2
null
74,827,451
0
null
How about just modifying just a little bit ``` public async Task<IActionResult> Index(int? session) { if (session == null || session != 4) return View(null); var cardio = await _client.GetEntries<CardioModel>().FirstOrDefault(x => x.Session == 4); return View(cardio); } ```
null
CC BY-SA 4.0
null
2022-12-17T12:02:37.943
2022-12-17T16:42:00.957
2022-12-17T16:42:00.957
52,039
162,506
null
74,834,103
2
null
74,833,957
0
null
You’re assuming that the counts for each `month` will be stacked, so that together the column will show the total across all months. But in fact the counts are overplotted in front of one another, so only the highest month-count is visible. You can see this is the case if you add a border and make your columns transparent. Using `mpg` as an example, with `cyl` as the “extra” grouping variable: ``` library(dplyr) library(ggplot2) mpg %>% count(drv, year, cyl) %>% ggplot(aes(year, n, fill = drv)) + geom_col( position = "dodge", color = "black", alpha = .5 ) ``` [](https://i.stack.imgur.com/VdAJL.jpg) NB: `count(x)` is a shortcut for `group_by(x) %>% summarize(n = n())`.
null
CC BY-SA 4.0
null
2022-12-17T12:33:44.007
2022-12-17T12:33:44.007
null
null
17,303,805
null
74,834,737
2
null
74,808,146
1
null
You need to use [groupby](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.groupby?view=net-7.0) method in LinQ. In your case it will be like this: ``` (someDT.AsEnumerable. GroupBy(Function (row) row.Field(Of String)("SN")). Select(Function (grp) grp.CopyToDataTable) ).ToList ``` After it you will recieve a list of datatables grouped by SN Field, and you'll be able to work with them as with separated datatables using for each.
null
CC BY-SA 4.0
null
2022-12-17T14:06:04.963
2022-12-17T14:06:04.963
null
null
20,748,548
null
74,834,745
2
null
74,765,588
1
null
You are calling `pieChart.setUsePercentValues(true);` in `setPieChart()`, so it is showing percentages instead of the actual values. Remove that or set it to false if you want to see values.
null
CC BY-SA 4.0
null
2022-12-17T14:07:12.937
2022-12-17T14:07:12.937
null
null
9,473,786
null
74,835,069
2
null
72,468,635
7
null
## npm from v7 does auto-install, pnpm doesn't starting . Does install Peer Dependencies automatically [https://github.com/npm/rfcs/blob/main/implemented/0025-install-peer-deps.md](https://github.com/npm/rfcs/blob/main/implemented/0025-install-peer-deps.md). [https://github.com/pnpm/pnpm/discussions/3995#discussioncomment-1893230](https://github.com/pnpm/pnpm/discussions/3995#discussioncomment-1893230) npm does the same way only with `.npmrc` ``` auto-install-peers = true ``` > auto-install-peers=true now makes pnpm work the same way as npm v7. From pnpm v7.1.3 ([ref](https://github.com/pnpm/pnpm/discussions/3995#discussioncomment-2797582)) And the with `.npmrc` and `not automatic` was a choice by the developers involved. There are those who were for and who weren't. ([ref1](https://github.com/pnpm/pnpm/discussions/3995#discussioncomment-1647428), [ref2](https://github.com/pnpm/pnpm/discussions/3995#discussioncomment-1893230)) ## .npmrc To do it you have to create a `.npmrc` file and add: ``` auto-install-peers = true ``` This is the best way. Because it creates consistency for all developers consuming the project and repo. Same config. So in simplified terms, if you have some packages that require peers just add the config. You have a nice warning that reminds you in case there are packages with `peer-dependencies`. [https://github.com/pnpm/pnpm/discussions/3995#discussioncomment-2797582](https://github.com/pnpm/pnpm/discussions/3995#discussioncomment-2797582) > auto-install-peers=true now makes pnpm work the same way as npm v7. From pnpm v7.1.3 ### Does an --auto-install-peers arg exists ? (No) There is no `--auto-install-peers` arg. Can check here the feature ask here [https://github.com/pnpm/pnpm/issues/5284](https://github.com/pnpm/pnpm/issues/5284) Denied. And the why is understandable. `.npmrc` is better for consistency. So that people `pnpm install` and it always works the same. No forgetting anything. ## Using install-peerdeps > I advise using `.npmrc`. -> Native. straight forward. > Note: you may consider this tool. If you fall into some of pnpm bugs (ex: [1](https://github.com/pnpm/pnpm/issues/5319), ) and inconsistencies with peer-dependencies handling. Many issues are open. I would go with `.pnpmrc first`. If any issues. I would use this tool. [https://www.npmjs.com/package/install-peerdeps](https://www.npmjs.com/package/install-peerdeps) `install-peerdeps` supports pnpm. The tool is mentioned in `eslint-config-airbnb` for example. Example: ``` npx install-peerdeps --pnpm <your-package> # or npx install-peerdeps -P <your-package> # as dev dep npx install-peerdeps -P -D <your-package> # Peers only npx install-peerdeps -P -D --only-peers <your-package> # or npx install-peerdeps -P -D -o <your-package> ``` The package will automatically add the dependencies to `package.json` in `dependencies` or `devDependencies` depending on the used flag.
null
CC BY-SA 4.0
null
2022-12-17T14:54:49.283
2022-12-17T14:54:49.283
null
null
7,668,448
null
74,835,432
2
null
74,834,979
0
null
Maybe it's not a code problem and your `test.png` image has empty transparent space surrounding the actual glass-like background, i just copy pasted your code but changed the `fit` to `BoxFit.fill` in your `DecorationImage` and it works well: [](https://i.stack.imgur.com/rJ3UJ.png)
null
CC BY-SA 4.0
null
2022-12-17T15:55:53.647
2022-12-17T15:55:53.647
null
null
20,762,776
null
74,835,608
2
null
7,394,447
0
null
on expo you must change app.json file ``` { "expo": { "orientation": "default", } } ``` and turn on Auto-rotate from settings panel
null
CC BY-SA 4.0
null
2022-12-17T16:18:37.517
2022-12-17T16:18:37.517
null
null
7,864,983
null
74,835,656
2
null
27,471,219
0
null
For some processors, if you enable virtualization you should be able to run the android studio emulator without installing HAXM - for example on AMD you need to enable SVM mode
null
CC BY-SA 4.0
null
2022-12-17T16:27:04.633
2022-12-17T16:27:04.633
null
null
10,587,472
null
74,835,658
2
null
74,834,979
0
null
When you want to fill the image in a complete area you need to use fill, replace this with your decoration part of the decoration. ``` decoration: const BoxDecoration( image: DecorationImage( image: AssetImage('assets/images/card/test.png'), fit: BoxFit.fill, alignment: Alignment.topCenter, ), ), ```
null
CC BY-SA 4.0
null
2022-12-17T16:27:16.170
2022-12-17T16:27:16.170
null
null
20,367,275
null
74,835,773
2
null
74,830,571
0
null
I found a workaround. Assign the `QWebEngineView` as an attribute of `self`, then set the maximum size to `(0, 0)` like this: ``` from PyQt6.QtWidgets import * from PyQt6 import QtGui, QtCore, QtWebEngineWidgets import sys class Main(QMainWindow): def __init__(self): super().__init__() # -------------- # central widget # -------------- self.layout = QGridLayout() container = QWidget() container.setLayout(self.layout) self.setCentralWidget(container) # -------------- # webengine view # -------------- self.browser = QtWebEngineWidgets.QWebEngineView(self) self.browser.setMaximumSize(0, 0) # ----------------------- # push button to add tabs # ----------------------- btn = QPushButton('Add Tab') btn.released.connect(self.addTab) self.layout.addWidget(btn) # ---------- # tab widget # ---------- self.tabCount = 0 self.tabs = QTabWidget() self.tabs.setTabsClosable(True) self.layout.addWidget(self.tabs) def addTab(self): # ------------- # main elements # ------------- layout = QVBoxLayout() container = QWidget() container.setLayout(layout) # --------- # add label # --------- tabBrowser = QtWebEngineWidgets.QWebEngineView(self) txt = ''' <html> Hello World! </html> ''' tabBrowser.setHtml(txt) layout.addWidget(tabBrowser) # ------- # add tab # ------- self.tabs.addTab(container, str(self.tabCount)) self.tabCount += 1 if __name__ == '__main__': # ----------------- # exception handler # ----------------- def exception_hook(exc_type, exc_value, tb): sys.__excepthook__(exc_type, exc_value, tb) main.close() sys.exit(1) sys.excepthook = exception_hook # ----------- # run program # ----------- app = QApplication(sys.argv) main = Main() main.show() sys.exit(app.exec()) ```
null
CC BY-SA 4.0
null
2022-12-17T16:42:10.080
2022-12-17T16:42:10.080
null
null
20,797,464
null
74,835,871
2
null
20,400,221
0
null
Do you mean something like this? ``` var canvas = document.getElementById("dm_graphs"); var ctx = canvas.getContext("2d"); ls = 0; d = 7; // sesitivity function updateFancyGraphs() { var gh = canvas.height; var gh2 = gh / 2; ctx.drawImage(canvas, -1, 0); ctx.fillRect(graphX, 0, 1, canvas.height); var size = Math.max(-gh, Math.min((3 * (Math.random() * 10 - 5)) * d, gh)); ctx.beginPath(); ctx.moveTo(graphX - 1, gh2 + ls / 2); ctx.lineTo(graphX, gh2 + size / 2); ctx.stroke(); ls = size; } function resizeCanvas() { var w = window.innerWidth || document.body.offsetWidth; canvas.width = w / 1.5; canvas.height = window.innerHeight / 1.5; graphX = canvas.width - 1; ctx.lineWidth = 1; // 1.75 is nicer looking but loses a lot of information. ctx.strokeStyle = "Lime"; ctx.fillStyle = "black"; } window.addEventListener("resize", resizeCanvas); resizeCanvas(); z = setInterval(() => updateFancyGraphs(), 20) ``` ``` body { min-height: 100ev; } body, html, canvas { font: 15px sans-serif; height: 100hv; width: 100%; margin: 0; padding: 0; background: #113355; color: white; overflow: hidden; } #dm_status, footer { text-align: center; } #dm_graphs { image-rendering: optimizeSpeed; background: rgba(0, 0, 0, 0.7); } ``` ``` <html> <head> <title>Zibri's Graph</title> <meta name="viewport" content="width=device-width"> </head> <body> <canvas id="dm_graphs"></canvas> </body> </html> ```
null
CC BY-SA 4.0
null
2022-12-17T16:59:08.260
2022-12-17T16:59:08.260
null
null
236,062
null
74,836,123
2
null
63,178,087
0
null
More than 2 years, but anyway... You shoud be able to de-scale (lower the resolution) of the input before passing it to the object detector.
null
CC BY-SA 4.0
null
2022-12-17T17:36:14.237
2022-12-17T17:36:14.237
null
null
20,803,084
null
74,836,447
2
null
72,130,354
0
null
In ggraph we must use scale_size() for nodes and scale_edge_width() for edges to harmonize proportions. Point sizes in ggplot are scaled by their radius already: [Does size for ggplot2::geom_point() refer to radius, diameter, area, or something else?](https://stackoverflow.com/questions/64067450/does-size-for-ggplot2geom-point-refer-to-radius-diameter-area-or-somethin) so no transformations are necessary, unless you want the point size to be proportional to the edge width by area. Build a tbl_graph with your samples ``` #edges are determined by length of intersection edges <- data.frame('from'=c('A','B','C'),'to'=c('B','C','A'), 'weight'=c(length(intersect(A,B)),length(intersect(B,C)),length(intersect(C,A)))) #nodes are weighted by the length of the sample nodes <- data.frame('name'=c('A','B','C'),size=c(length(A),length(B),length(C))) tbl_graph <- tbl_graph(nodes=nodes,edges=edges) ``` Now, if you build the network directly with these sizes, the distances between nodes will be decided automatically, and most ggraph layouts set distances between nodes between 0 and 1, resulting in a crowded graph with oversized edges and nodes. If the distance between nodes is not important, we can simply use a scaling factor to scale the node sizes and edge widths down to fit the graph. In order to harmonize width and sizes, we scale the range of the edge widths to the min and max of the edge widths, and scale node sizes to the min and max of the nodes' sizes, multiplied by 2, as the nodes are scaled by diameter. This way, node sizes and edge widths are scaled to their actual values, rather than decided by the layout. I also include here additional annotation methods to show the sizes of the nodes and edges. node_point shape=21 is the empty circle. Good luck! ``` scale_factor = 0.1 ggraph(tbl_graph) + geom_edge_link(aes(width=weight*scale_factor,label=weight),label_dodge=unit(-4,'mm'),angle_calc='along') + scale_edge_width(range=c(min(edges$weight)*scale_factor,max(edges$weight)*scale_factor)) + geom_node_point(aes(size=size * scale_factor),shape=21) + scale_size(range=c(min(nodes$size)*scale_factor*2,max(nodes$size)*scale_factor*2)) + theme_linedraw() + geom_node_text(aes(label=paste(name,':',size)),nudge_x=-0.1) ``` [resulting ggraph](https://i.stack.imgur.com/qgRd0.png)
null
CC BY-SA 4.0
null
2022-12-17T18:22:10.857
2022-12-17T18:22:10.857
null
null
17,795,356
null
74,836,550
2
null
74,835,305
0
null
If I understand correctly, you want the turtle to write and that it shall appear on screen? The following works for me: ``` from turtle import Turtle, Screen ALIGNMENT = "Center" FONT = ("Verdana", 16, "normal") LEAP_YEAR = "It is a leap year" COMMON_YEAR = "It is not a leap year" year = int(input("LEAP YEAR CHECKER enter the year: ")) board = Turtle() board.hideturtle() board.color("black") screen = Screen() if year % 4 == 0: if year % 100 == 0: if year % 400 == 0: board.write(LEAP_YEAR, font=FONT, align=ALIGNMENT) else: board.write(COMMON_YEAR, font=FONT, align=ALIGNMENT) else: board.write(LEAP_YEAR, font=FONT, align=ALIGNMENT) else: board.write(COMMON_YEAR, font=FONT, align=ALIGNMENT) screen.exitonclick() ```
null
CC BY-SA 4.0
null
2022-12-17T18:38:22.920
2022-12-17T18:38:22.920
null
null
20,802,992
null
74,836,609
2
null
38,409,676
0
null
``` kill -9 $(ps aux | grep "Android Studio.app" | awk '{print $2}') ```
null
CC BY-SA 4.0
null
2022-12-17T18:48:57.067
2022-12-17T18:55:19.380
2022-12-17T18:55:19.380
6,108,211
6,108,211
null
74,836,722
2
null
71,591,971
1
null
I First installed python with brew ``` brew install python ``` Then I tried linking the python with symlinks using: ``` brew link python3 ``` And it worked for me. PS: I was trying to run a shell script and alias approach didn't work.
null
CC BY-SA 4.0
null
2022-12-17T19:04:16.417
2022-12-17T19:04:16.417
null
null
9,079,064
null