Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
sequence
75,206,172
2
null
75,202,495
0
null
Create the dataframe: ``` df = pd.DataFrame(data=[["2023-01-01","14:00",1.0,2.0,3.0,4.0]]) 0 1 2 3 4 5 0 2023-01-01 14:00 1.00 2.00 3.00 4.00 ``` Set the index columns: ``` df = df.set_index([0,1]).rename_axis(["Date", "Time"]) 2 3 4 5 Date Time 2023-01-01 14:00 1.00 2.00 3.00 4.00 ``` Create the multi-level columns: ``` df.columns = pd.MultiIndex.from_tuples([("A", "Intro", "FIB"), ("A", "Intro", "DIB"), ("B", "Intro", "FIB"), ("B", "Intro", "DIB")], names=["Area", "Tech", ""]) Area A B Tech Intro Intro FIB DIB FIB DIB Date Time 2023-01-01 14:00 1.00 2.00 3.00 4.00 ``` Use [stack()](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.stack.html) on levels "Area" and "Tech": ``` df = df.stack(["Area","Tech"]) DIB FIB Date Time Area Tech 2023-01-01 14:00 A Intro 2.00 1.00 B Intro 4.00 3.00 ``` Reset index to create columns "Date" and "Time" and repeat their values: ``` df = df.reset_index() Date Time Area Tech DIB FIB 0 2023-01-01 14:00 A Intro 2.00 1.00 1 2023-01-01 14:00 B Intro 4.00 3.00 ```
null
CC BY-SA 4.0
null
2023-01-23T06:17:05.513
2023-01-23T06:17:05.513
null
null
2,847,330
null
75,206,312
2
null
69,094,731
0
null
Yes, that is due to em height, which gets height from the parent element font size. It is preferable to use rem or px.
null
CC BY-SA 4.0
null
2023-01-23T06:39:49.230
2023-01-23T06:39:49.230
null
null
18,446,287
null
75,206,409
2
null
74,887,100
0
null
This is not possible by any app. The only way to do it by custom coding.
null
CC BY-SA 4.0
null
2023-01-23T06:56:57.877
2023-01-23T06:56:57.877
null
null
20,838,602
null
75,206,412
2
null
21,178,193
1
null
if you wish change in runtime the saved background.. ``` TextView textView = (TextView) findViewById(R.id.text_view); if (something) { textView.setBackgroundResource(R.drawable.bg_red); } ```
null
CC BY-SA 4.0
null
2023-01-23T06:57:05.877
2023-01-23T06:58:55.003
2023-01-23T06:58:55.003
19,603,339
19,603,339
null
75,206,638
2
null
51,676,180
0
null
Swift 5 and 5+ Solution Add ``` mySegmentController.apportionsSegmentWidthsByContent = true ``` inside viewDidLoad() {}
null
CC BY-SA 4.0
null
2023-01-23T07:28:18.847
2023-01-23T07:28:18.847
null
null
11,641,861
null
75,206,856
2
null
13,028,584
1
null
I had this problem and what caused it for me was I had overflow-x: hidden inside my html selector and body selector. So I removed it from the html selector and into the body selector alone. so: ``` html, boody { height: 100%; /* <-- was not an issue and remained */ overflow-x: hidden; /* <-- remove this from html selector */ } /* to */ body { overflow-x: hidden; /* worked for me */ } ```
null
CC BY-SA 4.0
null
2023-01-23T07:58:19.697
2023-01-23T07:58:19.697
null
null
15,333,317
null
75,207,202
2
null
28,388,530
0
null
I know this is a bit old, but my issue was minification using babel - i.e. --presets minify When my js code was built and my local variables were ; when not minified I was able to see values of variables in the console.
null
CC BY-SA 4.0
null
2023-01-23T08:45:00.750
2023-01-23T08:45:00.750
null
null
926,429
null
75,207,296
2
null
75,206,787
0
null
Add an expression to the textbook. `=RowNumber("YourRowGroupNameHere")`
null
CC BY-SA 4.0
null
2023-01-23T08:57:27.747
2023-01-23T08:57:27.747
null
null
9,059,424
null
75,207,579
2
null
75,207,350
0
null
> You need to create a new Console App for creating and running C# projectsPress F5, choose Debug > Start with debugging from the Visual Studio menu, or select the green Start arrow and project name on the Visual Studio toolbar. Or, to run without debugging, press Ctrl+F5 or choose Debug > Start without debugging from the Visual Studio menu. [](https://i.stack.imgur.com/Ro4Mz.png)
null
CC BY-SA 4.0
null
2023-01-23T09:27:36.327
2023-01-23T09:27:36.327
null
null
19,499,990
null
75,207,821
2
null
75,207,636
0
null
Don't worry about that. Linux uses most of the unused memory for cache and buffers. This is a kind of optimizing. It leaves some memory free to allow fast assigning if a program needs memory. Current status: - - -
null
CC BY-SA 4.0
null
2023-01-23T09:51:09.337
2023-01-23T22:02:12.073
2023-01-23T22:02:12.073
8,783,885
8,783,885
null
75,207,868
2
null
75,206,834
0
null
``` <div style="background-color:red;max-width:50rem;height:10rem;overflow:auto;display:flex;justify-content:center; align-items:center;"> <div> <img src="https://picsum.photos/id/123/400/300.webp"> </div> <div>test</div> </div> ``` Please check the code snippet and try to run it. Try to play with the value of height and width. 1. If container width is more than the child elements, Child elements will be horizontally centered automatically because of the justify-content property. 2. If container width is less than the child width, then it will show a horizontal scrollbar because of the overflow property. 3. If container Height is more than the child element, Child elements will be vertically centered automatically because of the align-items property. 4. If container height is less than the child width, It will show a vertical scrollbar because of the overflow property. Note : 1. justify-content is not affecting the scroll ability 2. How to achieve the effect - Please see the Fiddle attached.
null
CC BY-SA 4.0
null
2023-01-23T09:55:05.817
2023-01-23T10:30:52.787
2023-01-23T10:30:52.787
14,755,664
14,755,664
null
75,208,286
2
null
75,207,635
0
null
You localised images [documentation link](https://developer.apple.com/documentation/xcode/localizing-assets-in-a-catalog). Apart from this, there's not much you can do with `UITabBarItem`.
null
CC BY-SA 4.0
null
2023-01-23T10:37:24.823
2023-01-23T10:37:24.823
null
null
4,944,020
null
75,208,370
2
null
74,991,577
0
null
for this you have to make code with condition statement and when 2 value combination match it will open your desire url try out this code ``` function Redirect(e) { e.preventDefault() var value1 =$('#selectBox1').val(); var value2 = $('#selectBox2').val(); if(value1 == "your value" && value2 == "your value"){ window.open('your url', '_blank'); } // repeate this if with your all combination of your value and chage url } ```
null
CC BY-SA 4.0
null
2023-01-23T10:44:18.320
2023-01-23T10:44:18.320
null
null
14,528,547
null
75,208,403
2
null
75,208,292
0
null
You can align the buttons within the Row by setting the mainAxisAlignment property to MainAxisAlignment.spaceBetween. This will distribute the space evenly between the two buttons, aligning them to the left and right edges of the Row. Alternatively, you can use the Expanded widget to give specific flex values to each button. For example, you can wrap the first button in an Expanded widget with a flex of 1 and the second button in an Expanded widget with a flex of 2. This will give the second button twice the amount of space as the first button. You also can use crossAxisAlignment property in the child widgets like button to align them as you wish.
null
CC BY-SA 4.0
null
2023-01-23T10:46:47.600
2023-01-23T10:46:47.600
null
null
17,311,876
null
75,208,415
2
null
75,193,816
0
null
I created Azure SQL database in portal and created linked service in azure data factory with managed identity authentication I got below error: ![enter image description here](https://i.imgur.com/rOBa7Ij.png) I followed below procedure to resolve this: I turned on the managed identity of data factory ![enter image description here](https://i.imgur.com/pbGIR9Z.png) I set admin for azure SQL database: ![enter image description here](https://i.imgur.com/HTtapdM.png) Login with Admin to sql database Create User username as data factory name using below code: ``` CREATE USER [DATAFACTORY NAME] FROM eXTERNAL PROVIDER ``` ![enter image description here](https://i.imgur.com/CWkrMbq.png) Added rules to the user using below code: ``` ALTER ROLE db_datareader ADD MEMBER [DATA FACTORY NAME]; ``` ![enter image description here](https://i.imgur.com/4T8iB2k.png) I tested linked service again, tested successfully ![enter image description here](https://i.imgur.com/QTbVvRE.png) It worked for me, once check from your end.
null
CC BY-SA 4.0
null
2023-01-23T10:47:58.957
2023-01-23T10:47:58.957
null
null
19,893,538
null
75,208,522
2
null
75,205,197
0
null
Please try two solution 1. remove readOnly in emailTextField either 2. readOnly: false
null
CC BY-SA 4.0
null
2023-01-23T10:58:18.010
2023-01-23T10:58:46.787
2023-01-23T10:58:46.787
19,539,984
19,539,984
null
75,208,559
2
null
75,146,431
0
null
Okay I tried something and it worked. On init I only load the data from the first table and I refresh the data while I click on each tab. So now the ag grid's columns are okay. On `ngOnInit()`: [enter image description here](https://i.stack.imgur.com/GzTow.png) And refreshing data while clicking in tabs: [enter image description here](https://i.stack.imgur.com/sw7G2.png) [enter image description here](https://i.stack.imgur.com/R9ReD.png)
null
CC BY-SA 4.0
null
2023-01-23T11:02:00.523
2023-01-23T11:02:00.523
null
null
21,027,344
null
75,208,547
2
null
75,204,448
0
null
I have tried to reproduce the same in my environment. - [](https://i.stack.imgur.com/c5N0Y.png) It is then being uploaded to my app registration [](https://i.stack.imgur.com/jmweP.png) Checked the manifest to confirm [](https://i.stack.imgur.com/Wf1W0.png) ``` "keyCredentials": [ { "customKeyIdentifier": "xxx", "endDate": "2023-01-31T00:00:00Z", "keyId": "xxx", "startDate": "2023-01-23T00:00:00Z", "type": "AsymmetricX509Cert", "usage": "Verify", "value": "xxx", "displayName": "my new ssc" } ``` using postman [](https://i.stack.imgur.com/vTE38.png) code given: ``` using System; using PnP.Framework; //using OfficeDevPnP.Core; //using Microsoft.SharePoint; //using Microsoft.SharePoint.Client; using System.Threading.Tasks; namespace spoapprepo { class Program { static async void Main(string[] args) { var clientId = "xxx"; var certPath = "C:\\xxx\\selfsigned.pfx"; var certPassword = "xxx"; var tenantId = "xxx"; var siteUrl= "https://contoso.sharepoint.com"; AuthenticationManager authManager = new AuthenticationManager(clientId, certPath, certPassword, tenantId); Try{ using (var cc = await authManager.GetContextAsync(siteUrl)) { cc.Load(cc.Web, p => p.Title); await cc.ExecuteQueryAsync(); Console.WriteLine(cc.Web.Title); } Console.WriteLine("Hello World!"); } } } } catch(ex) { Ex.message(); } ``` Try using `if-else` and `try-catch` block to catch the exact error. As `getcontext` uses current users credentials , but here we are intended to use app only context. If users login is not having privileges to access the sharepoint or when entered wrong Login details , the 401 unauthorized usually occurs. [](https://i.stack.imgur.com/AlaoA.png) If the user profile needs to be read , it needs `user.read` permission. [](https://i.stack.imgur.com/usQRV.png) But [Accessing SharePoint using an application context, also known as app-only | Microsoft Learn](https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly?source=recommendations#what-are-the-limitations-when-using-app-only) here. > [azure active directory - SharePoint PnP AuthenticationManager login with current user - Stack Overflow](https://stackoverflow.com/questions/67919974/sharepoint-pnp-authenticationmanager-login-with-current-user)
null
CC BY-SA 4.0
null
2023-01-23T11:00:51.400
2023-01-23T11:00:51.400
null
null
15,997,509
null
75,208,761
2
null
23,357,024
0
null
As @arunkumar-pushparaj asked, here you can find a simple example using Java configuration: ``` public class ParallelFlowConfiguration { protected static final int GRID_SIZE = 4; @Autowired private StepBuilderFactory stepBuilderFactory; @Autowired private JobBuilderFactory jobBuilderFactory; @Bean public Job producerProcess() { return this.jobBuilderFactory.get("partitionedJob").incrementer(new RunIdIncrementer()) .start(step1(null,null)) .build(); } @Bean public Step step1(PartitionHandler partitionHandler,Partitioner partitioner) { return this.stepBuilderFactory.get("step1").partitioner(myStepFlow().getName(), partitioner) .step(myStepFlow()).partitionHandler(partitionHandler) .build(); } @Bean public Step step2() { return this.stepBuilderFactory.get("step2").tasklet((contribution, chunkContext) -> { ExecutionContext executionContext = chunkContext.getStepContext().getStepExecution() .getExecutionContext(); Integer partitionNumber = executionContext.getInt("partitionNumber"); log.info("Eseguo Step DUE: {}",partitionNumber); return RepeatStatus.FINISHED; }).build(); } @Bean public Partitioner partitioner() { return new Partitioner() { @Override public Map<String, ExecutionContext> partition(int gridSize) { Map<String, ExecutionContext> partitions = new HashMap<>(gridSize); for (int i = 0; i < GRID_SIZE; i++) { ExecutionContext context1 = new ExecutionContext(); context1.put("partitionNumber", i); partitions.put("partition" + i, context1); } return partitions; } }; } @Bean public Flow myFlow() { return new FlowBuilder<Flow>("myFlow1").start(step2()).build(); } @Bean public Step myStepFlow() { return stepBuilderFactory.get("stepFlow") .flow(myFlow()).build(); } @Bean public PartitionHandler partitionHandler() { TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler(); partitionHandler.setTaskExecutor(new SimpleAsyncTaskExecutor()); partitionHandler.setStep(myStepFlow()); return partitionHandler; } ``` }
null
CC BY-SA 4.0
null
2023-01-23T11:19:17.047
2023-01-23T11:19:17.047
null
null
3,350,164
null
75,209,088
2
null
75,209,018
0
null
Try: - Using :``` WebDriverWait(navegador, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "input.infraInputFile[name='filArquivo']"))).send_keys("/path/to/Doc.pdf") ``` - Using :``` WebDriverWait(navegador, 20).until(EC.element_to_be_clickable((By.XPATH, "//input[@class='infraInputFile' and @name='filArquivo']"))).send_keys("/path/to/Doc.pdf") ```
null
CC BY-SA 4.0
null
2023-01-23T11:49:36.117
2023-01-23T11:49:36.117
null
null
7,429,447
null
75,209,204
2
null
75,208,575
0
null
Thanks to [Chellappan வ](https://stackoverflow.com/users/7790376/chellappan-%E0%AE%B5) I was able to find the answer. This was a bug in Primeng and was fixed in Primeng 15.1.1
null
CC BY-SA 4.0
null
2023-01-23T12:01:24.470
2023-01-23T12:01:24.470
null
null
19,450,598
null
75,209,328
2
null
56,759,112
0
null
I had sort of the same issue (on a macos 12.6.2). A kernel crash when using torchvision. ``` trainset = torchvision.datasets.CIFAR10(root='./data', train=True, download=True, transform=transform) testset = torchvision.datasets.CIFAR10(root='./data', train=False, download=True, transform=transform) classes = ('plane', 'car', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck') batch_size = 64 trainloader = th.utils.data.DataLoader(trainset, batch_size=batch_size, shuffle=True, num_workers=0) testloader = th.utils.data.DataLoader(testset, batch_size=batch_size, shuffle=False, num_workers=0) dataiter = iter(trainloader) images, labels = next(dataiter) ``` I solved it by reinstalling pytorch and torchvision. Run in a script (jupyter notebook or elsewhere): ``` !conda install --yes pytorch torchvision -c pytorch ```
null
CC BY-SA 4.0
null
2023-01-23T12:12:21.240
2023-01-23T12:12:21.240
null
null
1,885,349
null
75,209,419
2
null
75,209,196
1
null
You cannot play from a `string`. You can play from an `AssetSource` though: ``` oynitici.play(AssetSource('assets/clap1.wav')); ```
null
CC BY-SA 4.0
null
2023-01-23T12:19:47.413
2023-01-23T12:19:47.413
null
null
2,060,725
null
75,209,494
2
null
75,209,458
2
null
Just don't have `use` at the beginning of your function name, so it doesn't think it's a hook function. Something like `getGreeting` instead of `useExample`.
null
CC BY-SA 4.0
null
2023-01-23T12:27:49.603
2023-01-23T12:56:06.697
2023-01-23T12:56:06.697
70,713
70,713
null
75,209,545
2
null
75,209,259
0
null
There are different algorithms for deleting a node from a binary search tree. One is as follows: - - - - - - The given tree has a root with two children, so we first find its predecessor, which is the node with value 23. Then that node (its value) is moved to the root node, and in its stead comes the node with value 19: ``` 50 23 / \ / \ 17 72 => 17 72 / \ / \ / \ / \ 12 23 54 76 12 19 54 76 / \ / / \ 9 14 19 9 14 ``` The resulting tree is still balanced, so no rotations happen here. Moreover, the type of rotations to apply may depend on which type of self-balancing binary search tree is implemented: AVL, Splay tree, Red-black tree are examples of such trees which will rotate in different conditions and at different places in the tree.
null
CC BY-SA 4.0
null
2023-01-23T12:31:27.443
2023-01-23T12:31:27.443
null
null
5,459,839
null
75,209,567
2
null
75,209,458
0
null
You can export only functions declared with the keyword `function` that way. If you use `const` export the functions at the bottom of your file like this: ``` export {useExample} ``` or if you have more methods in the same file, than: ``` export {useExample, someMoreFunctions} ```
null
CC BY-SA 4.0
null
2023-01-23T12:32:29.850
2023-01-23T12:32:29.850
null
null
10,944,631
null
75,209,574
2
null
75,207,350
0
null
That sounds like a bug. When a new project is created, it should appear in Solution Explorer. However your solution has no projects, and the source file appears in "Miscellaneous Files" (meaning it's not part of a project, and therefore VS won't know how to build it). Please use the Visual Studio Installer to run a repair on your VS installation. If that doesn't help, use and include a recording of the steps you're taking to create a new project. If you link the feedback ticket here, I can make sure it gets looked at by the right people. Thanks.
null
CC BY-SA 4.0
null
2023-01-23T12:33:34.083
2023-01-23T12:33:34.083
null
null
24,874
null
75,210,000
2
null
75,208,746
0
null
Your wording is a bit confusing, but i think you refer to finding the second local extremum (which can be a minimum or maximum). Try this code: ``` # we need a signum function def sign(x): if x < 0: return -1 elif x > 0: return 1 else: return 0 def getNthLocalExtremum(x, depth, n): found = 1 # 'n' is made user friendly, starting at 1 for i in range(1, len(depth) - 1): # exclude the interval boundaries # we say either changing direction or not advancing in the # same direction is an local extremum if sign(x[i] - x[i-1]) * sign(x[i+1] - x[i]) != 1: # (*) if n == found: return x[i], depth[i] # the n-th extremum! else: found += 1 # advance looking for the next extremum # get the 2nd extremum result = getNthLocalExtremum(x, depth, 2) if result != None: print("extremum:", result) >> extremum: (8, 20) ``` Your provided data and graph dont match btw, thus its `(8, 20)` in the data but `(8, 40)` in the graph. Regarding the check `(*)`: the idea is to detect a change in direction, which happens if two consecutive graph segments dont have the same direction sign.
null
CC BY-SA 4.0
null
2023-01-23T13:09:54.370
2023-01-23T13:09:54.370
null
null
20,931,211
null
75,210,129
2
null
74,045,604
0
null
You just need to go to the console and press Enter on your keyboard !
null
CC BY-SA 4.0
null
2023-01-23T13:22:16.667
2023-01-23T13:22:16.667
null
null
15,212,573
null
75,210,147
2
null
75,196,416
1
null
Typically the ribbon button instance (`IRibbonControl`) is passed as a parameter where you could get all the required information about the control (at least such as `Id`). In the following code: ``` ButtonText = Application.ActiveInspector.CommandBarButton.Caption ``` The `Inspector` class doesn't provide the `CommandBarButton` property. To find the required control you need to use the [CommandBars.FindControls](https://learn.microsoft.com/en-us/office/vba/api/office.commandbars.findcontrols) method which gets the `CommandBarControls` collection that fits the specified criteria. You could use the `IRibbonControl.Id` value to find the control and get the caption property. There are other techniques for getting information about the UI such as [Accessibility API](https://learn.microsoft.com/en-us/windows/win32/winauto/microsoft-active-accessibility), but that is too complex for VBA macros. Anyway, command bars were deprecated and shouldn't be used any longer in Office add-ins for customizing the UI. Instead, the Fluent UI is used for creating a custom UI. Unfortunately Outlook doesn't allow customizing the UI from VBA macros like other host applications do, the best what you could do is to customize the QAT or move a button to the tab manually with a macro assigned to it. Read more about the Fluent UI (aka Ribbon UI) in the following articles: - [Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)](https://learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/aa338202(v=office.12)?redirectedfrom=MSDN)- [Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)](https://learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/aa338199(v=office.12)?redirectedfrom=MSDN)- [Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)](https://learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/aa722523(v=office.12)?redirectedfrom=MSDN)
null
CC BY-SA 4.0
null
2023-01-23T13:23:40.227
2023-01-23T13:23:40.227
null
null
1,603,351
null
75,210,872
2
null
75,210,803
2
null
You may simply use the logical equality operator `==` along with the `ifelse()` function here: ``` df$eq <- ifelse(df$BZ_Pred == df$BZ_Act, "Yes", "No") ```
null
CC BY-SA 4.0
null
2023-01-23T14:26:06.880
2023-01-23T14:26:06.880
null
null
1,863,229
null
75,210,877
2
null
74,803,628
0
null
Maybe on this website javascript loads the data. Requests dont activate it. If you want to get data from there use Selenium
null
CC BY-SA 4.0
null
2023-01-23T14:26:23.183
2023-01-23T14:26:23.183
null
null
19,445,228
null
75,211,116
2
null
75,210,478
0
null
You need to set the `"product_id"` as an index with [pandas.DataFrame.set_index](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.set_index.html) : ``` Sales.iloc[:20].set_index("product_id").plot(kind="bar", figsize=(6,3)) ``` [](https://i.stack.imgur.com/WUIml.png)
null
CC BY-SA 4.0
null
2023-01-23T14:46:34.450
2023-01-23T14:46:34.450
null
null
16,120,011
null
75,211,823
2
null
10,972,096
0
null
I know there is an accepted answer already, but for someone out there bootstrap a better way to do this is to throw this for li style ``` text-align: start; ```
null
CC BY-SA 4.0
null
2023-01-23T15:48:22.700
2023-01-23T15:48:22.700
null
null
4,632,265
null
75,211,815
2
null
75,211,791
0
null
You can mask your output value using the original `df`, this solution is not very dynamic though: ``` def highlight_col(x): # if x == 0.0: # blue 0= 'background-color: #ACE5EE ' blue = 'background-color: lightblue ' red = 'background-color: #ffcccb' df2 = pd.DataFrame('', index=x.index, columns=x.columns) df2.iloc[:, 1:3] = blue #if x else 'white' df2.iloc[:, 3:6] = red #if x else 'white' return df2.where(df.ne('')) df.style.apply(highlight_col, axis=None) ``` Output: [](https://i.stack.imgur.com/HftYA.png) A more dynamic method: ``` colors = {'column2': 'lightblue', 'column3': 'lightblue', 'column4': '#ffcccb', 'column5': '#ffcccb'} def highlight_col(s): return s.mask(s.ne(''), f'background-color: {colors.get(s.name, "none")}') df.style.apply(highlight_col, axis=0) ```
null
CC BY-SA 4.0
null
2023-01-23T15:47:32.487
2023-01-23T15:55:09.660
2023-01-23T15:55:09.660
16,343,464
16,343,464
null
75,211,874
2
null
75,211,760
1
null
In ggplot you should make your data in a longer format. For this you could use `pivot_longer` from `tidyr`. With that you could create a stacked barplot like this: ``` df <- data.frame(Valley = c("Hushey", "Kanday", "Thallay"), Female = c(144, 43, 45), Young = c(160, 43, 22), Yearling = c(162, 20, 25)) library(tidyr) library(dplyr) library(ggplot2) df %>% pivot_longer(cols = -Valley) %>% ggplot(aes(x = Valley, y = value, fill = name)) + geom_col() ``` ![](https://i.imgur.com/QNWhmBD.png) Or make a facet plot using `facet_wrap` like this: ``` df %>% pivot_longer(cols = -Valley) %>% ggplot(aes(x = name, y = value)) + geom_col() + facet_wrap(~Valley) ``` ![](https://i.imgur.com/u8tr0ri.png) [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2023-01-23T15:53:09.567
2023-01-23T15:53:09.567
null
null
14,282,714
null
75,211,916
2
null
75,211,803
4
null
You're getting this error because you're sending the value of `"1"` for the object `Pessoa`. You need to pass the fields in the object, something like this should work. `{ "logradouro": "null", "cep": "354", "numero": "null", "cidade": "null", "pessoa": {"id": 1} }` Also, I'm not sure what "null" means here, but if you want those fields to be null, don't send them. The way this is written, you're going to end up with the word `null` everywhere.
null
CC BY-SA 4.0
null
2023-01-23T15:55:47.750
2023-01-23T15:55:47.750
null
null
888,580
null
75,211,939
2
null
16,726,559
1
null
press CTRL-A, Z, O, Serial Port setup to access flow control settings of Minicom
null
CC BY-SA 4.0
null
2023-01-23T15:57:24.933
2023-01-23T15:57:24.933
null
null
10,124,827
null
75,211,948
2
null
75,211,651
0
null
looks like you have an option to make user a member of different groups. it means if user is `employee` and `inventory manager` - thats fine ## If it suppose to be like that: then you will display different menus in one template ## IF it's not: I suggest to you, use the another field for user, something like: ``` class UserRoles(models.IntegerChoices): EMPLOYEE = 1, "Employee" INVENTORY_MANAGER = 2, "Inventory manager" ... class CustomUser(AbstractUser): ... role = models.PositiveSmallIntegerField(choices=UserRoles.choices, default=UserRoles.employee) ... ``` then you can define the const with templates: ``` MENU_TEMPLATE_PER_USER_ROLE = { UserRoles.EMPLOYEE: "templates/employee_menu.html", UserRoles.INVENTORY_MANAGER: "templates/inventory_manager_menu.html", ... } ``` and use this in views when u choose the templates ``` def menu(request): template = MENU_TEMPLATE_PER_USER_ROLE.get(request.user.role, default="templates/default_menu.html") return render(request, template) ```
null
CC BY-SA 4.0
null
2023-01-23T15:57:40.777
2023-01-23T15:57:40.777
null
null
15,391,439
null
75,212,082
2
null
75,211,964
3
null
You haven't included the faceting variable (`Species`) in the `grobs` data frame, so ggplot doesn't know how to distribute these grobs between the facets. All three tables are drawn in all three facets, and you only see the third one because it is drawn over the first two. If you add a `Species` column with the appropriate labels to your `grobs` data frame, then each table grob will be drawn on its corresponding facet. ``` grobs <- tibble(x = 4, y = 2, grobs = list(g1, g2, g3), Species = c('setosa', 'versicolor', 'virginica')) p1 + geom_grob(data = grobs, aes(x = x, y = y, label = grobs)) ``` [](https://i.stack.imgur.com/FiYCb.png)
null
CC BY-SA 4.0
null
2023-01-23T16:06:09.170
2023-01-23T16:11:33.643
2023-01-23T16:11:33.643
12,500,315
12,500,315
null
75,212,216
2
null
75,211,991
0
null
Reinstall and its fixed! IF thats not an option, force update or check integrity. It has happened to me before but just opening and closing did it for me You might also have some extension or plugin installed that overrides the default behavior
null
CC BY-SA 4.0
null
2023-01-23T16:16:57.837
2023-01-23T16:27:54.740
2023-01-23T16:27:54.740
20,348,044
20,348,044
null
75,212,346
2
null
75,205,309
0
null
Since you are compiling outcomes on a per-student basis and not in total it is safe to use the `SUMPRODUCT()` function: [](https://i.stack.imgur.com/KORSX.png) The formula below is used in `B3` `=SUMPRODUCT((Sheet1!$E$2:$E$6=Sheet2!B$1)*(Sheet1!$C$2:$C$6=Sheet2!$A3)*(Sheet1!$D$2:$D$6))` and can be copied across and down throughout `B3:C4` The formula used in `B5` is different, because of the 'wildcard criterion' `=SUMPRODUCT((Sheet1!$E$2:$E$6=Sheet2!B$1)*(LEFT(Sheet1!$C$2:$C$6,11)="Information")*(Sheet1!$D$2:$D$6))` (unless you are using Microsoft 365, having the formula directly suppress 0 values essentially entails doubling it in length so, as an alternative, given the small output range, a custom-number format has been implemented, which effectively doesn't display 0 in a cell where that is the formula result)
null
CC BY-SA 4.0
null
2023-01-23T16:26:45.333
2023-01-23T16:26:45.333
null
null
18,824,727
null
75,212,496
2
null
75,212,310
2
null
Ruby on Rails 6.0 was released before Ruby 3.2 existed. Therefore, it is not surprising that Ruby on Rails 6.0 does not support running with Ruby 3.2 According to the [answers to this question](https://stackoverflow.com/questions/9087116/which-ruby-on-rails-is-compatible-with-which-ruby-version), Ruby on Rails 6.0 should run well on Ruby 2.5–2.7. I suggest downgrading your Ruby version to the latest 2.7.x version: [2.7.7](https://www.ruby-lang.org/en/news/2022/11/24/ruby-2-7-7-released/) was released about two months ago. But keep in mind that Ruby 2.7 will reach end of life in about two months. Therefore, you might want to consider updating your application to 6.2 or 7.0 soon.
null
CC BY-SA 4.0
null
2023-01-23T16:40:46.327
2023-01-23T16:40:46.327
null
null
2,483,313
null
75,212,555
2
null
45,563,291
0
null
If you don't want to install `intervention/image` package use this function: ``` /** * Get file dimension * @param \Illuminate\Http\UploadedFile $file * @return array */ public function getFileDimension(UploadedFile $file): array { $size = getimagesize($file->getRealPath()); return [ 'width' => $size[0] ?? 0, 'height' => $size[1] ?? 0, ]; } ```
null
CC BY-SA 4.0
null
2023-01-23T16:45:26.917
2023-01-23T16:45:26.917
null
null
10,532,320
null
75,212,722
2
null
75,205,747
1
null
I think it is safer to use `s2` for this type of exercise: ``` library(tidyverse) library(sf) #> Linking to GEOS 3.9.3, GDAL 3.5.2, PROJ 8.2.1; sf_use_s2() is TRUE library(tidygeocoder) library(lubridate) #> Loading required package: timechange #> #> Attaching package: 'lubridate' #> The following objects are masked from 'package:base': #> #> date, intersect, setdiff, union custom_starmap <- function(location, date){ # Formatting Date properly date<- as.Date(date) # Formatted date dt<- lubridate::ymd(date) # Get Latitude and Longitude for ProjString # For Latitude suppressMessages( capture.output( lat <- tibble(singlelineaddress = location) %>% geocode(address=singlelineaddress,method = 'arcgis') %>% .[["lat"]] ) ) # Reference date used for calculating longitude ref_date <- paste0(year(dt),"01","01",sep="-") %>% ymd() # Resulting longitude lon <- (-as.numeric(difftime(ref_date,dt, units="days"))/365)*360 # The CRS projString <- paste0("+proj=laea +x_0=0 +y_0=0 +lon_0=",round(lon,4), " +lat_0=", round(lat,4)) # Data Transformation flip <- matrix(c(-1, 0, 0, 1), 2, 2) # Hemisphere with s2 hemisphere <- s2::s2_buffer_cells( s2::as_s2_geography(paste0("POINT(", lon, " ", lat, ")")), distance = 1e7, max_cells = 5000) # Data source for constellation lines url1 <- "https://raw.githubusercontent.com/benyamindsmith/starBliss/main/data/constellations.lines.json" # Reading Data invisible( capture.output( constellation_lines_sf <- invisible(st_read(url1, stringsAsFactors = FALSE)) %>% st_wrap_dateline(options = c("WRAPDATELINE=YES", "DATELINEOFFSET=360")) %>% # Use s2 for the cut st_as_s2() %>% s2::s2_intersection(hemisphere) %>% # Back to sf st_as_sf() %>% st_transform(crs = projString) %>% filter(!is.na(st_is_valid(.))) %>% mutate(geometry = geometry * flip) %>% # Filter if empty, since the cut can produce empty geometries filter(!st_is_empty(.)) ) ) st_crs(constellation_lines_sf) <- projString return(constellation_lines_sf) } # The data df<-custom_starmap(location= "Caracas, Venezuela", date = as.Date("1991-03-17")) df #> Simple feature collection with 48 features and 0 fields #> Geometry type: GEOMETRY #> Dimension: XY #> Bounding box: xmin: -8700015 ymin: -8913303 xmax: 8922028 ymax: 8998639 #> CRS: +proj=laea +x_0=0 +y_0=0 +lon_0=73.9726 +lat_0=10.488 #> First 10 features: #> geometry #> 1 MULTILINESTRING ((3542468 3... #> 2 LINESTRING (-6234955 -52010... #> 3 MULTILINESTRING ((8922028 -... #> 4 LINESTRING (3098546 2071855... #> 5 MULTILINESTRING ((-1307725 ... #> 6 LINESTRING (557848.4 -59059... #> 7 MULTILINESTRING ((-24783.5 ... #> 8 MULTILINESTRING ((-6264812 ... #> 9 MULTILINESTRING ((-2356827 ... #> 10 LINESTRING (-4432439 -32157... ggplot(df) + geom_sf() ``` ![](https://i.imgur.com/HqQW1IA.png) [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2023-01-23T17:01:19.027
2023-01-23T17:01:19.027
null
null
7,877,917
null
75,212,820
2
null
64,987,255
0
null
Simple go to C:\Program Files\Android\Android Studio\jbr folder and copy all Folder with files then paste it on C:\Program Files\Android\Android Studio\jre folder And Restart your PC. Hope your Problem is gone. Thank you
null
CC BY-SA 4.0
null
2023-01-23T17:09:37.330
2023-01-23T17:09:37.330
null
null
17,216,456
null
75,213,086
2
null
75,211,981
0
null
``` Sub FillDates() Dim wks As Worksheet, i As Long, n As Long Dim dt1 As Date, dt2 As Date, x As Long, d As Long Set wks = Worksheets("NAV_REPORT_FSIGLOB1") With wks 'make start 1st dt1 = .Cells(2, "D") If Day(dt1) > 1 Then .Rows(2).Copy .Rows(2).Insert xlShiftDown .Cells(2, "D") = DateSerial(Year(dt1), Month(dt1), 1) n = n + 1 End If i = .Cells(.Rows.Count, "D").End(xlUp).Row Do .Cells(i, "D").Select dt1 = .Cells(i - 1, "D") dt2 = .Cells(i, "D") d = DateDiff("d", dt1, dt2) If d = 1 Then i = i - 1 ElseIf d > 1 Then .Rows(i).Copy .Rows(i).Insert xlShiftDown .Cells(i, "D") = DateAdd("d", -1, dt2) n = n + 1 ElseIf d < 1 Then MsgBox "Date sequence error", vbCritical Exit Sub End If ' escape infinite loop x = x + 1 If x > 100 Then MsgBox "Too many iterations > 100", vbCritical Exit Sub End If Loop While i > 2 End With MsgBox n & " rows added" End Sub ```
null
CC BY-SA 4.0
null
2023-01-23T17:37:11.237
2023-01-23T18:30:23.737
2023-01-23T18:30:23.737
12,704,593
12,704,593
null
75,213,654
2
null
75,209,196
0
null
Try: ``` oynitici.setAssets("assets/clap1.wav"); oynitici.play(); ``` we need to set music file as the asset first and then we would be able to play that music file. Questioner was skipping setting asset step.
null
CC BY-SA 4.0
null
2023-01-23T18:38:51.307
2023-01-24T06:53:40.777
2023-01-24T06:53:40.777
12,280,628
12,280,628
null
75,214,524
2
null
75,214,456
0
null
You're modifying the `sandwich_orders` list while iterating over it, which is messes up your iteration. Since there aren't any conditions there anyway, I'd finish the iteration and then just assign an empty list to it: `sandwich_orders = []`, or clear it: `sandwich_orders.clear()`. Or better yet, since you aren't using this list after the loop is done, just leave it be.
null
CC BY-SA 4.0
null
2023-01-23T20:06:31.310
2023-01-23T20:06:31.310
null
null
2,422,776
null
75,214,920
2
null
75,208,913
0
null
The problem highlighting in the VS Code editor is based on compiler warnings. Compilers are not required to emit diagnostics for problems that occur in uninstantiated templates. You haven't provided enough info to know whether you have instantiated that template anywhere, but I'll bet you haven't. Instaniate it somewhere by calling it in a non-template function or another instantiated template function, or [explicitly instantiate it](https://en.cppreference.com/w/cpp/language/class_template#Explicit_instantiation). See also this Q&A: [error in unused template method](https://stackoverflow.com/q/17598699/11107541).
null
CC BY-SA 4.0
null
2023-01-23T20:51:24.860
2023-01-23T20:51:24.860
null
null
11,107,541
null
75,214,997
2
null
75,214,839
0
null
So, there is a couple things wrong in your Razor view. 1. @model should be of type List<WebPlantillaOpexLTE.Models.TarjetasInformativas> since this is the returning type of your SP function and the model returned to the view. 2. To show the contents of a list, you should use an foreach loop to iterate over your model, something like the following (may contain syntax error): ``` @model List<WebPlantillaOpexLTE.Models.TarjetasInformativas> <div class="col-lg-3 col-6"> @foreach(var item in @Model){ <!-- small box --> <div class="small-box bg-info"> <div class="inner"> <h3>@item.PrimerNombre</h3> <p>@item.PrimerMonto</p> </div> <div class="icon"> <i class="ion ion-android-locate"></i> </div> </div> } </div> ``` Some reference: [https://learn.microsoft.com/en-us/aspnet/core/mvc/views/overview?view=aspnetcore-7.0](https://learn.microsoft.com/en-us/aspnet/core/mvc/views/overview?view=aspnetcore-7.0)
null
CC BY-SA 4.0
null
2023-01-23T20:59:46.370
2023-01-23T20:59:46.370
null
null
3,361,189
null
75,215,091
2
null
75,215,032
0
null
As per the given HTML to click on the element with text as you need to induce [WebDriverWait](https://stackoverflow.com/a/59130336/7429447) for the [element_to_be_clickable()](https://stackoverflow.com/a/54194511/7429447) and you can use either of the following [locator strategies](https://stackoverflow.com/a/48056120/7429447): - Using :``` WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "a.lia-button.lia-button-primary.view-more-icon.lia-link-ticket-post-action#viewMoreLink[href$='notificationList'] > span"))).click() ``` - Using :``` WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//a[@class='lia-button lia-button-primary view-more-icon lia-link-ticket-post-action' and @id='viewMoreLink'][contains(@href, 'notificationList')]/span[text()='Show more']"))).click() ``` - : You have to add the following imports :``` from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC ``` > You can find a relevant detailed discussion in [ElementClickInterceptedException: Message: element click intercepted Element is not clickable error clicking a radio button using Selenium and Python](https://stackoverflow.com/a/62904494/7429447)
null
CC BY-SA 4.0
null
2023-01-23T21:11:32.393
2023-01-24T08:03:17.223
2023-01-24T08:03:17.223
7,429,447
7,429,447
null
75,215,158
2
null
75,215,035
1
null
There are a couple problems I see in your code. First, you create the palette texture of size 12, but initialize it with an array that has only four texels. You should fix that: ``` glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA, 4 /*HERE*/, 0, GL_RGBA, GL_UNSIGNED_BYTE, PaletteColors); ``` Second, and the most important issue, is that when you sample your sprite in the shader you'll be getting a float in the 0 to 1 range rather than 0 to 255. Then this will be scaled to the 0 to 4 range when sampling the palette texture. For the small numbers you have in your sprite (0 to 2), you'll end up sampling your palette at location 0 to 2/255*4 = 0.0313; with the nearest neighbor interpolation this is rounded the 0th entry of your palette. To solve this you can undo the scaling that OpenGL does: ``` " vec4 index = texture2D(myTextureSampler, UV);\n" " vec4 texel = texture(myPaletteSampler, (index.r*255 + 0.5)/textureSize(myPaletteSampler).x);\n" " FragColor = texel;\n" ``` A better approach might be to use an integer texture for the sprite (`GL_R8UI` with `GL_RED_INTEGER` and `usampler2D`) to disable the scaling when sampling, and use `texelFetch` for the palette to disable the scaling when reading the palette. You'll need to check though if these features are available in OpenGL 3.3.
null
CC BY-SA 4.0
null
2023-01-23T21:19:23.177
2023-01-23T21:24:38.720
2023-01-23T21:24:38.720
277,176
277,176
null
75,215,281
2
null
75,215,225
0
null
You need to use List to track N-number of items. You can do ``` class _HomeItemsWidgetState extends State<HomeItemsWidget> { List<int> selectedItem = []; ``` And to get and set color based on current state ``` IconButton( onPressed: () { toggleIconView(index); }, icon: Icon(selectedItem.contains(index) ? Icons.favorite : Icons.favorite_border), color: selectedItem.contains(index) ? Colors.red : Colors.red, ), ``` And toggle option will be ``` void toggleIconView(int index) { if (selectedItem.contains(index)) { selectedItem.remove(index); } else { selectedItem.add(index); } setState(() {}); } ```
null
CC BY-SA 4.0
null
2023-01-23T21:34:12.360
2023-01-23T21:34:12.360
null
null
10,157,127
null
75,215,725
2
null
75,213,927
1
null
`case` is a reserved keyword in javascript change that variable in your map to something else
null
CC BY-SA 4.0
null
2023-01-23T22:31:50.413
2023-01-23T22:31:50.413
null
null
4,434,274
null
75,215,723
2
null
75,212,685
1
null
I suspect many things are wrong a few things I notice: says to track the upward movement of the top of @id/header But start and have the exact same Which means the header does move because `app:layout_constraintTop_toTopOf="parent"` + height="0dp" implies it top is pinned. In general before you think about the swipe part. Focus on getting the two constraintSets to have the start and end state you want. Which typically involves modifying constraints in the ConstraintSet If it is laying out the way you want Then the onSwipe anchor needs to be with the moving object see [https://youtu.be/XtnAZXM26wQ](https://youtu.be/XtnAZXM26wQ) for a brief overview on onSwipe ## The problem You say "`FragmentContainerView` itself doesn't collapse" But the`FragmentContainerView` is not a child of the MotionLayout. Layouts can only control direct children. The only other thing a layout can do is change its wrap size. You seem to be trying to control the MotionLayouts Parent. The way this would typically be done is motionLayout is at the base of everything you want to control. You might be able to make the MotionLayout and the fragment transparent. But you would still have touch handling missing.
null
CC BY-SA 4.0
null
2023-01-23T22:31:25.677
2023-01-25T06:18:41.930
2023-01-25T06:18:41.930
2,558,442
2,558,442
null
75,215,824
2
null
75,215,140
2
null
The short answer: you need to do some geometry. The long answer: 1. Create a Line Segment class to easily calculate line intersections and acceptable range of intercepts of lines with fixed slope m that still intersect with the line segment. 2. Turn your points into Line Segments, find the longest line, find the range of intercepts needed to fill the polygon, then find the intersections for each line generated by each intercept. Class definition: ``` import matplotlib.pyplot as plt import numpy as np import math # Represent a non-vertical line segment from start_pt to end_pt # as y = mx + b and minv <= x <= maxv. # For vertical lines x = b, m = None and minv <= y <= maxv class LineSeg(): def __init__(self, start_pt, end_pt): self.x, self.y = start_pt self.x2, self.y2 = end_pt if self.x != self.x2: self.m = (self.y2 - self.y) / (self.x2 - self.x) self.b = self.y - self.m*self.x self.minv = min(self.x, self.x2) self.maxv = max(self.x, self.x2) else: self.m = None self.b = self.x self.minv = min(self.y, self.y2) self.maxv = max(self.y, self.y2) def length(self): return np.linalg.norm([self.x2-self.x, self.y2-self.y]) # Find intersection (x, y) with line y = mx + b def intersect_w_line(self, m, b): # Parallel lines if m == self.m: return (None, None) # Line is vertical but line segment is not elif m == None: if self.minv <= b <= self.maxv: return (b, self.m*b + self.b) else: return (None, None) # Line segment is vertical, but line is not elif self.m == None: y = m*self.b + b if self.minv <= y <= self.maxv: return (self.b, y) else: return (None, None) else: x = (b - self.b) / (self.m - m) y = self.m*x + self.b if self.minv <= x <= self.maxv: return (x, y) else: return (None, None) # Find intercept range with line y = mx + b def intercept_range(self, m): if self.m == m: return (self.b, self.b) # Line is vertical, but segment is not elif m == None: return sorted([self.x, self.x2]) # Line is not vertical else: b = self.y - m*self.x b2 = self.y2 - m*self.x2 return sorted([b, b2]) ``` Plotting: ``` points = ([0, 8], [2, 10], [10, 4], [10, 0]) linesegs = [LineSeg(points[i], points[i+1]) if i+1 < len(points) else LineSeg(points[i], points[0]) for i in range(len(points))] lengths = [lineseg.length() for lineseg in linesegs] longest_seg = [lineseg for lineseg in linesegs if lineseg.length() == max(lengths)] m = longest_seg[0].m b = longest_seg[0].b intercept_ranges = [lineseg.intercept_range(m) for lineseg in linesegs] max_intercept = np.max(intercept_ranges) min_intercept = np.min(intercept_ranges) num_lines = 10 spacing = (max_intercept - min_intercept) / (num_lines+1) intercepts = np.arange(min_intercept + spacing, max_intercept, spacing) line_pts = [[lineseg.intersect_w_line(m, intercept) for lineseg in linesegs if lineseg.intersect_w_line(m, intercept)[0] is not None] for intercept in intercepts] plt.close('all') fig, ax = plt.subplots(1, 1) polygon = mpl.patches.Polygon(points, closed = True, fill = False) ax.add_artist(polygon) for start, end in line_pts: line = mpl.lines.Line2D([start[0], end[0]], [start[1], end[1]]) ax.add_artist(line) ax.set_xlim(0, 10) ax.set_ylim(0, 10) ```
null
CC BY-SA 4.0
null
2023-01-23T22:45:06.493
2023-01-23T22:45:06.493
null
null
21,021,990
null
75,216,160
2
null
75,206,038
1
null
It looks like the page is rending the script tag as html. A quick and simple fix would be to hide the script tag like so: ``` <script style="display:none;"> ``` If you could move that functionality outside of the razor page and into a dedicated javascript/typescript page it would probably fix the render issue aswell.
null
CC BY-SA 4.0
null
2023-01-23T23:39:47.307
2023-01-23T23:39:47.307
null
null
17,696,405
null
75,216,183
2
null
73,329,531
0
null
You are running code on the client. Or at least nextjs is thinking that you are running code on the client. Try to follow the stack trace and see how you are calling the code that is importing `net`.
null
CC BY-SA 4.0
null
2023-01-23T23:43:39.387
2023-01-23T23:43:39.387
null
null
904,992
null
75,216,285
2
null
75,215,917
0
null
One way, avoiding any copy/paste: ``` Sub Copy_To_Lastrow() Dim lr As Long With Worksheets("Meeting1") '<<should specify a workbook here... lr = .Cells(.Rows.Count, "AN").End(xlUp).Row .Range("N2:N" & lr).Value = .Range("N2").Value End With End Sub ```
null
CC BY-SA 4.0
null
2023-01-24T00:05:47.397
2023-01-24T00:05:47.397
null
null
478,884
null
75,216,305
2
null
75,206,038
2
null
Below will help can you please try it with script rendering section on you layout page and then render your script on that scope. // use this on your layout page-- bottom of page once all plugin scripts are rendered ``` @RenderSection("scripts", required: false) ``` // use below on your partial ``` @section scripts{ <script type="text/javascript"> var bID = @businessIDScript; var gID = @groupIDScript; var dID = @departmentIDScript; var aID = @areaIDScript; if (!(aID > 0)) { $("#createIdlerButton").attr("disabled", "disabled"); $("#importIdlerButton").attr("disabled", "disabled"); } if (@sapEnabled == true) { $("#sapIdlerReport").show(); $("#sapIdlerReportAnchor").removeAttr('onClick'); $("#sapIdlerReportAnchor").attr('onClick', 'PDS.IdlerManagement.sapIdlerReport(' + bID + ',' + gID + ',' + dID + ',' + aID + ')'); } else { $("#sapIdlerReport").hide(); } ``` }
null
CC BY-SA 4.0
null
2023-01-24T00:10:33.087
2023-01-24T07:00:27.673
2023-01-24T07:00:27.673
7,461,853
7,461,853
null
75,216,377
2
null
25,854,459
0
null
Everything in Richard Shurtz's answer, except for the "items - 1" in the first line in the loop. This worked for any number of items: ``` var items = 5; var startTheta = .5 * Math.PI; var endTheta = 1 * Math.PI; var outerCircleRadius = 112; var cx = 90; var cy = 90; for(var i = 0; i < items; i++) { var theta = startTheta + (endTheta - startTheta) * i / items var x = cx + outerCircleRadius * Math.cos(theta); var y = cy + outerCircleRadius * Math.sin(theta); $("#center").append("<div class='point' style='left:"+ x +"px;top:"+ y +"px'></div>"); } ```
null
CC BY-SA 4.0
null
2023-01-24T00:25:37.953
2023-01-24T00:25:37.953
null
null
10,415,969
null
75,216,394
2
null
75,213,927
0
null
> break byte case catch char class* const continue debugger default delete do double else enum* eval export* extends* false final finally float for function goto if implements import* in instanceof int interface let* long native new null package private protected public return short static super* switch synchronized this throw throws transient true try typeof var void abstract arguments await* boolean volatile while with yield all these `keywords` are reserved in javaScript you cannot use them as variables, labels, or function names
null
CC BY-SA 4.0
null
2023-01-24T00:29:04.833
2023-01-24T02:12:47.223
2023-01-24T02:12:47.223
13,488,990
13,488,990
null
75,216,760
2
null
75,206,038
1
null
Have you tried moving the script to a different location and see what happens? Kendo template might be rendering that JavaScript snippet to the datagrid columns/header as text. I guess what you can do is do first is do a trial and error determine where the code would work and the same time wont render as text. Maybe somewhere common like the layout page or something? Afterwards you can then do a proper fix like where the code should be best placed.
null
CC BY-SA 4.0
null
2023-01-24T01:48:31.043
2023-01-24T01:48:31.043
null
null
21,069,702
null
75,217,500
2
null
72,520,068
0
null
Specify ``` import emojiMartData from '@emoji-mart/data/sets/[version]/apple.json'; ``` In Picker, specify: ``` data={emojiMartData} ```
null
CC BY-SA 4.0
null
2023-01-24T04:46:56.633
2023-01-24T04:52:04.303
2023-01-24T04:52:04.303
4,826,457
21,070,283
null
75,217,528
2
null
75,217,131
0
null
We're going to need more CSS and possibly HTML to see exactly why your code is behaving unexpectedly. Definitely mimicking the first comment on here though: IDs should be unique to each element. If you want those elements to have the same styling, use a class: ``` <li class="regular"> ``` This will apply the same styling to different elements. However, when an element appears in the top left like that, in my experience, I am using the CSS 'display', 'float', or 'position' properties incorrectly. If you haven't already, look into how the float and display properties function (as well as relative vs absolute positioning). Check out [this codepen.io](https://codepen.io/bmills20/pen/PoBRwJd), where I have it working by adding: ``` li { float: left; } ``` This allows your list items to exist on the same line properly. My guess is that you are using ``` li { display: inline; /* incorrect usage */ } ``` to get them on the same horizontal axis. This is fine for regular text elements, but will cause "unexpected" behavior with positioning of child elements. For a more detailed explanation, please see this StackOverflow post: [What is the purpose of float:left on an unordered list when creating a horizontal navigation bar?](https://stackoverflow.com/questions/11999686/what-is-the-purpose-of-floatleft-on-an-unordered-list-when-creating-a-horizonta).
null
CC BY-SA 4.0
null
2023-01-24T04:53:07.800
2023-01-24T04:59:26.177
2023-01-24T04:59:26.177
14,710,802
14,710,802
null
75,217,575
2
null
75,172,650
0
null
Used this [https://www.npmjs.com/package/highcharts-border-radius?activeTab=readme](https://www.npmjs.com/package/highcharts-border-radius?activeTab=readme) plugin. ``` plotOptions: { column: { maxPointWidth: 36, stacking: 'normal' } }, series: [ { name: 'Valid', data: [], color: '#5185F3', borderRadiusTopLeft: 5, borderRadiusTopRight: 5 }, { id: 'failed', name: 'Failed Verification', data: [], color: '#FF4949' }, { linkedTo: 'failed', borderRadiusTopLeft: 5, borderRadiusTopRight: 5 } ] ``` [enter image description here](https://i.stack.imgur.com/TdbZA.png)
null
CC BY-SA 4.0
null
2023-01-24T05:01:17.317
2023-01-24T05:01:17.317
null
null
20,641,853
null
75,218,176
2
null
70,816,034
0
null
I know its a bit late for an answer but i will leave it right here in case someone needs an answer. One of the possible solutions to this is to increase your batch size. I could decrease the difference increasing my batch size, but still there is a difference. It is possible that BatchNorm layer is responsible for this problem. It can be good to check it out here : [https://github.com/keras-team/keras/issues/6977](https://github.com/keras-team/keras/issues/6977)
null
CC BY-SA 4.0
null
2023-01-24T06:40:11.207
2023-01-24T06:40:11.207
null
null
21,070,737
null
75,218,182
2
null
75,211,991
1
null
First, please check whether the version of your VS2022 is the latest version, I am currently using VS community 17.4.4, and the code snippets shortcut 'cw' works fine on my side. [](https://i.stack.imgur.com/vdDJv.png) [turn off synchronized settings on a particular computer](https://learn.microsoft.com/en-us/visualstudio/ide/synchronized-settings-in-visual-studio?view=vs-2022#turn-off-synchronized-settings-on-a-particular-computer) Reset environment settings: [](https://i.stack.imgur.com/zN7tP.png) [](https://i.stack.imgur.com/P56Qk.png) [](https://i.stack.imgur.com/M6yDu.png) [](https://i.stack.imgur.com/DCvEt.png) turn off synchronized settings on a particular computer: ![enter image description here](https://i.stack.imgur.com/2AiKm.png)][7](https://i.stack.imgur.com/2AiKm.png) [](https://i.stack.imgur.com/xyFZz.png) Creat a file named xxx.snippet: ``` <?xml version="1.0" encoding="utf-8" ?> <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> <CodeSnippet Format="1.0.0"> <Header> <Title>xxx</Title> <Shortcut>xxx</Shortcut> <Description>Code snippet for Console.WriteLine</Description> <Author>Microsoft Corporation</Author> <SnippetTypes> <SnippetType>Expansion</SnippetType> </SnippetTypes> </Header> <Snippet> <Declarations> <Literal Editable="false"> <ID>SystemConsole</ID> <Function>SimpleTypeName(global::System.Console)</Function> </Literal> </Declarations> <Code Language="csharp"><![CDATA[$SystemConsole$.WriteLine($end$);]]> </Code> </Snippet> </CodeSnippet> </CodeSnippets> ``` After that, import this code snippets: [](https://i.stack.imgur.com/a15gp.png) [](https://i.stack.imgur.com/t0Ocm.png) After that, [write xxx and double press Tab](https://learn.microsoft.com/en-us/visualstudio/ide/code-snippets?view=vs-2022#expansion-snippets-and-surround-with-snippets).
null
CC BY-SA 4.0
null
2023-01-24T06:41:06.770
2023-01-24T06:41:06.770
null
null
6,261,890
null
75,218,417
2
null
75,218,246
1
null
Do you mean something like this: [](https://i.stack.imgur.com/efvBd.png) For your information, this is the formula: ``` =IF(AND(B3=0,C3=0,D3=0),"",MAX(E$2:E2) + 1) ``` The first part is easy: if all location columns are zero, then put an empty string. The second part is a bit more difficult: take the maximum from the fix cell to "E2" (while being located in "E3", which means take the cell above. So, take the maximum of all cells above, starting at "E$2". Once you have that maximum, add one. I admit, the formula, with the `MAX(E$2:E2)` looks confusing, but drag it down, see how "E2" becomes "Ex" and how "E$2" stays "E$2" and you'll understand.
null
CC BY-SA 4.0
null
2023-01-24T07:13:58.733
2023-01-24T07:13:58.733
null
null
4,279,155
null
75,218,594
2
null
75,211,981
0
null
Using as much of your existing code as possible, you can use the following. Tested with a Summary sheet with Start date in A1, End date in A2. ``` Sub test_this() Dim wks As Worksheet, ssh As Worksheet Set wks = Worksheets("NAV_REPORT_FSIGLOB1") Set ssh = Worksheets("SUMMARY") Dim lastRow As Long, start_date As Date, end_date As Date, curcell As Date lastRow = Range("D2").End(xlDown).Row start_date = ssh.Range("A1") - 1 end_date = ssh.Range("A2") With wks.Cells(lastRow, 4) If .Value < end_date Then .EntireRow.Copy .EntireRow.Insert xlShiftDown lastRow = lastRow + 1 .Value = end_date End If End With For i = lastRow To 2 Step -1 curcell = wks.Cells(i, 4).Value If i = lastRow Then curcell = end_date prevcell = wks.Cells(i - 1, 4).Value If i = 2 Then prevcell = start_date Do Until curcell - 1 <= prevcell wks.Rows(i).Copy wks.Rows(i).Insert xlShiftDown curcell = wks.Cells(i + 1, 4) - 1 wks.Cells(i, 4).Value = curcell Loop Next i End Sub ```
null
CC BY-SA 4.0
null
2023-01-24T07:35:55.643
2023-01-24T07:35:55.643
null
null
7,446,760
null
75,218,730
2
null
6,996,837
0
null
Now you can use Material Design Chips. [https://github.com/material-components/material-components-android/blob/master/docs/components/Chip.md](https://github.com/material-components/material-components-android/blob/master/docs/components/Chip.md) [](https://i.stack.imgur.com/r7fRo.png)
null
CC BY-SA 4.0
null
2023-01-24T07:52:23.040
2023-01-24T08:17:51.710
2023-01-24T08:17:51.710
14,612,474
14,612,474
null
75,219,061
2
null
75,215,440
0
null
there is no formula for color based operation in excel. You can try using combination of vlookup and hlookup formula to get data from a vertical-horizontal tabular data set.
null
CC BY-SA 4.0
null
2023-01-24T08:34:17.537
2023-01-24T08:34:17.537
null
null
18,568,127
null
75,219,200
2
null
75,219,085
2
null
``` class Stack { constructor(...values) { const data = {}; let index = 0; this.push = function(value) { if (arguments.length < 1) { throw new TypeError('stack.push() requires a value argument'); } if (typeof value === 'undefined') { throw new TypeError('stack.push(value) received undefined'); } data[index] = value; index++; }; this.pop = function() { const last = index - 1; if (last < 0) return; const value = data[last]; delete data[last]; index = last; return value; }; this.peek = function() { const last = index - 1; if (last < 0) return; return data[last]; }; this.print = function() { if (index === 0) { return 'Stack { <empty> }'; } let output = ' }'; let last = index - 1; for (; last > 0; last--) { output = ' <- ' + JSON.stringify(data[last]) + output; } output = JSON.stringify(data[last]) + output; return 'Stack { ' + output; }; for (let i = 0; i < values.length; i++) { this.push(values[i]); } Object.freeze(this); } } const myStack = new Stack(1, 2, 3, 4, 5); // Here's an easy but not so good way: function countValues1(stack) { return Array.from(stack.print()).filter(x => x === "<").length + 1; } // Here's another way, but it mutates the stack: function countValues2(stack) { let count = 0; while (true) { if (stack.pop() === undefined) { break; } count++; } return count; } console.log(countValues1(myStack)); console.log(countValues2(myStack)); ``` Without knowing exactly how stack works, or specifically what you need (are you allowed to modify the stack implementation? are you allowed to mutate the contents of the stack?) we'll struggle for a good answer, but the above should help get you maybe slightly closer perhaps.
null
CC BY-SA 4.0
null
2023-01-24T08:48:36.207
2023-01-24T09:11:34.137
2023-01-24T09:11:34.137
5,011,469
5,011,469
null
75,219,249
2
null
75,219,085
-2
null
`length` is a getter, which is essentially a function posing as a property. It will just return `undefined` if you call it on an object that doesn't implement it. If the exercise -- I assume that's what it is -- says you can only use the abovementioned methods, then you can't use `object.length`.
null
CC BY-SA 4.0
null
2023-01-24T08:53:15.710
2023-01-24T08:53:15.710
null
null
21,071,366
null
75,219,266
2
null
75,219,085
0
null
Maybe this can help you doing a length function manually. You should check how you declared your stack, `.length` is supposed to be working. ``` function countValues(stack) { const tempStack = stack; var length=0; while(tempStack.pop()!=undefined){ length++; } return length; } ``` This function allows you to run it and still keeping your data in the original stack.
null
CC BY-SA 4.0
null
2023-01-24T08:55:25.200
2023-01-24T08:55:25.200
null
null
19,835,740
null
75,219,305
2
null
29,529,957
0
null
Prefix func name with example test function name: ``` secondExample() must be **testSecondExample()** ``` then clean the build file use this shortcut key
null
CC BY-SA 4.0
null
2023-01-24T09:00:27.160
2023-01-24T09:00:27.160
null
null
20,572,882
null
75,219,330
2
null
75,215,130
0
null
Problem solved. i think the problem was the following: I have two callback functions with the same outputs but different inputs, so what I did was I kept the call back function and added a new input, in this case, the dropdown. insted of ` @ app.callback1( ``` [Output("C", "figure"),Output("D", "figure") [Input("A", "start_date"), Input("B", "end_date")],) ``` @ app.callback2( ``` Output("C", "figure"), [Input("E", "start_date"),) ` ``` the solution for me was to use : @app.callback([Output("C", "figure")], [Input("A", "start_date"), Input("B", "end_date"),Input("E", "start_date")],)
null
CC BY-SA 4.0
null
2023-01-24T09:02:23.117
2023-01-24T09:02:23.117
null
null
15,902,173
null
75,219,664
2
null
74,893,946
1
null
i had the same problem when i started out with superset. From what i found out at the moment there is no fancy way to achieve this with the GUI alone. By default the time range is dynamic. To get data for a specific time range we did a query in the Advanced tab [Screenshot of advanced time range config](https://i.stack.imgur.com/b8vfe.png) In the START field use `datetrunc(datetime('now'), year)` In the END field use `datetime('now')` To vary the time range you can swap out in the start field with day, month, week or an absolute date.
null
CC BY-SA 4.0
null
2023-01-24T09:41:09.383
2023-01-24T09:48:25.020
2023-01-24T09:48:25.020
21,071,565
21,071,565
null
75,219,744
2
null
75,219,584
2
null
Use `FILTER` : [filter](https://support.microsoft.com/en-us/office/filter-function-f4f7cb66-82eb-4767-8f7c-4877ad80c759) for multiple criteria: ``` =FILTER(C1:C4,(A1:A4="a")*(B1:B4=3)) ``` Result: [](https://i.stack.imgur.com/l4stL.png)
null
CC BY-SA 4.0
null
2023-01-24T09:48:40.137
2023-01-24T09:48:40.137
null
null
11,222,393
null
75,219,855
2
null
75,219,282
0
null
> Do I have to set the Endpoints in the Controller? The same way im doing it with my normal REST API´s? I didnt find an answer for this on the Internet Well, for `Web Service` integration within the `asp.net core project` regardless of version there are two [prerequisite](https://learn.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide#how-to-use-the-extension): 1. Either your web service must be running and URL should available for calling 2. Or must have Valid WSDL file in local machine. Following steps would be same for both `asmx` and `wsdl` integration. In addition, please be sure that, I have used `Microsoft Visual Studio Community 2022` `Version 17.3.6` while preparing this answer. [](https://i.stack.imgur.com/fC5ch.png) [](https://i.stack.imgur.com/Wib6Y.png) [](https://i.stack.imgur.com/9imJS.png) [](https://i.stack.imgur.com/Y7yqB.png) If your `Web Service` up and running it will start adding the reference without any issue. [](https://i.stack.imgur.com/rYM0J.png) [](https://i.stack.imgur.com/WWyP8.png) You should `select path` for your `valid wsdl file` here. Ignore my files here, you outght to choose your `wsdl file` instead. Now, In your Web API project, you could use a service reference added earlier. Like below Please note that, you should call the method according to the WCF service's method. ``` var serviceReference1 = new ServiceReference1.Service1Client(); var result = await serviceReference1.GetDataAsync(1) ; ``` [](https://i.stack.imgur.com/1tSJT.png) If you still encounter any further issue for integration you could [refer to our official document for more details here](https://learn.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide#how-to-use-the-extension)
null
CC BY-SA 4.0
null
2023-01-24T09:58:19.327
2023-01-24T09:58:19.327
null
null
9,663,070
null
75,220,218
2
null
75,217,946
1
null
The major issue is the usage of [whiten](https://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.vq.whiten.html) method that is not adequate for the sample image: `whiten` documentation: > Before running k-means, it is beneficial to rescale each feature dimension of the observation set by its standard deviation (i.e. “whiten” it - as in “white noise” where each frequency has equal power). Each feature is divided by its standard deviation across all observations to give it unit variance. The normalization method assumes normal distribution of the noise. The sample image is not a natural image (has no noise), and the normalization procedure does not feat the given image. Instead of normalization, it is recommended to convert the image to [LAB](https://en.wikipedia.org/wiki/CIELAB_color_space) color space, where color distances better match the perceptual distances. Keeping the colors in RGB format may work good enough... Swapping the green and the blue channels is another issue. --- Instead of using a for loop, we may use NumPy array operations (it's not a bug, just faster): ``` fimage = bimage.astype(float) # Convert image from uint8 to float (kmeans requires floats). r = fimage[:, :, 0].flatten().tolist() # Convert red elements to list g = fimage[:, :, 1].flatten().tolist() # Convert grenn elements to list b = fimage[:, :, 2].flatten().tolist() # Convert blue elements to list bimage_df = pd.DataFrame({'red': r, 'green': g, 'blue': b}) ``` --- Apply `kmeans` with 100 iterations (the default is 20, and may not be enough): ``` cluster_centers, _ = kmeans(bimage_df[['red', #Find rhe 4 most common colors 'green', 'blue']], 4, iter=100) # The default is 20 iterations, use 100 iterations for better convergence ``` --- Before using `plt.imshow` we have to convert the colors to `uint8` type (we may also convert to range [0, 1]), otherwize the displayed colors are going to be white (saturated). ``` dominant_colors = np.round(cluster_centers).astype(np.uint8) # Round and convert to uint8 plt.imshow([dominant_colors]) plt.show() ``` --- Code sample: ``` import matplotlib.image as img import matplotlib.pyplot as plt #from scipy.cluster.vq import whiten from scipy.cluster.vq import kmeans import pandas as pd import numpy as np bimage = img.imread('Images/build2.jpg') #read image (this part works) print(bimage.shape) #r = [] #g = [] #b = [] #for row in bimage: # for temp_r, temp_g, temp_b in row: # r.append(temp_r) # g.append(temp_g) # b.append(temp_b) # Use NumPy array operations, instead of using a for loop. fimage = bimage.astype(float) # Convert image from uint8 to float (kmeans requires floats). r = fimage[:, :, 0].flatten().tolist() # Convert red elements to list g = fimage[:, :, 1].flatten().tolist() # Convert grenn elements to list b = fimage[:, :, 2].flatten().tolist() # Convert blue elements to list bimage_df = pd.DataFrame({'red': r, 'green': g, 'blue': b}) # Don't use whiten #bimage_df['scaled_color_red'] = whiten(bimage_df['red']) #supposed to give color codes #bimage_df['scaled_color_blue'] = whiten(bimage_df['blue']) #bimage_df['scaled_color_green'] = whiten(bimage_df['green']) #cluster_centers, _ = kmeans(bimage_df[['scaled_color_red', #to find most common colors # 'scaled_color_blue', # 'scaled_color_green']], 3) cluster_centers, _ = kmeans(bimage_df[['red', #Find the 4 most common colors 'green', 'blue']], 4, iter=100) # The default is 20 iterations, use 100 iterations for better convergence dominant_colors = np.round(cluster_centers).astype(np.uint8) # Round and convert to uint8 print(dominant_colors) # Since whiten is not used, we don't need the STD #red_std, green_std, blue_std = bimage_df[['red', # 'green', # 'blue']].std() #for cluster_center in cluster_centers: # red_scaled, green_scaled, blue_scaled = cluster_center # dominant_colors.append(( # red_scaled * red_std / 255, # green_scaled * green_std / 255, # blue_scaled * blue_std / 255 # )) plt.imshow([dominant_colors]) plt.show() ``` --- Result: [](https://i.stack.imgur.com/lgQbC.png)
null
CC BY-SA 4.0
null
2023-01-24T10:31:20.023
2023-01-24T10:38:16.790
2023-01-24T10:38:16.790
4,926,757
4,926,757
null
75,220,953
2
null
30,075,827
1
null
in kotlin you can use following lines ``` val window = this.window window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) window.statusBarColor = ContextCompat.getColor(this, R.color.white) WindowCompat.getInsetsController(window, window.decorView).apply { isAppearanceLightStatusBars = true } ```
null
CC BY-SA 4.0
null
2023-01-24T11:39:06.527
2023-01-24T11:39:06.527
null
null
6,528,374
null
75,221,806
2
null
69,159,036
1
null
This `when` clause should work for both the test commands. ``` { "key": "shift+cmd+t", // "command": "workbench.view.testing.focus", "command": "workbench.view.extension.test", "when": "workbench.view.testing.active" } ```
null
CC BY-SA 4.0
null
2023-01-24T12:55:09.570
2023-01-24T12:55:09.570
null
null
null
null
75,221,858
2
null
4,382,178
0
null
If the Android SDK installation is not able to find the JDK, it may be because the JDK is not installed on your system or it may not be located in the expected location. To fix this issue, you will need to install the JDK if it is not already installed, and then ensure that it is located in the correct location. To check if JDK is installed or not, open command prompt and type "java -version", if JDK is installed it will show the version of JDK otherwise it will show "java is not recognized as an internal or external command" Once you have installed JDK, you may need to update the system environment variable JAVA_HOME to point to the location of the JDK. You can also check the android studio settings. Go to File > Settings > Appearance & Behavior > System Settings > Android SDK > SDK Platforms. Here, you can check whether JDK installed or not. After that, you should be able to install the Android SDK without any issues. Here are the steps to change the system environment variable JAVA_HOME in Windows: 1. Press the Windows key + R to open the Run dialog box. 2. Type "sysdm.cpl" and press Enter to open the System Properties window. 3. Click on the Advanced tab, then click on the Environment Variables button. 4. In the System variables section, scroll down and find the JAVA_HOME variable. If it does not exist, click on the New button to create it. 5. In the Variable name field, type "JAVA_HOME" (without quotes). In the Variable value field, enter the path to the JDK installation directory (e.g., "C:\Program Files\Java\jdk1.8.0_241"). 6. Click OK to close the Environment Variables window, then click OK again to close the System Properties window.
null
CC BY-SA 4.0
null
2023-01-24T13:00:27.740
2023-01-24T13:00:27.740
null
null
21,058,481
null
75,222,057
2
null
75,221,164
-1
null
In such type of if a user provides multiple fields data (e.g Firstname, Lastname, research) then those records from database should be retrieved where all these keywords are matched. It means you should use operator in your SQL query. It is a best approach. If you use "OR" operator then the retrieved records will have no useful information as each data field (e.g Firstname, lastname, research) will have its own records which have no connection with each other. The best approach is to use "AND" operator as below as mentioned in @anant comment but with AND operator: ``` if(!empty($lastname) OR !empty($firstname) OR !empty($_POST['get_research'])) { if(!empty($lastname)) $condition = "Lastname = '$lastname' "; else $condition = "1=1 "; if(!empty($firstname)) $condition .= "AND WHERE Firstname = '$firstname' "; if(!empty($_POST['get_research'])) $condition .= "AND Research LIKE '%" .$research. "%'"; $query = "SELECT * FROM sci_st WHERE ".$condition; } ```
null
CC BY-SA 4.0
null
2023-01-24T13:18:24.097
2023-01-24T13:18:24.097
null
null
2,286,698
null
75,222,164
2
null
75,184,212
0
null
Will need more info to suggest a solution. Especially what do you mean by this > When I run the project with npm start There is no problem and it runs. When I build, it only displays the names of the components : since the code only executes on `npm run start`, `npm run build` is only for bundling the code, we still need to start the app to see anything on the frontend.
null
CC BY-SA 4.0
null
2023-01-24T13:27:29.520
2023-01-24T13:27:29.520
null
null
10,239,206
null
75,222,182
2
null
75,222,141
0
null
Those yellow lines means that the imported modules cannot be located. This probably means that you downloaded the modules into a virtual environment and the modules are not installed globally. You are probably running the script with the correct virtual environment. Open your [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) with + + and choose the correct Python interpreter.
null
CC BY-SA 4.0
null
2023-01-24T13:29:07.033
2023-02-13T17:53:59.923
2023-02-13T17:53:59.923
63,550
19,640,149
null
75,222,949
2
null
73,185,232
1
null
Here is a workaround based on @Quintens answer: ``` library(forestmodel) library(survival) labelled::var_label(colon) <- list( sex = "Sex", #this variable is a numeric -> label works rx = "RX", # factor -> label doesn't work! adhere = "ADHERE" # numeric -> label works... ) model <- coxph(Surv(time, status) ~ sex + rx + adhere, data = colon) print(forest_model(model)) ``` ![](https://i.imgur.com/kXMo4Ne.png) ``` # this does the trick model$xlevels <- unname(model$xlevels) print(forest_model(model)) ``` ![](https://i.imgur.com/6TKUJvC.png) [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2023-01-24T14:29:11.213
2023-01-24T14:29:11.213
null
null
10,043,323
null
75,223,096
2
null
75,222,565
1
null
Try with the following: ``` def model_sine(x, amp, omega, phase, offset): return amp * np.sin(omega * x + phase) + offset poptsin, pcovsine = curve_fit(model_sine, xData, yData, p0=[np.max(yData) - np.min(yData), np.pi/70, 3, np.max(yData)], maxfev=5000) ``` You don't need both `phase` and `z`; one should be enough. I needed to increase the number of allowed function evaluations (`maxfev`); this would probably not be necessary if the data was completely normalised, although it's still close enough to order of 1. [](https://i.stack.imgur.com/3SgnU.png)
null
CC BY-SA 4.0
null
2023-01-24T14:41:28.560
2023-01-24T14:41:28.560
null
null
9,769,953
null
75,223,081
2
null
58,400,991
0
null
To start, I'll say that I agree with others that sigma_absolute is not appropriate here. It's for when you have a known error on your points that you put in as the parameter sigma. Otherwise it should do nothing, and if it does something, it's bad (it might assert that all errors are numerically equal to 1). And next, the central issue here is that your parameters have so much covariance. This is a math problem not a programming problem - but it's not a "primitive question" at all. While it's true that the error on each individual parameter is the square root of the corresponding diagonal element of the covariance matrix, that doesn't necessarily mean that the fit considers it likely that all of your fit parameters can have errors in the same direction. For example, it could be that the fit is saying "the x^4 term can be larger than the fit value, but only if the x^3 term is smaller than the fit value." To make this problem more clear, consider the following pathologically combination of dataset+fit function ``` xstest=[] ystest=[] startx=1000 endx=1100 for i in range(startx,endx): xstest.append(i) ystest.append(np.random.uniform(-1,1)) plt.scatter(xstest,ystest) def myline(x,*p): m,b=p return m*x+b popt,pcov=curve_fit(myline,xstest,ystest,p0=[0,0]) plt.plot([startx,endx],[startx*popt[0]+popt[1],endx*popt[0]+popt[1]]) plt.plot([startx,endx],[startx*(popt[0]+np.sqrt(pcov[0,0]))+(popt[1]+np.sqrt(pcov[1,1])),endx*(popt[0]+np.sqrt(pcov[0,0]))+(popt[1]+np.sqrt(pcov[1,1]))]) plt.plot([startx,endx],[startx*(popt[0]-np.sqrt(pcov[0,0]))+(popt[1]-np.sqrt(pcov[1,1])),endx*(popt[0]-np.sqrt(pcov[0,0]))+(popt[1]-np.sqrt(pcov[1,1]))]) print(pcov) plt.show() ``` We get this plot, which clearly shows our "one sigma" error bars way outside of what can reasonably be inferred from our data [bad errors](https://i.stack.imgur.com/56FUb.png) And indeed our covariance matrix has a large negative value in the off-diagonal ``` [[ 3.67613410e-06 -3.85810273e-03] [-3.85810273e-03 4.05214195e+00]] ``` So how do we properly plot what you meant to plot: the highest values of the fit function that are one sigma away from the central fit function? Start by finding the gradient of the fit function with respect to the parameters. In my case it's [x,1]. In yours it's [x^4,x^3,x^2,x,1]. But either way I'll call it "grad". And I'll call my_error_vec the vector of parameter errors. The condition on the parameter errors is that my_error_vec^T X pcov^(-1) X my_error_vec=1. (You have to trust me on this). Note that in my example if I assume my_error_vec=[sqrt(popt[0,0]),0] I get 1300, not 1. So in my case it is NOT reasonable to assume that the error is sqrt(popt[0,0]) in just one direction. That is moving way too far in one direction without also having a reasonable negative value on the other parameter. So then the question of finding the maximum possible value of f(x) given pcov is a maximum given constraint problem which can be nicely solved using Lagrange multipliers (lambda is my arbitrary multiplier). Condition 1: lambda * grad=pcov^(-1) * params Condition 2: params^T*(pcov^(-1))*params=1 Solving cond 1 and inserting it into cond 2 gives: lambda=+-1/sqrt(grad^T * pcov * grad) and finally we get the parameters (critically a function of x through grad!) params=+-lambda * pcov * grad ^one of these solutions will give the maximum possible value of f, and one the minimum possible value of f So here's my adjusted code ``` plt.show() xstest=[] ystest=[] startx=1000 endx=1100 for i in range(startx,endx): xstest.append(i) ystest.append(np.random.uniform(-1,1)) plt.scatter(xstest,ystest) #plt.ylim(-2,2) def myline(x,*p): m,b=p return m*x+b popt,pcov=curve_fit(myline,xstest,ystest,p0=[0,0]) invpcov=np.linalg.inv(pcov) myerr=np.array([np.sqrt(pcov[0,0]),0]) def my_err_vec(x): gradvec=np.array([x,1]) norm=np.matmul(gradvec.T,np.matmul(pcov,gradvec)) lambd=np.sqrt(1/norm) return np.matmul(pcov,lambd*gradvec) plt.plot([startx,endx],[startx*popt[0]+popt[1],endx*popt[0]+popt[1]]) ys_err_pos=[myline(x,*(popt-my_err_vec(x))) for x in xstest] plt.plot(xstest,ys_err_pos) ys_err_pos=[myline(x,*(my_err_vec(x)+popt)) for x in xstest] plt.plot(xstest,ys_err_pos) plt.show() ``` And I get the nice result here - which has all the qualitative features you might expect, like the error lines being nonlinear and bigger on the edge than in the center. [Fixed errors](https://i.stack.imgur.com/eEwLz.png)
null
CC BY-SA 4.0
null
2023-01-24T14:40:23.820
2023-01-24T16:03:27.923
2023-01-24T16:03:27.923
21,073,194
21,073,194
null
75,223,126
2
null
75,221,771
0
null
Here is an excerpt from a workflow that calculates remaining time by subtracting spent time from estimation: ``` action: (ctx) => { const issue = ctx.issue; var periodestimate = issue.Estimation; var minutesestimate = !periodestimate ? 0 : (periodestimate.getMinutes() + 60 * (periodestimate.getHours() + 8 * (periodestimate.getDays() + 5 * periodestimate.getWeeks()))); var periodspent = ctx.issue.fields.SpentTime; var minutesspent = !periodspent ? 0 : (periodspent.getMinutes() + 60 * (periodspent.getHours() + 8 * (periodspent.getDays() + 5 * periodspent.getWeeks()))); var remain = minutesestimate - minutesspent; ctx.issue.fields.Remaining = dateTime.toPeriod(remain + 'm'); }, ``` I suppose that you can use it as an example to calculate the needed percentage.
null
CC BY-SA 4.0
null
2023-01-24T14:43:47.333
2023-01-24T14:43:47.333
null
null
14,879,238
null
75,223,348
2
null
71,620,402
0
null
All of your case statements have a line break at the end. ``` "Case_4": { "case": "Serviço de Consultas\n", "actions": { "Send_an_email_notification_(V3)_3": { ... } } } } ```
null
CC BY-SA 4.0
null
2023-01-24T15:02:01.170
2023-01-24T15:02:01.170
null
null
21,073,686
null
75,223,377
2
null
75,216,737
0
null
You need to convert "Sample" column in factors according to the order you want. In your example, it seems that the data frame is already ordered. With the data frame you provided you just need to do this: ``` libSizes$Sample=factor(libSizes$Sample, levels = unique(libSizes$Sample)) ``` And then use the exact same plotting: ``` ggplot(data = libSizes, aes(x = Sample, y = Counts/1e6, fill = Cell.Type)) + labs(fill = "CellType", x = "Sample", y = "Counts (CPM)") + geom_bar(stat = "identity", position = 'dodge') + scale_fill_brewer(palette = "Set2") + theme_minimal() ``` If you want other orders you need to sort the data frame as you want. For instance, let's say that you want TFB shown before "hiPSC": By doing the following you will have on the first lines TFB, then hiPSC. After than you convert the "Sample" column according to the new order. ``` libSizes=libSizes[order(libSizes$Cell.Type, decreasing = TRUE),] libSizes$Sample=factor(libSizes$Sample, levels = unique(libSizes$Sample)) ``` Here the result of the first part of the code: [](https://i.stack.imgur.com/3nEd6.png) And here the result of the second part of the code with the new order: [](https://i.stack.imgur.com/XDN5B.png)
null
CC BY-SA 4.0
null
2023-01-24T15:04:46.453
2023-01-24T15:04:46.453
null
null
1,172,439
null
75,223,630
2
null
75,216,362
0
null
From a comment by [Albert D. Kallal](https://stackoverflow.com/users/10527/albert-d-kallal): > there should be a file called Web.SiteMap - that's what drives the SiteMapPath control that is dropped into each page that you want that breadcrumb list. It is not maintained automatic, but maintained by you. So YOU have to maintain that Web.SiteMap, and put what pages you want into that file. You THEN drop a SiteMapPath control onto each form that you want that site map list.
null
CC BY-SA 4.0
null
2023-01-24T15:27:12.090
2023-01-29T14:38:32.867
2023-01-29T14:38:32.867
4,957,508
19,446,520
null
75,223,710
2
null
75,222,141
0
null
For me, modules who have a yellow line under them are ones that your program doesn't need. If I import a module that my program doesn't need functions from, a yellow line will show under it. To fix this issue, hover over the statement with the yellow line under it, then click on `Fix Issue`. A list will appear, with the first item probably being `Remove unused import statements`. If, however, the list item says something like `Select Python interpreter`, then [this](https://stackoverflow.com/a/75222182/20585541) answer would fix your problem.
null
CC BY-SA 4.0
null
2023-01-24T15:32:32.853
2023-01-25T15:27:30.527
2023-01-25T15:27:30.527
20,585,541
20,585,541
null
75,223,820
2
null
75,223,641
0
null
When you're using the following query: ``` val query = collection .whereEqualTo("datetime", dateTime1) ``` It means that you're trying to get all documents from `presensi` collection, where the value of `datetime` field is equal to the value of `dateTime1`. This will not work because the `dateTime1` is a string while the `datetime` field in the database holds a Date object. To make it work, you need to pass to the `whereEqualTo()` method as the second argument a [Date](https://docs.oracle.com/javase/7/docs/api/java/util/Date.html) object and a string.
null
CC BY-SA 4.0
null
2023-01-24T15:41:50.447
2023-01-24T15:41:50.447
null
null
5,246,885
null
75,224,090
2
null
16,399,279
0
null
A clarification about this module: When comparing a set of measurements with one from a reference method, a common mistake regarding the Bland-Altman plot is to use the average of the two measurments as x- values. According to Bland&Altman, in case where a reference method exists, we should plot the reference values as x values instead of the average of the 2 measurements. Sadly, this possibility is laking in the dedicated module (as in R).
null
CC BY-SA 4.0
null
2023-01-24T16:01:40.507
2023-01-25T13:14:24.240
2023-01-25T13:14:24.240
13,825,792
13,825,792
null
75,224,191
2
null
59,602,653
0
null
Try Plotly Gantt Charts [https://plotly.com/python/gantt/](https://plotly.com/python/gantt/) The benefit of using this is, you can use actual time as value and also separate ressources and tasks.
null
CC BY-SA 4.0
null
2023-01-24T16:08:50.453
2023-01-24T16:08:50.453
null
null
16,272,717
null
75,224,256
2
null
75,111,824
0
null
I have Found The Solution of this Problem. I've use implode(',' , $request->veh_reg_num) Then I use $datas = explode() function then I use foreach() With exploded Vairable as foreach($datas as $data => $value){ match the each row that with $data array then I Update the values to data base }
null
CC BY-SA 4.0
null
2023-01-24T16:14:12.820
2023-01-24T16:14:12.820
null
null
21,001,546
null