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,987,067
2
null
74,984,891
0
null
You could create a colorbar from the colormap and norm. And copy the size indicators to a new legend. ``` from matplotlib import pyplot as plt from matplotlib.cm import ScalarMappable from matplotlib.ticker import MultipleLocator import seaborn as sns import pandas as pd import numpy as np dotplot_refined = pd.DataFrame({'gene': [f'Gene{i}' for i in np.tile(np.arange(20) + 1, 14)], 'cluster': np.repeat(np.arange(14), 20)}) dotplot_refined['exp'] = np.random.normal(0, 1, len(dotplot_refined)) dotplot_refined['pct'] = np.clip(np.random.normal(40, 30, len(dotplot_refined)), 0, 100) palette = "RdYlBu_r" norm = plt.Normalize(-1.5, 1.5) cbar_shrink = 0.7 g = sns.relplot(data=dotplot_refined, x="cluster", y="gene", hue="exp", size="pct", sizes=(20, 200), hue_norm=norm, palette=palette, aspect=1.8, height=6) cbar = plt.colorbar(ScalarMappable(cmap=palette, norm=norm), shrink=cbar_shrink) pos = cbar.ax.get_position() # get the original position # align the colorbar with the top of the main ax cbar.ax.set_position([pos.x0, pos.y0 + pos.height * (1 - cbar_shrink), pos.width, pos.height]) # get information from the generated figure legend, and extract the information about the sizes handles = g.legend.legendHandles labels = [t.get_text() for t in g.legend.texts] ind = labels.index('pct') # find index of the 'pct' subtitle g.legend.remove() # add the reduced legend g.ax.legend(handles=handles[ind + 1:], labels=labels[ind + 1:], title='pct', loc='lower left', bbox_to_anchor=(1.035, 0), frameon=False) g.ax.xaxis.set_major_locator(MultipleLocator(1)) plt.show() ``` [](https://i.stack.imgur.com/F5cvN.png)
null
CC BY-SA 4.0
null
2023-01-02T21:07:14.740
2023-01-02T21:07:14.740
null
null
12,046,409
null
74,987,355
2
null
48,063,067
2
null
As of 2022, if all you need is the image in a different size, maybe [Hugo’s Built-in "figure" Shortcode](https://gohugo.io/content-management/shortcodes/#figure) would do? ``` {{< figure src="/media/spf13.jpg" title="Steve Francia" >}} ```
null
CC BY-SA 4.0
null
2023-01-02T21:53:08.020
2023-01-02T21:53:08.020
null
null
421,846
null
74,987,501
2
null
74,978,296
1
null
If I got you right, all you need to do is to `flex` the desired items, and don't forget to set `overflow: auto;` to the ones you want to independently scroll: ``` * { margin: 0; box-sizing: border-box; } body { height: 100vh; display: flex; flex-flow: column nowrap; overflow: hidden; } .flex { flex: 1; overflow: auto; } .row { display: flex; flex-flow: row nowrap; } .cell-3 { flex-basis: 25%; } .cell-9 { flex-basis: 75%; } ``` ``` <header class="row" style="background: #bf0"> HEADER<br> WELCOME! </header> <main class="row flex"> <section class="cell-3 flex" style="background: #0bf"> <p style="height: 200vh">Some paragraph to force scrollbars...</p>End. </section> <section class="cell-9 flex" style="background: #f0b"> <p style="height: 300vh">Some even taller paragraph as well...</p>End. </section> </main> <!-- PS avoid inline `style`. The above is just for demo --> ``` which is basically an extension of this answer: [Flex max height content with dynamic header and footer](https://stackoverflow.com/a/17054284/383904)
null
CC BY-SA 4.0
null
2023-01-02T22:16:45.783
2023-01-02T22:30:19.487
2023-01-02T22:30:19.487
383,904
383,904
null
74,987,556
2
null
54,647,694
0
null
Puppeteer runs on the server in Node.js. For the common case, rather than using puppeteer-web to allow the client to write Puppeteer code to control the browser, it's better to create an HTTP or websocket API that lets clients indirectly trigger Puppeteer code. Reasons to prefer a REST API over puppeteer-connect: - - - - - - - Similarly, rather than exposing a mock `fs` object to read and write files on the server, we expose REST API endpoints to accomplish these tasks. This is a useful layer of abstraction. Since there are many use cases for Puppeteer in the context of an API (usually Express), it's hard to offer a general example, but here are a few case studies you can use as starting points: - [Puppeteer unable to run on Heroku](https://stackoverflow.com/questions/52225461/puppeteer-unable-to-run-on-heroku/67596057#67596057)- [Puppeteer doesn't close browser](https://stackoverflow.com/questions/53939503/puppeteer-doesnt-close-browser/67910262#67910262)- [Parallelism of Puppeteer with Express Router Node JS. How to pass page between routes while maintaining concurrency](https://stackoverflow.com/questions/66935883/parallelism-of-puppeteer-with-express-router-node-js-how-to-pass-page-between-r/66946923#66946923)
null
CC BY-SA 4.0
null
2023-01-02T22:26:50.537
2023-01-02T22:56:42.670
2023-01-02T22:56:42.670
6,243,352
6,243,352
null
74,987,607
2
null
74,945,108
0
null
It could be two things: 1. It's not computing statistics on the branch you expect. GitHub only displays statistics for the default branch, but I believe locally you can compute statistics for any branch. 2. There's a bug on GitHub's side that caused the statistics update to be cancelled. I've seen that happen before while working on Linguist. I suspect it happens when the statistic-update job queue grows too large and jobs are dropped. In your case, it's not problem 1 because you appear to have only one branch on this repository. It's most likely problem 2. You can and they should have a way to .
null
CC BY-SA 4.0
null
2023-01-02T22:35:19.563
2023-01-02T22:35:19.563
null
null
6,884,590
null
74,987,842
2
null
74,910,234
0
null
As Patrick Yoder mentioned, understanding your database schema is difficult. Since I don't understand the meaning of the association table, I simplified the tables a bit and hope the following result suits your needs. ``` CREATE TABLE IF NOT EXISTS user ( id INTEGER PRIMARY KEY AUTOINCREMENT, created DATE NOT NULL DEFAULT CURRENT_DATE, name TEXT NOT NULL ); CREATE TABLE IF NOT EXISTS exercise ( id INTEGER PRIMARY KEY AUTOINCREMENT, created DATE NOT NULL DEFAULT CURRENT_DATE, name TEXT NOT NULL ); CREATE TABLE IF NOT EXISTS routine ( id INTEGER PRIMARY KEY AUTOINCREMENT, created DATE NOT NULL DEFAULT CURRENT_DATE, name TEXT NOT NULL, weight REAL, sets INTEGER NOT NULL, reps INTEGER NOT NULL, user_id INTEGER NOT NULL, exercise_id INTEGER NOT NULL, FOREIGN KEY (user_id) REFERENCES user (id), FOREIGN KEY (exercise_id) REFERENCES exercise (id) ); ``` With these prerequisites, it is possible to query all required data with a JOIN statement within a single database query. In addition, duplicate columns that occur across multiple tables are eliminated. ``` @app.route('/') def index(): db = get_db() rows = db.execute(""" SELECT exercise.name AS exercise_name, exercise.created AS exercise_created, routine.name AS routine_name, routine.weight AS routine_weight, routine.sets AS routine_sets, routine.reps AS routine_reps FROM exercise INNER JOIN routine ON exercise.id = routine.exercise_id WHERE routine.user_id = ? ORDER BY exercise.id, routine.name; """, (g.user['id'],) ) return render_template('index.html', rows=rows) ``` Then the rows can be grouped by a column so that the data is displayed as in the desired example. ``` {% for name, items in rows | groupby('exercise_name') -%} <div> <h2>{{ name }} ({{ items[0].exercise_created }})</h2> <ul> {% for item in items -%} <li>{{ item.routine_name }} {{ item.routine_weight }}kg {{ item.routine_sets }}&times;{{ item.routine_reps }}</li> {% endfor -%} </ul> </div> {% else -%} <p>No routines found</p> {% endfor -%} ```
null
CC BY-SA 4.0
null
2023-01-02T23:20:34.353
2023-01-03T00:30:04.810
2023-01-03T00:30:04.810
13,708,022
13,708,022
null
74,987,872
2
null
74,986,264
3
null
You would need to make the replace expression global (all instances). The trailing `g` sets options to global. ``` fixturesCsv.replace(/\r\n/g, '\n').trim() ``` Example of the step is here [Regex replace all newline characters with comma](https://stackoverflow.com/a/8885523/16997707)
null
CC BY-SA 4.0
null
2023-01-02T23:24:20.413
2023-01-02T23:24:20.413
null
null
20,915,048
null
74,988,258
2
null
74,988,193
0
null
If you look at the graph you'll see that the value on the y axis is for both graphs the same for two opposite x values at the x axis. That means that all you want to do is invert the x axis. That is fairly easy done using the formula: ``` new_x = -1 * (old_x - 2.5) + 2.5 ``` By the way, I see some interesting comments in your code. What is it that you are trying to do here if I may ask?
null
CC BY-SA 4.0
null
2023-01-03T01:00:54.350
2023-01-03T01:00:54.350
null
null
19,551,554
null
74,988,575
2
null
74,987,970
0
null
Having access to Power BI doesn't grant them access to any workspaces or apps. For that you need a security group, eg an [AAD Dynamic Group](https://learn.microsoft.com/en-us/azure/active-directory/external-identities/use-dynamic-groups).
null
CC BY-SA 4.0
null
2023-01-03T02:22:33.467
2023-01-03T02:22:33.467
null
null
7,297,700
null
74,989,114
2
null
74,919,832
0
null
Telegram doesn't have the ability to render tables inside messages. The best thing you can do is use ````` quotes to make font monospaced. In that case, you can write your table using tabulation
null
CC BY-SA 4.0
null
2023-01-03T04:45:39.210
2023-01-03T04:45:39.210
null
null
10,249,529
null
74,989,715
2
null
27,092,164
0
null
A little update. ``` self.graphicsView = pg.GraphicsLayoutWidget(self) self.graphicsView.ci.layout.setContentsMargins(0, 0, 0, 0) self.graphicsView.ci.layout.setSpacing(0) ```
null
CC BY-SA 4.0
null
2023-01-03T06:26:27.447
2023-01-03T06:26:27.447
null
null
20,916,695
null
74,989,913
2
null
74,989,879
0
null
The response will be a Map, not a List `List<dynamic> body = json.decode(response.body);` Change it to ``` Map<String, dynamic> body = json.decode(response.body); ```
null
CC BY-SA 4.0
null
2023-01-03T06:53:36.323
2023-01-03T06:53:36.323
null
null
9,172,242
null
74,990,171
2
null
49,430,540
0
null
to convert to dataframe: ``` as.data.frame(r, xy = TRUE) ```
null
CC BY-SA 4.0
null
2023-01-03T07:26:10.417
2023-01-03T07:26:10.417
null
null
3,617,715
null
74,990,264
2
null
74,990,059
1
null
Make sure that index.html inside build folder and the one outside the build folder must be the same. If they are same then try reloading after some time. When I was having the same issue it worked without doing anything and reloading after sometime (in my case around 10-15 minutes) Here is a github issue that has detailed discussion on this. [https://github.com/coreui/coreui-react/issues/55](https://github.com/coreui/coreui-react/issues/55)
null
CC BY-SA 4.0
null
2023-01-03T07:36:12.990
2023-01-03T07:36:12.990
null
null
13,769,976
null
74,990,520
2
null
74,990,469
0
null
It depends what need. If need all columns in `MultiIndex` in columns: ``` df1 = df.astype(float).unstack(0).swaplevel(0,1,axis=1).sort_index(axis=1) ``` If need processing only one column, e.g. `open`: ``` df2 = df.astype(float)['open'].unstack(0) ```
null
CC BY-SA 4.0
null
2023-01-03T08:03:26.060
2023-01-03T08:03:26.060
null
null
2,901,002
null
74,990,659
2
null
74,990,378
0
null
You can just use pipe for this. Below code will work fine. ``` const u = 'https://cdn.discordapp.com/avatars/708947170539339816/cfc4742faa6298e4d8d95070136b6d3a.png' request(u).pipe(fs.createWriteStream('picture.png')) ```
null
CC BY-SA 4.0
null
2023-01-03T08:19:00.067
2023-01-03T08:19:00.067
null
null
10,210,358
null
74,990,858
2
null
49,378,284
0
null
Am using elementor page builder and I encountered the same problem.Turns out that the problem arises when your are trying to display the star rating on a page other than woocommerce single product pages. Solution: assign `class="woocommerce"` to the elementor widget that you are using to place the star rating. It could be the shortcode widget, html, text editor or anything crazy you are trying to do with elementor
null
CC BY-SA 4.0
null
2023-01-03T08:38:55.223
2023-01-03T08:38:55.223
null
null
19,599,775
null
74,990,885
2
null
74,979,898
4
null
The solution of Marco works, but it limits you to use libraries that are also using MSL 3.2.3 instead of MSL 4.0.0. You can convert the ExternalMedia to MSL 4.0.0. Dymola should ask you if you want to do that when you load the ExternalMedia library. With the inbuilt conversion scripts most of the library is converted automatically and you should be able to test your model.
null
CC BY-SA 4.0
null
2023-01-03T08:41:21.310
2023-01-03T08:41:21.310
null
null
7,968,816
null
74,990,936
2
null
74,926,478
-1
null
Hi I have got the same problem ``` ubuntu@ip-xxx-xx-x-xxx:~/yarn node:internal/modules/cjs/loader:988 throw err; ^ Error: Cannot find module '/home/ubuntu/.yarn/releases/yarn-3.3.1.cjs' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15) at Function.Module._load (node:internal/modules/cjs/loader:833:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:22:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } ``` and I found the file named .yarnrc.yml and remove it ``` ubuntu@ip-xxx-xx-x-xxx:~$ cat .yarnrc.yml yarnPath: .yarn/releases/yarn-3.3.1.cjs ubuntu@ip-xxx-xx-x-xxx:~$ rm .yarnrc.yml ubuntu@ip-xxx-xx-x-xxx:~$ yarn yarn install v1.22.19 info No lockfile found. [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Saved lockfile. Done in 0.07s. ubuntu@ip-xxx-xx-x-xxx:~$ yarn -v 1.22.19 ```
null
CC BY-SA 4.0
null
2023-01-03T08:45:34.977
2023-01-03T08:55:16.550
2023-01-03T08:55:16.550
1,578,455
1,578,455
null
74,991,044
2
null
74,988,487
0
null
You can use the `circuitikz` the same way you use `\includegraphics` inside the `\subcaptionbox`: ``` \documentclass[10pt,letterpaper,twocolumn,aps,pra, superscriptaddress,longbibliography]{revtex4-2} \usepackage{xcolor} \usepackage{amsmath} \usepackage{amssymb} \usepackage{braket} \usepackage{circuitikz} \usepackage{tikz} \usetikzlibrary{quantikz} \usepackage[export]{adjustbox} \usepackage{subcaption,graphicx} \captionsetup{ subrefformat=parens } \begin{document} \begin{figure}[h] \centering \subcaptionbox{}[.4\linewidth][c]{% \begin{circuitikz}[american,baseline=(current bounding box.center) ] \draw (0,1) to [short, -*](0,1) to [inductor](0,-1) to [short, -*](0,-1); \end{circuitikz}% } \hfil \subcaptionbox{}[.4\linewidth][c]{% \includegraphics[width=\linewidth]{example-image-duck}% } \caption{The kinetic inductor a) A circuit diagram of an inductor. b) A fabricated JJ array with Manhattan-style.} \label{array} \end{figure} \end{document} ``` [](https://i.stack.imgur.com/3I5i7.png)
null
CC BY-SA 4.0
null
2023-01-03T08:54:35.177
2023-01-03T08:54:35.177
null
null
2,777,074
null
74,991,066
2
null
74,990,906
0
null
Try this code(also with the logic to use the Search Functionality). If you like it. --- # Full Code ``` class MyApp extends StatefulWidget { const MyApp({Key? key}) : super(key: key); @override State<MyApp> createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { bool hasFocus = false; FocusNode focus = FocusNode(); TextEditingController searchController = TextEditingController(); @override void initState() { super.initState(); focus.addListener(() { onFocusChange(); }); searchController.addListener(() { filterClints(); }); } @override void dispose() { searchController.dispose(); focus.removeListener(onFocusChange); super.dispose(); } void onFocusChange() { if (focus.hasFocus) { setState(() { hasFocus = true; }); } else { setState(() { hasFocus = false; }); } } @override Widget build(BuildContext context) { bool isSearching = searchController.text.isNotEmpty; return Scaffold( body: Column( children: [ Container( child: Padding( padding: const EdgeInsets.only( left: 5, right: 5, top: 0, bottom: 7, ), child: TextField( focusNode: focus, controller: searchController, // style: TextStyle(fontSize: 14, ), decoration: InputDecoration( hintText: "Search", label: const Text("Search customers & places"), contentPadding: const EdgeInsets.symmetric(vertical: 2), border: OutlineInputBorder( borderRadius: const BorderRadius.all(Radius.circular(50)), borderSide: BorderSide( color: Theme.of(context).colorScheme.primary, ), ), prefixIcon: const Icon( Icons.search, ), suffixIcon: Row( mainAxisSize: MainAxisSize.min, children: [ if (hasFocus) InkWell( onTap: () {}, child: const Icon( Icons.clear, color: Colors.grey, ), ), const SizedBox( width: 10, ), PopupMenuButton( icon: const Icon(Icons.more_vert_sharp, color: Colors.grey), itemBuilder: (context) => [ const PopupMenuItem(), PopupMenuItem(), ], onSelected: (value) {}, ) ], ), ), ), ), ), ], ), ); } } ``` --- # Preview [](https://i.stack.imgur.com/J8rSY.jpg) --- You can change the values prefixIcon/suffixIcon in textField to suit your needs.
null
CC BY-SA 4.0
null
2023-01-03T08:56:52.547
2023-01-03T09:02:18.140
2023-01-03T09:02:18.140
20,908,271
20,908,271
null
74,991,382
2
null
74,855,246
0
null
After some quality time with pencil and paper, I figured out a reasonably elegant way to do this. We still need to distinguish between even and odd faces, but that can be done with a modulo operation (compiled down to a bitwise AND), so it doesn't need branching. The arrangement is as follows: [](https://i.stack.imgur.com/0yAcB.png) The mapping of global axes to local axes: ``` u v normal +X +Y +Z -X +Z +Y -Y -Z +X +Y +X -Z +Z -X -Y -Z -Y -X ``` Each global axis is used once in each column, so this is indeed a permutation. Whether it's the same one that the Spore developers designed, remains an open question. There are certain rules now, for example, moving UP from face `f`, - `f``(f + 1) % 6`- `f``(f + 5) % 6` So the neighbour lookup becomes much simpler: ``` Index neighbor(idx: Index, direction: Direction) -> Index { switch (direction) { case UP: if (idx.v < SIZE - 1) { return Index { face: idx.face, u: idx.u, v: idx.v + 1 }; } else { return Index { face: (face + 1 + 4 * (face % 2)) % 6, u: SIZE - 1 - u, v: SIZE - 1 } } // And similar for the other three directions } } ``` There might still be room for improvement, so better answers are quite welcome!
null
CC BY-SA 4.0
null
2023-01-03T09:29:12.080
2023-01-03T09:29:12.080
null
null
14,637
null
74,991,433
2
null
74,974,877
0
null
You have to wrap your App.js code into Provider from react-native-paper. In Usage Section. Reference Link : [https://callstack.github.io/react-native-paper/getting-started.html#:~:text=file_ext%3D.ios.js-,Usage,-Wrap%20your%20root](https://callstack.github.io/react-native-paper/getting-started.html#:%7E:text=file_ext%3D.ios.js-,Usage,-Wrap%20your%20root)
null
CC BY-SA 4.0
null
2023-01-03T09:34:13.440
2023-01-03T09:35:22.747
2023-01-03T09:35:22.747
11,037,287
11,037,287
null
74,991,614
2
null
74,984,553
0
null
If you just want to change the "X X X X X X X X" to specific secret, here is a working demo below: View ``` @model SecretNumberViewModel @{ ViewBag.Title = "Secret Number"; } <h2 class="text-center">@ViewBag.Title</h2> <hr /> <div class="row"> <div class="bg-info w-25 rounded-pill"> <h5>Secret Number : @Model.SecretNum</h5> </div> </div> <hr /> <div class="container text-md-center"> <table width="100%" height="100%" align="center" class="table-bordered border-5 table-success"> <thead> <tr> @for (int i = 1; i <= Model.SecretNum.Split(" ").ToArray().Length; i++) { <td align="center" valign="middle" class="bg-success"> <h5 id="item1">@i</h5> </td> } </tr> </thead> <tbody> <tr id="SecretRow"> @*give the tr id*@ @for (int i = 0; i < Model.SecretNum.Split(" ").ToArray().Length; i++) { <td> <h1>X</h1> </td> } </tr> </tbody> </table> </div> <hr /> <br /> <form method="post"> <div class="form-control card-body bg-primary bg-opacity-25"> <label>Column</label> <br /> @*give the input id*@ <input id="col" name="col" type="number" min="1" max="7" placeholder="1-7"> <br /> <label>Number</label> <br /> @*give the input id*@ <input id="num" name="num" type="number" min="0" max="9" placeholder="0-9" /> <hr /> @* change the input type to button*@ <input onclick="changeSecret()" type="button" class="btn btn-info btn btn-outline-primary rounded-pill" /> </div> </form> @section Scripts { <script> function changeSecret() { var data= { col: $("#col").val(), num: $("#num").val(), nums:'@Model.SecretNum' }; $.ajax({ url: "/Game/FindSecretNumber", type: 'post', dataType: 'json', data:data, success:function(res){ var index = res.data.col-1; $("#SecretRow").find('td').eq(index).find("h1").text(res.data.num); } }) } </script> } ``` Controller ``` [HttpPost] public async Task<IActionResult> FindSecretNumber(string nums, int num, int col) { SecretNumberViewModel modelNumber = new SecretNumberViewModel(); modelNumber.SecretNum = nums; modelNumber.Num = num; modelNumber.Col = col; return Json(new { data = modelNumber }); } ``` Result: [](https://i.stack.imgur.com/yWewT.gif)
null
CC BY-SA 4.0
null
2023-01-03T09:51:09.350
2023-01-03T09:51:09.350
null
null
11,398,810
null
74,992,436
2
null
15,903,784
0
null
your java path is not set to jdk and you have to configure java path in as java_home in standalone.conf.bat and start with run.bat
null
CC BY-SA 4.0
null
2023-01-03T11:00:47.583
2023-01-03T11:00:47.583
null
null
16,405,045
null
74,992,549
2
null
74,992,377
0
null
... and what about filling in those values, like I did in this example: 1. Select all data (Ctrl+G, Special, Current Region). 2. In there, select all blanks (Ctrl+G, Special, Blanks). 3. Copy the value from the one above (F2, fill in =A2). 4. Fill in for all select (blank) cells (Ctrl+ENTER) This is what you end up with: [](https://i.stack.imgur.com/TkaG5.png)
null
CC BY-SA 4.0
null
2023-01-03T11:10:17.403
2023-01-03T11:10:17.403
null
null
4,279,155
null
74,992,754
2
null
74,991,925
0
null
If you use model Collab, and within you have project relation , than you can use ``` Collab::query() ->with('project', function ($q) use ($id) { return $q->where('id', $id); }) ->get(); ``` Or you can use query builder as well ``` DB::table('collabs') ->select('collabs.*') ->join('projects', 'projects.id', '=', 'collabs.project_id') ->where('projects.id', $id) ->get(); ``` Just adjust it according what you really need.
null
CC BY-SA 4.0
null
2023-01-03T11:29:28.470
2023-01-03T11:29:28.470
null
null
2,384,882
null
74,992,917
2
null
74,991,577
0
null
onclick of button this function will opens multiple pages ``` function Redirect() { window.open('url here', '_blank'); window.open('url here', '_blank'); } ```
null
CC BY-SA 4.0
null
2023-01-03T11:44:39.633
2023-01-03T11:44:39.633
null
null
14,070,093
null
74,992,901
2
null
74,991,925
1
null
You should really consider reading and watching more videos on how relationships and eloquent works, I hope this below is a good reference for you to get started, please read carefully, and sorry I couldn't translate back to romanian, and to avoid any mistakes, I kept my code in english. ``` Caloboratori = Colaborators Istoric Proiecte = Project History id || auto_increment project_id || bigInteger() colaborator_id || bigInteger() Proiecte = Project id || auto_increment ``` ``` /* To load the history, we will be using hasMany relationship, because for each project, we have lots of history, please read more on one-to-many relationships here https://laravel.com/docs/9.x/eloquent-relationships#one-to-many Istoric Proiecte = Project History id || auto_increment project_id || bigInteger() colaborator_id || bigInteger() */ public function histories() { return $this->hasMany(ProjectHistory::class); } ``` ``` //We will reverse the one-to-many relationship, with belongsTo here. | example: project_id public function project() { return $this->belongsTo(Project::class); } //We will reverse the one-to-many relationship, with belongsTo here. | example: colaborator_id public function colaborator() { return $this->belongsTo(Colaborator::class); } ``` ``` // Show a list of all projects public function index() { //Get all projects $projects = Project::all(); //Load all of the project relationships that we will be using $projects->load('histories.colaborator'); return view('projects.index', compact('projects')); } // Show a single project public function show(Project $project) { //Load all of the project relationships that we will be using $project->load('histories.colaborator'); //Assign the loaded project history $histories = $project->histories; return view('projects.show', compact('project', 'histories')); } ``` : in this blade, you can forloop thru all of your projects model, and assign them as `$project`, since we loaded the relationships earlier from the controller. You can easily access the relationships using `$project->histories` then assign each history model to `$history`. Then you can go one step inside of the history relationship and call the inner relationship of `colaborator` with `$history->colaborator` ``` @foreach ($projects as $project) <p>Project id: {{ $project->id }} <p>Project name: {{ $project->name }} <h1>Project History list</h1> @foreach ($project->histories as $history) <ul> <li>ID: {{$history->id}}</li> <li>Name: {{$history->name}}</li> <li>Colaborator Name: {{$history->colaborator->name}}</li> </ul> @endforeach @endforeach ``` : in this blade, we have a single project, and you can forloop thru all of your history models, since we loaded the relationships from the controller. We assigned the histories collection as `$histories` then assign each history model to `$history` Then you can go one step inside the history relationship and call the inner relationship of `colaborator` with `$history->colaborator` ``` <p>Project name: {{ $project->name }} <h1>Project History list</h1> @foreach ($histories as $history) <ul> <li>ID: {{$history->id}}</li> <li>Name: {{$history->name}}</li> <li>Colaborator Name: {{$history->colaborator->name}}</li> </ul> @endforeach ```
null
CC BY-SA 4.0
null
2023-01-03T11:43:28.427
2023-01-03T11:58:28.550
2023-01-03T11:58:28.550
9,992,791
9,992,791
null
74,993,088
2
null
74,871,271
0
null
Storing each day in a separate table is probably not the best way to go but more on that later, to solve the immediate problem.... You can dump the results of your SP into a temp table and join to that. I have assumed here that your `SensorDataRainfall` table ( the one without a date) is the same structure at the ones with dates. Your dataset query would look like this. ``` SELECT TOP 0 * INTO #SDR FROM dbo.SensorDataRainfall -- create an empty table to put the results in. INSERT INTO #SDR EXEC spGetDataRainfall @year, @month -- dump data from the SP SELECT * FROM #SDR a JOIN myOtherTable b on a.column = b.column ``` --- There are a few issues with your general approach. Having data which is essentially the same data split by dates is not very scalable, even if the amount of data is very small, it's just not a good approach. You should probably investigate the process that creates there tables in the first place and insert the data into a table which has the same structure but also include columns for the year and month. This way all the data will be in a single table and can easily queried for a single month of across multiple months, years.
null
CC BY-SA 4.0
null
2023-01-03T12:00:44.527
2023-01-03T12:00:44.527
null
null
1,775,389
null
74,993,345
2
null
74,992,999
0
null
You are plotting two elements per row: 1. plt.polar(... the points 2. plt.fill(... the shading So when you add your legend, you get two items per row of data: one for the points, and one for the fill. And the legend the same colour as your plot. There's just only 3 entries for the legend, but 6 curves You can avoid this by adding `label='_nolegend_'` to your `plt.fill(` as answered in a similar question: [Show only certain items in legend Python Matplotlib](https://stackoverflow.com/questions/24680981/show-only-certain-items-in-legend-python-matplotlib) Also, if you add a label when creating the curves (with `label=row[0]`), why do you add new labels `Survey2["createdAt"]` when creating the legend? This will overwrite the ones given before
null
CC BY-SA 4.0
null
2023-01-03T12:25:21.520
2023-01-03T12:25:21.520
null
null
19,885,851
null
74,993,431
2
null
74,984,989
0
null
Thanks for the help, this approach worked for me: ``` Private Sub CommandButton1_Click() Dim row As ListRow Set row = ActiveWorkbook.Worksheets("Teste-Base de dados").ListObjects("Table1").ListRows.Add(1) row.Range(1) = ... row.Range(2) = ... ... End Sub ``` However, I would like to know how can I add new rows one after another (if the first row has values, it should add values to the 2nd row, and so on). For example, this first approach will add new rows at the end of the table, no matter if it has values or not (the table could be empty): ``` Dim row As ListRow Set row = ActiveWorkbook.Worksheets("Teste-Base de dados").ListObjects("Table1").ListRows.Add ``` On the second approach, one row will be added on the 1st position, while the remaining rows will go down (to the 2nd, 3rd, 4th,.... row): ``` Dim row As ListRow Set row = ActiveWorkbook.Worksheets("Teste-Base de dados").ListObjects("Table1").ListRows.Add(1) ```
null
CC BY-SA 4.0
null
2023-01-03T12:31:34.770
2023-01-03T12:31:34.770
null
null
20,913,032
null
74,993,465
2
null
74,990,928
0
null
A `dput(head(summer.months)`) might be sufficient. Anyway, here's an example using internal dataset `mpg` for illustrating few adjustments: ``` library(tidyverse) ## changing variable for x-Axis into ordered factor - this is a bit of a workaround. If using dates, ## it is better to use datatype date and adjust axis labels accordingly my_mpg <- mpg %>% mutate(class = factor(class, levels = c("compact", "midsize", "suv", "2seater", "minivan", "pickup", "subcompact"), ordered = TRUE)) ggplot(my_mpg, aes(x = class, y = hwy, linetype = class, colour = fl, fill = drv)) + geom_boxplot() + scale_fill_manual(values = c("white", "white", "green", "black")) + ## using subtitle to add information about the dataset labs(title = "title", subtitle = paste("#lines: ", nrow(mpg))) + theme_bw() + theme(legend.justification = "top", ## move legend to top legend.text = element_text(size = 10), ## adjust text sizes in legend legend.title = element_text(size =10), legend.key.size = unit(20, "pt"), ## if required: adjust size of legend keys plot.subtitle = element_text(hjust = 1.0)) ## shift subtitle to the right ``` You might find further hints in [ggplot2 reference](https://ggplot2.tidyverse.org/reference/index.html) and the [ggplot2 book](https://ggplot2-book.org/index.html).
null
CC BY-SA 4.0
null
2023-01-03T12:36:05.197
2023-01-03T12:36:05.197
null
null
8,344,649
null
74,993,602
2
null
74,991,363
0
null
Edit: I just found a fix. I suspected the problem came from the asynchrony of the API calls with respect to the rendering of the component, but I didn't know where exactly the problem was. I just discovered that this is caused by the multiple asynchronous calls inside a loop, precisely at line 14 of the Picture.ts service. To fix the problem, I replaced the following code: ``` try { const res = await listAll(ref(storage, COLLECTION_NAME)); res.items.forEach(async (_data: any, index: number) => { try { const url = await getDownloadURL(ref(storage, `/${COLLECTION_NAME}/${_data.name}`)); data.push({ id: `${COLLECTION_NAME}-${index}`, name: _data.name, url }); } catch (error) { console.error(error); } }); } ``` by the following code: ``` try { const res = await listAll(ref(storage, COLLECTION_NAME)); await Promise.all(res.items.map(async (_data: any, index: number) => { try { const url = await getDownloadURL(ref(storage, `/${COLLECTION_NAME}/${_data.name}`)); data.push({ id: `${COLLECTION_NAME}-${index}`, name: _data.name, url }); } catch (error) { console.error(error); } })); } ```
null
CC BY-SA 4.0
null
2023-01-03T12:49:58.217
2023-01-03T12:56:13.303
2023-01-03T12:56:13.303
17,051,580
17,051,580
null
74,993,713
2
null
74,993,501
1
null
Within Sheets here's a sample setup and a working formula you can test out. Cell D2 formula: `=INDEX(MAP(B2:B8,C2:C8,LAMBDA(bx,cx,IF(REGEXMATCH(bx,"(?i)"&D1:G1&" subscription"),SWITCH(REGEXEXTRACT(cx,"Grind: (.*?),"),"Small",250,"Medium",450,"Large",900),))))` - [](https://i.stack.imgur.com/jqFf5.png) : `=INDEX(MAP(B2:B9,C2:C9,LAMBDA(bx,cx,IF(bx="",,IF(REGEXMATCH(bx,"(?i)"&D1:G1&" subscription"),SWITCH(REGEXEXTRACT(cx,"Small|Medium|Large"),"Small",250,"Medium",450,"Large",900),)))))`
null
CC BY-SA 4.0
null
2023-01-03T13:01:16.513
2023-01-03T14:09:14.080
2023-01-03T14:09:14.080
5,479,575
5,479,575
null
74,993,853
2
null
74,983,890
1
null
This can be accomplished using Power Query, available in Windows Excel 2010+ and Excel 365 (Windows or Mac) To use Power Query - - `Data => Get&Transform => from Table/Range`- `Home => Advanced Editor`- - - - `Applied Steps` ``` let //Change next line to reflect actual data source Source = Excel.CurrentWorkbook(){[Name="Table31"]}[Content], //set data types for each column #"Changed Type" = Table.TransformColumnTypes(Source,{{"Id", Int64.Type}, {"Country", type text}, {"City", type text}}), //Group by ID #"Grouped Rows" = Table.Group(#"Changed Type", {"Id"}, { //for each subgroup, group by Country {"Facility", (t)=> let grp=Table.Group(t,{"Country"},{ //Then combine all the cities in one text string "Cities", (tc)=> "(" & Text.Combine(tc[City],",") & ")"}), //Add index column to "number" the different country/cities combinations #"Add Index" = Table.AddIndexColumn(grp, "Index",1), #"Index to Text" = Table.TransformColumns(#"Add Index",{"Index", each Number.ToText(_,"0\. ")}), //combine the separate subtable columns into one string #"Combine Columns" = Table.CombineColumns( #"Index to Text",{"Index","Country","Cities"},Combiner.CombineTextByDelimiter(""),"Facility"), //combine the separate rows into a single row #"Combine to One Row" = Text.Combine(#"Combine Columns"[Facility]," ") in #"Combine to One Row", type text}, {"All", each _, type table [Id=nullable number, Country=nullable text, City=nullable text]}}), //Expand the Country and City columns #"Expanded All" = Table.ExpandTableColumn(#"Grouped Rows", "All", {"Country", "City"}) in #"Expanded All" ``` [](https://i.stack.imgur.com/moMpB.png)
null
CC BY-SA 4.0
null
2023-01-03T13:13:47.233
2023-01-03T13:13:47.233
null
null
2,872,922
null
74,994,694
2
null
74,994,650
-1
null
Well try: ``` dataframe.groupby('EMPLOYEE_ID')['AMOUNT_PAID'].sum() ```
null
CC BY-SA 4.0
null
2023-01-03T14:28:03.507
2023-01-03T14:29:28.943
2023-01-03T14:29:28.943
1,367,454
19,741,306
null
74,995,068
2
null
74,991,408
0
null
You need to make the containing column a flex container, then you can apply grow to the row inside. ``` html, body { height: 100%; } .flex-grow { flex: 1; } .header { height: 100px; } ``` ``` <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous" defer></script> <div class="h-100 container-fluid d-flex flex-column"> <div class="row bg-warning"> <div class="col-12 py-4 header">header</div> </div> <div class="row no-gutter flex-grow"> <div class="col-1 bg-primary"> <div class="sidebar-item">Sidebar</div> </div> <div class="col-11 d-flex flex-column px-0"> <div class="main bg-success flex-grow-1"> Main </div> <div class="bg-danger py-3"> Main Footer </div> </div> </div> </div> ```
null
CC BY-SA 4.0
null
2023-01-03T15:00:13.520
2023-01-03T15:00:13.520
null
null
1,264,804
null
74,995,277
2
null
74,994,549
1
null
This part is very wasteful: ``` a = fft(x).real b = fft(x).imag ``` You’re computing the FFT twice for no good reason. You compute it a 3rd time later, and you already computed it once before. You should compute it only once, not 4 times. The FFT is the most expensive part of your code. Then: ``` ab_filter_2 = fft(x) ab_filter_2.real = a*p ab_filter_2.imag = b*p x_filter2 = ifft(ab_filter_2)*2 ``` Replace all of that with: ``` out = ifft(fft(x) * p) ``` Here you do the same thing twice: ``` p[c[0:int(len(c)/2)].argsort()[int(len(c)/2-1)]] = 0 p[c[0:int(len(c)/2)].argsort()[int(len(c)/2-2)]] = 0 ``` But you set only the left half of the filter. It is important to make a symmetric filter. There are two locations where `abs(f)` has the same value (up to rounding errors!), there is a positive and a negative frequency that go together. Those two locations should have the same filter value (actually complex conjugate, but you have a real-valued filter so the difference doesn’t matter in this case). I’m unsure what that indexing does anyway. I would split out the statement into shorter parts on separate lines for readability. I would do it this way: ``` import numpy as np x = ... x -= np.mean(x) fft_x = np.fft.fft(x) c = np.abs(fft_x) # no point in normalizing, doesn't change the order when sorting f = c[0:len(c)//2].argsort() f = f[-2:] # the last two elements are the indices to the largest two frequency components p = np.zeros(len(c)) p[f] = 1 # preserve the largest two components p[-f] = 1 # set the same components counting from the end out = np.fft.ifft(fft_x * p).real # note that np.fft.ifft(fft_x * p).imag is approximately zero if the filter is created correctly ``` > Is it correct that the output of the FFT-function contains the fundamental frequency A0/ C0 […]? In principle yes, but you subtracted the mean from the signal, effectively setting the fundamental frequency (DC component) to 0.
null
CC BY-SA 4.0
null
2023-01-03T15:19:44.347
2023-01-03T16:49:11.733
2023-01-03T16:49:11.733
7,328,782
7,328,782
null
74,995,456
2
null
21,484,729
0
null
A working solution: 1. Register for MouseWheel, Opened, Closed event of your ToolStripDropDown in the Load event of the form ``` dropDown.Opened+= new EventHandler(dropDown_Opened); dropDown.Closed+= new ToolStripDropDownClosedEventHandler(dropDown_Closed); dropDown.MouseWheel+= new MouseEventHandler(dropDown_MouseWheel); ``` 1. Add the code for Keyboard class which simulate key presses ``` public static class Keyboard { [System.Runtime.InteropServices.DllImport("user32.dll")] static extern uint keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo); const byte VK_UP = 0x26; // Arrow Up key const byte VK_DOWN = 0x28; // Arrow Down key const int KEYEVENTF_EXTENDEDKEY = 0x0001; //Key down flag, the key is going to be pressed const int KEYEVENTF_KEYUP = 0x0002; //Key up flag, the key is going to be released public static void KeyDown() { keybd_event(VK_DOWN, 0, KEYEVENTF_EXTENDEDKEY, 0); keybd_event(VK_DOWN, 0, KEYEVENTF_KEYUP, 0); } public static void KeyUp() { keybd_event(VK_UP, 0, KEYEVENTF_EXTENDEDKEY, 0); keybd_event(VK_UP, 0, KEYEVENTF_KEYUP, 0); } } ``` 1. Add the code for Opened, Closed, MouseWheel events: ``` bool IsMenuStripOpen = false; void dropDown_MouseWheel(object sender, MouseEventArgs e) { if (IsMenuStripOpen) { if (e.Delta > 0) { Keyboard.KeyUp(); } else { Keyboard.KeyDown(); } } } void dropDown_Closed(object sender, ToolStripDropDownClosedEventArgs e) { IsMenuStripOpen = false; } void dropDown_Opened(object sender, EventArgs e) { IsMenuStripOpen = true; } ``` 1. Create global functionality for all systems for item 1 ``` void dropDownMenuScrollWheel(ToolStripDropDown dropDown) { dropDown.Opened +=new EventHandler(dropDown_Opened); dropDown.Closed +=new ToolStripDropDownClosedEventHandler(dropDown_Closed); dropDown.MouseWheel += new MouseEventHandler(dropDown_MouseWheel); } ``` ToolStripDropDown is `ToolStripMenuItem.DropDown` Hope it help you.
null
CC BY-SA 4.0
null
2023-01-03T15:36:12.450
2023-01-03T16:01:13.457
2023-01-03T16:01:13.457
13,653,031
13,653,031
null
74,996,105
2
null
70,073,951
0
null
Try this below: Using the dir="auto" (which is used for text alignment) along with max-width 100% you should be able to center whatever you want. ``` <div align="center" dir="auto" <img style="max-width: 100%;" src="https://github-readme-stats.vercel.app/api?username=hussaino03&show_icons=true&theme=radical" /> <img style="max-width: 100%;" src="https://github-readme-stats.vercel.app/api/top-langs/?username=hussaino03&theme=radical&layout=compact" /> </div> ```
null
CC BY-SA 4.0
null
2023-01-03T16:34:12.070
2023-01-03T16:34:12.070
null
null
20,920,954
null
74,996,434
2
null
74,940,848
0
null
I feel like it should be possible to AND conditionals, but so far everything indicates it is not supported by default. A custom function module would be able to support it.
null
CC BY-SA 4.0
null
2023-01-03T17:05:07.273
2023-01-03T17:05:07.273
null
null
11,103,905
null
74,996,689
2
null
74,995,836
0
null
The keys in your database are sequential numeric value (i.e. `1`, `2`, `3`), which the Firebase SDK interprets as the data being an array and thus exposing it as a `List` to your Flutter code. So the proper way to get the values is: ``` List list = snapshot.data!.snapshot.value as List; ``` Note that the list will not have any item at index 0, was that is missing in your source data too. In general, it's recommended to use such sequential numeric keys in Firebase, as it results in counterintuitive behavior at times. For more on this, and how to properly store lists of data in Firebase, see [Best Practices: Arrays in Firebase](https://firebase.googleblog.com/2014/04/best-practices-arrays-in-firebase.html).
null
CC BY-SA 4.0
null
2023-01-03T17:28:55.433
2023-01-03T17:28:55.433
null
null
209,103
null
74,996,771
2
null
74,996,456
1
null
Did you try to import it with `../node_modules/@angular` Quite the same like: [Angular material Could not find Angular Material core theme](https://stackoverflow.com/questions/44230852/angular-material-could-not-find-angular-material-core-theme)
null
CC BY-SA 4.0
null
2023-01-03T17:36:23.183
2023-01-04T05:43:50.833
2023-01-04T05:43:50.833
3,247,693
3,247,693
null
74,996,767
2
null
74,624,449
8
null
Things to consider while using `context.go()` from `ShellRoute` to `GoRoute` 1. Specify parentNavigatorKey prop in each GoRoute If page is child of ShellRoute : parentNavigatorKey:_shellNavigatorKey If page is child of MainRoute : parentNavigatorKey:_rootNavigatorKey 2. Use context.go() to replace page , context.push() to push page to stack ``` final _parentKey = GlobalKey<NavigatorState>(); final _shellKey = GlobalKey<NavigatorState>(); |_ GoRoute |_ parentNavigatorKey = _parentKey Specify key here |_ ShellRoute |_ GoRoute // Needs Bottom Navigation |_ parentNavigatorKey = _shellKey |_ GoRoute // Needs Bottom Navigation |_ parentNavigatorKey = _shellKey |_ GoRoute // Full Screen which doesn't need Bottom Navigation |_parentNavigatorKey = _parentKey ``` --- 1. Not specifying parentNavigatorKey 2. For backButton to be visible you have to have appBar inside Scaffold. 3. This code if (index == 3) { router.push(location); } setState(() { _currentIndex = index; router.go(location); }); } 1. Visible BackButton 2. Navigate Back to ShellRoute 3. Persist the Navigation menu on clicking back button 4. Fixed weird transition between routes when using navbar ``` final _rootNavigatorKey = GlobalKey<NavigatorState>(); final _shellNavigatorKey = GlobalKey<NavigatorState>(); final router = GoRouter( initialLocation: '/', navigatorKey: _rootNavigatorKey, routes: [ ShellRoute( navigatorKey: _shellNavigatorKey, pageBuilder: (context, state, child) { print(state.location); return NoTransitionPage( child: ScaffoldWithNavBar( location: state.location, child: child, )); }, routes: [ GoRoute( path: '/', parentNavigatorKey: _shellNavigatorKey, pageBuilder: (context, state) { return const NoTransitionPage( child: Scaffold( body: Center(child: Text("Home")), ), ); }, ), GoRoute( path: '/discover', parentNavigatorKey: _shellNavigatorKey, pageBuilder: (context, state) { return const NoTransitionPage( child: Scaffold( body: Center(child: Text("Discover")), ), ); }, ), GoRoute( parentNavigatorKey: _shellNavigatorKey, path: '/shop', pageBuilder: (context, state) { return const NoTransitionPage( child: Scaffold( body: Center(child: Text("Shop")), ), ); }), ], ), GoRoute( parentNavigatorKey: _rootNavigatorKey, path: '/login', pageBuilder: (context, state) { return NoTransitionPage( key: UniqueKey(), child: Scaffold( appBar: AppBar(), body: const Center( child: Text("Login"), ), ), ); }, ), ], ); ``` ``` class ScaffoldWithNavBar extends StatefulWidget { String location; ScaffoldWithNavBar({super.key, required this.child, required this.location}); final Widget child; @override State<ScaffoldWithNavBar> createState() => _ScaffoldWithNavBarState(); } class _ScaffoldWithNavBarState extends State<ScaffoldWithNavBar> { int _currentIndex = 0; static const List<MyCustomBottomNavBarItem> tabs = [ MyCustomBottomNavBarItem( icon: Icon(Icons.home), activeIcon: Icon(Icons.home), label: 'HOME', initialLocation: '/', ), MyCustomBottomNavBarItem( icon: Icon(Icons.explore_outlined), activeIcon: Icon(Icons.explore), label: 'DISCOVER', initialLocation: '/discover', ), MyCustomBottomNavBarItem( icon: Icon(Icons.storefront_outlined), activeIcon: Icon(Icons.storefront), label: 'SHOP', initialLocation: '/shop', ), MyCustomBottomNavBarItem( icon: Icon(Icons.account_circle_outlined), activeIcon: Icon(Icons.account_circle), label: 'MY', initialLocation: '/login', ), ]; @override Widget build(BuildContext context) { const labelStyle = TextStyle(fontFamily: 'Roboto'); return Scaffold( body: SafeArea(child: widget.child), bottomNavigationBar: BottomNavigationBar( selectedLabelStyle: labelStyle, unselectedLabelStyle: labelStyle, selectedItemColor: const Color(0xFF434343), selectedFontSize: 12, unselectedItemColor: const Color(0xFF838383), showUnselectedLabels: true, type: BottomNavigationBarType.fixed, onTap: (int index) { _goOtherTab(context, index); }, currentIndex: widget.location == '/' ? 0 : widget.location == '/discover' ? 1 : widget.location == '/shop' ? 2 : 3, items: tabs, ), ); } void _goOtherTab(BuildContext context, int index) { if (index == _currentIndex) return; GoRouter router = GoRouter.of(context); String location = tabs[index].initialLocation; setState(() { _currentIndex = index; }); if (index == 3) { context.push('/login'); } else { router.go(location); } } } class MyCustomBottomNavBarItem extends BottomNavigationBarItem { final String initialLocation; const MyCustomBottomNavBarItem( {required this.initialLocation, required Widget icon, String? label, Widget? activeIcon}) : super(icon: icon, label: label, activeIcon: activeIcon ?? icon); } ``` [](https://i.stack.imgur.com/CzzZKm.png) [](https://i.stack.imgur.com/T2x4Xm.png)
null
CC BY-SA 4.0
null
2023-01-03T17:36:04.737
2023-03-01T06:15:50.720
2023-03-01T06:15:50.720
13,431,819
13,431,819
null
74,996,899
2
null
57,456,167
1
null
My objective was to make this dynamic, so whenever i create a folder in a directory, terraform automatically uploads that new folder and its contents into S3 bucket with the same key structure. Heres how i did it. First you have to get a local variable with a list of each Folder and the files under it. Then we can loop through that list to upload the source to S3 bucket. Example: I have a folder called "Directories" with 2 sub folders called "Folder1" and "Folder2" each with their own files. ``` - Directories - Folder1 * test_file_1.txt * test_file_2.txt - Folder2 * test_file_3.txt ``` Step 1: Get the local var. ``` locals{ folder_files = flatten([for d in flatten(fileset("${path.module}/Directories/*", "*")) : trim( d, "../") ]) } ``` Output looks like this: ``` folder_files = [ "Folder1/test_file_1.txt", "Folder1/test_file_2.txt", "Folder2/test_file_3.txt", ] ``` Step 2: dynamically upload s3 objects ``` resource "aws_s3_object" "this" { for_each = { for idx, file in local.folder_files : idx => file } bucket = aws_s3_bucket.this.bucket key = "/Directories/${each.value}" source = "${path.module}/Directories/${each.value}" etag = "${path.module}/Directories/${each.value}" } ``` This loops over the local var, So in your S3 bucket, you will have uploaded in the same structure, the local Directory and its sub directories and files: ``` Directory - Folder1 - test_file_1.txt - test_file_2.txt - Folder2 - test_file_3.txt ```
null
CC BY-SA 4.0
null
2023-01-03T17:49:27.707
2023-01-03T17:49:27.707
null
null
13,821,121
null
74,997,129
2
null
30,964,950
0
null
its been 8 years, but.. to delay the result writing to a batch file you should add timeout then the delay in seconds for example timeout 5 will delay the result for 5 seconds. Have a good day!
null
CC BY-SA 4.0
null
2023-01-03T18:10:46.323
2023-01-03T18:10:46.323
null
null
20,013,645
null
74,997,358
2
null
28,966,678
0
null
You mentioned the measured element be animated If you are doing a scaling animation, make sure to measure the element after the animation is done
null
CC BY-SA 4.0
null
2023-01-03T18:32:35.870
2023-01-03T18:32:35.870
null
null
6,683,217
null
74,997,425
2
null
74,992,650
0
null
1. Remove node_modules folder 2. Install dependencies (npm i) 3. Close android emulator & close metro window 4. cd android && gradlew clean 5. npx react-native start --reset-cache 6. After "Metro" opens, close it 7. npm run android I try this when my env no respond, hope its help you.
null
CC BY-SA 4.0
null
2023-01-03T18:40:29.853
2023-01-03T18:40:29.853
null
null
19,541,382
null
74,997,542
2
null
30,518,680
0
null
Make sure you don't have another iteration path with the same name. If so, it prevents items from being reordered. In my case i added sufix (2022) on my the old iteration path T01-JAN-01 [](https://i.stack.imgur.com/MePl5.png)
null
CC BY-SA 4.0
null
2023-01-03T18:51:28.933
2023-01-03T18:51:28.933
null
null
819,312
null
74,998,129
2
null
74,995,205
0
null
``` import pandas as pd data = [[1, '12/12/2021', 'A', 500], [2, '10/20/2021', 'D', 200], [3, '7/2/2022', 'E', 300], [1, '5/2/2022', 'B', 500], [1, '8/2/2022', 'B', 500], [3, '10/2/2022', 'C', 200], [2, '1/5/2022', 'D', 200]] df = pd.DataFrame(data, columns=['ID', 'Date', 'Factor1', 'Factor2']) # get the 'Factor' columns factor_columns = [col for col in df.columns if col.startswith('Factor')] # returns Y if previous val has changed else N def check_factor(x, col, df1): # assigning previous value if exist or target factor value if NaN val = df1[df1.ID == x.ID].shift(1)[col].fillna(x[col]).loc[x.name] return 'N' if val == x[col] else 'Y' # creating new columns list to reorder columns columns = ['ID', 'Date'] for col in factor_columns: columns += [col, f'{col}_Changed'] # applying check_factor to new column df[f'{col}_Changed'] = df.apply(check_factor, args=(col, df.copy()), axis=1) df = df[columns] print(df) ``` ``` ID Date Factor1 Factor1_Changed Factor2 Factor2_Changed 0 1 12/12/2021 A N 500 N 1 2 10/20/2021 D N 200 N 2 3 7/2/2022 E N 300 N 3 1 5/2/2022 B Y 500 N 4 1 8/2/2022 B N 500 N 5 3 10/2/2022 C Y 200 Y 6 2 1/5/2022 D N 200 N ```
null
CC BY-SA 4.0
null
2023-01-03T19:59:24.827
2023-01-03T19:59:24.827
null
null
18,160,754
null
74,998,224
2
null
74,997,996
0
null
It seems like you are not passing the parameters correctly, could you try passing the parameters object directly? ``` gapi.client.sheets.spreadsheets.values.append({ "spreadsheetId": "YourSheetId", "range": "FV1!C:C", "valueInputOption": "RAW", "resource": { "values": [ [ "This is a test" ] ] } }) .then(function(response) { // Handle the results here (response.result has the parsed body). console.log("Response", response); }, function(err) { console.error("Execute error", err); }); ```
null
CC BY-SA 4.0
null
2023-01-03T20:10:42.423
2023-01-03T20:10:42.423
null
null
9,189,743
null
74,998,249
2
null
74,997,033
0
null
You can create an Employee class which contains the list of reports as below along with empId and reportingId: ``` public class Employee { private String empId; private String reportingId; private List<Employee> reports; public Employee(String empId, String reportingId) { this.empId = empId; this.reportingId = reportingId; this.reports = new ArrayList<>(); } public String getEmpId() { return empId; } public String getReportingId() { return reportingId; } public List<Employee> getReports() { return reports; } } ``` ``` // Step 1: Connect to the database Connection conn = DriverManager.getConnection(connectionString, username, password); // Step 2: Execute a SELECT statement Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT empId, reportingId FROM employee"); // Step 3: Iterate over the resultset and create a Map of Employee objects Map<String, Employee> employees = new HashMap<>(); while (rs.next()) { String empId = rs.getString("empId"); String reportingId = rs.getString("reportingId"); Employee employee = new Employee(empId, reportingId); employees.put(empId, employee); } // Step 4: Iterate over the Map and create the hierarchy of Employee objects for (Employee employee : employees.values()) { Employee manager = employees.get(employee.getReportingId()); if (manager != null) { manager.getReports().add(employee); } } // The hierarchy of Employee objects is now complete ``` You can then print the hierarchy of Employee objects using a recursive method, like this: ``` public void printHierarchy(Employee employee, int level) { for (int i = 0; i < level; i++) { System.out.print("\t"); } System.out.println(employee.getEmpId()); for (Employee report : employee.getReports()) { printHierarchy(report, level + 1); } } ``` Call the printHierarchy method from 101 employee Output: ``` 101 1013 1012 101222 101223 1011 101101 101102 ```
null
CC BY-SA 4.0
null
2023-01-03T20:14:24.697
2023-01-03T20:14:24.697
null
null
4,970,944
null
74,998,336
2
null
55,350,437
0
null
One of the solutions is to use disableClose option ``` <mat-drawer [disableClose]="true"> ``` > @Input() disableClose: booleanWhether the drawer can be closed with the escape key or by clicking on the backdrop.
null
CC BY-SA 4.0
null
2023-01-03T20:26:11.160
2023-01-03T20:26:11.160
null
null
1,736,537
null
74,998,366
2
null
74,998,261
0
null
The problem starts here: ``` let playerRef = gameRef.collection("players") playerRef.document("\(player.playerNumber)")... ``` This code tries to update a `$player.playerNumber` in a `players` . But your screenshot shows a `players` in an otherwise named document. So there is no document called `players`, which explains the error message. There is no way operator to update an item in an array field in Firestore; the only operators are to [add a unique item, remove specific items](https://firebase.google.com/docs/firestore/manage-data/add-data#update_elements_in_an_array), or to set the entire field. So if the `array_union` operator is not good enough for your use-case, you'll have to: 1) read the array, 2) update it in your application code, 3) write the entire array back to the database. Also see: [Firestore Update single item in array of objects](https://stackoverflow.com/questions/62166055/firestore-update-single-item-in-array-of-objects)
null
CC BY-SA 4.0
null
2023-01-03T20:29:35.047
2023-01-03T20:37:31.973
2023-01-03T20:37:31.973
209,103
209,103
null
74,998,957
2
null
50,742,449
0
null
I'm the current maintainer of pypdf and PyPDF2 (Please use pypdf; PyPDF2 is deprecated) It is not possible to change a text with pypdf at the moment. Changing form contents is a different story. However, we have several issues with form fields: [https://github.com/py-pdf/pypdf/labels/workflow-forms](https://github.com/py-pdf/pypdf/labels/workflow-forms) The `update_page_form_field_values` is the correct function to use.
null
CC BY-SA 4.0
null
2023-01-03T21:47:42.550
2023-01-03T21:47:42.550
null
null
562,769
null
74,999,053
2
null
55,561,770
0
null
1. Setting a negative margin to the scrolling view (NestedScrollView/RecyclerView) which equals to what you want the size of the blank area when all the content are scrolled up (all the stuff below the toolbar, nothing behind); it's assumed -100dp in the below demo 2. Reverse back this negative margin on the child of the NestedScrollView (in layout), or the 1st child of the RecyclerView (programmatically) 3. Put the scrolling view on top of the AppBarLayout so that the background of the AppBarLayout don't obscure the scrolling content to let them appear in the back of the toolbar. - `AppBarLayout`- `AppBarLayout` Demo: ``` <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:context=".MainActivity"> <androidx.core.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="-100dp" app:layout_behavior="@string/appbar_scrolling_view_behavior"> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="100dp" android:text="@string/longText" /> </androidx.core.widget.NestedScrollView> <com.google.android.material.appbar.AppBarLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@android:color/transparent" app:elevation="0dp"> <com.google.android.material.appbar.CollapsingToolbarLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="16dp" android:background="@drawable/rounded_toolbar" app:layout_scrollFlags="scroll|enterAlways"> <com.google.android.material.appbar.MaterialToolbar android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" app:layout_collapseMode="pin" /> </com.google.android.material.appbar.CollapsingToolbarLayout> </com.google.android.material.appbar.AppBarLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout> ``` For the `RecyclerView`, you can't control its children with layouts, so reversing the margin can either by - `onCreateViewHolder()`- `onBindViewHolder()` ``` @Override public void onBindViewHolder(@NonNull CustomViewHolder holder, final int position) { ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) holder.itemView.getLayoutParams(); if (position == 0) { Resources resources = holder.itemView.getContext().getResources(); float dip = 100f; float px = TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, dip, resources.getDisplayMetrics() ); params.topMargin = (int) px; } else params.topMargin = 0; holder.itemView.setLayoutParams(params); //...... rest of code } ``` ![](https://media.giphy.com/media/1KfHGp22liVZDDJjH4/giphy.gif) ![](https://media.giphy.com/media/5d04NSWr5sNCgmsCaL/giphy-downsized-large.gif)
null
CC BY-SA 4.0
null
2023-01-03T21:58:08.193
2023-01-03T22:50:18.403
2023-01-03T22:50:18.403
9,851,608
9,851,608
null
74,999,103
2
null
74,998,618
0
null
You can use the `viridis` package to specify a vector of colours. These are passed to the `col.regions` argument of `spplot` ``` library(sp) mapa <- readRDS("gadm36_ESP_2_sp.rds") Com_Val <- mapa[mapa$NAME_1 == "Comunidad Valenciana", ] Com_Val$cantidad <- c(29, 10, 65) spplot(Com_Val, "cantidad", col.regions = viridis::plasma(100)) ``` [](https://i.stack.imgur.com/f0Tuc.png) --- ``` url <- "https://geodata.ucdavis.edu/gadm/gadm3.6/Rsp/gadm36_ESP_2_sp.rds" download.file(url, "gadm36_ESP_2_sp.rds") ```
null
CC BY-SA 4.0
null
2023-01-03T22:03:58.447
2023-01-03T22:03:58.447
null
null
12,500,315
null
74,999,120
2
null
74,994,584
1
null
It is called `-webkit-media-controls-volume-control-hover-background`. For future readers who want other specific options, try accessing `<video>` tag icons in your CSS as... Volume icon (for mute/unmute): ``` video::-webkit-media-controls-mute-button { display: none; } ``` Volume slider (with range for loudness): ``` video::-webkit-media-controls-volume-slider { display: none; } ``` Volume slider's background (the dark bar in your shown picture) ``` video::-webkit-media-controls-volume-control-hover-background { display: none; } ``` : Or just hide the of all these Volume icons... Volume control container (for mute button, slider and slider background): ``` video::-webkit-media-controls-volume-control-container { display: none; } ``` The above examples should solve the problem, but read further below for extra details. > . Not sure how your code is setup but maybe something below is useful to solving your problem: Try to find out the labels/names from the . Search for `volume` in the text at: [mediaControls.css](https://chromium.googlesource.com/chromium/blink/+/72fef91ac1ef679207f51def8133b336a6f6588f/Source/core/css/mediaControls.css?autodive=0%2F%2F%2F). Strangely though, they do not list `-webkit-media-controls-volume-control-hover-background`, the one simple thing that you needed. Still you'll learn something, such as... a `video::-webkit-media-controls-fullscreen-volume-slider` which you might need to also handle when user goes to fullscreen mode. PS: I say because I don't know how much you've already handled, but I see a fullscreen icon (in your shown picture) so be prepared for a possible "Round 2" of this issue when that FS button is pressed. Analyzing a `<video>` tag's icon (in Chrome's Developer Tools) we can see... - Moving the mouse "over" or "out" of the volume icon changes the `class=`.- `class="closed"` means only the volume icon is showing (for mute/unmute).- `class=""` means the volume slider/range part is also now showing. ``` <input type="range" step="any" max="1" aria-valuemax="100" aria-valuemin="0" aria-label="volume" pseudo="-webkit-media-controls-volume-slider" aria-valuenow="100" class="closed" style=""> <input type="button" pseudo="-webkit-media-controls-mute-button" aria-label="unmute" style="" class="muted"> ``` You can see there are three names. One of these names is the one you want to hide that (unwanted) dark bar. - `hidden`- `class=` Test the options and ask anything if still stuck.
null
CC BY-SA 4.0
null
2023-01-03T22:06:49.037
2023-01-03T23:23:47.390
2023-01-03T23:23:47.390
2,057,709
2,057,709
null
74,999,198
2
null
71,097,260
0
null
When using `FriendlyUrls` on ASP.NET, the URL you set on your payment processor must not have the ".aspx" extension for the page where is it supposed to receive the info. ``` Public Shared Function GetRequestBody() As String Dim bodyStream = New IO.StreamReader(HttpContext.Current.Request.InputStream) bodyStream.BaseStream.Seek(0, SeekOrigin.Begin) Dim _payload = bodyStream.ReadToEnd() Return _payload End Function ```
null
CC BY-SA 4.0
null
2023-01-03T22:18:16.427
2023-01-06T13:55:39.790
2023-01-06T13:55:39.790
1,589,422
1,389,725
null
74,999,214
2
null
74,999,121
1
null
The `tbody` rows do not include the necessary `<td>` elements. Without the `td`'s: ``` <table class="table"> <thead class="thead-dark"> <tr> <th>Title</th> <th>Img</th> <th>Size</th> </tr> </thead> <tbody> <tr> <input type="text" name="productTitle" value="Title"> <input type="text" name="productImg" value="Image"> <input type="text" name="productSize" value="Size"> </tr> </tbody> </table> ``` With `td`'s: ``` <table class="table"> <thead class="thead-dark"> <tr> <th>Title</th> <th>Img</th> <th>Size</th> </tr> </thead> <tbody> <tr> <td><input type="text" name="productTitle" value="Title"></td> <td><input type="text" name="productImg" value="Image"></td> <td><input type="text" name="productSize" value="Size"></td> </tr> </tbody> </table> ```
null
CC BY-SA 4.0
null
2023-01-03T22:21:24.253
2023-01-03T22:21:24.253
null
null
4,861,760
null
74,999,295
2
null
74,821,626
0
null
Well i think it is the fomat of the date which is different in excel and what SQL is expecting is creating the error . I think in Excel you are providing dd-MM-YYYY , may be your SQL is expecting MM-DD-YYYY. I suggest please check this on the SQL side by inserting a record from TSQL using SSMS or other IDE . Once you are sure you can change the format in EXCEL accordingly .
null
CC BY-SA 4.0
null
2023-01-03T22:33:01.183
2023-01-03T22:33:01.183
null
null
11,137,679
null
74,999,338
2
null
42,943,515
0
null
pypdf (and also PyPDF2) improved a lot since you asked the question. It might now work as you want. However, what you want might not be possible without heuristics. You want a semantic extraction / "boxing" of text fragments. This information is not within the PDF. In the worst case, every single letter is absolutely positioned on the PDF. Without giving any hint which letters belong to the same word - yet to the same "block" of text.
null
CC BY-SA 4.0
null
2023-01-03T22:39:55.140
2023-01-03T22:39:55.140
null
null
562,769
null
74,999,409
2
null
74,970,720
0
null
For anyone in the future struggling with the same issue : If you wrap the Image/Next within a container and if you give effect to the container element, for some weird reason, Safari browsers won't render the images properly. Simply remove the and you are good to go.
null
CC BY-SA 4.0
null
2023-01-03T22:50:04.073
2023-01-03T22:50:04.073
null
null
20,900,589
null
74,999,465
2
null
74,986,858
1
null
I needed to manually update the Input Data Providers in the MixedRealityToolkit. If I'd created this scene from scratch, I imagine these data providers would have been properly configured by Unity, but because I was migrating the scene from a previous Unity/Mixed Reality version, they never got updated. [MRTK Input settings](https://i.stack.imgur.com/6sWER.png)
null
CC BY-SA 4.0
null
2023-01-03T22:59:21.220
2023-01-03T22:59:21.220
null
null
12,611,588
null
75,000,012
2
null
74,997,996
1
null
I believe your goal is as follows. - `str`- - In the current stage, it seems that `gapi.client.sheets.spreadsheets.values.append` puts the value to the next row of the last row in the data range. In order to achieve your goal, how about the following flow? 1. Retrieve values from column "C". 2. Retrieve the last row from the retrieved values. 3. Put the value using gapi.client.sheets.spreadsheets.values.update with the retrieved last row of the column "C". When this flow is reflected in your script, how about the following modification? ### Modified script: ``` var SHEET_ID = "###"; // Please set your spreadsheet ID. gapi.client.sheets.spreadsheets.values.get({ spreadsheetId: SHEET_ID, range: 'FV1!C:C' }).then(({ result }) => { var row = result.values.length + 1; var in_date = new Date(); var str = in_date.getDate() + '/' + (in_date.getMonth() + 1) + '/' + in_date.getFullYear() var params = { spreadsheetId: SHEET_ID, range: `FV1!C${row}`, valueInputOption: 'RAW', }; var valueRangeBody = { "values": [[str]] }; console.log(valueRangeBody); var request = gapi.client.sheets.spreadsheets.values.update(params, valueRangeBody); request.then(function (response) { console.log(response.result); }, function (reason) { console.error('error: ' + reason.result.error.message); }); }, reason => { console.error('error: ' + reason.result.error.message); }); ``` - `str` ### References: - [Method: spreadsheets.values.get](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get)- [Method: spreadsheets.values.update](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update)
null
CC BY-SA 4.0
null
2023-01-04T00:58:08.710
2023-01-04T00:58:08.710
null
null
7,108,653
null
75,000,184
2
null
51,940,157
1
null
If you are trying to vertical align text and icon within MUI's Typography without using `variant`, you can simply add a display setting to Typography as follows: ``` <Typography display="flex"> Welcome! <Icon /> </Typography> ``` This is what worked for me.
null
CC BY-SA 4.0
null
2023-01-04T01:34:58.013
2023-01-04T01:34:58.013
null
null
9,959,070
null
75,000,351
2
null
31,194,553
0
null
You still can get the same effect by setting ``` text-decoration-color ``` Simply, set decoration color to your background color. Line will still be there, but wont be visible. For example in a white background page, use: ``` text-decoration-color: white; ```
null
CC BY-SA 4.0
null
2023-01-04T02:13:37.093
2023-01-04T02:13:37.093
null
null
4,490,871
null
75,000,615
2
null
75,000,541
2
null
> `absolute` The element is removed from the normal document flow, and no space is created for the element in the page layout. It is positioned relative to its [positioned](https://developer.mozilla.org/en-US/docs/Web/CSS/position#types_of_positioning), if any; otherwise, it is placed relative to the initial containing block. Its final position is determined by the values of `top`, `right`, `bottom`, and `left`. [MDN - CSS - Position - Absolute](https://developer.mozilla.org/en-US/docs/Web/CSS/position#absolute) Add `position:relative` to `pre` so that the button can be absolutely positioned inside the `pre` ``` pre[class*="language-"] button { position: absolute; top: 5px; right: 5px; font-size: 0.9rem; padding: 0.15rem; border: ridge 1px #7b7b7c; border-radius: 5px; text-shadow: #c4c4c4 0 0 2px; } code[class*="language-"] button:hover { cursor: pointer; background-color: #bcbabb; } pre { position: relative; } ``` ``` <pre class="language-js"> <code class="language-js"> some code </code> <button>Copy</button> </pre> ```
null
CC BY-SA 4.0
null
2023-01-04T03:13:52.837
2023-01-04T03:16:39.900
2023-01-04T03:16:39.900
5,385,381
5,385,381
null
75,000,631
2
null
75,000,432
0
null
At the point of deployment something might be adding to the URL For instance a quote might be getting added due to implementation, ``` process.env.API_URL ``` might become ``` 'process.env.API_URL' ``` try checking locally if the url works, then debug.
null
CC BY-SA 4.0
null
2023-01-04T03:16:47.203
2023-01-04T03:16:47.203
null
null
11,279,839
null
75,000,656
2
null
68,834,451
0
null
It is simple. Code: ``` def calculate(): num1 = int(input("Enter First Number: ")) num2 = int(input("Enter Second Number: ")) x = num1,num2 addition = sum(x) print(f"The sum of the two given numbers is {addition} ") calculate() ```
null
CC BY-SA 4.0
null
2023-01-04T03:22:10.257
2023-01-04T03:22:10.257
null
null
4,136,999
null
75,000,815
2
null
75,000,762
0
null
import numpy as np df['limit'] = np.where(df['group name'] == 'HL', df['HL_LIMIT'], df['BL_LIMIT'])
null
CC BY-SA 4.0
null
2023-01-04T03:56:53.973
2023-01-04T03:56:53.973
null
null
20,860,826
null
75,000,850
2
null
75,000,760
1
null
Try the following formula- ``` =IF(C2>TAKE(TAKE(FILTER($C$2:$C2,$B$2:$B2=B2,0),-2),1),"Flag","") ``` [](https://i.stack.imgur.com/GiH9H.png)
null
CC BY-SA 4.0
null
2023-01-04T04:04:19.560
2023-01-04T04:04:19.560
null
null
5,514,747
null
75,000,969
2
null
75,000,255
2
null
I have fiddled with your code and learned that: - `span``.unsorted``overflow: hidden`- `line-height``1`- `vertical-align: -0.125rem``<i>``display: grid``.unsorted`- `27.35%` Additionally I introduced a few CSS custom properties to test various sizes of the combined character: `sm, md, xl`. I know too little of to be any use with that, so I created a vanilla CSS solution that seems to work with your code. ``` /* * { outline: 1px dashed } /* for debugging */ body { margin: 0; min-height: 100vh; display: grid; place-items: center; } .unsorted { background-color: rgb(128,128,128,.4) } /********/ /* DEMO */ /********/ /* A few sizes to test variations */ .unsorted.sm { --button-size: 1em } .unsorted.md { --button-size: 5em } .unsorted.xl { --button-size: 9em } .unsorted { overflow: hidden; /* [MANDATORY] */ font-size: 1rem; height: var(--button-size); width : var(--button-size); --icon-offset: 27.35%; } .unsorted i { display: grid; /* centers the characters */ font-size: var(--button-size); } /* up/down offset, made to use positive numbers */ .bi.bi-caret-up { bottom: var(--icon-offset) } .bi.bi-caret-down { top : var(--icon-offset) } ``` ``` <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" rel="stylesheet"> <div> <span class="d-inline-block position-relative unsorted xl"> <i class="bi bi-caret-up position-absolute" ></i> <i class="bi bi-caret-down position-absolute"></i> </span> <span class="d-inline-block position-relative unsorted md"> <i class="bi bi-caret-up position-absolute" ></i> <i class="bi bi-caret-down position-absolute"></i> </span> <span class="d-inline-block position-relative unsorted sm"> <i class="bi bi-caret-up position-absolute" ></i> <i class="bi bi-caret-down position-absolute"></i> </span> </div> ```
null
CC BY-SA 4.0
null
2023-01-04T04:28:16.497
2023-01-04T04:28:16.497
null
null
2,015,909
null
75,001,088
2
null
74,972,474
0
null
Here's a generic C# script to run SQL. ``` using System; using Microsoft.Data.SqlClient; using System.Text; namespace sqltest { class Program { static void Main(string[] args) { try { SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(); builder.DataSource = "<your_server>.database.windows.net"; builder.UserID = "<your_username>"; builder.Password = "<your_password>"; builder.InitialCatalog = "<your_database>"; using (SqlConnection connection = new SqlConnection(builder.ConnectionString)) { Console.WriteLine("\nQuery data example:"); Console.WriteLine("=========================================\n"); String sql = "SELECT name, collation_name FROM sys.databases"; using (SqlCommand command = new SqlCommand(sql, connection)) { connection.Open(); using (SqlDataReader reader = command.ExecuteReader()) { while (reader.Read()) { Console.WriteLine("{0} {1}", reader.GetString(0), reader.GetString(1)); } } } } } catch (SqlException e) { Console.WriteLine(e.ToString()); } Console.ReadLine(); } } } ``` Here's a SQL script to list all tables and all fields in SQL Server. ``` SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' ```
null
CC BY-SA 4.0
null
2023-01-04T04:50:09.727
2023-01-04T04:50:09.727
null
null
5,212,614
null
75,001,194
2
null
74,926,598
0
null
I got this issue resolved, the main problem was that I was using Nginx configuration in my host machine and uploading my code to the Nginx container. I uninstalled nginx form my host machine and just using nginx container and it is working fine
null
CC BY-SA 4.0
null
2023-01-04T05:12:59.370
2023-01-04T05:12:59.370
null
null
20,869,669
null
75,001,721
2
null
75,001,302
1
null
By default this should already happen. Is there a reason specific you chose not to use the existing functionality of variants and switching thereof and to rebuild it instead? Anyway, you can retrieve the id of a variant by the set of corresponding option properties. To do so there's a route of the storefront you can use. ``` GET https://example.com/detail/{parentId}/switch?options={options} ``` `parentId` is the id of the parent of the currently viewed product: `product.parentId` `options` is a url encoded json object with key value pairs of property group id to property option id of all property options assigned to the variant, that you want to get the id of. ``` { "{groupId}": "{optionId}" } ``` Example for your case: ``` { "b1c9a2dddbac43198f32183edc197e61": "739a59b89fd341c6a6d49d349dae56e6", // size "90c834ef82d1467ca1c36965672e5b6c": "00000c51e2c44960b4eb07ede8c1f486" // color } ``` Let's say `b1c9a2dddbac43198f32183edc197e61` would be the id of the property group "Size", then `739a59b89fd341c6a6d49d349dae56e6` would be the id of the selected size option. If done correctly the response will give you the SEO url and id to the variant associated with the options: ``` { "url":"https:\/\/example.com\/Practical-Bronze-Socks-Appeal\/9fc58b6c2a074e4ba0a46b9b471dff1b", "productId":"9fc58b6c2a074e4ba0a46b9b471dff1b" } ```
null
CC BY-SA 4.0
null
2023-01-04T06:35:25.183
2023-01-04T06:35:25.183
null
null
8,556,259
null
75,001,906
2
null
73,397,686
0
null
For your problem statement Plotly JS provides subplots. The documentation of Plotly javascript subplots is available at [Subplots in Plotly JavaScript](https://plotly.com/javascript/subplots/) You can create multiple subplots and manage layouts of the plot. Here is the sample code for plotting suubplots ``` var trace1 = { x: [1, 2, 3], y: [4, 5, 6], type: 'scatter' }; var trace2 = { x: [20, 30, 40], y: [50, 60, 70], xaxis: 'x2', yaxis: 'y2', type: 'scatter' }; var data = [trace1, trace2]; var layout = { grid: {rows: 1, columns: 2, pattern: 'independent'}, }; Plotly.newPlot('myDiv', data, layout); ``` The sample graph looks like this [Output Image](https://i.stack.imgur.com/DyybQ.png)
null
CC BY-SA 4.0
null
2023-01-04T06:59:13.150
2023-01-04T06:59:13.150
null
null
11,674,031
null
75,001,928
2
null
75,000,947
1
null
You will most likely need to remove the padding of the box which all of the elements are housed inside: ![Image showing box padding](https://i.stack.imgur.com/JHtH0.png) Which will cause your content to flow to the edges of the box: [Image showing elements against box](https://i.stack.imgur.com/wi9rF.png) And then add margins to the other elements inside the box [Image showing new margins on inner elements](https://i.stack.imgur.com/loF5d.png) Please ignore my quick attempt at recreating the box from your pictures, it is just for illustration purposes :) Additionally you can remove padding for all images using ``` img { padding:0px; } ```
null
CC BY-SA 4.0
null
2023-01-04T07:02:20.563
2023-01-07T01:37:18.207
2023-01-07T01:37:18.207
3,842,598
16,042,105
null
75,001,982
2
null
51,940,157
0
null
We can use Typography to make align horizontal spacing with icon ``` const styles = theme => ({ icon: { fontSize: '1rem', position: 'relative', right: theme.spacing(0.5), top: theme.spacing(0.5), }, }); <Typography><CheckCircleIcon className={className={this.props.classes.icon}}/>Home</Typography> ```
null
CC BY-SA 4.0
null
2023-01-04T07:08:33.627
2023-01-04T07:08:33.627
null
null
4,652,706
null
75,002,510
2
null
74,994,499
0
null
SVG elements do not regard `z-index`. Use [pointer-events](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/pointer-events) to click through the `text` elements. ``` rect:hover{ fill: orange } text:hover{ fill: orange } ``` ``` <svg> <rect x="0" y="0" width="100" height="100" fill="red"/> <text x="5" y="50" font-size="25px" fill="blue">HOVER</text> <text x="5" y="70" font-size="25px" fill="blue">ME!</text> </svg> <svg> <rect x="0" y="0" width="100" height="100" fill="green"/> <text x="5" y="50" font-size="25px" fill="blue" pointer-events="none">HOVER</text> <text x="5" y="70" font-size="25px" fill="blue" pointer-events="none">ME?</text> </svg> ```
null
CC BY-SA 4.0
null
2023-01-04T08:06:14.370
2023-01-04T08:06:14.370
null
null
4,728,913
null
75,002,759
2
null
70,238,021
0
null
I use miniconda but when I install this package I use: ``` pip install EMD-signal ``` and I follow this: [https://pypi.org/project/EMD-signal/](https://pypi.org/project/EMD-signal/) Then it works <3 Hope it helps.
null
CC BY-SA 4.0
null
2023-01-04T08:29:00.547
2023-01-06T19:25:03.727
2023-01-06T19:25:03.727
2,347,649
17,740,173
null
75,002,760
2
null
68,389,117
0
null
``` function signIn(email, password) { var userObj = {email: email, password: password}; var jsonBody = JSON.stringify(userObj); fetch(server + "/auth/authorization", { // mode: "no-cors", method: 'POST', headers: { "Accept-language": "RU", "Content-Type": "application/json" }, body: jsonBody }) .then(response => response.json()) .then(data => { if (data.error) { alert("Error Password or Username"); } else { return data; } }) .catch((err) => { console.log(err); }); } ```
null
CC BY-SA 4.0
null
2023-01-04T08:29:04.393
2023-01-04T08:29:04.393
null
null
20,925,699
null
75,002,814
2
null
74,988,440
0
null
Have you tried the same commands by using [powershell](https://learn.microsoft.com/en-us/powershell/scripting/overview?view=powershell-7.3) ? you might get different results. Good luck!
null
CC BY-SA 4.0
null
2023-01-04T08:34:25.303
2023-01-04T08:34:25.303
null
null
3,472,469
null
75,002,908
2
null
75,002,301
1
null
I played around a bit and the first thing I found out is that definitions are available for more languages than just English and Japanese. See the following table for definitions of a few words including your example word for all the languages available from `wn.langs()` after downloading nltk `omw-1.4`. 'dog' has definitions in 7 languages, 'house' in 9, and 'person' in 11. Regarding the missing definitions for certain languages, I think the data just isn't present in the corresponding wordnets. The [NLTK wordnet documentation](https://www.nltk.org/_modules/nltk/corpus/reader/wordnet.html) states: > This module also allows you to find lemmas in languages other than English from the Open Multilingual Wordnet ([https://omwn.org/](https://omwn.org/)) If you go to [https://omwn.org/](https://omwn.org/) and follow the links for the respective wordnets, you'll find for example [this page](https://multiwordnet.fbk.eu/online/multiwordnet.php) where you can search for words in a few languages. Searching 'casa' in Spanish, you'll find the definition reverts to the English definition for 'house', but for Italian there is a definition in Italian - which is consistent with the table below. Hope this helps! | lang | dog | house | person | | ---- | --- | ----- | ------ | | eng | a member of the genus Canis (probably descended from the common wolf) that has been domesticated by man since prehistoric times; occurs in many breeds | a dwelling that serves as living quarters for one or more families | a human being | | als | | Ndërtesë për të banuar (zakonisht për një familje a për familje të një gjaku); banesë; apartament ku banon një familje. | të qënurit njeri | | arb | | | | | bul | Вид домашно животно от семейство хищни бозайници, с различна големина, цвят на козината и различни породи, което лае и често се използва като пазач на дома и имота, за лов, може да бъде дресирано и обучавано за различни служебни цели. | Сграда,помещение за постоянно живеене на отделно семейство или човек. | Отделен човек, който със своите неповторими качества се отличава, различава от другите хора. | | cmn | | | | | dan | | | | | ell | σκύλος του γένους Canis familiaris που συνήθως προέρχεται από τον κοινό λύκο και έχει εξημερωθεί από τους προϊστορικούς χρόνους | το τμήμα οικήματος (λ .χ. το διαμέρισμα πολυκατοικίας) στο οποίο διαμένει κανείς | το έμβιο ον, κάθε άτομο, άνθρωπος ανεξαρτήτως φύλου και ηλικίας | | fin | | | | | fra | | | | | heb | | מבנה המשמש כמקום מגורים למשפחה אחת או יותר | מישהו דופק בדלת | | hrv | | | | | isl | | | | | ita | mammifero domestico dei canidi, molto comune, diffuso in tutto il mondo, con attitudini varie a seconda della razza | edificio destinato ad abitazione | entità umana considerata in quanto tale, senza caratterizzazioni di sesso, età, provenienza, ecc. | | ita_iwn | animale domestico molto comune, diffuso in tutto il mondo, usato per la caccia, la difesa, nella pastorizia, e come animale da compagnia | | essere distinto da ogni altro della medesima specie | | jpn | 有史以前から人間に家畜化されて来た(おそらく普通のオオカミを先祖とする)イヌ属の動物 | 1家族以上のための居住棟として機能する住居 | 一人の人間 | | cat | | | | | eus | | | | | glg | | | | | spa | | | | | ind | | | seseorang yang dipandang tinggi | | zsm | | | | | nld | | | | | nno | | | | | nob | | | | | pol | | | | | por | | | | | ron | Animal mamifer carnivor domesticit, folosit pentru pază, vânătoare etc.. | construcție destinată pentru a servi de locuință uneia sau mai multor familii | Individ al speciei umane, om considerat prin totalitatea însușirilor sale fizice și psihice | | lit | | | | | slk | | | | | slv | | | | | swe | | | | | tha | | | | | total | 7 | 9 | 11 | --- Code used to generate the above table (in Google Colab): ``` import nltk from nltk.corpus import wordnet as wn nltk.download('wordnet') nltk.download('omw-1.4') import pandas as pd defs = pd.DataFrame() for lang in wn.langs(): for word in ['dog', 'house', 'person']: this_word = {} def_ = wn.synsets(word)[0].definition(lang=lang) defs.at[lang, word] = def_[0] if isinstance(def_, list) else def_ defs[word] = defs[word].astype('object') for word in defs.columns: defs_present = len([def_ for def_ in defs[word].to_list() if def_ != None]) defs.at['total', word] = defs_present defs ```
null
CC BY-SA 4.0
null
2023-01-04T08:43:38.153
2023-01-04T08:43:38.153
null
null
17,568,469
null
75,003,075
2
null
16,495,727
2
null
In Visual Studio 2022, it's the `Edit.InsertNextMatchingCaret`, as you can see in this sreenshot : [Click to see the sreenshot](https://i.stack.imgur.com/3mvlM.png) I am familiar with Visual Studio Code, so I applied the `Ctrl + D`. You must choose `Text Editor`.
null
CC BY-SA 4.0
null
2023-01-04T08:59:39.923
2023-01-04T13:34:54.523
2023-01-04T13:34:54.523
16,544,282
16,544,282
null
75,003,454
2
null
74,980,312
0
null
As workaround, go to and work with the update site [https://community.polarion.com/projects/subversive/download/eclipse/6.0/update-site](https://community.polarion.com/projects/subversive/download/eclipse/6.0/update-site) to install the SVNKit 1.8.14 or another connector.
null
CC BY-SA 4.0
null
2023-01-04T09:30:40.640
2023-01-04T09:30:40.640
null
null
6,505,250
null
75,003,455
2
null
74,922,290
8
null
### The answer is no --- ### Why? According to [the Flutter documentation](https://api.flutter.dev/flutter/material/showModalBottomSheet.html): > A modal bottom sheet is an alternative to a menu or a dialog and The purpose of the bottom sheet is to prevent the user from interacting with the rest of the app. --- ### How can we overcome this? Use a [persistent bottom sheet](https://api.flutter.dev/flutter/material/showBottomSheet.html), i.e., using `showBottomSheet`. > A closely related widget is a persistent bottom sheet, which shows information that supplements the primary content of the app ### Output: [](https://i.stack.imgur.com/qpEjtm.png) [](https://i.stack.imgur.com/MwsK7m.png) ### Code: ``` void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return const MaterialApp( debugShowCheckedModeBanner: false, home: Scaffold( body: showSheet(), ), ); } } class showSheet extends StatefulWidget { const showSheet({Key? key}) : super(key: key); @override State<showSheet> createState() => _showSheetState(); } class _showSheetState extends State<showSheet> { void displayPersistentBottomSheet() { Scaffold.of(context).showBottomSheet<void>((BuildContext context) { return Container( color: Colors.amber, height: 200, // Change this according to your need child: const Center(child: Text("Image Filter Here")), ); }); } @override Widget build(BuildContext context) { return Center( child: FilledButton( onPressed: displayPersistentBottomSheet, child: const Text( 'Draggable Widget Here', style: TextStyle(color: Colors.white), ), ), ); } } ``` --- ### Can it be done using Getx? Unfortunately , because `getx` supports only `bottomShet` which is an alternative to and there isn't any alternative to a persistent bottom sheet.
null
CC BY-SA 4.0
null
2023-01-04T09:30:48.187
2023-01-05T01:44:58.377
2023-01-05T01:44:58.377
12,349,734
13,431,819
null
75,003,515
2
null
74,997,499
0
null
Problem was with cat_id,ccat_id ,gccat_id. I provided 8 digit unique number with the following output,now I am getting the correct output. ``` function generateUniqueNumber() { return sprintf('%08d', mt_rand(1, 99999999)); } ```
null
CC BY-SA 4.0
null
2023-01-04T09:36:09.250
2023-01-04T09:36:09.250
null
null
20,921,755
null
75,003,680
2
null
75,000,762
0
null
If you want output in de-normalized dataframe form, then use following. The logic is explained as comment above each line. ``` # Categorize values as "HL" and "BL". df["product"] = df["product"].apply(lambda p: p if p == "HL" else "BL") # Compute total for each group and product. df = df.groupby(["group name", "product"]).sum("limit").reset_index() # Compute total for each group. df_total = df.groupby("group name").sum("limit").reset_index() df_total["product"] = "Total" df = pd.concat([df, df_total]).reset_index(drop=True) # Transform by group df = df.pivot(index="product", columns="group name", values="limit").rename_axis("", axis="columns").reset_index() ``` Output: ``` product company x company y company z 0 BL 750000 70000 80000 1 HL 130000 300000 950000 2 Total 880000 370000 1030000 ``` If you want output extactly like your excel, then you need to do some cosmetic transformations: ``` # Categorize values as "HL" and "BL". df["product"] = df["product"].apply(lambda p: p if p == "HL" else "BL") # Compute total for each group and product. df = df.groupby(["group name", "product"]).sum("limit").reset_index() # Compute total for each group. df_total = df.groupby("group name").sum("limit").reset_index() df_total["product"] = "Total" df = pd.concat([df, df_total]).reset_index(drop=True) # Stack each group's block horizontally. dfs = [] for g in df["group name"].unique(): df_g = df[df["group name"] == g].drop("group name", axis=1).reset_index(drop=True) df_g.columns = [g, ""] dfs.append(df_g) df = pd.concat(dfs, axis=1) ``` Output: ``` company x company y company z 0 BL 750000 BL 70000 BL 80000 1 HL 130000 HL 300000 HL 950000 2 Total 880000 Total 370000 Total 1030000 ```
null
CC BY-SA 4.0
null
2023-01-04T09:51:37.753
2023-01-04T09:51:37.753
null
null
2,847,330
null
75,003,847
2
null
75,003,624
1
null
This is the closest I could do ``` library(kableExtra) df <- data.frame( Operator = c("==", "!=", ">", "<", ">=", "<="), Interpretation = c("Equal to", "Not equal to", "Greater than", "Less than", "Greater than or equal to", "Less than or equal to") ) df %>% kbl() %>% kable_classic(full_width=F, html_font="Cambria") %>% row_spec(0, bold=TRUE) ``` [](https://i.stack.imgur.com/2x38C.png)
null
CC BY-SA 4.0
null
2023-01-04T10:05:32.180
2023-01-04T10:05:32.180
null
null
17,049,772
null
75,004,298
2
null
75,004,040
0
null
You want to make a credentialed CORS request (that is, `fetch(..., {credentials: "include"})`) that requires a preflight (for example, because it is a POST request with `Content-Type: application/json`). Without the `Access-Control-Allow-Credentials: true` header in the preflight response, the browser would not make the credentialed request in the first place. Since you set that header in the preflight response, the browser makes the credentialed request (so that the effect happens on the server). But then the response lacks a header `Access-Control-Allow-Credentials: true`, therefore the browser refuses to make the response accessible to Javascript. This is the same behavior as if you made a simple CORS GET request (which does not require a preflight) but the response lacks an `Access-Control-Allow-Origin` header. So you really need this header in both responses.
null
CC BY-SA 4.0
null
2023-01-04T10:47:40.863
2023-01-04T12:21:52.950
2023-01-04T12:21:52.950
16,462,950
16,462,950
null
75,004,935
2
null
74,970,147
0
null
The `padding` you are witnessing is because flutter is trying to expand the widget in all four directions and then trying to `fit` it inside the `leading` widget , To overcome this try wrapping your `leading` with `SizedBox` and give it a `fixed width`. ``` leading: SizedBox(width: 60, child: <Your Widget here>), ``` #### Before SizedBox: [](https://i.stack.imgur.com/UVMLu.png) #### After applying SizedBox: [](https://i.stack.imgur.com/8aGKL.png) #### Code: ``` Center( child: Column( children: const [ Card( child: ListTile( leading: SizedBox(width: 60, child: FlutterLogo(size: 56.0)), title: Text('Two-line ListTile'), subtitle: Text('Here is a second line'), trailing: Icon(Icons.more_vert), ), ), Card( child: ListTile( leading: SizedBox(width: 60, child: FlutterLogo(size: 72.0)), title: Text('Three-line ListTile'), subtitle: Text( 'A sufficiently long subtitle warrants three lines.'), trailing: Icon(Icons.more_vert), // isThreeLine: true, ), ), Card( child: ListTile( leading: SizedBox(width: 60, child: FlutterLogo(size: 128.0)), title: Text('Three-line ListTile'), subtitle: Text( 'A sufficiently long subtitle warrants three lines.'), trailing: Icon(Icons.more_vert), ), ), ], )), ```
null
CC BY-SA 4.0
null
2023-01-04T11:43:38.713
2023-01-13T06:19:48.033
2023-01-13T06:19:48.033
8,172,857
13,431,819
null
75,005,205
2
null
74,971,142
0
null
EDIT: I managed to do it: ``` **def ball_logic(self): self.forward(10) def whack(self): if self.heading() >= 0 and self.heading() < 90: self.offset = 90 - self.heading() self.og_heading = 90 + self.offset + random.randint(-40,40) self.setheading(self.og_heading) self.forward(10) elif self.heading() <= 360 and self.heading() > 270: self.offset = 360 - self.heading() self.og_heading = 180 + self.offset + random.randint(-40,40) self.setheading(self.og_heading) self.forward(10) elif self.heading() > 90 and self.heading() <= 270: if self.heading() <= 180: self.offset = 180 - self.heading() self.og_heading = self.offset + random.randint(-40,40) self.setheading(self.og_heading) self.forward(10) elif self.heading() > 180: self.offset = self.heading() - 180 self.og_heading = 360 - self.offset + random.randint(-40,40) if self.og_heading > 360: self.og_heading - 360 self.setheading(self.og_heading) def bounce(self): if self.heading() > 0 and self.heading() < 90: self.offset = 90 - self.heading() self.og_heading = 270 + self.offset self.setheading(self.og_heading) self.forward(10) elif self.heading() >= 90 and self.heading() < 180: self.offset = 180 - self.heading() self.og_heading = 180 + self.offset self.setheading(self.og_heading) self.forward(10) elif self.heading() >= 180 and self.heading() < 270: self.offset = 270 - self.heading() self.og_heading = 180 - self.offset self.setheading(self.og_heading) self.forward(10) elif self.heading() >= 270 and self.heading() < 360: self.offset = 360 - self.heading() self.og_heading = self.offset self.setheading(self.og_heading) self.forward(10)** `` ```
null
CC BY-SA 4.0
null
2023-01-04T12:05:57.060
2023-01-04T12:05:57.060
null
null
20,716,253
null
75,005,524
2
null
70,097,932
0
null
Updated on 14 January 2023: Just for completeness, using the argument `table=True` in `view` adds a table with a filter. If you would like to keep the table, but remove the filter, you can remove the filter with `ws.tables[0].show_autofilter = False`: ``` import xlwings as xw import pandas as pd df = pd._testing.makeDataFrame() xw.view(df, table=True) ws = xw.sheets.active ws.tables[0].show_autofilter = False ``` Or with `api.AutoFilter(Field=[...], VisibleDropDown=False)`, whereby `Field` is a list of integers describing the concerning column numbers: ``` import xlwings as xw import pandas as pd df = pd._testing.makeDataFrame() xw.view(df, table=True) ws = xw.sheets.active ws.used_range.api.AutoFilter(Field=list(range(1, ws.used_range[-1].column + 1)), VisibleDropDown=False) ```
null
CC BY-SA 4.0
null
2023-01-04T12:34:47.763
2023-01-14T11:11:54.280
2023-01-14T11:11:54.280
13,968,392
13,968,392
null
75,005,669
2
null
75,005,385
1
null
Use flutter's [Stggered_grid_view](https://pub.dev/packages/flutter_staggered_grid_view) Add Dependencies: ``` flutter_staggered_grid_view: ^0.3.3 transparent_image: ^1.0.0 ``` Code: ``` import 'package:flutter/material.dart'; import 'package:transparent_image/transparent_image.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { List<String> imageList = [ 'https://cdn.pixabay.com/photo/2019/03/15/09/49/girl-4056684_960_720.jpg', 'https://cdn.pixabay.com/photo/2020/12/15/16/25/clock-5834193__340.jpg', 'https://cdn.pixabay.com/photo/2020/09/18/19/31/laptop-5582775_960_720.jpg', 'https://media.istockphoto.com/photos/woman-kayaking-in-fjord-in-norway-picture-id1059380230?b=1&k=6&m=1059380230&s=170667a&w=0&h=kA_A_XrhZJjw2bo5jIJ7089-VktFK0h0I4OWDqaac0c=', 'https://cdn.pixabay.com/photo/2019/11/05/00/53/cellular-4602489_960_720.jpg', 'https://cdn.pixabay.com/photo/2017/02/12/10/29/christmas-2059698_960_720.jpg', 'https://cdn.pixabay.com/photo/2020/01/29/17/09/snowboard-4803050_960_720.jpg', 'https://cdn.pixabay.com/photo/2020/02/06/20/01/university-library-4825366_960_720.jpg', 'https://cdn.pixabay.com/photo/2020/11/22/17/28/cat-5767334_960_720.jpg', 'https://cdn.pixabay.com/photo/2020/12/13/16/22/snow-5828736_960_720.jpg', 'https://cdn.pixabay.com/photo/2020/12/09/09/27/women-5816861_960_720.jpg', ]; @override Widget build(BuildContext context) { return SafeArea( child: Scaffold( backgroundColor: Colors.white24, appBar: AppBar( title: Text("Flutter Staggered GridView Demo"), centerTitle: true, automaticallyImplyLeading: false, ), body: Container( margin: EdgeInsets.all(12), child: StaggeredGridView.countBuilder( crossAxisCount: 2, crossAxisSpacing: 10, mainAxisSpacing: 12, itemCount: imageList.length, itemBuilder: (context, index) { return Container( decoration: BoxDecoration( color: Colors.transparent, borderRadius: BorderRadius.all( Radius.circular(15)) ), child: ClipRRect( borderRadius: BorderRadius.all( Radius.circular(15)), child: FadeInImage.memoryNetwork( placeholder: kTransparentImage, image: imageList[index],fit: BoxFit.cover,), ), ); }, staggeredTileBuilder: (index) { return StaggeredTile.count(1, index.isEven ? 1.2 : 1.8); }), ), ), ); } } ``` Output: [](https://i.stack.imgur.com/4Or80m.png)
null
CC BY-SA 4.0
null
2023-01-04T12:48:15.650
2023-01-04T12:48:15.650
null
null
13,431,819
null
75,005,958
2
null
75,005,833
0
null
Use this Approach. Much Neater. Should have you sorted ``` <?php // Include the database configuration file require_once 'config.php'; // Get image data from database $result = $db->query("SELECT billede FROM billeder ORDER BY ret_id DESC"); ?> <?php if($result->num_rows > 0): ?> <div class="gallery"> <?php while($row = $result->fetch_assoc()): ?> <img src="data:image/jpg;charset=utf8;base64,<?= base64_encode($row['image']); ?>" /> <?php endwhile; ?> </div> <?php else: ?> <p class="status error">Image(s) not found...</p> <?php endif; ?> ```
null
CC BY-SA 4.0
null
2023-01-04T13:10:41.833
2023-01-04T13:10:41.833
null
null
9,625,715
null
75,006,159
2
null
75,005,833
0
null
One solution would be to echo the image tag, and then change it. So you have this line: `echo '<img src="data:image/jpg;charset=utf8;base64,'.base64_encode($row['image']).'" />';` So in your code it would be: ``` <?php // Include the database configuration file require_once 'config.php'; // Get image data from database $result = $db->query("SELECT billede FROM billeder ORDER BY ret_id DESC"); ?> <?php if($result->num_rows > 0){ ?> <div class="gallery"> <?php while ($row = $result->fetch_assoc()){ echo '<img src="data:image/jpg;charset=utf8;base64,'.base64_encode($row['image']).'" />'; } ?> </div> <?php }else{ ?> <p class="status error">Image(s) not found...</p> <?php } ?> ```
null
CC BY-SA 4.0
null
2023-01-04T13:26:33.277
2023-01-04T13:26:33.277
null
null
3,653,544
null
75,006,255
2
null
74,994,456
0
null
Since you did not post a complete example of the problem, I will not post a complete example of the solution. I'll just tell you what to do, since there is no way to know your HTML markup, this may not work. Remove the position:absolute, this removes your element from the document flow and your request is to have the document flow with it... Either use relative positionning or margins to accomplish your positioning.
null
CC BY-SA 4.0
null
2023-01-04T13:34:13.493
2023-01-04T13:34:13.493
null
null
1,620,194
null
75,006,537
2
null
75,005,249
0
null
I found a solution that works in my case. It is necessary to draw lines of a length of at least 1 pixel outside canvas so that the artifact is not noticeable. ``` ctx.moveTo(0, -1); ctx.lineTo(0, 0); ``` Full code: ``` const canvas = document.getElementById("canvas"); const ctx = canvas.getContext("2d"); let rotation = 1.3; function draw() { ctx.save(); ctx.translate(256, 256); ctx.rotate(rotation); const gradient = ctx.createLinearGradient(-128, -128, 256, 256); gradient.addColorStop(0, 'red'); gradient.addColorStop(1, 'blue'); ctx.fillStyle = gradient; ctx.beginPath(); // fix bug ctx.moveTo(0, -1); ctx.lineTo(0, 0); ctx.moveTo(128, 0); ctx.lineTo(0, 128); ctx.lineTo(-128, 0); ctx.lineTo(0, -128); ctx.closePath(); ctx.fill(); ctx.restore(); } canvas.width = canvas.height = 512; draw(); ``` ``` body{ background-color: black } ``` ``` <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> </head> <body> <canvas id="canvas"></canvas> </body> </html> ```
null
CC BY-SA 4.0
null
2023-01-04T13:57:55.220
2023-01-04T13:57:55.220
null
null
5,550,888
null