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
list
73,892,181
2
null
57,602,974
0
null
Below code worked for me by using selenium-stealth module and editing chromedriver exe ``` from selenium.webdriver.chrome.options import Options from selenium import webdriver import time from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium_stealth import stealth chrome_options = Options() chrome_options.add_experimental_option("useAutomationExtension", False) chrome_options.add_experimental_option("excludeSwitches",["enable-automation"]) chrome_options.add_argument("--start-maximized") chrome_options.add_argument('--disable-logging') chrome_options.add_argument('--no-sandbox') chrome_options.add_argument('--disable-dev-shm-usage') chrome_options.add_argument('--disable-blink-features=AutomationControlled') caps = DesiredCapabilities.CHROME caps['goog:loggingPrefs'] = {'performance': 'ALL'} # for editing chromedriver exe so that its not detected(run only once) with open("chromedriver.exe","rb") as d: file_data=d.read() file_data=file_data.replace(b"cdc_",b"tch_") with open("chromedriver.exe","wb") as d: d.write(file_data) driver = webdriver.Chrome('chromedriver.exe',chrome_options=chrome_options,desired_capabilities=caps) # for injecting js to that tab so that browser not detected stealth(driver,languages=["en-US", "en"],vendor="Google Inc.",platform="Win32",webgl_vendor="Intel Inc.",renderer="Intel Iris OpenGL Engine",fix_hairline=True,) driver.get("https://accounts.google.com") time.sleep(3) driver.switch_to.active_element.send_keys("[email protected]\n") time.sleep(3) driver.switch_to.active_element.send_keys("mypassword\n") ```
null
CC BY-SA 4.0
null
2022-09-29T08:01:04.770
2022-09-29T08:01:04.770
null
null
20,109,885
null
73,892,210
2
null
17,792,081
0
null
``` html2canvas(document.body, { proxy: "/my-proxy", }).then((canvas) => { document.body.appendChild(canvas); }); ``` : Don't add if you using setting. The plugin will send the request in the next format ``` https://your-site.com/my-proxy?url=https://path-to-image.jpg&responseType=blob ``` More information about the proxy server is available [here](http://html2canvas.hertzen.com/proxy).
null
CC BY-SA 4.0
null
2022-09-29T08:03:12.327
2022-09-29T08:03:12.327
null
null
1,308,861
null
73,892,224
2
null
73,891,159
3
null
Look at how the documents in this collection are displayed in an italic font in the Firestore console: This means that these documents are only present as "container" of one or more sub-collection but that they are not "genuine" documents. As a matter of fact by doing ``` await FirebaseFirestore.instance .collection(path) .doc(firebaseUser.uid) .collection(collectionName) .add({...}); ``` You create a doc in the `collectionName` (sub)collection but not in the `path` collection. On the other hand, with ``` await FirebaseFirestore.instance .collection(path) .add({...}); ``` you do create a doc in the `path` collection. --- So if you need to have a document in the `path` collection AND in the `collectionName` (sub)collection you need to create these two documents and not only the "child" one. --- Let's take the example of a `doc1` document under the `col1` collection ``` col1/doc1/ ``` and another one `subDoc1` under the `subCol1` (sub-)collection ``` col1/doc1/subCol1/subDoc1 ``` Actually, , they are not at all relating to each other. They just share a part of their paths but nothing else. You can very well create `subDoc1` without creating `doc1`. A side effect of this is that if you delete a document, its sub-collection(s) still exist. Again, the subcollection docs are not really linked to the parent document.
null
CC BY-SA 4.0
null
2022-09-29T08:04:23.830
2022-09-30T06:22:22.447
2022-09-30T06:22:22.447
3,371,862
3,371,862
null
73,892,316
2
null
73,889,096
-1
null
What often works for me is extending the view. ``` struct TestView: View { var body: some View { List { ForEach(games, id: \.name) { game in Section { NavigationLink(value: game) { Text("\(game.name)") } // -- here VStack { Divider() picker } } } } } } Extension TestView { private var picker: some View { Picker("Going?", selection: $currentStatus) { Text("No Response").tag(PlayingStatus.Undecided) Text("Going").tag(PlayingStatus.In) Text("Not going").tag(PlayingStatus.Out) } .font(.body) } } ```
null
CC BY-SA 4.0
null
2022-09-29T08:10:55.543
2022-09-29T08:10:55.543
null
null
16,407,056
null
73,892,465
2
null
73,892,285
2
null
``` table, th, td { border: 1px dashed black; border-collapse: collapse; } th, td { padding-left: 30px; padding-right: 30px; } tbody td { border-top: none; border-bottom: none; line-height: 1; } ``` ``` <caption>Item Details</caption> <table id="Table" cellspacing="0" ; cellpadding="0"> <thead> <tr> <th id="Heading">Row</th> <th id="Heading">Data</th> <th id="Heading">Item</th> <th id="Heading">Price</th> </tr> </thead> <tbody> <tr> <td id="Data">Row</td> <td id="Data">data</td> <td id="Data">1</td> <td id="Data">100</td> </tr> <tr> <td id="Data">Row</td> <td id="Data">data</td> <td id="Data">1</td> <td id="Data">100</td> </tr> <tr> <td id="Data">Row</td> <td id="Data">data</td> <td id="Data">1</td> <td id="Data">100</td> </tr> </tbody> </table> ```
null
CC BY-SA 4.0
null
2022-09-29T08:24:00.000
2022-09-29T08:57:02.430
2022-09-29T08:57:02.430
17,033,432
17,033,432
null
73,892,655
2
null
73,161,740
1
null
I added mine like this and it worked. ``` DropdownSearch<dynamic>( popupProps: const PopupProps.menu( showSearchBox: true, searchFieldProps: TextFieldProps( decoration: InputDecoration( border: OutlineInputBorder(), contentPadding: EdgeInsets.fromLTRB(12, 12, 8, 0), hintText: "search staff...", ), )), ```
null
CC BY-SA 4.0
null
2022-09-29T08:40:59.843
2022-09-29T08:40:59.843
null
null
18,222,791
null
73,892,908
2
null
73,881,936
1
null
Here is an algorithm which should give you a good start. 1. Compute all contours. 2. For each contour compute the convexity defects. If there is no defect the contour is an isolated circle and you can segment it out. 3. After you handled all the isolated circles, you can work out the remaining contours by counting the convexity defects: the number of circles N for each contour is the number of convexity defects divided by 2. 4. Use a clustering algorithm (https://scikit-learn.org/stable/modules/generated/sklearn.mixture.GaussianMixture.html should do well given the shapes you have) and cluster the "white" points using N as the number of clusters to be found.
null
CC BY-SA 4.0
null
2022-09-29T09:00:34.940
2022-09-29T09:00:34.940
null
null
9,055,614
null
73,893,240
2
null
69,513,983
0
null
This isn't ideal, but for the very first file, open it with "o" instead of "t" , this will replace the buffer instead
null
CC BY-SA 4.0
null
2022-09-29T09:27:45.117
2022-09-29T09:27:45.117
null
null
7,129,053
null
73,893,339
2
null
73,892,987
1
null
try: ``` =REGEXMATCH(""&A1, "^"&TEXTJOIN("$|^", 1, INDIRECT( ADDRESS($AB$4, $AB$3)&":"&ADDRESS($AB$2+$AB$4-1, $AB$1+$AB$3-1)))&"$") ``` [](https://i.stack.imgur.com/e6zmz.png) or better: ``` =(COLUMN(A1)>=$AB$3) *(ROW(A1)>=$AB$4)* (COLUMN(A1)<$AB$1+$AB$3)*(ROW(A1)<$AB$2+$AB$4) ``` [](https://i.stack.imgur.com/JWaU8.png)
null
CC BY-SA 4.0
null
2022-09-29T09:36:18.657
2022-09-29T16:24:20.207
2022-09-29T16:24:20.207
5,632,629
5,632,629
null
73,893,392
2
null
73,884,931
1
null
If you want to read the value of `messageID` field, then you should create a reference that points to the `cG6v...PXi1` node and use the following lines of code: ``` DatabaseReference db = FirebaseDatabase.getInstance().getReference(); DatabaseReference messagesRef = db.child("Messages"); DatabaseReference messageReceiverIdRef = messagesRef.child(messageSenderID).child(messageReceiverID); messageReceiverIdRef.get().addOnCompleteListener(new OnCompleteListener<DataSnapshot>() { @Override public void onComplete(@NonNull Task<DataSnapshot> task) { if (task.isSuccessful()) { for (DataSnapshot ds : task.getResult().getChildren()) { String messageId = ds.child("messageID").getValue(String.class); Log.d("TAG", messageId); } } else { Log.d("TAG", task.getException().getMessage()); //Never ignore potential errors! } } }); ``` The result in the logcat will be: ``` -ND-fz....l2krv ... ```
null
CC BY-SA 4.0
null
2022-09-29T09:40:31.293
2022-09-29T09:40:31.293
null
null
5,246,885
null
73,893,409
2
null
29,523,345
0
null
You can solve it by using this sample query > ->when($request->value != null, fn ($q) => $q->where(DB::raw("CONCAT(col1,'',col2)"), '=', '' . $request->value. ''))
null
CC BY-SA 4.0
null
2022-09-29T09:41:50.150
2022-09-29T09:41:50.150
null
null
5,254,746
null
73,893,489
2
null
73,890,836
0
null
> pip install PyAutoGUIpip install python-telegram-bot This install command works on my vscode. I guess you have an out of date version of setuptools. Try the following codes to update your setuptools and reinstall the two packages: ``` pip install --upgrade setuptools ```
null
CC BY-SA 4.0
null
2022-09-29T09:48:11.550
2022-09-29T09:48:11.550
null
null
18,359,438
null
73,893,617
2
null
62,312,586
1
null
How about using a custom bottom navigation view. You can add a Lottie view in each tab which starts animation on click. In my experience, a custom bottom navigation view has worked better for me than using Android's Bottom Navigation View.
null
CC BY-SA 4.0
null
2022-09-29T09:58:26.503
2022-09-29T09:58:26.503
null
null
6,067,590
null
73,894,050
2
null
57,343,517
1
null
In my case I needed to implement the changes suggest above AND press CMD + SHIFT + P and select "Reload Window" to reload VS Code for the changes to take effect.
null
CC BY-SA 4.0
null
2022-09-29T10:31:56.267
2022-09-29T10:31:56.267
null
null
2,050,941
null
73,894,385
2
null
68,185,660
0
null
After receiving this error I ran ``` Login-AzureRmAccount ``` Logged in to the login screen that appeared and it started working
null
CC BY-SA 4.0
null
2022-09-29T10:57:50.830
2022-09-29T10:57:50.830
null
null
1,069,816
null
73,894,490
2
null
73,881,936
0
null
If you want to find the minimal openings, you can use a [medial axis](https://scikit-image.org/docs/stable/api/skimage.morphology.html#skimage.morphology.medial_axis) based approach. Pseudo code: ``` compute contours of bitmap compute medial-axis of bitmap for each point on medial-axis: get minimal distance d from medial axis algorithm for each local minimum of distance d: get two points on bitmap contours with minimal distance that are at least d apart from each other use these points for deviding line ``` If you need a working implementation in `python`, please let me know. I would use `skimage` lib. For other languages you might have to implement medial-axis on your own. But that shouldn't be a big deal.
null
CC BY-SA 4.0
null
2022-09-29T11:05:47.060
2022-09-29T11:33:30.437
2022-09-29T11:33:30.437
18,667,225
18,667,225
null
73,895,127
2
null
73,889,972
0
null
You can either entirely switch over to Matplotlib code as [Mohit Mehlawat](https://stackoverflow.com/a/73890084/4458369) suggested, or you can keep using [pandas.DataFrame.plot()](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html) by setting an `ax` variable and place both plots on it like so: ``` df1 = pd.DataFrame({'Value':[1,2,3,4,5]}) df2 = pd.DataFrame({'Value':[5,4,3,2,1]}) # Relevant code ax = df1.plot() df2.plot(ax=ax) ``` Output: [](https://i.stack.imgur.com/xGfbX.png)
null
CC BY-SA 4.0
null
2022-09-29T11:54:39.170
2022-09-29T11:54:39.170
null
null
4,458,369
null
73,895,570
2
null
71,349,763
0
null
When i'm calling razerpay checkout It gives me an unexpected error (code - 1) with /Users/ramprasad.a/Documents/RamprasadA/project/razorpay-ios/RazorpayIOS/CheckoutOtpelf/Classes/RazorpayCheckoutVC.swift deinitialized
null
CC BY-SA 4.0
null
2022-09-29T12:28:48.623
2022-09-29T12:28:48.623
null
null
18,491,616
null
73,895,868
2
null
30,509,143
0
null
``` if #available(iOS 13.0, *) { let appearance = UINavigationBarAppearance() appearance.backgroundColor = .AppWhiteColor appearance.titleTextAttributes = [.foregroundColor: UIColor.white] appearance.largeTitleTextAttributes = [.foregroundColor: UIColor.white] appearance.titleTextAttributes = [NSAttributedString.Key.font: UIFont.MontBold(17), NSAttributedString.Key.foregroundColor:UIColor.AppBlackColor] navigationController?.navigationBar.tintColor = .white navigationController?.navigationBar.standardAppearance = appearance navigationController?.navigationBar.compactAppearance = appearance navigationController?.navigationBar.scrollEdgeAppearance = appearance } else { // Fallback on earlier versions } ``` Please try this do color of navigation bar
null
CC BY-SA 4.0
null
2022-09-29T12:51:55.813
2022-09-29T12:51:55.813
null
null
15,211,985
null
73,895,902
2
null
73,895,853
0
null
This should do: ``` df = data.frame(RT = c('[0.8414999999999964]', '[1.0113000000119143,1.3689999999999998]')) %>% mutate(RT = str_remove_all(RT, '\\[|\\]')) df2 = str_split_fixed(string = df$RT, pattern = ',', n = Inf) %>% as.data.frame() %>% mutate(across(everything(), ~replace(.x %>% as.character, .x == '', NA))) cols = names(df2) %>% rev df_final = df2 %>% mutate(RT_final = coalesce(!!!syms(cols))) ``` ## Output: ``` V1 V2 RT_final 1 0.8414999999999964 <NA> 0.8414999999999964 2 1.0113000000119143 1.3689999999999998 1.3689999999999998 ``` Totally changed my answer based on new info, let me know if it helps. You could also only select `RT_final` if needed
null
CC BY-SA 4.0
null
2022-09-29T12:53:55.213
2022-09-29T14:11:27.707
2022-09-29T14:11:27.707
9,462,829
9,462,829
null
73,895,968
2
null
68,062,415
0
null
add this argument into dash_table.DataTable: ``` virtualization=False ``` and you don't need to touch the height
null
CC BY-SA 4.0
null
2022-09-29T12:58:41.577
2022-09-29T12:58:41.577
null
null
17,287,437
null
73,896,130
2
null
73,896,016
0
null
The only "best practice" is what your organization has set. The only real downfall, is developers on your team not knowing how to write modules for ES6. I have done countless code reviews where the developer is using exports.func() and then importing it in another file. Unless your team is seasoned and not new to JS, then pick one and don't combine them. Since you mentioned you are new, stick with CJS. Reading materials: [syntax differences between CJS & ES6 modules](https://stackoverflow.com/questions/31131314/syntax-differences-between-cjs-es6-modules)
null
CC BY-SA 4.0
null
2022-09-29T13:10:34.363
2022-09-29T13:10:34.363
null
null
5,977,353
null
73,896,175
2
null
72,627,495
1
null
This solved it for me [https://www.codeproject.com/tips/1029540/solved-process-with-an-id-of-is-not-running](https://www.codeproject.com/tips/1029540/solved-process-with-an-id-of-is-not-running) Open the .csproj file, and remove tags DevelopmentServerPort, DevelopmentServerVPath and IISUrl.
null
CC BY-SA 4.0
null
2022-09-29T13:13:20.350
2022-09-29T13:13:20.350
null
null
1,079,096
null
73,896,474
2
null
73,890,757
0
null
I don't think the issue is with your JSON code. This issue is with REST API call made behind the scene to save the JSON formatting in column settings. You can try adding JSON formatting in another list in same site or list in other site to narrow down your issue. It can be related to your column or list or site. Meanwhile try using this steps to add JSON formatting to column: 1. From SharePoint list, click on Setting (gear) icon and select "List settings" 2. On list settings page, scroll down to the "Columns" section and click on column name where you want to apply JSON formatting 3. On column settings page, scroll down to "Column Formatting" section, paste your JSON in textbox below it and click "OK" to save column settings: [](https://i.stack.imgur.com/HfIVr.png) : [SharePoint column formatting](https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting) Related article to get count of comments in list using JSON formatting: [Working with SharePoint Online/Microsoft List Comments using JSON Formatting](https://ganeshsanapblogs.wordpress.com/2021/01/10/working-with-sharepoint-online-microsoft-list-comments-using-json-formatting/)
null
CC BY-SA 4.0
null
2022-09-29T13:36:15.983
2022-09-29T14:19:22.457
2022-09-29T14:19:22.457
8,624,276
8,624,276
null
73,896,637
2
null
73,896,240
3
null
SwaggerUI uses JavaScript to send the requests to the server. You could inject a script that intercepts the request and changes the header before transmitting it to the server, e.g. ``` app.UseSwaggerUI(c => { // ... var adjustHeaders = @"(request) => { let header = request.headers["User-Identity"]; if (header && header.length > 0) { // header is a JSON object if (header[0] == "{") header = btoa(header); // header is an email address else if (header.indexOf("@") >= 0) header = btoa(JSON.stringify({ email: header })); // Otherwise assume that it is already encoded request.headers["User-Identity"] = header; } return request; }"; c.UseRequestInterceptor(adjustHeaders); }); ``` Above script is a pseudo-Javascript that can give you a starting point. Please test it in the browser whether it works in your situation and for the browsers your SwaggerUI targets.
null
CC BY-SA 4.0
null
2022-09-29T13:47:03.870
2022-09-29T13:47:03.870
null
null
642,579
null
73,896,647
2
null
31,294,355
2
null
I stumbled upon the same question and wondered why it has not been solved in the last 7 years. Here's my solution for any future reader based on [plot_trisurf](https://matplotlib.org/2.0.2/mpl_toolkits/mplot3d/tutorial.html#tri-surface-plots) (and the corresponding code examples). ``` import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import matplotlib.tri as mtri # Create some point cloud data: a = 3 b = 4 # def grid of parametric variables u = np.linspace(0,2*np.pi,50) v = np.linspace(1,9,50) U, V = np.meshgrid(u, v) U, V = U.flatten(), V.flatten() # Triangulate parameter space to determine the triangles tri = mtri.Triangulation(U, V) # get the transformed data as list X,Y,Z = [],[],[] for _u in u: for _v in v: r = (-_v**2+10.0*_v)/10.0 x = r*np.cos(_u) y = r*np.sin(_u) z = 5*_v*(y**2/b**2 - x**2/a**2) + 5*_v X.append(x) Y.append(y) Z.append(z) # Visualize it: fig = plt.figure() ax = fig.gca(projection = '3d') ax.scatter(X,Y,Z, s=1, c='r') ax.plot_trisurf(X, Y, Z, triangles=tri.triangles, alpha=.5) plt.show() ``` This produces the following plot. [](https://i.stack.imgur.com/BdTgT.png)
null
CC BY-SA 4.0
null
2022-09-29T13:47:47.030
2022-09-29T13:47:47.030
null
null
4,982,324
null
73,896,786
2
null
73,533,813
1
null
I found two possible approaches: Don't use the same `UIViewController` instance, that holds the `UITableView`. Create a new one. (Your case: when `ViewControllerOne` push `ViewControllerTwo`). With this approach you get the "fresh" layout with large title every time you push the VC. Scroll by calculating the `UITableView.contentOffset`. Use for that `adjustedContentInset.top` and round the value. With this approach you get the same result like approach 1, but with a visible back scrolling animation. ``` class ViewControllerTwo { private var _adjustedContentInsetTopRounded: CGFloat? override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) if let y = _adjustedContentInsetTopRounded { DispatchQueue.main.async { self.tableView.setContentOffset( CGPoint( x: 0, y: -y ), animated: true ) } } } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) _adjustedContentInsetTopRounded = tableView.adjustedContentInset.top.rounded(.up) } } ```
null
CC BY-SA 4.0
null
2022-09-29T13:58:06.457
2022-09-30T05:15:57.683
2022-09-30T05:15:57.683
7,007,818
7,007,818
null
73,896,905
2
null
73,896,904
0
null
This can be pretty easy. We just need to use the [JIMP](https://npmjs.com/jimp) package for NodeJS. We can output the image as a file or a buffer to use in canvas too. ``` var Jimp = require('jimp'); Jimp.read(image_1,(err, image) => { Jimp.read(image_2,(err1,image1) => { image1.resize(image.bitmap.width,image.bitmap.height) image.mask(image1,0,0) image.write(output_image) //for a file output //for buffer output image.getBufferAsync('image/png'); //for transparent image use image/png }) }) ```
null
CC BY-SA 4.0
null
2022-09-29T14:05:59.253
2022-09-29T14:05:59.253
null
null
18,723,096
null
73,897,731
2
null
9,191,803
0
null
just give position other that static. And u should give both container a position than it will work.
null
CC BY-SA 4.0
null
2022-09-29T15:02:36.740
2022-09-29T15:02:36.740
null
null
20,079,044
null
73,897,762
2
null
73,897,465
1
null
Your issue is that you do not have `xmin`, `xmax`, `ymin`, `ymax` values. Since you use rectangles (you need to specify 4 corners): e.g: ``` plot_df <- data.frame( xmin = c(0, 10, 3), xmax = c(8, 18, 4), ymin = c(0, 10, 8), ymax = c(5, 19, 15), type = c('a', 'b', 'c'), colour1 = c('red', 'black', 'blue') ) ``` After that ``` ggplot(plot_df) + geom_rect_pattern( aes( xmin=xmin, ymin=ymin, xmax=xmax, ymax=ymax, pattern_fill = I(colour) ), pattern = 'stripe', colour = 'black', pattern_density = 0.3, fill = NA ) + theme_bw(18) ``` [](https://i.stack.imgur.com/mLRPv.png)
null
CC BY-SA 4.0
null
2022-09-29T15:04:32.743
2022-09-29T15:17:19.303
2022-09-29T15:17:19.303
3,617,715
3,617,715
null
73,897,971
2
null
73,897,465
0
null
To produce the plot without altering your data, you could try: ``` ggplot() + geom_rect_pattern(data = test, aes(xmin = as.numeric(factor(names)) - 0.25, xmax = as.numeric(factor(names)) + 0.25, ymin = start, ymax = end, fill = names, pattern = stripe), pattern_fill = 'black', size = 0) + scale_x_continuous(breaks = seq(length(levels(factor(test$names)))), labels = levels(factor(test$names))) + scale_pattern_manual(values = c('none', 'stripe')) ``` [](https://i.stack.imgur.com/ip0aX.png)
null
CC BY-SA 4.0
null
2022-09-29T15:19:26.337
2022-09-29T15:19:26.337
null
null
12,500,315
null
73,898,043
2
null
73,819,089
0
null
I couldn't get the updated answer to work, it still didn't evaluate the if statement to true, after a bit of googling and trying different options, the following returns the IP address, not sure if its the right way to go about it but it works. ``` var ipv4CidrRanges = ipRanges.Cast<IPv4CidrRange>().ToList(); foreach (var ipv4CidrRange in ipv4CidrRanges) { Console.WriteLine(ipv4CidrRange.CidrAddress); } ``` Many thanks to user2250152 who solved the first conundrum for me.
null
CC BY-SA 4.0
null
2022-09-29T15:24:58.090
2022-09-29T15:24:58.090
null
null
20,064,021
null
73,898,034
2
null
73,897,187
0
null
If you want the type of structure member `precalculated` to be documented with a name and a link to separate documentation of that type, then you must that type a name or tag. You have not done that. C does not allow you to name it (via `typedef`) when its definition is inside a struct definition, however, and it is poor style to tag it in that context. If you can get over your apparent aversion to structure tags and are also unconcerned with the stylistic problems involved, then I anticipate that adding a tag would induce Doxygen to do what you want: ``` typedef struct { calibrator_calibration_t calibration; ///< Copied calibration blackbox_weight_id_e weight_id; struct precalc // Note the structure tag here { float slope; float above_mixed; float under_mixed; float above_male; float under_male; float above_female; float under_female; uint32_t stable_counter_minimum; } precalculated; ///< Precalculated values (for faster calculation) based on settings } filter_t; ``` But if you are going to tag the structure type then it would be better form to move it out of the host structure definition, and if you're going to do that, then it appears that your standard convention would be to name it instead of tagging it: ``` typedef struct { float slope; float above_mixed; float under_mixed; float above_male; float under_male; float above_female; float under_female; uint32_t stable_counter_minimum; } precalculated_t; typedef struct { calibrator_calibration_t calibration; ///< Copied calibration blackbox_weight_id_e weight_id; precalculated_t precalculated; ///< Precalculated values (for faster calculation) based on settings } filter_t; ```
null
CC BY-SA 4.0
null
2022-09-29T15:23:48.610
2022-09-29T15:23:48.610
null
null
2,402,272
null
73,898,195
2
null
73,863,756
0
null
## Concatenate Row Matches - If you don't have Office 365 and your screenshot represents the range `A1:E4`, in cell `E2`, you could use the following array formula (hold down + and press to confirm):``` =TEXTJOIN(", ",,IF($A2:$D2<>0,$A$1:$D$1,"")) ``` and copy down. - `VBA` ``` Sub ConcatenateHeaders() Const NOT_CRITERIA As Double = 0 Const DElIMITER As String = ", " Dim ws As Worksheet: Set ws = ActiveSheet ' improve! ' Write the values from the source range to a 2D one-based array, ' the source array. To simplify (due to lack of information), it is assumed ' that the table starts in cell 'A1' and that the destination column ' is the last column and has its header already written. Dim srg As Range: Set srg = ws.Range("A1").CurrentRegion Dim srCount As Long: srCount = srg.Rows.Count If srCount < 2 Then Exit Sub ' only headers or no data Dim scCount As Long: scCount = srg.Columns.Count - 1 If scCount < 1 Then Exit Sub ' not enough columns Dim sData() As Variant: sData = srg.Value ' Define the destination array. Dim dData() As String: ReDim dData(1 To srCount - 1, 1 To 1) Dim dLen As Long: dLen = Len(DElIMITER) ' Applying the logic, write the required values from the source array ' to the destination array. Dim sr As Long Dim sc As Long Dim sValue As Variant Dim dString As String For sr = 2 To srCount ' from the 2nd row ' Write to a string ('dstring'). For sc = 1 To scCount ' last column excluded (-1) sValue = sData(sr, sc) If VarType(sValue) = vbDouble Then ' is a number If sValue <> NOT_CRITERIA Then ' is not equal dString = dString & sData(1, sc) & DElIMITER ' header row 'Else ' is equal; do nothing End If 'Else ' is not a number; do nothing End If Next sc ' Check the string. If Len(dString) > 0 Then dString = Left(dString, Len(dString) - dLen) ' remove trailing del. dData(sr - 1, 1) = dString ' write to destination array dString = vbNullString ' reset 'Else ' the string is empty; do nothing End If Next sr ' Write the values from the destination array to the destination range. Dim drg As Range: Set drg = srg.Resize(srCount - 1, 1).Offset(1, scCount) drg.Value = dData End Sub ```
null
CC BY-SA 4.0
null
2022-09-29T15:36:39.030
2022-09-29T15:36:39.030
null
null
9,814,069
null
73,898,501
2
null
73,896,306
0
null
Here's a fully reproducible example of such a graph created from a weighted adjacency matrix: ``` library(igraph) library(ggraph) set.seed(1) adj <- matrix(rbinom(900, 1, 0.02) * runif(900, -1, 1), 30, dimnames = list(paste('node', 1:30), paste('node', 1:30))) graph <- graph.adjacency(adj, weighted = TRUE) ggraph(graph, layout = 'linear', circular = TRUE) + geom_edge_arc(aes(color = weight, size = abs(weight))) + geom_node_text(aes(label = name, angle = node_angle(x, y)), hjust = -0.5) + geom_node_point(shape = 21, size = 4, aes(fill = name)) + theme_graph() + scale_edge_color_gradientn(colours = c('red4', 'gold', 'green4')) + coord_fixed(xlim = c(-1.4, 1.4), ylim = c(-1.4, 1.4)) + guides(fill = guide_none()) ``` [](https://i.stack.imgur.com/wEfD3.png)
null
CC BY-SA 4.0
null
2022-09-29T16:00:21.100
2022-09-29T16:00:21.100
null
null
12,500,315
null
73,898,797
2
null
73,165,405
0
null
you can use a function to rotate the image and call the function from your image value see: [https://learn.microsoft.com/en-us/dotnet/api/system.drawing.rotatefliptype?view=netframework-4.8](https://learn.microsoft.com/en-us/dotnet/api/system.drawing.rotatefliptype?view=netframework-4.8) ``` Public Function EditImage(ByVal picbytes as Byte()) as Byte() Dim ms as System.IO.MemoryStream = Nothing Dim rms as System.IO.MemoryStream = Nothing Dim bm as System.Drawing.Bitmap ms = new System.IO.MemoryStream(picbytes, 0, picbytes.Length) bm = new System.Drawing.Bitmap(ms) ' Image manipulation code will go here bm.RotateFlip(System.Drawing.RotateFlipType.Rotate270FlipNone) rms = new System.IO.MemoryStream() bm.Save(rms, System.Drawing.Imaging.ImageFormat.Jpeg) Return rms.ToArray() End Function ``` [](https://i.stack.imgur.com/SZtXy.png)
null
CC BY-SA 4.0
null
2022-09-29T16:23:38.583
2022-09-29T16:23:38.583
null
null
4,386,442
null
73,899,035
2
null
73,898,644
0
null
At the way the foreigns keys are, an order can ony have one flavor, and a flavor can only have one ingredient. You need to create more 2 tables of n:m relationship: One table for the order flavors, and other for the flavor ingredients. Do a search about m to n relationships.
null
CC BY-SA 4.0
null
2022-09-29T16:43:25.940
2022-09-29T16:43:25.940
null
null
17,030,181
null
73,899,267
2
null
73,899,105
2
null
There are a bunch of typos and omissions. The worst are the missing or extraneous semicolons Here is working code using array notation [https://onlinephp.io/c/a97d8](https://onlinephp.io/c/a97d8) ``` <?php $cols = 10; $rows = 12; $table[]="<table><tbody><tr><td>+</td>"; for($a = 1; $a < $rows;$a++) { $table[] = "<td>$a</td>"; for($b = 1;$b < $cols; $b++) $table[]= "<td>".($answer = $a + $b)."</td>"; if ($a<$rows-1) { $table[] = "</tr>"; $table[] = "<tr><td>$a</td>"; } } $table[] = "</tr></tbody></table>"; echo implode($table); ?> ``` Output Note the CSS - it is quite complex `table tr:nth-of-type(2n+3)` : stripe from 3rd row ``` table { border-collapse: collapse; font-weight: bold; color: blue; font-family: Arial, Helvetica, sans-serif; } table td { border: 1px solid #ccc; width: 2em; padding: 5px; text-align: center; } table tr:first-of-type { background-color: gold; color: black; } table tr td:first-child { background-color: pink; color: black; } table tr:first-child>td:first-child { background-color: orange; } table tr:nth-of-type(2n+3) { background-color: #f2f2f2; } ``` ``` <table> <tbody> <tr> <td>+</td> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td>6</td> <td>7</td> <td>8</td> <td>9</td> <td>10</td> </tr> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td>6</td> <td>7</td> <td>8</td> <td>9</td> <td>10</td> <td>11</td> </tr> <tr> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td>6</td> <td>7</td> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12</td> </tr> <tr> <td>3</td> <td>4</td> <td>5</td> <td>6</td> <td>7</td> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12</td> <td>13</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> <td>7</td> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12</td> <td>13</td> <td>14</td> </tr> <tr> <td>5</td> <td>6</td> <td>7</td> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12</td> <td>13</td> <td>14</td> <td>15</td> </tr> <tr> <td>6</td> <td>7</td> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12</td> <td>13</td> <td>14</td> <td>15</td> <td>16</td> </tr> <tr> <td>7</td> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12</td> <td>13</td> <td>14</td> <td>15</td> <td>16</td> <td>17</td> </tr> <tr> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12</td> <td>13</td> <td>14</td> <td>15</td> <td>16</td> <td>17</td> <td>18</td> </tr> <tr> <td>9</td> <td>10</td> <td>11</td> <td>12</td> <td>13</td> <td>14</td> <td>15</td> <td>16</td> <td>17</td> <td>18</td> <td>19</td> </tr> <tr> <td>10</td> <td>11</td> <td>12</td> <td>13</td> <td>14</td> <td>15</td> <td>16</td> <td>17</td> <td>18</td> <td>19</td> <td>20</td> </tr> </tbody> </table> ```
null
CC BY-SA 4.0
null
2022-09-29T17:01:54.340
2022-09-29T19:30:00.003
2022-09-29T19:30:00.003
295,783
295,783
null
73,899,290
2
null
23,363,073
0
null
Trivial but in my case, tests did not run because the constructor was private. I found this under Tests in the Output window.
null
CC BY-SA 4.0
null
2022-09-29T17:04:01.703
2022-09-29T17:04:01.703
null
null
3,253,280
null
73,899,341
2
null
73,753,672
150
null
When .NET (Core) was first released for Linux, it was not yet available in the official Ubuntu repo. So instead, many of us added the Microsoft APT repo in order to install it. Now, the packages are part of the Ubuntu repo, and they are conflicting with the Microsoft packages. This error is a result of mixed packages. So you need to pick which one you're going to use, and ensure they don't mix. Personally, I decided to stick with the Microsoft packages because I figured they'll be better kept up-to-date. First, remove all existing packages to get to a clean state: ``` sudo apt remove dotnet* sudo apt remove aspnetcore* sudo apt remove netstandard* ``` Then, create a file in `/etc/apt/preferences.d` (I named mine `99microsoft-dotnet.pref`, following the convention that files in such `*.d` directories are typically prefixed with a 2-digit number so that they sort and load in a predictable order) with the following contents: ``` Package: * Pin: origin "packages.microsoft.com" Pin-Priority: 1001 ``` Then, the regular update & install: ``` sudo apt update sudo apt install dotnet-sdk-6.0 ``` , remove all the existing packages as above, but instead of creating the `/etc/apt/preferences.d` entry, just delete the Microsoft repo: ``` sudo rm /etc/apt/sources.list.d/microsoft-prod.list sudo apt update sudo apt install dotnet-sdk-6.0 ``` However, note that the Microsoft repo contains other packages such as PowerShell, SQL Server Command-Line Tools, etc., so removing it may not be desirable. I'm sure it's possible to make the APT config more specific to just these packages, but this is working for me for now. Hopefully Microsoft and Ubuntu work together to fix this soon. More info on the issue and various solutions is available here: - [https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-mixup](https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-mixup)- [https://github.com/dotnet/core/issues/7699](https://github.com/dotnet/core/issues/7699)
null
CC BY-SA 4.0
null
2022-09-29T17:09:09.383
2023-01-10T15:51:01.570
2023-01-10T15:51:01.570
393,931
393,931
null
73,899,786
2
null
45,065,685
0
null
Your code contains an . Use `"Call of Duty: Black Ops III" != x` condition instead of `input != x`
null
CC BY-SA 4.0
null
2022-09-29T17:52:08.057
2022-09-29T17:52:08.057
null
null
6,784,846
null
73,899,790
2
null
73,895,541
0
null
The Azure Functions environment only imports a base set of assemblies by default, and the `Microsoft.Bot` libraries are not among them. You will need to reference those assemblies before you can import the namespace. This means you will need both a `#r` reference and the `using` import. See the Azure Functions document on [referencing external assemblies](https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-csharp?tabs=functionsv2#referencing-external-assemblies) for a list of what is provided by default and an example of how to reference.
null
CC BY-SA 4.0
null
2022-09-29T17:52:24.537
2022-09-29T17:52:24.537
null
null
17,322,893
null
73,899,824
2
null
73,899,697
1
null
Since it's file1 that determines the order, that has to be the outer loop. ``` file1 = open ("file1.txt",'r') file2 = open ("file2.txt",'r') file1_lines=file1.readlines() file2_lines=file2.readlines() for line1 in file1_lines: for line2 in file2_lines: if line2.startswith(line1): print(line2) ```
null
CC BY-SA 4.0
null
2022-09-29T17:56:13.527
2022-09-29T17:56:13.527
null
null
1,883,316
null
73,900,433
2
null
73,900,077
0
null
We `unpivot` `aux`, `cro`, and `pep` and then pivot them back with `sum`. ``` select value ,"20/01/2020" ,"21/01/2020" from ( select value, DATE, CNT from t unpivot("CNT" for "BIT" in (AUX, CRO, PEP)) up ) up pivot (sum(cnt) for DATE in ("20/01/2020", "21/01/2020")) p ``` | value | 20/01/2020 | 21/01/2020 | | ----- | ---------- | ---------- | | A | 1 | 1 | | B | 1 | 1 | | C | 1 | 1 | [Fiddle](https://dbfiddle.uk/dHaDKG6D)
null
CC BY-SA 4.0
null
2022-09-29T18:59:48.760
2022-09-29T18:59:48.760
null
null
19,174,570
null
73,900,452
2
null
73,018,154
0
null
The answer is to just add .ignoresSafeArea() after the toolbar{}. ``` NavigationView { PDFKitRepresentedView(documentURL) .toolbar { // } .ignoresSafeArea() // } ```
null
CC BY-SA 4.0
null
2022-09-29T19:01:35.167
2022-09-29T19:01:35.167
null
null
18,758,357
null
73,900,521
2
null
73,899,697
0
null
# Solution 1 One way to solve this problem is to have an order table such as: | Make | Order | | ---- | ----- | | Honda | 00000000- | | Toyota | 00000001- | | BMW | 00000002- | | Ford | 00000003- | Then, for each model, we replace "Honda" with "00000000-", "Toyota" with "00000001-", then sorting will be easy. ``` import itertools # Create `order`: A dictionary to transform text in a format suitable # for sorting counter = itertools.count() with open("file1.txt") as stream: order = {key.strip(): f"{value:>08}-" for key, value in zip(stream, counter)} # At this point, order looks something like: # {'Honda': '00000000-', # 'Toyota': '00000001-', # 'BMW': '00000002-', # 'Ford': '00000003-'} def keyfunc(text): "Translate Honda778 to 00000000-778, good for sorting." for key, value in order.items(): text = text.replace(key, value) return text # Read a list of models and sort with open("file2.txt") as stream: models = stream.read().splitlines() models.sort(key=keyfunc) # Output for model in models: print(model) ``` The output: ``` Honda778 Toyota126 BMW99 Ford78x ``` # Solution 2 In this solution, we will create a `bucket`: A dictionary `{make: list of models}`, that might look something like: ``` {'Honda': ['Honda778'], 'Toyota': ['Toyota126'], 'BMW': ['BMW99'], 'Ford': ['Ford78x']} ``` Then it is a matter of going through each list and print. ``` def get_make(model): """Given Toyota126, returns Toyota.""" for make in bucket: if make in model: return make with open("file1.txt") as stream: bucket = {key.strip(): [] for key in stream} with open("file2.txt") as stream: for model in stream: model = model.strip() bucket[get_make(model)].append(model) # Output for models in bucket.values(): print("\n".join(models)) ``` While these solutions are somewhat long, I value long, but descriptive solutions over short, cryptic ones. Please comment.
null
CC BY-SA 4.0
null
2022-09-29T19:07:55.767
2022-09-29T19:07:55.767
null
null
459,745
null
73,900,961
2
null
73,899,105
1
null
Easiest way to do this is with PHP and CSS Grid: [https://paiza.io/projects/oHTe6JJGbeXX85Hij6X0VQ?language=php](https://paiza.io/projects/oHTe6JJGbeXX85Hij6X0VQ?language=php) ``` <div class="table"> <?php $rows = 10; $cols = 10; for($i=0; $i<$rows+1; $i++) { for($j=0; $j<$cols+1; $j++) { echo "<div>"; echo $i == 0 && $j == 0 ? "+" : $i + $j; echo "</div>"; } } ?> </div> ``` Result: ``` .table { display: grid; grid-template-columns: repeat(11, 1fr); } .table > div { font-family:sans-serif; padding: 5px 5px; border: solid 1px; text-align: center; } .table > div:first-child { background-color: orange; } .table > div:nth-child(11n + 12) { background-color: pink; } .table > div:nth-child(n+2):nth-child(-n+11) { background-color: goldenrod; } ``` ``` <div class="table"> <div>+</div><div>1</div><div>2</div><div>3</div><div>4</div><div>5</div><div>6</div><div>7</div><div>8</div><div>9</div><div>10</div><div>1</div><div>2</div><div>3</div><div>4</div><div>5</div><div>6</div><div>7</div><div>8</div><div>9</div><div>10</div><div>11</div><div>2</div><div>3</div><div>4</div><div>5</div><div>6</div><div>7</div><div>8</div><div>9</div><div>10</div><div>11</div><div>12</div><div>3</div><div>4</div><div>5</div><div>6</div><div>7</div><div>8</div><div>9</div><div>10</div><div>11</div><div>12</div><div>13</div><div>4</div><div>5</div><div>6</div><div>7</div><div>8</div><div>9</div><div>10</div><div>11</div><div>12</div><div>13</div><div>14</div><div>5</div><div>6</div><div>7</div><div>8</div><div>9</div><div>10</div><div>11</div><div>12</div><div>13</div><div>14</div><div>15</div><div>6</div><div>7</div><div>8</div><div>9</div><div>10</div><div>11</div><div>12</div><div>13</div><div>14</div><div>15</div><div>16</div><div>7</div><div>8</div><div>9</div><div>10</div><div>11</div><div>12</div><div>13</div><div>14</div><div>15</div><div>16</div><div>17</div><div>8</div><div>9</div><div>10</div><div>11</div><div>12</div><div>13</div><div>14</div><div>15</div><div>16</div><div>17</div><div>18</div><div>9</div><div>10</div><div>11</div><div>12</div><div>13</div><div>14</div><div>15</div><div>16</div><div>17</div><div>18</div><div>19</div><div>10</div><div>11</div><div>12</div><div>13</div><div>14</div><div>15</div><div>16</div><div>17</div><div>18</div><div>19</div><div>20</div></div> ```
null
CC BY-SA 4.0
null
2022-09-29T19:53:38.810
2022-09-29T20:10:26.660
2022-09-29T20:10:26.660
818,326
818,326
null
73,901,294
2
null
73,900,855
0
null
Start your loop at `i = 1` otherwise all factors will be `0` as observed. Your implementation is not a , just an iterative loop. ``` #include <stdio.h> int main() { double i = 0, bounds = 14, factor = 1; printf("%.0f! = %.0f\n", i, factor); for (i = 1; i <= bounds; i++) { factor = factor * i; printf("%.0f! = %.0f\n", i, factor); } return 0; } ``` Or with a single `printf` statement: ``` #include <stdio.h> int main() { double i = 0, bounds = 14, factor = 1; for (;;) { printf("%.0f! = %.0f\n", i, factor); if (i >= bounds) break; i += 1; factor = factor * i; } return 0; } ```
null
CC BY-SA 4.0
null
2022-09-29T20:29:36.153
2022-09-29T20:36:56.257
2022-09-29T20:36:56.257
4,593,267
4,593,267
null
73,901,730
2
null
73,901,603
0
null
Your for loop is unnecessary there. This might be working for you but without a sandbox to test it's hard to tell. ``` const userFollowers =usersData.find(user=>user.id===userId).followers.map(follower=>follower.id); usersData.map(user=>{ if(userFollowers.includes(user.id)){ return ( <li key={user.id} className="followers__modal__followers"> <a href={`/${user.id}`} className="followers__modal__followers__links" > <img src={user.picture} alt="" /> <h4>{user.firstname + " " + user.lastname} </h4> </a> {user.id !== userData.id ? < FollowHandler followerId={user.id} type={'suggestion'} /> : null} </li> ) }) ```
null
CC BY-SA 4.0
null
2022-09-29T21:19:37.840
2022-09-29T22:09:54.617
2022-09-29T22:09:54.617
18,103,486
18,103,486
null
73,901,916
2
null
73,901,765
2
null
You absolutely can use Bootstrap's list group with an image. The crown and list numbers could be added as pseudo-elements. ``` .list-group { counter-reset: line-number; } .list-group-item { counter-increment: line-number; text-indent: 24px; } .list-group-item:after { content: counter(line-number)"."; text-indent: 0; position: absolute; width: 24px; height: 24px; left: 0.5rem; text-align: center; } .list-group-item.crowned:after { content: ''; background-image: url(https://via.placeholder.com/24); } ``` ``` <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous"> <ul class="list-group m-4"> <li class="list-group-item crowned">An item</li> <li class="list-group-item">A second item</li> <li class="list-group-item">A third item</li> <li class="list-group-item crowned">A fourth item</li> <li class="list-group-item">And a fifth one</li> </ul> ```
null
CC BY-SA 4.0
null
2022-09-29T21:41:08.177
2022-09-30T03:06:41.903
2022-09-30T03:06:41.903
1,264,804
1,264,804
null
73,901,973
2
null
73,901,765
0
null
as you set `secondItem` for your list item , it dosent work , you can do it : ``` ol { list-style-type: none; } ``` and then ``` .firstItem { background-image: url(crown-solid.svg); background-size: 20px; background-repeat: no-repeat; background-position: 3% 1%; margin-top: 5px; } ``` OR: according your second image you can use list grouping in bootstrap this link may can help you [bootstrap listing](https://www.w3schools.com/bootstrap/bootstrap_list_groups.asp) and about the crown I prefer to use font icon beside this. you can user for example fontawesom goodluck bro
null
CC BY-SA 4.0
null
2022-09-29T21:48:23.280
2022-09-29T21:48:23.280
null
null
9,614,012
null
73,901,946
2
null
73,900,855
0
null
Writing functions can be tricky. That is why a problem like this is, as shown, easily solved with simple iterations. However, since you asked: "what is my mistake?" The posted code shows no sign of being a recursive function. On the other hand, this does: ``` #include <stdio.h> double factorial( int n ) { double f = 1.0; if( n > 1 ) f = n * factorial( n - 1 ); // here's where Alice goes down the rabbit hole printf( "%22.0lf = %2d!\n", f, n ); // and here is where she returns return f; } int main() { factorial( 14 ); return 0; } ``` ``` 1 = 1! 2 = 2! 6 = 3! 24 = 4! 120 = 5! 720 = 6! 5040 = 7! 40320 = 8! 362880 = 9! 3628800 = 10! 39916800 = 11! 479001600 = 12! 6227020800 = 13! 87178291200 = 14! ``` You can extend this to a few higher values (double's have the capacity), but you will soon encounter errors where there are not enough bits to accurately represent the factorial. Plausible, but wrong, values will be printed. Once you've got the fundamentals working, you can begin to extend the code. ``` #include <stdio.h> double factorial( int n ) { double f = 1.0; if( n > 1 ) f = n * factorial( n - 1 ); printf( "%13.0lf = %2d! = ", f, n ); char *pref = ""; while( n ) printf( "%s%d", pref, n-- ), pref = "x"; puts( "" ); return f; } int main() { factorial( 15 ); return 0; } ``` ``` 1 = 1! = 1 2 = 2! = 2x1 6 = 3! = 3x2x1 24 = 4! = 4x3x2x1 120 = 5! = 5x4x3x2x1 720 = 6! = 6x5x4x3x2x1 5040 = 7! = 7x6x5x4x3x2x1 40320 = 8! = 8x7x6x5x4x3x2x1 362880 = 9! = 9x8x7x6x5x4x3x2x1 3628800 = 10! = 10x9x8x7x6x5x4x3x2x1 39916800 = 11! = 11x10x9x8x7x6x5x4x3x2x1 479001600 = 12! = 12x11x10x9x8x7x6x5x4x3x2x1 6227020800 = 13! = 13x12x11x10x9x8x7x6x5x4x3x2x1 87178291200 = 14! = 14x13x12x11x10x9x8x7x6x5x4x3x2x1 1307674368000 = 15! = 15x14x13x12x11x10x9x8x7x6x5x4x3x2x1 ``` (If you blur your eyes and look at that result, you begin to see "the rabbit hole". Odd to realise the 'bottom' of the recursion is the 'top' of that .) And, once things are , there's no end to the variations... ``` #include <stdio.h> double factorial( int n ) { return ( n == 1 ) ? 1.0 : n * factorial( n - 1 ); } int main() { for( int n = 16; n; n-- ) { printf( "%14.0lf = %2d! = ", factorial( n ), n ); char *pref = ""; for( int x = 1; x <= n; x++ ) printf( "%s%d", pref, x ), pref = "x"; puts( "" ); } return 0; } ``` ``` 20922789888000 = 16! = 1x2x3x4x5x6x7x8x9x10x11x12x13x14x15x16 1307674368000 = 15! = 1x2x3x4x5x6x7x8x9x10x11x12x13x14x15 87178291200 = 14! = 1x2x3x4x5x6x7x8x9x10x11x12x13x14 6227020800 = 13! = 1x2x3x4x5x6x7x8x9x10x11x12x13 479001600 = 12! = 1x2x3x4x5x6x7x8x9x10x11x12 39916800 = 11! = 1x2x3x4x5x6x7x8x9x10x11 3628800 = 10! = 1x2x3x4x5x6x7x8x9x10 362880 = 9! = 1x2x3x4x5x6x7x8x9 40320 = 8! = 1x2x3x4x5x6x7x8 5040 = 7! = 1x2x3x4x5x6x7 720 = 6! = 1x2x3x4x5x6 120 = 5! = 1x2x3x4x5 24 = 4! = 1x2x3x4 6 = 3! = 1x2x3 2 = 2! = 1x2 1 = 1! = 1 ``` This last example is "wasteful" as it recalculates the result for diminishing values of 'n'. But, it's good to explore alternatives and variations. This last version could be "built into" a that, for a limited range of integers, simply calculates "n!", returning a single result for display. The printing functionality could be condensed somewhat, too... ``` int main() { for( int n = 1; n <= 17; n++ ) { printf( "%15.0lf = %2d! = ", factorial( n ), n ); for( int x = 1; x <= n; x++ ) printf( "%d%c", x, "x\n"[x==n] ); } return 0; } ``` It was suggested that one (or more?) websites and certain would be the for finding factorials of larger numbers. Some time ago, I wrote code to generate the nth Fibonacci value. Making absolutely NO claim to the efficiency of this implementation, the alterations to that (shown below) do a reasonable job of finding the factorial for smaller values, and, with patience, this could be extended to run as far as one has time and patience to explore. (It uses a crude form of and, believe it or not, . I'm not proud...) ``` const int targ = 70; // 70! int main() { const int nDigits = 120; // 200 enough? uint8_t f[ nDigits ] = { 0 }; uint8_t a[ nDigits ] = { 0 }; int soFar = nDigits - 1, n, i; f[ soFar ] = 1; for( n = 1; n <= targ /*&& getchar()*/; n++ ) { int carry, itCnt = 0; for( ; itCnt < n; itCnt++ ) { carry = 0; for( int i = nDigits - 1; i >= soFar || carry; i-- ) { a[i] += f[i] + carry; a[i] -= "\000\012"[ carry = (a[i] >= 10) ]; // either 0or10 (octal 012) soFar -= ( i == soFar && carry ); // extend? } } for( i = 0; i < soFar; i++ ) putchar( ' ' ); for( i = soFar; i < nDigits; i++ ) { putchar( '0' + (f[i] = a[i]) ); a[i] = 0; } printf( " = %2d!\n", n ); } return 0; } ``` ``` 1 = 1! 2 = 2! 6 = 3! 24 = 4! 120 = 5! 720 = 6! 5040 = 7! 40320 = 8! 362880 = 9! /* omitted for brevity */ 20922789888000 = 16! 355687428096000 = 17! 6402373705728000 = 18! 121645100408832000 = 19! 2432902008176640000 = 20! /* omitted for brevity */ 8683317618811886495518194401280000000 = 33! 295232799039604140847618609643520000000 = 34! 10333147966386144929666651337523200000000 = 35! 371993326789901217467999448150835200000000 = 36! 13763753091226345046315979581580902400000000 = 37! /* omitted for brevity */ 230843697339241380472092742683027581083278564571807941132288000000000000 = 54! 12696403353658275925965100847566516959580321051449436762275840000000000000 = 55! 710998587804863451854045647463724949736497978881168458687447040000000000000 = 56! 40526919504877216755680601905432322134980384796226602145184481280000000000000 = 57! 2350561331282878571829474910515074683828862318181142924420699914240000000000000 = 58! /* omitted for brevity */ ```
null
CC BY-SA 4.0
null
2022-09-29T21:45:15.737
2022-09-30T10:36:00.467
2022-09-30T10:36:00.467
17,592,432
17,592,432
null
73,902,020
2
null
73,901,765
0
null
You can also add a line add the bottom of each item with css: `border-bottom: 1px solid grey;`
null
CC BY-SA 4.0
null
2022-09-29T21:54:37.563
2022-09-29T21:54:37.563
null
null
5,007,447
null
73,902,250
2
null
73,086,471
2
null
UPDATE: I didn't really find a way to achieve anything with an `.. autofunction` directive, however I made a decorator that marks functions/classes that are to be documented and I made a script that generates auto directives for the functions/classes. One of the things the script also supports is parsing numpy styled docstrings and converts them into rst field lists and then creates a `.. function:: name(params) -> return type` directive. Not exactly ideal but feel free to modify it. Script: [https://gist.github.com/davidhozic/6933a07b4ab9fa9c4d3e297eb5daa36e](https://gist.github.com/davidhozic/6933a07b4ab9fa9c4d3e297eb5daa36e) Decorator: [https://gist.github.com/davidhozic/bb954c2812dda2661f7ade24d5ba6dda](https://gist.github.com/davidhozic/bb954c2812dda2661f7ade24d5ba6dda) Example decorator usage: ``` @overload @misc.doc_category("Shilling list modification", True) # <----- The decorator async def add_object(obj: Union[guild.USER, guild.GUILD]) -> None: """ Adds a guild or an user to the daf. Parameters ----------- obj: Union[guild.USER, guild.GUILD] The guild object to add into the daf. Raises ---------- ValueError The guild/user is already added to the daf. TypeError The object provided is not supported for addition. TypeError Invalid parameter type. Other Raised in the obj.initialize() method """ ... ``` Script output: ``` ---------------------------- Shilling list modification ---------------------------- add_object ======================== .. function:: daf.core.add_object(obj: typing.Union[daf.guild.USER, daf.guild.GUILD]) -> None Adds a guild or an user to the daf. :Parameters: - obj: Union[guild.USER, guild.GUILD] The guild object to add into the daf. :Raises: - ValueError The guild/user is already added to the daf. - TypeError The object provided is not supported for addition. - TypeError Invalid parameter type. - Other Raised in the obj.initialize() method ```
null
CC BY-SA 4.0
null
2022-09-29T22:25:45.647
2022-09-29T22:25:45.647
null
null
17,059,396
null
73,902,440
2
null
73,901,827
0
null
Since your dataframe has no specific label, Pandas input an int-based column title for you. So, you can just refer to the column as `movies[2]` For example, here's a dataframe without a specific column label. ``` import numpy as np import pandas as pd rng = np.random.default_rng(seed=0) test_size = (5, 2) df1 = pd.DataFrame(rng.random(test_size)) 0 1 0 0.636962 0.269787 1 0.040974 0.016528 2 0.813270 0.912756 3 0.606636 0.729497 4 0.543625 0.935072 ``` You can see the dataframe is automatically given 0 and 1 since I did not give any column labels. Such column labels are in type `int`. ``` df1[0] 0 0.636962 1 0.040974 2 0.813270 3 0.606636 4 0.543625 Name: 0, dtype: float64 ```
null
CC BY-SA 4.0
null
2022-09-29T22:55:57.787
2022-09-29T22:55:57.787
null
null
null
null
73,903,331
2
null
15,896,135
0
null
If you want to automatically update the value of the other form when you click the button from another one you can use timer control. Just set the timer to 0.5s in order to update the form fast
null
CC BY-SA 4.0
null
2022-09-30T02:12:13.843
2022-09-30T02:12:13.843
null
null
20,125,973
null
73,903,450
2
null
57,517,803
0
null
This is by far the most simplest and stable approach I've found. You can hide both navigation title and back button by hiding the whole toolbar. You can show also choose to show it in any view you wish to. You can hide it by using `.toolbar(.hidden)` and make it visible by using the `.toolbar(.visible)` modifier. iOS 16+ ``` struct ContentView: View { var body: some View { NavigationStack { List { ForEach(0..<10) { i in NavigationLink { Text("Detail for Row \(i)") } label: { Text("Row \(i)") } } } .toolbar(.hidden) } } } ``` If you targeting below iOS 16, you can replace the `NavigationStack` with `NavigationView`.
null
CC BY-SA 4.0
null
2022-09-30T02:36:02.150
2022-09-30T02:36:02.150
null
null
17,708,926
null
73,903,535
2
null
11,699,990
0
null
``` Dim btn as Button btn=Me.Master.FindControl("ContentPlaceHolder1").FindControl("btn_login")) ```
null
CC BY-SA 4.0
null
2022-09-30T02:51:44.133
2022-09-30T02:51:44.133
null
null
3,904,972
null
73,903,565
2
null
73,902,945
0
null
Can you please change the code in your `HolderQna` to: ``` class HolderQna extends RecyclerView.ViewHolder{ /*holds views of recyclerview*/ private TextView titleTextView, ContentTextView; public HolderQna(@NonNull View itemView) { super(itemView); titleTextView = itemView.findViewById(R.id.item_post_title); ContentTextView = itemView.findViewById(R.id.item_post_content); } public void bind(qna: ModelQna){ titleTextView.setText(qna.qnaTitle); ContentTextView.setText(qna.qnaContent); holder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { //handle item clicks, show item details } }); holder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { //handle item clicks, show item details } }); } } ``` And your `onBindViewHolder` override of the `AdapterQna` to: ``` @Override public void onBindViewHolder(@NonNull HolderQna holder, int position) { ModelQna modelQna = qnaList.get(position); String id = modelQna.getQnaId(); String uid = modelQna.getUid(); String qnaContent = modelQna.getQnaContent(); String qnaTitle = modelQna.getQnaTitle(); String timestamp = modelQna.getTimestamp(); //set data holder.bind(modelQna); } ``` Finally change your `loadQna()` function declaration as follows: ``` private void loadAllQna() { qnaList = new ArrayList<>(); //get all products DatabaseReference reference = FirebaseDatabase.getInstance().getReference("Employees"); reference.child(firebaseAuth.getUid()).child("Qna").addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot snapshot) { //before getting reset List qnaList.clear(); for (DataSnapshot dataSnapshot : snapshot.getChildren()){ ModelQna modelQna = dataSnapshot.getValue(ModelQna.class); qnaList.add(modelQna); } adapterQna = new AdapterQna(this, qnaList); qnaRv.setAdapter(adapterQna); } @Override public void onCancelled(@NonNull DatabaseError databaseerror) { Log.e("QnaActivity", databaseError.toString()); } }); } ```
null
CC BY-SA 4.0
null
2022-09-30T02:56:57.847
2022-09-30T02:56:57.847
null
null
3,283,350
null
73,903,802
2
null
73,356,955
0
null
I'm amending your example to accommodate the edge case where IDs ABC and XYZ have the same maximum sales: [](https://i.stack.imgur.com/L9LSp.png) Enter the following formula in `F2` and copy down: `=XLOOKUP($E2&MAXIFS($C$2:$C$8,$A$2:$A$8,$E2),$A$2:$A$8&$C$2:$C$8,$B$2:$B$8)` Alternatively, find the product for each ID simultaneously with this dynamic array formula: `=XLOOKUP(E2:E3&MAXIFS(C2:C8,A2:A8,E2:E3),A2:A8&C2:C8,B2:B8)` With older versions of Excel, instead type `=INDEX(B2:B8,MATCH(E20&MAX(C2:C8*(A2:A8=E2)),A2:A8&C2:C8,0))` and hit `Ctrl-Shift-Enter` instead of `Enter`. Now consider the edge case where a few products for a particular ID are tied for maximum sales. The above formulas return whichever product is listed first. The following dynamic array formula returns them all: `=FILTER(B2:B8,(A2:A8=E2)*C2:C8=MAXIFS(C2:C8,A2:A8,E2))` [](https://i.stack.imgur.com/tJ8G5.png)
null
CC BY-SA 4.0
null
2022-09-30T03:43:42.340
2022-09-30T03:43:42.340
null
null
5,713,305
null
73,903,948
2
null
59,359,730
1
null
In your case, you can simply use markdown in Text: ``` Text(try! AttributedString(markdown: "Please, agree to our [Terms and Conditions](https://apple.com).")) ``` This is the result: [](https://i.stack.imgur.com/KC8IP.png)
null
CC BY-SA 4.0
null
2022-09-30T04:12:45.357
2022-09-30T04:12:45.357
null
null
10,891,581
null
73,904,228
2
null
73,889,954
0
null
Creating dynamically by passing the parameters. [](https://i.stack.imgur.com/hSjkW.png) Parameters were provided while creating the linked service to pass dynamically. [](https://i.stack.imgur.com/SWVzz.png) Creating new Dataset with linked service which we created dynamically. [](https://i.stack.imgur.com/f5gC6.png) Needed values for the parameters to load the tables while creating the [](https://i.stack.imgur.com/56B1i.png) Result with expected dataset created dynamically. [](https://i.stack.imgur.com/ZKFl0.png) We can also use dynamic content for tables in the dataset by providing parameters. [](https://i.stack.imgur.com/LK7Ct.png) [](https://i.stack.imgur.com/ykiaX.png)
null
CC BY-SA 4.0
null
2022-09-30T05:02:50.607
2022-09-30T05:08:45.240
2022-09-30T05:08:45.240
15,969,981
19,993,161
null
73,904,510
2
null
6,057,239
0
null
In my projects i copy the font from the main dialog. But the main dialog must be built by the Dialog Editor. ``` #include <windowsx.h> // for Get/SetWindowFont() SetWindowFont(editHwnd, GetWindowFont(mainDlgHwnd), true); ```
null
CC BY-SA 4.0
null
2022-09-30T05:50:55.153
2022-09-30T05:50:55.153
null
null
9,617,150
null
73,904,523
2
null
73,904,441
0
null
please go to your google console -> select your App -> in the left side bar under policy(at the bottom) -> click on App content -> then click on privacy policy and enter your url. If above solution not work then check your data sefty options.
null
CC BY-SA 4.0
null
2022-09-30T05:53:09.603
2022-09-30T05:53:09.603
null
null
11,135,366
null
73,904,663
2
null
73,890,836
0
null
I found the solution: rollback pip to an older version: python -m pip install pip==18.1 install desired module: pip install pyautogui update pip: python -m pip install --upgrade pip P.S. this solution works for other modules too. This was answered by Michael Chon in other post.
null
CC BY-SA 4.0
null
2022-09-30T06:14:01.030
2022-09-30T06:14:01.030
null
null
19,961,869
null
73,905,069
2
null
57,227,321
0
null
If the size of the item is known, it can be achieved in this way: ``` const itemCount = 10; const itemSize = 100.0; LayoutBuilder( builder: (context, c) { const spacing = 0.0; final columnCount = ((c.maxWidth + spacing) / (itemSize + spacing)).floor(); final rowCount = (itemCount / columnCount).ceil(); final maxLength = columnCount * rowCount; return Wrap( spacing: spacing, children: List.generate( math.max(itemCount, maxLength), (index) => index < itemCount ? _buildItem(context, index) : const SizedBox(width: itemSize, height: itemSize), ), ); }, ); ```
null
CC BY-SA 4.0
null
2022-09-30T07:00:38.060
2022-09-30T07:00:38.060
null
null
3,673,440
null
73,905,404
2
null
73,867,030
0
null
How to concatenate rows of the same column in PostgreSQL? Given that you want to concatenate rows of the same column, and not different columns (which is what you do when using CONCAT_WS()), what you would really be looking for is to use the ARRAY_AGG aggregation function within the ARRAY_TO_STRING function. Documentation: [https://www.postgresql.org/docs/13/functions-array.html](https://www.postgresql.org/docs/13/functions-array.html) solution: SELECT a.asset_id, ARRAY_TO_STRING(ARRAY_AGG(a.tag_id), ',') AS etiqueta FROM public.asset_tag AS a GROUP BY a.asset_id; Result: on asset_id 1 | 1,3,5 tag_id on asset_id 6 | 1,2 tag_id If you insert this: CREATE TABLE asset_tag ( asset_id INT,tag_id INT); INSERT INTO asset_tag VALUES (1,1); INSERT INTO asset_tag VALUES (1,3); INSERT INTO asset_tag VALUES (1,5); INSERT INTO asset_tag VALUES (6,1); INSERT INTO asset_tag VALUES (6,2); thanks to the person who gave me this answer .
null
CC BY-SA 4.0
null
2022-09-30T07:32:21.893
2022-09-30T07:32:21.893
null
null
20,100,117
null
73,906,307
2
null
25,743,994
0
null
I was getting similar error: `SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data"`. It turns out I was sending data from the backend in JSON format already, so when it arrives on the front-end, I shouldn't use `JSON.parse` at all: ``` $.ajax({ type: "get", url: 'https://localhost:8080/?id='+id, success: function (response) { // <- response is already JSON var data = $.parseJSON(response); // <- I removed this line modalShow(data); // <- modalShow(response) now works! } }); ```
null
CC BY-SA 4.0
null
2022-09-30T09:00:59.073
2022-09-30T09:00:59.073
null
null
9,698,467
null
73,906,951
2
null
73,902,945
0
null
As far as I can see in your screenshot, the `Qna` node it's not nested under any UID, but directly under the `Employees` node. So when you attach a listener to the following node: ``` DatabaseReference reference = FirebaseDatabase.getInstance().getReference("Employees"); reference.child(firebaseAuth.getUid()).child("Qna").addValueEventListener(/*...*/); ``` You will not be able to get any results, because such a reference doesn't exist. To solve this, you either create a reference that points exactly to "Qna": ``` DatabaseReference db = FirebaseDatabase.getInstance().getReference(); DatabaseReference qnaRef = db.child("Employees").child("Qna"); qnaRef.addValueEventListener(/*...*/); ``` Or you [move](https://stackoverflow.com/questions/50147779/how-to-copy-a-record-from-a-location-to-another-in-firebase-realtime-database) the "Qna" node under the UID of the user, and leave the code unchanged. Besides that, there is also another problem. The name of the fields in your `ModelFaq` class are different than the name of the properties in your database. You have in your `ModelFaq` class four fields called `faqId`, `faqTitle`, `faqContent`, `faqCategory`, all starting with while in the database I see that the names are different, `qnaId`, `qnaTitle`, `qnaContent`, `qnaCategory`, all are starting wiht , and this is correct. So in order to be able to map a node into an object of type `ModelFaq`, the names match. The only two fields that match are the `timestamp` and the `uid`. In this case, you have two solutions. The first one would to change the name of your fieds in the `ModelFaq` class according to what it already exists in the database or you can use the [PropertyName](https://%5BPropertyName%5D(https://firebase.google.com/docs/reference/android/com/google/firebase/database/PropertyName)) annotation in front of the getters like this: ``` @PropertyName("qnaId") public String getFaqId() { return faqId; } ```
null
CC BY-SA 4.0
null
2022-09-30T09:54:20.360
2022-09-30T09:54:20.360
null
null
5,246,885
null
73,907,134
2
null
73,907,030
0
null
If you are talking about html knit output from a .Rmd document, the way to increase the display panel for the plot is to edit the parameter of the block of r code. For example: ``` > ```{r, fig.height=10, fig.width=6} > p1/ p2 / p3 / p4 / p5 / p6 > ``` ```
null
CC BY-SA 4.0
null
2022-09-30T10:10:32.350
2022-09-30T10:10:32.350
null
null
12,494,453
null
73,907,146
2
null
72,329,519
0
null
This is what I do: 1. Set up the Google cloud storage bucket to the naked domain / non-www domain e.g. example.com 2. Then use Cloudflare to set up CNAME at the naked domain to c.storage.googleapis.com which has CNAME flattening by default. 3. Then add an A record to the 'www' subdomain to a private address such as '192.0.2.1' 4. Then add a Cloudflare rule in 'Rules' that is a Forwarding URL with status code '301 - Permanent Redirect' from www.example.com/* to https://example.com/$1 This means only 1 bucket to the naked domain and if anyone tries to go to [www.example.com](http://www.example.com) it will rewrite to [https://example.com](https://example.com). So always HTTPS as well, works great.
null
CC BY-SA 4.0
null
2022-09-30T10:11:37.830
2022-09-30T10:13:15.507
2022-09-30T10:13:15.507
8,024,379
8,024,379
null
73,907,322
2
null
36,685,745
0
null
In the recent versions of Chart JS, you can use Box Annotation. You can read more about it here: [https://www.chartjs.org/chartjs-plugin-annotation/latest/guide/types/box.html](https://www.chartjs.org/chartjs-plugin-annotation/latest/guide/types/box.html)
null
CC BY-SA 4.0
null
2022-09-30T10:26:32.683
2022-09-30T10:26:32.683
null
null
9,543,932
null
73,907,816
2
null
73,907,323
1
null
You will observe that the browser resets between domains. Cypress completely restarts the test runner browser when you give it a new domain in the second test, and all local variables such as `username` are re-initialized. To preserve the same value, you could use a task such as [here](https://stackoverflow.com/a/73904145/16997707) - be careful about passing the parameters, in that question the code was used incorrectly. The reason why a task works is that only the browser is reset between domains, not the background Node process. Or you could save it to a fixture file as per this answer [Visiting two different websites and storing value in variable](https://stackoverflow.com/a/73887582/16997707).
null
CC BY-SA 4.0
null
2022-09-30T11:09:03.950
2022-09-30T11:09:03.950
null
null
16,997,707
null
73,908,359
2
null
73,906,765
0
null
Change `entry` to `["babel-polyfill", path.join(__dirname, "index.web.js")]` And `publicPath` in `output` to `process.env.ROUTE_PREFIX || ""` i,e ``` entry: ["babel-polyfill", path.join(__dirname, "index.web.js")] output: { path: path.resolve(appDirectory, 'dist'), publicPath: process.env.ROUTE_PREFIX || "", filename: 'rnw_blogpost.bundle.js', } ```
null
CC BY-SA 4.0
null
2022-09-30T11:54:42.247
2022-09-30T11:54:42.247
null
null
6,890,414
null
73,908,553
2
null
13,817,521
1
null
In xml use this ``` android:inputType="numberPassword" ``` Then use this in code ``` mobileET.setTransformationMethod(HideReturnsTransformationMethod.getInstance()); ```
null
CC BY-SA 4.0
null
2022-09-30T12:10:50.840
2022-09-30T12:10:50.840
null
null
5,350,149
null
73,908,728
2
null
69,393,706
0
null
### In your CSS ``` --scrollbarBG: red; --thumbBG: blue; body::-webkit-scrollbar { width: 11px; } body { scrollbar-width: thin; scrollbar-color: var(--thumbBG) var(--scrollbarBG); } body::-webkit-scrollbar-track { background: var(--scrollbarBG); } body::-webkit-scrollbar-thumb { background-color: var(--thumbBG); border-radius: 6px; border: 3px solid var(--scrollbarBG); } ```
null
CC BY-SA 4.0
null
2022-09-30T12:24:26.253
2022-09-30T12:24:26.253
null
null
12,490,386
null
73,908,761
2
null
23,601,026
0
null
If this is your uuid `00008030001059D93E2BC04R` add `-` after 8th character `00008030-001059D93E2BC04R`
null
CC BY-SA 4.0
null
2022-09-30T12:26:31.913
2022-09-30T12:26:31.913
null
null
5,197,712
null
73,909,285
2
null
73,817,482
0
null
Most Microsoft test Execution Engines including MSTest have a default pattern they use to discovery test Assemblies which is `**\$(BuildConfiguration)\*.test*.dll;-:**\obj\**` Since you are not showing the Files copied I'll have to assume that you might not have any dlls that match these patterns To ovverride this behaviour you'll need to ensure you are using the version 2.x of the Test Execution Task and Update the Test Files Glob Patterns [](https://i.stack.imgur.com/SbS0X.png)
null
CC BY-SA 4.0
null
2022-09-30T13:08:10.583
2022-09-30T13:08:10.583
null
null
1,163,755
null
73,909,499
2
null
73,901,531
0
null
1. Don't use flexbox and floats together. 2. Don't use floats at all, except to wrap text around images. They're not for structural layout, just for content layout. 3. Don't introduce table row layout here (unless you actually have tabular data). 4. Don't use rows and explicit flex layout. Bootstrap 5 rows already have flexbox applied, but they require containers and columns, which you apparently don't need here, having only one column per row. You could apply the same principles to grid rows, though. 5. justify-content aligns content along the primary flex axis, not align-items. 6. Bootstrap provides border classes which you can use to remove border. Custom styles should be put on custom classes anyway, not in the markup. ``` <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" integrity="sha512-xh6O/CkQoPOWDdYTDqeRdPCVd1SpvCA9XXcUnZS2FmJNp1coAFzvtCN9BmamE+4aHK8yyUHUSCcJHgXloTyT2A==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <div class="d-flex flex-column justify-content-center mt-1 py-2 bg-secondary"> <div class="text-center"> <button type="submit" class="btn btn-primary searchbtn emailRemoveBtn" name="command" value="Delete email @i"> <i class="fa-solid fa-xmark sm"></i> <span aria-hidden="true"></span> </button> <input readonly class="align-self-center border-0" /> </div> </div> <div class="d-flex flex-column justify-content-center mt-1 py-2 bg-secondary"> <div class="text-center"> <button type="submit" class="btn btn-primary searchbtn emailRemoveBtn" name="command" value="Delete email @i"> <i class="fa-solid fa-xmark sm"></i> <span aria-hidden="true"></span> </button> <input readonly class="align-self-center border-0" /> </div> </div> ```
null
CC BY-SA 4.0
null
2022-09-30T13:26:41.317
2022-09-30T13:43:56.017
2022-09-30T13:43:56.017
1,264,804
1,264,804
null
73,910,007
2
null
30,743,408
1
null
I've made some improvement on [Lex's example](https://stackoverflow.com/a/66656999/1251846). I put some extra controls to solve double-trigger problem and also added notification support to listen status changes. The controls that I've added to prevent the double-trigger problem, also show which connection source is using primarily by the device to internet access. For example, even if the device is connected to both cellular and Wi-Fi at the same time, the "status" returns as "connectedViaWiFi" to indicating that the current internet access is over Wi-Fi. ``` import Foundation import Network class Reachability { enum StatusFlag { case unknow case noConnection case connectedViaWiFi case connectedViaCellular } static let connectionStatusHasChangedNotification = NSNotification.Name("Reachability.connectionStatusHasChangedNotification") static let shared = Reachability() private var monitorForWifi: NWPathMonitor? private var monitorForCellular: NWPathMonitor? private var wifiStatus: NWPath.Status = .requiresConnection private var cellularStatus: NWPath.Status = .requiresConnection private var ignoreInitialWiFiStatusUpdate: Bool = true private var ignoreInitialCelluluarStatusUpdate: Bool = true private var isReachableOnCellular: Bool { cellularStatus == .satisfied } private var isReachableOnWiFi: Bool { wifiStatus == .satisfied } var status: StatusFlag = .unknow { didSet { guard status != oldValue else { return } DispatchQueue.main.async { [weak self] in NotificationCenter.default.post(name: Self.connectionStatusHasChangedNotification, object: self?.status) } } } func startMonitoring() { monitorForWifi = NWPathMonitor(requiredInterfaceType: .wifi) monitorForWifi?.pathUpdateHandler = { [weak self] path in self?.wifiStatus = path.status self?.ignoreInitialWiFiStatusUpdate = false self?.updateStatus() } monitorForCellular = NWPathMonitor(requiredInterfaceType: .cellular) monitorForCellular?.pathUpdateHandler = { [weak self] path in self?.cellularStatus = path.status self?.ignoreInitialCelluluarStatusUpdate = false self?.updateStatus() } let queue = DispatchQueue.global(qos: .background) monitorForCellular?.start(queue: queue) monitorForWifi?.start(queue: queue) } func stopMonitoring() { monitorForWifi?.cancel() monitorForWifi = nil monitorForCellular?.cancel() monitorForCellular = nil wifiStatus = .requiresConnection cellularStatus = .requiresConnection status = .unknow ignoreInitialWiFiStatusUpdate = true ignoreInitialCelluluarStatusUpdate = true } private func updateStatus() { if ignoreInitialWiFiStatusUpdate || ignoreInitialCelluluarStatusUpdate { return } if !(isReachableOnCellular && isReachableOnWiFi) { if isReachableOnCellular && !isReachableOnWiFi { status = .connectedViaCellular } else if isReachableOnWiFi && !isReachableOnCellular { status = .connectedViaWiFi } else { status = .noConnection } } else { status = .connectedViaWiFi } } static func isConnectedToNetwork() -> Bool { return shared.isReachableOnCellular || shared.isReachableOnWiFi } } ``` Sample usage ``` override func viewDidLoad() { super.viewDidLoad() NotificationCenter.default.addObserver(self, selector: #selector(reachabilityChanged(_:)), name: Reachability.connectionStatusHasChangedNotification, object: nil) Reachability.shared.startMonitoring() } @objc func reachabilityChanged(_ sender: Notification) { guard let statusFlag = sender.object as? Reachability.StatusFlag else { return } print("TEST -> statusFlag: \(statusFlag)") } ```
null
CC BY-SA 4.0
null
2022-09-30T14:06:43.843
2022-09-30T14:16:56.080
2022-09-30T14:16:56.080
1,251,846
1,251,846
null
73,910,037
2
null
31,224,206
1
null
My theory is its memory related. I regularly hit around 85-90% RAM usage after opening several copies of VS 2019 - it doesn't seem to happen if I just have 1 or 2 copies open. I can be doing nothing and suddenly all my System and System.IO references will get red squiggly lines and intellisense fails to recognise them (though the project builds fine). The only thing that works (until it happens again) is quitting and restarting Visual Studio. Have tried all these which do not work: Unload/reload project Close/reopen solution Wipe bin/obj folders NuGet package cache clear (its not a NuGet package so not sure why this would do anything)
null
CC BY-SA 4.0
null
2022-09-30T14:08:44.353
2022-09-30T14:08:44.353
null
null
1,180,462
null
73,910,087
2
null
58,619,968
0
null
I was only capable of solving this issue for myself by overwriting the default wp_die_handler. This creates a lot of redundant code if you only want to change the title but, on a broader scope, gives you the opportunity to redesign this whole error page. If anyone finds a smoother way, hit me up. 1. Overwrite the callback ``` add_filter( 'wp_die_handler', 'custom_die_callback', 10 ); function custom_die_callback($callback){ return "custom_die_handler"; } ``` 1. Create the handler and enter your title. ``` if( ! function_exists('custom_die_handler') ){ function custom_die_handler( $message, $title = '', $args = array() ) list( $message, $title, $parsed_args ) = _wp_die_process_input( $message, $title, $args ); $title = "CUSTOM_TITLE"; if ( is_string( $message ) ) { if ( ! empty( $parsed_args['additional_errors'] ) ) { $message = array_merge( array( $message ), wp_list_pluck( $parsed_args['additional_errors'], 'message' ) ); $message = "<ul>\n\t\t<li>" . implode( "</li>\n\t\t<li>", $message ) . "</li>\n\t</ul>"; } $message = sprintf( '<div class="wp-die-message">%s</div>', $message ); } $have_gettext = function_exists( '__' ); if ( ! empty( $parsed_args['link_url'] ) && ! empty( $parsed_args['link_text'] ) ) { $link_url = $parsed_args['link_url']; if ( function_exists( 'esc_url' ) ) { $link_url = esc_url( $link_url ); } $link_text = $parsed_args['link_text']; $message .= "\n<p><a href='{$link_url}'>{$link_text}</a></p>"; } if ( isset( $parsed_args['back_link'] ) && $parsed_args['back_link'] ) { $back_text = $have_gettext ? __( '&laquo; Back' ) : '&laquo; Back'; $message .= "\n<p><a href='javascript:history.back()'>$back_text</a></p>"; } if ( ! did_action( 'admin_head' ) ) : if ( ! headers_sent() ) { header( "Content-Type: text/html; charset={$parsed_args['charset']}" ); status_header( $parsed_args['response'] ); nocache_headers(); } $text_direction = $parsed_args['text_direction']; $dir_attr = "dir='$text_direction'"; // If `text_direction` was not explicitly passed, // use get_language_attributes() if available. if ( empty( $args['text_direction'] ) && function_exists( 'language_attributes' ) && function_exists( 'is_rtl' ) ) { $dir_attr = get_language_attributes(); } ?> <!DOCTYPE html> <html <?php echo $dir_attr; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $parsed_args['charset']; ?>" /> <meta name="viewport" content="width=device-width"> <?php if ( function_exists( 'wp_robots' ) && function_exists( 'wp_robots_no_robots' ) && function_exists( 'add_filter' ) ) { add_filter( 'wp_robots', 'wp_robots_no_robots' ); wp_robots(); } ?> <title><?php echo $title; ?></title> <style type="text/css"> html { background: #f1f1f1; } body { background: #fff; border: 1px solid #ccd0d4; color: #444; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; margin: 2em auto; padding: 1em 2em; max-width: 700px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .04); box-shadow: 0 1px 1px rgba(0, 0, 0, .04); } h1 { border-bottom: 1px solid #dadada; clear: both; color: #666; font-size: 24px; margin: 30px 0 0 0; padding: 0; padding-bottom: 7px; } #error-page { margin-top: 50px; } #error-page p, #error-page .wp-die-message { font-size: 14px; line-height: 1.5; margin: 25px 0 20px; } #error-page code { font-family: Consolas, Monaco, monospace; } ul li { margin-bottom: 10px; font-size: 14px ; } a { color: #0073aa; } a:hover, a:active { color: #006799; } a:focus { color: #124964; -webkit-box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8); box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8); outline: none; } .button { background: #f3f5f6; border: 1px solid #016087; color: #016087; display: inline-block; text-decoration: none; font-size: 13px; line-height: 2; height: 28px; margin: 0; padding: 0 10px 1px; cursor: pointer; -webkit-border-radius: 3px; -webkit-appearance: none; border-radius: 3px; white-space: nowrap; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; vertical-align: top; } .button.button-large { line-height: 2.30769231; min-height: 32px; padding: 0 12px; } .button:hover, .button:focus { background: #f1f1f1; } .button:focus { background: #f3f5f6; border-color: #007cba; -webkit-box-shadow: 0 0 0 1px #007cba; box-shadow: 0 0 0 1px #007cba; color: #016087; outline: 2px solid transparent; outline-offset: 0; } .button:active { background: #f3f5f6; border-color: #7e8993; -webkit-box-shadow: none; box-shadow: none; } <?php if ( 'rtl' === $text_direction ) { echo 'body { font-family: Tahoma, Arial; }'; } ?> </style> </head> <body id="error-page"> <?php endif; // ! did_action( 'admin_head' ) ?> <?php echo $message; ?> </body> </html> <?php if ( $parsed_args['exit'] ) { die(); } { } ```
null
CC BY-SA 4.0
null
2022-09-30T14:12:25.877
2022-09-30T14:12:25.877
null
null
10,760,581
null
73,910,340
2
null
73,910,324
2
null
You need to replace the `span` with an `img` tag: From this: ``` <span>{props.image}</span> ``` To this: ``` <img src={props.image} /> ``` And the [alt attribute](https://help.siteimprove.com/support/solutions/articles/80000863904-accessibility-image-alt-text-best-practices) whenever dealing with images. It's crucial for accessibility and UX.
null
CC BY-SA 4.0
null
2022-09-30T14:34:05.167
2022-10-13T14:54:03.500
2022-10-13T14:54:03.500
4,861,760
4,861,760
null
73,910,346
2
null
73,910,324
1
null
Use the `<img>` tag inside `NaviIcon`. ``` <img src={props.image}/> ```
null
CC BY-SA 4.0
null
2022-09-30T14:34:30.330
2022-09-30T14:34:30.330
null
null
9,513,184
null
73,910,485
2
null
63,160,610
0
null
I had the same issue with me for some time.It was a issue with the proxy i used before. Solution: Goto Environment Variables Settings in windows and remove the variable with the proxy address. good luck! [](https://i.stack.imgur.com/HRJZ6.png)
null
CC BY-SA 4.0
null
2022-09-30T14:46:41.127
2022-09-30T14:46:41.127
null
null
11,935,228
null
73,910,737
2
null
5,714,508
1
null
In my case I couldn't see the option to set files' Build Action to Content so I had to: 1. Right click on the folder > "Exclude From Project" 2. Right click on the folder > "Include In Project" Also, make sure that when you right click on file > Properties, the "Copy to Output Directory" is set to either "Always Copy" or "Copy When Newer".
null
CC BY-SA 4.0
null
2022-09-30T15:08:38.157
2022-09-30T15:17:25.407
2022-09-30T15:17:25.407
8,221,046
8,221,046
null
73,910,738
2
null
73,909,806
1
null
### Explanation The string contains both `\r` and `\n` characters as Windows has CRLF line endings. splitting `Hello\r\nWorld\r\n` on `\n` will give: `[ 'Hello\r', 'World\r', '' ]` Displaying `\r` without `\n` will have the effect of returning the output cursor to the beginning of the line without advancing the cursor to the line below. The next text that gets written will overwrite the characters in the output. e.g. logging the string `ABCDEFGHIJKLMNOPQRSTUVWXYZ\r?page=1` twice will look like this: ``` ?page=1HIJKLMNOPQRSTUVWXYZ ?page=1HIJKLMNOPQRSTUVWXYZ ``` That's because it writes the whole alphabet, then the `\r` goes to the beginning of the line and the remaining `?page=1` overwrites the `ABCDEFG` part of the output. I suggest using `console.log(JSON.stringify(pageUrl))` to help you diagnose such problems in the future. And be aware of platform-specific line endings. ### Solution Once you know what's happening (), your problem is best solved by [node.js: read a text file into an array. (Each line an item in the array.)](https://stackoverflow.com/questions/6831918/node-js-read-a-text-file-into-an-array-each-line-an-item-in-the-array) `text.toString().replace(/\r\n/g,'\n').split('\n')` is one of the approaches listed there.
null
CC BY-SA 4.0
null
2022-09-30T15:08:42.853
2022-09-30T15:08:42.853
null
null
1,563,833
null
73,910,759
2
null
73,910,460
0
null
I just tried your code and I looks fine to me. Instead of the pics you're using I added a background color so I can see what's going on. Honestly I experienced a few glitches while working with Bootstrap and Vscode that were resolved once I hit restart. This is what I got when I tried your code: [](https://i.stack.imgur.com/aNxFm.png) Your code + background colors: ``` <style> .project-1, .project-2, .project-3, .project-4{ margin: 5% 7%; height: 400px; } .unilever-project, .instagram-pic, .cork-airport-project,.instagram-page-cooking { width: 60%; height: 330px; } .text{ text-align: left; margin-top:10px; } </style> <div class="projects"> <div class=" row project-1"> <div class="col-lg-6"> <img src="images/Unilever.png" alt="unilever-project" class=" bg-dark unilever-project"> </div> <div class="col-lg-6 text"> <h3>Lorem ipsum dolor sit amet</h3> <p>Lorem ipsum dolor sit amet</p> </div> </div> <div class="project-2 "> <div class="row"> <div class="col-lg-6"> <img src="images/instagram-PI.jpg" alt="instagram-pic" class=" bg-warning instagram-pic"> </div> <div class="col-lg-6 text"> <h3>Lorem ipsum dolor sit amet</h3> <p>Lorem ipsum dolor sit amet </p> </div> </div> </div> <div class="project-3"> <div class="row"> <div class="col-lg-6"> <img src="images/Cork airport.jpg" alt="cork-airport-project" class="bg-primary cork-airport-project"> </div> <div class="col-lg-6 text"> <h3>Lorem ipsum dolor sit amet</h3> <p>Lorem ipsum dolor sit amet </p> </div> </div> </div> <div class="project-4"> <div class="row"> <div class=" col-lg-6"> <img src="images/cookingpage.png" alt="instagram-page-cooking" class="bg-danger instagram-page-cooking"> </div> <div class="col-lg-6 text"> <h3>Lorem ipsum dolor sit amet</h3> <p>Lorem ipsum dolor sit amet.</p> </div> </div> </div> </div> ```
null
CC BY-SA 4.0
null
2022-09-30T15:10:22.300
2022-09-30T15:10:22.300
null
null
20,029,377
null
73,911,326
2
null
69,287,395
0
null
You can decrease opacity. If you want to change background color then you will not show other text which are bottom of off canvas. `.offcanvas-backdrop.show { opacity: .0; }`
null
CC BY-SA 4.0
null
2022-09-30T16:01:50.767
2022-09-30T16:01:50.767
null
null
18,388,565
null
73,911,664
2
null
52,577,595
0
null
`floatfmt` must be a list or a tuple, specifying one format for each column. In your case, use e.g.: ``` floatfmts = ('.5f', '.5f', '.5f') print(tabulate (duomenys, headers=lentele, floatfmt=floatfmts, tablefmt="grid")) ``` (See e.g. [https://bitbucket.org/astanin/python-tabulate/issues/96/floatfmt-option-is-ignored-in-python3](https://bitbucket.org/astanin/python-tabulate/issues/96/floatfmt-option-is-ignored-in-python3))
null
CC BY-SA 4.0
null
2022-09-30T16:35:48.270
2022-09-30T16:35:48.270
null
null
1,562,596
null
73,911,687
2
null
73,911,586
2
null
When you give the input a height, its the same as if you were to just add vertical padding to it, for what your trying to achieve a textarea tag would make more sense. ``` input.too-tall { height: 143px; width: 100%; font-family: 'Roboto Mono'; background: #FFFFFF; border: 1px solid #000000; border-radius: 4px; } input.regular { width: 100%; font-family: 'Roboto Mono'; background: #FFFFFF; border: 1px solid #000000; border-radius: 4px; } textarea { height: 143px; width: 100%; font-family: 'Roboto Mono'; background: #FFFFFF; border: 1px solid #000000; border-radius: 4px; } ``` ``` <h2>Weird input area</h2> <input class="too-tall"> <br> <h2>Regular input area</h2> <input class="regular"> <br> <h2>Textarea</h2> <textarea></textarea> ```
null
CC BY-SA 4.0
null
2022-09-30T16:38:24.447
2022-09-30T16:38:24.447
null
null
19,140,003
null
73,911,699
2
null
14,691,511
1
null
Similar to @Dallas187 but doesn't break link formatting ``` fun TextView.addEllipsizeToSpannedOnLayout() { doOnNextLayout { if (maxLines != -1 && lineCount > maxLines) { val endOfLastLine = layout.getLineEnd(maxLines - 1) val spannedDropLast3Chars = text.subSequence(0, endOfLastLine - 3) as? Spanned if (spannedDropLast3Chars != null) { val spannableBuilder = SpannableStringBuilder() .append(spannedDropLast3Chars) .append("…") text = spannableBuilder } } } } ```
null
CC BY-SA 4.0
null
2022-09-30T16:39:50.603
2022-09-30T16:39:50.603
null
null
4,034,143
null
73,911,896
2
null
73,908,281
1
null
Use a `TGridPanel` in place of your image. Each panel goes into one cell of the grid, and with the column widths and row heights set as a percentage (which is the default), and both the grid and the panels in the grid having `Align` set to `alClient`, the cells, and therefore the panels, will adjust their size proportional to the entire form.
null
CC BY-SA 4.0
null
2022-09-30T17:00:48.700
2022-09-30T17:00:48.700
null
null
2,377,758
null
73,912,091
2
null
73,746,120
0
null
It shouldn't do that, both `MEMBER_KICK` and `MEMBER_BAN_ADD` are different. Do note that audit logs are not guaranteed to be generated immediately If you are still using this code, then I see 1 error. You are checking `ban.user.id` in both `MEMBER_BAN_ADD` and `MEMBER_KICK` event.
null
CC BY-SA 4.0
null
2022-09-30T17:25:23.023
2022-10-06T16:29:11.117
2022-10-06T16:29:11.117
7,986,915
15,998,582
null
73,912,232
2
null
52,678,376
0
null
You can just use to do this. Use `decoded.polygon`. It will return the polygon of the QR code. In this example, we are using this image as input: [](https://i.stack.imgur.com/ypAru.png) ``` from PIL import Image, ImageDraw from pyzbar import pyzbar # Open image with PIL img_input = Image.open('image.png').convert('RGB') # Create a draw object draw = ImageDraw.Draw(img_input) ``` Now we will use pyzbar to decode the image into QR Code, if any. And then, we'll use `decoded.polygon` to get edges coordinates of the QR code and use to draw the edges and diagonal line of the QR code: ``` # Decode the image into QR code, if any decoder = pyzbar.decode(img_input) if len(decoder) != 0: for decoded in decoder: if decoded.type == 'QRCODE': # Draw only top edge of polygon with PIL draw.line(decoded.polygon[2:4], fill = '#0F16F1', width = 5) # Draw only buttom edge of polygon with PIL draw.line(decoded.polygon[0:2], fill = '#D40FF1', width = 5) # Draw only left edge of polygon with PIL draw.line(decoded.polygon[0:4:3], fill = '#FD7A24', width = 5) # Draw only right edge of polygon with PIL draw.line(decoded.polygon[1:3], fill = '#00D4F1', width = 5) # Draw diagonal line of polygon with PIL draw.line(decoded.polygon[1:4:2], fill = '#00D354', width = 5) ``` Now we can simply save the result image with the following command: ``` img_input.save('image_and_polygon.png') ``` And the output will be: [](https://i.stack.imgur.com/6dec1.png)
null
CC BY-SA 4.0
null
2022-09-30T17:38:40.313
2022-09-30T17:38:40.313
null
null
8,233,320
null
73,912,367
2
null
73,235,135
0
null
Everything goes fine. This error `cd: can’t cd to /home/ubuntu/project/django-todo Build step ‘Execute shell’ marked build as failure Finished: FAILURE` is not an actual. Your agent Node is not online. To fix the problem, find commands on your jenkins web page after an agent setup. You need to run those commands from your terminal. See the screenshot for more details. ![](https://i.stack.imgur.com/CpUQd.png) Make sure that your jenkins public IP and node agent public IP are the same. If an error occurs, you need to run some commands on the terminal. This is not a real error.
null
CC BY-SA 4.0
null
2022-09-30T17:56:08.373
2022-10-07T20:43:06.157
2022-10-07T20:43:06.157
7,744,106
19,827,811
null
73,912,600
2
null
73,911,586
0
null
Use directly this `<textarea rows="number">` instead of CSS. For example: ``` <form> <label>Text area</label> // <input type="text"> // play with the rows in textarea field <textarea rows="10" /> </form> ``` See this live code: [https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_textarea_cols](https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_textarea_cols)
null
CC BY-SA 4.0
null
2022-09-30T18:21:42.083
2022-09-30T18:21:42.083
null
null
18,190,002
null
73,912,630
2
null
37,256,208
0
null
Don't have enough reputation to comment, but @GMKHussain's answer contains a typo, I believe. I think in the line `+ elem.value.substring(endPos, elem.value.length);` should be replaced with : `+ elem.value.substring(_endSelection, elem.value.length);`
null
CC BY-SA 4.0
null
2022-09-30T18:25:39.293
2022-09-30T18:25:39.293
null
null
462,363
null
73,912,840
2
null
73,891,858
0
null
I used laspy instead of open3d because wanted to give some colors to your image: ``` import imageio import numpy as np # first reading the image for RGB values image = imageio.imread(".../a542c.png") loading the depth file depth = np.loadtxt("/home/shaig93/Documents/internship_FWF/a542d.txt") # creating fake x, y coordinates with meshgrid xv, yv = np.meshgrid(np.arange(400), np.arange(640), indexing='ij') # save_las is a function based on laspy that was provided to me by my supervisor save_las("fn.laz", image[:400, :, 0].flatten(), np.c_[yv.flatten(), xv.flatten(), depth.flatten()], cmap = plt.cm.magma_r) ``` and the result is this. As you can see objects are visible from front. [](https://i.stack.imgur.com/mfGdD.jpg) However from side they are not easy to distinguish. [](https://i.stack.imgur.com/ECzmL.png) This means to me to think that your depth file is not that good. Another idea would be also getting rid off 0 values from your depth file so that you can get point cloud without a wall kind of structure in the front. But still does not solve depth issue of course. ps. I know this is not a proper answer but I hope it was helpful on identifying the problem.
null
CC BY-SA 4.0
null
2022-09-30T18:45:23.860
2022-09-30T18:45:23.860
null
null
13,343,354
null
73,913,251
2
null
73,913,205
0
null
For Summing you can use apply-lambda ; ``` df = pd.DataFrame({"first":[1]*14, "second":np.arange(1,15), "third":[0]*14, "forth":["one","two","three","four"]*3+["one","two"], "fifth":["hello","no","hello","hi","buy","hello","cheese","water","hi","juice","file","word","hi","red"]}) df1 = df.groupby(['fifth'])['first','second','third'].agg('sum').reset_index() df1["sum_3_Col"] = df1.apply(lambda x: x["first"] + x["second"] + x["third"],axis=1) df1.rename(columns={'second':'second2'}, inplace=True) ``` Output of df1; [](https://i.stack.imgur.com/FQYJS.png)
null
CC BY-SA 4.0
null
2022-09-30T19:30:04.857
2022-09-30T19:55:32.053
2022-09-30T19:55:32.053
20,040,720
20,040,720
null