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,224,278 | 2 | null | 75,222,527 | 0 | null | In C# you can declare a class or struct as nullable by adding a ? after the type, for a class (string is a class) this means that null is an expected/acceptable value for the variable. Classes are essentially just pointers pointing to a value stored on the heap, null is a way to represent a pointer pointing to nothing and is usually used to indicate some kind of error. A variable of a class type can be null, but that may be unexpected, so we have nullable classes to show that null is a valid state for the object.
Example:
string name = "text";
string? nullableName = null;
If we removed the ? after string then the compiler would complain that we are trying to assign a value that is expected to be null to a value that shouldn't be null. Looking at the Console.ReadLine() method, we can see that it returns a string? and could therefore be null, but the variable name is only a string not a string?. The compiler knows that you want the string value and to throw an error if the result was null, but warns you that it may throw an unexpected exception.
Solutions:
You can tell the compiler explicitly that the value will/should not be null by using the null forgiving operator ! after the method call
```
Console.ReadLine()!
```
Declare name as a nullable string (string? Instead of string) and then check if the value is null, note that method that take a string will complain when passed name as it may be null
```
if (name == null)
{
//do something in case of failure
}
```
If you are new to C# or programming in general, simply looking the error up on the internet will usually give the answer you are looking for when dealing with compile time errors/warnings. If you search for the error code (CS8600) you will properly see results from the [Microsoft docs](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/nullable-warnings) and they may be a little hard to understand so try and search for error/warning message instead in this case `Converting null literal or possible null value to non-nullable type.`
if you want to know more about nullability in C# I recommend [this](https://www.geeksforgeeks.org/c-sharp-nullable-types/) article.
| null | CC BY-SA 4.0 | null | 2023-01-24T16:16:40.110 | 2023-01-24T17:57:20.253 | 2023-01-24T17:57:20.253 | 21,067,788 | 21,067,788 | null |
75,224,295 | 2 | null | 75,224,007 | 1 | null | You can reshape your data to a wider format, and then mutate your scrape column by subtracting the in and out columns.
```
library(dplyr)
library(tidyr)
vol %>%
pivot_wider(id_cols = "activity", names_from = "in_out", values_from = "qty") %>%
mutate(qty_scrap = `in` - out)
#> # A tibble: 6 x 4
#> activity `in` out qty_scrap
#> <chr> <dbl> <dbl> <dbl>
#> 1 RAAMELK 0 31 -31
#> 2 Separering 31 9 22
#> 3 Sweetmilk Pasteurizer 8331 31 31 0
#> 4 9004 - T42 kartong 70x70 6 6 0
#> 5 9006 - T61 BIB 3 3 0
#> 6 9004 - T41 kartong 70x70 28 28 0
```
[reprex package](https://reprex.tidyverse.org)
| null | CC BY-SA 4.0 | null | 2023-01-24T16:18:00.120 | 2023-01-24T16:18:00.120 | null | null | 6,461,462 | null |
75,224,304 | 2 | null | 75,224,007 | 1 | null | You could try this:
```
vol %>%
group_by(activity) %>%
mutate(qty_scrap = head(qty, 1) - tail(qty, 1)) %>%
tidyr::pivot_wider(names_from = in_out, values_from = qty) %>%
select(activity, `in`, out, qty_scrap)
```
Output
```
# activity `in` out qty_scrap
# <chr> <dbl> <dbl> <dbl>
# 1 RAAMELK 0 31 -31
# 2 Separering 31 9 22
# 3 Sweetmilk Pasteurizer 8331 31 31 0
# 4 9004 - T42 kartong 70x70 6 6 0
# 5 9006 - T61 BIB 3 3 0
# 6 9004 - T41 kartong 70x70 28 28 0
```
| null | CC BY-SA 4.0 | null | 2023-01-24T16:18:33.677 | 2023-01-24T16:24:24.353 | 2023-01-24T16:24:24.353 | 12,109,788 | 12,109,788 | null |
75,224,368 | 2 | null | 75,222,707 | 0 | null | To achieve the results in the image, you should use an emission map.
Creating these types of lights using the `Light` Component is inefficient. You Spot Light Point Light for this purpose.
---
- [How to TURN ON Lights in Unity](https://www.youtube.com/watch?v=bU1sBNfbdM4)- [How to Use EMISSIVE MATERIALS in Unity! Step-by-Step Tutorial](https://www.youtube.com/watch?v=2PBgCl-zIZQ)
| null | CC BY-SA 4.0 | null | 2023-01-24T16:23:49.537 | 2023-01-24T16:36:25.387 | 2023-01-24T16:36:25.387 | 19,897,499 | 19,897,499 | null |
75,224,483 | 2 | null | 75,214,839 | 0 | null | I achieved what was required, but I made some changes to my controller and deleted my class where I made the connection to my database. I did it with Entity Framework.
I show my controller, in my model and view nothing changes except what was corrected in the first answer.
```
public ActionResult ListarTarjeta()
{
List<TarjetasInformativas> listaTarjetas = new List<TarjetasInformativas>();
using (db)
{
var listTarjetasInformativas = db.SP_TARJETASINFORMATIVAS().ToList();
foreach(var item in listTarjetasInformativas)
{
var asignar = new TarjetasInformativas
{
PrimerNombre = item.NOMBRE,
PrimerMonto = (decimal)item.MONTO
};
listaTarjetas.Add(asignar);
}
}
return View(listaTarjetas);
}
```
| null | CC BY-SA 4.0 | null | 2023-01-24T16:32:51.270 | 2023-01-24T16:32:51.270 | null | null | 20,757,668 | null |
75,224,501 | 2 | null | 75,224,062 | 0 | null | You can use `updateDoc()` function to update an existing document and `arrayUnion()` to insert a new value in an array field. Try:
```
const createComment = async (author, authorId, comment) => {
const docRef = doc(db, "posts", id);
await updateDoc(docRef, {
regions: arrayUnion(comment)
});
};
```
Checkout the [documentation](https://firebase.google.com/docs/firestore/manage-data/add-data#update_elements_in_an_array) for more information.
---
`arrayUnion()` will add the value only if it does not exist in the array already so if multiple users try to add same comment, it'll not work with array of strings. You might have to store an object containing `userId` e.g. `{ comment: "test", userId: "1324" }`.
| null | CC BY-SA 4.0 | null | 2023-01-24T16:34:02.690 | 2023-01-24T16:34:02.690 | null | null | 13,130,697 | null |
75,224,629 | 2 | null | 75,221,394 | 0 | null | It doesn't look like Word can find a character/paragraph style embedded in a paragraph. i.e if I have a paragraph of text in Heading 1 style and I format a word of that heading as Body Text 3 (a combined character/paragraph style) with italic attribute added, I can see that the word is italic but the Bofy Text 3 style can't be found.
However Word can find one or more font attributes for the 'Body Text 3' style, specifically in this case the italic text.
The following code may be of help
```
Option Explicit
Sub test()
' Body Text 3 has also had the italic formatting added to the style.
CountStyleInHeadings ("Body Text 3")
End Sub
Public Function CountStyleInHeadings(ByVal ipStylename As String) As Variant
Dim myCounts As Variant
ReDim myCounts(1 To 9)
Dim myPara As Variant
For Each myPara In ActiveDocument.StoryRanges(wdMainTextStory).Paragraphs
Dim myRange As Range
Set myRange = myPara.Range
myRange.Select
If myPara.OutlineLevel <> wdOutlineLevelBodyText Then
If StyleNameFound(myRange, ipStylename) Then
myCounts(myPara.OutlineLevel) = myCounts(myPara.OutlineLevel) + 1
End If
End If
Next
End Function
Public Function StyleNameFound(ByRef ipParagraph As Range, ByRef ipStylename As String)
Debug.Print ipParagraph.Text
Debug.Print ipStylename
With ipParagraph.Find
.ClearFormatting
.Font.Italic = True
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
Debug.Print ipParagraph.Find.Found
StyleNameFound = ipParagraph.Find.Found
End Function
```
| null | CC BY-SA 4.0 | null | 2023-01-24T16:45:43.993 | 2023-01-24T16:45:43.993 | null | null | 7,177,346 | null |
75,224,742 | 2 | null | 75,224,354 | -3 | null | Check to see if you are running in debug mode or release mode.
| null | CC BY-SA 4.0 | null | 2023-01-24T16:55:58.900 | 2023-01-24T16:55:58.900 | null | null | 4,660,945 | null |
75,224,885 | 2 | null | 70,505,085 | 2 | null | Linux: locate .irbrc file. If there is no .irbrc file - create one in your home folder - type the following command into terminal:
```
echo "IRB.conf[:CONTEXT_MODE] = 0" >> ~/.irbrc
```
Windows: locate .irbrc folder
C:\Users\Ben\ .irbrc
Then to disable autocomplete add this line to .irbrc file:
```
IRB.conf[:USE_AUTOCOMPLETE] = false
```
| null | CC BY-SA 4.0 | null | 2023-01-24T17:07:33.150 | 2023-02-05T21:48:08.403 | 2023-02-05T21:48:08.403 | 20,858,249 | 20,858,249 | null |
75,224,920 | 2 | null | 75,199,890 | 0 | null | You can't mint 300 NFTs at once because of gas Limit of blocks, check this link for the limit of ethereum
[https://ethereum.org/en/developers/docs/gas/](https://ethereum.org/en/developers/docs/gas/)
`Block limit of 30 million gas for ethereum.`
Try minting less NFTs like 100 NFTs per transaction and you must send 3 tranasction for minting 300 NFTs.
| null | CC BY-SA 4.0 | null | 2023-01-24T17:10:31.367 | 2023-01-24T17:10:31.367 | null | null | 2,284,078 | null |
75,224,934 | 2 | null | 75,157,115 | 0 | null | try increasing the delay time to 5000
```
new Handler().postDelayed(() -> {
ActivityCompat.startActivity(MainActivity.this, intent,
activityOptions.toBundle());
}, 5000);
```
or try to delay the turning off of the screen until after the transition is complete by using setExitSharedElementCallback()
method to set a callback that is triggered when the shared element transition is finished, and use this callback to turn off the screen.
| null | CC BY-SA 4.0 | null | 2023-01-24T17:11:39.803 | 2023-01-24T17:11:39.803 | null | null | 6,634,545 | null |
75,225,011 | 2 | null | 75,224,270 | 0 | null | Define a range for the results and offset it by the number of rows returned.
```
Option Explicit
Sub DCPARAMS()
Const WBNAME = "SSDF MACRO.xlsm"
Dim DBcon As ADODB.Connection, DBrs As ADODB.Recordset
Dim SSDF_SSDF As Workbook, wsResult As Worksheet, wsQuery As Worksheet
Dim rngResult As Range
Dim ConString As String, SQL_query As String
Dim User As String, Password As String
Dim intColIndex As Long, lastrow As Long, r As Long
Application.ScreenUpdating = False
Windows("SSDF MACRO.xlsm").Activate
Set SSDF_SSDF = Workbooks(WBNAME)
With SSDF_SSDF
Set wsResult = .Sheets("RESULT")
Set wsQuery = .Sheets("Query")
End With
'error handling
On Error GoTo err
' connect to db
With SSDF_SSDF.Sheets("MACROS")
User = .Range("B4").Value
Password = .Range("B5").Value
If User = "" Or Password = "" Then
MsgBox "Please fill in your user ID and password", vbCritical
Exit Sub
End If
End With
ConString = "Driver={Oracle in OraClient12Home1_32bit};Dbq=prismastand.world;" & _
"Uid=" & User & ";Pwd=" & Password & ";"
Set DBcon = New ADODB.Connection
DBcon.Open ConString 'Connecion to DB is made
Set DBrs = New ADODB.Recordset
DBrs.CursorType = adOpenDynamic
DBrs.CursorLocation = adUseClient
' delete old results
With wsResult
.Range("A:Q").ClearContents
Set rngResult = .Range("A2")
End With
With wsQuery
lastrow = .Cells(.Rows.Count, "C").End(xlUp).Row
For r = 2 To lastrow
'I WANT THIS VALUE TO CHANGE BASED ON QUERY SHEETS COLUMN C
SQL_query = .Cells(r, "C")
'below statement will execute the query and stores the Records in DBrs
DBrs.Open SQL_query, DBcon
If Not DBrs.EOF Then 'to check if any record then
'Above statement puts the data only but no column
'name. hence the below for loop will put all the
'column names in your excel sheet.
If wsResult.Cells(1, 1) = "" Then
For intColIndex = 0 To DBrs.Fields.Count - 1
wsResult.Cells(1, intColIndex + 1) = DBrs.Fields(intColIndex).Name
Next
End If
' Spread all the records with all the columns
' in your sheet from Cell A2 onward.
rngResult.CopyFromRecordset DBrs
' move down for next query
Set rngResult = rngResult.Offset(DBrs.RecordCount)
End If
DBrs.Close
Next
End With
'Close the connection
DBcon.Close
'Informing user
If wsResult.Range("A2").Value <> "" Then
MsgBox "ALL GOOD, RUN NEXT MACRO", vbInformation, "Rows = " & rngResult.Row - 2
Else:
MsgBox "DATA IS MISSING IN DB PLEASE CHECK", vbCritical
Exit Sub
End If
SSDF_SSDF.Activate
SSDF_SSDF.Sheets("dc").Select
Application.ScreenUpdating = True
Exit Sub
err:
MsgBox "Following Error Occurred: " & vbNewLine & err.Description
DBcon.Close
'alerts
Application.ScreenUpdating = True
End Sub
```
| null | CC BY-SA 4.0 | null | 2023-01-24T17:19:22.643 | 2023-01-24T17:26:16.697 | 2023-01-24T17:26:16.697 | 12,704,593 | 12,704,593 | null |
75,225,399 | 2 | null | 75,072,469 | 0 | null | This one took me a while to figure out when I was editing my own icons, but it's easy to change! For this particular theme, there are two Twitter code bits you'll want to change under Layout.
So to switch the icons associated with the Twitter link, you'll want to take out this SVG code on or around lines 147 and 252 (depending on if you've implemented more code) of your Layout:
```
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.61 1.798-1.574 2.165-2.724-.95.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.18 0-5.515 2.966-4.797 6.045C7.727 8.088 4.1 6.128 1.67 3.15.38 5.36 1.003 8.256 3.195 9.722c-.806-.026-1.566-.247-2.23-.616-.053 2.28 1.582 4.415 3.95 4.89-.693.188-1.452.232-2.224.084.626 1.957 2.444 3.38 4.6 3.42-2.07 1.623-4.678 2.348-7.29 2.04 2.18 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.72 13.995-14.646.962-.695 1.797-1.562 2.457-2.55z"/></svg>
```
Be sure to leave the < a > tags around them! Now, you'll want to replace those SVG code bits with the following in both places, to which I used a free envelope icon from Font Awesome:
```
<svg height="24" width="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"/></svg>
```
This should get you the results you're wanting with that envelope on both desktop and mobile. :) Let me know if this works for you!
| null | CC BY-SA 4.0 | null | 2023-01-24T17:54:46.810 | 2023-01-24T19:23:18.040 | 2023-01-24T19:23:18.040 | 14,553,488 | 14,553,488 | null |
75,225,881 | 2 | null | 75,225,856 | -1 | null | Try using the var.strip() function, it gets rid of spaces on both sides
| null | CC BY-SA 4.0 | null | 2023-01-24T18:41:00.240 | 2023-01-24T18:41:00.240 | null | null | 17,596,624 | null |
75,225,938 | 2 | null | 75,225,856 | 0 | null | Your text appears to include carriage return characters.
Printing `*items` only adds the spaces elements, not the carriage returns, or a space before the first item.
Assuming you want those carriage returns, just add a space to the print statement (to add a space before the first element too), or use `join` to avoid adding the spaces between elements.
```
print(''.join(items)) # no spaces
```
Or...
```
print('', *items) # consistent single spaces
```
Or...
```
print(' ', ' '.join(items)) # consist double spaces
```
| null | CC BY-SA 4.0 | null | 2023-01-24T18:47:28.890 | 2023-01-24T18:47:28.890 | null | null | 53,341 | null |
75,225,958 | 2 | null | 74,538,505 | 0 | null | If your goal is just to de-clutter the bar, this might help.
In the Test Explorer tab, click on the three dots on the right side:
[](https://i.stack.imgur.com/jO41r.png)
From there, choose "View as List" at the bottom:
[](https://i.stack.imgur.com/je6YH.png)
| null | CC BY-SA 4.0 | null | 2023-01-24T18:49:54.847 | 2023-01-24T18:49:54.847 | null | null | 1,701,155 | null |
75,225,996 | 2 | null | 73,216,278 | 1 | null | You can create a custom box shadow like this:
```
class CustomBoxShadow extends BoxShadow {
final BlurStyle blurStyle;
const CustomBoxShadow({
super.color,
super.offset,
super.blurRadius,
this.blurStyle = BlurStyle.normal,
});
@override
Paint toPaint() {
final Paint result = Paint()
..color = color
..maskFilter = MaskFilter.blur(blurStyle, blurSigma);
assert(() {
if (debugDisableShadows) {
result.maskFilter = null;
}
return true;
}());
return result;
}
}
```
and then use it like this:
```
CustomBoxShadow(
blurRadius: 10,
color: Colors.white.withOpacity(.3),
offset: const Offset(0, 5),
blurStyle: BlurStyle.outer, //<--- this will give shadow outwards
),
```
| null | CC BY-SA 4.0 | null | 2023-01-24T18:53:16.117 | 2023-01-24T18:53:16.117 | null | null | 7,671,919 | null |
75,226,297 | 2 | null | 30,092,330 | 0 | null | if you dont have set `adjustPan` set in your activity in `AndroidManifest.xml` f.e you need `adjustResize` then this was the only solution which helped me with that white blank space
```
EditText.setOnFocusChangeListener { v, hasFocus ->
if (hasFocus) {
// something if needed
} else {
Utils.hideKeyboardToAdjustPan(activity)
}
}
fun hideKeyboardToAdjustPan(activity: Activity?) {
activity?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)
hideKeyboard(activity)
}
fun hideKeyboard(activity: Activity?) {
if (activity != null) {
hideKeyboard(activity.currentFocus)
}
}
fun hideKeyboard(view: View?) {
if (view != null) {
val inputManager = view.context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
inputManager.hideSoftInputFromWindow(
view.windowToken,
WindowManager.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED
)
}
}
```
| null | CC BY-SA 4.0 | null | 2023-01-24T19:24:51.877 | 2023-01-25T12:17:57.570 | 2023-01-25T12:17:57.570 | 8,187,578 | 8,187,578 | null |
75,226,390 | 2 | null | 75,215,820 | 1 | null | A global menu is a compromise between a client application and a server application, where both must previously agree on what a menu is and how it can be represented in a serialized way.
In Linux, as it is not difficult to guess, there is no single convention for handling the information of a global menu, although luckily there are only two protocols currently that can be used. One of the protocols is implemented by the Qt toolkit and the other by the Gtk toolkit.
Both use DBus as a means of communication between the applications, but the protocols are not at all the same and both are dynamic, so both require update cycles every time the menu changes in the client application.
I think the most notable thing is that Qt's protocol uses menu item identifiers, while Gtk's doesn't, so with Qt's implementation, you can reuse some menu items from one update cycle to the next, whereas with the Gtk implementation, even if the items will not change, you are required to recreate them.
Actually, you can have a Qt application and use the Gtk protocol or you can have a Gtk application and use the Qt protocol. But this is only possible if you use the protocol in its most basic and primitive form, because as is to be expected then the toolkits create abstraction layers on top of the basic protocol, to simplify the work for the user and then if you intend to use these layers of abstraction, because if you need to define once and for all what your toolkit is, which you have not done in your question.
Both protocols can be decomposed into two basic tasks, the first task is to implement a menu provider (DBus) service from the client application (or relying on the client application's toolkit, if it already has one) and the second part consists of in informing to the server application (the one that consumes the global menu) where the service that provides the menu is.
Since the server application is by default the windows manager, the protocols for each window to share the location of its menu service can go from another DBUS service where each client registers its menu, to passing the path of where the service is to the windows manager directly.
Here the matter is complicated again because the protocols for X11 are based on the `xid` of each window, while in Wayland there is no standard way to pass the menu data and for example in Gtk, you have to directly call a function of the window manager. That from the GDK backend ([https://gitlab.gnome.org/rmader/gtk/-/blob/16ac1a12fc93000124050bc4ee56a10374865d14/gdk/wayland/gdkwindow-wayland.c#L5016](https://gitlab.gnome.org/rmader/gtk/-/blob/16ac1a12fc93000124050bc4ee56a10374865d14/gdk/wayland/gdkwindow-wayland.c#L5016)).
I am only going to mention then the case of Qt, in which an external interface to the window manager is used where the applications register their menu. This DBus service is that of `com.canonical.AppMenu.Registrar`: [https://github.com/KDE/appmenu-runner/blob/master/src/com.canonical.AppMenu.Registrar.xml](https://github.com/KDE/appmenu-runner/blob/master/src/com.canonical.AppMenu.Registrar.xml) An example of a service implementation can be found here:
[https://github.com/SeptemberHX/dde-globalmenu-service](https://github.com/SeptemberHX/dde-globalmenu-service)
Regarding the two menu services:
For Gtk you can check:
[https://wiki.gnome.org/Projects/GLib/GApplication/DBusAPI](https://wiki.gnome.org/Projects/GLib/GApplication/DBusAPI)
[https://developer-old.gnome.org/gio/stable/gio-GMenuModel-exporter.html](https://developer-old.gnome.org/gio/stable/gio-GMenuModel-exporter.html)
For Qt you can check:
[https://lazka.github.io/pgi-docs/Dbusmenu-0.4/index.html](https://lazka.github.io/pgi-docs/Dbusmenu-0.4/index.html)
Here is much more information that can be consulted:
[https://hellosystem.github.io/docs/developer/menu.html](https://hellosystem.github.io/docs/developer/menu.html)
Here is also an example of how to get the menu bar exported in a gtk application:
[https://developer-old.gnome.org/gtk4/stable/GtkApplicationWindow.html](https://developer-old.gnome.org/gtk4/stable/GtkApplicationWindow.html)
Unfortunately, in Linux few developers have tried to provide the global menu themselves, which implies that to have a global menu what has been done is to hack the applications with techniques similar to this one: [https://linuxhint.com/what-is-ld-library-path/](https://linuxhint.com/what-is-ld-library-path/) and insert the code into it to convert the window widget menu into a serialized menu which is then can be exported to DBus using the mentioned techniques.
The good part of all this is that in theory you don't have to do anything weird to export the menu, because in theory you only have to provide a menu bar and the modules that have been made to hack the applications and export the menu will take care of everything else.
Examples of modules:
- [https://launchpad.net/ubuntu/+source/unity-gtk-module](https://launchpad.net/ubuntu/+source/unity-gtk-module)- [https://gitlab.com/vala-panel-project/vala-panel-appmenu/-/tree/master/subprojects/appmenu-gtk-module](https://gitlab.com/vala-panel-project/vala-panel-appmenu/-/tree/master/subprojects/appmenu-gtk-module)- [https://code.google.com/archive/p/java-swing-ayatana/](https://code.google.com/archive/p/java-swing-ayatana/)
Some other modules have already been integrated into the toolkit: [https://codereview.qt-project.org/c/qt/qtbase/+/146234/](https://codereview.qt-project.org/c/qt/qtbase/+/146234/)
| null | CC BY-SA 4.0 | null | 2023-01-24T19:33:59.233 | 2023-01-31T07:17:33.880 | 2023-01-31T07:17:33.880 | 4,893,986 | 4,893,986 | null |
75,226,547 | 2 | null | 75,225,884 | 0 | null | I can resize just fine using the lower right corner sash to change the window.
[](https://i.stack.imgur.com/WdPTw.png)
An alternative that always works with windows forms is the Tab key as that'll navigate you to the items, even if they're offscreen.
At one point, VS seemed to have rendering issues with the adjust visual experience checkbox and the consensus a decade back was to uncheck that if it was acting "weird." It's been some time since I've had to fiddle with that setting though so the issue seems to have been resolved.
[](https://i.stack.imgur.com/f88t5.png)
That's VS 2017 in my screenshots. The corner sash exists on VS 2015 as well. Beyond that, I'd need to go to archives or install current VS editions to explore. As to simulating the drop down arrow selector, holding left Alt key down and hitting the down arrow brings up those selectors.
I think I managed to navigate the entire sequence of adding a configuration without using a mouse in my little video here (although I tried really hard at the end).
[](https://i.stack.imgur.com/jWGhj.gif)
| null | CC BY-SA 4.0 | null | 2023-01-24T19:47:47.500 | 2023-01-26T01:52:53.840 | 2023-01-26T01:52:53.840 | 181,965 | 181,965 | null |
75,226,897 | 2 | null | 75,226,354 | 0 | null | I figured it out! I was asking quarto to render massive dataframes - the issue went away after I put .head() after each data frame
| null | CC BY-SA 4.0 | null | 2023-01-24T20:22:33.967 | 2023-01-24T20:22:33.967 | null | null | 21,075,224 | null |
75,226,930 | 2 | null | 75,226,409 | 0 | null | Open the Terminal view, press the icon to add a new terminal, select a directory to use. Once you have multiple terminal sessions, you'll see that sidebar menu listing them. Click and drag one into whatever area you wish it to occupy.
Alternatively, you can look at using a [terminal multiplexer](https://en.wikipedia.org/wiki/Terminal_multiplexer), but that's not what's being used in the screenshot you show.
| null | CC BY-SA 4.0 | null | 2023-01-24T20:25:56.933 | 2023-01-24T20:25:56.933 | null | null | 11,107,541 | null |
75,227,013 | 2 | null | 72,618,881 | 0 | null | Without any consideration for the inputs (that is left to the author) the code below stores the 4-th previous values in variable `u_0`, `u_1`, `u_2`, and `u_3`, and the current value in `u`.
Then in a loop in updates all the values. The loop is repeated `n-3` times because to get `n=4` you need at least one iteration.
```
static class Program
{
static void Main(string[] args)
{
int n = 8;
Console.WriteLine($"n={n}");
int u_3 = 2, u_2 = -1, u_1=1, u_0=0;
int u = 0;
Console.WriteLine($"u_{0} = {u_0}");
Console.WriteLine($"u_{1} = {u_1}");
Console.WriteLine($"u_{2} = {u_2}");
Console.WriteLine($"u_{3} = {u_3}");
for (int i = 0; i < n-3; i++)
{
// (-1)^(i+4) is 1 when i+4 is even, and -1 otherwise.
int sign = (i + 4) % 2 == 0 ? 1 : -1;
u = 2 * u_0 - 3 * u_1 + sign * u_2 + 2 * u_3;
Console.WriteLine($"u_{i+4} = {u}");
u_0 = u_1;
u_1 = u_2;
u_2 = u_3;
u_3 = u;
}
}
}
```
Output is
```
n=8
u_0 = 0
u_1 = 1
u_2 = -1
u_3 = 2
u_4 = 0
u_5 = 3
u_6 = -2
u_7 = -3
u_8 = -17
```
| null | CC BY-SA 4.0 | null | 2023-01-24T20:34:48.113 | 2023-01-24T20:34:48.113 | null | null | 380,384 | null |
75,227,067 | 2 | null | 23,429,117 | 0 | null | To save a given NLTK tree to an image file (OS-agnostic), I recommend the [Constituent-Treelib](https://github.com/Halvani/Constituent-Treelib) library, which builds on benepar, spaCy and NLTK. First, install it via `pip install constituent-treelib`
Then, perform the following steps:
```
from nltk import Tree
from constituent_treelib import ConstituentTree
# Define your sentence that should be parsed and saved to a file
sentence = "At least nine tenths of the students passed."
# Rather than a raw string you can also provide an already constructed NLTK tree
sentence = Tree('S', [Tree('NP', [Tree('NP', [Tree('QP', [Tree('ADVP', [Tree('RB', ['At']), Tree('RBS', ['least'])]), Tree('CD', ['nine'])]), Tree('NNS', ['tenths'])]), Tree('PP', [Tree('IN', ['of']), Tree('NP', [Tree('DT', ['the']), Tree('NNS', ['students'])])])]), Tree('VP', [Tree('VBD', ['passed'])]), Tree('.', ['.'])])
# Define the language that should be considered with respect to the underlying benepar and spaCy models
language = ConstituentTree.Language.English
# You can also specify the desired model for the language ("Small" is selected by default)
spacy_model_size = ConstituentTree.SpacyModelSize.Large
# Create the neccesary NLP pipeline (required to instantiate a ConstituentTree object)
nlp = ConstituentTree.create_pipeline(language, spacy_model_size)
# In case you haven't downloaded the required benepar an spaCy models, you can tell the method to do it automatically for you
# nlp = ConstituentTree.create_pipeline(language, spacy_model_size, download_models=True)
# Instantiate a ConstituentTree object and pass it the sentence as well as the NLP pipeline
tree = ConstituentTree(sentence, nlp)
# Now you can export the tree to a file (e.g., a PDF)
tree.export_tree("NLTK_parse_tree.pdf", verbose=True)
>>> PDF-file successfully saved to: NLTK_parse_tree.pdf
```
Result...
[](https://i.stack.imgur.com/B6iTG.png)
| null | CC BY-SA 4.0 | null | 2023-01-24T20:40:58.237 | 2023-01-24T20:40:58.237 | null | null | 4,293,361 | null |
75,227,186 | 2 | null | 75,224,980 | 0 | null | I would structure program and divide the problem into following functions:
1. read user-input (day-time like 18:15) as string
2. convert time-string into hours as float (e.g. 18.25 for 18:15)
3. return meal-time name for given time (or hours float)
```
# 1. Example: return a valid ISO-time in format HH:MM or show error and ask again
def ask_for_time():
# your code using input, a prompt and maybe validation
return '18:15'
# 2. Example: from local ISO-time format `18:15` to hours incl. fractions `18.25`
def parse_to_hours(iso_time):
# your code using strip, split, type-conversion and calculations
# or use datetime.strptime(date_string, format)
return 18.25
# 3. Example: 'dinner time' for '18:15'
def mealtime_for(iso_time):
hours = parse_to_hours(iso_time)
# conditional returns
if hours >= 18 and hours <= 19:
return 'dinner time'
# default
return 'outside meal-time'
```
### Tests
This way each function can be tested. For example using [doctest](https://docs.pytest.org/en/7.2.x/how-to/doctest.html):
```
def meal_time_for(hours):
"""a doctest in a docstring
>>> meal_time_for(1)
outside meal-time
>>> meal_time_for(18)
dinner time
>>> meal_time_for(12.75)
lunch time
"""
# implementation starts here
```
### Assemble
If all test-cases have been passed, then the assembled script should work correctly.
```
if __name__ == "__main__":
iso_time = ask_for_time()
meal_time = meal_time_for(iso_time)
print(f"{iso_time} is {meal_time}")
```
See also:
- [datetime — Basic date and time types — Python 3.11.1 documentation](https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior)- [ISO 8601 - Wikipedia](https://en.wikipedia.org/wiki/ISO_8601#Local_time_(unqualified))
| null | CC BY-SA 4.0 | null | 2023-01-24T20:53:42.620 | 2023-01-24T20:53:42.620 | null | null | 5,730,279 | null |
75,227,830 | 2 | null | 49,095,692 | 0 | null | Install "System setup" of VSCode instead of "User setup".
| null | CC BY-SA 4.0 | null | 2023-01-24T22:15:13.687 | 2023-01-24T22:15:13.687 | null | null | 21,076,075 | null |
75,228,028 | 2 | null | 75,227,946 | 1 | null | To get a separate legend you have to map on the `linetype` aesthetic instead of setting the linetype as an argument:
```
library(ggplot2)
ggplot(data = betas_df, aes(x = Beta_Type, y = Estimates)) +
geom_boxplot(aes(col = as.factor(Beta_Type))) +
facet_grid(rows = vars(Type_A), cols = vars(Type_B)) +
geom_segment(
aes(
x = x_start,
xend = x_end,
y = True_Value,
yend = True_Value,
linetype = "true"
),
col = "black",
) +
scale_linetype_manual(values = "dashed", labels = "True_Value") +
scale_color_manual(
name = "Symbols",
values = c(
"b1" = "#F8766D", "b2" =
"#00BFC4"
),
labels = c(
expression(beta[1]),
expression(beta[2])
)
) +
scale_x_discrete(labels = c(
"b1" = expression(beta[1]),
"b2" = expression(beta[2])
)) +
ggtitle("Estimated Beta Coefficients") +
xlab("Beta Type") +
ylab("Coefficient")
```
[](https://i.stack.imgur.com/XmBIg.png)
| null | CC BY-SA 4.0 | null | 2023-01-24T22:41:42.647 | 2023-01-24T22:41:42.647 | null | null | 12,993,861 | null |
75,228,069 | 2 | null | 75,219,994 | 0 | null | You need to specify the foreign key (preferably always) and the principal key (if it is different to the primary key).
In order to use a principal key other than Primary Key, you need to create a UNIQUE Constraint. In EF you can do this by specifying HasIndex and IsUnique, otherwise you will get an error because the selected principal key is not a unique column.
See this example:
```
//HaweyTajer is the principal table
modelbuilder.Entity<HaweyTajer>(entity =>
{
//Mark the primary key
entity.HasKey(x => x.Id);
//Build the relation (Consider adding OnDelete())
entity.HasMany(x => x.Certivicates)
.WithOne(x => x.HaweyTaker)
.HasPrincipalKey(x => x.AZbaraNum)
.HasForeignKey(x => x.AZbaraNum);
//Build the index on the column inside the principal table
entity.HasIndex(x => x.AZbaraNum)
.IsUnique();
});
```
You might as well change the column type to not nvarchar(250) not null or add a filter to the index with HasFilter().
Reference: [https://learn.microsoft.com/en-us/ef/ef6/modeling/code-first/fluent/relationships](https://learn.microsoft.com/en-us/ef/ef6/modeling/code-first/fluent/relationships)
Hope this helps.
| null | CC BY-SA 4.0 | null | 2023-01-24T22:48:02.553 | 2023-01-24T22:48:02.553 | null | null | 3,788,695 | null |
75,228,068 | 2 | null | 75,172,489 | 0 | null | After fixing the incomplete line:
```
print("Numb
```
and changing the case on the incorrect line:
```
Import math
```
this code runs fine on my Mac OS (Unix) system. Below is my rework of your code to simplify it so I could see everything that was going on. See if it works any better for you:
```
from turtle import Screen, Turtle
from math import pi
# 'FACTOR' signifies the multiplicative factor
# which expands or shrinks the scale of the plot:
FACTOR = 2
def fiboPlot(n):
a, b = 0, 1
# Setting the colour of the plotting pen to blue
turtle.pencolor('blue')
# Drawing the first square
for _ in range(4):
turtle.forward(b * FACTOR)
turtle.left(90)
turtle.right(90)
# Drawing the rest of the squares
for _ in range(n - 1):
# Proceeding in the Fibonacci Series
a, b = b, b + a
turtle.backward(a * FACTOR)
turtle.right(90)
turtle.forward(b * FACTOR)
turtle.left(90)
turtle.forward(b * FACTOR)
turtle.left(90)
turtle.forward(b * FACTOR)
# Bringing the pen to starting point of the spiral plot
turtle.penup()
turtle.setposition(FACTOR, 0)
turtle.setheading(90)
turtle.pendown()
# Setting the colour of the plotting pen to red
turtle.pencolor('red')
a, b = 0, 1
# Fibonacci Spiral Plot
for _ in range(n):
print(b)
distance = pi * b * FACTOR / 180
for _ in range(90):
turtle.forward(distance)
turtle.left(1)
a, b = b, b + a
# Input the number of iterations our algorithm will run:
n = int(input('Enter the number of iterations (must be > 1): '))
# Plot the fibonacci spiral fractal and
# print the corresponding fibonacci number:
if n > 0:
print("Fibonacci series for", n, "elements:")
screen = Screen()
turtle = Turtle()
turtle.speed('fastest')
fiboPlot(n)
screen.mainloop()
else:
print("Number something or other")
```
| null | CC BY-SA 4.0 | null | 2023-01-24T22:47:57.827 | 2023-01-24T22:47:57.827 | null | null | 5,771,269 | null |
75,228,092 | 2 | null | 75,221,394 | 0 | null | Here's some code to get you started. It returns the heading level, heading text & bullet text for each paragraph in the 'Bullet' style.
```
Sub GetBulletHeadings()
Application.ScreenUpdating = False
Dim RngHd As Range
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = ""
.Style = "Bullet"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.MatchWildcards = False
End With
Do While .Find.Execute
Set RngHd = .Paragraphs(1).Range.GoTo(What:=wdGoToBookmark, Name:="\HeadingLevel")
MsgBox Right(RngHd.Paragraphs.First.Range.Style, 1) & vbCr & RngHd.Paragraphs.First.Range.Text & vbCr & .Text
.Collapse wdCollapseEnd
Loop
End With
Set RngHd = Nothing
Application.ScreenUpdating = True
End Sub
```
| null | CC BY-SA 4.0 | null | 2023-01-24T22:51:30.130 | 2023-01-24T22:51:30.130 | null | null | 9,170,274 | null |
75,228,196 | 2 | null | 63,907,191 | 0 | null | Old question, but interesting. And it's possible to make the form DPI aware without a dummy WPF window. The following example uses [SetProcessDPIAware](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setprocessdpiaware?WT.mc_id=DT-MVP-5003235) to make the form DPI aware:
```
using assembly System.Windows.Forms
using namespace System.Windows.Forms
using namespace System.Drawing
#Enable visual styles
[Application]::EnableVisualStyles()
#Enable DPI awareness
$code = @"
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern bool SetProcessDPIAware();
"@
$Win32Helpers = Add-Type -MemberDefinition $code -Name "Win32Helpers" -PassThru
$null = $Win32Helpers::SetProcessDPIAware()
$form = [Form] @{
ClientSize = [Point]::new(300, 80);
StartPosition = "CenterScreen";
Text = "Test";
AutoScaleDimensions = [SizeF]::new(6, 13);
AutoScaleMode = [AutoScaleMode]::Font;
}
$label = [Label] @{
Text = "Hello, world!";
AutoSize = $true;
Location = [Point]::new(8,8)
}
$form.Controls.Add($label)
$null = $form.ShowDialog()
$form.Dispose()
```
You can see the difference, with SetProcessDPIAware:
[](https://i.stack.imgur.com/nkX8e.png)
Without SetProcessDPIAware:
[](https://i.stack.imgur.com/A9Wz2.png)
| null | CC BY-SA 4.0 | null | 2023-01-24T23:06:18.753 | 2023-01-24T23:06:18.753 | null | null | 3,110,834 | null |
75,228,669 | 2 | null | 13,744,171 | 1 | null | I'm sure the OP has long forgotten this question, but I recently spent the entire afternoon trying to answer this and thought I'd share my result in case in helps anybody else!
The approach which I found to work was a combination of the original post plus the previous answers. Specifically, it is necessary to perform TWO rounds of fftshift/ifftshift; one in real space and another in Fourier space.
The full process is shown here diagramatically:
[](https://i.stack.imgur.com/ZKc81.png)
The code to replicate this is:
```
im = plt.imread(fpath) # this example has shape (1000,1000)
# Pad array such that image is twice the original size
# to avoid Fourier wraparound artefact
impad = np.pad(im,(500,500))
# Apply fftshift in real space before fft2 (!)
fft = np.fft.fftshift(impad)
# Do the regular fft --> fftshift --> rotate --> ifftshift --> ifft2
fft = np.fft.fft2(fft)
fft = np.fft.fftshift(fft)
fft = ndimage.rotate(fft,30.7,reshape=False)
fft = np.fft.ifftshift(fft)
out = np.fft.ifft2(fft)
# Apply ifftshift in real space after ifft2 (!)
out = np.fft.ifftshift(out)
# Crop back to original size
out=out[500:-500,500:-500]
# Take absolute value
im_rotated = abs(out)
```
We can see that the result is almost identical to applying the rotation in real space, with some noticable exception at the edges of the object:
[](https://i.stack.imgur.com/LABbg.png)
| null | CC BY-SA 4.0 | null | 2023-01-25T00:32:21.787 | 2023-01-25T00:32:21.787 | null | null | 5,195,850 | null |
75,228,834 | 2 | null | 75,228,259 | 1 | null | It is the database that is complaining. You need to update the Person table, setting the main address FK to Nil. Then you will be able to delete the record.
| null | CC BY-SA 4.0 | null | 2023-01-25T01:07:12.323 | 2023-01-25T01:07:12.323 | null | null | 3,467,488 | null |
75,228,843 | 2 | null | 44,886,057 | 0 | null | Tomas Sengel's method works easiest and simplest; HOWEVER...
Sometimes images in my collectionView wouldn't load (failed to the ELSE part of the if-let) even tho the model downloaded (from Firebase) the string of the url just fine.
The reason was , which the Apple method URL(string: ) doesn't handle properly (Apple should update it). To fix, either find/write a better method to convert strings to URL type, or replace spaces with %20. literally. " " -> "%20" and then URL(string: ) won't fail the guard condition.
| null | CC BY-SA 4.0 | null | 2023-01-25T01:09:01.280 | 2023-01-25T01:09:01.280 | null | null | 11,132,995 | null |
75,228,950 | 2 | null | 75,221,656 | 0 | null | You were adding active class to the parent div which is why whole div is turning green when you click on one emoji. One more thing was , when you click on one emoji then click on other both of them were getting green background color. Here is the solution .
```
const ratingElements = document.querySelectorAll(".ratings");
const images= document.getElementsByClassName("emoji-icon");
ratingElements.forEach((ratingElement) => {
ratingElement.addEventListener("click", (event) => {
for(image of images){
image.classList.remove("active");
}
event.target.classList.add("active")
});
});
```
```
.ratings__container {
display: flex;
padding: 20px 0;
gap: 5px;
background-color:aqua;
}
img
{
width:100px;
}
.ratings {
min-width: 100px;
cursor: pointer;
padding: 5px;
margin: 10px 5px;
}
.ratings:hover, .active{
background: darkseagreen;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
color: aliceblue;
transition: all 300ms ease;
}
```
```
<div class="container" id="container">
<h1 class="heading">Feedback UI</h1>
<div class="ratings__container" id="ratings__container">
<div class="ratings" aria-label="unhappy">
<img src="https://cdn.shopify.com/s/files/1/1061/1924/products/Happy_Emoji_Icon_5c9b7b25-b215-4457-922d-fef519a08b06_large.png?v=1571606090 alt="Unhappy" class="emoji-icon">
<small>Unhappy</small>
</div>
<div class="ratings" aria-label="neutral">
<img src="https://cdn.shopify.com/s/files/1/1061/1924/products/Happy_Emoji_Icon_5c9b7b25-b215-4457-922d-fef519a08b06_large.png?v=1571606090" alt="Neutral" class="emoji-icon">
<small>Neutral</small>
</div>
<div class="ratings" aria-label="happy">
<img src="https://cdn.shopify.com/s/files/1/1061/1924/products/Happy_Emoji_Icon_5c9b7b25-b215-4457-922d-fef519a08b06_large.png?v=1571606090" alt="Happy" class="emoji-icon">
<small>Happy</small>
</div>
</div>
<button class="btn">
Send Review
</button>
</div>
```
remove `event.target.parentNode.classList.add("active")` . Then select images using `getElementsByClassName()`(or whichever method you prefer) then remove class active for all of them . Then add class active to only one emoji .
| null | CC BY-SA 4.0 | null | 2023-01-25T01:36:08.157 | 2023-01-25T01:36:08.157 | null | null | 20,864,476 | null |
75,229,245 | 2 | null | 75,224,354 | 1 | null | I can reproduce your situation:
[](https://i.stack.imgur.com/OUNZP.png)
This issue comes from your code is not be recognized as Project/Solution.
C# is different from the language like python, open the script file directly will not make it be able to debug/run.
So the solution is creating a minimal structure.
You can follow the below steps to start a demo C# code.
[](https://i.stack.imgur.com/BNYec.png)
[](https://i.stack.imgur.com/nGxtz.png)
[](https://i.stack.imgur.com/mYN92.png)
[](https://i.stack.imgur.com/9k9i2.png)
After the above steps, you will be able to debug the C# code:
[](https://i.stack.imgur.com/85M5i.png)
| null | CC BY-SA 4.0 | null | 2023-01-25T02:42:53.293 | 2023-01-25T02:42:53.293 | null | null | 6,261,890 | null |
75,229,350 | 2 | null | 72,508,099 | 0 | null | I had the same issue. I found by adding the file name you are going to create in the url can solve the issue.
yourusername/new-file-name.html. (in main)
| null | CC BY-SA 4.0 | null | 2023-01-25T03:06:22.710 | 2023-01-25T03:06:22.710 | null | null | 1,166,240 | null |
75,229,543 | 2 | null | 75,228,810 | 1 | null | I saw an example of the [Agenda component on the repository](https://github.com/wix/react-native-calendars/#agenda) and figure out it has a prop called `theme`. In the `types.ts` file, you can see the theme interface and all properties. Follow a simple example:
```
<Agenda
// Agenda theme
theme={{
agendaKnobColor: '#768390',
calendarBackground: '#2d333b',
}}
/>
```
I created a [snack on Expo](https://snack.expo.dev/@marcelofreires/stackoverflow-questions-75228810?platform=web) for you to see the complete example on the computer with the source code. Or you scan the QR Code from your smartphone using the [Expo Go](https://expo.dev/client) app.
[](https://i.stack.imgur.com/xG2AL.png)
| null | CC BY-SA 4.0 | null | 2023-01-25T03:50:47.570 | 2023-01-25T03:50:47.570 | null | null | 11,299,656 | null |
75,229,629 | 2 | null | 75,215,061 | 0 | null | For some reason, Qt developers chose to return sizes that may result in odd numbers for the size hint of QToolButton.
To understand that, we need to remember that Qt uses QStyle for many aspects, including indirect size management: many widgets query the current [style()](https://doc.qt.io/qt-5/qstyle.html) of the widget in order to compute correct size requirements for their contents, by calling [styleFromContents()](https://doc.qt.io/qt-5/qstyle.html#sizeFromContents).
Almost all styles use a default [QCommonStyle](https://doc.qt.io/qt-5/qcommonstyle.html) as basis for many aspects, and here we have the first issue.
According to the sources, QCommonStyle does that when `sizeFromContents()` is called along with `CT_ToolButton`:
```
QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
const QSize &csz, const QWidget *widget) const
{
Q_D(const QCommonStyle);
QSize sz(csz);
switch (ct) {
# ...
case CT_ToolButton:
sz = QSize(sz.width() + 6, sz.height() + 5);
# ...
}
return sz;
}
```
As you can see, we already have a problem: assuming that the given `csz` is based on the icon size alone (which usually has even values, usually 16x16), we will get a final hint with an odd value for the height (eg. 22x21).
This happens even in styles that don't rely on QCommonStyle, which is the case of the "Windows" style:
```
case CT_ToolButton:
if (qstyleoption_cast<const QStyleOptionToolButton *>(opt))
return sz += QSize(7, 6);
```
Which seems partially consistent with your case, with the button border occupying 21 pixels: I suppose that the "missing" 2 pixels (16 + 7 = 23) are used as a margin, or for the "outset" border shown when the button is hovered.
Now, there are various possible solutions, depending on your needs.
## Subclass QToolButton
If you explicitly need to use QToolButton, you can use a subclass that will "correct" the size hint:
```
class ToolButton(QToolButton):
def sizeHint(self):
hint = super().sizeHint()
if hint.width() & 1:
hint.setWidth(hint.width() + 1)
if hint.height() & 1:
hint.setHeight(hint.height() + 1)
return hint
```
This is the simplest solution, but it only works for QToolButtons created in python: it will work for buttons of QToolBar.
You could even make it a default behavior without subclassing, with a little hack that uses some "monkey patching":
```
def toolButtonSizeHint(btn):
hint = btn.__sizeHint(btn)
if hint.width() & 1:
hint.setWidth(hint.width() + 1)
if hint.height() & 1:
hint.setHeight(hint.height() + 1)
return hint
QToolButton.__sizeHint = QToolButton.sizeHint
QToolButton.sizeHint = toolButtonSizeHint
```
Note that the above code be put as soon as possible in your script (possibly, in the main script, right after importing Qt), and should be used with care, as "monkey patching" using class methods may result in unexpected behavior, and may be difficult to debug.
## Use a proxy style
[QProxyStyle](https://doc.qt.io/qt-5/qproxystyle.html) works as an "intermediary" within the current style and a custom implementation, which potentially overrides the default "base style". You can create a QProxyStyle subclass and override `sizeFromContents()`:
```
class ToolButtonStyle(QProxyStyle):
def sizeFromContents(self, ct, opt, csz, w):
size = super().sizeFromContents(ct, opt, csz, w)
if ct == QStyle.CT_ToolButton:
w = size.width()
if w & 1:
size.setWidth(w + 1)
h = size.height()
if h & 1:
size.setHeight(h + 1)
return size
# ...
if __name__ == "__main__":
app = QApplication(sys.argv)
app.setStyle(ToolButtonStyle())
```
This has the benefit of working for any QToolButton, including those internally created for QToolBar. But it's not perfect:
- - `QApplication.setSheet()``toolbar.setStyle()`
## Subclass QToolBar and set minimum sizes
Another possibility is to subclass QToolBar and set a minimum size (based on their hints) for all QToolButton created for its actions. In order to do that, we need a small hack: access to functions (and overwriting virtuals) on objects created outside Python is not allowed, meaning that we cannot just try to "monkey patch" things like `sizeHint()` at runtime; the only solution is to react to `LayoutRequest` events and always set an explicit minimum size whenever the hint of the QToolButton linked to the action does not use even numbers for its values.
```
class ToolBar(QToolBar):
def event(self, event):
if event.type() == event.LayoutRequest:
for action in self.actions():
if not isinstance(action, QWidgetAction):
btn = self.widgetForAction(action)
hint = btn.sizeHint()
w = hint.width()
h = hint.height()
if w & 1 or h & 1:
if w & 1:
w += 1
if h & 1:
h += 1
btn.setMinimumSize(w, h)
else:
btn.setMinimumSize(0, 0)
return super().event(event)
```
This will work even if style sheets have effect on tool bars and QToolButtons. It will obviously have no effect for non-toolbar buttons, but you can still use the first solution above. In the rare case you explicitly set a minimum size on a tool button (not added using [addWidget()](https://doc.qt.io/qt-5/qtoolbar.html#addWidget), that size would be potentially reset.
## Final notes
- - `sizeFromContents()`- - `opt`- [Qt bug manager](https://bugreports.qt.io)
[linked post](https://stackoverflow.com/q/42005908/2001654)
| null | CC BY-SA 4.0 | null | 2023-01-25T04:13:36.207 | 2023-01-25T05:13:02.000 | 2023-01-25T05:13:02.000 | 2,001,654 | 2,001,654 | null |
75,229,717 | 2 | null | 24,922,913 | 0 | null | ```
((void(*)(id,SEL,id))objc_msgSend)(target, sel, newValue);
```
Change the code like above, after Xcode 12, simply setting Setting Enable strict checking of objc_msgSend Calls to NO does not help. modify the (id,SEL,id) for your need, for example(id,SEL) for two arguments, etc
| null | CC BY-SA 4.0 | null | 2023-01-25T04:34:11.053 | 2023-01-25T04:34:11.053 | null | null | 10,687,866 | null |
75,229,853 | 2 | null | 26,749,128 | 0 | null | ```
@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
```
Added `strategy`.
| null | CC BY-SA 4.0 | null | 2023-01-25T05:02:18.027 | 2023-01-25T10:10:18.660 | 2023-01-25T10:10:18.660 | 1,346,996 | 21,077,406 | null |
75,229,873 | 2 | null | 51,294,279 | 1 | null | You can get the column and the last column change date by using the following query for the `new projects`. This method is `not valid` for `classic projects` in GitHub.
```
query{
user(login: "USER_NAME") {
projectV2(number: 1) {
title
items(first: 100) {
pageInfo {
endCursor
hasNextPage
}
nodes {
content {
... on Issue {
id
title
url
state
repository {
name
owner {
login
}
}
}
}
status: fieldValueByName(name: "Status") {
... on ProjectV2ItemFieldSingleSelectValue {
column: name
updatedAt
}
}
}
}
}
}
}
```
The query was tested using [GitHub Explorer](https://docs.github.com/en/graphql/overview/explorer).
| null | CC BY-SA 4.0 | null | 2023-01-25T05:04:49.963 | 2023-01-30T13:57:40.670 | 2023-01-30T13:57:40.670 | 20,898,455 | 20,898,455 | null |
75,230,081 | 2 | null | 75,229,690 | 0 | null | I can't tell you exactly without seeing your source, so I'd recommend you edit that in, if possible.
Triple backticks ``` before and after a block of code will show it nicely with syntax highlighting!
For the actual question, though, here's my best guess as to what's going on, based on similar issues I've seen in the past:
```
<div class="container">
<div class="row">
<div class="col-6">
<div style="height: 250px" class="card m-2 bg-primary"></div>
</div>
<div class="col-6">
<div style="height: 100px" class="card m-2 bg-primary"></div>
</div>
<div class="col-6">
<div style="height: 60px" class="card m-2 bg-primary"></div>
</div>
<div class="col-6">
<div style="height: 200px" class="card m-2 bg-primary"></div>
</div>
</div>
</div>
```
As you may know, Bootstrap uses a "12-column" system for layouts.
Each row contains 12 equal "column-units", that can be divvied out between child columns.
In the above, I'm setting each column to be 6 "column-units" wide (col-6), which means they will each be half of the parent container's width.
That works fine for the first two, but the third won't fit, and needs to overflow.
When a row overflows, in some ways it acts as if you've created a second row to hold the overflow:
```
<div class="container">
<div class="row">
<div class="col-6">
<div style="height: 250px" class="card m-2 bg-primary"></div>
</div>
<div class="col-6">
<div style="height: 100px" class="card m-2 bg-primary"></div>
</div>
<!-- First row "ends" -->
<!-- Second row "begins" -->
<div class="col-6">
<div style="height: 60px" class="card m-2 bg-primary"></div>
</div>
<div class="col-6">
<div style="height: 200px" class="card m-2 bg-primary"></div>
</div>
</div>
</div>
```
To fix this, you only want one column element for each column you're showing, with all the children of that column inside it:
```
<div class="container">
<div class="row">
<div class="col-6">
<!-- All elements in the first column should be placed here -->
<div style="height: 250px" class="card m-2 bg-primary"></div>
<div style="height: 100px" class="card m-2 bg-primary"></div>
</div>
<div class="col-6">
<!-- All elements in the second column should be placed here -->
<div style="height: 60px" class="card m-2 bg-primary"></div>
<div style="height: 200px" class="card m-2 bg-primary"></div>
</div>
</div>
</div>
```
The examples above only have two columns, but I put together a simple example using four columns, which you can find [here.](https://www.codeply.com/p/KR2CKYzflI)
For further reading on the Bootstrap 4 grid system, you can see their documentation [here.](https://getbootstrap.com/docs/4.0/layout/grid/)
| null | CC BY-SA 4.0 | null | 2023-01-25T05:43:00.137 | 2023-01-25T05:43:00.137 | null | null | 21,077,295 | null |
75,230,801 | 2 | null | 75,230,573 | 0 | null | Here is an example how you can use flex in a row to have two seperate buttons next to each other. Hope this is what you are looking for.
```
Row(
children: <Widget> [
Expanded(
// with the flex you give the width
flex: 9,
child: Align(
alignment: Alignment.center,
child: ElevatedButton(
child: const Text('Configuration'),
onPressed: () {
},
//styling button
style: ElevatedButton.styleFrom(
),
),
)
),
Expanded(
// with the flex you give the width
flex: 9,
child: Align(
alignment: Alignment.center,
child: ElevatedButton(
child: const Text('Rack 3'),
onPressed: () {
},
// styling button
style: ElevatedButton.styleFrom(
),
),
)
)
]
),
```
| null | CC BY-SA 4.0 | null | 2023-01-25T07:27:30.667 | 2023-01-25T07:32:41.523 | 2023-01-25T07:32:41.523 | 16,624,473 | 16,624,473 | null |
75,230,901 | 2 | null | 74,884,488 | 0 | null | I figured it out. The problem is we need to add `ssr: false` in `nuxt.config.js`. Maybe SSR is true by default if we need to use server-side rendering but if we want the single file application we need to keep `ssr: false`. The above error is fixed with this.
```
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
ssr: false,
})
```
| null | CC BY-SA 4.0 | null | 2023-01-25T07:39:00.593 | 2023-01-25T07:39:00.593 | null | null | 20,439,560 | null |
75,231,047 | 2 | null | 75,231,033 | 0 | null | Define the `x` and `y`:
```
df.plot(x='Base.Time (s)', y='WE(1).Current (A)')
```
Or, define your time as index:
```
df.set_index('Base.Time (s)').plot()
```
| null | CC BY-SA 4.0 | null | 2023-01-25T07:55:09.167 | 2023-01-25T07:55:09.167 | null | null | 16,343,464 | null |
75,231,200 | 2 | null | 74,868,518 | 2 | null | With [Flutter 3.7](https://medium.com/flutter/whats-new-in-flutter-3-7-38cbea71133c) you can now create custom context menus anywhere in a Flutter app.
A `contextMenuBuilder` parameter has been added to many widgets (e.g. [TextField](https://master-api.flutter.dev/flutter/material/TextField/contextMenuBuilder.html), [CupertinoTextField](https://master-api.flutter.dev/flutter/cupertino/CupertinoTextField/contextMenuBuilder.html), [SelectionArea](https://master-api.flutter.dev/flutter/material/SelectionArea/contextMenuBuilder.html), etc.). You can return any widget you want from `contextMenuBuilder`, including modifying the default platform-adaptive context menu.
([source](https://github.com/flutter/samples/blob/main/experimental/context_menus/lib/email_button_page.dart))
```
TextField(
contextMenuBuilder: (context, editableTextState) {
final TextEditingValue value = editableTextState.textEditingValue;
final List<ContextMenuButtonItem> buttonItems = editableTextState.contextMenuButtonItems;
if (isValidEmail(value.selection.textInside(value.text))) {
buttonItems.insert(
0,
ContextMenuButtonItem(
label: 'Send email',
onPressed: () {
ContextMenuController.removeAny();
Navigator.of(context).push(_showDialog(context));
},
));
}
return AdaptiveTextSelectionToolbar.buttonItems(
anchors: editableTextState.contextMenuAnchors,
buttonItems: buttonItems,
);
},
)
```
This new feature works outside of text selection too by using [ContextMenuController](https://master-api.flutter.dev/flutter/widgets/ContextMenuController-class.html). You could, for example, create an Image widget that shows a Save button when right clicked or long pressed: ([source](https://github.com/flutter/samples/blob/main/experimental/context_menus/lib/email_button_page.dart))
[](https://i.stack.imgur.com/nHCXM.gif)
```
ContextMenuRegion(
contextMenuBuilder: (context, offset) {
return AdaptiveTextSelectionToolbar.buttonItems(
anchors: TextSelectionToolbarAnchors(
primaryAnchor: offset,
),
buttonItems: <ContextMenuButtonItem>[
ContextMenuButtonItem(
onPressed: () {
ContextMenuController.removeAny();
Navigator.of(context).push(_showDialog(context));
},
label: 'Save',
),
],
);
},
child: const SizedBox(
width: 200.0,
height: 200.0,
child: FlutterLogo(),
),
)
```
You can find more examples of custom context menus in:
- [https://github.com/flutter/samples/tree/main/experimental/context_menus](https://github.com/flutter/samples/tree/main/experimental/context_menus)
| null | CC BY-SA 4.0 | null | 2023-01-25T08:12:06.777 | 2023-01-25T08:12:06.777 | null | null | 6,305,235 | null |
75,231,242 | 2 | null | 57,145,904 | 2 | null | [Flutter 3.7](https://medium.com/flutter/whats-new-in-flutter-3-7-38cbea71133c) added two new widgets: [CupertinoListSection](https://api.flutter.dev/flutter/cupertino/CupertinoListSection-class.html) and [CupertinoListTile](https://api.flutter.dev/flutter/cupertino/CupertinoListTile-class.html) for showing a scrollable list of widgets in the iOS style.
[](https://i.stack.imgur.com/IinYR.png)
[](https://i.stack.imgur.com/tLPHU.png)
PR: [https://github.com/flutter/flutter/pull/78732](https://github.com/flutter/flutter/pull/78732)
| null | CC BY-SA 4.0 | null | 2023-01-25T08:18:27.807 | 2023-01-25T08:18:27.807 | null | null | 6,305,235 | null |
75,231,326 | 2 | null | 75,229,849 | 0 | null | Here are two solutions:
1 Set the Environment Variable Path for the folder where your RevitAPI is.
2 Add the following codes:
```
import sys
sys.path.append(r"C:\path\of\your\file")
```
| null | CC BY-SA 4.0 | null | 2023-01-25T08:28:06.060 | 2023-01-25T08:28:06.060 | null | null | 18,359,438 | null |
75,232,041 | 2 | null | 74,116,249 | 1 | null | You can also explore [https://www.npmjs.com/package/markdown-to-txt](https://www.npmjs.com/package/markdown-to-txt).
```
import markdownToTxt from 'markdown-to-txt';
markdownToTxt('Some *bold text*'); // "Some quoted"
```
| null | CC BY-SA 4.0 | null | 2023-01-25T09:39:29.010 | 2023-01-25T09:39:29.010 | null | null | 11,013,891 | null |
75,232,070 | 2 | null | 68,895,484 | 0 | null |
1. First you need to remove "Inner padding" from Scaffold : BottomBarNavTestTheme {
Scaffold(
...
) { _ -> // rename param to "_"
AnimatedNavHost(
navController = navController,
startDestination = Screen.Dashboard.route,
// modifier = Modifier.padding(innerPadding) delete this
modifier = Modifier
.systemBarsPadding() // add this if you app "edge-to-edge"
.navigationBarsPadding(), // add this if you app "edge-to-edge"
) {
composable(Screen.Dashboard.route) { DashboardScreen() }
composable(Screen.Map.route) { MapScreen { navController.navigate(Screen.Detail.route) } }
composable(Screen.Events.route) { EventsScreen() }
composable(Screen.Detail.route) { MapDetailScreen() }
}
}
}
2. Add this annotaion where you use Scaffold (for example, in main activity) : @SuppressLint("UnusedMaterial3ScaffoldPaddingParameter")
class YourActivity() : FragmentActivity()
3. Since we have removed innerPadding from Scaffold (which automatically added padding for the top and bottom bars (if they visible) ), now on each screen you need to manually add the necessary padding. For convenience, I propose to make two extension functions: // default heigth for bottom bar in material 3 - 80.dp
// default heigth for top bar in material 3 - 64.dp
fun Modifier.paddingBotAndTopBar(): Modifier {
return padding(top = 64.dp, bottom = 80.dp)
}
fun Modifier.paddingTopBar(): Modifier {
return padding(top = 64.dp)
}
4. Now for each screen for the parent @Composable you need to specify the necessary padding, depending on the visibility of the bottom/top bar on the screen : Column(
modifier = Modifier
.fillMaxSize()
.paddingBotAndTopBar() // if bottom bar must be visible on this screen
.paddingTopBar() // if bottom bar must be NOT visible on this screen
) {
// your screen compose content
}
5. Now the animations are working fine, just like you wanted.
| null | CC BY-SA 4.0 | null | 2023-01-25T09:41:45.630 | 2023-01-25T09:41:45.630 | null | null | 19,452,829 | null |
75,232,283 | 2 | null | 75,232,176 | 1 | null | You can split strings then explode lists then keep only rows that match your criteria:
```
drama_movies = (df.loc[df['listed_in'].str.split(',').explode()
.loc[lambda x: x.isin(['Dramas'])].index])
```
Don't use `apply` here or use a comprehension:
```
drama_movies = df[['Dramas' in s.split(',') for s in df['listed_in']]]
# For 200 rows
# apply: 1.16 ms ± 20.1 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
# comprehension: 156 µs ± 262 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)
```
| null | CC BY-SA 4.0 | null | 2023-01-25T09:59:35.563 | 2023-01-25T10:06:06.850 | 2023-01-25T10:06:06.850 | 15,239,951 | 15,239,951 | null |
75,232,302 | 2 | null | 21,978,487 | 0 | null | So, this may not be useful for original question, but maybe for future searchers :
A solution can be
```
pos = nx.nx_agraph.graphviz_layout(G)
nx.draw(G, pos=pos)
```
Think of installing `agraph` first with `pip install agraph`.
(The solution with `nx.nx_pydot.graphviz_layout(G)` is now to be depreciated according to networkx.)
Hope it helps :)
| null | CC BY-SA 4.0 | null | 2023-01-25T10:01:17.983 | 2023-01-25T10:01:17.983 | null | null | 14,836,609 | null |
75,232,766 | 2 | null | 1,663,993 | 0 | null | Realtime process priority is used mainly to make a specific process run faster at the expense of literally everything else. I personally have my Discord bot's process priority set to realtime, since the bot is lightweight, and I need to keep it responding quickly, but it would be a bad idea to randomly change process priorities unless you know what you're doing, for example, if you were to set Google Chrome's priority to low, it wouldn't cause any problems, but if you were to set registry's priority to low, it would likely cause more than enough problems. Just don't set a heavy program to realtime unless the device it's being run on is completely dedicated to that program.
| null | CC BY-SA 4.0 | null | 2023-01-25T10:41:02.057 | 2023-01-25T10:41:02.057 | null | null | 21,079,172 | null |
75,232,845 | 2 | null | 75,232,558 | 1 | null | The form values need to be concatenated to the SQL string, not being enclosed to it.
For example:
```
"WHERE ID =" & IdControl.Value
```
But this way is not recommended for various reasons. Best to create a temporary query and pass the values as parameters. If you need to run it frequently, create a permanent query and just call it - it will be slightly faster.
```
Const SQL As String = "PARAMETERS [Student] Text (255), [Score] IEEESingle, [Date] DateTime, [ExamType] Text (255), [Lesson] Text (255); " & _
"INSERT INTO tblScores (Student, Score, [Date], ExamType, Lesson) " & _
"SELECT [Student] AS [Student], [Score] AS [Score], [Date] AS [Date], [ExamType] AS [ExamType], [Lesson] AS [Lesson];"
Dim q As DAO.QueryDef
Set q = CurrentDb().CreateQueryDef("", SQL) 'temporary query
q.Parameters("[Student]").Value = cbStudent.Value
q.Parameters("[Score]").Value = txtScore.Value
q.Parameters("[Date]").Value = txtDate.Value
q.Parameters("[ExamType]").Value = cbExamType.Value
q.Parameters("[Lesson]").Value = cbLesson.Value
q.Execute
q.Close
```
---
Keep in mind I don't know the actual data-types of your table fields, so some of the params could be off - the score for example.
| null | CC BY-SA 4.0 | null | 2023-01-25T10:47:25.917 | 2023-01-25T10:47:25.917 | null | null | 7,923,463 | null |
75,233,112 | 2 | null | 42,095,464 | 0 | null | Here is my solution:
Extract coordinates from a regular link
```
export const getCoordinatesFromGoogleMapURL = (url: string) => {
if (!url) {
return undefined
}
const urlParts = url.split('/@')[1]?.split(',')
if (!(urlParts && urlParts?.length > 1)) {
return undefined
}
const gpsX = parseFloat(urlParts[0])
const gpsY = parseFloat(urlParts[1])
if (isNaN(gpsX) || isNaN(gpsY)) {
return undefined
}
return [gpsX, gpsY] as [number, number]
}
```
Generate embed url from coordinates:
```
export const generateGoogleMapEmbedUrl = (coordinates: [number, number]) => {
if (!coordinates) {
return undefined
}
const baseUrl = "https://www.google.com/maps/embed/v1/streetview"
const coordinatesString = `${String(coordinates[0])},${String(coordinates[1])}`
const url = `${baseUrl}?key=${process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY}&location=${coordinatesString}`
return url
}
```
Finally we can put it together:
```
export function convertToEmbedURL(url: string): string {
const coordinates = getCoordinatesFromGoogleMapURL(url)
const embedUrl = generateGoogleMapEmbedUrl(coordinates)
return embedUrl;
}
```
You can read the official docs to find out more about params etc: [https://developers.google.com/maps/documentation/embed/embedding-map#streetview_mode](https://developers.google.com/maps/documentation/embed/embedding-map#streetview_mode)
| null | CC BY-SA 4.0 | null | 2023-01-25T11:09:38.580 | 2023-01-25T11:09:38.580 | null | null | 12,985,469 | null |
75,233,236 | 2 | null | 30,615,067 | 2 | null | In case you are running InteliJ in with (e.g. VcXsrv), a solution may be to
1. close InteliJ
2. restart the server
3. open Intelij
and it will be working.
| null | CC BY-SA 4.0 | null | 2023-01-25T11:21:18.783 | 2023-01-25T11:21:18.783 | null | null | 9,714,255 | null |
75,233,300 | 2 | null | 75,233,184 | 1 | null | To highlight the duplicates per column you can use this sub - you have to pass e.g. `ActiveSheet.Range("B6")`
```
Sub formatDuplicatesPerColumn(rg As Range)
Dim c As Range, uv As UniqueValues
With rg.CurrentRegion
For Each c In .Columns
With c.FormatConditions
.Delete
Set uv = .AddUniqueValues
With uv
.DupeUnique = xlDuplicate
.Interior.Color = 13551615
End With
End With
Next
End With
End Sub
```
| null | CC BY-SA 4.0 | null | 2023-01-25T11:26:33.447 | 2023-01-25T11:26:33.447 | null | null | 16,578,424 | null |
75,233,480 | 2 | null | 75,228,259 | 1 | null | I identified that the @JoinColumn annotation of the `pessoa` field in `Endereco` is wrong, the @JoinColumn should be the foreign key referring to the field, so it would be `fk_id_pessoa` and not `id`, follow the example [link](http://www.java2s.com/Tutorials/Java/JPA/0920__JPA_ManyToOne_Join_Column.htm)
| null | CC BY-SA 4.0 | null | 2023-01-25T11:44:04.687 | 2023-01-25T11:44:04.687 | null | null | 14,010,962 | null |
75,233,617 | 2 | null | 75,233,394 | 1 | null | As you already know now has mount, unmount, and remount components thus and in your first example you set your state once and then you it again on second render. However in your 2nd example you are updating your state, and in second render you are updating it with new images, but you are not deleting previous images, so they are all present. Remember, this only happens in development mode when Strict.Mode is applied in your index.js.
| null | CC BY-SA 4.0 | null | 2023-01-25T11:55:45.600 | 2023-01-25T11:55:45.600 | null | null | 21,026,774 | null |
75,233,628 | 2 | null | 75,233,395 | 0 | null | You have two entries for black color. so show options with more detail like `small-002 Black` and `medium-002 Black`
Try with this code
```
<select class="custom-select" selected id="inputGroupSelect01" name="color">
@foreach ($product_attributes as $color)
<option value="{{ $color->id }}" name="color">
{{$color->sku .' '.$color->color}}
</option>
@endforeach
</select>
```
| null | CC BY-SA 4.0 | null | 2023-01-25T11:56:34.113 | 2023-01-25T12:03:22.053 | 2023-01-25T12:03:22.053 | 8,165,986 | 8,165,986 | null |
75,233,795 | 2 | null | 75,233,506 | 2 | null | Did you try normal formulas in Excel? You could create a table (a ListObject) with the courses as your array values and the combine SUMPRODUCT with COUNTIF to output True/False in your helper column. Easy to update and adapt:
[](https://i.stack.imgur.com/6WNBc.png)
Notice the table at most right named `T_COURSES`. The formula in helper column is:
```
=SUMPRODUCT(--(COUNTIF(T_COURSES,$B$1:$E$1)>0)*--(B2:E2="x"))>0
```
It works perfectly and it autoupdates changing values:
[](https://i.stack.imgur.com/o6m6Q.gif)
| null | CC BY-SA 4.0 | null | 2023-01-25T12:11:19.360 | 2023-01-25T12:11:19.360 | null | null | 9,199,828 | null |
75,233,841 | 2 | null | 16,082,333 | 0 | null | OMG! !
Order of the Options given Matters. Especially If you are a Linux person, take this into consideration.
```
signtool sign /f C:\Users\Administrator\Downloadsmycert.pfx /p uptycs /tr http://timestamp.comodoca.com /debug /td SHA256 /fd SHA256 myapp.exe
```
First I mentioned `/p password` at the end of command which used to fail all the times.
| null | CC BY-SA 4.0 | null | 2023-01-25T12:14:49.077 | 2023-01-25T12:14:49.077 | null | null | 1,609,952 | null |
75,233,866 | 2 | null | 75,233,184 | 2 | null | Use conditional formatting, but with a formula.
Mark all cells of your sheet and create the conditional formatting with the formula
```
=COUNTIF(A:A,A1)>1
```
The function `CountIf` counts the number of cells in a range (1st parameter, "A":A") that have a specific value (2nd parameter, "A1"). Then it is checked if the value can be found more that 1 time (which means in that column a duplicate exists).
The formula will use relative references. For example, cell E7 would be calculated with `=COUNTIF(E:E,E7)>1`.
If the values of a column are always sorted and therefore same values are grouped together in adjacent rows, you can use the following formula (again for the whole sheet)
```
`=AND(A1<>"",OR(A1=A2,A1=A1048576))`
```
It looks a little bit more complicated but the calculation is faster.
| null | CC BY-SA 4.0 | null | 2023-01-25T12:17:22.090 | 2023-01-25T12:55:14.137 | 2023-01-25T12:55:14.137 | 7,599,798 | 7,599,798 | null |
75,234,038 | 2 | null | 75,233,395 | 0 | null | If you want to make the select consists of only the color options you can use the `groupBy()` while retrieving the product attributes see the code below:
```
$product_attributes = ProductAttributes::select("color")->where(['product_id' => $id])->groupBy("color")->get();
```
And then get the data the same as you did.
```
<select class="custom-select" selected id="inputGroupSelect01" name="color">
@foreach ($product_attributes as $color)
<option value="{{$color->color}}"name="color">
{{$color->color}}
</option>
@endforeach
</select>
```
| null | CC BY-SA 4.0 | null | 2023-01-25T12:31:58.250 | 2023-01-25T12:31:58.250 | null | null | 17,037,406 | null |
75,234,042 | 2 | null | 75,223,728 | 0 | null | Regarding your question about watermak:
So GUID column would not be a good fit.
Try to find a date column, or an integer identity which is ever incrementing, to use as watermark.
Since your source is SQL server, you can also use change data capture.
Links:
[Incremental loading in ADF](https://learn.microsoft.com/en-us/azure/data-factory/tutorial-incremental-copy-overview)
[Change data capture](https://learn.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-data-capture-sql-server?view=sql-server-ver16)
Regards,
Chen
| null | CC BY-SA 4.0 | null | 2023-01-25T12:32:08.637 | 2023-01-25T12:32:08.637 | null | null | 21,079,004 | null |
75,234,188 | 2 | null | 15,727,912 | 0 | null | In Flutter Project continue in vs code and paste this command
set your username
```
keytool -list -v -keystore "c:\users\your_pc_username\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
```
| null | CC BY-SA 4.0 | null | 2023-01-25T12:45:57.023 | 2023-01-25T12:45:57.023 | null | null | 19,778,221 | null |
75,234,235 | 2 | null | 75,233,506 | 1 | null |
## Match Headers of Matches Against Values in Array
```
Option Explicit
Sub AddHelper()
Dim checking As Variant: checking = check_issue()
Dim ws As Worksheet: Set ws = ActiveSheet ' improve!
Dim hrg As Range: Set hrg = ws.Range("I1:AD1") ' Header Range
Dim drg As Range ' Data Range
Set drg = ws.Range("I2:AD" & ws.Cells(ws.Rows.Count, "I").End(xlUp).Row)
Dim crg As Range: Set crg = drg.EntireRow.Columns("AI") ' (Helper) Column Range
crg.Value = False
Dim rrg As Range, rCell As Range, r As Long, c As Long, IsFound As Boolean
For Each rrg In drg.Rows
r = r + 1 ' for the (helper) column range
c = 0 ' for the header range
For Each rCell In rrg.Cells
c = c + 1
If StrComp(CStr(rCell.Value), "x", vbTextCompare) = 0 Then
If IsNumeric(Application.Match(CStr(hrg.Cells(c)), checking, 0)) _
Then IsFound = True: Exit For
End If
Next rCell
If IsFound Then crg.Cells(r).Value = True: IsFound = False
Next rrg
End Sub
```
| null | CC BY-SA 4.0 | null | 2023-01-25T12:50:20.047 | 2023-01-25T12:50:20.047 | null | null | 9,814,069 | null |
75,234,719 | 2 | null | 73,753,672 | 0 | null | I've got this error message after:
```
sudo apt install dotnet-host
```
This solved it for me:
```
sudo apt install dotnet-sdk-6.0
```
| null | CC BY-SA 4.0 | null | 2023-01-25T13:30:09.370 | 2023-01-25T13:30:09.370 | null | null | 4,130,788 | null |
75,235,017 | 2 | null | 22,444,118 | 0 | null | The HTML Standard as of 2023 recommends the use of the `<hgroup>` element for subheading, alternative titles, and taglines:
```
<article>
<hgroup>
<p>New product</p>
<h1>Launching our new x-series</h1>
<p>Lorem ipsum dolor sit amet...</p>
</hgroup>
<p>Integer varius, turpis sit amet accumsan...</p>
...
</article>
```
1. Zero or more <p> elements,
2. followed by one <h1> , <h2>, <h3>, <h4>, <h5>, or <h6> element,
3. followed by zero or more <p> elements.
See: [4.3.7 The hgroup element](https://html.spec.whatwg.org/multipage/sections.html#the-hgroup-element)
While not explicitly mentioned, I would consider the lead paragraph to be content related to a heading and would thus place it in the `<hgroup>` as well.
Setting classes like `<p class="lead">` is not required thanks to the `<hgroup>` element, which lets you target the subheading and the lead paragraph in CSS easily:
```
hgroup > p:first-child { /* or hgroup p:has(+ h1) for the <p> before <h1> */
font-size: 16pt;
}
hgroup h1 + p {
font-size: 14pt;
font-style: italic;
}
```
| null | CC BY-SA 4.0 | null | 2023-01-25T13:54:13.370 | 2023-01-25T13:54:13.370 | null | null | 2,044,940 | null |
75,235,370 | 2 | null | 74,929,013 | 0 | null | If anybody else got stuck with this.
I never found a way to do it with Zephyr Squad. However, there is a similar thing called Zephyr Scale.
Basically, does all the same things, has a slighty different UI, but most importantly - triggers an event when test execution status changed, which could be set on listener.
| null | CC BY-SA 4.0 | null | 2023-01-25T14:21:58.230 | 2023-01-25T14:22:29.707 | 2023-01-25T14:22:29.707 | 20,871,397 | 20,871,397 | null |
75,235,729 | 2 | null | 75,235,482 | 0 | null | (Leaving this answer for future searchers who may need this, but see matt's answer for this question's specific situation.)
---
I assume you mean CGPath, not UPath (which does not exist). Line joins are applied to the CGContext prior to stroking the path.
```
cgContext.setLineJoin(.round)
```
If you use UIBezierPath, you can apply the line join style directly to the path:
```
path.lineJoinStyle = .round
```
| null | CC BY-SA 4.0 | null | 2023-01-25T14:52:59.493 | 2023-01-25T16:16:00.273 | 2023-01-25T16:16:00.273 | 97,337 | 97,337 | null |
75,236,462 | 2 | null | 74,921,716 | 0 | null | I had the same problem, and I need to use R 3.4.4 for a specific purpose. I was able to fix this by installing an older version of the purrr package:
#download purrr version 0.3.3 from:
[https://cran.r-project.org/src/contrib/Archive/purrr/](https://cran.r-project.org/src/contrib/Archive/purrr/)
```
#Running R 3.4.4
install.packages("/....../purrr_0.3.3.tar.gz", # path to downloaded file
repos = NULL,
type = c("source"),
INSTALL_opts = "--no-test-load",
lib = "/...") # where to install
```
| null | CC BY-SA 4.0 | null | 2023-01-25T15:49:56.500 | 2023-01-25T15:49:56.500 | null | null | 21,081,173 | null |
75,236,480 | 2 | null | 75,234,831 | 0 | null | Here is a very basic sample of [Radio](https://vuejs.org/guide/essentials/forms.html#radio) input binding with Vue:
```
const { createApp } = Vue;
const App = {
data() {
return {
check: 'Arcade (Monthly)',
items: ['Arcade (Monthly)', 'Advanced (Monthly)']
}
}
}
const app = createApp(App)
app.mount('#app')
```
```
<div id="app">
<div>Picked: {{ check }}</div><br />
<div v-for="(item, index) in items">
<input type="radio" :id="`item_${index}`" :value="item" v-model="check" />
<label :for="`item_${index}`">{{item}}</label>
</div>
</div>
<script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
```
| null | CC BY-SA 4.0 | null | 2023-01-25T15:51:36.060 | 2023-01-25T15:51:36.060 | null | null | 2,487,565 | null |
75,236,490 | 2 | null | 74,886,117 | 1 | null | This seems to work with the latest version of SciChart WPF. Are you by chance using an old version?
[](https://i.stack.imgur.com/H8cSw.png)
If you suspect a bug, report it to [the scichart forums](https://www.scichart.com/questions)
| null | CC BY-SA 4.0 | null | 2023-01-25T15:52:21.563 | 2023-01-25T15:52:21.563 | null | null | 303,612 | null |
75,236,601 | 2 | null | 75,236,140 | 0 | null | Simplest to add a function:
```
formatMe(depo: string) {
if(!depo) return;
// code to format
}
// In Html
formatMe( {{ (currentPortfolio$ | async)?.DEPO }})
```
Best to create a pipe:
```
{{ ((currentPortfolio$ | async)?.DEPO | formatPipe) }}
```
| null | CC BY-SA 4.0 | null | 2023-01-25T15:59:36.420 | 2023-01-25T15:59:36.420 | null | null | 586,227 | null |
75,236,760 | 2 | null | 71,567,199 | 0 | null | This was an issue in [dart-lang/webdev](https://github.com/dart-lang/webdev/issues/1579) that affected Flutter. The [issue was fixed](https://github.com/flutter/flutter/issues/101639#issuecomment-1103203606) once the update on Dart webdev was rolled-out to Flutter as well.
| null | CC BY-SA 4.0 | null | 2023-01-25T16:11:53.043 | 2023-01-25T16:11:53.043 | null | null | 2,497,859 | null |
75,236,759 | 2 | null | 75,235,482 | 1 | null | There's no magic simple way. As you draw your path, you just need to use `addArc(tangent1End...)` at the appropriate moment(s).
| null | CC BY-SA 4.0 | null | 2023-01-25T16:11:50.940 | 2023-01-26T12:51:36.597 | 2023-01-26T12:51:36.597 | 341,994 | 341,994 | null |
75,236,853 | 2 | null | 75,236,299 | 0 | null | If you add a branch policy to the branch you want protected, it will no longer be eligible for deletion. However, merging into that branch will then require a pull request.
| null | CC BY-SA 4.0 | null | 2023-01-25T16:19:27.167 | 2023-01-25T16:19:27.167 | null | null | 781,754 | null |
75,236,941 | 2 | null | 75,235,946 | 1 | null | You specify `[FromBody]` attribute for a data source, but you send your data as a form, so there is a mismatch. You should either change the attribute to `[FromForm]` or change the request format (for example, make it a raw body with JSON content and change `Content-Type` header to `application/json`).
| null | CC BY-SA 4.0 | null | 2023-01-25T16:25:37.673 | 2023-01-25T16:25:37.673 | null | null | 625,594 | null |
75,237,336 | 2 | null | 74,868,518 | 1 | null |
# Answer for 2023
This functionality was added in [Flutter 3.7](https://medium.com/flutter/whats-new-in-flutter-3-7-38cbea71133c) ([related Github comment](https://github.com/flutter/flutter/issues/31955#issuecomment-764001802)).
```
class CustomMenuPage extends StatelessWidget {
CustomMenuPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: SizedBox(
width: 300.0,
child: TextField(
maxLines: 4,
minLines: 2,
contextMenuBuilder: (context, editableTextState) {
return _MyContextMenu(
anchor: editableTextState.contextMenuAnchors.primaryAnchor,
children: [
TextSelectionToolbarTextButton(
padding: EdgeInsets.all(8),
onPressed: () {
debugPrint('Flutter');
},
child: Text('Flutter is cool'),
)
],
);
},
),
),
),
);
}
}
class _MyContextMenu extends StatelessWidget {
const _MyContextMenu({
required this.anchor,
required this.children,
});
final Offset anchor;
final List<Widget> children;
@override
Widget build(BuildContext context) {
return Stack(
children: <Widget>[
Positioned(
top: anchor.dy,
left: anchor.dx,
child: Card(
child: Column(
children: children,
),
),
),
],
);
}
}
```
[](https://i.stack.imgur.com/ighiK.png)
See the official context menu [sample repo here](https://github.com/flutter/samples/tree/main/experimental/context_menus).
| null | CC BY-SA 4.0 | null | 2023-01-25T16:56:17.307 | 2023-01-25T16:56:17.307 | null | null | 12,806,961 | null |
75,237,364 | 2 | null | 75,235,036 | 0 | null | Personally I would replace:
```
<p className="pt-4">
<MDXProvider>
<MDXRenderer>
{pic.description ? <p>{pic.description.childMdx.body}</p> : <p>.</p>}
</MDXRenderer>
</MDXProvider>
</p>
```
with:
```
{ picDescription ? (<p className="pt-4">{pic.description}</p>) : null }
```
because I don't see what value the MDX components are adding there and I suspect that error is coming from MDX (but I don't know for sure).
| null | CC BY-SA 4.0 | null | 2023-01-25T16:59:09.057 | 2023-01-25T18:45:13.393 | 2023-01-25T18:45:13.393 | 2,805,154 | 2,805,154 | null |
75,237,600 | 2 | null | 14,012,924 | 4 | null |
# On macOS
## Explanation
Adding to [@nurnachman](https://stackoverflow.com/users/403717/nurnachman)'s [answer above](https://stackoverflow.com/a/30792615/5953643), on macOS you'll also need to grant the emulator elevated permissions by launching it from the Terminal using `sudo`.
## Steps
### 1. Use the Android Device Manager to set the Camera settings to Webcam0
> UPDATEIn Android Studio AVD:
1. Open AVD Manager:

1. Add/Edit AVD:

1. Click Advanced Settings in the bottom of the screen:

1. Set your camera of choice as the front/back cameras:

### 2. Launch the macOS Terminal
### 3. In the Terminal, enter the following command to list the names of your installed Android Emulators
Emulators Installed via Android Studio:
```
~/Library/Android/sdk/emulator/emulator -list-avds
```
Emulators Installed via Visual Studio for Mac:
```
~/Library/Developer/Xamarin/android-sdk-macosx/emulator emulator -list-avds
```
### 4. Launch the Android Emulator with elevated privileges:
Emulators Installed via Android Studio:
```
sudo ~/Library/Android/sdk/emulator/emulator -avd [Your Emulator Name]
```
> Replace `[Your Emulator Name]` with the name of your emulator discovered in Step 3e.g. `sudo ~/Library/Android/sdk/emulator/emulator -avd pixel_5_-api_33`
Emulators Installed via Visual Studio for Mac:
```
~/Library/Developer/Xamarin/android-sdk-macosx/emulator -avd [Your Emulator Name]
```
> Replace `[Your Emulator Name]` with the name of your emulator discovered in Step 3e.g. `sudo ~/Library/Developer/Xamarin/android-sdk-macosx/emulator -avd pixel_5_-api_33`
### 5. When the Emulator launches and when your app access the Camera, accept macOS request to grant Camera permissions
---
# Troubleshooting
## Ensure Camera Permission Enabled for Terminal
If the Android Camera is still not working after launching it with elevated permissions via the Terminal, in [System Settings.app](https://support.apple.com/guide/mac-help/change-system-settings-mh15217/mac), navigate to `Privacy & Security` -> `Camera` and ensure the Camera Permission for `Terminal` is enabled
[](https://i.stack.imgur.com/2lfqH.png)
| null | CC BY-SA 4.0 | null | 2023-01-25T17:19:16.340 | 2023-02-01T01:36:02.173 | 2023-02-01T01:36:02.173 | 5,953,643 | 5,953,643 | null |
75,237,622 | 2 | null | 54,300,081 | 0 | null |
# Answer for 2023
In [Flutter 3.7](https://medium.com/flutter/whats-new-in-flutter-3-7-38cbea71133c) there is now a ContextMenuRegion widget that you can wrap around any existing widget. When the user long presses or right-clicks (depending on the platform), the menu you give it will appear.
```
return Scaffold(
body: Center(
child: ContextMenuRegion(
contextMenuBuilder: (context, offset) {
return AdaptiveTextSelectionToolbar.buttonItems(
anchors: TextSelectionToolbarAnchors(
primaryAnchor: offset,
),
buttonItems: <ContextMenuButtonItem>[
ContextMenuButtonItem(
onPressed: () {
ContextMenuController.removeAny();
},
label: 'Save',
),
],
);
},
child: const SizedBox(
width: 200.0,
height: 200.0,
child: FlutterLogo(),
),
),
),
);
```
[](https://i.stack.imgur.com/xEU7K.png)
| null | CC BY-SA 4.0 | null | 2023-01-25T17:20:42.240 | 2023-01-25T17:20:42.240 | null | null | 12,806,961 | null |
75,237,859 | 2 | null | 75,237,609 | 0 | null | The [Nullish Coalescing Operator (??)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing#browser_compatibility) was introduced to Node in version 14. Update your CI/CD pipeline to be a newer version of Node. The current version is 18 and I believe 12 is no longer LTS so upgrading is definitely something to look into.
| null | CC BY-SA 4.0 | null | 2023-01-25T17:45:58.003 | 2023-01-25T17:45:58.003 | null | null | 9,576,186 | null |
75,237,871 | 2 | null | 75,223,114 | 0 | null | For multiple entries, you must enable the [pyramid](https://www.investopedia.com/terms/p/pyramiding.asp)
You can do it [manually](https://i.imgur.com/DTqKNZX.png), or from [strategy](https://www.tradingview.com/pine-script-reference/v4/#fun_strategy)
| null | CC BY-SA 4.0 | null | 2023-01-25T17:47:55.490 | 2023-01-25T17:47:55.490 | null | null | 5,577,188 | null |
75,238,006 | 2 | null | 75,237,361 | 1 | null | Your question is a bit broad, you should post your current solution next time to see which part is not working. For example, I couldn't really tell if the vertical scrollbar in the middle region is supposed to scroll the top or the middle part. Anyways, if you're set on using flexboxes, here's a way to do it:
```
body {
margin: 0;
}
main {
display: flex;
width: 100vw;
height: 100vh;
}
.left {
width: 20%;
background-color: cornflowerblue;
}
.left__header {
background-color: lightblue;
}
.middle {
display: flex;
flex-direction: column;
width: 40%;
background-color: salmon;
}
.middle__header {
flex-shrink: 0;
overflow-y: auto;
background-color: lightpink;
}
.middle__body {
overflow-x: auto;
}
.middle__footer {
margin-top: auto;
background-color: white;
}
.right {
width: 40%;
background-color: lightgreen;
}
```
```
<main>
<div class="left">
<div class="left__header">1</div>
<div class="left__body"></div>
</div>
<div class="middle">
<div class="middle__header">
<!-- Fixed width to simulate overflowing content -->
<div style="min-width: 2000px">1 2 3 4 5</div>
</div>
<div class="middle__body">
<!-- Fixed height to simulate overflowing content -->
<div style="min-height: 2000px">Content</div>
</div>
<div class="middle__footer">
Pia de Pagina
</div>
</div>
<div class="right">
SideBar Right
</div>
</main>
```
But if you don't plan on dynamically adding/removing elements or moving stuff around in the base layout (i.e. these regions stay the same during the use of the application) I'd recommend using CSS grid instead:
```
body {
margin: 0;
}
main {
display: grid;
grid-template:
"left-header middle-header right" min-content
"left-body middle-body right"
"left-body middle-footer right" min-content / 2fr 4fr 4fr;
width: 100vw;
height: 100vh;
}
.left__header {
grid-area: left-header;
background-color: lightblue;
}
.left__body {
grid-area: left-body;
background-color: cornflowerblue;
}
.middle__header {
grid-area: middle-header;
overflow-x: auto;
background-color: lightpink;
}
.middle__body {
grid-area: middle-body;
overflow-y: auto;
background-color: salmon;
}
.middle__footer {
grid-area: middle-footer;
background-color: white;
}
.right {
grid-area: right;
background-color: lightgreen;
}
```
```
<main>
<div class="left__header">1</div>
<div class="left__body"></div>
<div class="middle__header">
<!-- Fixed width to simulate overflowing content -->
<div style="min-width: 2000px">1 2 3 4 5</div>
</div>
<div class="middle__body">
<!-- Fixed height to simulate overflowing content -->
<div style="min-height: 2000px">Content</div>
</div>
<div class="middle__footer">
Pia de Pagina
</div>
<div class="right">
SideBar right
</div>
</main>
```
This results in the same output, but the HTML/CSS is much more readable IMO. It uses the [grid-template](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template) property, which is fairly new, but should be available in [most browsers](https://caniuse.com/?search=grid-template).
| null | CC BY-SA 4.0 | null | 2023-01-25T18:00:09.357 | 2023-01-25T21:38:40.520 | 2023-01-25T21:38:40.520 | 13,257,467 | 13,257,467 | null |
75,238,084 | 2 | null | 13,778,034 | 0 | null | Changing these paths in RegEdit or SSMS doesn't work, SQL LocalDb won't respect these values for existing databases. One has to move the databases manually. Here is the reliable way to change a database location for any LocalDB instance.
First, make sure you work with a correct instance of SQL Server LocalDB. In command prompt enter:
```
sqllocaldb info
```
It will show the LocalDB instances you have on your machine. Let's assume that the instance name is `MSSQLLocalDB`.
Next, execute this script on your database (let's call it `TestApp`), using SqlCmd tool or SSMS:
```
alter database TestApp
modify file (name = TestApp, filename = 'C:\NewDataLocation\TestApp.mdf');
go
alter database TestApp
modify file (name = TestApp_log, filename = 'C:\NewDataLocation\TestApp_log.ldf');
go
```
Now, stop the SQL LocalDB instance, in command prompt:
```
sqllocaldb stop MSSQLLocalDB
```
Move the database files to the new location that you specified in the script. From `%UserProfile%\TestApp.mdf` (which is where they are located) to `C:\NewDataLocation\TestApp.mdf`, same for LDF file.
Start the SQL LocalDB instance again:
```
sqllocaldb start MSSQLLocalDB
```
Now your database is working from a new location. Repeat the steps for any other databases.
| null | CC BY-SA 4.0 | null | 2023-01-25T18:08:43.133 | 2023-01-25T18:08:43.133 | null | null | 41,269 | null |
75,238,414 | 2 | null | 75,236,081 | 0 | null | ```
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type:application/json; charset=UTF-8,auth';
```
The error seems to be that `Content-Type:application/json` is not a header name, that's a header name and value.
| null | CC BY-SA 4.0 | null | 2023-01-25T18:37:52.620 | 2023-01-25T18:37:52.620 | null | null | 802,138 | null |
75,238,717 | 2 | null | 75,238,439 | 1 | null | I'm not sure how accurate this is, but you can try and count the total amount of space and subtract that number from the total underlying disk size to get the maximum unallocated space:
```
# Query the Win32_DiskDrive instance representing the physical disk
$disk = Get-CimInstance Win32_DiskDrive -Filter 'Index = 2'
# Find all associated partitions
$partitions = $disk |Get-CimAssociatedInstance -ResultClassName Win32_DiskPartition
# Calculate total allocation for configured partitions
$allocated = $partitions |Measure-Object -Sum Size |Select-Object -Expand Sum
# Calculate the remaining void
$unallocated = $disk.Size - $allocated
Write-Host ("There is {0}GB of disk space unallocated" -f $($unallocated/1GB))
```
| null | CC BY-SA 4.0 | null | 2023-01-25T19:06:19.763 | 2023-01-25T19:06:19.763 | null | null | 712,649 | null |
75,238,712 | 2 | null | 75,060,605 | 0 | null | Don't use bootstraps' grid system for this. It isn't a grid you're trying to achieve.
```
body {
display: flex;
align-items: center;
justify-content: center;
}
/* Do not use the above - this is just for display purposes */
.my-container>.flex-column {
width: 100px; /* Width of each column */
}
.my-container>.flex-column>div {
flex: 1 1 0px;
}
.c1 {
a background-color: red;
}
.c2 {
background-color: rgb(98, 0, 255);
}
.c3 {
background-color: rgb(101, 255, 160);
}
.c4 {
background-color: rgb(72, 255, 0);
}
.c5 {
background-color: rgb(0, 255, 242);
}
.c6 {
background-color: rgb(255, 238, 0);
}
.r0 {
background-color: rgb(133, 133, 133);
}
.ra {
background-color: rgb(255, 123, 0);
}
.rb {
background-color: rgb(72, 255, 0);
}
.rc {
background-color: rgb(255, 0, 191);
}
.rd {
background-color: rgb(240, 255, 24);
}
.re {
background-color: rgb(111, 133, 255);
}
.rf {
background-color: rgb(180, 57, 57);
}
.rg {
background-color: rgb(91, 206, 110);
}
```
```
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
</head>
<body>
<div class="d-flex py-3 my-container">
<div class="d-flex flex-column">
<div class="ra">a</div>
<div class="rb">b</div>
</div>
<div class="d-flex flex-column">
<div class="c2">2</div>
</div>
<div class="d-flex flex-column">
<div class="c3">3</div>
</div>
<div class="d-flex flex-column">
<div class="rc">c</div>
<div class="rd">d</div>
<div class="re">e</div>
</div>
<div class="d-flex flex-column">
<div class="rf">f</div>
<div class="rg">g</div>
</div>
</div>
</body>
```
| null | CC BY-SA 4.0 | null | 2023-01-25T19:06:06.903 | 2023-01-25T19:06:06.903 | null | null | 13,426,975 | null |
75,238,928 | 2 | null | 75,215,531 | 0 | null | Turned out that I did have to add `"worklet"` to the updater i was passing in:
```
const animatedStyles = useLibraryAnimatedStyle(() => {
"worker";
return {
transform: [{ rotateZ: "100deg" }],
};
});
```
vs what you normally pass to `useAnimatedStyle`
```
const animatedStyles = useAnimatedStyle(() => ({
transform: [{ rotateZ: "100deg" }],
});
```
| null | CC BY-SA 4.0 | null | 2023-01-25T19:28:24.643 | 2023-01-25T19:28:24.643 | null | null | 605,511 | null |
75,239,187 | 2 | null | 75,239,050 | 1 | null | - A `figure` environment is a floating objects, which allows latex to find a good location within the text flow. If you want an image at a very specific position, like a title page, you shouldn't use a `figure` environment- using the `overlay` option will make sure that the actual size of the tikzpicture does not influence the positioning and thus a cutoff logo won't influence the rest of the page- I also suggest the `remember picture` option which allows you to position your nodes with respect to the page. This way you can place the big picture in the centre of the page and the smaller picture at the lower right corner (shift it around with the `xshift` and `yshift` keys)
---
```
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.center) {\includegraphics[width=.9\paperwidth,height=.9\paperheight]{example-image-10x16}};
\node at ([xshift=-2cm,yshift=1cm]current page.south east) {\includegraphics[width=15cm]{example-image-duck}};
\end{tikzpicture}
\end{document}
```
[](https://i.stack.imgur.com/zwhVn.png)
| null | CC BY-SA 4.0 | null | 2023-01-25T19:56:47.417 | 2023-01-25T20:02:47.940 | 2023-01-25T20:02:47.940 | 2,777,074 | 2,777,074 | null |
75,239,359 | 2 | null | 75,238,503 | 0 | null | Yes. You can get the price of a cryptocurrency as it is traded in Uniswap.
- For Uniswp v2 like exchanges, the price can be calculated as a ratio of reverse0 / reserve1- The related smart contract call is `pair.getReserves`- For more complete example, you can read the source code of [get_current_mid_price() function here](https://web3-ethereum-defi.readthedocs.io/api/_autosummary_uniswap_v2/eth_defi.uniswap_v2.pair.PairDetails.html#eth_defi.uniswap_v2.pair.PairDetails.get_current_mid_price)- For Uniswap v3, it is there are similar helper functions in Uniswap perihelia contracts
| null | CC BY-SA 4.0 | null | 2023-01-25T20:13:37.797 | 2023-01-25T20:13:37.797 | null | null | 315,168 | null |
75,239,590 | 2 | null | 75,232,950 | 0 | null | Instead of using the built-in destroy command, use a custom command. That away you can get the data item, show the desired prompt, then delete it in the success callback.
For example, look at this column definition:
```
{
title: '',
width: 150,
command: [{
name: 'customDestroy',
iconClass: 'k-icon k-i-x',
text: 'Delete',
click: e => {
e.preventDefault();
var grid = $(e.delegateTarget).data('kendoGrid');
var tr = $(e.target).closest('tr');
var dataItem = grid.dataItem(tr);
kendo.confirm('Are you sure you want to delete this attachment?').then(() => {
grid.dataSource.remove(dataItem);
});
}
}]
}
```
Fiddle: [https://dojo.telerik.com/oNIDEKit](https://dojo.telerik.com/oNIDEKit)
| null | CC BY-SA 4.0 | null | 2023-01-25T20:38:00.697 | 2023-01-25T20:38:00.697 | null | null | 1,920,035 | null |
75,239,642 | 2 | null | 75,239,147 | 1 | null | To fix your issue you have to move `shape` inside `aes` similar to what you have done for `color` and afterwards set your shapes via `scale_shape_manual`. However, you could simplify your approach considerably by first reshaping your data to long or tidy data format. Doing so allows to add your lines and points which just one `geom_point` and `geom_line`:
```
library(tidyr)
library(ggplot2)
hydrogen_data_long <- hydrogen_data %>%
tidyr::pivot_longer(-time_hydrogen, names_to = "hydrogren")
ggplot(hydrogen_data_long, aes(x = time_hydrogen, y = value, color = hydrogren)) +
geom_line(lwd = 1) +
geom_point(aes(shape = hydrogren), size = 5) +
scale_shape_manual(
labels = c("15Me-NT", "15Me-nNT", "15Me-NNT", "15Me-nnt"),
values = c(
"MexxJan_hydrogen" = 15, "MexyJan_hydrogen" = 16,
"MexzJan_hydrogen" = 17, "MexwJan_hydrogen" = 18
)
) +
scale_color_manual(
labels = c("15Me-NT", "15Me-nNT", "15Me-NNT", "15Me-nnt"),
values = c(
"MexxJan_hydrogen" = "palegreen3", "MexyJan_hydrogen" = "tan1",
"MexzJan_hydrogen" = "cadetblue", "MexwJan_hydrogen" = "tomato2"
)
) +
theme_bw() +
theme(
axis.text = element_text(family = "Arial", size = 15, color = "black"),
axis.title.x = element_text(family = "Arial", size = 16, margin = margin(t = 15)),
axis.title.y = element_text(family = "Arial", size = 16, margin = margin(r = 15)),
axis.line = element_line(color = "black"),
plot.background = element_rect(fill = "transparent", color = NA),
panel.border = element_rect(color = "black"),
panel.background = element_rect(fill = "transparent"),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
axis.ticks.length = unit(0.20, units = "cm"),
legend.background = element_rect(fill = "transparent"),
legend.key = element_rect(fill = "transparent", colour = NA),
legend.position = "top",
legend.key.width = unit(0, unit = "cm"),
legend.key.height = unit(0, unit = "cm"),
legend.title = element_blank(),
legend.text = element_text(size = 13.5),
legend.spacing.x = unit(0.1, "cm"),
legend.text.align = unit(0.05, unit = "cm")
) +
labs(x = "Time (min)", y = "Gas Evolution (µmol.g"^-1 ~ ")") +
coord_cartesian(ylim = c(0, 15), xlim = c(0, 180)) + # Limit the size of the plot
scale_y_continuous(
expand = expansion(mult = c(0.02, 0.02)),
n.breaks = 5
) +
scale_x_continuous(
expand = expansion(mult = c(0.02, 0.02)),
breaks = c(0, 60, 120, 180)
)
```
[](https://i.stack.imgur.com/sJFAv.png)
| null | CC BY-SA 4.0 | null | 2023-01-25T20:43:54.610 | 2023-01-25T20:43:54.610 | null | null | 12,993,861 | null |
75,239,664 | 2 | null | 75,239,147 | 1 | null | You are making life harder for yourself by passing your data frame in the wrong format. If you pivot to long format, you only need a single `geom_line` and `geom_point`. It's also far easier to map your colors and shapes, which will automatically appear in the legend.
Also, try to choose a default theme that's closer to the look you want to achieve to cut down on the number of tweaks you have to make via `theme`. One of the key things you'll learn in R, as in other languages, is that cutting down code to a minimum makes it easier to change or debug your code later on.
```
library(tidyverse)
hydrogen_data %>%
pivot_longer(-time_hydrogen) %>%
ggplot(aes(time_hydrogen, value, color = name, shape = name)) +
geom_line(lwd = 1) +
geom_point(size = 5) +
scale_color_manual(values = c("tomato2", "palegreen", "tan1", "cadetblue"),
labels = paste0("15Me-", c("NT", "nNT", "NNT", "nnt"))) +
scale_shape_manual(values = c(18, 15, 16, 17),
labels = paste0("15Me-", c("NT", "nNT", "NNT", "nnt"))) +
scale_y_continuous(expression(Gas~Evolution~(µmol.g^-1)),
expand = expansion(mult = c(0.02, 0.02)), n.breaks = 5) +
scale_x_continuous("Time (min)", expand = expansion(mult = c(0.02, 0.02)),
breaks = c(0, 60, 120, 180)) +
theme_classic(base_size = 16) +
theme(axis.text = element_text(family = "Arial", size = 15, color = "black"),
plot.background = element_blank(),
panel.border = element_rect(color = "black", fill = NA),
panel.background = element_blank(),
axis.ticks.length = unit(0.20, units = "cm"),
legend.background = element_blank(),
legend.position = "top",
legend.title = element_blank()) +
coord_cartesian(ylim = c(0, 15), xlim = c(0, 180))
```
[](https://i.stack.imgur.com/lhqBE.png)
| null | CC BY-SA 4.0 | null | 2023-01-25T20:45:47.657 | 2023-01-25T20:56:41.473 | 2023-01-25T20:56:41.473 | 12,500,315 | 12,500,315 | null |
75,240,518 | 2 | null | 75,239,899 | 2 | null | Here is what your code looks like with proper formatting.
```
local level = 5
for i = 1, level do
local text = ""
for j = 1, i do
text = text..""
end
for j = 1, level-i, 1 do
text = text.." "
end
for j = 1+level, level+(level-i) do
text = text.." "
end
for j = 1, level + i-level do
text = text..""
end
print(text)
end
```
Your current code prints... well... an empty string. You haven't yet added the characters it's to display to be on par with the image.
The amount of characters per row is 9. So you ideally need 9 characters per row. You will also be incrementing the number once per row. The amount of characters per row also increases by 2; one on each side.
We can use the `string.rep(string, number)` function to duplicate a 'string' 'number' times. You can feed in your current level into that so it generates 1 2 or 3 depending on the line the number of times. Then you have whitespace to worry about. You can use `string.rep` again along with a bit of distance math to calculate the amount of whitespace you need from what you take up. Then finally throw everything together concatenated trailing with the first string and print.
```
local levels = 5
local columns = 9
for i=1, levels do
local str = string.rep(i, i)
local padding = columns - (#str * 2) + 1
print(str .. string.rep(" ", padding) .. str)
end
```
| null | CC BY-SA 4.0 | null | 2023-01-25T22:28:46.083 | 2023-01-29T11:30:16.433 | 2023-01-29T11:30:16.433 | 366,904 | 2,262,111 | null |
75,240,533 | 2 | null | 75,236,709 | 1 | null | It appears that you want accounts, moviecategories, seriescategories and a means of associating/relating accounts with a number of moviecategories and perhaps seriescategories and to be able to restrict the number of listed moviecategories according to an accounts preference which can change.
The solution would be a many-many relationship between account and moviecategories (and perhaps seriescategories).
However, before moving on you say:-
> So I made the MovieCategory data class an Entity, using "Id" as Primary Key, and then, considering that it is a one to many relationship (I hope I am right with this), I added the Primary Key from the AccountData Entity to the MovieCategory Entity.
Regarding your hope. I believe that you are wrong. There are 3 types of relationships:-
1. 1-1 where each row in a table would have a means of uniquely identifying the row, typically via a single column, in other table (if a separate table is apt (a single table may well suffice)). 1-1 relationships are not typically catered for by using tables.
2. 1-many where a row in the parent table (account) could have many children (moviecategory) BUT the moviecategory could only have the 1 parent. In such a case a column in the moviecategory would contain a value that uniquely identifies the parent.
3. many-many an expanded 1-M that allows each side to relate to any number of the other side. So an account can relate to many moviecategories to which other accounts can relate to. The typical solution is to have an intermediate table that has 2 core columns. One that stores the value that uniquely identifies one side of the relationship and the other that stores the value that uniquely identifies the other side. Typically the 2 columns would for the primary key. such an intermediate table has numerous terms to describe such a table, such as associative table, mapping table, reference table ....
-
You problem would appear to tick the boxes for a many-many relationship and thus the extra table (2 if account-secriescategories).
This table would have a column for the the value that uniquely identifies the accountData row ().
-
The table would have a second column for the movieCategory's column.
So you could start with
```
@Entity
data class AccountMovieMap(
val accountDataMap: String,
val movieCategoryMap: String
)
```
However, there is no PrimaryKey which room requires BUT the @PrimaryKey annotation only applies to a single column. If either were used then due to the implicit uniqueness the relationship would be restricted to 1-many. A composite (multiple columns/values) Primary Key is required that makes the uniqueness according to the combined values. To specify a composite PrimaryKey in Room the `primaryKeys` parameter of the `@Entity` annotation is used.
So AccountMovieMap becomes :-
```
@Entity(
primaryKeys = ["accountDataMap","movieCategoryMap"]
)
data class AccountMovieMap(
val accountDataMap: String,
val movieCategoryMap: String
)
```
As it stands there is a potential issue with the above as it is possible to insert data into either or both columns that is not a value in the respective table. That is the integrity of the relationship, in such a situation, does not exist.
SQLite and therefore Room (as with many relational database) caters for enforcing . SQLite does this via ForeignKey clauses. Room uses the `foreignKeys` parameter of the `@Entity` annotation to provide a list of `ForeignKey`s.
- In addition to enforcing referential integrity SQlite has 2 clauses ON DELETE and ON UPDATE that help to maintain referential integrity (depending upon the specified action, the most useful being CASCADE which allows changes that would break referential integrity by applying changes to the parent to the children).- Room will also warn if an index does not exist where it believe one should e.g. `warning: movieCategoryMap column references a foreign key but it is not part of an index. This may trigger full table scans whenever parent table is modified so you are highly advised to create an index that covers this column.` As such, the @ColumnInfo annotation can be used to add an index on the movieCategoryMap column.
So could be the fuller:-
```
@Entity(
primaryKeys = ["accountDataMap","movieCategoryMap"]
, foreignKeys = [
ForeignKey(
entity = AccountData::class,
parentColumns = ["totalAccountData"],
childColumns = ["accountDataMap"],
/* Optional but helps to maintain Referential Integrity */
onDelete = ForeignKey.CASCADE,
onUpdate = ForeignKey.CASCADE
),
ForeignKey(
entity = MovieCategory::class,
parentColumns = ["id"],
childColumns = ["movieCategoryMap"],
onDelete = ForeignKey.CASCADE,
onUpdate = ForeignKey.CASCADE
)
]
)
data class AccountMovieMap(
val accountDataMap: String,
@ColumnInfo(index = true)
val movieCategoryMap: String
)
```
To add (insert) rows you could then have/use (in an @Dao annotated class):-
```
@Insert(onConflict = OnConflictStrategy.IGNORE)
fun insert(accountMovieMap: AccountMovieMap)
```
-
As you would want to extract an AccountData's MovieCategories you need a POJO that has the AccountData with a List of MovieCategory.
This could be:-
```
data class AccountWithMovieCategoryList(
@Embedded
val accountData: AccountData,
@Relation(
entity = MovieCategory::class,
parentColumn = "totalAccountData", /* The column referenced in the @Embedded */
entityColumn = "id", /* The column referenced in the @Relation (MovieCategory) */
/* The mapping table */
associateBy = (
Junction(
value = AccountMovieMap::class, /* The @Entity annotated class for the mapping table */
parentColumn = "accountDataMap", /* the column in the mapping table that references the @Embedded */
entityColumn = "movieCategoryMap" /* the column in the mapping table that references the @Relation */
)
)
)
val movieCategoryList: List<MovieCategory>
)
```
The following could be the function in an @Dao annotated interface that retrieves an AccountWithMovieCategoryList for a given account:-
```
@Transaction
@Query("SELECT * FROM accountData WHERE totalAccountData=:totalAccountData")
fun getAnAccountWithMovieCategoryList(totalAccountData: String): List<AccountWithMovieCategoryList>
```
Room will retrieve ALL the MovieCategories but you want to be able to specify a ed number of MovieCategories for an Account, so a means is required to override Room's methodology of getting ALL mapped/associate objects.
To facilitate this then a function with a body can be used to a) get the respective AccountData and b) to then get the MovieCategory list according to the account, via the mapping table with a LIMIT specified. Thus 2 @Query functions to doe the 2 gets invoked by the overarching function.
So to get the AccountData:-
```
@Query("SELECT * FROM accountData WHERE totalAccountData=:totalAccountData")
fun getSingleAccount(totalAccountData: String): AccountData
```
And then to get the limited MovieCategories for an AccountData via (JOIN) the mapping table :-
```
@Query("SELECT movieCategory.* FROM accountMovieMap JOIN movieCategory ON accountMovieMap.MovieCategoryMap = movieCategory.id WHERE accountMovieMap.accountDataMap=:totalAccountData LIMIT :limit")
fun getLimitedMovieCategoriesForAnAccount(totalAccountData: String,limit: Int): List<MovieCategory>
```
And to put it all together aka the overarching function:-
```
@Transaction
@Query("")
fun getAccountWithLimitedMovieCategoryList(totalAccountData: String,categoryLimit: Int): AccountWithMovieCategoryList {
return AccountWithMovieCategoryList(
getSingleAccount(totalAccountData),
getLimitedMovieCategoriesForAnAccount(totalAccountData,categoryLimit)
)
}
```
- Note the above code has only been compiled (so Room processing sees no issues), as such it is in-principle code- You say , this is opiniated and is not the best as a better way would be to utilise SQLite's more efficient handling of INTEGER primary keys.- i.e. an Int passed could be dynamically via the UI selected or stored and thus preserved. It could be stored in the AccountData by adding a suitable column or it could be stored elsewhere. AccountData would seem the simplest and most apt unless the expectation is that many such account based preferences should exist.
If, for example, an extra column was added to AccountData e.g. :-
```
@Entity
data class AccountData(
val url: String,
val code: String,
@PrimaryKey(autoGenerate = false)
val totalAccountData: String,
val movieCategoryLimit: Int /*<<<<< to store LIMIT preference */
)
```
A means of changing the limit would very likely be required such as the following in a/the `@Dao` annotated interface :-
```
@Query("UPDATE accountData SET movieCategoryLimit=:newLimit WHERE totalAccountData=:totalAccountData")
fun changeMovieCategoryLimit(totalAccountData: String, newLimit: Int)
```
A subtle change to the getAccountWithLimitedMovieCategoryList function and the LIMIT is as per the preference:-
```
@Transaction
@Query("")
fun getAccountWithLimitedMovieCategoryList(totalAccountData: String,categoryLimit: Int): AccountWithMovieCategoryList {
val accountData = getSingleAccount(totalAccountData)
return AccountWithMovieCategoryList(
accountData,
getLimitedMovieCategoriesForAnAccount(totalAccountData,accountData.movieCategoryLimit)
)
}
```
-
As per the comment
> .... Isn't it then a one-to-many relation? ....
Then for a 1-M, as previously explained MovieCategory should have a column for storing a unique column. Which I guess is what you index the val accountData: String? to be for.
- `?`
:-
```
/* MovieCategory modified for 1-m (1 account many categories)*/
@Entity(
foreignKeys = [
ForeignKey(
entity = AccountData::class,
parentColumns = ["totalAccountData"],
childColumns = ["accountData"],
onDelete = ForeignKey.CASCADE,
onUpdate = ForeignKey.CASCADE,
)
]
)
@Parcelize
data class MovieCategory(
@PrimaryKey(autoGenerate = false)
val id: String,
val number: Int,
val title: String,
@ColumnInfo(index = true) /* added as likely to used for selecting rows */
val accountData: String /* should NEVER by null */
) : Parcelable
```
Assuming that AccountData includes the movieCategoryLimit (as explained above) then a POJO for retrieving the Account and the LIMITED list of MovieCategories would be required (a little different to the m-m equivalent) which could be:-
```
data class AccountDataWithMovieCategories(
@Embedded
val accountData: AccountData,
@Relation(
entity = MovieCategory::class,
parentColumn = "totalAccountData",
entityColumn = "accountData"
)
val movieCategories: List<MovieCategory>
)
```
-
The same issue exists that Room will retrieve ALL MovieCategories. So the following is not what you want:-
```
/* Note will get ALL MovieCategories (even with join and LIMIT) */
@Transaction
@Query("SELECT * FROM accountData WHERE totalAccountData=:totalAccountData")
fun getAccountWithMovieCategories(totalAccountData: String): List<AccountWithMovieCategoryList>
```
Rather you want to have:-
```
@Query("SELECT * FROM movieCategory WHERE accountData=:totalAccountData LIMIT :limit")
fun getLimitedMoviesCategoriesPerAccount(totalAccountData: String, limit: Int): List<MovieCategory>
```
-
An then finally the overarching function:-
```
@Transaction
@Query("")
fun getAccountWithLimitedMovieCategories(totalAccountData: String, limit: Int): AccountDataWithMovieCategories {
val accountData = getSingleAccount(totalAccountData)
return AccountDataWithMovieCategories(
accountData,
getLimitedMovieCategoriesForAnAccount(
accountData.totalAccountData,
accountData.movieCategoryLimit /* the limit as stored in the account */
)
)
}
```
| null | CC BY-SA 4.0 | null | 2023-01-25T22:29:55.567 | 2023-01-26T12:03:51.587 | 2023-01-26T12:03:51.587 | 4,744,514 | 4,744,514 | null |
75,240,696 | 2 | null | 29,235,114 | 0 | null | This is the easiest way I know how to do this. I'm sure you could also use it with a `scale_color_manual` as well if you have more specific color scales in mind.
```
ggplot(head(airquality, 60), aes(x=Day, y=Temp,
color=factor(Month))) +
geom_point() +
geom_smooth(alpha=0.2) + #toggle this alpha for error bar opacity
scale_color_viridis(discrete=TRUE, alpha = 0.9) + #toggle this alpha for line opacity
theme_minimal()
```
Open to questions, comments, or improvements.
| null | CC BY-SA 4.0 | null | 2023-01-25T22:47:48.340 | 2023-01-25T22:47:48.340 | null | null | 17,659,109 | null |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.