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,851,934
2
null
74,812,079
1
null
TIMEOUT means that the underlying process (dali) was able to start but wasn't able to write-out its sentinel file. The sentinel file write-out is generally the last step in each processes setup logic. This means the problem is likely some resource dali was trying to access that it couldn't find, or didn't have permissions to access. To figure out exactly why there is an issue we need to go into the log files for that specific process (dali). Those logs should be located at /var/log/HPCCSystems/mydali/server. Find the log with the date stamp pertaining to when the issue occurred and you should see a line that says "Build community_-1". That line is the first line output at startup. Read after that line and you should get a clue to what the underlying problem is.
null
CC BY-SA 4.0
null
2022-12-19T14:35:48.867
2022-12-19T14:35:48.867
null
null
20,815,587
null
74,851,937
2
null
74,851,717
1
null
In react component props passing, you cannot take it like taking from function. You defined "title" in props of component, but you cannot take it as a variable. You have to take it as shorthand. ``` // your code; export default function Cerd(title){ // must be; \/ export default function Cerd({title}){ ``` Try ({title}) instead of (title).
null
CC BY-SA 4.0
null
2022-12-19T14:36:01.587
2022-12-19T14:36:01.587
null
null
14,098,917
null
74,852,293
2
null
74,851,351
0
null
Just change `'black'` to `(0, 0, 0, 0)` ``` from PIL import Image, ImageDraw import requests img = Image.new('RGBA', (500, 500), (0, 0, 0, 0)) canvas = ImageDraw.Draw(img) logo = Image.open(requests.get('https://api-assets.clashofclans.com/badges/70/-1w_sJci3z0Z8XYk-PT9vDhgJzmgzrhdxPbKAUD298s.png', stream=True).raw) img.paste(logo.convert('RGBA')) img.show() ```
null
CC BY-SA 4.0
null
2022-12-19T15:04:51.250
2022-12-19T15:04:51.250
null
null
14,293,274
null
74,852,645
2
null
74,852,468
0
null
Here is one of many ways to get the desired output: You assign the summary of the model to an object, and then extract the coefficients using `coef()` function, and then bind it with the variable names and the corresponding importance into a data frame. You then sort the rows based on the values of importance by using `order()`. ``` sum_mod <- summary(model_one) dat <- data.frame(VariableName = rownames(imp$importance), Importance = unname(imp$importance), Coefficient = coef(sum_mod)[rownames(imp$importance),][,1], row.names = NULL) dat <- dat[order(dat$Importance, decreasing = TRUE),] ``` The result: ``` VariableName Importance Coefficient 1 IV1 100.00000 1.0999732 4 IV4 74.48458 3.6665775 2 IV21 34.43803 -7.8831404 3 IV3 0.00000 -0.9166444 ```
null
CC BY-SA 4.0
null
2022-12-19T15:35:51.460
2022-12-20T02:42:26.530
2022-12-20T02:42:26.530
14,812,170
14,812,170
null
74,852,979
2
null
74,852,911
0
null
You can use a `StreamBuilder` and the snapshots to stream the value, so when there's a change, the UI gets updated automatically like so: ``` class HomePage extends StatelessWidget { const HomePage({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( body: Center( child: StreamBuilder<DocumentSnapshot>( stream: FirebaseFirestore.instance .collection('guthaben') .doc("loggedInUser?.email") .snapshots(), builder: (context, snapshot) { if (snapshot.hasData) { return const CircularProgressIndicator(); } return Text((snapshot.data!.data() as Map)["geld"].toString()); }, ), ), ); } } ``` If you want to get the value just once, you can use a `FutureBuilder` like so: ``` class HomePage extends StatelessWidget { const HomePage({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( body: Center( child: FutureBuilder<DocumentSnapshot>( future: FirebaseFirestore.instance .collection('guthaben') .doc("loggedInUser?.email") .get(), builder: (context, snapshot) { if (snapshot.hasData) { return const CircularProgressIndicator(); } return Text((snapshot.data!.data() as Map)["geld"].toString()); }, ), ), ); } } ```
null
CC BY-SA 4.0
null
2022-12-19T16:01:57.787
2022-12-19T16:01:57.787
null
null
11,452,511
null
74,853,119
2
null
49,095,692
0
null
For me, the issue was when I was prompted by VS Code if I wanted it to "auto fetch" every now and then and I said yes. This added the highlighted setting in my terminal which caused the issues. Once I deleted this, it worked like normal again. [](https://i.stack.imgur.com/bcoX3.png)
null
CC BY-SA 4.0
null
2022-12-19T16:11:46.057
2022-12-19T16:11:46.057
null
null
18,238,527
null
74,853,196
2
null
74,844,403
0
null
I suppose my total failure to find the solution yesterday was the result of a long day of coding and a lotta bit of doy-ness. So, after a getting a good night's sleep, I took another look at the problem with fresh eyes. This time around, I played with the normalization function and applied it to every possible vector that would take it, and I found that the solution was to just multiply the triangle vertex vectors by the tessellated triangle vertex coordinates (to put the new primitives in their respective octants) and then normalize the sum (to make the vectors lie on a sphere). The tessellation evaluation shader code looks as follows: ``` #version 460 core // Triangles layout (triangles, equal_spacing , ccw) in; layout(location = 0) uniform mat4 modelMatrix; layout(location = 1) uniform mat4 camMatrix; void main() { vec3 TC = gl_TessCoord; vec4 pos0 = gl_in[0].gl_Position; vec4 pos1 = gl_in[1].gl_Position; vec4 pos2 = gl_in[2].gl_Position; vec3 pos = normalize( TC.x * pos0.xyz + TC.y * pos1.xyz + TC.z * pos2.xyz); gl_Position = camMatrix * modelMatrix * vec4(pos, 1.f); } ``` For those tuning in, the camMatrix is a product of the view and projection matrices, so that the tessellated sphere has a dynamic level of detail. The dynamic LOD can be seen as follows: [](https://i.stack.imgur.com/2MjD4.png) [](https://i.stack.imgur.com/xCgHs.png) [](https://i.stack.imgur.com/QIYqQ.png) Overall, I am very happy with the results. The tessellation amount can be edited in the tessellation control shader, as well as the minimum and maximum distances for the tessellation. Sometimes the solution is just waiting behind the door of tomorrow!
null
CC BY-SA 4.0
null
2022-12-19T16:19:59.273
2022-12-19T16:19:59.273
null
null
20,778,291
null
74,853,298
2
null
74,852,561
0
null
# Client.read_chat_history() Mark a chat’s message history as read. - - Parameters: - (`int` | `str`) – Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use “me” or “self”. For a contact that exists in your Telegram address book you can use his phone number (str).- (`int`, ) – The id of the last message you want to mark as read; all the messages before this one will be marked as read as well. Defaults to 0 (mark every unread message as read). Returns: `bool` - On success, True is returned. EXAMPLE ``` # Mark the whole chat as read await app.read_chat_history(chat_id) # Mark messages as read only up to the given message id await app.read_chat_history(chat_id, 12345) ```
null
CC BY-SA 4.0
null
2022-12-19T16:28:20.633
2022-12-19T16:28:20.633
null
null
13,390,799
null
74,853,697
2
null
74,849,552
0
null
The failure was signal ILL: > Illegal instruction. The ILL signal is sent to a process when it attempts to execute a malformed, unknown, or privileged instruction. Starting with version 5.0 MongoDB requires that the CPU support the [Advanced Vector Extensions](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions). The machine you are attempting to start mongod on does not support AVX. You will need to either use a different computer, or downgrade to mongodb version 4.4 or earlier.
null
CC BY-SA 4.0
null
2022-12-19T17:04:49.160
2022-12-19T17:04:49.160
null
null
2,282,634
null
74,853,735
2
null
51,288,576
0
null
For anyone struggling with SSH tunnel. I found that sometimes `127.0.0.1` is not being translated back to `localhost` before privileges are being check. Try setting up a grant for `127.0.0.1` with the following. ``` GRANT ALL PRIVILEGES ON *.* TO 'user'@`127.0.0.1`; ``` This did the trick for me.
null
CC BY-SA 4.0
null
2022-12-19T17:08:42.867
2022-12-19T17:08:42.867
null
null
3,693,312
null
74,853,824
2
null
74,853,515
5
null
Now that the grid package supports clipping paths, we can do: ``` library(grid) library(ggplot2) tg <- textGrob("Get me off\nYour Fuck\ning Mailing\nList", x = 0.2, hjust = 0, gp = gpar(cex = 6, col = "grey", font = 2)) cg <- pointsGrob(x= runif(15000), y = runif(15000), pch = 3, gp = gpar(cex = 0.5)) rg <- rectGrob(width = unit(0.5, 'npc'), height = unit(0.1, 'npc'), gp = gpar(fill = 'red')) ggplot(data = NULL, aes(x = 100, y = 100)) + geom_point(col = 'white') + theme_classic() + theme(panel.border = element_rect(fill = 'white', linewidth = 1)) pushViewport(viewport(clip = tg)) grid.draw(cg) ``` [](https://i.stack.imgur.com/Dh9fv.png)
null
CC BY-SA 4.0
null
2022-12-19T17:18:07.730
2022-12-19T18:53:46.020
2022-12-19T18:53:46.020
12,500,315
12,500,315
null
74,854,013
2
null
74,852,129
1
null
I'm not sure if the distance you're getting is correct 'cause I don't know the value of innerCeilingAdjustmentOffset and outerCeilingAdjustmentOffset variables. But have you tried to get the distance like they do in the official documentation? Like this: ``` if (outer && !inner) { RaycastHit2D hit = Physics2D.Raycast(transform.position + new Vector3(innerCeilingAdjustmentOffset, ceilingAdjustmentCheckDistance), Vector2.left, outerCeilingAdjustmentOffset, groundLayer); float distanceToMove = Mathf.Abs(hit.point.x - transform.position.x); transform.position = new Vector2(transform.position.x + distanceToMove, transform.position.y); } ``` For reference: [https://docs.unity3d.com/ScriptReference/Physics2D.Raycast.html](https://docs.unity3d.com/ScriptReference/Physics2D.Raycast.html)
null
CC BY-SA 4.0
null
2022-12-19T17:34:49.153
2022-12-19T17:34:49.153
null
null
2,359,882
null
74,854,070
2
null
74,760,543
1
null
Just want to draw your attention to `insertMany` [issue-5337](https://github.com/Automattic/mongoose/issues/5337) which is similar to your question, they resolved it differently, like below: > [https://github.com/Automattic/mongoose/issues/5783#issuecomment-341590245](https://github.com/Automattic/mongoose/issues/5783#issuecomment-341590245)`rawResult`[#5698](https://github.com/Automattic/mongoose/pull/5698)`insertMany()``ordered: false`[the driver handles it](http://mongodb.github.io/node-mongodb-native/2.2/api/Collection.html#insertMany)`rawResult: true` - `ordered: false``ordered` ``` User.collection.insertMany(req.body, { rawResult: true, ordered: false }) .then(users => { console.log(users) }) .catch(err => { console.log(`Error: ${err}`); }); ``` Console Print: ``` { acknowledged: true, insertedCount: 3, insertedIds: { '0': new ObjectId("63a09dcaf4f03d04b07ec1dc"), '1': new ObjectId("63a09dcaf4f03d04b07ec1de") '2': new ObjectId("63a0a0bdfd94d1d4433e77da") }, mongoose: { validationErrors: [ [ Error: WASetting validation failed: .... at ValidationError.inspect (...) ... errors: { itemId: [ValidatorError] }, _message: '.....' ], [ Error: WASetting validation failed: .... at ValidationError.inspect (...) ... errors: { itemId: [ValidatorError] }, _message: '....' ] ] } } ``` You can see the above response, this is not giving which object failed. --- Currently, I would suggest [@NeNaD's solution](https://stackoverflow.com/a/74846112/8987128).
null
CC BY-SA 4.0
null
2022-12-19T17:41:21.800
2022-12-19T17:41:21.800
null
null
8,987,128
null
74,854,463
2
null
74,854,342
0
null
Use the below: ``` contours, hierarchy = cv2.findContours(gray, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) ``` You have to use a single channel input in findContours function. Changing your input to "gray", which is single channel, should fix this.
null
CC BY-SA 4.0
null
2022-12-19T18:20:03.627
2022-12-19T18:20:03.627
null
null
18,752,453
null
74,854,583
2
null
74,852,310
0
null
Does this work for you? ``` wait = WebDriverWait(driver, timeout=30) producto = wait.until(ec.element_to_be_clickable((By.ID, "ReportViewerControl_ctl04_ctl05_txtValue"))) ```
null
CC BY-SA 4.0
null
2022-12-19T18:31:21.597
2022-12-19T18:31:21.597
null
null
2,532,408
null
74,854,734
2
null
74,826,300
0
null
Using the "runs" list of paragraph objects, I can check each attribute, like color, if the text is bold or italic, and after that, make an "html tag" where I can get these parameters using BeatifullSoup: ``` def get_paragraphs(doc, paragraphs = []): for p in doc.paragraphs: if p.text: if p.text[0] == r'{': continue if p.text.isspace(): continue runs_text = [] for r in p.runs: text_tag = f'<text color="{r.font.color.rgb}">{r.text}</text>'.replace('Before', 'After') runs_text.append(text_tag) p.text = '' # turn html to paragraphs for text_tag in runs_text: tag = BeautifulSoup(text_tag).find('text') text = tag.text run = p.add_run(text) color = tuple(int(tag.get('color')[i:i+2], 16) for i in (0, 2, 4)) run.font.color.rgb = RGBColor(*color) paragraphs.append(p.text) for table in doc.tables: for row in table.rows: for cell in row.cells: get_paragraphs(cell, paragraphs) if not doc._parent: return paragraphs ```
null
CC BY-SA 4.0
null
2022-12-19T18:44:53.347
2022-12-19T18:44:53.347
null
null
16,464,891
null
74,854,798
2
null
72,061,702
1
null
This can be done through the use of `inline` view actions. [Tree View View Actions VSCode Docs Link](https://code.visualstudio.com/api/extension-guides/tree-view#view-actions) An example of how to do this: `package.json` ``` { ..., commands: { { "command": "myCommand", "title": "Command title", "icon": "images/some-icon.svg" // this is in the root of your extension project } }, menus: { "view/item/context": [ { "command": "myCommand", "when": "viewItem == myTreeItemContextValue", // Make sure to sync this value on each TreeItem to fulfill the "when" check "group": "inline" } ] } } ``` Your `TreeItem` definition ``` export class MyTreeItem extends TreeItem { constructor( public readonly name: string, public readonly collapsibleState: TreeItemCollapsibleState, public readonly contextValue: string = 'myTreeItemContextValue' ) { super(name, collapsibleState); } } ```
null
CC BY-SA 4.0
null
2022-12-19T18:50:17.417
2022-12-19T18:50:17.417
null
null
3,612,910
null
74,854,809
2
null
74,853,515
3
null
If you want to actually generate random points sampled from within text, you could do this using Python's Numpy and Pillow modules relatively easily. ``` import numpy as np import matplotlib.pyplot as plt from PIL import Image, ImageDraw, ImageFont lines = ["Get me off", "your Fuck", "ing Mailing", "List"] # get a nice heavy font font = ImageFont.truetype("fonts/Lato-Black.ttf", size=200) # calculate width width = max(font.getbbox(line)[2] for line in lines) # create BW image containing text im = Image.new('1', (width, len(lines) * font.size)) draw = ImageDraw.Draw(im) for i, line in enumerate(lines): draw.text((0, i * font.size), line, font=font, fill=1) # sample points y, x = np.where(np.array(im) > 0) ii = np.random.randint(len(x), size=sum(map(len, lines)) * 50) x = x[ii] / im.width y = y[ii] / im.height # recreate figure fig, ax = plt.subplots() ax.semilogy() ax.scatter(x, 10**(y*-5), 7**2, linewidths=0.5, marker='+', color='black') ax.set_xlabel("Your Fucking Mailing List") ax.set_ylabel("Get me off") ax.set_title("Get me off Your Fucking Mailing List") ``` which might produce something like: [](https://i.stack.imgur.com/hPqsy.png) The lack of masking makes it more difficult to see the letters, but given you seemed to want points for clustering this might not matter so much.
null
CC BY-SA 4.0
null
2022-12-19T18:51:24.497
2022-12-19T18:51:24.497
null
null
1,358,308
null
74,854,962
2
null
74,854,821
0
null
Add a new calculated column to convert the values to durations and then they can be easily added. ``` = Table.AddColumn(#"Changed Type", "Custom", each #duration( 0, Number.From( Text.BeforeDelimiter([Sick],":")), Number.From( Text.AfterDelimiter([Sick],":")), 0), type duration) ```
null
CC BY-SA 4.0
null
2022-12-19T19:04:27.037
2022-12-19T19:04:27.037
null
null
18,345,037
null
74,855,120
2
null
74,853,515
1
null
Using matplotlib and clipping, this doesn't (unfortunately) handle multi-lines easily: ``` import matplotlib.pyplot as plt from matplotlib.textpath import TextPath from matplotlib.font_manager import FontProperties from matplotlib.transforms import IdentityTransform import numpy as np ax = plt.subplot() N = 7000 x = np.random.random(size=N) y = np.random.random(size=N) ax.scatter(x, y, marker='+', color='k', lw=0.5) text = 'StackOverflow' text = TextPath((60, 200), text, prop=FontProperties(weight='bold', size=55), ) ax.collections[0].set_clip_path(text, transform=IdentityTransform()) ``` Output: [](https://i.stack.imgur.com/wt3Xd.png)
null
CC BY-SA 4.0
null
2022-12-19T19:23:51.837
2022-12-19T19:23:51.837
null
null
16,343,464
null
74,855,146
2
null
73,184,553
3
null
This is how npx is designed to work. Basically it's always best to run npx with `@latest` appended to the package. So `npx create-react-flask@latest` in your case See [https://github.com/npm/cli/issues/4108](https://github.com/npm/cli/issues/4108) There's a (somewhat involved) workaround here: [https://github.com/npm/cli/issues/2329#issuecomment-873487338](https://github.com/npm/cli/issues/2329#issuecomment-873487338)
null
CC BY-SA 4.0
null
2022-12-19T19:26:51.483
2022-12-19T19:26:51.483
null
null
88,106
null
74,855,410
2
null
59,816,160
0
null
First of all, you should use the named export instead of default export to works barrel export correctly. You can read [this article](https://blog.logrocket.com/using-barrel-exports-organize-react-components/) to why you have to use named exports in barrel file. Therefore, if you change the models/counter.tsx file as below, your problem will resolve. ``` export interface ICounter { id: number; value: number; } ```
null
CC BY-SA 4.0
null
2022-12-19T19:55:54.490
2022-12-19T19:55:54.490
null
null
10,775,791
null
74,855,568
2
null
74,853,777
2
null
Use QML [ProgressBar](https://doc.qt.io/qt-6/qml-qtquick-controls2-progressbar.html) and bind the download progress to the `value` property. [Here](https://doc.qt.io/qt-6/qtquickcontrols2-customize.html#customizing-progressbar) you can find more information about how to style the ProgressBar to fit your needs. The `Timer` is just used to simulate the download progress. As @Ľubomír Carik mentioned you should connect the [QNetworkReply::downloadProgress()](https://doc.qt.io/qt-6.2/qnetworkreply.html#downloadProgress) from your backend to the `value` of the `ProgressBar`. ``` import QtQuick import QtQuick.Controls import QtQuick.Shapes Window { id: root width: 320 height: 100 visible: true color: "#232323" component CustomProgressBar : ProgressBar { id: control value: 0.5 background: Rectangle { implicitWidth: 200 implicitHeight: 20 color: "#4c4c4c" radius: 8 } contentItem: Item { implicitWidth: 200 implicitHeight: 20 Rectangle { width: control.visualPosition * parent.width height: parent.height radius: 8 color: "#c4a469" } } } Row { anchors.centerIn: parent spacing: 8 Shape { anchors.verticalCenter: parent.verticalCenter width: 16 height: 16 layer.enabled: true layer.smooth: true layer.samples: 4 ShapePath { strokeColor: "#c4a469" strokeWidth: 1 fillColor: "transparent" PathSvg { path: "M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z" } PathSvg { path: "M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z" } } } CustomProgressBar { id: progressBar } Text { anchors.verticalCenter: parent.verticalCenter width: 30 color: "white" text: Math.trunc(progressBar.value * 100) + "%" } } Timer { interval: 100 running: true repeat: true onTriggered: { if (progressBar.value < 1) progressBar.value += 0.01 else progressBar.value = 0 } } } ``` [](https://i.stack.imgur.com/y0VuG.png)
null
CC BY-SA 4.0
null
2022-12-19T20:14:21.790
2022-12-19T21:28:40.780
2022-12-19T21:28:40.780
525,038
525,038
null
74,855,590
2
null
74,844,033
2
null
Oscar has given several nice answers using the Groebner basis; beside the one above see also [this one](https://stackoverflow.com/questions/73426459/why-sympy-does-not-solve-my-nonlinear-system-python-interpreter-remains-in-exec/73427515#73427515). If you apply that approach to your equations you will find that there are 8 solutions (but mainly 2, with permutations of signs on terms...and mainly 1 when you consider symmetry of exchanging z1 and z2 while exchanging w1 and w2). First compute the basis of the equations in form `f(X) = 0; X = (z1,z2,w1,w2)` ``` from sympy import * ... ...your work from above ... F = Tuple(*[i.rewrite(Add) for i in (eq1,eq2,eq3,eq4)]) X = (z1,z2,w1,w2) G, Y = groebner(F, X) G = Tuple(*G) # to make substitution easier below ``` G[-1] is a 12th order polynomial in w2 for which the real roots can be found: there are 4. ``` w2is = real_roots(G[-1]) assert len(w2is) == 4 # [i.n(3) for i in w2is] -> [-3.39, -3.02, 3.02, 3.39] ``` G[0] and G[1] are linear in z1 and z2, respectively, and G[2] is quadratic in w1. So substituting in a value for w2 and solving should give 2 solutions for each value of w2 for a total of 8 solutions. ``` sols = [] for _w2 in w2is: for si in solve(G[:-1].subs(w2,_w2.n()), dict=True): si.update({w2:_w2}) sols.append(si) print({k: v.n(2) for k,v in si.items()}) ``` ``` {w1: -3.0, z1: -0.96, z2: -0.62, w2: -3.4} {w1: 3.0, z1: 0.96, z2: -0.62, w2: -3.4} {w1: -3.4, z1: -0.62, z2: -0.96, w2: -3.0} {w1: 3.4, z1: 0.62, z2: -0.96, w2: -3.0} {w1: -3.4, z1: -0.62, z2: 0.96, w2: 3.0} {w1: 3.4, z1: 0.62, z2: 0.96, w2: 3.0} {w1: -3.0, z1: -0.96, z2: 0.62, w2: 3.4} {w1: 3.0, z1: 0.96, z2: 0.62, w2: 3.4} ```
null
CC BY-SA 4.0
null
2022-12-19T20:16:18.533
2022-12-19T20:16:18.533
null
null
1,089,161
null
74,855,616
2
null
74,853,777
1
null
Visual part can be handled as explained by @iam_peter. Investigate header in [QNetworkReply](https://doc.qt.io/qt-6.2/qnetworkreply.html) to calculate value/percentage. Many servers return the size of data that will be sent (not all).
null
CC BY-SA 4.0
null
2022-12-19T20:20:38.263
2022-12-19T20:20:38.263
null
null
5,310,544
null
74,855,723
2
null
74,855,699
1
null
`Space` like any other view in a XML layout has some mandatory attributes you are not providing: `android:layout_width` and `android:layout_height`. Omitting these produces the red error underline.
null
CC BY-SA 4.0
null
2022-12-19T20:34:34.227
2022-12-19T20:34:34.227
null
null
101,361
null
74,855,812
2
null
27,458,570
0
null
best and simple way you first migrate viewpager to viewpager 2 and then just one line code you can disable swiping touch page `viewPager2.setUserInputEnabled(false);` and enable `viewPager2.setUserInputEnabled(enable);` Please check : [Migrate from ViewPager to ViewPager2](https://developer.android.com/training/animation/vp2-migration)
null
CC BY-SA 4.0
null
2022-12-19T20:45:40.317
2022-12-19T20:45:40.317
null
null
14,357,615
null
74,856,111
2
null
74,855,942
0
null
You can remove the `offense_category` from the `select` list and the `group by` clause so the query only groups by year: ``` SELECT year_time, COUNT(*) AS total_crime_incidents FROM rms_crime_incidents GROUP BY year_time ORDER BY year_time DESC ```
null
CC BY-SA 4.0
null
2022-12-19T21:18:13.303
2022-12-19T21:18:13.303
null
null
2,422,776
null
74,856,230
2
null
74,856,173
-1
null
@Shawn is right: you are using integer math to calculate Pi. You should `#include <math.h>` and use `M_PI` instead of trying to calculate it yourself.
null
CC BY-SA 4.0
null
2022-12-19T21:30:38.000
2022-12-19T21:35:21.650
2022-12-19T21:35:21.650
850,332
850,332
null
74,856,269
2
null
74,856,078
1
null
You're getting that error because you are calling `pop()` within your template, since `pop()` removes the last element from the array. You'll need to access the last element in a different way. The simplest way to do this is probably: ``` {{ optionsForVideoPostGraph?.series[0]?.data[optionsForVideoPostGraph.series[0].data.length] }} ```
null
CC BY-SA 4.0
null
2022-12-19T21:34:58.840
2022-12-19T21:34:58.840
null
null
11,790,081
null
74,856,318
2
null
64,014,770
0
null
This is the AG Grid issue. The AG Grid (tested with 28.2.1) is not refreshing state when an `isRowSelectable` function is changed. You can force set row selectable by the `setRowSelectable` function ``` apiRef.current?.grid?.forEachNode( (rowNode: RowNode) => rowNode.setRowSelectable(isSelectable(rowNode)) ) ``` Below a fork of the NearHuscarl approach with declared react dependencies on the `useCallback` and the `useState` functions. ``` const [rowData, setRowData] = React.useState<Athlete[]>([]); const [criterial, setCriteria] = React.useState(true); const isSelectable = React.useCallback((rowNode: RowNode) => { const result = rowNode.data.age > 25; const selectable = result === criterial; return selectable; }, [criterial]); const toggleCriteria = React.useCallback(() => { setCriteria((c) => !c); }, []); React.useEffect(() => { apiRef.current?.grid?.deselectAll(); apiRef.current?.grid?.forEachNode( (rowNode: RowNode) => rowNode.setRowSelectable(isSelectable(rowNode)) ) }, [apiRef, isSelectable]); return ( <> <button onClick={toggleCriteria}>Toggle Criteria</button> <AgGridReact rowSelection="multiple" suppressRowClickSelection columnDefs={columnDefs} onGridReady={onGridReady} isRowSelectable={isSelectable} rowData={rowData} /> </> ); ``` ## Live Demo [enter link description here](https://codesandbox.io/s/64014770-aggridreact-grid-does-not-update-when-isrowselectable-changes-forked-1wyl81?file=/src/Grid.tsx)
null
CC BY-SA 4.0
null
2022-12-19T21:40:31.343
2022-12-19T21:40:31.343
null
null
1,953,486
null
74,856,357
2
null
74,853,777
0
null
There is insufficient information to do this in `QML` alone. I checked the `XMLHttpRequest`, but the `onprogress` signal doesn't seem to fire. So there doesn't appear to be a way with that component. Alternatively, you can implement your own with `QNetworkAccessManager`, `QNetworkRequest` and watch for the events in `QNetworkReply`. This was hinted by @Ľubomír-carik. If you're uploading and downloading, then there are two signals of interest: - [https://doc.qt.io/qt-6/qnetworkreply.html#uploadProgress](https://doc.qt.io/qt-6/qnetworkreply.html#uploadProgress)- [https://doc.qt.io/qt-6/qnetworkreply.html#downloadProgress](https://doc.qt.io/qt-6/qnetworkreply.html#downloadProgress) It will be up to you to combine the results from these signals, e.g. you can assume 50% of the time is spent in uploading your payload and 50% of the time is spent in downloading your response. It will be up to you how to calculate a single `progress` by combining the information above. Then you can feed it into a progress bar. - [https://doc.qt.io/qt-6/qml-qtquick-controls2-progressbar.html#value-prop](https://doc.qt.io/qt-6/qml-qtquick-controls2-progressbar.html#value-prop) However, as @@Ľubomír-carik indicated not all requests are required to populate `Content-Length` for which how the downloadProgress is given. If `Content-Length` is not available, the information from downloadProgress is equivalent to non-determinate. So, you could either (1) leave the download progress stuck at 50% and jump to 100% when it's complete or (2) have an animation during the indeterminate download phase. - [https://doc.qt.io/qt-6/qml-qtquick-controls2-progressbar.html#indeterminate-prop](https://doc.qt.io/qt-6/qml-qtquick-controls2-progressbar.html#indeterminate-prop)
null
CC BY-SA 4.0
null
2022-12-19T21:46:10.267
2022-12-19T21:46:10.267
null
null
881,441
null
74,856,392
2
null
74,855,782
1
null
You should iterate from right to left. E.g. For `1` to `5`, you create 5 arrays `{1}, {2}, {3}, {4}, {5}`. For each of those 5 arrays, you prepend the next element, `0`. It is the same, so you would have no nested loops. You now have `{0, 1}, {0, 2}, {0, 3}, {0, 4}, {0, 5}`. Then `C` to `E`, this has a nested loop. `{C, 0, 1}`, `{D, 0, 1}, {E, 0, 1}, {C, 0, 2}`, and so on. Should end up with 15 elements. ... Repeat until you reach index zero in both strings. Then convert those arrays into strings, and print. If order matters, then sort the strings afterwards rather than during this process. Ideally, you check that your input strings have the same length before starting this process, as well as validate each index are both digits or letters, as you mention.
null
CC BY-SA 4.0
null
2022-12-19T21:49:54.203
2022-12-19T21:49:54.203
null
null
2,308,683
null
74,856,401
2
null
74,855,782
1
null
your approach for nested for loops, one for each letter, may end up being potentially technically correct; however, it is extremely inflexible and not really in DRY (Don't Repeat Yourself) best practices. I would advise iterating over each index of the first string and adding to it until you get to the next string. Break the problem into pieces. First figure out how to find all the characters between two characters, and then use that to find all the strings between two strings by applying that function to each character. Something like ``` public char[] FindAllCharactersBetween(char start, char end) { var result = new List<char>(); var iter = start + 1; while(iter < end) { result.Add(iter); iter++; } return result.ToArray(); } ``` Use something like that to iterate over each index of start and substitute the results of that function in for each character.
null
CC BY-SA 4.0
null
2022-12-19T21:51:20.947
2022-12-19T21:51:20.947
null
null
920,319
null
74,856,438
2
null
74,855,782
0
null
If you do ``` var start = "the cat"; for (int i =0; i<5; i++) { var loop = start.Remove(0); Console.WriteLine(loop); } ``` you will get 5 times `"he cat"`. `Remove` does not mutate the original string. Neither does `Insert`. If you need to keep changes, you need to reassign the var: ``` var start = "the cat"; for (int i =0; i<5; i++) { start = start.Remove(0); Console.WriteLine(start); } ``` Will then go ``` he cat e cat cat cat at ``` Note that this only explains why your code does what it does and how you can fix that. The result would still be highly inefficient and inflexible. The changes for you would be: ``` String res = string1; for (char letter0 = start[0]; letter0 <= end[0]; letter0++) { for (char letter1 = start[1]; letter1 <= end[1]; letter1++) { for (char letter2 = start[2]; letter2 <= end[2]; letter2++) { for (char letter3 = start[3]; letter3 <= end[3]; letter3++) { for (char letter4 = start[4]; letter4 <= end[4]; letter4++) { res = res.Remove(4).Insert(4, letter4.ToString()); Console.WriteLine(res); } res = res.Remove(3).Insert(3, letter3.ToString()); } res = res.Remove(2).Insert(2, letter2.ToString()); } res = res.Remove(1).Insert(1, letter1.ToString()); } res = res.Remove(0).Insert(0, letter0.ToString()); } ``` I have not tested it, though. Also: ! Find a better solution. This is for educational purposes at best.
null
CC BY-SA 4.0
null
2022-12-19T21:55:40.207
2022-12-19T22:20:35.310
2022-12-19T22:20:35.310
982,149
982,149
null
74,856,447
2
null
74,846,681
0
null
Unfortunately Instagram banned my IP because I sent too many requests. I could find out that the API expects the `X-IG-App-ID` header with a number. I am not sure whether or not it actually needs the 15 digit number. Try this code: ``` import requests headers = {'X-IG-App-ID': '743845927482847'} # random 15 digit number response = requests.get('https://www.instagram.com/api/v1/users/web_profile_info/?username=kateannedesigns', headers=headers) json_data = response.json() print(response.status_code) print(json_data) ```
null
CC BY-SA 4.0
null
2022-12-19T21:56:50.500
2022-12-19T21:56:50.500
null
null
15,133,040
null
74,856,484
2
null
74,855,782
1
null
Increment the rightmost character, starting from the first value, until the second one (e.g. from 1 to 5). Then reset to the first and carry to the next character to the left. Note that in the case of the 0, the carry immediately causes an overflow of the value, causing a reset and a carry to the next (C). The enumeration stops on a carry out of the leftmost character. ABC01 > ABC02 > ABC03 > ABC04 > ABC05 > ABC0=ABC1=ABD01 > ABD02 > ABD03 > ABD04 > ABD05 > ABD00=ABD1=ABE01 > ABE02 > ABE03 > ABE04 > ABE05 > ABE0=ABE1=AB11=ACC01 ...
null
CC BY-SA 4.0
null
2022-12-19T22:01:17.783
2022-12-19T22:01:17.783
null
null
null
null
74,856,640
2
null
72,746,841
0
null
I had this issue, it took me a while to find a fix. It turns out one may need to explicitly set the SDK directory and/or android studio directory: `flutter config --android-sdk q:\tools\android\SDK` `flutter config --android-studio-dir q:\tools\android` The symptom (command-line utils not installed) was just because flutter didn't have a place to look. No idea why that wasn't set when I installed Flutter itself, but ... that's what it turned out to be.
null
CC BY-SA 4.0
null
2022-12-19T22:22:39.243
2022-12-19T22:22:39.243
null
null
4,589,780
null
74,856,644
2
null
37,446,064
0
null
This works with small numbers! ``` if (require("lme4") && require("glmmTMB")) { weird <- scales::trans_new("signed_log", transform=function(x) sign(x)*log1p(abs(x)), inverse=function(x) sign(x)*expm1(abs(x))) p<- plot_model(fit.me.model) p+ scale_y_continuous(trans=weird) } ``` [](https://i.stack.imgur.com/4jW9C.png) [r](/questions/tagged/r) [randomeffects](/questions/tagged/randomeffects) [lme4](/questions/tagged/lme4) [glmmtmb](/questions/tagged/glmmtmb)
null
CC BY-SA 4.0
null
2022-12-19T22:23:01.740
2022-12-23T03:32:00.663
2022-12-23T03:32:00.663
11,450,207
11,450,207
null
74,856,660
2
null
74,847,162
0
null
Use `Sheet.getRangeList().setNumberFormat()`, like this: ``` function onEdit(e) { const settings = { rangesA1: ['B3:B5', 'C6:C8',], dollar: '$', euro: '€', }; let sheet; if (!e || !e.value) { return; } const currency = settings[e.value.toLowerCase()]; if (!currency || e.range.getA1Notation() !== 'A3' || (sheet = e.range.getSheet()).getName() !== 'Sheet1') { return; } const format = `${currency}#,###.00`; sheet.getRangeList(settings.rangesA1).setNumberFormat(format); } ```
null
CC BY-SA 4.0
null
2022-12-19T22:25:18.640
2022-12-20T21:29:36.427
2022-12-20T21:29:36.427
13,045,193
13,045,193
null
74,856,855
2
null
74,856,637
0
null
one solution I could think of in HTML is using a . ``` <head> <meta http-equiv="refresh" content="10"> </head> ``` This will auto-reload the page every 10s, if you don't want this behaviour, another solution is using setInterval. --- The method calls a function at specified intervals (in milliseconds) [learn setInterval](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) ``` let count = 10; const element = document.getElementById("demo"); setInterval(function() { count+=1; element.innerHTML = count; }, 1000); ``` ``` <!DOCTYPE html> <html> <body> count: <p id="demo"></p> </body> </html> ```
null
CC BY-SA 4.0
null
2022-12-19T22:55:41.533
2022-12-19T22:55:41.533
null
null
13,751,770
null
74,857,008
2
null
74,856,027
0
null
You can use `ROW_NUMBER` function subtracted from 'Next Date' to create groups for consecutive dates per campaign code, then use `DENSE_RANK` function to select only the first consecutive group for each campaign code. ``` With get_groups As ( Select *, Date_add('day', -ROW_NUMBER() Over (Partition By CampaignCode Order By NextDate), NextDate) As grp From table_name ), get_ranks As ( Select *, DENSE_RANK() OVER (Partition By CampaignCode Order By grp) As rnk From get_groups ) Select CampaignCode, CurrentDate, CampaignStartDate, DaysSinceCampaign, NextDate, Nextdate_CurrentDate From get_ranks Where rnk = 1; ``` You may try to google "gaps and islands problem in SQL" for more details about this problem. Side Note: ('Days Since Campaign', 'Campaign Start Date' and 'Next date - Current Date') can be easily calculated from other columns, so you don't need to store them in the table.
null
CC BY-SA 4.0
null
2022-12-19T23:19:46.470
2022-12-20T00:08:36.143
2022-12-20T00:08:36.143
12,705,912
12,705,912
null
74,857,330
2
null
27,467,155
2
null
I recently had this same error, but it was due to an outbound firewall / monitoring tool silently killing the download requests in the background. Sometimes the problem isn't Android Studio or your gradle configuration at all!
null
CC BY-SA 4.0
null
2022-12-20T00:14:40.530
2022-12-20T00:14:40.530
null
null
4,821,759
null
74,857,535
2
null
74,856,173
0
null
> ... but it is giving me 50.000000 ... OP is using integer math in many places where floating point math is needed. ``` void circumference_fn(int r) { float pie = 22 / 7; // Integer math!! float circum = (2 * pie * r); printf(", Circumference = %f", circum); } void area_fn(int r) { float pie = 22 / 7; // Integer math!! pie not used float area = (22 * r * r / 7);// Integer math!! printf(" & the Area = %f", area); } ``` Instead use FP math. Scant reason to use `float`. Use `double` as the default FP type. Rather than approximate π with 22/7, use a more precise value. ``` #define PIE 3.1415926535897932384626433832795 void circumference_fn(int r) { double circum = (2 * PIE * r); printf(", Circumference = %f", circum); } void area_fn(int r) { double area = PIE * r * r; printf(" & the Area = %f", area); } ``` --- - All three functions should take a `double` argument and return a `double`.- Use `"%g"` for printing. It is more informative with wee values and less verbose with large ones.
null
CC BY-SA 4.0
null
2022-12-20T00:57:34.530
2022-12-20T01:40:23.617
2022-12-20T01:40:23.617
2,410,359
2,410,359
null
74,857,553
2
null
74,846,224
1
null
Quoting the [Parameters and arguments](https://design.raku.org/S06.html#line_707) section of the S06 specification/speculation document about the related issue of binding arguments to routine parameters: > Array and hash parameters are simply bound "as is". (Conjectural: future versions ... may do static analysis and forbid assignments to array and hash parameters that can be caught by it. This will, however, only happen with the appropriate `use` declaration to opt in to that language version.) Sure enough the Rakudo compiler implemented some rudimentary static analysis (in its AOT compilation optimization pass) that normally (but see footnote 3 in [this SO answer](https://stackoverflow.com/a/54713872/1077672)) insists on binding `@` routine parameters to values that do the `Positional` role and `%` ones to `Associative`s. I think this was the case from the first official Raku supporting release of Rakudo, in 2016, but regardless, I'm pretty sure the "appropriate `use` declaration" is any language version declaration, including none. If your/our druthers are static typing for the win for `@` and `%` sigils, and I think they are, then that's presumably very appropriate! --- Another source is the IRC logs. A quick search quickly got me nothing. Hmm. Let's check the blame for the above verbiage so I can find when it was last updated and maybe spot contemporaneous IRC discussion. [Oooh](https://github.com/Raku/old-design-docs/commit/1903a509e3ac4fefbd769673e6a26eb84fee31fa). That is an extraordinary read. "oversight" isn't the right word. I don't have time tonight to search the IRC logs to see what led up to that commit, but I daresay it's interesting. The previous text was talking about a PL design I really liked the sound of in terms of immutability, such that code could become increasingly immutable by simply swapping out one kind of scalar container for another. Very nice! But reality is important, and Jonathan switched the verbiage to the implementation reality. The switch toward static typing certainty is welcome, but has it seriously harmed the performance and immutability options? I don't know. Time for me to go to sleep and head off for seasonal family visits. Happy holidays...
null
CC BY-SA 4.0
null
2022-12-20T01:02:11.430
2022-12-20T01:02:11.430
null
null
1,077,672
null
74,857,540
2
null
74,857,115
0
null
If some items could possibly be removed from the list of refs, perhaps try add a `filter` for null refs when setting new sizes to see if it avoids any errors in the use case. ``` useEffect(() => { setSizes((prev) => { // Added a filter for null ref item const newSizes = sectionsRef.current .filter((item) => !!item) .map((item) => { const { height } = item.getBoundingClientRect(); return height; }); const total = newSizes.reduce((acc, cur) => acc + cur, 0); const newProportions = newSizes.map((size) => Math.round((size / total) * 100) ); return newProportions; }); }, []); ``` Regarding the part, a basic implement could be calling `getBoundingClientRect()` on the items to get a set of `height` and assign a calculated percentage to each element in the right bar. Live demo with basic implement: [stackblitz](https://stackblitz.com/edit/react-ynhpce?file=src/App.js) Noted that as a basic solution, this currently runs on elements mounting and does not consider events that may impact the heights, such as window resizes. Further detection of such changes could be added, but not without some throttling also likely to be needed, so it could handle situations when changes happen too often. Example: First add a state for sizes and set it when the elements (already referenced in the original answer) mount, with help of `useEffect`. When setting the values, perhaps use `getBoundingClientRect` to calculate a percentage for each section: More about [getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect) ``` const [sizes, setSizes] = useState([]); useEffect(() => { setSizes((prev) => { const newSizes = sectionsRef.current.map((item) => { const { height } = item.getBoundingClientRect(); return height; }); const total = newSizes.reduce((acc, cur) => acc + cur, 0); const newProportions = newSizes.map((size) => Math.round((size / total) * 100) ); return newProportions; }); }, []); ``` Secondly, assign the calculated percentage value to the elements: ``` <div id="scrollbar"> {sections.map((section, index) => { return ( <div className="scroll-element" key={index} style={{ flexBasis: sizes[index] ? `${sizes[index]}%` : "auto" }} onClick={() => handleScroll(index)} > {index} </div> ); })} </div> ``` Not sure if I understand the goal of the styles, so this answer will focus on this part: > how would someone use useRef to solve this issue As a possible solution, perhaps try use an array `ref` to select the `SectionComponent` instead of `querySelectorAll`. A basic live demo for the example below: [stackblitz](https://stackblitz.com/edit/react-tgpryn?file=src%2FApp.js,src%2Fstyle.css) First configure `SectionComponent` to forward `ref` to its output element. Here `props.children` is used as it is a common pattern to add content, but it is totally optional. More about: [forwardRef](https://beta.reactjs.org/blog/2018/03/29/react-v-16-3#forwardref-api) ``` import React from 'react'; const SectionComponent = React.forwardRef((props, ref) => { return ( <div className="section" ref={ref}> {props.children} </div> ); }); ``` Secondly, define the ref as an array and assign to the elements in `map()`: More about: [ref as a list](https://beta.reactjs.org/learn/manipulating-the-dom-with-refs#how-to-manage-a-list-of-refs-using-a-ref-callback) ``` import React, { useRef } from 'react'; const sectionsRef = useRef([]); ``` ``` <div className="sections"> {sections.map((section, index) => { return ( <SectionComponent key={index} ref={(ele) => (sectionsRef.current[index] = ele)} > {`Section ${index}: ${section}`} </SectionComponent> ); })} </div> ``` Then to achieve the functionality with `scrollIntoView`, perhaps define a handler for scrolling and assign it to the elements in `scrollbar`. ``` const handleScroll = (index) => { if (!sectionsRef.current[index]) return; sectionsRef.current[index].scrollIntoView({ behavior: "smooth" }); }; ``` ``` <div id="scrollbar"> {sections.map((section, index) => { return ( <div className="scroll-element" key={index} onClick={() => handleScroll(index)} > {index} </div> ); })} </div> ```
null
CC BY-SA 4.0
null
2022-12-20T00:58:31.423
2023-01-11T23:49:46.183
2023-01-11T23:49:46.183
20,436,957
20,436,957
null
74,857,704
2
null
74,857,665
0
null
Is this what you are looking for? ``` attach(airquality) Month <- factor(Month, labels = month.abb[5:9]) test <- pairwise.wilcox.test(Ozone, Month) print(test[["p.value"]]) ```
null
CC BY-SA 4.0
null
2022-12-20T01:35:53.170
2022-12-20T01:35:53.170
null
null
20,738,806
null
74,857,867
2
null
74,847,696
0
null
After careful consideration, I was lucky to get a more plausible explanation, which I now state as follows to help others. In a short conclusion: Returning to the problem at the beginning, the given image size is 1080×1920, and its focal length is 1040 pixels, i.e. fx=fy=1040, because by definition fx=f/dx,fy=f/dy, where dx, dy are the number of pixels per unit length, and f is the actual physical size of the focal length; thus the a priori dx=dy can be introduced, which is constant This "convention" should also be followed for later image scaling. Imagine if the scaled image fx,fy were obtained in different proportions, dx,dy would not be the same, causing distortion of the image, and in addition, according to the external projection matrix P = K*[R,t], fx,fy in K would vary disproportionately leading to a deviation in the calculated P! --- BTW, Similarly, I put the reference answer to the experiment done by matlab at this [link](https://www.mathworks.com/matlabcentral/answers/1880992-question-the-coordinates-of-the-reconstructed-3d-points-are-different-after-the-virtual-camera-intr#answer_1131962).
null
CC BY-SA 4.0
null
2022-12-20T02:08:59.703
2022-12-20T02:27:52.580
2022-12-20T02:27:52.580
9,939,634
9,939,634
null
74,857,929
2
null
74,857,665
1
null
Does the `pairwise_wilcox_test()` function from the rstatix package ([https://rpkgs.datanovia.com/rstatix/reference/wilcox_test.html](https://rpkgs.datanovia.com/rstatix/reference/wilcox_test.html)) provide your expected outcome? I.e. using Damian Oswald's example: ``` library(tidyverse) library(rstatix) attach(airquality) Month <- factor(Month, labels = month.abb[5:9]) test <- pairwise_wilcox_test(data = airquality, formula = Ozone ~ Month) test #> # A tibble: 10 × 9 #> .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif #> * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr> #> 1 Ozone 5 6 26 9 82 0.193 0.579 ns #> 2 Ozone 5 7 26 26 110. 0.00003 0.0003 *** #> 3 Ozone 5 8 26 26 128. 0.000121 0.001 ** #> 4 Ozone 5 9 26 29 284 0.119 0.476 ns #> 5 Ozone 6 7 9 26 51.5 0.014 0.085 ns #> 6 Ozone 6 8 9 26 57.5 0.026 0.13 ns #> 7 Ozone 6 9 9 29 132. 0.959 1 ns #> 8 Ozone 7 8 26 26 348 0.862 1 ns #> 9 Ozone 7 9 26 29 578. 0.000744 0.006 ** #> 10 Ozone 8 9 26 29 552 0.003 0.023 * # I think the "statistic" column is what you're after test$statistic #> W W W W W W W W W W #> 82.0 109.5 127.5 284.0 51.5 57.5 132.5 348.0 577.5 552.0 ``` [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2022-12-20T02:23:57.553
2022-12-20T02:23:57.553
null
null
12,957,340
null
74,857,939
2
null
74,857,851
0
null
You have to manage each childrens state separatory. I think it's best to manage them in filteredFAQ by adding ``` bool isExpanded ``` property there. but you can achive by manage them as separated property like ``` final items = List<bool>.generate(filteredFAQ.length, (index) => false); ``` and change their state when they're expanded ``` items[index] = !items[index] ``` here's a sample complete code ``` Column(children: List.generate( filteredFAQ.length, (index) => Column( children: [ if(index > 0) { Container( child: Column( children: <Widget>[ ExpansionTile( trailing: SvgPicture.string( items[index] ? addPayeeArrowUp : rightArrow, color: primary, ), onExpansionChanged: (bool expanded) { setState(() { items[index] = !items[index]; }); }, ), ], ) ) } ] ) ),); ``` And don't forget to initalize items at where you initialize filteredFAQ If you provide a whole code in the widget I can complete it if you need more information
null
CC BY-SA 4.0
null
2022-12-20T02:26:16.333
2022-12-20T02:26:16.333
null
null
13,728,645
null
74,857,943
2
null
74,857,851
0
null
To only change the icon of the expanded tile, you can use this approach: create a `Map`: ``` Map<int, bool> state = {}; ``` and use it accordingly in your `ExpansionTile` to check whether it's selected, if the value is `true` or `false`: ``` List.generate(6, (index) { return ExpansionTile( title: Text('Item $index'), trailing: state[index] ?? false ? Icon(Icons.arrow_drop_up) : Icon(Icons.arrow_drop_down), onExpansionChanged: (value) { setState(() { state[index] = value; }); }, children: [ Container( height: 100, color: Colors.red, ), ], ); }), ``` --- Complete runnable example: ``` import 'package:flutter/material.dart'; const Color darkBlue = Color.fromARGB(255, 18, 32, 47); void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( theme: ThemeData.dark().copyWith( scaffoldBackgroundColor: darkBlue, ), debugShowCheckedModeBanner: false, home: Scaffold( body: Center( child: MyWidget(), ), ), ); } } class MyWidget extends StatefulWidget { @override State<MyWidget> createState() => _MyWidgetState(); } class _MyWidgetState extends State<MyWidget> { Map<int, bool> state = {}; bool isExpanded = false; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Flutter Demo Home Page'), ), body: Column( children: // generate 6 ExpansionTiles List.generate(6, (index) { return ExpansionTile( title: Text('Item $index'), trailing: state[index] ?? false ? Icon(Icons.arrow_drop_up) : Icon(Icons.arrow_drop_down), onExpansionChanged: (value) { setState(() { state[index] = value; }); }, children: [ Container( height: 100, color: Colors.red, ), ], ); }), ), ); } } ```
null
CC BY-SA 4.0
null
2022-12-20T02:26:57.673
2022-12-20T02:26:57.673
null
null
12,349,734
null
74,858,015
2
null
74,765,588
0
null
Remove this line > pieChart.setUsePercentValues(true); You can also use the Tasks class instead of nesting queries.
null
CC BY-SA 4.0
null
2022-12-20T02:38:42.393
2022-12-20T02:38:42.393
null
null
19,787,762
null
74,858,052
2
null
74,857,652
0
null
There are probably a few ways you could do it depending on what you care about. Do you want it to be fast, or accurate? Here is a way you could do it geometrically that should be fairly accurate, and with some optimizations, could be pretty fast. You'll need a way to identify contours 45 and 22. In the question you identified them as the two large horizontal lines. That is a good place to start. A simple way to do it would be to iterate through all the contours and keep track of the min and max point values. The horizontal lines will be the largest distance in the min/max X direction and have a relatively small distance between min and max Y. It will probably requires some tweaking and defining some more rules for what is allowed to be considered a "horizontal line". Once you have the horizontal lines identified, the next step is removing all the ones above and below them. Doing this for the top and bottom will be the same, just in opposite directions. I'll walk through how you could do it with the top line. Each contour is made up of smaller individual line segments. For each linesegment in the horizontal line's contour, check that every other contour (each segment in said contour) is either above it, or intersects with it. If either is true, then you can remove it. For a large number of contours, or very complex contours, this will be quite slow. There are a number of optimizations you could make. You could simplify the contour shapes. Or compute bounding boxes around them and check the bounding box is above the horizontal line, if it intersects, you can look at it closer and see if the line itself intersects.
null
CC BY-SA 4.0
null
2022-12-20T02:44:18.743
2022-12-20T02:44:18.743
null
null
17,604,843
null
74,858,076
2
null
74,857,935
0
null
You can do this: ``` original_content= 'A|10.5|B|12' content = original_content.split('|') result = zip(content[0::2], content[1::2]) print(list(result)) ```
null
CC BY-SA 4.0
null
2022-12-20T02:47:59.763
2022-12-20T02:47:59.763
null
null
10,314,175
null
74,858,243
2
null
74,857,755
0
null
All the arguments to `cbar_kwargs` are passed to [matplotlib.figure.Figure.colorbar](https://matplotlib.org/stable/api/figure_api.html#matplotlib.figure.Figure.colorbar). From the docs: > : If None, ticks are determined automatically from the input. : If None, ScalarFormatter is used. Format strings, e.g., "%4.2e" or "{x:.2e}", are supported. An alternative Formatter may be given instead. When you pass in `ticks`, you (correctly) use floats to specify the tick values. But floats in python do not have a specific format - in python, `0.2` is identical in every way to `0.20000` - they're the same object. To specify the formatter to use, pass in the `format` argument. The simplest formatter, which will work in the cases you provide, is the default string formatter, `"{}".format`, e.g.: ``` prect_c[tag, :, :].plot.contourf( ax=axp, transform=ccrs.PlateCarree(), cmap=cmaps.rainbow, levels=np.insert(np.arange(0., 2.1, 0.1), 1, 0.001), add_colorbar=True, add_labels=False, extend='max', cbar_kwargs={ 'orientation': 'horizontal', 'shrink': 0.8, 'pad': 0.08, 'label': 'mm/day', 'ticks': [0.001, 0.2, 0.5, 1.0, 1.5, 2.0], 'format': "{}".format, }, ) ``` For more options, see the matplotlib docs on [Tick Formatters](https://matplotlib.org/stable/gallery/ticks/tick-formatters.html).
null
CC BY-SA 4.0
null
2022-12-20T03:22:19.027
2022-12-20T03:22:19.027
null
null
3,888,719
null
74,858,291
2
null
74,820,227
0
null
It's the spaces in `Md Zin Bin Dekan`. Use `C:\Users\Md~1` or remove the spaces from the directory
null
CC BY-SA 4.0
null
2022-12-20T03:32:14.753
2022-12-25T21:21:54.250
2022-12-25T21:21:54.250
367,865
18,815,704
null
74,858,334
2
null
74,858,097
0
null
You can use [Scrollable List](https://pub.dev/packages/scrollable_positioned_list) which provide you the way to fulfill your requirements
null
CC BY-SA 4.0
null
2022-12-20T03:44:14.673
2022-12-20T03:44:14.673
null
null
10,835,478
null
74,858,388
2
null
74,851,304
0
null
To clear the console, you can execute `clear()` (notice the parenthesis after), or even `console.clear()`. Basically, as noticed above, you are likely accessing a global element from the DOM. In this case, you should be calling the `clear()` function or `console.clear()` function, rather than just entering the variable.
null
CC BY-SA 4.0
null
2022-12-20T03:57:45.643
2022-12-20T03:57:45.643
null
null
13,315,530
null
74,858,582
2
null
74,855,699
0
null
If you hover over the error, you'd notice a popup appearing. In this case, you are missing 2 compulsory attributes (width and height). adding them will remove the error. [](https://i.stack.imgur.com/IKMIQ.png)
null
CC BY-SA 4.0
null
2022-12-20T04:40:58.330
2022-12-20T04:40:58.330
null
null
908,821
null
74,858,811
2
null
67,320,990
0
null
use following TextFiledDefaults.textFieldColors properties to change background color ``` OutlinedTextField( value = exampleName ?: "", onValueChange = onExampleChange, colors = TextFieldDefaults.textFieldColors( textColor = MaterialTheme.colors.onSurface, disabledTextColor = Color.Transparent, backgroundColor = MaterialTheme.colors.surface, focusedIndicatorColor = Color.Transparent, unfocusedIndicatorColor = Color.Transparent, disabledIndicatorColor = Color.Transparent ), ``` ...... )
null
CC BY-SA 4.0
null
2022-12-20T05:24:03.837
2022-12-20T05:24:03.837
null
null
8,650,454
null
74,858,815
2
null
74,823,577
0
null
From your image, it's a little unclear what defines the plane that is your limit? I'm going to assume that it is the plane defined by the face of a box, and the normal vector to that face. You know the camera position, and the direction of your ray, so once you define your plane, you should be able to calculate the intersection of that plane with your ray. See [Ray-plane intersection](https://www.scratchapixel.com/lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ray-plane-and-ray-disk-intersection) by Scratchapixel. They have done an excellent job breaking down the equations that make this work. (Note, for this code I have renamed the `l` variables to `r`, as the variable `l0` was somewhat easy to mistake for the constant `10`) In a LocalScript, try this... ``` local WorldWorkspace = game:GetService("Workspace") local Players = game:GetService("Players") local part = WorldWorkspace.Part local camera = WorldWorkspace.CurrentCamera local player = Players.LocalPlayer local mouse = player:GetMouse() --[[ GIVEN THE EQUATIONS... (p - p0) ⋅ n = 0 where... - p is the intersection point (Vector3) - p0 is the origin of the plane (Vector3) - n is the plane perpendicular to the origin point (Vector3) (r0 + r * t) = p where... - r0 is the origin of the ray (Vector3) - r is the ray direction (Vector3, normalized) - t is the length of the ray (Vector3) - p is the intersection point (Vector3) THEREFORE... r * t ⋅ n + (r0 - p0) ⋅ n = 0 AND SOLVING FOR t WE GET... t = ((p0 - r0) ⋅ n) / (r ⋅ n)) ]] local function calculateIntersection(n : Vector3, p0 : Vector3, r : Vector3, r0 : Vector3) : (boolean, Vector3?) -- returns false if the ray defined by r0 and r will never intersect with the plane defined by p0 and n local denominator : Vector3 = n:Dot(r) if denominator > 0 then local p010 : Vector3 = p0 - r0 local t : Vector3 = p010:Dot(n) / denominator local doesIntersect : boolean = t >= 0 local p : Vector3? = if doesIntersect then (r0 + (r * t)) else nil return doesIntersect, p end return false, nil end local function getOrigin() : Vector3 -- calculate the origin of the intersection plane by simply using the rough bounding box. local cubeCenter = part.CFrame.Position local cubeSize = part.Size -- return the back face of the cube for testing return cubeCenter + Vector3.new(0, 0, cubeSize.Z * 0.5) end local function getPlane() : Vector3 local right = part.CFrame.RightVector local up = part.CFrame.UpVector local normalPlane = right:Cross(up).Unit -- multiply by -1 to invert the outward direction of plane return -1 * normalPlane end local function onClick() -- NOTE - tweak the values of p0 and n to get the plane right local p0 = getOrigin() local n = getPlane() local r = mouse.Origin.LookVector local r0 = mouse.Origin.Position local success, result = calculateIntersection(n, p0, r, r0) if success then -- draw a ball where the point intersects with the plane -- NOTE - this will only draw on the local client, not the server local ball = Instance.new("Part") ball.Shape = Enum.PartType.Ball ball.Size = Vector3.new(0.2, 0.2, 0.2) ball.Position = result ball.Anchored = true ball.CanCollide = false ball.Color = Color3.new(1, 0, 0) ball.Parent = WorldWorkspace end end -- listen for when the player clicks mouse.Button1Down:Connect(onClick) ``` In my testing, I was able to lock collisions to the defined plane, but I needed to mess around with the `getOrigin` and `getPlane` functions to properly define where I wanted the plane to be. [](https://i.stack.imgur.com/chRtO.png)
null
CC BY-SA 4.0
null
2022-12-20T05:24:49.960
2022-12-20T05:24:49.960
null
null
2,860,267
null
74,858,932
2
null
58,128,491
0
null
``` binding.bottomNavigation.setOnClickMenuListener(model -> { switch (model.getId()) { case 1: binding.viewPager.setCurrentItem(0); break; case 2: binding.viewPager.setCurrentItem(1); break; case 3: binding.viewPager.setCurrentItem(2); break; case 4: binding.viewPager.setCurrentItem(3); break; } return null; }); ```
null
CC BY-SA 4.0
null
2022-12-20T05:45:10.243
2022-12-20T05:52:48.237
2022-12-20T05:52:48.237
20,377,085
20,377,085
null
74,859,071
2
null
72,522,765
-1
null
When the editor is installed in a non-C drive, the editor has no right to create objects in any path Unistall Unity Editor and install it in C:* [https://forum.unity.com/threads/if-unity-hub-didnt-be-installed-in-c-you-cannot-create-project.1375554/](https://forum.unity.com/threads/if-unity-hub-didnt-be-installed-in-c-you-cannot-create-project.1375554/) report bug
null
CC BY-SA 4.0
null
2022-12-20T06:07:01.020
2022-12-20T06:07:01.020
null
null
13,183,365
null
74,859,201
2
null
74,847,765
0
null
> Listening to the dt_socket transport at address: 61032 The error message indicates that the debugger is trying to listen for connections on port 61032 and fails. It could be that the port is being used by another process. You can try changing the debug port number. Another possibility is that a firewall or network configuration is preventing the debugger from listening on the port. Or try restarting the debugger or vscode and make sure you have the latest version of the debugger installed.
null
CC BY-SA 4.0
null
2022-12-20T06:21:59.050
2022-12-20T06:21:59.050
null
null
19,133,920
null
74,859,334
2
null
27,996,840
0
null
There is no mistake in your code. Just enclose your code inside a form like this and use the class="form-horizontal" it will be alright. ``` <form class="form-horizontal" role="form"> <!-- your code --> </form> ```
null
CC BY-SA 4.0
null
2022-12-20T06:37:03.977
2022-12-20T06:37:03.977
null
null
2,172,672
null
74,859,381
2
null
74,859,210
1
null
You're not quite correct here, because you're missing the fact that the loop invariant always runs last. To help you understand what's going on here, let me break this down. When the loop starts, `p` and `q` are both 2. 1. In the first iteration, you are correct that the while loop does not run, and therefore, q is updated to 0. The loop invariant then does q = q * 2, which updates it to 0. 2. In the second iteration, again the while loop does not run. In this case, q is then set to p - q, which is 2. The loop invariant then does q = q * 2, which sets q to 4. 3. In the third iteration, the while loop runs and updates p to 4. We then repeat the same operation as in step 1, and q is set to 0. 4. In the fourth iteration, the loop operates similarly to the second iteration, and p - q results in 4. The loop invariant then does q = q * 2, which sets q to 8. From this it's easy to see, that each odd iteration of the loop results in `q` being zero and `p` being equal to `q` and each even iteration results in `q` being set to `2 * p`. Therefore, `q` will be equal to 32 after 8 iterations. As an aside, if you're curious to see how a piece of code is working, you could always write it in C# and step into the code in Debugging Mode. Doing so would show you the value of all variables within scope after each line is executed.
null
CC BY-SA 4.0
null
2022-12-20T06:43:59.567
2022-12-20T06:43:59.567
null
null
3,121,975
null
74,859,826
2
null
74,859,419
1
null
You are not using a current documentation. Out of curiosity, could you share the page that you happened to find? If you follow the latest documentation, the documentation for v5.3 (which is surely the version that you are on), then it should work. See: [https://docs.sciml.ai/NeuralPDE/v5.3/](https://docs.sciml.ai/NeuralPDE/v5.3/). [https://docs.sciml.ai/NeuralPDE/v5.3/tutorials/pdesystem/](https://docs.sciml.ai/NeuralPDE/v5.3/tutorials/pdesystem/) ``` using NeuralPDE, Lux, Optimization, OptimizationOptimJL import ModelingToolkit: Interval @parameters x y @variables u(..) Dxx = Differential(x)^2 Dyy = Differential(y)^2 # 2D PDE eq = Dxx(u(x,y)) + Dyy(u(x,y)) ~ -sin(pi*x)*sin(pi*y) # Boundary conditions bcs = [u(0,y) ~ 0.0, u(1,y) ~ 0.0, u(x,0) ~ 0.0, u(x,1) ~ 0.0] # Space and time domains domains = [x ∈ Interval(0.0,1.0), y ∈ Interval(0.0,1.0)] # Neural network dim = 2 # number of dimensions chain = Lux.Chain(Dense(dim,16,Lux.σ),Dense(16,16,Lux.σ),Dense(16,1)) # Discretization dx = 0.05 discretization = PhysicsInformedNN(chain,GridTraining(dx)) @named pde_system = PDESystem(eq,bcs,domains,[x,y],[u(x, y)]) prob = discretize(pde_system,discretization) #Optimizer opt = OptimizationOptimJL.BFGS() #Callback function callback = function (p,l) println("Current loss is: $l") return false end res = Optimization.solve(prob, opt, callback = callback, maxiters=1000) phi = discretization.phi using Plots xs,ys = [infimum(d.domain):dx/10:supremum(d.domain) for d in domains] analytic_sol_func(x,y) = (sin(pi*x)*sin(pi*y))/(2pi^2) u_predict = reshape([first(phi([x,y],res.u)) for x in xs for y in ys],(length(xs),length(ys))) u_real = reshape([analytic_sol_func(x,y) for x in xs for y in ys], (length(xs),length(ys))) diff_u = abs.(u_predict .- u_real) p1 = plot(xs, ys, u_real, linetype=:contourf,title = "analytic"); p2 = plot(xs, ys, u_predict, linetype=:contourf,title = "predict"); p3 = plot(xs, ys, diff_u,linetype=:contourf,title = "error"); plot(p1,p2,p3) ``` Note: you should fully remove GalacticOptim from your system (`]rm GalacticOptim`) since that's a deprecated package.
null
CC BY-SA 4.0
null
2022-12-20T07:39:20.963
2022-12-20T07:39:20.963
null
null
1,544,203
null
74,859,858
2
null
74,859,712
1
null
I have made a similar Excel sheet, containing two important things: - `TIME()`- `ABS()` The sheet contains some characters 'a' and 'b' with some time entries, the formula checks if the value equals 'a' and if the time is within 10 minutes of 8h45. The used formula is: ``` =AND(A3="a",ABS(B3-TIME(8,45,0)) <= TIME(0,10,0)) ``` Hereby a screenshot: [](https://i.stack.imgur.com/dYuKL.png) The colours are the result of conditional formatting, based on that same formula.
null
CC BY-SA 4.0
null
2022-12-20T07:42:47.653
2022-12-20T07:42:47.653
null
null
4,279,155
null
74,859,936
2
null
74,836,041
0
null
``` class messDiary extends StatefulWidget { messDiary({Key? key}) : super(key: key) {} // late String whatIsToday = DateFormat('EEEE').format(DateTime.now()); @override State<messDiary> createState() => _messDiaryState(); } class _messDiaryState extends State<messDiary> { int activeIndex = 0; final carouselController = CarouselController(); String valueChoose = 'Select a day'; var itemName; final DocumentReference _collectData = FirebaseFirestore.instance.collection('messdiary').doc('days'); late Stream<DocumentSnapshot> _streamCollect; @override void initState() { super.initState(); _streamCollect = _collectData.snapshots(); } @override Widget build(BuildContext context) { double height = MediaQuery.of(context).size.height; double width = MediaQuery.of(context).size.width; return Scaffold( backgroundColor: const Color(0xFF000000), appBar: AppBar( backgroundColor: const Color(0xFF000000), elevation: 0, ), bottomNavigationBar: const bottomNavigation(), body: ListView( children: [ Column( children: [ headings(headingText: "Today's meals"), const SizedBox( height: 15, ), StreamBuilder<DocumentSnapshot>( stream: _streamCollect, builder: (context, AsyncSnapshot<DocumentSnapshot> snapshot) { if (!snapshot.hasData) { return const Center( child: CircularProgressIndicator(), ); } final snaps = snapshot.data!; final sundayMeals = snaps["sunday"] .map((e) => todaysMeal( itemName: e['title'], itemImage: e['image'], time: e['time'], dayTime: e['daytime'])) .toList(); final List<Widget> mealsData = [...sundayMeals]; return CarouselSlider( options: CarouselOptions( height: height * 0.38, aspectRatio: 2.0, autoPlayCurve: Curves.easeInOutQuart, pauseAutoPlayTouch: true, enlargeCenterPage: true, enableInfiniteScroll: false, initialPage: 2, autoPlay: true, onPageChanged: (index, reason) { setState(() { activeIndex = index; }); }, ), items: mealsData, ); }), const SizedBox( height: 15, ), AnimatedSmoothIndicator( onDotClicked: animateToSlide, effect: const ExpandingDotsEffect( dotWidth: 14, dotHeight: 14, activeDotColor: Color(0xFF6A7086), dotColor: Color(0xFF2B2E3F)), activeIndex: activeIndex, count: 4, ), const SizedBox( height: 15, ), const Divider( color: Color(0xFF6A6C70), indent: 20, endIndent: 20, ), ], ), ], ), ); } void animateToSlide(int index) => carouselController.animateToPage(index); } ```
null
CC BY-SA 4.0
null
2022-12-20T07:51:43.643
2022-12-20T07:51:43.643
null
null
20,682,176
null
74,860,042
2
null
23,411,520
0
null
I fixed this problem simply by giving the necessary permission to my folders. - `logs``Get Info`- `Sharing & Permissions``Read & Write` Follow the attachment. [](https://i.stack.imgur.com/gUewu.png) [](https://i.stack.imgur.com/0locu.png)
null
CC BY-SA 4.0
null
2022-12-20T08:03:35.470
2022-12-20T08:03:35.470
null
null
10,383,865
null
74,860,519
2
null
74,857,731
1
null
Yes: 1. The keywords property is defined for Organization. 2. Every Corporation is also an Organization. Which is also why the `keywords` property is listed in the table on [https://schema.org/Corporation](https://schema.org/Corporation). You can always stick to that table to see which properties are defined/expected. (By the way, there aren’t any restrictions for which types Schema.org properties can be used. It’s not an error to use a property for an item of a type for which it’s not defined. It might not be expected/supported by consumers, including validators, and it might not make sense, but it’s not that your structured data would become invalid or something like that.)
null
CC BY-SA 4.0
null
2022-12-20T08:50:21.130
2022-12-20T08:50:21.130
null
null
19,579,546
null
74,861,021
2
null
74,860,851
0
null
You can create two `ListView` namely, `PinnedItemListView` and `UnpinnedItemListView` then you just need to use both of them in a `SingleChildScrollView`. Then just remove the from `UnpinnedItemList` and then add the same item to `PinnedItemList` and vice versa to remove the : ``` SingleChildScrollView( physics: ScrollPhysics(), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [ PinnedListItem(), //ListView of Fav Items UnpinnedListItem(), //ListView of Normal Items ], ), ), ```
null
CC BY-SA 4.0
null
2022-12-20T09:35:35.903
2022-12-20T09:35:35.903
null
null
16,973,338
null
74,861,054
2
null
74,857,935
-1
null
Is this what you're asking: ``` old= 'A|1|B|2|C|3' new = old.split('|') final=new[::2],new[1::2] print(f"{final[0]}\n{final[1]}") ```
null
CC BY-SA 4.0
null
2022-12-20T09:38:03.800
2022-12-20T09:38:03.800
null
null
13,322,122
null
74,861,137
2
null
74,861,091
0
null
Try writing the binary REST API response to a file: ``` from requests import get resp = get("https://example.com/csv_api") with open("test.csv", 'wb') as f: f.write(resp.content) ```
null
CC BY-SA 4.0
null
2022-12-20T09:44:44.213
2022-12-20T09:44:44.213
null
null
11,985,743
null
74,861,223
2
null
74,861,094
1
null
As eamirho3ein pointed out. You can use `SizedBox` or `Padding` widget to have some space instead of `Spacer`. Another thing you can do using `bottomNavigationBar:` on Scaffold to place it bottom. But `CustomScrollView` with `SliverFillRemaining()` might be better for you. ``` class SignInScreen extends StatelessWidget { SignInScreen({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( body: CustomScrollView( slivers: [ SliverList( delegate: SliverChildListDelegate.fixed([ /// your others widgets ])), SliverFillRemaining( child: Row( //add padding if needed crossAxisAlignment: CrossAxisAlignment.end, children: const [ Padding(padding: EdgeInsets.only(left: 100, bottom: 30)), Icon(Icons.info_outline), Text( "All rights reserved by Naz-kearn Corp", style: TextStyle( fontWeight: FontWeight.w400, fontSize: 12, ), ), ], ), ), ], ), ); } ```
null
CC BY-SA 4.0
null
2022-12-20T09:52:25.650
2022-12-20T09:52:25.650
null
null
10,157,127
null
74,861,565
2
null
74,861,094
0
null
Try replacing the SingleChildScrollView and the Column widget with ``` Container( width: MediaQuery.of(context).size.width, //full width or multiply by 0.8 for 80% width... height: double.infinity, ListView( shrinkWrap: true, children[...], ), //ListView ), //Container ``` Columns are non-scrollable
null
CC BY-SA 4.0
null
2022-12-20T10:22:33.617
2022-12-20T10:22:33.617
null
null
16,758,647
null
74,861,656
2
null
74,861,439
0
null
You can fetch your ODBC-result as an array: ``` $ODBCcontent = odbc_fetch_array($results); ```
null
CC BY-SA 4.0
null
2022-12-20T10:30:34.257
2022-12-20T10:30:34.257
null
null
20,810,817
null
74,861,725
2
null
19,478,909
0
null
Had the same error on a Xiaomi smartphone. Adding the following css did the trick ``` video { filter: brightness(108.5%); } ``` Found [here](https://stackoverflow.com/questions/16983018/chrome-html5-video-cant-display-white-has-gray-background). Thx to @avatar for his comment.
null
CC BY-SA 4.0
null
2022-12-20T10:34:51.177
2022-12-20T10:34:51.177
null
null
11,135,174
null
74,862,126
2
null
70,906,081
0
null
If you are using , you must use : [https://springdoc.org/v2/](https://springdoc.org/v2/) With gradle, for example: ``` implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' ```
null
CC BY-SA 4.0
null
2022-12-20T11:05:11.940
2022-12-20T11:05:11.940
null
null
754,388
null
74,862,133
2
null
74,861,836
1
null
Seems like a bug in the library. You can add a slight delay in the button action, which will solve the issue: ``` Button(action: { DispatchQueue.main.asyncAfter(deadline: .now() + 0.001) { dismiss() } }) { Text("OK").font(.headline.bold()).foregroundColor(.blue) .padding(10) .background(Capsule().fill(Color.white)) } ``` Or if you don't want the click animation, you can remove the button and do the following: ``` Text("OK").font(.headline.bold()).foregroundColor(.blue) .padding(10) .background(Capsule().fill(Color.white)) .onTapGesture { dismiss() } ```
null
CC BY-SA 4.0
null
2022-12-20T11:05:39.337
2022-12-20T11:11:04.290
2022-12-20T11:11:04.290
1,104,384
1,104,384
null
74,862,221
2
null
74,862,069
0
null
You can use [delta_markdown](https://pub.dev/packages/delta_markdown) and [markdown](https://pub.dev/packages/markdown) package for this: ``` String quillDeltaToHtml(Delta delta) { final markdown = deltaToMarkdown(delta); final html = markdownToHtml(markdown); return html; } ```
null
CC BY-SA 4.0
null
2022-12-20T11:12:04.127
2022-12-20T11:49:09.877
2022-12-20T11:49:09.877
16,973,338
16,973,338
null
74,862,280
2
null
74,861,229
0
null
You are running the same function (for block) for each row so you are iterating the whole dictionary every time and the result is that you print in the label always the last value.
null
CC BY-SA 4.0
null
2022-12-20T11:17:17.323
2022-12-20T11:17:17.323
null
null
4,189,776
null
74,862,490
2
null
74,861,439
1
null
It looks like you may be storing status information about the order in different columns. I would suggest just using one column with different status numbers. Perhaps: ``` 0 - "Order received" 1 - "Order in preparation" 2 - "Order ready" 3 - "Order dispatched" ``` You can then use a switch statement in PHP to select between the text options For example: ``` echo "<table>"; while($resultrow = odbc_fetch_array($results)) { echo "<tr>"; switch($resultrow['enc_paye']){ case 0: echo "<td>Order received</td>"; break; case 1: echo "<td>Order in preparation</td>"; break; case 2: echo "<td>Order completed</td>"; break; case 3: echo "<td>Order dispatched</td>"; break; default: echo "<td>Unknown</td>"; } // print some other fields in table data fields echo "</tr>"; } echo "</table>"; ``` The `odbc_result_all` function has been deprecated, so ideally you shouldn't use it. ** Edited following comments from @Adyson **
null
CC BY-SA 4.0
null
2022-12-20T11:35:47.407
2022-12-20T13:15:36.677
2022-12-20T13:15:36.677
20,441,221
20,441,221
null
74,862,499
2
null
12,707,822
0
null
If you don't want to change the upload size limit, or for some reason can not change the upload size limit, compressing the database to a zip or tar.bz2 will really reduce the size of your database. In my case it went from which was over the limit, and compressed to a zip it was only
null
CC BY-SA 4.0
null
2022-12-20T11:36:24.003
2022-12-20T11:36:24.003
null
null
11,876,085
null
74,862,730
2
null
74,860,948
1
null
## Delete Excel Table's Data Body Range ``` With ToDelete If Not .DataBodyRange Is Nothing Then If .ShowAutoFilter Then ' is turned on ' Clear existing filters. If .AutoFilter.FilterMode Then .AutoFilter.ShowAllData 'Else ' is turned off; do nothing End If ' Delete. .DataBodyRange.Delete xlShiftUp 'Else ' is already deleted; do nothing End If End With ``` What's with the complications? - - `.AutoFilter.FilterMode`- `xlShiftToLeft`[documentation](https://learn.microsoft.com/en-us/office/vba/api/excel.range.delete)
null
CC BY-SA 4.0
null
2022-12-20T11:54:43.330
2022-12-20T12:31:10.627
2022-12-20T12:31:10.627
9,814,069
9,814,069
null
74,863,004
2
null
74,862,069
0
null
First, install the [delta_markdown](https://pub.dev/packages/delta_markdown) and [markdown](https://pub.dev/packages/markdown) packages. Then, try the following code: ``` import 'package:delta_markdown/delta_markdown.dart'; import 'package:markdown/markdown.dart' hide Text; ``` --- ``` final QuillController quillController = QuillController.basic(); ``` --- ``` QuillToolbar.basic( controller: quillController, … ), ``` --- ``` final Delta delta = quillController.document.toDelta(); final String convertedValue = jsonEncode(delta.toJson()); final String markdown = deltaToMarkdown(convertedValue); final String html = markdownToHtml(markdown); ```
null
CC BY-SA 4.0
null
2022-12-20T12:18:51.170
2022-12-20T12:18:51.170
null
null
16,124,033
null
74,863,513
2
null
74,863,363
0
null
It's showing changes vs. your committed code. The option is "SCM: Diff Decorations Gutter Visibility". SCM = Source Control Management, a.k.a. git.
null
CC BY-SA 4.0
null
2022-12-20T13:01:45.957
2022-12-20T13:01:45.957
null
null
17,637
null
74,863,626
2
null
8,721,406
0
null
Many answers are based on intersections. Here is a simple algorithm not based on intersections but only using vector products. This method is less complex that methods based on intersections, but only works for convex polygons. Since the question is about convex polygons, this less complex method should be preferred. Imagine that your convex polygon (P0, P1, ..., Pn), with (Pi-1, Pi) being its segments, is a needle clock and that the point C you want to check is inside the clock. The points (Pi) will either turn clockwise, or counterclockwise. Imagine a needle attached to C, that gives hours when turning clockwise. The vectors CP0→, CP1→, CP2→, CP...→, CPn→ all turn either clockwise, or counterclockwise. This means that the vector products CP0→⨯CP1→, CP1→⨯CP2→, CP2→⨯CP...→, CPn-1→⨯CPn→ and CPn→⨯CP0→ all have the same sign. This property only occurs when C is inside the polygon.
null
CC BY-SA 4.0
null
2022-12-20T13:10:05.450
2022-12-20T21:58:35.500
2022-12-20T21:58:35.500
8,334,991
8,334,991
null
74,863,724
2
null
74,857,652
0
null
Here are the steps I can suggest you to handle this issue: 1. First you need to get the mass center of each contour by using opencv moments. This will give you the weighted centeral point of contours as x,y coordinates. 2. Then make a filter according to the mass center's y-axis. Between 45th and 22th contour's y-axis values will be the valid contours. 3. Only draw the contours which are valid according to your filter. [This](https://www.youtube.com/watch?v=CkTSsc3h1BM) may help to find the mass centers.
null
CC BY-SA 4.0
null
2022-12-20T13:17:50.173
2022-12-20T13:17:50.173
null
null
11,048,887
null
74,863,941
2
null
71,507,345
0
null
I experienced the same issue but fixed it by adding a new method with the `[OneTimeTearDown]` attribute that explicitly quits the `IWebDriver` by calling it's `Quit()` method. The whole method looks as follows: ``` [OneTimeTearDown] public void Teardown() { _chromeDriver.Quit(); } ```
null
CC BY-SA 4.0
null
2022-12-20T13:38:12.950
2022-12-20T13:38:12.950
null
null
4,986,202
null
74,864,075
2
null
74,839,675
0
null
add a watch to this (select code in VBA editor and right click -> Add watch) "(session.findById("wnd[1]/usr/ctxtVBUK-VBELN")" then you can see all attributes and you can use them as you want
null
CC BY-SA 4.0
null
2022-12-20T13:48:10.250
2022-12-20T13:48:10.250
null
null
20,349,388
null
74,864,349
2
null
74,864,180
0
null
Using a `<br/>` tag inside your StackCard component, between your render from owner and description
null
CC BY-SA 4.0
null
2022-12-20T14:09:51.853
2022-12-20T14:09:51.853
null
null
10,641,278
null
74,864,378
2
null
74,862,399
0
null
Hi I suppose that you could refer to this extension [Code Coverage Widgets](https://marketplace.visualstudio.com/items?itemName=shanebdavis.code-coverage-dashboard-widgets&targetId=b96fb8c8-8d4a-4e03-8af3-fd5a94f17d1d&utm_source=vstsproduct&utm_medium=ExtHubManageList) With this widget, I could display the code coverage of my specific pipeline in the dashboards. [](https://i.stack.imgur.com/fhlDv.png) You need to configure this widget with a test run pipeline [](https://i.stack.imgur.com/nCgQ8.png) ========================================================= I suppose that you need to add your code coverage report to the build summary with [publish code coverage](https://go.microsoft.com/fwlink/?LinkID=626485) [](https://i.stack.imgur.com/rf2YV.png) My yaml pipeline as below. You will need additional argument to generate code coverage file as format `Cobertura`. ``` steps: - task: DotNetCoreCLI@2 displayName: 'dotnet test' inputs: command: test projects: '' arguments: '--collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura' publishTestResults: false - task: PublishCodeCoverageResults@1 displayName: 'Publish code coverage from **\*\coverage.cobertura.xml' inputs: codeCoverageTool: Cobertura summaryFileLocation: '**\*\coverage.cobertura.xml' reportDirectory: '$(System.DefaultWorkingDirectory)\reports' ```
null
CC BY-SA 4.0
null
2022-12-20T14:12:20.810
2022-12-21T09:47:12.620
2022-12-21T09:47:12.620
18,361,074
18,361,074
null
74,864,413
2
null
74,864,150
1
null
You can use [NVM](https://github.com/nvm-sh/nvm) for installing and switching node version on Ubuntu. ``` curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash ``` Then ``` nvm install 14 ``` ``` nvm use 14 ``` ``` node -v v14.18.0 ```
null
CC BY-SA 4.0
null
2022-12-20T14:15:07.960
2022-12-20T14:15:07.960
null
null
10,517,078
null
74,864,522
2
null
74,850,659
0
null
To future developers having memory consumption issues with Lucene.Net: Try writing one document at a time with `writer.AddDocument()` rather than `writer.AddDocuments()`. `writer.AddDocument()` handles memory much better than `writer.AddDocuments()`. Also calling `writer.Commit()` more will flush memory more often, and the Garbage Collector can keep the memory consumption lower. My experiments with Lucene in a Console Application can be seen here: [https://github.com/apache/lucenenet/issues/784](https://github.com/apache/lucenenet/issues/784)
null
CC BY-SA 4.0
null
2022-12-20T14:22:38.113
2022-12-20T14:22:38.113
null
null
3,022,175
null
74,865,316
2
null
74,864,807
1
null
1)You can use Concatenation Operator ( || ) instead of concat() function. 2)When some of your columns have also null values you can use coalesce() which keeps the null fields. It's `coalesce(mytext,'')` when your column is a type character or `coalesce(mynumber,0)` if you use numeric types. You can see examples [here](https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-coalesce/). I think you want something like that: ``` select coalesce(c.title,'')||' '||c.first_name||' '||c.last_name||' '||coalesce(c.suffix,'') AS full_name , pa.country, p.phone_country_code||'-'||p.phone_area_code||'-'||p.phone_number as phone_number from customer as c left join customer_address AS ca on c.customer_id = ca.customer_id left join physical_address AS pa on ca.physical_address_id = pa.physical_address_id left join phone_number as p on c.customer_id = p.customer_id order by pa.country, p.phone_number asc ```
null
CC BY-SA 4.0
null
2022-12-20T15:24:06.847
2022-12-20T15:24:06.847
null
null
17,953,147
null
74,865,388
2
null
74,864,205
2
null
The CLS and LCP widgets present on the Synthetics - Browser Test Performance dashboard do rely on RUM data. Screenshot of the query: [https://a.cl.ly/6quNQQbO](https://a.cl.ly/6quNQQbO) RUM can be injected via the recording section of the browser test steps! That being said, they can view CLS without leveraging RUM, using the synthetics.browser.step.cumulative_layout_shift metric. Docs:[https://docs.datadoghq.com/synthetics/metrics/#overview](https://docs.datadoghq.com/synthetics/metrics/#overview)
null
CC BY-SA 4.0
null
2022-12-20T15:30:02.853
2022-12-20T15:35:33.740
2022-12-20T15:35:33.740
19,717,007
19,717,007
null
74,865,636
2
null
74,863,788
1
null
It works fine if you code tab as `\t` in the string. Otherwise the tab key is translated into spaces, which will sometimes be ignored in line breaking. [](https://i.stack.imgur.com/ALuHh.png) ``` VStack(alignment: .leading, spacing: 30) { Text("Incoming event 0\t\t111") .frame(width: 300, alignment: .leading) .border(.red) Text("Incoming event 0\t\t111") .frame(width: 150, alignment: .leading) .border(.red) } ```
null
CC BY-SA 4.0
null
2022-12-20T15:51:18.090
2022-12-20T15:51:18.090
null
null
17,896,776
null
74,865,807
2
null
74,854,781
0
null
- Explicitly call the .ToClientTemplate() configuration method.- Addunique identifier thru .Name() configuration option.- this will have to be doen even if you call.ToClientTemplate() on the parent , so you have to call it for the children also``` <script type="text/x-kendo-template" id="..........."> @(Html.Kendo().Form<Biblio>() .Name("Biblio_Form") .... .Items(items => { items.Add() .Field(f => f.BiblioId) .Label(l => l.Text("Biblio Id")) .Editor(e => { e.DropDownList() .Name("serverFilteringTrue") .DataTextField("Title") .DataValueField("BiblioId") .Filter(FilterType.Contains) .DataSource(source => { source.Read(read => { read.Action("biblio_read", "Home"); }) .ServerFiltering(true); }).ToClientTemplate(); }); }).ToClientTemplate()) </script> ``` Ref. [ASP.NET Core Data Grid Component Client Detail Templates - Telerik UI for ASP.NET Core] ([https://docs.telerik.com/aspnet-core/html-helpers/data-management/grid/templates/client-detail-template](https://docs.telerik.com/aspnet-core/html-helpers/data-management/grid/templates/client-detail-template))
null
CC BY-SA 4.0
null
2022-12-20T16:05:45.350
2022-12-20T16:05:45.350
null
null
4,879,683
null
74,866,153
2
null
74,865,480
0
null
You can set the CSS by adjusting the margin for each element of the three column as below: ``` /* It will take the whole width for every element in the 1st column */ .image-tile:nth-child(3n+1):hover .image-info { margin-right: calc(-48px - 200%); } /* It will take the whole width for every element in the 2nd column */ .image-tile:nth-child(3n+2):hover .image-info { margin-left: calc(-24px - 100%); margin-right: calc(-24px - 100%); } /* It will take the whole width for every element in the third column */ .image-tile:nth-child(3n):hover .image-info { margin-left: calc(-48px - 200%); } ``` The is equal the 4 * 12 px margin from the element on the right we need to cancel, while the 200% are the width of the 2 columns on the right, which contain the pictures. So after you just need to adjust the math based on your column, but I would advice you to adjust the size of the grid based on the screen size, here I set max-width to 600px instead of 1000px to keep it on three columns. And here is the doc for the [:nth-child](https://developer.mozilla.org/en-US/docs/CSS/:nth-child) selectors ## Demo ``` /* Anordnung der Bildkacheln mithilfe von flexbox */ .image-grid { display: flex; justify-content: space-between; flex-flow: row wrap; align-content: stretch; align-items: stretch; max-width: 600px; /* 1000px originaly */ } .image-tile { flex-grow: 1; flex-shrink: 1; flex-basis: 150px; margin: 0 12px 24px; flex-flow: row wrap; align-content: flex-start; } .image-tile img { width: 100%; /* Anpassung der Bildgröße an den Container */ height: auto; object-fit: cover; /* Anpassung des Bildes an die Größe des Containers */ } /* Zusatzinformationslayer */ .image-info { display: none; /* Standardmäßig ausgeblendet */ //position: absolute; text-align: center; border: 1px solid green; } .image-tile:hover .image-info { display: block; /* Anzeigen bei Hover */ } /* It will take the whole width for every element in the 1st column */ .image-tile:nth-child(3n+1):hover .image-info { margin-right: calc(-48px - 200%); } /* It will take the whole width for every element in the 2nd column */ .image-tile:nth-child(3n+2):hover .image-info { margin-left: calc(-24px - 100%); margin-right: calc(-24px - 100%); } /* It will take the whole width for every element in the third column */ .image-tile:nth-child(3n):hover .image-info { margin-left: calc(-48px - 200%); } ``` ``` <html> <head></head> <body> <style> </style> <div class="image-grid"> <!-- Bildkachel --> <div class="image-tile"> <img src="https://dummyimage.com/600x400/000/fff" alt="Bild 1"> <div class="image-info"> Zusatzinformationen über Bild 1<br> Zusatzinformationen über Bild 1<br> Zusatzinformationen über Bild 1<br> Zusatzinformationen über Bild 1<br> Zusatzinformationen über Bild 1<br> </div> </div> <!-- Weitere Bildkacheln --> <div class="image-tile"> <img src="https://dummyimage.com/600x400/1124d4/fff" alt="Bild 2"> <div class="image-info"> <img src="download.png" alt="Bild 2"> Zusatzinformationen über Bild 2 </div> </div> <div class="image-tile"> <img src="https://dummyimage.com/600x400/000/1124d4" alt="Bild 3"> <div class="image-info"> Zusatzinformationen über Bild 3 </div> </div> <div class="image-tile"> <img src="download.png" alt="Bild 4"> <div class="image-info"> Zusatzinformationen über Bild 4 </div> </div> <div class="image-tile"> <img src="download.png" alt="Bild 2"> <div class="image-info"> Zusatzinformationen über Bild 2 </div> </div> <div class="image-tile"> <img src="download.png" alt="Bild 3"> <div class="image-info"> Zusatzinformationen über Bild 3 </div> </div> <div class="image-tile"> <img src="download.png" alt="Bild 4"> <div class="image-info"> Zusatzinformationen über Bild 4 </div> </div> <div class="image-tile"> <img src="download.png" alt="Bild 2"> <div class="image-info"> Zusatzinformationen über Bild 2 </div> </div> <div class="image-tile"> <img src="download.png" alt="Bild 3"> <div class="image-info"> Zusatzinformationen über Bild 3 </div> </div> <div class="image-tile"> <img src="download.png" alt="Bild 4"> <div class="image-info"> Zusatzinformationen über Bild 4 </div> </div> <div class="image-tile"> <img src="download.png" alt="Bild 2"> <div class="image-info"> Zusatzinformationen über Bild 2 </div> </div> <div class="image-tile"> <img src="download.png" alt="Bild 3"> <div class="image-info"> Zusatzinformationen über Bild 3 </div> </div> <div class="image-tile"> <img src="download.png" alt="Bild 4"> <div class="image-info"> Zusatzinformationen über Bild 4 </div> </div> </div> </body> </html> ```
null
CC BY-SA 4.0
null
2022-12-20T16:36:18.063
2022-12-20T16:51:31.013
2022-12-20T16:51:31.013
11,044,542
11,044,542
null