Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
sequence |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
74,597,232 | 2 | null | 74,596,303 | 0 | null | Just in addition to @DYZ approach, using [css selectors](https://www.crummy.com/software/BeautifulSoup/bs4/doc/#css-selectors), [stripped_strings](https://www.crummy.com/software/BeautifulSoup/bs4/doc/#strings-and-stripped-strings) and [find_previous()](https://www.crummy.com/software/BeautifulSoup/bs4/doc/#find-all-previous-and-find-previous). This will create a `list` of `dicts` that will be transformed into a `dataframe`:
```
from bs4 import BeautifulSoup
import requests
import pandas as pd
url = "https://www.environment.nsw.gov.au/topics/animals-and-plants/threatened-species/programs-legislation-and-framework/nsw-koala-strategy/local-government-resources-for-koala-conservation/north-coast-koala-management-area#:~:text=The%20North%20Coast%20Koala%20Management,Valley%2C%20Clarence%20Valley%20and%20Taree."
data = []
soup = BeautifulSoup(requests.get(url).text)
for e in soup.select('table tbody tr'):
data.append(
dict(
zip(
soup.table.thead.stripped_strings,
[e.find_previous('th').get_text(strip=True)]+list(e.stripped_strings)
)
)
)
pd.DataFrame(data)
```
| | Common name | Species name | High preferred use |
| | ----------- | ------------ | ------------------ |
| 0 | High preferred use | Grey gum | Eucalyptus biturbinata |
| 1 | High preferred use | Large-fruited grey gum | Eucalyptus canaliculata |
| ... | ... | ... | ... |
| 107 | Occasional use | Broad-leaved paperbark | Melaleuca quinquenervia |
| 108 | Occasional use | nan | nan |
| null | CC BY-SA 4.0 | null | 2022-11-28T07:21:39.187 | 2022-11-28T07:21:39.187 | null | null | 14,460,824 | null |
74,597,349 | 2 | null | 74,595,866 | 0 | null | `ChangeMove()` is only true once, as you set the value of `place.sprite` as its called the first time, and then it can never be changed again.
As Rufus L says, remove the `place.sprite == null` condition and there shouldn't be an issue, as it looks like the function (as is) only handles the very first move only.
| null | CC BY-SA 4.0 | null | 2022-11-28T07:35:01.297 | 2022-11-28T10:09:15.573 | 2022-11-28T10:09:15.573 | 20,466,294 | 20,466,294 | null |
74,597,378 | 2 | null | 74,316,351 | 0 | null | According to your needs, I wrote a WinForm Application without using the database. But their logic is the same.
Because you need to perform frequent operations on a set of data, I suggest you use List as a container for storing data.
You could refer to it where I commented on the important places.
Code shows as below
```
List<string> urlList = new List<string>(); //Container for storing playlists
private void btnInsert_Click(object sender, EventArgs e)
{
OpenFileDialog of = new OpenFileDialog(); //open local directory
of.Multiselect = true;
of.Title = "Please select a music file";
of.Filter = "(*.mp3)|*.mp3";
if (of.ShowDialog() == DialogResult.OK)
{
string[] namelist = of.FileNames; //Save selected song path
foreach (string url in namelist)
{
listBoxMusics.Items.Add(Path.GetFileNameWithoutExtension(url)); //Display the selected songs in the listbox
urlList.Add(url); //Store selected songs in previous container
}
}
}
}
private void btnPlay_Click(object sender, EventArgs e)
{
int selectedIndex = listBoxMusics.SelectedIndex; //Define an int type to point to the subscript of the listbox
axWindowsMediaPlayer1.URL = urlList[selectedIndex]; //The player points to the song stored in the container, that is, plays the selected song in the listbox
}
private void timer1_Tick(object sender, EventArgs e) //The interval of the timer should be adjusted to less than 1000ms
{
max = axWindowsMediaPlayer1.currentMedia.duration; //duration of a song
min = axWindowsMediaPlayer1.Ctlcontrols.currentPosition; //The current time a song is playing
trackBar1.Maximum = (int)(max); //The maximum time of the progress bar
trackBar1.Value = (int)(min); //The current time of the progress bar
if (trackBar1.Value == trackBar1.Maximum)
{
urlList.RemoveAt(listBoxMusics.SelectedIndex); //Remove the currently playing song in the container
listBoxMusics.Items.Clear(); //empty listbox
foreach (string url in urlList)
{
listBoxMusics.Items.Add(Path.GetFileNameWithoutExtension(url)); //Re-add songs in container to listbox
}
}
}
```
| null | CC BY-SA 4.0 | null | 2022-11-28T07:37:45.160 | 2022-11-28T07:57:30.840 | 2022-11-28T07:57:30.840 | 20,528,460 | 20,528,460 | null |
74,597,506 | 2 | null | 74,431,094 | 0 | null | Why would you want two different client id's. Client ids just denote your application to google. If you have two different client ids when you go to verify the application they are without a doubt going to make you remove one.
I question why you would want two different logins, but the solution would be to use two different users.
| null | CC BY-SA 4.0 | null | 2022-11-28T07:50:35.577 | 2022-11-28T07:50:35.577 | null | null | 1,841,839 | null |
74,597,515 | 2 | null | 74,587,470 | 0 | null | You're getting that error because you are calling [Intent](https://developer.android.com/reference/android/content/Intent)'s class constructor with a wrong argument. The first argument should be a [Context](https://developer.android.com/reference/android/content/Context) and not a View. The keyword `this` is referring in your code to a View and to a context, hence the error.
To solve this, you have to pass a Context object like this:
```
val i = Intent(view.getContext(), PackDetailActivity::class.java)
```
And your error will go away.
| null | CC BY-SA 4.0 | null | 2022-11-28T07:51:35.567 | 2022-11-28T07:51:35.567 | null | null | 5,246,885 | null |
74,597,625 | 2 | null | 74,580,025 | 0 | null | From document [Understanding Android API levels](https://learn.microsoft.com/en-us/xamarin/android/app-fundamentals/android-api-levels?tabs=windows), we know that:
> Beginning in August 2021, the Google Play Console requires that new
apps target API level 30 (Android 11.0) or higher. Existing apps are
required to target API level 30 or higher beginning in November 2021.
For more information, see Target API level requirements for the Play
Console in "Create and set up your app" in the Play Console
documentation.
So, you can try to set the target API to level 30 (Android 11.0) or higher.
| null | CC BY-SA 4.0 | null | 2022-11-28T08:02:52.940 | 2022-11-28T08:02:52.940 | null | null | 10,308,336 | null |
74,597,763 | 2 | null | 71,023,963 | 0 | null | "Think in functions". If you has a function like
```
getGroup(data:any=null)
{
//data will be the properties by defect and, using spread operator,
//replace the properties by the data object
data={
id: 0,
pessoa_id:0,
created_at:"",
holder: "",
validade: "",
bandeira:"",
...data
}
return new FormGroup({
id: new FormControl(data.id),
pessoa_id: new FormControl(data.pessoa_id),
created_at:new FormControl(data.created_at),,
holder: new FormControl(data.holder),,
validade: new FormControl(data.validade),,
bandeira:new FormControl(data.bandeira),}
})
}
```
Each change in "Meus Cartoes"
```
change(bandeira:string)
{
const data=this.responseData.data.find(x=>x.bandeira==bandeira)
if (data)
this.form=getGroup(data) //<--a form with all the data
else
this.form=getGroup({bandeira:bandeira}) //<--a form with the "bandeira"
}
```
NOTE: really the "form" need split the "validate", get the "numero do cartao" and the "nome_impreso"...
| null | CC BY-SA 4.0 | null | 2022-11-28T08:18:25.190 | 2022-11-28T08:18:25.190 | null | null | 8,558,186 | null |
74,598,370 | 2 | null | 65,645,510 | 0 | null | You need to delete de cache at
> ~/.gradle/caches
But an easier way is to do it from IDE, under file menu
you will find "" option
Hope it works for you
[](https://i.stack.imgur.com/mqVhY.png)
| null | CC BY-SA 4.0 | null | 2022-11-28T09:18:00.137 | 2022-11-28T09:18:00.137 | null | null | 9,138,621 | null |
74,599,019 | 2 | null | 29,114,824 | 0 | null | After few frustrating hours, I found what was the problem
Short Answer: To convert time to utc, we need to use format()
Long Answer: Take the example
moment.utc(1559586600000).format('LLL')
.utc sets the isUTC flag to true.
When logging the date, the d key always shows the time in local timezone. (Which makes us believe its not working properly - as shown in your screenshot)
But we need to use .format to get the date/time in UTC format.
The above code returns June 3, 2019 6:30 PM which is the correct UTC time.
| null | CC BY-SA 4.0 | null | 2022-11-28T10:12:20.930 | 2022-12-07T06:38:07.797 | 2022-12-07T06:38:07.797 | 20,527,420 | 20,527,420 | null |
74,599,068 | 2 | null | 29,114,824 | 0 | null | ```
const moment = require('moment-timezone');
const dateTime='2020-12-21'
const timezone='America/Anchorage'
const dateTimeInUtc = moment(dateTime).tz(timezone).utc().format();
console.log('dateTimeInUtc',dateTimeInUtc);
```
| null | CC BY-SA 4.0 | null | 2022-11-28T10:15:44.437 | 2022-11-28T10:15:44.437 | null | null | 20,527,420 | null |
74,600,414 | 2 | null | 74,600,228 | 0 | null | For starters change the body to Raw json not raw text.
Then just try adding something like this
```
{
"name": "myimage.jpg",
"mimeType": "image/jpb"
}
```
That should get you the metadata. Give me a minute while i See if i can find an example of how to add the actual file data.
You should be able to add that in the form data section [form data](https://learning.postman.com/docs/sending-requests/requests/#form-data)
| null | CC BY-SA 4.0 | null | 2022-11-28T12:13:49.637 | 2022-11-28T12:13:49.637 | null | null | 1,841,839 | null |
74,600,485 | 2 | null | 17,590,502 | 0 | null | this fixed my problem:
```
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<customErrors mode="Off"/>
<httpRuntime maxUrlLength="10999" maxQueryStringLength="2097151"/>
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxUrl="10999" maxQueryString="9999"/>
</requestFiltering>
</security>
</system.webServer>
</configuration>
```
| null | CC BY-SA 4.0 | null | 2022-11-28T12:21:04.513 | 2022-11-28T12:21:04.513 | null | null | 1,767,482 | null |
74,600,673 | 2 | null | 74,594,230 | 0 | null | You can get the IP address of the PostgreSQL server with
```
SELECT inet_server_addr();
```
Note that the result depends on the network interface you used to connect (the server may have several different IP addresses).
There is no query to that can give you information about other instances running on the same machine; each instance has no idea about any other instances.
| null | CC BY-SA 4.0 | null | 2022-11-28T12:36:06.057 | 2022-11-28T12:36:06.057 | null | null | 6,464,308 | null |
74,600,666 | 2 | null | 15,506,167 | 0 | null | The [sdl.ps](https://github.com/pixelglow/graphviz/raw/master/doc/infosrc/sdl.ps) file needs to be included [using the -l flag](https://graphviz.org/faq/#ext_ps_proc), e.g.
```
dot -Tps -l sdl.ps tcp.dot -o tcp.ps
# Optionally, to convert to png.
gs -q -dBATCH -dNOPAUSE -sDEVICE=png256 -sOutputFile=tcp.png tcp.ps
```
Whith the following input file (based on half of [this fsm](http://tcpipguide.com/free/t_TCPOperationalOverviewandtheTCPFiniteStateMachineF-2.htm))
```
digraph G {
state_start [shape=sdl_start, peripheries=0, label="Start"];
state_closed [shape=sdl_state, peripheries=0, label="CLOSED"];
state_syn_sent [shape=sdl_state, peripheries=0, label="SYN-SENT"];
state_established [shape=sdl_state, peripheries=0, label="ESTABLISHED"];
state_listen [shape=sdl_state, peripheries=0, label="LISTEN"];
state_syn_received [shape=sdl_state, peripheries=0, label="SYN-RECEIVED"];
input_active_open [shape=sdl_input_from_left, peripheries=0, label="Active open"];
input_passive_open [shape=sdl_input_from_left, peripheries=0, label="Passive open"];
input_syn [shape=sdl_input_from_left, peripheries=0, label="SYN"]
input_syn2 [shape=sdl_input_from_left, peripheries=0, label="SYN"]
input_syn_ack [shape=sdl_input_from_left, peripheries=0, label="SYN-ACK"]
input_ack [shape=sdl_input_from_left, peripheries=0, label="ACK"]
output_syn [shape=sdl_output_to_right, peripheries=0, label="SYN"]
output_syn_ack [shape=sdl_output_to_right, peripheries=0, label="SYN-ACK"]
output_ack [shape=sdl_output_to_right, peripheries=0, label="ACK"]
output_ack2 [shape=sdl_output_to_right, peripheries=0, label="ACK"]
state_start -> state_closed;
state_closed -> input_active_open;
input_active_open -> output_syn;
output_syn -> state_syn_sent;
state_syn_sent -> input_syn_ack;
input_syn_ack -> output_ack;
output_ack -> state_established;
state_closed -> input_passive_open;
input_passive_open -> state_listen;
state_listen -> input_syn;
input_syn -> output_syn_ack;
output_syn_ack -> state_syn_received;
state_syn_received -> input_ack;
input_ack -> state_established;
state_syn_sent -> input_syn2;
input_syn2 -> output_ack2;
output_ack2 -> state_syn_received;
}
```
the commands above generate the following output:
[](https://i.stack.imgur.com/fxzbY.png)
| null | CC BY-SA 4.0 | null | 2022-11-28T12:35:39.473 | 2022-11-28T12:35:39.473 | null | null | 23,118 | null |
74,600,748 | 2 | null | 74,600,747 | 1 | null | To draw the placeholder with darker pen, you have to modify the stylesheet and set to the [lineEdit](https://doc.qt.io/qt-6/qcombobox.html#lineEdit) of the `QComboBox`.
```
auto styleSheet = "QWidget {color: white; background-color: #505050}"
"QLineEdit[text=\"\"] { color: #808080 }";
myComboBox->setStyleSheet(styleSheet);
myComboBox->lineEdit()->setStyleSheet(styleSheet);
```
`QComboBox` has no option to handle the placeholder text, because that text is handled by the line edit it has. Therefore, to alter the look and feel of the placeholder, you must use it's `QLineEdit`. Note, that several properties not make any effect on the line edit, like the `background-color` or `border` to say some, because those are handled by the `QComboBox`.
Also, if it's not automatically updated, you need to connect the change of the text with the stylesheet update. In the owning widget, connect the text change signal to the update:
```
connect(ui->myComboBox->lineEdit(), &QLineEdit::textChanged, this
[&]{ style()->polish(ui->myComboBox->lineEdit()); });
```
| null | CC BY-SA 4.0 | null | 2022-11-28T12:41:00.397 | 2022-11-28T12:41:00.397 | null | null | 14,583,599 | null |
74,601,558 | 2 | null | 23,521,839 | -1 | null | In my case, I had to deactivate "All-in-One WP Migration" WordPress plugin.
| null | CC BY-SA 4.0 | null | 2022-11-28T13:47:45.037 | 2023-01-19T08:23:55.877 | 2023-01-19T08:23:55.877 | 7,781,405 | 7,781,405 | null |
74,601,803 | 2 | null | 74,601,654 | 1 | null | One option would be to add an identifier to your datasets and row bind them which could be achieved in one step using e.g. `dplyr::bind_rows`. The identifier column could then be mapped on `x`:
```
Ost_data <- data.frame(
Stadt = c("Hamburg", "Koln"),
Langzeitarbeitslose = c(33L, 21L)
)
West_data <- data.frame(
Stadt = c("Berlin", "Frankfurt"),
Langzeitarbeitslose = c(34L, 55L)
)
library(ggplot2)
dat <- dplyr::bind_rows(list(Ost = Ost_data, West = West_data), .id = "id")
ggplot(data = dat) +
geom_boxplot(aes(x = id, y = Langzeitarbeitslose)) +
labs(x = "Ost und Westdeutschland", y = "Langzeitarbeitslosenquote")
```

| null | CC BY-SA 4.0 | null | 2022-11-28T14:06:36.543 | 2022-11-28T14:24:19.000 | 2022-11-28T14:24:19.000 | 12,993,861 | 12,993,861 | null |
74,602,068 | 2 | null | 67,656,558 | 0 | null | The first step is to create the required matrix.
Source: [https://arxiv.org/abs/math/0608017v1](https://arxiv.org/abs/math/0608017v1)
Lets take as an example:
```
g <- sample_gnm(10, 20)
degree(g)
```
The next step is to remove random edges until all nodes have degree 4 or less.
```
g1 <- g
while (max(degree(g1)) > max_deg) {
vvv <- V(g1)[which(degree(g1) > max_deg)]
g1 <- g1 - sample(incident(g1, vvv), 1)
}
degree(g1)
dev.new(); plot(g2, layout=layout_in_circle)
```
Output:
```
[1] 2 6 3 7 4 5 2 1 5 5 - degrees g
[1] 1 3 3 2 4 4 4 3 2 2 - degrees g1
```
| null | CC BY-SA 4.0 | null | 2022-11-28T14:26:01.537 | 2022-11-28T14:26:01.537 | null | null | 3,604,103 | null |
74,602,148 | 2 | null | 74,590,199 | 0 | null | my goal was to turn a boolean to real for the purpose of gradually opening the valves within my model, the fault in my triggered trapezoid model is that I put amplitude= Var, and the Var was the mass flow rate of my valve. The correct thing is to put amplitude=ON, where ON is the boolean that controls the opening of the valve, after that I multiply the mass flow rate with "y" (the result of the triggered trapezoid block) and that will simulate the gradually opening of the valve
| null | CC BY-SA 4.0 | null | 2022-11-28T14:32:04.193 | 2022-11-28T14:32:04.193 | null | null | 11,214,365 | null |
74,602,343 | 2 | null | 71,657,628 | 0 | null | Same for me. Import of a local Excel sheet (1 tab, 2 cols, 30 rows) did not complete after 30 minutes using only one processor.
Upgrading the VM to more than one processor solved the issue.
| null | CC BY-SA 4.0 | null | 2022-11-28T14:47:20.143 | 2022-11-28T14:47:20.143 | null | null | 5,488,432 | null |
74,602,852 | 2 | null | 74,601,899 | 0 | null | I didn't quite understand the question, but here goes
You can take the margin from the ".mainbox" that it is giving margin on all sides of the mainbox class.
To leave the div box occupying its own content you can use in the styling: `display:inline-block`
Note: a good practice is to use class instead of id to identify the styling, and id more for future interaction when using script and interactions.
| null | CC BY-SA 4.0 | null | 2022-11-28T15:26:07.800 | 2022-11-28T15:26:07.800 | null | null | 19,448,018 | null |
74,602,849 | 2 | null | 74,576,848 | 4 | null | It appears that what you want to do is create an SQL "[Union](https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapunion_clause.htm)": Select rows from two different database tables and put the results into one combined table. This is only possible if both SELECTs have the same fields. But you can usually accomplish that pretty easily by substituting the missing rows in each table by a constant value (`''` in this example):
```
SELECT
key1
'' as key2
value1
value2
value3
'' as value4
FROM db1
UNION SELECT
key1
key2
value1
'' as value2
'' as value3
value4
FROM db2
INTO CORRESPONDING FIELDS OF TABLE @it.
```
When you are using an older release (<7.50), then you can combine the data of multiple SELECTs by using `APPENDING` instead of `INTO`:
```
SELECT
key1
value1
value2
value3
FROM db1
INTO CORRESPONDING FIELDS OF TABLE @it.
SELECT
key1
key2
value1
value4
FROM db2
APPENDING CORRESPONDING FIELDS OF TABLE @it.
```
| null | CC BY-SA 4.0 | null | 2022-11-28T15:25:25.477 | 2022-11-30T14:15:00.800 | 2022-11-30T14:15:00.800 | 1,620,671 | 1,620,671 | null |
74,602,861 | 2 | null | 74,597,932 | 0 | null | The error message says that the type of parameter 4 is unsupported. The counting starts with 0, so we are talking about the `id`. Your debug output shows that `id` contains the [one-item python tuple](https://www.w3schools.com/python/gloss_python_tuple_one_item.asp) `(2,)`.
This is no problem for the select-statement where you only pass one parameter, because it can coup with both, single values and tuples. But if you pass more than just `id` like in your update statement, you get a tuple that contains a tuple.
Please check how you set `session['id']`. If you want to pass just one id then don't pass a tuple. If you want to pass a tuple then get the first value `id[0]` when you pass it to the update statement!
| null | CC BY-SA 4.0 | null | 2022-11-28T15:26:32.017 | 2022-11-28T15:37:03.247 | 2022-11-28T15:37:03.247 | 18,667,225 | 18,667,225 | null |
74,602,932 | 2 | null | 74,602,732 | -1 | null | Try This
```
Matrix = [[1,2,3],[4,5,6],[7,8,9]]
newMatrix = []
for line in range(len(Matrix)):
Matrix[line].reverse()
newMatrix.append(Matrix[line])
newMatrix.reverse()
print(newMatrix)
```
output
```
[[9, 8, 7], [6, 5, 4], [3, 2, 1]]
```
| null | CC BY-SA 4.0 | null | 2022-11-28T15:32:03.257 | 2022-11-28T15:33:12.857 | 2022-11-28T15:33:12.857 | 20,253,993 | 20,253,993 | null |
74,602,939 | 2 | null | 24,576,811 | 0 | null | A very late answer, but with the current version this is very easy. You simply draw the mask, set the blending mode to use the source color to the destination and draw the original. You'll only see the original image where the mask is.
```
//create batch with blending
SpriteBatch maskBatch = new SpriteBatch();
maskBatch.enableBlending();
maskBatch.begin();
//draw the mask
maskBatch.draw(mask);
//store original blending and set correct blending
int src = maskBatch.getBlendSrcFunc();
int dst = maskBatch.getBlendDstFunc();
maskBatch.setBlendFunction(GL20.GL_ZERO, GL20.GL_SRC_COLOR);
//draw original
maskBatch.draw(original);
//reset blending
maskBatch.setBlendFunction(src, dst);
//end batch
maskBatch.end();
```
If you want more info on the blending options, check [How to do blending in LibGDX](https://stackoverflow.com/a/38555868/434949)
| null | CC BY-SA 4.0 | null | 2022-11-28T15:32:38.610 | 2022-11-28T15:32:38.610 | null | null | 434,949 | null |
74,603,097 | 2 | null | 74,602,732 | -1 | null | try this new realization and this will not change the original Matrix
```
Matrix = [[1,2,3],[4,5,6],[7,8,9]]
newMatrix = []
for line in range(len(Matrix)):
newMatrix.append(sorted(Matrix[line],reverse=True))
newMatrix.reverse()
print(newMatrix)
print(Matrix)
```
output:
```
[[9, 8, 7], [6, 5, 4], [3, 2, 1]]
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]
```
| null | CC BY-SA 4.0 | null | 2022-11-28T15:45:42.400 | 2022-11-28T15:45:42.400 | null | null | 20,253,993 | null |
74,603,112 | 2 | null | 74,602,870 | 0 | null | Depending on your data, you might be able to use [facet_wrap](https://ggplot2.tidyverse.org/reference/facet_wrap.html) to facet by a variable, or you can use [cowplot](https://wilkelab.org/cowplot/articles/plot_grid.html) to plot three separate plots next to each other.
```
library(tidyverse)
library(cowplot)
data(mtcars)
ggplot(mtcars, aes(x = mpg, y = cyl, color = factor(gear))) +
geom_point() + geom_smooth() +
facet_wrap(~gear)
```
[](https://i.stack.imgur.com/u1eF3.jpg)
```
p1 <- ggplot(data = subset(mtcars, gear %in% 3), aes(x = mpg, y = cyl)) +
geom_point() + geom_smooth(color = "red")
p2 <- ggplot(data = subset(mtcars, gear %in% 4), aes(x = mpg, y = cyl)) +
geom_point() + geom_smooth(color = "blue") + ylab("")
p3 <- ggplot(data = subset(mtcars, gear %in% 5), aes(x = mpg, y = cyl)) +
geom_point() + geom_smooth(color = "green") + ylab("")
cowplot::plot_grid(p1, p2, p3, nrow = 1)
```
[](https://i.stack.imgur.com/nIjDq.jpg)
| null | CC BY-SA 4.0 | null | 2022-11-28T15:47:06.620 | 2022-11-28T15:47:06.620 | null | null | 14,992,857 | null |
74,603,417 | 2 | null | 74,603,238 | 0 | null | As commented from @Pete, it was a margin collapsing problem. Adding
> overflow:auto
to the elements involved with the collapse seems to have fixed it.
| null | CC BY-SA 4.0 | null | 2022-11-28T16:09:26.967 | 2022-11-28T16:09:26.967 | null | null | 20,295,118 | null |
74,603,463 | 2 | null | 74,559,026 | 0 | null | Not sure where in your code this comes up but it sounds like you have some variable that is a boolean and you tried to access it like
`somebool.items` and Python is telling you that `somebool` has no attribute `items`
| null | CC BY-SA 4.0 | null | 2022-11-28T16:13:07.560 | 2022-11-28T16:13:07.560 | null | null | 18,572,509 | null |
74,603,911 | 2 | null | 74,603,808 | 0 | null | The error says the file can not be found. The file path is incorrect. File paths are hard to figure out, so you can copy the path with VS code. Just check file paths and everything will work. In the future, "try uploading text code instead of an image of the code". (Stack Overflow Guidelines) Also, this may work in production, it might be because its on a local host not a web server.
| null | CC BY-SA 4.0 | null | 2022-11-28T16:49:31.093 | 2022-11-28T16:51:11.963 | 2022-11-28T16:51:11.963 | 20,624,405 | 20,624,405 | null |
74,603,928 | 2 | null | 74,198,498 | 1 | null | So I finally found that there is a GitHub Issue opened about this problem.
The issue is caused by the secondary side bar.
Link to comment in the issue about how to fix : [https://github.com/microsoft/vscode-remote-release/issues/7324#issuecomment-1307954310](https://github.com/microsoft/vscode-remote-release/issues/7324#issuecomment-1307954310)
| null | CC BY-SA 4.0 | null | 2022-11-28T16:50:50.937 | 2022-11-28T16:50:50.937 | null | null | 20,332,928 | null |
74,604,696 | 2 | null | 74,604,228 | 0 | null | The "object file" is the shared library you built from your C source code and installed in the PostgreSQL library directory, and the "link symbol" is the name of the exported function.
The PostgreSQL documentation has lots of information about writing C functions.
| null | CC BY-SA 4.0 | null | 2022-11-28T17:58:50.207 | 2022-11-28T17:58:50.207 | null | null | 6,464,308 | null |
74,605,321 | 2 | null | 74,442,073 | 1 | null | You could edit the module directly, since it gives the line number as 606 in this file (and wait for a fix later from JetBrains):
C:\Program Files\JetBrains\PyCharm 2022.2.4\plugins\python\helpers\pydev_pydevd_bundle\pydevd_utils.py
Change the iteritems to item:
```
def _series_to_str(s, max_items):
res = []
s = s[:max_items]
for item in s.items():
#for item in s.iteritems(): #bugged on panda 1.5 FutureWarning
# item: (index, value)
res.append(str(item))
return ' '.join(res)
```
| null | CC BY-SA 4.0 | null | 2022-11-28T18:56:07.370 | 2022-11-28T18:56:07.370 | null | null | 20,626,534 | null |
74,605,907 | 2 | null | 20,738,935 | 0 | null | If you want to create a symmetric pyramid, a great way would be this:
```
function pyramid(n) {
let line = "";
for (let i = 0; i < n; i++) {
line += " ".repeat(n - i) + "*".repeat(i + (i + 1)) + "\n";
}
console.log(line);
}
pyramid(5);
```
| null | CC BY-SA 4.0 | null | 2022-11-28T20:00:54.233 | 2022-11-28T20:00:54.233 | null | null | 10,926,825 | null |
74,606,015 | 2 | null | 28,491,458 | 0 | null | ```
prompt_context() {
# Custom (Random emoji)
MINUTE_TRC=$(date +%M)
emojis_1=("" "" "" "" "" "" "" "" "" "" "" "")
emojis_2=("" "" "" "" "" "" "" "" "" "" "" "️")
if (($MINUTE_TRC % 2 != 0)); then
RAND_EMOJI_N=$(( $RANDOM % ${#emojis_1[@]} + 1))
prompt_segment black default "%(!.%F{red}.%F{red})%n%F{green}@%F{Blue}%m %F{reset} ${emojis_1[$RAND_EMOJI_N]} "
else
RAND_EMOJI_N=$(( $RANDOM % ${#emojis_2[@]} + 1))
prompt_segment black default "%(!.%F{red}.%F{red})%n%F{green}@%F{green}%m %F{reset} ${emojis_2[$RAND_EMOJI_N]} "
fi
}
```
Improvement on Pongsatorn Nitithammawoot config. This will make the emoji change every min.
| null | CC BY-SA 4.0 | null | 2022-11-28T20:14:40.887 | 2022-11-28T20:14:40.887 | null | null | 7,945,150 | null |
74,606,321 | 2 | null | 25,122,551 | 0 | null | you can make the color of the font as the background color e.g. for white background
```
set xtics out offset -1.,0 scale 2.2 enhanced font 'Helvetica:bold,45' tc rgb "#FFFFFF"
```
| null | CC BY-SA 4.0 | null | 2022-11-28T20:49:32.563 | 2022-11-28T20:49:32.563 | null | null | 4,837,507 | null |
74,606,368 | 2 | null | 74,606,251 | 0 | null | Something like this should work:
```
words = [
('THE', 30062),
('AND', 28379),
('I', 22307),
('THAT', 11924),
]
def print_words(all_words, limit=19):
totwords = sum([y for x,y in all_words])
print("Total words:", totwords)
print()
print("Top", limit, "words:")
words = all_words[:limit]
maxlen = max([len(x) for x, y in words])
for word, count in words:
print(f"{word:{maxlen}} {count}")
print_words(words)
```
where
```
print(f"{word:{maxlen}} {count}")
```
means print `word`, and use `maxlen` characters, then print `count`.
| null | CC BY-SA 4.0 | null | 2022-11-28T20:53:56.997 | 2022-11-28T20:53:56.997 | null | null | 75,103 | null |
74,606,903 | 2 | null | 29,401,309 | 0 | null | Making the file path in quotes did not work for me in the Oracle database.
```
spool data.txt
set echo on
Query -- the query
set echo off
spool off
```
this will save the query and output to the data.txt file in the
`"C:\Users\NELSON JOSEPH\AppData\Roaming\SQL Developer\data.txt"` in this location likewise username varies for others.
| null | CC BY-SA 4.0 | null | 2022-11-28T21:58:42.777 | 2022-11-28T21:58:42.777 | null | null | 13,771,945 | null |
74,607,349 | 2 | null | 74,607,019 | 2 | null | Sample data that actually shows overlaps between the files.
- `file1.csv`:```
target_id,KO_1D_7dpi,KO_2D_7dpi
ENSMUST00000178537.2,0,0
ENSMUST00000178862.2,0,0
ENSMUST00000196221.2,0,0
ENSMUST00000179664.2,0,0
ENSMUST00000177564.2,0,0
```
- `file2.csv````
target_id
ENSMUST00000178537.2
ENSMUST00000196221.2
ENSMUST00000177564.2
```
Your `grep` command, but swapped:
```
$ grep -F -f file2.csv file1.csv
target_id,KO_1D_7dpi,KO_2D_7dpi
ENSMUST00000178537.2,0,0
ENSMUST00000196221.2,0,0
ENSMUST00000177564.2,0,0
```
: we can add the `-F` argument since it is a fixed-string search. Plus it adds protection against the `.` matching something else as a regex. Thanks to @Sundeep for the recommendation.
| null | CC BY-SA 4.0 | null | 2022-11-28T22:55:22.507 | 2022-11-29T11:53:48.143 | 2022-11-29T11:53:48.143 | 3,358,272 | 3,358,272 | null |
74,608,045 | 2 | null | 74,608,020 | 0 | null | Webpack should be part of the frontend repository, so it should go into the `frontend/package.json`. Similarly, just like `frontend/eslintrc.json` is your linting settings for your frontend, you should create a `frontend/webpack.config.js` for your frontend webpack config.
Since you're in VSCode, it looks like, when dealing with just the frontend, you could consider making things easier on yourself by going to File -> Open Folder -> select the Frontend folder, and then you can easily operate on it, its package, and everything it contains (without getting mixed up with the backend at all).
Where your frontend folder goes is up to you, but your current approach is fine - organizing to have a `/frontend` and a separate `/backend` folder in the same parent directory if you wish.
| null | CC BY-SA 4.0 | null | 2022-11-29T00:55:40.400 | 2022-11-29T00:55:40.400 | null | null | 9,515,207 | null |
74,608,089 | 2 | null | 74,606,928 | 0 | null | As mentioned above this question has many answers. Taking just 1 date as an example:
`ts = pd.to_datetime('01oct2012')` produces the timestamp:
Timestamp('2012-10-01 00:00:00')
To convert to the desired format:
```
ts.strftime('%d-%m-%Y')
```
yields:
'01-10-2012'
| null | CC BY-SA 4.0 | null | 2022-11-29T01:03:38.540 | 2022-11-29T01:03:38.540 | null | null | 14,249,087 | null |
74,608,205 | 2 | null | 26,274,602 | 0 | null | Alternate solution for this is on keyReleased() also using
```
if (!ke.isAutoRepeat())
{
// ... do stuff
}
```
isAutoRepeat() filters out input events automatically sent multiple times by the OS.
| null | CC BY-SA 4.0 | null | 2022-11-29T01:28:22.947 | 2022-11-29T01:28:22.947 | null | null | 16,873,616 | null |
74,608,269 | 2 | null | 54,428,044 | 0 | null | I had the same problem, my solution was to install more older versions of packages.
Versions that i've installed: @react-navigation/native": "^6.0.14" and @react-navigation/stack": "^6.3.5". I'm not sure, but it looks like the newest versions have some defects
| null | CC BY-SA 4.0 | null | 2022-11-29T01:40:40.517 | 2022-11-29T01:40:40.517 | null | null | 20,610,737 | null |
74,608,410 | 2 | null | 74,608,361 | 1 | null | This is really about applying an incrementing multiplier to Y, so it is more suitably implemented by iterating over a `range` of multipliers.
To produce 4 items, for example:
```
i = -0.5
tot = 0.025
lst = [i + tot * m for m in range(4)]
```
| null | CC BY-SA 4.0 | null | 2022-11-29T02:06:46.153 | 2022-11-29T02:06:46.153 | null | null | 6,890,912 | null |
74,608,448 | 2 | null | 74,601,110 | 0 | null | For better location of packages and files and better management, you should use virtual environments.
1. First create a folder (Django) and open it in vscode.
2. Then use the following command in the terminal to create a new virtual environment (.venv) python -m venv .venv
3. After the command is executed, select the virtual environment interpreter in the select interpreter panel
4. Create a new terminal activation environment
5. Install django using the command in the new terminal python -m pip install django
6. Create a Django project django-admin startproject web_project .
7. Create an empty development database python manage.py migrate
8. To verify the Django project, make sure your virtual environment is activated, then start Django's development server using the command python manage.py runserver
| null | CC BY-SA 4.0 | null | 2022-11-29T02:14:25.350 | 2022-11-29T02:14:25.350 | null | null | 19,133,920 | null |
74,608,842 | 2 | null | 74,606,574 | 0 | null | I have a solution here where you only rotate the content of the divs (`prints` and `shop`). I added `p` tag inside `prints` and `shop` so I can rotate the content of the div.
```
body {
margin: 0;
padding: 0;
}
.tabs {
position: fixed;
right: 0;
top: 0;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
font-size: 20px;
}
.prints {
display: inline-block;
background: black;
color: #ffffe6;
width: 100%;
text-align: center
}
.shop {
display: inline-block;
background: #e95514;
color: black;
width: 100%;
text-align: center;
}
.prints, .shop {
padding: 1rem 0;
}
.prints > p, .shop > p {
transform: rotate(90deg)
}
```
```
<body>
<div class="tabs">
<div class="prints">
<p>PRINTS</p>
</div>
<div class="shop">
<p>SHOP</p>
</div>
</div>
</body>
```
| null | CC BY-SA 4.0 | null | 2022-11-29T03:23:20.063 | 2022-11-29T03:23:20.063 | null | null | 20,538,454 | null |
74,609,048 | 2 | null | 69,396,358 | 1 | null | ```
Transform.rotate(
angle: pi/2,
child: customWeiget,
);
```
| null | CC BY-SA 4.0 | null | 2022-11-29T04:02:44.900 | 2022-11-29T04:02:44.900 | null | null | 8,305,747 | null |
74,609,373 | 2 | null | 17,667,023 | -2 | null | Step 1. Reset Branch to specific HEAD.
Step 2. Push forcefully changes to your remote branch.
```
git reset --hard e3f1e37 / git reset --hard origin/master
git push --force origin "Branch name"
```
Done. Now check your remote branch with reset to the previous commit
| null | CC BY-SA 4.0 | null | 2022-11-29T05:06:46.567 | 2022-12-01T07:19:01.730 | 2022-12-01T07:19:01.730 | 7,417,962 | 7,417,962 | null |
74,609,773 | 2 | null | 23,304,129 | 0 | null | Try Changing Your Trigger from :
```
<asp:AsyncPostBackTrigger ControlID="btnAddRecord" EventName="Click" />
```
To:
```
<asp:PostBackTrigger ControlID="btnAddRecord" />
```
| null | CC BY-SA 4.0 | null | 2022-11-29T06:10:03.293 | 2022-11-29T06:10:03.293 | null | null | 17,805,827 | null |
74,609,884 | 2 | null | 74,458,399 | 0 | null | You are receiving this error due to high memory consumption which exceeded the limits of the consumption plan. According to the [official documentation](https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#service-limits), the consumption plan has Max memory is 1.5 GB per instance.
>
| Resource | Consumption Plan | Dedicated Plan |
| -------- | ---------------- | -------------- |
| Max memory (GB per instance) | 1.5 | 1.75-14 |
You can either switch to a dedicated hosting plan which provides memory up to 1.75-14 GB along with other resources or reduce the amount of data that is being received in an instance.
| null | CC BY-SA 4.0 | null | 2022-11-29T06:25:06.710 | 2022-11-29T06:25:06.710 | null | null | 15,969,981 | null |
74,610,154 | 2 | null | 74,607,534 | 0 | null | It's because you keep adding everything to the container.
```
containerElement.innerHTML +=
```
You only need the code above one time (at least the way you're doing it now), and add in one long string.
Otherwise, add the section, then select the section and add everything to the section's innerHTML. Same idea with the div.
| null | CC BY-SA 4.0 | null | 2022-11-29T06:58:14.950 | 2022-11-29T06:58:14.950 | null | null | 1,171,702 | null |
74,610,394 | 2 | null | 24,936,003 | 0 | null | FYI, to->circle bug happens at approx. 65%:
```
- "INFO --- width/height (SQUARE): 12.121212121212121"
- "INFO --- halfSize == maxRadius: 6.0606060606060606"
- "INFO --- cornerRadius: 3.967272727272727"
- "INFO --- ratioBug: 0.6546"
extension CGRect
{
// For generic Rectangle
// 28112022 (bug happens at 65%) (cornerRadius / maxRadius)
// radiusFactor: [0, 1]
func getOptimalCornerRadius(radiusFactor: CGFloat) -> CGFloat
{
let minSize = self.sizeMin()
let maxRadius = minSize / 2
let cornerRadius = maxRadius * radiusFactor
return cornerRadius
}
}
```
| null | CC BY-SA 4.0 | null | 2022-11-29T07:22:35.853 | 2022-11-29T07:28:35.713 | 2022-11-29T07:28:35.713 | 44,964 | 44,964 | null |
74,610,846 | 2 | null | 74,610,818 | 0 | null | `IConfiguration` interface is located in `Microsoft.Extensions.Configuration` namespace. You could install [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/) nuget, and get access to IConfiguration interface.
| null | CC BY-SA 4.0 | null | 2022-11-29T08:05:13.770 | 2022-11-29T08:05:13.770 | null | null | 6,917,446 | null |
74,610,865 | 2 | null | 73,057,214 | 1 | null | instead of using @vite call css and js like this
```
<link rel="stylesheet" href="{{ asset('/public/build/assets/app.67dcdfd2.css') }}">
<script src="{{ asset('/public/build/assets/app.87a4a3cb.js') }}"></script>
```
get your CSS and js file from the build folder and replace It
| null | CC BY-SA 4.0 | null | 2022-11-29T08:07:53.873 | 2022-11-29T08:07:53.873 | null | null | 10,319,183 | null |
74,610,859 | 2 | null | 68,613,132 | 0 | null | If you use `Button` inside `Toolbar` SwiftUI will automatically converts it into `ToolBarButton`, which customisation is not possible on `ToolBarButton` . Instead of passing a `Button` you can pass a Custom `View`.
```
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Menu(content: {
Label("My option A", systemImage: "folder.badge.plus")
.onTapGesture {
print("My option A")
}
Label("My option B", systemImage: "doc.badge.plus")
.onTapGesture {
print("My option B")
}
}, label: {
Image(systemName: "plus")
.imageScale(.large)
.background(Color.red)
})
}
}
```
| null | CC BY-SA 4.0 | null | 2022-11-29T08:06:25.950 | 2022-11-29T08:06:25.950 | null | null | 11,320,579 | null |
74,610,885 | 2 | null | 74,610,818 | 0 | null | You can get the configuration like so:
`IConfiguration configuration = builder.Configuration;`
| null | CC BY-SA 4.0 | null | 2022-11-29T08:09:41.927 | 2022-11-29T08:09:41.927 | null | null | 4,797,062 | null |
74,611,229 | 2 | null | 74,610,818 | 1 | null | We can do this:
```
var builder = WebApplication.CreateBuilder(args);
//Get the instance of the IConfiguration service
var configuration = builder.Configuration;
//We can configure configuration variables of type IConfiguration and get a value
var vTestValue = configuration.GetValue<string>("TestValue");
```
| null | CC BY-SA 4.0 | null | 2022-11-29T08:41:51.070 | 2022-11-29T09:21:21.310 | 2022-11-29T09:21:21.310 | 6,299,857 | 5,951,802 | null |
74,611,241 | 2 | null | 74,606,038 | 0 | null | You did not make it entirely clear what result exactly you are after (or what your problem with the morpholocial op's was, exactly), but i had a shot at it.
- Connecting all the "lines" into a single object with a morpholical operation. I used a circular kernel here, which i think gives decent results. No rotation necessary at this point.- Interpolating a line for each object, using coutours. This selects only the largest contours, apply further tresholding as you see fit.
Gives this:
[](https://i.stack.imgur.com/mAq7A.png)
```
import cv2
# get image
img = cv2.imread("<YourPathHere>", cv2.IMREAD_GRAYSCALE)
# threshold to binary
ret, imgbin = cv2.threshold(img,5,255,cv2.THRESH_BINARY)
# morph
dilateKernelSize = 80; erodeKernelSize = 65;
imgbin = cv2.dilate(imgbin, cv2.getStructuringElement(cv2.MORPH_ELLIPSE, [dilateKernelSize,dilateKernelSize]))
imgbin = cv2.erode(imgbin, cv2.getStructuringElement(cv2.MORPH_ELLIPSE, [erodeKernelSize,erodeKernelSize]))
# extract contours
contours, _ = cv2.findContours(imgbin,cv2.RETR_LIST,cv2.CHAIN_APPROX_SIMPLE)
print("Found ",len(contours),"contours")
# fit lines for large contours
lines = []; threshArea = 11000;
for cnt in contours:
if(cv2.contourArea(cnt)>threshArea):
lines += [cv2.fitLine(cnt, cv2.DIST_L2,0,0.01,0.01)] # [vx,vy,x,y]
# show results
imgresult = cv2.cvtColor(imgbin,cv2.COLOR_GRAY2RGB)
cv2.drawContours(imgresult, contours, -1, (255,125,0), 3)
VX_ = 0; VY_ = 1; X_ = 2; Y_ = 3;
rows,cols = imgbin.shape[:2]
p1 = [0,0]; p2 = [cols-1,0];
for l in lines:
p1[1] = int((( 0-l[X_])*l[VY_]/l[VX_]) + l[Y_])
p2[1] = int(((cols-l[X_])*l[VY_]/l[VX_]) + l[Y_])
cv2.line(imgresult,p1,p2,(0,255,255),2)
# save image
print(cv2.imwrite("<YourPathHere>", imgresult))
# HighGUI
cv2.namedWindow("img", cv2.WINDOW_NORMAL)
cv2.imshow("img", img)
cv2.namedWindow("imgresult", cv2.WINDOW_NORMAL)
cv2.imshow("imgresult", imgresult)
cv2.waitKey(0)
cv2.destroyAllWindows()
```
| null | CC BY-SA 4.0 | null | 2022-11-29T08:43:13.057 | 2022-11-29T08:49:08.097 | 2022-11-29T08:49:08.097 | 20,213,170 | 20,213,170 | null |
74,611,386 | 2 | null | 74,611,151 | 0 | null | So I found the answer - I needed to add a custom handlebars helper in the server.js
```
hbs.handlebars.registerHelper('breaklines', function(text) {
text = hbs.handlebars.Utils.escapeExpression(text);
text = text.replace(/(\r\n|\n|\r)/gm, '<br>');
return new hbs.handlebars.SafeString(text);
});
```
Then pass the content through the helper
```
<div class="card">
<div class="card-content">
<p class="title">
{{story.title}}
</p>
<p class="content">
{{breaklines story.content}}
</p>
</div>
</div>
```
| null | CC BY-SA 4.0 | null | 2022-11-29T08:55:32.050 | 2022-11-29T08:55:32.050 | null | null | 19,979,074 | null |
74,611,406 | 2 | null | 74,607,964 | 1 | null | Here is an example with the `chemfig` package
```
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\begin{figure}
\centering
\chemfig{*6(--*6(--*6(-----)---)----)}
\caption{Chain of 3 hexagons}
\end{figure}
\end{document}
```
And the corresponding output
[](https://i.stack.imgur.com/rKYEJ.png)
| null | CC BY-SA 4.0 | null | 2022-11-29T08:56:37.247 | 2022-11-29T08:56:37.247 | null | null | 18,275,876 | null |
74,611,420 | 2 | null | 74,611,262 | 3 | null | You could use [.OrderBy](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.orderby?view=net-7.0) and [.ThenBy](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.thenby?view=net-7.0) to first sort by length, and then by string content.
But you might want to use a numerical sorter that treats numerical digits as numbers and not as characters. This can be done by calling the windows function [StrCmpLogicalW](https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-strcmplogicalw), with a wrapper to implement the IComparable that is needed for sorting:
```
public static class Win32Api
{
[DllImport("shlwapi.dll", CharSet = CharSet.Unicode)]
public static extern int StrCmpLogicalW(string psz1, string psz2);
}
public class NaturalNumberSort : IComparer<string>
{
public static readonly NaturalNumberSort Instance = new NaturalNumberSort();
public int Compare(string x, string y) => Win32Api.StrCmpLogicalW(x, y);
}
```
| null | CC BY-SA 4.0 | null | 2022-11-29T08:57:42.253 | 2022-11-29T08:57:42.253 | null | null | 12,342,238 | null |
74,611,580 | 2 | null | 24,383,194 | 0 | null | Kindly Checkout Internal Link Checker of Elite Site Optimizer helps in Identifying and fixing the Link Errors
| null | CC BY-SA 4.0 | null | 2022-11-29T09:13:40.290 | 2022-11-29T09:13:40.290 | null | null | 20,631,583 | null |
74,611,614 | 2 | null | 74,611,556 | 2 | null | Your script is running before the rendering of the DOM is complete. Try wrapping your preset in an event-listener. That way it's irrelevant in which order scripts and styles are inlined or loaded externally.
```
window.addEventListener("DOMContentLoaded", () => {
const box = document.getElementById("box");
const boxCS = window.getComputedStyle(box)
console.log(boxCS.zIndex)
});
```
Refer to the [MDN documentation on DOMContentLoaded](https://developer.mozilla.org/en-US/docs/Web/API/Window/DOMContentLoaded_event) for details.
| null | CC BY-SA 4.0 | null | 2022-11-29T09:16:41.257 | 2022-12-02T10:33:24.890 | 2022-12-02T10:33:24.890 | 1,329,116 | 1,329,116 | null |
74,611,652 | 2 | null | 74,611,556 | 0 | null | One of the reasons is that you declare styles after the `script`.
If you put it before `script`, it'll be okay.
[Example](https://playcode.io/1022340)
| null | CC BY-SA 4.0 | null | 2022-11-29T09:19:32.437 | 2022-11-29T09:19:32.437 | null | null | 3,443,505 | null |
74,612,032 | 2 | null | 68,613,132 | 0 | null | I'm not sure you can expand the buttons inside the beyond the "safe area".
I just wanted to let you know that the actual button in this case is the and not the in the label, so you're not highlighting the full button. See the full tapping area in green.
Also using a bigger image, like "plus.circle" gives you a bigger area.
##### Example image:
[](https://i.stack.imgur.com/eONAr.png)
##### Example code:
```
.navigationBarBackButtonHidden()
.navigationTitle("Hello World Everyone")
.toolbar {
ToolbarItemGroup(placement: .navigationBarTrailing) {
Menu(content: {
Button(action: {print("option A")}, label: {Label("My option A", systemImage: "folder.badge.plus")})
Button(action: {print("option B")}, label: {Label("My option B", systemImage: "doc.badge.plus")})
}, label: {
Image(systemName: "plus")
.imageScale(.large)
.background(Color.red)
})
.background(Color.green)
Menu(content: {
Button(action: {print("option A")}, label: {Label("My option A", systemImage: "folder.badge.plus")})
Button(action: {print("option B")}, label: {Label("My option B", systemImage: "doc.badge.plus")})
}, label: {
Image(systemName: "plus.circle")
.imageScale(.large)
.background(Color.red)
})
.background(Color.green)
}
}
```
| null | CC BY-SA 4.0 | null | 2022-11-29T09:47:45.980 | 2022-11-29T09:47:45.980 | null | null | 3,575,747 | null |
74,612,236 | 2 | null | 74,612,103 | 0 | null | Select columns not tables [https://dev.mysql.com/doc/refman/8.0/en/select.html](https://dev.mysql.com/doc/refman/8.0/en/select.html) , mysql strings are enclosed in single quotes [When to use single quotes, double quotes, and backticks in MySQL](https://stackoverflow.com/questions/11321491/when-to-use-single-quotes-double-quotes-and-backticks-in-mysql) , convert strings to dates [https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_str-to-date](https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_str-to-date) , test date range - both your tests are >
```
select tbl_product.product_id, count() total
from tbl_product
where date(tbl_product.date) >= str_to_date('2022-11-21','%Y-%m-%d')) and
date(tbl_product.date) <= str_to_date('2022-11-29','%Y-%m-%d'))
group by tbl_product.product_id
```
| null | CC BY-SA 4.0 | null | 2022-11-29T10:01:31.540 | 2022-11-29T10:01:31.540 | null | null | 6,152,400 | null |
74,612,392 | 2 | null | 70,182,922 | 0 | null | I had faced the same issue, and after a lot of search i found that the problem was in relation with the request sent from my postman client.
I had just to mention `Accept: application/json` in headers.
just in case someone faced the same issue in the future.
| null | CC BY-SA 4.0 | null | 2022-11-29T10:12:52.917 | 2022-11-29T10:12:52.917 | null | null | 16,169,640 | null |
74,612,478 | 2 | null | 68,891,507 | 0 | null | ```
For index As Integer = CheckedListBox1.Items.Count - 1 To 0 Step -1
If CheckedListBox1.GetItemChecked(index) Then
CheckedListBox1.Items.RemoveAt(index)
End If
Next
```
| null | CC BY-SA 4.0 | null | 2022-11-29T10:19:33.923 | 2022-11-29T10:19:33.923 | null | null | 20,632,173 | null |
74,612,851 | 2 | null | 74,610,786 | 0 | null | Maybe just use `doit`:
```
In [3]: v, w = symbols('v, w')
In [4]: diff(re(w), v)
Out[4]: 0
In [5]: Derivative(re(w), v)
Out[5]:
d
──(re(w))
dv
In [6]: Derivative(re(w), v).doit()
Out[6]: 0
```
| null | CC BY-SA 4.0 | null | 2022-11-29T10:49:54.887 | 2022-11-29T10:49:54.887 | null | null | 9,450,991 | null |
74,613,526 | 2 | null | 74,581,075 | 0 | null | > Did I miss something ?
Yes, the charset used in MVSC doesn't need to be the same than the one used in the library you are using, or the one selected at runtime. Check your library documentation, to support UNICODE, as it seems to be showing your unicode sequences as iso-latin-1 character pairs.
IMHO Microsoft has taken long to adapt to unicode. Despite MVSC already supports it, it is very probable that the Windows environment/library you use is not supporting it (or configured to) by default. The comment you use in the `CreateWindowW` call is not enough to make it to assume UNICODE characters. You'll probably need to specify it somewhere else.
| null | CC BY-SA 4.0 | null | 2022-11-29T11:39:32.203 | 2022-11-29T11:39:32.203 | null | null | 3,899,431 | null |
74,614,361 | 2 | null | 74,614,162 | 0 | null | If you have Excel 365 current channel, you can use this formula:
```
=LET(splitData,TEXTSPLIT(A2,":",CHAR(10)),
CHOOSECOLS(FILTER(splitData,CHOOSECOLS(splitData,1)="Farve"),2))
```
It first splits the data by colon and linebreak - this will return a two-column matrix. This matrix can be filtered by the first column to be "Farve" ...
| null | CC BY-SA 4.0 | null | 2022-11-29T12:48:51.727 | 2022-11-29T12:48:51.727 | null | null | 16,578,424 | null |
74,614,729 | 2 | null | 26,867,893 | 3 | null | A much simpler way to get the base64 code for Google Fonts is to use the following tool:
[https://amio.github.io/embedded-google-fonts/](https://amio.github.io/embedded-google-fonts/)
input the URL to your font and you get the base64 code back straight away :)
| null | CC BY-SA 4.0 | null | 2022-11-29T13:20:05.213 | 2022-11-29T13:20:05.213 | null | null | 1,842,562 | null |
74,614,751 | 2 | null | 74,590,737 | 0 | null | ```
range I=1..4;
range J=1..3;
int P=1;
int a[I]=[100,100,60,100];
float S=2;
tuple position
{
float x;
float y;
}
position Ipos[I]=[<1,1>,<-1,1>,<1,-1>,<-1,-1>];
position Jpos[J]=[<1,0.5>,<1,-0.5>,<-1,0>];
float d[i in I][j in J]=sqrt((Ipos[i].x-Jpos[j].x)^2+(Ipos[i].y-Jpos[j].y)^2);
{int} N[i in I]={j | j in J:d[i][j]<=S};
dvar float z;
dvar boolean x[J];
dvar boolean y[I];
maximize z;
subject to
{
z==sum(i in I)y[i]*a[i];
forall(i in I) sum(j in N[i]) x[j]>=y[i];
sum(j in J) x[j]==P;
}
```
is a small example
PS:
same question at [IBM Community](https://community.ibm.com/community/user/datascience/discussion/mclp-implementation-in-opl?ReturnUrl=%2Fcommunity%2Fuser%2Fdatascience%2Fcommunities%2Fcommunity-home%2Fdigestviewer%3Fcommunitykey%3Dab7de0fd-6f43-47a9-8261-33578a231bb7)
| null | CC BY-SA 4.0 | null | 2022-11-29T13:21:36.457 | 2022-11-29T13:21:36.457 | null | null | 3,725,596 | null |
74,615,010 | 2 | null | 68,531,003 | -2 | null | Hey I also got this error. But used backslash instead of forward slash (/) to locate the source image and the error got resolved. Hope it helps you.
| null | CC BY-SA 4.0 | null | 2022-11-29T13:40:21.537 | 2022-11-29T19:19:53.317 | 2022-11-29T19:19:53.317 | 17,063,807 | 17,063,807 | null |
74,615,053 | 2 | null | 18,540,645 | 0 | null | For me these are two patterns with different intentions. The bridge pattern is used to avoid the proliferation of subclasses that inheritance mechanisms would eventually lead to. So, if you have, say, 2 orthogonal responsibilities, instead of creating 2**2 subclasses, you make use of composition to combine these responsibilities, two by two, but it says nothing about how this combination will be made (i.e, it has no constructor or set injection, well, not necessarily; it requires no interfaces, etc.). This composition can even be hardcoded!
Dependency injection, on the other hand is used to avoid coupling, by separating the creation of a dependency from its use. For this to be achieved, it demands the help from a third party: the injector. It also makes generous uses of interfaces. What do bridge pattern and DI have in common? Both make use of composition. No more than that.
| null | CC BY-SA 4.0 | null | 2022-11-29T13:42:57.030 | 2022-11-29T14:04:00.683 | 2022-11-29T14:04:00.683 | 1,641,925 | 1,641,925 | null |
74,615,443 | 2 | null | 61,449,169 | 1 | null | Following the [Ninja documentation](https://ninja-build.org/manual.html), you can customize the progress status by setting the `NINJA_STATUS` environment variable with several placeholders.
In your case, to print the percentage you have to set this variable before running ninja (assuming you are running ninja on a unix environment):
```
export NINJA_STATUS="[%p ] "
cmake -GNinja ..
ninja
```
| null | CC BY-SA 4.0 | null | 2022-11-29T14:14:43.643 | 2022-11-29T14:14:43.643 | null | null | 5,851,101 | null |
74,615,482 | 2 | null | 22,398,767 | 0 | null | In case you are in Visual Studio for Mac, going into Unity -> Preferences and clicking on "Regenerate Project Files" fixed it for me.
| null | CC BY-SA 4.0 | null | 2022-11-29T14:17:27.840 | 2022-11-29T14:17:27.840 | null | null | 1,236,879 | null |
74,615,848 | 2 | null | 74,615,638 | -1 | null | In `SQL` you could use a subquery:
```
SELECT Year_, Month_, SUM(Counts)
FROM (
SELECT YEAR(DATEADD(MM,DATEDIFF(MM,0,StartTime),0))'Year_'
,DATENAME(MONTH,DATEADD(MM,DATEDIFF(MM,0,StartTime),0))'Month_'
,TestName
,CASE WHEN Testname = 'POE Business Rules' THEN (count(TestName)*36)
WHEN TestName = 'Submit' THEN (COUNT(TestName)*6)
ELSE 0
END 'Counts'
FROM VExecutionGlobalHistory
GROUP BY YEAR(DATEADD(MM,DATEDIFF(MM,0,StartTime),0))
,DATENAME(MONTH,DATEADD(MM,DATEDIFF(MM,0,StartTime),0))
,TestName
)sub
GROUP BY Year_, Month_
ORDER BY CAST(CAST(Year_ AS CHAR(4)) + Month_ + '01' AS DATETIME)
```
Update: Added `ORDER BY` to sort by YEAR/MONTH oldest first.
| null | CC BY-SA 4.0 | null | 2022-11-29T14:46:33.970 | 2022-11-30T16:23:30.307 | 2022-11-30T16:23:30.307 | 10,276,092 | 20,634,190 | null |
74,615,855 | 2 | null | 30,536,395 | 0 | null | [https://plugins.jetbrains.com/plugin/10080-rainbow-brackets](https://plugins.jetbrains.com/plugin/10080-rainbow-brackets)
this plugin shows color guide lines and much more related
for all JetBrains products
[](https://i.stack.imgur.com/WoSiz.png)
| null | CC BY-SA 4.0 | null | 2022-11-29T14:46:51.533 | 2022-11-29T14:46:51.533 | null | null | 1,474,751 | null |
74,615,877 | 2 | null | 74,548,601 | 0 | null | You might be interested in [How to create a bug automatically in DevOps when the automated test fails in Azure Test Plans](https://stackoverflow.com/q/66955159/3092298). I'm not sure if that will fully address your problem, though.
Alternately you can create a bug work item in C# when the test fails: [Create a bug in Azure DevOps Services using .NET client libraries](https://developercommunity.visualstudio.com/t/create-a-work-item-bug-on-failure-of-specific-test/651799).
---
When you create a bug based on a failing test, the "Links" tab of the new bug links to the failed test as a "Test Result" link.
You can click the link to the test result, which gives you access to the screenshot. It isn't the ideal solution, but there is a way to trace back from the bug to the screenshot.
So the general process is:
1. Go to the failed release or build.
2. Go to the logs for that release.
3. Switch to the "Tests" tab.
4. Choose the failing test in the list.
5. Click the "Bug" action menu item above the list of tests, and choose "Create bug".
6. Switch to the "Links" tab on the new bug work item. You should see a "Test Result" link to the failing test.
There doesn't appear to be an automated way of linking the attachment, as Dou Xu-MSFT said, but there is at least traceability. In the meantime we could call this a "training issue".
| null | CC BY-SA 4.0 | null | 2022-11-29T14:48:11.143 | 2022-12-02T03:08:12.033 | 2022-12-02T03:08:12.033 | 3,092,298 | 3,092,298 | null |
74,615,979 | 2 | null | 64,906,283 | 0 | null | Try adding max-w-full to the container that you want full width.
| null | CC BY-SA 4.0 | null | 2022-11-29T14:55:45.283 | 2022-11-29T14:55:45.283 | null | null | 15,276,103 | null |
74,616,178 | 2 | null | 74,615,755 | 1 | null | Welcome to Stackoverflow!!
Your problem is related to the fact that you are working with exponential numbers, but you're using a linear colormap. For `x=90` you have `z=1.2e+39`, reaaaally large.
You were very close with your second attempt! I just changed 1 line in there, instead of
`norm = mpl.colors.Normalize(vmin=0, vmax=1)`
I used
`norm = mpl.colors.LogNorm()`
And the result I got was the following:
[](https://i.stack.imgur.com/hRFwI.png)
Now, you can tweak this as much as you like in order to get the colors you want :) Just don't forget that your colormap should be normalized in a logarithmic fashion, so that it counters the exponential behaviour of your function in this case.
Hope this helps!
| null | CC BY-SA 4.0 | null | 2022-11-29T15:11:35.557 | 2022-11-29T15:11:35.557 | null | null | 15,405,732 | null |
74,616,189 | 2 | null | 25,672,497 | 0 | null | Today you can run Smartstore in the cloud if you like. Try it here with a free Azure account.
[https://azuremarketplace.microsoft.com/en-us/marketplace/apps/smartstore-ag.smartstorenet](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/smartstore-ag.smartstorenet)
| null | CC BY-SA 4.0 | null | 2022-11-29T15:12:24.503 | 2022-11-29T15:12:24.503 | null | null | 20,634,817 | null |
74,616,298 | 2 | null | 74,616,125 | 0 | null | MongoDB supports [TTL Indexes](https://www.mongodb.com/docs/manual/core/index-ttl/) So I'd suggest the following
1. In your schema add an optional field verificationTimeout. For each newly created user set this value to the current timestamp
2. Create a TLL index on this field with an expireAfterSeconds of your own choice (btw 2 minutes is really short, I'd suggest like 15 minutes or so ...)
3. Once the user is verified, remove the verificationTimeout field from the document
Alternatively, you can also set the `verificationTimeout` to a timestamp where you want your unverified user to be removed and use the `expireAfterSeconds: 1` to remove the user at set defined timestamp.
So, if the user didn't verify within the given timeslot, the mongodb server will invalidate the document and remove it from the collection. But as specified in the docs, documents be invalidated if the don't contain the specified field. So if you remove the `verificationTimeout` upon verification, the user won't be removed from the collection.
And the nice thing about this: You don't need to care about removing unverfied users in your own code. The only thing you need to do is create the index and set/remove the value. Ie no extra worker that scans through the elements and checks if they already expired ...
| null | CC BY-SA 4.0 | null | 2022-11-29T15:19:10.990 | 2022-11-29T20:28:57.793 | 2022-11-29T20:28:57.793 | 3,776,927 | 3,776,927 | null |
74,616,368 | 2 | null | 74,616,247 | 3 | null | Bring your data into powerquery, like using data... from table/range
Add column, index column
Add column, custom column, formula
```
= try [Timestamp] - #"Added Index"{[Index]-1}[Timestamp] otherwise null
```
to be fancy manually edit code to end with
```
#"Added Index" = Table.AddIndexColumn(#"PriorStepNameHere", "Index", 0, 1, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Custom", each try [Timestamp] - #"Added Index"{[Index]-1}[Timestamp] otherwise null, type duration)
in #"Added Custom"
```
[](https://i.stack.imgur.com/M0zQq.jpg)
| null | CC BY-SA 4.0 | null | 2022-11-29T15:24:04.503 | 2022-11-29T17:23:08.670 | 2022-11-29T17:23:08.670 | 9,264,230 | 9,264,230 | null |
74,616,522 | 2 | null | 30,788,173 | 0 | null | When running locally, comment out this in pom and rebuild maven project and then run the application.
```
<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency> -->
```
| null | CC BY-SA 4.0 | null | 2022-11-29T15:35:03.067 | 2022-11-29T15:35:03.067 | null | null | 10,695,946 | null |
74,617,127 | 2 | null | 20,663,545 | 0 | null | Nothing of this worked for me.
My problem was a single warning: "unreachable code" which blocked all errors from being highlighted.
I removed this line of code (+ the warning) and all errors showed up again.
| null | CC BY-SA 4.0 | null | 2022-11-29T16:22:06.413 | 2022-11-29T16:22:06.413 | null | null | 6,077,426 | null |
74,617,434 | 2 | null | 66,584,781 | 0 | null |
## Adding another answer because this is both quite awhile ago but also, a quite different solution
by adding `Frame=False`, works flawlessly and to be sure this really, works I have tested this on numerous previous problems I had previously and it seems to work, I do not know for sure what this is about but, at least it works
```
u = var('u')
circle = (cos(u), sin(u))
revolution_plot3d(circle, (u,0,2*pi), axis=(0,0),
show_curve=True, opacity=0.5).show(aspect_ratio=(1,1,1),
frame=False)
```
[](https://i.stack.imgur.com/DZv25.png)
I also experimented a bit with `opacity=1`
[](https://i.stack.imgur.com/m67Mu.png)
| null | CC BY-SA 4.0 | null | 2022-11-29T16:45:41.190 | 2022-11-29T16:45:41.190 | null | null | 14,346,786 | null |
74,617,784 | 2 | null | 74,617,572 | 0 | null |
# Changing the upload limit size takes just 5 steps
1. Go to Plugin editor from the left menu panel in the admin dashboard.
2. Top right, Choose All-in-one WP Migration from the dropdown and click select.
3. Click on constants.php file.
4. Search for the word AI1WM_MAX_FILE_SIZE. Change it’s value, refer below code: define( ‘AI1WM_MAX_FILE_SIZE’, 2 << 28 ); To define( ‘AI1WM_MAX_FILE_SIZE’, 536870912 * 5 );
If you even want more than 3 GB then change value from 536870912 * 5 to 536870912 * 10( or any number).
Don’t forget to update the file.
1. Enjoy the new upload size
If the upload size has not changed go to the .htaccess file in the server root folder and add the below lines.
```
php_value upload_max_filesize 2048M
php_value post_max_size 2048M
php_value memory_limit 512M
php_value max_execution_time 300
php_value max_input_time 300
```
| null | CC BY-SA 4.0 | null | 2022-11-29T17:15:09.750 | 2022-11-29T17:27:06.737 | 2022-11-29T17:27:06.737 | 9,920,595 | 9,920,595 | null |
74,617,781 | 2 | null | 74,617,147 | 0 | null | If you are using an external JavaScript file then you can call the function by adding event listeners in the JavaScript file.
Otherwise, you need to create tag and write the whole javascript code. Then it will work.
```
let slides = document.getElementsByClassName("slides");
let balls = document.getElementsByClassName("balls");
[...balls].forEach((element, index) => {
element.addEventListener("click", () => currentSlide(index + 1))
})
let slideInd = 1;
showSlides(slideInd);
function showSlides(input){
if (input > slides.length) {slideInd = 1}
if (input < 1 ) {slideInd = slides.length}
for (let i=0; i < slides.length; i++){
slides[i].style.display = "none";
}
for (let i=0; i < balls.length; i++){
balls[i].className = balls[i].className.replace(" active","");
}
slides[slideInd-1].style.display = "block";
balls[slideInd-1].className += " active";
}
function currentSlide(input) {
showSlides(slideInd = input);
}
```
```
.sw-containter{
max-width: 1560px;
position: relative;
margin: auto;
}
.slides{
display: none;
}
.slides img{
max-width: 1535px;
vertical-align: middle;
}
.text{
background-color: #000000;
color: white;
font-family: 'Source Code Pro', monospace;
font-weight: 400;
text-align: center;
position: absolute;
width: 1535px;
}
.balls{
cursor: pointer;
display: inline-block;
position: relative;
height: 10px;
width: 10px;
margin: 45px 3px;
background-color: #000000;
border-radius: 50%;
transition: background-color 0.6s ease;
}
.active, .balls:hover{
background-color: #D9D9D9;
}
.fade{
animation-name: fade;
animation-duration: 1s;
}
@keyframes fade{
from{opacity: .4;}
to {opacity: 1;}
}
```
```
<div class="sw-container">
<div class="slides fade">
<img src="https://images.unsplash.com/photo-1472214103451-9374bd1c798e?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8cGljfGVufDB8fDB8fA%3D%3D&w=1000&q=80" style="width:100%;">
<div class="text">Released on September 30th! Buy now!</div>
</div>
<div class="slides fade">
<img src="https://i.pinimg.com/736x/f7/75/7d/f7757d5977c6ade5ba352ec583fe8e40.jpg" style="width:100%">
<div class="text">Releases on Octber 27th. Preorder Now!</div>
</div>
<div class="slides fade">
<img src="https://images.pexels.com/photos/670720/pexels-photo-670720.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" style="width:100%">
<div class="text">Preorders live now!</div>
</div>
</div>
<!--slider balls-->
<div style="text-align:center;">
<span class="balls"></span>
<span class="balls"></span>
<span class="balls"></span>
</div>
```
| null | CC BY-SA 4.0 | null | 2022-11-29T17:14:54.057 | 2022-11-29T17:14:54.057 | null | null | 17,786,138 | null |
74,618,028 | 2 | null | 74,617,289 | 0 | null | The JS SDK actions.order.create / actions.order.capture are for very simple use cases. If you are going to do anything automated with the order information after capture, including saving it to a database, create and capture the order from a server.
Use the v2/checkout/orders API and make two routes (url paths) on your server, one for 'Create Order' and one for 'Capture Order'. You could use one of the (recently deprecated) Checkout-*-SDKs for the routes' API calls to PayPal, or your own HTTPS implementation of first getting an access token and then doing the call. Both of these routes should return/output JSON data (no HTML or text). Inside the 2nd route, when the capture API is successful you should verify the amount was correct and store its resulting payment details in your database (particularly `purchase_units[0].payments.captures[0].id`, which is the PayPal transaction ID) and perform any necessary business logic (such as reserving product or sending an email) immediately forwarding return JSON to the frontend caller. In the event of an error forward the JSON details of it as well, since the frontend must handle such cases.
Pair those 2 routes with this frontend approval flow: [https://developer.paypal.com/demo/checkout/#/pattern/server](https://developer.paypal.com/demo/checkout/#/pattern/server) . (If you need to send any additional data from the client to the server, such as an items array or selected options, add a `body` parameter to the fetch with a value that is a JSON string or object)
| null | CC BY-SA 4.0 | null | 2022-11-29T17:33:45.230 | 2022-11-29T17:33:45.230 | null | null | 2,069,605 | null |
74,618,133 | 2 | null | 14,780,006 | 0 | null | As of Android 31+, is a new API that handles all of this natively.
[https://developer.android.com/reference/android/graphics/RenderEffect](https://developer.android.com/reference/android/graphics/RenderEffect)
Example:
```
view.setRenderEffect(RenderEffect.createBlurEffect(blurRadiusX, blurRadiusY, Shader.TileMode.MIRROR));
```
Another example: [https://medium.com/poqcommerce/rendereffect-using-androids-new-api-to-solve-image-rendering-problems-90f7d7c49127](https://medium.com/poqcommerce/rendereffect-using-androids-new-api-to-solve-image-rendering-problems-90f7d7c49127)
| null | CC BY-SA 4.0 | null | 2022-11-29T17:41:50.653 | 2022-11-29T17:41:50.653 | null | null | 8,150,296 | null |
74,618,173 | 2 | null | 74,610,786 | 0 | null | The `doit` is good since, otherwise, an unevaluated `Derivative(x, y)` will not evaluate to 0. But...if you want to do as requested, you can use a `replace` command to look for a derivative whose argument is `re` or `im` like this, using the `args` and `func` attributes of the expressions:
```
>>> eq = Derivative(re(x),y)
>>> eq.replace(
... lambda x: isinstance(x, Derivative) and isinstance(x.args[0], (re,im)),
... lambda x: x.args[0].func(x.func(x.args[0].args[0], *x.args[1:])))
re(Derivative(x, y))
```
| null | CC BY-SA 4.0 | null | 2022-11-29T17:45:01.877 | 2022-11-29T17:45:01.877 | null | null | 1,089,161 | null |
74,618,320 | 2 | null | 21,366,549 | 0 | null | This helped me. Hope it helps you
remove
import 'dart:html'; unused
| null | CC BY-SA 4.0 | null | 2022-11-29T17:57:06.450 | 2022-11-29T17:57:06.450 | null | null | 10,689,410 | null |
74,618,859 | 2 | null | 73,118,844 | 0 | null | You've created the structure , but you haven't done the implementation in GVL.
You have to add in GVL:
```
VAR_GLOBAL
sample_structure : sample_structure;
END_VAR
```
| null | CC BY-SA 4.0 | null | 2022-11-29T18:45:02.283 | 2022-11-29T18:47:32.220 | 2022-11-29T18:47:32.220 | 20,637,236 | 20,637,236 | null |
74,619,090 | 2 | null | 74,577,033 | 0 | null | Here's a pretty cool way to do it with MILP if you have OPTMODEL! This program:
- `b1``b2`- - -
Data:
```
data have;
input account balance;
datalines;
9999 110
9998 111
9997 112
9996 113
9995 114
9994 115
9993 116
9992 117
9991 118
9990 119
;
run;
```
Optimization code:
```
proc optmodel;
set ACCOUNTS;
num balance{ACCOUNTS};
read data have into ACCOUNTS=[account] balance;
var b1{ACCOUNTS} binary,
b2{ACCOUNTS} binary,
z integer /* To linearize absolute value in the objective function */
;
/* n of buckets 1 and 2 */
impvar n1 = sum{a in ACCOUNTS} (1*b1[a]);
impvar n2 = sum{a in ACCOUNTS} (1*b2[a]);
/* Total balance of each bucket */
impvar total_balance1 = sum{a in ACCOUNTS} (b1[a]*balance[a]);
impvar total_balance2 = sum{a in ACCOUNTS} (b2[a]*balance[a]);
/* Difference of balances between buckets */
impvar dif = total_balance1 - total_balance2;
/* Linearize absolute value: abs(n1 - n2) must be <= 3 */
con n1 - n2 <= 3;
con -(n1-n2) <= 3;
/* Linearize absolute value in objective function */
con dif <= z;
con -dif <= z;
/* Must use all observations */
con n1 + n2 = sum{a in ACCOUNTS} (1);
/* Both cannot be 1 */
con use_once {a in ACCOUNTS}: (b1[a] + b2[a]) <= 1;
min total = z;
solve;
create data want
from [account] = ACCOUNTS
balance[account]
b1[account]
b2[account]
;
print balance b1 b2 n1 n2 dif total_balance1 total_balance2;
quit;
```
Then use a data step to separate them out:
```
data want1
want2
;
set want;
if(b1) then output want1;
else output want2;
drop b1 b2;
run;
```
Output Want1:
```
account balance
9998 111
9996 113
9994 115
9993 116
9991 118
```
Output Want2:
```
account balance
9999 110
9997 112
9995 114
9992 117
9990 119
```
[](https://i.stack.imgur.com/gE2sx.png)
Totally overkill, but a fun exercise.
| null | CC BY-SA 4.0 | null | 2022-11-29T19:07:35.233 | 2022-11-29T19:07:35.233 | null | null | 5,342,700 | null |
74,619,267 | 2 | null | 74,615,638 | 0 | null | `Dplyr summarize across everything` method:
```
df<-data.frame(publication_date=c("2015 Jul","2015 Jul","2015 Aug","2015 Aug"),
Asym=c(3,5,1,2),
Auth=c(5,7,2,3),
Cert=c(1,2,3,4))
library(tidyverse)
df %>%
group_by(publication_date) %>%
summarize(across(everything(), sum))
# publication_date Asym Auth Cert
#1 2015 Aug 3 5 7
#2 2015 Jul 8 12 3
```
`base::xtabs()` method, requires naming all the columns:
```
xtabs(cbind(Auth, Asym, Cert)~., data=df)
#publication_date Auth Asym Cert
# 2015 Aug 5 3 7
# 2015 Jul 12 8 3
```
Alternative thanks to @akrun [https://stackoverflow.com/a/74619313/10276092](https://stackoverflow.com/a/74619313/10276092)
```
xtabs(sprintf("cbind(%s)~.", toString(names(df)[-1])), data = df)
```
| null | CC BY-SA 4.0 | null | 2022-11-29T19:24:43.233 | 2022-11-29T22:02:12.023 | 2022-11-29T22:02:12.023 | 10,276,092 | 10,276,092 | null |
74,619,542 | 2 | null | 47,645,836 | 0 | null | ```
$models = VoucherThemeModel::find([
'conditions' => 'voucher_theme_id IN ({ids:array})',
'bind' => ['ids' => $voucher_ids]
]);
$models->delete();
```
| null | CC BY-SA 4.0 | null | 2022-11-29T19:51:54.293 | 2022-11-29T19:51:54.293 | null | null | 5,412,675 | null |
74,620,030 | 2 | null | 74,619,838 | 0 | null | You might have to change soup.find in dictionary to get the data you want.
```
import json
dictionary = {
"title": soup.find("title"),
"date": soup.find("date")
}
json_object = json.dumps(dictionary, indent=4)
with open("saveFile.json", "w") as outfile:
outfile.write(json_object)
```
| null | CC BY-SA 4.0 | null | 2022-11-29T20:38:40.850 | 2022-11-29T20:38:40.850 | null | null | 20,421,592 | null |
74,620,051 | 2 | null | 74,616,247 | 0 | null | Since you are new to this, I will try to help you out as much as I can, feel free to ask any question.
1. You can to go into power query (transform data) and create an index column this will give each datetime as unique identifier.
2. Create a custom column using this code TimeDiff = if('Sheet1'[Index] <> 1, Sheet1[Timestamp] - LOOKUPVALUE ( Sheet1[Timestamp], Sheet1[Index], Sheet1[Index] - 1 ))
3. In format, select h:nn:ss and this will display you difference
| null | CC BY-SA 4.0 | null | 2022-11-29T20:40:51.167 | 2022-11-29T20:40:51.167 | null | null | 20,053,349 | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.