Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
sequence
74,620,147
2
null
74,619,838
0
null
As it looks like you are parsing some very simple HTML data, I think you could simply use xmltodict package for this: ``` data = [] for txt in txt_files: with open(txt, "r") as file: data += [xmltodict.parse(file.read())] json_str = json.dumps(data) ```
null
CC BY-SA 4.0
null
2022-11-29T20:54:28.387
2022-11-29T20:54:28.387
null
null
12,797,458
null
74,620,183
2
null
74,619,534
1
null
As your dataframe is not clean (the 2 first rows are a multiindex column name), you can first create the inner dataframe before melting it : ``` new_df = pd.DataFrame(df.iloc[2:,1:]).set_index(df.iloc[2:,0]) new_df.columns = pd.MultiIndex.from_frame(df.iloc[:2,1:].T) new_df.melt(ignore_index=False).reset_index() ```
null
CC BY-SA 4.0
null
2022-11-29T20:59:07.793
2022-11-29T20:59:07.793
null
null
13,970,089
null
74,620,605
2
null
74,620,564
1
null
You need to add a label to your BottomNavigationBarItem. It must not be null. Here's the example: ``` BottomNavigationBarItem( label: 'Some String' ); ```
null
CC BY-SA 4.0
null
2022-11-29T21:50:33.883
2022-11-29T21:50:33.883
null
null
10,551,887
null
74,621,327
2
null
74,621,243
1
null
There are two issues in `create_an_image()`: - `img``self.img`- `file``PhotoImage()` ``` def create_an_image(self, file, x, y): # use instance variable self.img instead of local variable img # use file option of PhotoImage self.img = PhotoImage(file=file) self.create_image(x, y, image=self.img, tags=('imagec',)) ```
null
CC BY-SA 4.0
null
2022-11-29T23:22:52.600
2022-11-29T23:22:52.600
null
null
5,317,403
null
74,621,482
2
null
74,619,174
0
null
I tested it and it works well with `MONTH` partition : ``` def create_table_time_partitioning_month(self): from google.cloud import bigquery client = bigquery.Client() project = client.project dataset_ref = bigquery.DatasetReference(project, 'my_dataset') table_ref = dataset_ref.table("my_partitioned_table") schema = [ bigquery.SchemaField("name", "STRING"), bigquery.SchemaField("post_abbr", "STRING"), bigquery.SchemaField("date", "DATE"), ] table = bigquery.Table(table_ref, schema=schema) table.time_partitioning = bigquery.TimePartitioning( type_=bigquery.TimePartitioningType.MONTH, field="date" ) table = client.create_table(table) print( "Created table {}, partitioned on column {}".format( table.table_id, table.time_partitioning.field ) ) ``` I used the following import : ``` from google.cloud import bigquery ``` Also, check if you have the correct `Python` [package](https://pypi.org/project/google-cloud-bigquery/) installed in your image : requirements.txt ``` google-cloud-bigquery==3.4.0 ``` ``` pip install -r requirements.txt ```
null
CC BY-SA 4.0
null
2022-11-29T23:50:23.143
2022-11-29T23:50:23.143
null
null
9,261,558
null
74,621,687
2
null
74,609,062
0
null
Figured it out! It doesn't work if I set the item.vidPath to '@/assets/homeVid.mp4' and do: ``` :src="require(item.vidPath)" ``` But if item.vidPath is just equal to 'homeVid.mp4' and the start of the string is harcoded, it works: ``` :src="require('@/assets/' + item.vidPath) ``` So it looks like this in the v-for loop: ``` <section v-if="loaded" class="port-content"> <div class="item-box reveal" v-for="item in this.items" v-bind:key="item._id"> <div class="item-info-wrapper"> <h2>{{ item.title }}</h2> <div class="tag-row"> <h3 v-for="tag in item.tags" v-bind:key="tag">{{ tag }}</h3> </div> <p>{{ item.description }}</p> <a href=item.repoLink></a> </div> <div class="item-vid-wrapper"> <video :src="require('@/assets/' + item.vidPath)" type="video/" controls> </video> </div> </div> </section> ```
null
CC BY-SA 4.0
null
2022-11-30T00:31:26.623
2022-11-30T00:31:26.623
null
null
20,629,184
null
74,621,812
2
null
74,620,855
0
null
I use images in vue: ``` <template> <img class="avatar__img" src="src/assets/img/task.png" alt="profile avatar"> or <img class="task__img" :src="task.img" :alt="task.alt"> </template> <script> const task = { alt: 'alt for task 1', img: 'src/assets/img/task.png', } </script> ``` : projectName/src/assets/img/task.png : projectName/src/pages/tasks/index.vue
null
CC BY-SA 4.0
null
2022-11-30T00:58:47.227
2022-11-30T01:00:48.683
2022-11-30T01:00:48.683
20,639,512
20,639,512
null
74,621,831
2
null
74,620,855
0
null
use a js object to record the icons info ``` export default { icon1: require('@/assets/.......'), icon2: require('@/assets/.......'), icon3: require('@/assets/.......'), icon4: require('@/assets/.......'), } ``` then you can use these icons in your code everywhere
null
CC BY-SA 4.0
null
2022-11-30T01:02:46.970
2022-11-30T01:02:46.970
null
null
10,786,018
null
74,622,138
2
null
74,603,452
0
null
You can get an overlay by its id from a connection: ``` const o = someConnection.getOverlay("anOverlayId") o.setLabel("new label value"); ``` you set the ID for an overlay in the overlay options.
null
CC BY-SA 4.0
null
2022-11-30T02:08:18.607
2022-11-30T02:08:18.607
null
null
13,761,887
null
74,622,135
2
null
74,612,097
0
null
If you think you have found a bug you'd be best off opening an issue on [Github](https://github.com/jsplumb/jsplumb) ( I refer to your statement "when the child element of a group is dragged the connection is broken" ). Regarding switching off drag inside a group, there is a `setDraggable(el, state)` method available on the jsPlumb instance which you could call to disable drag for some element.
null
CC BY-SA 4.0
null
2022-11-30T02:06:43.157
2022-11-30T02:06:43.157
null
null
13,761,887
null
74,622,302
2
null
65,559,254
0
null
dot point Issue ~ the dot Point on right bottom of each Numbers seem to impact especially the recognition rate of right botton side variable vr2 #6 checking while checking Numpy.NonZero(in your sample code) when dot point was light on (while image threshed & findcontours)
null
CC BY-SA 4.0
null
2022-11-30T02:37:17.973
2022-11-30T02:37:17.973
null
null
13,151,228
null
74,622,384
2
null
70,821,189
0
null
Maybe you need to check weather you set global `styleSheet` with `background-color: rgb(255, 255, 255);`. It would make text disappear while only show white background.
null
CC BY-SA 4.0
null
2022-11-30T02:56:40.913
2022-11-30T02:57:02.663
2022-11-30T02:57:02.663
20,640,297
20,640,297
null
74,622,479
2
null
74,610,818
0
null
You can do something like this to simulate Startup.cs and then have IConfiguration. Personally, I find Startup.cs more readable. In you appsettings: ``` "Employee": { "Title": "Mr", "Name": "Joe Smith" } ``` Corresponding POCO: ``` public class EmployeeOptions { public const string Employee = "Employee"; public string Title { get; set; } = String.Empty; public string Name { get; set; } = String.Empty; } ``` Now, either you can use IOptions or IOptionsSnapshot in your controller or service, or you can dependency injection like below in Startup.cs. ``` public class Program { public static void Main(string[] args) { var builder = WebApplication.CreateBuilder(args); var startup = new Startup(builder.Configuration); startup.RegisterServices(builder.Services); var app = builder.Build(); startup.SetupMiddlewares(app); app.Run(); } } ``` Then create a file called Startup.cs and inject IConfiguration. ``` public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration Configuration { get; } public void RegisterServices(IServiceCollection services) { services.Configure<EmployeeOptions>( Configuration.GetSection(EmployeeOptions.Employee)); } public void SetupMiddlewares(WebApplication app) { // Configure the HTTP request pipeline. if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Home/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); app.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); } } ```
null
CC BY-SA 4.0
null
2022-11-30T03:12:38.227
2022-11-30T03:22:46.450
2022-11-30T03:22:46.450
2,549,110
2,549,110
null
74,622,580
2
null
74,622,428
1
null
To generate a list of `Column`'s dynamically, you can use `List.generate()`: ``` final bedsAvailable = 5; final beds = List.generate( bedsAvailable, (index) => Column( children: [ Text('Bed $index'), ], ), ); ``` --- Or: you can use a for loop: ``` final _beds = [ for (var i = 0; i < bedsAvailable; i++) Text( 'Bed $i', ), ]; ``` Note: if `bedsAvailable` in your example is a `String`, you'll have to convert it to an `int`: ``` final bedsAvailableInt = int.parse(bedsAvailable); ```
null
CC BY-SA 4.0
null
2022-11-30T03:29:51.263
2022-11-30T03:44:31.300
2022-11-30T03:44:31.300
12,349,734
12,349,734
null
74,622,596
2
null
74,622,572
0
null
``` if column %2 == 0 and row %2 == 1: ... elif row %2 ==0 and column %2 == 1: ... ``` This covers the case where column is even and row is odd, and the case where row is even and column is odd. But what about the cases where they are both even, or both odd?
null
CC BY-SA 4.0
null
2022-11-30T03:32:34.920
2022-11-30T03:32:34.920
null
null
494,134
null
74,622,719
2
null
74,622,572
0
null
``` x = int(input("Please enter your (x) first number 1-8::")) y = int(input("Please enter your (y) second number 1-8::")) column = x row = y if (column + row) %2 == 0: print("") print("black") elif (column + row) %2 == 1: print("") print("white") else: print("Input valid number!!") ```
null
CC BY-SA 4.0
null
2022-11-30T03:55:52.363
2022-11-30T03:55:52.363
null
null
17,673,025
null
74,622,765
2
null
74,622,572
1
null
Instead of looking at x and y separately, just check the sum. If the sum is even, it's black, if the sum is odd, it is white. I added a lookup of the name in a python dict, but you can just do it with `if` conditions if you prefer. ``` x = int(input("Please enter your (x) first number 1-8::")) y = int(input("Please enter your (y) second number 1-8::")) color_picker = {0: "Black", 1: "White"} if not 0<x<9 or not 0<y<9: print("Input valid number!!") else: color print(color_picker[(x+y)%2]) ``` Let me know if it helps.
null
CC BY-SA 4.0
null
2022-11-30T04:02:31.997
2022-11-30T04:02:31.997
null
null
18,781,246
null
74,622,957
2
null
74,590,199
1
null
Please refer the following Modelica code: ``` model Test Modelica.Blocks.Nonlinear.SlewRateLimiter slewRateLimiter(Td = 0.5) annotation( Placement(visible = true, transformation(origin = {-4, 30}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Blocks.Sources.BooleanPulse booleanPulse(period = 10) annotation( Placement(visible = true, transformation(origin = {-82, 30}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Blocks.Math.BooleanToReal booleanToReal annotation( Placement(visible = true, transformation(origin = {-44, 30}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); equation connect(booleanToReal.u, booleanPulse.y) annotation( Line(points = {{-56, 30}, {-70, 30}}, color = {255, 0, 255})); connect(booleanToReal.y, slewRateLimiter.u) annotation( Line(points = {{-32, 30}, {-16, 30}}, color = {0, 0, 127})); annotation( uses(Modelica(version = "4.0.0"))); end Test; ``` The above code produces the following output for a Boolean pulse (`Modelica.Blocks.Sources.BooleanPulse`) input: [](https://i.stack.imgur.com/nPk3N.png) Hope this helps!
null
CC BY-SA 4.0
null
2022-11-30T04:38:33.187
2022-11-30T04:38:33.187
null
null
16,020,568
null
74,623,197
2
null
49,095,692
0
null
1. Right click on Visual Studio Code icon on desktop. 2. Click on properties. 3. Click on compatibility setting. 4. In compatibility mode, uncheck the "Run this program in compatibility mode for..." 5. Click on apply. 6. Refresh the desktop and open VScode, Boom!, it'll work now!.
null
CC BY-SA 4.0
null
2022-11-30T05:21:56.330
2022-11-30T05:21:56.330
null
null
20,641,359
null
74,623,411
2
null
74,619,305
0
null
The answer is from [Mike](https://stackoverflow.com/users/10118270/mike): Adding meta charset="UTF-8" to your html should fix it, see [stackoverflow.com/a/52016347/10118270](https://stackoverflow.com/a/52016347/10118270)
null
CC BY-SA 4.0
null
2022-11-30T05:54:36.817
2022-11-30T05:54:36.817
null
null
20,624,099
null
74,623,431
2
null
74,617,574
0
null
``` setContentView(R.layout.activity_main); ``` LinearLayout linearLayout = findViewById(R.id.linearlayout); MyView mView = new MyView(this); mView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); linearLayout.addView(mView);
null
CC BY-SA 4.0
null
2022-11-30T05:56:17.333
2022-11-30T05:56:17.333
null
null
19,949,241
null
74,623,460
2
null
29,398,886
0
null
I did in Android Studio to fix the problem
null
CC BY-SA 4.0
null
2022-11-30T06:00:33.693
2022-11-30T06:00:33.693
null
null
5,330,567
null
74,623,603
2
null
74,623,222
0
null
This should work: ``` Sub MatrixCount() Const MATRIX_TOPLEFT As String = "E2" 'top-left corner of matrix output Dim ws As Worksheet, rw As Range, dictR As Object, dictC As Object Dim lkhood, impact, c As Range Set dictR = CreateObject("scripting.dictionary") 'for tracking row/column offsets Set dictC = CreateObject("scripting.dictionary") Set ws = ActiveSheet Set c = ws.Range(MATRIX_TOPLEFT) 'top-left corner of matrix output For Each rw In ws.Range("A2:B10").Rows 'loop over the data impact = rw.Cells(2).Value If Not dictR.exists(impact) Then 'first time for this value? dictR.Add impact, dictR.Count + 1 'assign a row offset c.Offset(dictR.Count, 0).Value = impact 'add the row header End If lkhood = rw.Cells(1).Value If Not dictC.exists(lkhood) Then dictC.Add lkhood, dictC.Count + 1 'assign a column offset c.Offset(0, dictC.Count).Value = lkhood 'add the column header End If With c.Offset(dictR(impact), dictC(lkhood)) .Value = .Value + 1 'increment the value using both offsets End With Next rw End Sub ```
null
CC BY-SA 4.0
null
2022-11-30T06:22:08.213
2022-11-30T06:22:08.213
null
null
478,884
null
74,623,916
2
null
4,861,380
0
null
I have the same error. It might be because your PC was forced to shut down at night. My solution was go to the path `C:\Users\<find your user profile>\AppData\Local\javasharedresources` and delete the file inside this folder
null
CC BY-SA 4.0
null
2022-11-30T07:00:41.243
2022-12-11T00:10:10.423
2022-12-11T00:10:10.423
13,376,511
20,642,297
null
74,624,067
2
null
74,622,100
0
null
I would first clean up the things you don't want to keep (like `MRS.` or `MD`), then split the resulting string: ``` select elements[1] as first_name, elements[2] as last_name from ( select regexp_split_to_array(regexp_replace(name, '\s*(MRS.|MR.|MD)\s*', '', 'g'), '\s+') as elements from flores_comahue ) t ``` The `regexp_replace()` can be extended to remove more titles or "noise". I used `regexp_split_to_array()` rather than `string_to_array()` to deal with values that use more than one space to separate the words. [Online example](https://dbfiddle.uk/T_5-To0n)
null
CC BY-SA 4.0
null
2022-11-30T07:16:05.580
2022-11-30T07:32:59.373
2022-11-30T07:32:59.373
330,315
330,315
null
74,625,198
2
null
74,623,492
0
null
Here is a very basic example using pandas, datetime index and matplotlib altogether. It is important to make sure the index is of type `DatetimeIndex`. ``` import pandas as pd import matplotlib.pyplot as plt df = pd.DataFrame({'a':[3,4,5]}, index=pd.date_range('2020-01-03', '2020-01-05', freq='D')) df_2 = pd.DataFrame({'b':[1,2,3,4,5], 'c':[1,2,2,2,2]}, index=pd.date_range('2020-01-01', '2020-01-05', freq='D')) # plot daily vaccinated fig, ax1= plt.subplots(1,figsize=(10,5)) # set up ax1.plot(df.index, df['a'], label= 'Total Vaccinated', c='Red') # axis and legend settings ax1.set_ylabel('population (millions)', size= 14) ax1.set_title('Monthly Vaccinated Numbers', size= 20) plt.xticks(rotation=45) plt.grid() ax1.legend(loc="upper left") ########################################################## # plot daily covid cases ax2 = ax1.twinx() # np.arrange looks at the number of rows ax2.xaxis.tick_top() ax2.plot(df_2.index, df_2['b'], color='Orange') plt.xlabel('date', fontsize=14) plt.ylabel('population (thousands)', fontsize=14) plt.grid(False) ``` [](https://i.stack.imgur.com/txN6l.png) This means in your case, you have to make sure to set `parse_dates=True` and set the index, when your read your data. Using `pd.read_csv()` this could look like ``` df = pd.read_csv('covid.csv', sep=',', parse_dates=True, index_col=0) ``` Because you have to DataFrames, you have so make yure both have a DatetimeIndex. Afterwards just replace the columns in the two calls with `ac.plot()`. Comment: If you want to plot all columns of a Dataframe, `ax2.plot(df_2.index, df_2)` works. If your want to select a subset of columns `ax2.plot(df_2.index, df_2[['b', 'c']])` is doing the job.
null
CC BY-SA 4.0
null
2022-11-30T09:07:08.497
2022-11-30T09:07:08.497
null
null
14,058,726
null
74,625,524
2
null
21,407,988
0
null
[](https://i.stack.imgur.com/OCucG.png) ``` table thead { background-color: var green !important; } table tr { border-bottom: 1.5px solid grey; } table thead tr:first-of-type { border-bottom: 0; } table tr th { border: 0; } table tr td { border: 0; } ```
null
CC BY-SA 4.0
null
2022-11-30T09:35:58.513
2022-11-30T09:35:58.513
null
null
14,982,115
null
74,625,890
2
null
74,552,478
0
null
- I have a work around where you download the video file on you own instead of the `videohash` using `azure.storage.blob`- To download you will need a `BlobServiceClient` , `ContainerClient` and connection string of azure storage account.- Please create two files called `v1.mp3` and `v2.mp3` before downloading the video. file structure: ![enter image description here](https://i.imgur.com/QgCAush.png) Complete Code: ``` import logging from videohash import VideoHash import azure.functions as func import subprocess import tempfile import os from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient def main(req: func.HttpRequest) -> func.HttpResponse: # local file path on the server local_path = tempfile.gettempdir() filepath1 = os.path.join(local_path, "v1.mp3") filepath2 = os.path.join(local_path,"v2.mp3") # Reference to Blob Storage client = BlobServiceClient.from_connection_string("<Connection String >") # Reference to Container container = client.get_container_client(container= "test") # Downloading the file with open(file=filepath1, mode="wb") as download_file: download_file.write(container.download_blob("v1.mp3").readall()) with open(file=filepath2, mode="wb") as download_file: download_file.write(container.download_blob("v2.mp3").readall()) // video hash code . videohash1 = VideoHash(path=filepath1) videohash2 = VideoHash(path=filepath2) t = videohash2.is_similar(videohash1) return func.HttpResponse(f"Hello, {t}. This HTTP triggered function executed successfully.") ``` Output : ![enter image description here](https://i.imgur.com/JqIZ9cE.png) Now here I am getting the `ffmpeg` error which related to my test file and not related to error you are facing. This work around as far as I know will not affect performance as in both scenario you are downloading blobs anyway
null
CC BY-SA 4.0
null
2022-11-30T10:03:58.720
2022-11-30T10:03:58.720
null
null
13,427,068
null
74,626,065
2
null
71,451,090
1
null
In VS Code, go to `Settings` and in the search box, type `explorer.openEditors.visible`. Set the value in the dialogue box to any number greater than `0` and you are good to go. Refer to the image below. [](https://i.stack.imgur.com/B1F5U.png)
null
CC BY-SA 4.0
null
2022-11-30T10:16:17.433
2022-11-30T10:16:17.433
null
null
10,550,257
null
74,626,435
2
null
40,562,681
0
null
For those looking now, latest version are as follows: ``` <dependency> <groupId>com.microsoft.azure</groupId> <artifactId>azure-storage</artifactId> <version>8.0.0</version> </dependency> <dependency> <groupId>com.microsoft.azure</groupId> <artifactId>azure-servicebus</artifactId> <version>3.6.7</version> </dependency> ```
null
CC BY-SA 4.0
null
2022-11-30T10:43:55.677
2022-11-30T10:43:55.677
null
null
8,580,855
null
74,626,705
2
null
13,672,720
3
null
``` setwd(this.path::here()) ``` works both for sourced and "active" scripts.
null
CC BY-SA 4.0
null
2022-11-30T11:02:32.810
2022-11-30T11:02:32.810
null
null
20,644,375
null
74,626,772
2
null
71,732,681
0
null
Foreach is constrained compared to a 'for' loop. One way to fool ForEach into behaving differently is to create a shadow array for ForEach to loop through. My purpose was slightly different than yours, but the workaround below seems like it could solve your challenge as well. ``` import SwiftUI let images = ["house", "gear", "car"] struct ContentView: View { var body: some View { VStack { let looper = createCounterArray() ForEach (looper, id:\.self) { no in Image(systemName: images[no]) .imageScale(.large) .foregroundColor(.accentColor) Text("Hello, world!") } .padding() } } } // // return an array of the simulated loop data. // func createCounterArray() -> [Int] { // create the data needed return Array(arrayLiteral: 0,1,1,2) } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } ```
null
CC BY-SA 4.0
null
2022-11-30T11:08:10.837
2022-11-30T11:08:10.837
null
null
4,860,907
null
74,626,908
2
null
73,423,933
0
null
I also faced this problem then I found the solution by using Vite legacy plugin [@vitejs/plugin-legacy](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy) example: ``` // vite.config.js import legacy from '@vitejs/plugin-legacy' export default { plugins: [ legacy({ targets: ['defaults', 'not IE 11'], }), ], } ```
null
CC BY-SA 4.0
null
2022-11-30T11:18:17.530
2023-01-17T04:55:53.747
2023-01-17T04:55:53.747
12,468,412
12,468,412
null
74,627,252
2
null
22,334,760
1
null
you can use phpmyadmin SQL query(s) view - show variables like 'max_allowed_packet' set - set global max_allowed_packet=33554432
null
CC BY-SA 4.0
null
2022-11-30T11:44:28.297
2022-11-30T11:44:28.297
null
null
11,547,086
null
74,628,095
2
null
71,938,036
0
null
it is because, static return type is available only for PHP 8, I have same issue, just for temporary you can change `.\vendor\psr\cache\src\CacheItemInterface.php` line number 75 just remove return type static like this `public function set($value);`
null
CC BY-SA 4.0
null
2022-11-30T12:52:08.430
2022-11-30T12:52:08.430
null
null
10,305,412
null
74,628,092
2
null
74,076,140
3
null
This might happen if a run configuration was imported from another computer. Run configuration can contain a path to a Python interpreter from that computer. By default, run configurations are stored in `.idea/runConfigurations/*.xml`. If you pull up `.idea/runConfigurations/<your-configuration>.xml` you'll probably notice a fixed path to the Python interpreter somewhere in there, e.g.: ``` <option name="SDK_HOME" value="$USER_HOME$/.local/share/virtualenvs/your-project-name-XXXXXXXX/bin/python" /> ``` alongside with ``` <option name="IS_MODULE_SDK" value="false" /> ``` It that's true try changing those lines to ``` <option name="SDK_HOME" value="" /> <option name="IS_MODULE_SDK" value="true" /> ``` This will make your IntelliJ IDE look for Python in your local project's virtual environment folder. --- Basically, like folks have already mentioned before, simple recreation of your run configuration by hand will help because it will disregard other machine's settings and apply yours, but sometimes it may cumbersome (especially, if your run configuration contains some project-specific environment variables and other stuff which can be tedious to copy over). So, just changing those two lines in the run configuration XML file should help without recreating it manually again from scratch. The nastiest thing about this situation with Python path is that when you import a run configuration for a Python project from another machine with Python path being hardcoded PyCharm will still keep showing you yours in the Edit Configurations window making it really hard to track down and fix, so in this very specific case don't believe what you see in the run configuration UI -- just go and check the run configuration XML config behind.
null
CC BY-SA 4.0
null
2022-11-30T12:51:56.913
2022-11-30T12:51:56.913
null
null
5,325,000
null
74,628,123
2
null
74,600,498
0
null
You can use the `Path.GetRelativePath` method to get the path relative to parent of the main container folder. ``` static string[] files = { @"C:\Need Help\Main Folder\File 1.max", @"C:\Need Help\Main Folder\Sub 1\File 2.max", @"C:\Need Help\Main Folder\Sub 1\Sub 8\Sub 9\Sub lO\File 3.max", @"C:\Need Help\Main Folder\Sub 2\Sub ll\File 4.max", @"C:\Need Help\Main Folder\Sub 3\Sub 12\File 5.max", @"C:\Need Help\Main Folder\Sub 4\Sub 13\File 6.max", @"C:\Need Help\Main Folder\Sub 4\Sub 13\File 7.max", @"C:\Need Help\Main Folder\Sub 5\Sub 14\File 8.max", @"C:\Need Help\Main Folder\Sub 5\Sub 14\Sub 15\File 9.max", @"C:\Need Help\Main Folder\Sub 6\Sub 16\Sub 17\File 10.max", @"C:\Need Help\Main Folder\Sub 7\Sub 18\File 11.max" }; public static void Test() { string mainFolder = @"C:\Need Help\Main Folder"; foreach (string file in files) { string fileName = Path.GetFileName(file); string folder = Path.GetDirectoryName(file); string mainSubFolder = Path.GetRelativePath(mainFolder, folder); if (mainSubFolder == ".") { // We are in the main container folder. // Get last part of main container folder. mainSubFolder = Path.GetFileName(mainFolder); } else { // Get first part of the subfolder path. int i = mainSubFolder.IndexOf('\\'); if (i >= 0) { mainSubFolder = mainSubFolder.Substring(0, i); } } Console.WriteLine($"Full path: {file}"); Console.WriteLine($"Main folder: {mainSubFolder, -15} File name: {fileName}"); Console.WriteLine(); } } ``` Prints: ``` Full path: C:\Need Help\Main Folder\File 1.max Main folder: Main Folder File name: File 1.max Full path: C:\Need Help\Main Folder\Sub 1\File 2.max Main folder: Sub 1 File name: File 2.max Full path: C:\Need Help\Main Folder\Sub 1\Sub 8\Sub 9\Sub lO\File 3.max Main folder: Sub 1 File name: File 3.max Full path: C:\Need Help\Main Folder\Sub 2\Sub ll\File 4.max Main folder: Sub 2 File name: File 4.max Full path: C:\Need Help\Main Folder\Sub 3\Sub 12\File 5.max Main folder: Sub 3 File name: File 5.max Full path: C:\Need Help\Main Folder\Sub 4\Sub 13\File 6.max Main folder: Sub 4 File name: File 6.max Full path: C:\Need Help\Main Folder\Sub 4\Sub 13\File 7.max Main folder: Sub 4 File name: File 7.max Full path: C:\Need Help\Main Folder\Sub 5\Sub 14\File 8.max Main folder: Sub 5 File name: File 8.max Full path: C:\Need Help\Main Folder\Sub 5\Sub 14\Sub 15\File 9.max Main folder: Sub 5 File name: File 9.max Full path: C:\Need Help\Main Folder\Sub 6\Sub 16\Sub 17\File 10.max Main folder: Sub 6 File name: File 10.max Full path: C:\Need Help\Main Folder\Sub 7\Sub 18\File 11.max Main folder: Sub 7 File name: File 11.max ``` --- With .NET Framework versions not having the `Path.GetRelativePath` method, you can use this: ``` string mainFolder = @"C:\Need Help\Main Folder"; foreach (string file in files) { string fileName = Path.GetFileName(file); string folder = Path.GetDirectoryName(file); string mainSubFolder; if (folder == mainFolder) { // We are in the main container folder. // Get last part of main container folder. mainSubFolder = Path.GetFileName(mainFolder); } else { mainSubFolder = folder.Substring(mainFolder.Length + 1); // + 1 for the "\". // Get first part of the subfolder path. int i = mainSubFolder.IndexOf('\\'); if (i >= 0) { mainSubFolder = mainSubFolder.Substring(0, i); } } Console.WriteLine($"Full path: {file}"); Console.WriteLine($"Main folder: {mainSubFolder,-15} File name: {fileName}"); Console.WriteLine(); } ```
null
CC BY-SA 4.0
null
2022-11-30T12:54:14.147
2022-11-30T16:26:04.350
2022-11-30T16:26:04.350
880,990
880,990
null
74,628,230
2
null
74,627,229
0
null
Assuming you have `df` and `df2`, you can use `merge`. ``` df.merge(df2, on = 'Year') ``` You may also want to study [joins](https://www.w3schools.com/sql/sql_join.asp). Although the link is SQL-based, you will learn the basics of joining tables in order to create more complex joins.
null
CC BY-SA 4.0
null
2022-11-30T13:01:34.450
2022-11-30T13:01:34.450
null
null
6,927,944
null
74,628,357
2
null
64,797,972
0
null
> Keep your package.json scripts as default next scripts: ``` "scripts": { "dev": "next dev", "build": "next build", "start": "next start", } ``` VS Code - Azure Extension - > SCM_DO_BUILD_DURING_DEPLOYMENT="true" - - [](https://i.stack.imgur.com/aa3lH.png) : CI/CD Pipeline through Azure Devops([https://dev.azure.com/](https://dev.azure.com/)) Here is a sample post you can refer All credits goes to [https://itbusinesshub.com/blog/nextjs-node-app-on-azure-app-service/#how-to-host-next.js-app-on-azure's-app-service](https://itbusinesshub.com/blog/nextjs-node-app-on-azure-app-service/#how-to-host-next.js-app-on-azure%27s-app-service) - - -
null
CC BY-SA 4.0
null
2022-11-30T13:11:08.093
2022-11-30T13:27:55.313
2022-11-30T13:27:55.313
8,904,347
8,904,347
null
74,628,861
2
null
74,628,576
1
null
Your code has some problems. 1. It's not good to write your footer inside Song component. Because the footer does not belong to a single Song. 2. You should declare your state in parent component (LikedSongs) and also the onClick function. 3. No need to declare any other states in the Song component. 4. No need to pass each song property one by one. Instead pass the whole song object to the Song component as a property. 5. Your useEffect must run only once so you should pass an empty array as the dependency. So this will help you: ``` import React, { useState } from "react"; import "./LikedSongs.css"; import Sidebar from "./Sidebar"; import { useEffect } from "react"; import axios from "axios"; import Footer from "./Footer"; function Song(props) { function handleSong(e) { e.preventDefault(); props.handleSongClick(props.song); } return ( <div> <li className="songItem" onClick={handleSong}> <span>{props.song.count}</span> <h5> {props.song.songname} <div className="subtitle">{props.song.artistname}</div> </h5> <div className="album">{props.song.Albumname}</div> </li> </div> ); } const initialValueOfSongs = [ { songname: "On my way", artistname: "Alan Walker", Albumname: "On my way", }, { songname: "horse", artistname: "chickrees", Albumname: "On my way", }, { songname: "On my way", artistname: "Alan Walker", Albumname: "On my way", }, { songname: "On my way", artistname: "Alan Walker", Albumname: "On my way", }, { songname: "On my way", artistname: "Alan Walker", Albumname: "On my way", }, ]; export default function LikedSongs() { const [selectedSong, setSelectedSong] = useState(initialValueOfSongs[0]); const [songs, setSongs] = useState(initialValueOfSongs); useEffect(() => { fetchdata(); }, []); async function fetchdata() { const response = await axios.get("http://localhost:5000/songs"); const songs = response.data; var count = 1; songs.forEach((song) => { song["count"] = count; count++; }); setSongs(songs); } const handleSongClick = (song) => { setSelectedSong(song); } return ( <div className="songsbody"> <Sidebar /> <div className="listsongs"> <li className="songItem top"> <span>#</span> <h5>Song name</h5> <div className="album">Album name</div> </li> {songs && songs.map((song) => ( <Song key={song.count} song={song} handleSongClick={handleSongClick} /> ))} </div> <div className="footer"> <div className="footer_left"> <img className="footer_albumLogo" src="https://i1.sndcdn.com/artworks-aHWeKTP05eBf-0-t500x500.jpg" alt="" /> <div className="footer_songInfo"> <h6>{selectedSong.songname}</h6> <p>{selectedSong.artistname}</p> </div> </div> <div className="footer_center"> <img className="shuffle" src={require("./shuffle.png")} alt="" /> <img className="back" src={require("./back.png")} alt="" /> <img className="playbutton" src={require("./playbutton.png")} alt="" /> <img className="next" src={require("./next.png")} alt="" /> <img className="repeat" src={require("./repeat.png")} alt="" /> </div> <div className="footer_right"> <img className="volume" src={require("./volume.png")} alt="" /> </div> </div> </div> ); } ```
null
CC BY-SA 4.0
null
2022-11-30T13:49:44.957
2022-11-30T14:02:31.050
2022-11-30T14:02:31.050
11,342,834
11,342,834
null
74,629,361
2
null
74,626,298
0
null
You can do this very easily just by generating markdown slide header dynamically in each iteration of loop using `display(Markdown("Slide header"))` along with chunk option `output: asis`. ``` --- title: "For Loops in Quarto" format: revealjs: theme: default code-fold: true execute: echo: false --- ```{python} #| include: false from IPython.display import display, Markdown from sklearn import datasets import pandas as pd import plotly.express as px ``` ```{python} #| include: false # Get data iris = datasets.load_iris() df = pd.DataFrame(iris['data'], columns=iris['feature_names']) df['target'] = iris['target'] ``` ```{python} #| output: asis for target in df['target'].unique(): display(Markdown("## Scatter plot per species")) fig = px.scatter(df, x='petal length (cm)', y='sepal length (cm)') fig.show() ``` ``` --- [](https://i.stack.imgur.com/DUu6t.png) ---
null
CC BY-SA 4.0
null
2022-11-30T14:26:08.057
2022-11-30T14:26:08.057
null
null
10,858,321
null
74,629,559
2
null
29,954,032
0
null
If this helps someone, setting `RibbonTabItem.Height` to `0` and `Ribbon.CanMinimize` to `False` collapses the title bar of Fluent Ribbon.
null
CC BY-SA 4.0
null
2022-11-30T14:37:53.620
2022-11-30T14:37:53.620
null
null
1,137,199
null
74,629,621
2
null
15,727,675
0
null
Solution with CSS [linear-gradient](https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient) for diagonal line and CSS [transform](https://developer.mozilla.org/en-US/docs/Web/CSS/transform) for positioning internal cells: ``` td { padding: 30px; border: 2px solid black; background-image: -webkit-gradient(linear, left bottom, right top, color-stop(49%, white), color-stop(50%, black), color-stop(51%, white)); background-image: -webkit-linear-gradient(bottom left, white 49%, black 50%, white 51%); background-image: -o-linear-gradient(bottom left, white 49%, black 50%, white 51%); background-image: linear-gradient(to top right, white 49%, black 50%, white 51%); } td .c1 { -webkit-transform: translate(20px,-20px); -ms-transform: translate(20px,-20px); transform: translate(20px,-20px); } td .c2 { -webkit-transform: translate(-20px,20px); -ms-transform: translate(-20px,20px); transform: translate(-20px,20px); } ``` ``` <table border=1> <tr> <td> <div class="c1">Foo</div> <div class="c2">Bar</div> </td> </tr> </table> ``` Or solution[by Peter Krautzberger](https://www.peterkrautzberger.org/0213/) with CSS [background: url(...)](https://developer.mozilla.org/en-US/docs/Web/CSS/background) SVG image for diagonal line and CSS [Grid Layout](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout) for positioning internal cells: ``` .cell { display: grid; width: max-content; justify-content: space-between; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; border: 1px solid #000; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' viewBox='0 0 100 100'><line x1='0' y1='0' x2='100' y2='100' stroke='black' vector-effect='non-scaling-stroke'/></svg>"); background-size: 100% 100%; } .cell--topRight { grid-column-start: 2; text-align: right; } .cell--bottomLeft { grid-column-start: 1; } ``` ``` <table border=1> <tr> <td class=cell> <div class="cell--topRight">Foo</div> <div class="cell--bottomLeft">Bar</div> </td> </tr> </table> ```
null
CC BY-SA 4.0
null
2022-11-30T14:42:52.340
2022-11-30T14:48:56.283
2022-11-30T14:48:56.283
14,928,633
14,928,633
null
74,629,763
2
null
74,628,573
1
null
Here it is: ``` Option Explicit Sub main() Dim r As Integer Dim c As Integer Dim lengthr As Integer Dim lengthc As Integer lengthr = InputBox("Insert length of pyramid") lengthc = lengthr With Worksheets("Feuil1") .Cells.Clear 'delete existing cells For r = 1 To 2 * lengthr For c = 2 * lengthr - r To 1 Step -1 If (r & 1) = (c & 1) Then 'same parity .Cells(r, c) = WorksheetFunction.Min(r, c) Else .Cells(r, c).Interior.ThemeColor = xlThemeColorLight1 End If Next c Next r End With End Sub ``` Hope this helps
null
CC BY-SA 4.0
null
2022-11-30T14:53:42.693
2022-12-01T17:15:02.650
2022-12-01T17:15:02.650
20,522,241
20,522,241
null
74,630,155
2
null
73,177,060
0
null
the files that you opened before you made the changes to the encoding have been auto-overwritten and the original characters were replaced with the unknown-character character
null
CC BY-SA 4.0
null
2022-11-30T15:20:24.803
2022-11-30T15:20:24.803
null
null
20,647,164
null
74,630,212
2
null
72,233,169
0
null
Put this in your proto file: ``` message Date { int32 year = 1; int32 month = 2; int32 day = 3; } ``` and then you can use Date in your proto file, for instance: ``` message Customer { string name = 1; string address = 2; Date birthDate = 3; } ```
null
CC BY-SA 4.0
null
2022-11-30T15:24:34.383
2022-11-30T15:24:34.383
null
null
18,627,817
null
74,630,282
2
null
74,630,144
0
null
``` >>> a= [] >>> a.append(9) >>> print(a.append(9)) None >>> ``` What's going on here? Well, `list.append` returns `None`. As fo most functions which data rather than generating new values. You can see this in your code with: ``` [[mtrx[i][j].append(0) for i in range(3)] for j in range(3)] ``` Those indices also don't exist yet, so you will get an index error. You likely want: ``` [[0 for _ in range(3)] for _ in range(3)] ``` Which generates: ``` [[0, 0, 0], [0, 0, 0], [0, 0, 0]] ``` As an alternative, you could do the following, but that isn't better than `matrix = [[0 for _ in range(3)] for _ in range(3)]`. ``` matrix = [] for _ in range(3): row = [] for _ in range(3): row.append(0) matrix.append(row) ```
null
CC BY-SA 4.0
null
2022-11-30T15:29:44.073
2022-11-30T15:52:35.413
2022-11-30T15:52:35.413
15,261,315
15,261,315
null
74,630,299
2
null
74,629,465
0
null
As the message you are sending isn't an embed but is plain text, I believe this should work: ``` async def emojibot(ctx): #Comando a decir await ctx.send('[:HabboHotel:](https://habbo.es)') ```
null
CC BY-SA 4.0
null
2022-11-30T15:31:15.213
2022-11-30T15:31:15.213
null
null
19,922,257
null
74,630,470
2
null
74,630,246
1
null
Per [this discussion](https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010485779-is-it-possible-to-run-the-terminal-through-rosetta-for-arm-), use the following as the Terminal shell path: ``` env /usr/bin/arch -x86_64 /bin/zsh ```
null
CC BY-SA 4.0
null
2022-11-30T15:43:47.963
2022-11-30T15:43:47.963
null
null
104,891
null
74,630,492
2
null
74,630,326
0
null
``` useEffect(() => { getQuestionDetails(); getAnswers(); }); ``` Use the hook like that. The reason is the '[]' in the hook parameters. It sajs that reinvoke the hook only if [] is different than [].
null
CC BY-SA 4.0
null
2022-11-30T15:45:36.443
2022-11-30T15:45:36.443
null
null
4,200,334
null
74,630,497
2
null
74,630,384
0
null
You shouldn't use `imshow` because this will display it as if it were an image (because you have a 2D matrix). You need to plot each row separately, like so: ``` import numpy as np import matplotlib.pyplot as plt sin1 = np.sin(np.linspace(0, 2*np.pi, 100)) sin2 = np.sin(np.linspace(0, 2*np.pi, 100)) + 0.5 sin3 = np.sin(np.linspace(0, 2*np.pi, 100)) + 1 sin1[10] = np.nan sin2[20] = np.nan sin3[30] = np.nan data = np.array([sin1, sin2, sin3]) # plot each row as a separate series for i in range(data.shape[0]): plt.plot(data[i, :]) plt.show() ``` and then the nan's should just be empty spots in the graph. [](https://i.stack.imgur.com/Bfvjn.png)
null
CC BY-SA 4.0
null
2022-11-30T15:46:18.000
2022-11-30T15:46:18.000
null
null
14,293,274
null
74,630,619
2
null
74,625,645
0
null
First of all, you have to provide a minimal sample easy to copy and paste not an image of samples. But I have created a minimal sample similar to your images. It doesn't change the solution. Read xlsx files and convert them to list of dictionaries in Python, then you will have objects like these: ``` sheet1 = [{ "app_id_c": "116092749", "cust_id_n": "95014843", "laa_app_a": "36", "laa_promc": "504627", "laa_branch": "8", "laa_app_type_o": "C", }] sheet2 = [ { "lsi_app_id_": "116092749", "lsi_cust_type_c": "G", }, { "lsi_app_id_": "116092749", "lsi_cust_type_c": "G", }, ] ``` After having the above mentioned objects in Python, you can create the desired json structure by the following script: ``` for i in sheet1: i["los_input_from_sas"] = list() for j in sheet2: if i["app_id_c"] == j["lsi_app_id_"]: i["los_input_from_sas"].append(j) sheet1 = json.dumps(sheet1) print(sheet1) ``` And this is the printed output: ``` [ { "app_id_c": "116092749", "cust_id_n": "95014843", "laa_app_a": "36", "laa_promc": "504627", "laa_branch": "8", "laa_app_type_o": "C", "los_input_from_sas": [ { "lsi_app_id_": "116092749", "lsi_cust_type_c": "G" }, { "lsi_app_id_": "116092749", "lsi_cust_type_c": "G" } ] } ] ``` UPDATE: [Here](https://stackoverflow.com/questions/14196013/python-creating-dictionary-from-excel-data) are some solution to read xlsx files and convert to python dict.
null
CC BY-SA 4.0
null
2022-11-30T15:54:28.047
2022-11-30T17:07:17.767
2022-11-30T17:07:17.767
13,118,327
13,118,327
null
74,630,635
2
null
74,073,689
0
null
I hed the same issue couple days ago, and what solved my problem was to install the actual "create-nuxt-app" script, like this: ``` npm i -g create-nuxt-app ```
null
CC BY-SA 4.0
null
2022-11-30T15:55:17.083
2022-11-30T15:55:17.083
null
null
18,403,618
null
74,630,689
2
null
25,146,474
7
null
Just a heads up, Got the same message when I installed SQL Express 2022... Literally Installed SSMS (v18) by clicking the link after Express finished installing. I deleted V18 and downloaded V19, which is still in beta, and it fixed the problem.
null
CC BY-SA 4.0
null
2022-11-30T15:58:51.443
2022-11-30T15:58:51.443
null
null
20,647,478
null
74,631,154
2
null
74,617,414
0
null
Please try this solution: I guess you have such a model: [](https://i.stack.imgur.com/7OtBl.png) Then Let's define measures: ``` Users with more than 1 task = VAR Tbl = ADDCOLUMNS ( SUMMARIZE ( YourTable, YourTable[Name] ), "Total_Task", CALCULATE ( DISTINCTCOUNT ( YourTable[Task] ), 'YourTable'[Active Task] = TRUE (), 'YourTable'[Active User] = TRUE () ) ) RETURN COUNTX ( FILTER ( Tbl, [Total_Task] > 1 ), [Name] ) Users with more than 1 completion = VAR Tbl = ADDCOLUMNS ( SUMMARIZE ( YourTable, YourTable[Name] ), "Total_Task", CALCULATE ( DISTINCTCOUNT ( YourTable[Task] ), 'YourTable'[Active Task] = TRUE (), 'YourTable'[Active User] = TRUE (), 'YourTable'[CompletionPercentage] = 100, USERELATIONSHIP ( YourTable[Completed date], 'Calendar'[Date] ) ) ) RETURN COUNTX ( FILTER ( Tbl, [Total_Task] > 1 ), [Name] ) ``` If we test it on a visual: [](https://i.stack.imgur.com/jrYNx.png) Update Requested from @Cristina: ``` #new Users with more than 1 task_BY_Calendar = VAR IterateByFY = ADDCOLUMNS( SUMMARIZE ( 'Table','Calendar'[FY]), "Total_Task", CALCULATE ( DISTINCTCOUNT ( 'Table'[Task] ), 'Table'[Active Task] = TRUE (), 'Table'[Active User] = TRUE () ) ) RETURN SUMX(IterateByFY,[Total_Task]) ```
null
CC BY-SA 4.0
null
2022-11-30T16:32:24.077
2022-12-02T10:39:09.513
2022-12-02T10:39:09.513
19,469,088
19,469,088
null
74,631,303
2
null
26,698,239
0
null
I was trying to create a and faced this issue, I have never created any maven project before so for those below is the steps you need to follow - 1. Go to to Run -> Run As -> Maven Install 2. In the project explorer right click on pom.xml file -> Maven -> Update project. This will for sure resolve the issue. Eclipse version I am using : 2021-09 (4.21.0)
null
CC BY-SA 4.0
null
2022-11-30T16:45:28.730
2022-11-30T16:45:28.730
null
null
8,176,437
null
74,631,359
2
null
74,475,464
0
null
Committing passwords as plain text in source code is a security vulnerability, especially if this code will be published to a public repository like GitHub. There is no single solution to resolve this, but generally you need to: 1. Not commit passwords to source code. 2. Any application that requires a password or authentication token (more generally called a "secret") should retrieve this from a secure location. This is dependent on technology stack, but many DevOps-style systems have a password vault or secrets vault that provides this functionality. 3. Passwords or auth tokens become data/configuration specified at deployment time, rather than hard coded in a config file. As others have suggested in comments, you need to consult with your team. Clearly you have a need for a password. Your team lead or software architect will probably have a solution for this. Unless you the team lead or architect, in which case you get to decide the solution given the guidelines above.
null
CC BY-SA 4.0
null
2022-11-30T16:49:32.810
2022-11-30T16:49:32.810
null
null
3,092,298
null
74,631,466
2
null
74,630,196
0
null
Are you sure the DataLoadStatus variable is != 2. Maybe put a breakpoint and watch on it to check it
null
CC BY-SA 4.0
null
2022-11-30T16:57:10.957
2022-11-30T16:57:10.957
null
null
553,231
null
74,632,129
2
null
74,632,068
1
null
You can use `col-xs-12` and `col-md-6` to get this behaviour. See results in full page and try to reduce screen size. ``` <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"/> <div class='container-fluid'> <div class='row'> <div class='col-xs-12 col-md-6'> <button class='btn btn-primary'>Button 1</button> </div> <div class='col-xs-12 col-md-6'> <button class='btn btn-danger'>Button 2</button> </div> </div> </div> ```
null
CC BY-SA 4.0
null
2022-11-30T17:52:15.703
2022-11-30T17:52:15.703
null
null
11,812,450
null
74,632,130
2
null
74,632,068
1
null
I think you are missing your col divs. try this: ``` <div class="container-fluid"> <div class="row"> <div class="col-md"> <button class="btn btn-danger"></button> </div> <div class="col-md"> <button class="btn btn-success"></button> </div> </div> </div> ```
null
CC BY-SA 4.0
null
2022-11-30T17:52:22.860
2022-11-30T17:52:22.860
null
null
12,271,569
null
74,632,430
2
null
74,578,953
3
null
Thanks for all the updates. Your IDE is showing you implementation details of your C library that you're not supposed to have to worry about. That is arguably a bug in your IDE but there's nothing wrong with the C library. You are correct to think that a function declared `static` is visible only within the translation unit where it is defined. And that is true whether or not the function is also marked `inline`. , this particular `static inline` function is defined `stdio.h`, so every translation unit that includes `stdio.h` can see it. (There is a separate copy of the inline in each TU. This is technically a conformance violation since, as chux surmises, it means that `&printf` in one translation unit will not compare equal to `&printf` in another. However, this is very unlikely to cause problems for a program that isn't an ISO C conformance tester.) As "Adrian Mole" surmised in the comments on the question, the of this inline function is, more or less, to rewrite ``` printf("%s %d %p", string, integer, pointer); ``` into ``` fprintf(stdout, "%s %d %p", string, integer, pointer); ``` (All the stuff with `__builtin_va_start` and `__mingw_vfprintf` is because of limitations in how variadic functions work in C. The is the same as what I showed above, but the generated assembly language will not be nearly as tidy.) --- Update 2022-12-01: It's worse than "the generated assembly language will not be nearly as tidy". I experimented with all of the x86 compilers supported by [godbolt.org](https://godbolt.org/) and of them will inline a function that takes a variable number of arguments, even if you try to force it. Most silently ignore the force-inlining directive; GCC gets one bonus point for actually it refuses to do this: ``` test.c:4:50: error: function ‘xprintf’ can never be inlined because it uses variable argument lists ``` In consequence, every program compiled against this version of MinGW libc, in which `printf` is called from more than one `.c` file, will have multiple copies of the following glob of assembly embedded in its binary. This is bad just because of cache pollution; it would be better to have a single copy in the C library proper -- which is exactly what `printf` normally is. ``` printf: mov QWORD PTR [rsp+8], rcx mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+24], r8 mov QWORD PTR [rsp+32], r9 push rbx push rsi push rdi sub rsp, 48 mov rdi, rcx lea rsi, QWORD PTR f$[rsp+8] mov ecx, 1 call __acrt_iob_func mov rbx, rax call __local_stdio_printf_options xor r9d, r9d mov QWORD PTR [rsp+32], rsi mov r8, rdi mov rdx, rbx mov rcx, QWORD PTR [rax] call __stdio_common_vfprintf add rsp, 48 pop rdi pop rsi pop rbx ret 0 ``` (Probably not this assembly, this is what godbolt's "x64 MSVC 19.latest" produces with optimization option `/O2`, godbolt doesn't seem to have any MinGW compilers. But you get the idea.)
null
CC BY-SA 4.0
null
2022-11-30T18:15:57.933
2022-12-01T14:13:38.480
2022-12-01T14:13:38.480
388,520
388,520
null
74,632,769
2
null
74,578,953
1
null
`__mingw_ovr` is normally defined as ``` #define __mingw_ovr static __attribute__ ((__unused__)) __inline__ __cdecl ``` It appears that this definition of `printf` is a violation of the C standard. The standard says > 7.1.2 Standard headers 6 Any declaration of a library function shall have external linkage
null
CC BY-SA 4.0
null
2022-11-30T18:45:44.587
2022-11-30T18:45:44.587
null
null
775,806
null
74,632,799
2
null
74,597,594
0
null
This is only the correct solution i had some issues with my firebase project. ``` void updateMotorValue(bool val) { var url = globalServerLink; DatabaseReference databaseRef = FirebaseDatabase.instance.refFromURL(url); databaseRef.child("ABC_value").update({"value": val}); } ``` Used 2 Firebase Projects, app was connected to different database than which i was trying to update data on. Resolved now. refromURL(url)-> is only used to get to that location in your database. I thought it could create reference from any realtime db url you enter.
null
CC BY-SA 4.0
null
2022-11-30T18:48:51.173
2022-11-30T18:48:51.173
null
null
19,330,928
null
74,632,944
2
null
73,664,778
0
null
Thank you [Ghada](https://stackoverflow.com/users/16286331/ghada). Posting your solution into answer section to help other community members. Used the `to_numeric()` function to convert the string to numeric after removing the spaces in the string. > columns = ['flgs', 'proto', 'saddr', 'daddr', 'state', 'category', 'subcategory'] for x in columns: dataframe1[x] = pd.to_numeric(dataframe1[x].str.replace(' ', ''), downcast='float', errors ='coerce').fillna(0)
null
CC BY-SA 4.0
null
2022-11-30T19:03:55.987
2022-11-30T19:03:55.987
null
null
15,886,810
null
74,632,951
2
null
73,159,443
0
null
Had a similar issue in a Java project in Intellij with a Python script configured as a run configuration. The module SDK was empty in the run configuration, and nothing could be selected for it because it was a Java project and therefore had no Python SDK's configured. It was set up to `Use specified interpreter`, but regardless it still needed a module SDK for some reason. Was able to resolve this by closing IntelliJ and manually editing the part of the `.idea/workspace.xml` file where the configuration was missing a module. The `configuration` tag in question had a `<module name="" />`, which was apparently being read as `null` by IntelliJ. Changing it to `<module name="<myModuleName>" />` fixed the issue. It just needed to be not-null since that module's SDK wasn't being used anyway.
null
CC BY-SA 4.0
null
2022-11-30T19:04:41.593
2022-11-30T19:04:41.593
null
null
11,428,187
null
74,632,981
2
null
4,841,611
0
null
You can also use pyplot from matplotlib, follows the code: ``` from matplotlib import pyplot as plt plt.imshow( [[3, 5, 3, 5, 2, 3, 2, 4, 3, 0, 5, 0, 3, 2], [5, 2, 2, 0, 0, 3, 2, 1, 0, 5, 3, 5, 0, 0], [2, 5, 3, 1, 1, 3, 3, 0, 0, 5, 4, 4, 3, 3], [4, 1, 4, 2, 1, 4, 5, 1, 2, 2, 0, 1, 2, 3], [5, 1, 1, 1, 5, 2, 5, 0, 4, 0, 2, 4, 4, 5], [5, 1, 0, 4, 5, 5, 4, 1, 3, 3, 1, 1, 0, 1], [3, 2, 2, 4, 3, 1, 5, 5, 0, 4, 3, 2, 4, 1], [4, 0, 1, 3, 2, 1, 2, 1, 0, 1, 5, 4, 2, 0], [2, 0, 4, 0, 4, 5, 1, 2, 1, 0, 3, 4, 3, 1], [2, 3, 4, 5, 4, 5, 0, 3, 3, 0, 2, 4, 4, 5], [5, 2, 4, 3, 3, 0, 5, 4, 0, 3, 4, 3, 2, 1], [3, 0, 4, 4, 4, 1, 4, 1, 3, 5, 1, 2, 1, 1], [3, 4, 2, 5, 2, 5, 1, 3, 5, 1, 4, 3, 4, 1], [0, 1, 1, 2, 3, 1, 2, 0, 1, 2, 4, 4, 2, 1]], interpolation='nearest') plt.show() ``` The output would be: [](https://i.stack.imgur.com/SHJEM.png)
null
CC BY-SA 4.0
null
2022-11-30T19:07:45.837
2022-11-30T19:07:45.837
null
null
9,242,748
null
74,633,463
2
null
74,633,287
1
null
What you're trying to enter would be called a "[collection group](https://firebase.google.com/docs/firestore/query-data/queries#collection-group-query)", which is all of the collections with the same name, no matter where they are located. This extension is asking you for just a collection, which means you can specify only one complete path without wildcards (it can't be a collection group). I'd suggest sending feedback to the author of the plugin and ask for collection group support. I'm guessing you're using this one: [https://github.com/conversationai/firestore-perspective-toxicity](https://github.com/conversationai/firestore-perspective-toxicity) Either that, or put all comment documents in a single collection and point the extension there instead.
null
CC BY-SA 4.0
null
2022-11-30T19:54:40.413
2022-11-30T19:54:40.413
null
null
807,126
null
74,633,732
2
null
74,633,538
0
null
You're on the right track. ``` DECLARE @Data TABLE (Customer VARCHAR(3), Plant NVARCHAR(20), ForcastDate DATE) INSERT INTO @Data (Customer, Plant, ForcastDate) VALUES ('ACA', '1100', '2022-11-21'),('ACA', '1100', '2022-11-22'),('ACA', '1100', '2022-11-23'),('ACA', '1100', '2022-11-24'),('ACA', '1100', '2022-11-25'), ('ACA', '1200', '2022-11-21'),('ACA', '1200', '2022-11-22'),('ACA', '1200', '2022-11-23'),('ACA', '1200', '2022-11-24'),('ACA', '1200', '2022-11-25'), ('ACA', '1300', '2022-11-21'),('ACA', '1300', '2022-11-22'),('ACA', '1300', '2022-11-23'),('ACA', '1300', '2022-11-24'),('ACA', '1300', '2022-11-25'), ('ACA', '1400', '2022-11-21'),('ACA', '1400', '2022-11-22'),('ACA', '1400', '2022-11-23'),('ACA', '1400', '2022-11-24'),('ACA', '1400', '2022-11-25'), ('ACA', '1500', '2022-11-21'),('ACA', '1500', '2022-11-22'),('ACA', '1500', '2022-11-23'),('ACA', '1500', '2022-11-24'),('ACA', '1500', '2022-11-25'), ('ACA', '1600', '2022-11-21'),('ACA', '1600', '2022-11-22'),('ACA', '1600', '2022-11-23'),('ACA', '1600', '2022-11-24'),('ACA', '1600', '2022-11-25'), ('ACA', '1700', '2022-11-21'),('ACA', '1700', '2022-11-22'),('ACA', '1700', '2022-11-23'),('ACA', '1700', '2022-11-24'),('ACA', '1700', '2022-11-25'), ('ACA', '1100', '2022-11-25'),('ACA', '1100', '2022-11-27'),('ACA', '1100', '2022-11-28'),('ACA', '1100', '2022-11-29'),('ACA', '1100', '2022-11-30'), ('ACA', '1200', '2022-11-25'),('ACA', '1200', '2022-11-27'),('ACA', '1200', '2022-11-28'),('ACA', '1200', '2022-11-29'),('ACA', '1200', '2022-11-30'), ('ACA', '1300', '2022-11-25'),('ACA', '1300', '2022-11-27'),('ACA', '1300', '2022-11-28'),('ACA', '1300', '2022-11-29'),('ACA', '1300', '2022-11-30'), ('ACA', '1400', '2022-11-25'),('ACA', '1400', '2022-11-27'),('ACA', '1400', '2022-11-28'),('ACA', '1400', '2022-11-29'),('ACA', '1400', '2022-11-30'), ('ACA', '1500', '2022-11-25'),('ACA', '1500', '2022-11-27'),('ACA', '1500', '2022-11-28'),('ACA', '1500', '2022-11-29'),('ACA', '1500', '2022-11-30'), ('ACA', '1600', '2022-11-25'),('ACA', '1600', '2022-11-27'),('ACA', '1600', '2022-11-28'),('ACA', '1600', '2022-11-29'),('ACA', '1600', '2022-11-30'), ('ACA', '1700', '2022-11-25'),('ACA', '1700', '2022-11-27'),('ACA', '1700', '2022-11-28'),('ACA', '1700', '2022-11-29'),('ACA', '1700', '2022-11-30') ``` This is just some sample data in a table variable for portability. ``` SELECT * FROM ( SELECT *, ROW_NUMBER() OVER (PARTITION BY Customer, Plant ORDER BY ForcastDate DESC) AS rn FROM @Data ) a WHERE rn <= 5 ``` I wasn't sure if you wanted the most recent five days per plant, or just per customer. This is per customer and plant. ``` SELECT * FROM ( SELECT *, ROW_NUMBER() OVER (PARTITION BY Customer ORDER BY ForcastDate DESC) AS rn FROM @Data ) a WHERE rn <= 5 ``` This is per customer. Note how the PARTITION BY only contains `Customer` now.
null
CC BY-SA 4.0
null
2022-11-30T20:23:47.863
2022-11-30T20:23:47.863
null
null
18,522,514
null
74,633,745
2
null
17,547,597
1
null
This happens (sometimes) when inline (row or cell) editing is used in jqGrid. The implementation I used is [https://github.com/free-jqgrid/jqGrid](https://github.com/free-jqgrid/jqGrid). What happens is that the editor control is not cleared inside the "td" tag of the cell in the underlying "table" used by jqGrid. The cell will still show the entered/edited value once, but when the cell is entered again (clicked, tabbed, arrow keys, etc.), the text in the newly injected editor control will be the content (innerHTML?) of the "td" tag - which is the previous editor control HTML. This is what I see when this happens in both the grid and the HTML: [](https://i.stack.imgur.com/Ih9D1.png) Note that this HTML is the TOP 2nd cell shown in the image, with the "ghost" editor in the cell. ``` <td role="gridcell" style="text-align: center; color: black; background-color: white;" aria-describedby="Grid_Col2" class="editable-cell" title="" tabindex="0"> <input type="text" autocomplete="off" maxlength="9" id="93_Col2" name="Col2" role="textbox" style="width: 100%; box-sizing: border-box;"> </td> ``` I cannot confirm "why", but I was able to resolve this by using `setTimeout()`. I know, I know... :-( It seems to have something to do with the "navigation" div element (header element) of the grid snapping focus back to it - I guess if the currently selected control doesn't have the "edited" CSS (and the header cannot be edited...), it won't/can't fully remove the input control? The `setTimeout()` was put in the "afterEditCell" override (see code block below). I also gained stability by having empty implementations of the most of the cell editing override functions: ``` afterEditCell: function (rowid, cellname, value, iRow, iCol) { let rawInput = $("#" + this.id + " tbody>tr:eq(" + iRow + ")>td:eq(" + iCol + ") input, select, textarea"); rawInput.select(); rawInput.focus(); setTimeout(() => { //TODO: I hate this, but not able to determine why focus goes back to the keyboard // navigation DIV instead of the cell being edited. So, we have to force it. :( // This may have something to do with the "trick" to process keydown on non-input // elements: https://github.com/free-jqgrid/jqGrid/blob/master/js/grid.celledit.js line 530 rawInput.focus(); }, 100); }, afterRestoreCell: function (rowid, value, iRow, iCol) { console.log("afterRestoreCell: (" + iRow + ", " + iCol + ") " + value); }, afterSaveCell: function (rowid, cellname, value, iRow, iCol) { //console.log("afterSaveCell: (" + iRow + ", " + iCol + ") " + value); }, beforeEditCell: function (rowid, cellname, value, iRow, iCol) { //console.log("beforeEditCell: (" + iRow + ", " + iCol + ") " + value); }, beforeSaveCell: function (rowid, cellname, value, iRow, iCol) { //console.log("beforeSaveCell: (" + iRow + ", " + iCol + ") " + value); return value; // note that this is required here! }, beforeSubmitCell: function (rowid, cellname, value, iRow, iCol) { //console.log("saving cell with value:" + value); } ```
null
CC BY-SA 4.0
null
2022-11-30T20:24:21.770
2022-11-30T20:24:21.770
null
null
17,638,603
null
74,633,840
2
null
74,633,287
1
null
It depends on how the extension is written. For example the `firestore-bigquery-export` extension takes `posts/{postId}/comments`. [https://github.com/firebase/extensions/blob/master/firestore-bigquery-export/functions/src/index.ts#L47](https://github.com/firebase/extensions/blob/master/firestore-bigquery-export/functions/src/index.ts#L47) You can inspect the extension's source code and see how the value passed-in is used to see if it's supported. Edit: looks like you are using the perspective API extension. So you can find how the collection path is used here: [https://github.com/conversationai/firestore-perspective-toxicity/blob/main/extension.yaml#L46](https://github.com/conversationai/firestore-perspective-toxicity/blob/main/extension.yaml#L46)
null
CC BY-SA 4.0
null
2022-11-30T20:33:41.157
2022-11-30T23:11:25.940
2022-11-30T23:11:25.940
6,519,348
6,519,348
null
74,634,099
2
null
74,614,162
0
null
target it like: ``` =REGEXEXTRACT(A2; "(?i)Farve: (.+)") ``` [](https://i.stack.imgur.com/3KgzZ.png)
null
CC BY-SA 4.0
null
2022-11-30T21:00:20.203
2022-11-30T21:00:20.203
null
null
5,632,629
null
74,634,186
2
null
74,633,702
0
null
I've used the sample composable from [here](https://foso.github.io/Jetpack-Compose-Playground/material/alertdialog/) and added your modifier to it for each button so it looks like ``` @Composable fun AlertDialogSample() { MaterialTheme { Column { val openDialog = remember { mutableStateOf(false) } Button(onClick = { openDialog.value = true }) { Text("Click me") } if (openDialog.value) { AlertDialog( onDismissRequest = { // Dismiss the dialog when the user clicks outside the dialog or on the back // button. If you want to disable that functionality, simply use an empty // onCloseRequest. openDialog.value = false }, title = { Text(text = "Dialog Title") }, text = { Text("Here is a text ") }, confirmButton = { Button( modifier = Modifier .fillMaxWidth(0.75f) .padding(start = 12.dp, end = 12.dp, bottom = 8.dp), onClick = { openDialog.value = false }) { Text("This is the Confirm Button") } }, dismissButton = { Button( modifier = Modifier .fillMaxWidth(0.75f) .padding(start = 12.dp, end = 12.dp, bottom = 8.dp), onClick = { openDialog.value = false }) { Text("This is the dismiss Button") } } ) } } } } ``` and I see the buttons at 75% width. ![](https://i.stack.imgur.com/AxCaR.png) Doesn't explain why you see the described issue, but does give you a solution.
null
CC BY-SA 4.0
null
2022-11-30T21:09:24.860
2022-11-30T21:09:24.860
null
null
2,199,001
null
74,634,295
2
null
74,628,459
0
null
The following Python code looks like it does the right thing: ``` import re from math import copysign def dms_to_decimal(text): m = re.match(r'^([-+]?[0-9]+),([0-9]{2})([0-9]{2})([0-9]+)$', text) if not m: raise ValueError("Unsupported format") deg, min, sec, frac = m.groups() deg = float(deg) min = float(min) sec = float(f"{sec}.{frac}") return deg + copysign(min / 60 + sec / 3600, deg) def parse_lat_lon(text): lat, lon = text.split() return dms_to_decimal(lat), dms_to_decimal(lon) lat, lon = parse_lat_lon('16,5037993382 -25,0139206899') print(f"{lat:.6f},{lon:.6f}") ``` Outputs: `16.843887,-25.027557` Which you can check with: [https://www.google.co.uk/maps/place/16.843887,-25.027557](https://www.google.co.uk/maps/place/16.843887,-25.027557) If you have lots of these values, I'd suggest converting them to decimal coordinates as Google Earth and most other programs tend to be happy with that.
null
CC BY-SA 4.0
null
2022-11-30T21:20:45.400
2022-11-30T21:20:45.400
null
null
1,358,308
null
74,634,315
2
null
74,633,538
0
null
Figured it out by using a view. That way it removed the multiple rows that had the same dates. Here is that code I used: ``` SELECT Customer, Plant, ForecastDate FROM ( SELECT *, ROW_NUMBER() OVER (PARTITION BY Customer, Plant ORDER BY ForecastDate DESC) AS rn FROM View ) a WHERE rn <= 5 order by Customer,Plant,ForecastDate desc ```
null
CC BY-SA 4.0
null
2022-11-30T21:22:51.313
2022-11-30T21:22:51.313
null
null
19,880,719
null
74,634,343
2
null
74,633,128
0
null
There are a few different things you could try, but to start I would recommend the following: - `threshold`- `dilate`- `erode` You'll have to mess around with the parameters to get it right, but I think this is your best bet to solve this problem without it getting too complicated. If you want, you can also try the Sobel operators before thresholding to better identify horizontal and vertical lines.
null
CC BY-SA 4.0
null
2022-11-30T21:25:43.827
2022-11-30T21:25:43.827
null
null
20,649,930
null
74,634,443
2
null
74,634,250
0
null
The problem you have there is that the arrow is animated but when the hidden text appears, that vertical expansion is not animated. That contrast between an element animated and another that is not makes the chevron looks like it is not doing it properly. So, try to animate the VStack like this: ``` struct CombineView: View { @State var expanded: Bool = false @State var rotation: Double = 0 let entry: String = "Detalle" var body: some View { VStack { Divider().frame(maxWidth: .infinity) .overlay(.black) HStack(alignment: .center) { Text(entry) .fixedSize(horizontal: false, vertical: true) Spacer() Image(systemName: "chevron.down") .foregroundColor(.black) .padding() .rotationEffect(.degrees(expanded ? 180 : 360)) .animation(.linear(duration: 0.3), value: expanded) }.padding(.horizontal) .padding(.vertical, 6) .background(.green) if expanded { Text("Details") } Divider().frame(maxWidth: .infinity) .overlay(.black) }.animation(.linear(duration: 0.3), value: expanded)//Animation added .listRowSeparator(.hidden) .listRowInsets(.init()) .onTapGesture { expanded.toggle() } } ``` } I hope this works for you ;)
null
CC BY-SA 4.0
null
2022-11-30T21:37:26.070
2022-11-30T21:37:26.070
null
null
9,375,065
null
74,635,101
2
null
74,635,008
0
null
Add spread operator at the front if the `List`, and use the `length` on the `List` normally. ``` children: [ ...List.generate(contents.length, (index) => buildDot(index, context)), // add ... like this in your List ], ``` this will lead that your list will be merged with the principal list.
null
CC BY-SA 4.0
null
2022-11-30T22:55:36.077
2022-11-30T22:57:41.930
2022-11-30T22:57:41.930
18,670,641
18,670,641
null
74,635,225
2
null
8,705,201
0
null
The first answer given is partly correct, except you also need to check which plane is best to project from instead of always projecting from the z plane, like this C# Unity example: ``` Vector2[] getUVs(Vector3 a, Vector3 b, Vector3 c) { Vector3 s1 = b - a; Vector3 s2 = c - a; Vector3 norm = Vector3.Cross(s1, s2).Normalize(); // the normal norm.x = Mathf.Abs(norm.x); norm.y = Mathf.Abs(norm.y); norm.z = Mathf.Abs(norm.z); Vector2[] uvs = new Vector2[3]; if (norm.x >= norm.z && norm.x >= norm.y) // x plane { uvs[0] = new Vector2(a.z, a.y); uvs[1] = new Vector2(b.z, b.y); uvs[2] = new Vector2(c.z, c.y); } else if (norm.z >= norm.x && norm.z >= norm.y) // z plane { uvs[0] = new Vector2(a.x, a.y); uvs[1] = new Vector2(b.x, b.y); uvs[2] = new Vector2(c.x, c.y); } else if (norm.y >= norm.x && norm.y >= norm.z) // y plane { uvs[0] = new Vector2(a.x, a.z); uvs[1] = new Vector2(b.x, b.z); uvs[2] = new Vector2(c.x, c.z); } return uvs; } ``` [](https://i.stack.imgur.com/WXGEr.jpg) Though it is better to do this on the GPU in a shader, especially if you are planning on having very dynamic voxels, such as in an infinitely generated world that's constantly generating around the player or a game with lots of digging and building involved, you wouldn't have to calculate the UVs each time and it's also less data you have to send to the GPU, so it is definitely faster than this. I modified a basic triplanar shader I found on the internet a while ago, unfortunately I wasn't able to find it again, but my modified version is basically a triplanar mapping shader except with no blending and it only samples once per pass, so it should be pretty much as fast as a basic unlit shader and looks exactly the same as the image above. I did this because the normal triplanar shader blending doesn't look good with textures like brick walls at 45 degree angles. ``` Shader "Triplanar (no blending)" { Properties { _DiffuseMap("Diffuse Map ", 2D) = "white" {} _TextureScale("Texture Scale",float) = 1 } SubShader { Tags { "RenderType" = "Opaque" } LOD 200 CGPROGRAM #pragma target 3.0 #pragma surface surf Lambert sampler2D _DiffuseMap; float _TextureScale; struct Input { float3 worldPos; float3 worldNormal; }; void surf(Input IN, inout SurfaceOutput o) { IN.worldNormal.x = abs(IN.worldNormal.x); IN.worldNormal.y = abs(IN.worldNormal.y); IN.worldNormal.z = abs(IN.worldNormal.z); if (IN.worldNormal.x >= IN.worldNormal.z && IN.worldNormal.x >= IN.worldNormal.y) // x plane { o.Albedo = tex2D(_DiffuseMap, IN.worldPos.zy / _TextureScale); } else if (IN.worldNormal.y >= IN.worldNormal.x && IN.worldNormal.y >= IN.worldNormal.z) // y plane { o.Albedo = tex2D(_DiffuseMap, IN.worldPos.xz / _TextureScale); } else if (IN.worldNormal.z >= IN.worldNormal.x && IN.worldNormal.z >= IN.worldNormal.y) // z plane { o.Albedo = tex2D(_DiffuseMap, IN.worldPos.xy / _TextureScale); } } ENDCG } } ``` [](https://i.stack.imgur.com/J250E.jpg) It ends up looking a lot like a cubemap, though I don't think this is technically a cubemap as we only use three faces, not six. EDIT: I later realized that you may want it in the fragment shader like that but for my purposes it works exactly the same and would theoretically be faster in the vertex shader: ``` Shader "NewUnlitShader" { Properties { _MainTex ("Texture", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } LOD 100 Pass { CGPROGRAM #pragma vertex vert #pragma fragment frag // make fog work #pragma multi_compile_fog #include "UnityCG.cginc" struct appdata { float4 vertex : POSITION; float3 normal : NORMAL; }; struct v2f { float2 uv : TEXCOORD0; UNITY_FOG_COORDS(1) float4 vertex : SV_POSITION; }; sampler2D _MainTex; float4 _MainTex_ST; v2f vert (appdata v) { v2f o; o.vertex = UnityObjectToClipPos(v.vertex); v.normal.x = abs(v.normal.x); v.normal.y = abs(v.normal.y); v.normal.z = abs(v.normal.z); if (v.normal.x >= v.normal.z && v.normal.x >= v.normal.y) // x plane { o.uv = v.vertex.zy; } else if (v.normal.y >= v.normal.x && v.normal.y >= v.normal.z) // y plane { o.uv = v.vertex.xz; } else if (v.normal.z >= v.normal.x && v.normal.z >= v.normal.y) // z plane { o.uv = v.vertex.xy; } UNITY_TRANSFER_FOG(o, o.vertex); return o; } fixed4 frag (v2f i) : SV_Target { // sample the texture fixed4 col = tex2D(_MainTex, i.uv); // apply fog UNITY_APPLY_FOG(i.fogCoord, col); return col; } ENDCG } } } ```
null
CC BY-SA 4.0
null
2022-11-30T23:15:51.237
2022-12-01T00:37:03.690
2022-12-01T00:37:03.690
14,955,090
14,955,090
null
74,635,613
2
null
74,635,553
1
null
With the `patchwork` package, you could use: ``` library(patchwork) a <- ggplot(mtcars, aes(disp, wt)) + geom_point() a + a + a + plot_annotation(tag_levels = 'A') + plot_layout( design = "AABB #CC#") ``` [](https://i.stack.imgur.com/lLfIM.png)
null
CC BY-SA 4.0
null
2022-12-01T00:22:05.490
2022-12-01T00:22:05.490
null
null
6,851,825
null
74,635,854
2
null
32,612,964
0
null
This has worked for me to keep a spinning image in the same location on each side of the screen. Adjust left / right and top to position each div on either side. ``` <div class="col" style="overflow: none; z-index: 9999;"> <div id="spinning-circle" class="row" style="position:absolute; top:750px; left:-25px; z-index:1; width: auto!important;"> <img src="../certdb/images/left-bubble.png"> </div> <div id="spinning-circle" class="row" style="position:absolute; top:250px; right:-145px; z-index:1; width: auto!important;"> <img src="../certdb/images/right-bubble.png"> </div> </div> ``` BODY -> ``` .Site { display: flex; min-height: 100vh; flex-direction: column; } ``` Page Container -> ``` .Site-content { flex: 1; margin: auto; margin-top: 5%; max-width: 1500px; min-height: 80%; ``` [https://jsfiddle.net/znLv6peg/11/](https://jsfiddle.net/znLv6peg/11/) [](https://i.stack.imgur.com/WJXKz.png)
null
CC BY-SA 4.0
null
2022-12-01T01:09:54.193
2022-12-01T01:21:56.180
2022-12-01T01:21:56.180
5,152,183
5,152,183
null
74,636,005
2
null
74,630,383
0
null
There are many possible causes for XHR errors. You can refer to [this article](https://stackoverflow.com/questions/70177216/visual-studio-code-error-while-fetching-extensions-xhr-failed), and I think the easiest way is to .
null
CC BY-SA 4.0
null
2022-12-01T01:34:40.003
2022-12-01T01:34:40.003
null
null
18,359,438
null
74,636,142
2
null
74,635,216
1
null
The problem is you are tring to return `storage` reference inside `public` function. The solution is to copy the storage reference into the `memory` and then return it. Assuming all other parts of your code is correct, this should work: ``` function getCandidateInfo(uint _candidateId) public view returns (uint, string memory, string memory) { Candidate memory candidate=candidatesMap[_candidateId] return( candidate.candidateId, candidate.CandidateName, candidate.party ); } ```
null
CC BY-SA 4.0
null
2022-12-01T01:55:20.463
2022-12-01T01:55:20.463
null
null
10,262,805
null
74,636,555
2
null
74,633,702
2
null
I think you have to define a specific width for the `AlertDialog`, any child it has may not be able to calculate a 75% of width . either you fill the max width of the dialog ``` AlertDialog( modifier = Modifier.fillMaxWidth(), ... ``` [](https://i.stack.imgur.com/KpXQw.png) or specify an actual dp width ``` AlertDialog( modifier = Modifier.width(150.dp), ... ``` [](https://i.stack.imgur.com/qTqyC.png) I don't wanna throw jargons I can't explain, but I suspect when `AlertDialog` doesn't have any specific width, it cannot provide any incoming measurements for its children, which is in this case the `Button` cannot compute a 75% of on initial display, it looks like all size computation is happening only after an action has been made to the button, maybe a `recomposition` is happening under-the-hood having correct measurements.
null
CC BY-SA 4.0
null
2022-12-01T03:11:08.930
2023-01-21T09:40:43.550
2023-01-21T09:40:43.550
13,302
19,023,745
null
74,636,747
2
null
19,564,862
0
null
Using the above code, I am facing the below null pointer issue, HTML report works fine when fewer tests are included in testng.xml, but when I include more tests, the HTML report does not get generated and the below exception is thrown ``` [TestNG] Reporter report.MyListener@60e07aed failed java.lang.NullPointerException: Cannot invoke "String.length()" because "s" is null at java.base/java.io.StringReader.<init>(StringReader.java:51) at java.base/java.util.Scanner.<init>(Scanner.java:766) at report.MyListener.getShortException(MyListener.java:294) at report.MyListener.generateSuiteSummaryReport(MyListener.java:473) at report.MyListener.generateReport(MyListener.java:72) at org.testng.TestNG.generateReports(TestNG.java:1093) at org.testng.TestNG.run(TestNG.java:1036) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77) ``` [](https://i.stack.imgur.com/phV3h.png)
null
CC BY-SA 4.0
null
2022-12-01T03:47:21.123
2022-12-01T19:55:53.047
2022-12-01T19:55:53.047
10,863,237
10,863,237
null
74,636,916
2
null
74,636,391
0
null
You can try `ax.spines["bottom"].set_linewidth(3)`.
null
CC BY-SA 4.0
null
2022-12-01T04:23:53.337
2022-12-01T04:23:53.337
null
null
19,921,706
null
74,636,981
2
null
41,158,325
0
null
If you are using `styled-components`, we can also override more CSS way, with `.MuiDialog-paper` class, as below: ``` import styled from "styled-components"; import { Dialog } from "@mui/material"; const StyledDialog = styled(Dialog)` & .MuiDialog-paper { background-color: transparent !important; } } ```
null
CC BY-SA 4.0
null
2022-12-01T04:37:15.993
2022-12-01T04:37:15.993
null
null
984,471
null
74,637,093
2
null
74,636,602
4
null
Since you have "uncaught exception" in the picture there, it means that the application itself is creating that error - which is not visible to the user under normal circumstances unless you check for it in the devtools. The trick is to put a catcher into the top of the test like this ``` Cypress.once('uncaught:exception', (err, runnable) => { return false; }) ``` That stops the test from failing just because of a potentially harmless error in the app. Here is some documentation: [Uncaught exceptions](https://docs.cypress.io/api/events/catalog-of-events#Uncaught-Exceptions). Generally speaking, as a tester you will be a bit worried about such an error, but it can't be fixed from the test, only from the application itself.
null
CC BY-SA 4.0
null
2022-12-01T04:58:52.073
2022-12-22T08:26:24.140
2022-12-22T08:26:24.140
20,652,454
20,652,454
null
74,637,255
2
null
74,635,553
1
null
If you wanted to use `ggarrange`, then you can nest each row of plots within another `ggarrange` (though this is obviously more verbose than just using `patchwork`): ``` library(ggpubr) library(ggplot2) Cf <- Ff <- Of <- ggplot(mtcars, aes(disp, wt)) + geom_point() sfplot = ggarrange(ggarrange(Cf, Ff, ncol = 2, labels = c("A", "B")), ggarrange(NULL, Of, NULL, ncol = 3, labels = c("", "C", ""), widths = c(1,2,1)), ncol = 1) ``` [](https://i.stack.imgur.com/xhyhG.png)
null
CC BY-SA 4.0
null
2022-12-01T05:24:32.337
2022-12-01T05:24:32.337
null
null
15,293,191
null
74,637,417
2
null
15,046,764
1
null
This happened to me when I had mistakenly set my IntelliJ to power saving mode. Power Saving mode is displayed by battery icon with half empty charge. Disabling that fixed the problem.
null
CC BY-SA 4.0
null
2022-12-01T05:49:31.927
2022-12-01T05:49:31.927
null
null
11,773,900
null
74,637,491
2
null
9,262,712
0
null
I got same problem , what I did for fix : 1. Open system environment variable 2. Click on environment variable 3. in user varaible -> edit path and then add C:\FolderWhereYouInstalled\ant\ant_1.8.4\bin 4. Click ok 5. Open cmd and type : ant -version thanks, might help someone :)
null
CC BY-SA 4.0
null
2022-12-01T05:59:09.730
2022-12-01T05:59:09.730
null
null
12,696,154
null
74,637,499
2
null
71,888,914
0
null
I've tried to make more simplified the implementation, here is the SwiftUI code, ``` struct RotatingDotAnimation: View { @State private var moveClockwise = false @State private var duration = 1.0 // Works as speed, since it repeats forever var body: some View { ZStack { Circle() .stroke(lineWidth: 4) .foregroundColor(.white.opacity(0.5)) .frame(width: 150, height: 150, alignment: .center) Circle() .fill(.white) .frame(width: 18, height: 18, alignment: .center) .offset(x: -63) .rotationEffect(.degrees(moveClockwise ? 360 : 0)) .animation(.easeInOut(duration: duration).repeatForever(autoreverses: false), value: moveClockwise ) } .onAppear { self.moveClockwise.toggle() } } } ``` It'll basically create animation like this, [enter image description here](https://i.stack.imgur.com/MjxJu.gif)
null
CC BY-SA 4.0
null
2022-12-01T06:00:14.287
2022-12-01T06:00:14.287
null
null
15,380,250
null
74,637,537
2
null
74,636,627
0
null
try the same with ``` df = pd.read_csv('file_name.csv', sep = ',') ``` this might work
null
CC BY-SA 4.0
null
2022-12-01T06:04:39.313
2022-12-01T06:04:39.313
null
null
9,179,418
null
74,637,880
2
null
29,398,886
1
null
Build clean resolve that question for me.
null
CC BY-SA 4.0
null
2022-12-01T06:46:18.863
2022-12-01T06:46:18.863
null
null
16,184,671
null
74,637,888
2
null
74,637,830
0
null
Simply you can try this way: ``` <img width = "100" height = "100" src="/media/{{user_profile.profileimg}}"/> ``` And now that image will display Note: If your uploaded image is saving in media folder then above code will work. According to your model field profileimg, you should add forward slash to upload_to: It must be like below: ``` upload_to='profile_images/' ``` And ensure that you have added this in your main urls: ``` urlpatterns = [ ]+static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT) ```
null
CC BY-SA 4.0
null
2022-12-01T06:47:23.780
2022-12-01T07:02:48.800
2022-12-01T07:02:48.800
17,808,039
17,808,039
null
74,637,895
2
null
74,635,097
1
null
> Unfortunately I couldn't get access to the ISO norm (ISO 32000-1 or 32000-2). [https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf](https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf) > 1. Are these bytes used for padding? Those bytes are part of a metadata stream. The format of the metadata is XMP. According to the XMP spec: > So yes, . > 1. Furthermore, this (meta)data should be part of an object stream, and therefore compressed, but this is not the case (Is there a specific reason for this)..?) Indeed, there is. The pdf document-wide metadata streams are intended to be readable by applications, too, that don't know the PDF format but do know the XMP format. Thus, these streams should not be compressed or encrypted. > 1. ... I don't see a question in that item. > Added part > the position/offset of the trailer dictionary can vary (although is it.. because it seems that even if the trailer dictionary is part of the central directory stream, it is always at the end of the file?, at least... in all the PDFs I tested) Well, as the stream in question contains cross reference information for the objects in the PDF, it usually is only finished pretty late in the process of creating the PDF an, therefore, added pretty late to the PDF file. Thus, an end-ish position of it usually is to be expected. > The only thing I don't really understand is that for some reason the researchers of [this study](https://link.springer.com/epdf/10.1007/s00500-018-3257-z?sharing_token=HbEh6lZtBMjaCFnku-QEe_e4RwlQNchNByi7wbcMAY5TLD32SlN7cEh_fLCiGNkHlMB_RSH84UHojcPgeG97aOkTEphA_ecVVlm-xNa7EY5wsq1ox1N-HoSjiNBhlCHFzQMr0EKZgA7a-2oZkYGT2ypHncl5DkqAUCGIF_FYxsM%3D) assumed that the trailer has a and a fixed position (the last 164 bytes of a file). As already discussed, assuming a fixed position or length of the trailer in general is wrong. If you wonder why they assumed such a fixed size nonetheless, you should ask them. If I were to why they did, I'd assume that their set of 200 PDFs simply was not generic. In the paper they don't mention how they selected those PDFs, so maybe they used a batch they had at their hands without checking how special or how generic it was. If those files were generated by the same PDF creator, chances indeed are that the trailers have a constant (or near constant) length. If this assumption is correct, i.e. if they worked with a not-generic set of test files only, then their results, in particular their entropy values and confidence intervals and the concluded quality of the approach, are questionable. > They also mention in Figure 8 that a PDF file encrypted by EasyCrypt, has some structure in both the header and the trailer (which is why it has a lower entropy value compared to a PDF file encrypted with ransomware). > However, when I encrypt a file with EasyCrypt (I tried three different symmetric encryption algorithms: AES 128 bit, AES 256 bit and RC2) and encrypt several PDF files (with different versions), I get a fully encrypted file, without any structure/metadata that is not encrypted (neither in the header nor in the trailer). In the paper they show a hex dump of their file encrypted by EasyCrypt: [](https://i.stack.imgur.com/nd9vS.png) Here there is some metadata (albeit not PDF specific) that should show less entropy. As your EasyCrypt encryption results differ, there appear to be different modes of using EasyCrypt, some of which add this header and some don't. Or maybe EasyCrypt used to add such headers but doesn't anymore. Either way, this again indicates that the research behind the paper is not generic enough, taking just the output of one encryption tool in one mode (or in one version) as representative example for data encrypted by non-ransomware. Thus, the results of the article are of very questionable quality. > the PDF extension has its own standardised format for encrypting files, but I don't really understand why they mention that EasyCrypt conforms to this standardised format. If I haven't missed anything, they merely mention that , they don't say that this does .
null
CC BY-SA 4.0
null
2022-12-01T06:48:22.440
2022-12-05T10:15:21.950
2022-12-05T10:15:21.950
1,729,265
1,729,265
null
74,638,030
2
null
26,911,680
0
null
It seems, that DavidG's comment is the best answer. "Your user account determines the default database." You can choose default database for your user account in the user properties. Security - Logins - right mouse click - Properties - and select the default DataBase. And so, every time when you open new or existed query window the current DataBase would be selected from the default dataBase setting in user porperties.
null
CC BY-SA 4.0
null
2022-12-01T07:03:27.403
2022-12-01T07:03:27.403
null
null
20,346,346
null
74,638,065
2
null
74,637,761
0
null
`gradle` gets upset by the quotes it receives in your "non-working" example. Write it as ``` ... -Ptags="$tag" ... ``` or, equivalently (but perhaps clearer), ``` ... "-Ptags=$tag" ... ```
null
CC BY-SA 4.0
null
2022-12-01T07:06:59.140
2022-12-01T07:06:59.140
null
null
1,934,428
null
74,638,141
2
null
74,632,379
0
null
you won't be able to get data about Employee and Project from AssignmentDate. If you see in your data model your project and employee are connected to assignment. solution, first you will have to retrieve assignment record, fields project code and emplyoee hrd. Then you will have to do lookup function for each project and employee based on your fields project code and emplyoee hrd
null
CC BY-SA 4.0
null
2022-12-01T07:14:39.800
2022-12-01T07:14:39.800
null
null
5,436,880
null
74,638,305
2
null
71,004,057
0
null
I have also encountered similar problem. Everytime I restart my server postman provided req.file gives undefined. I thought maybe I habe made a bug but I couldn't figure out what was wrong. Then I tried creating a new request in postman and when I requested req.file works perfectly. I am trying to figure out what is wrong with Postman or am I making a mistake while sending a request.
null
CC BY-SA 4.0
null
2022-12-01T07:30:26.487
2022-12-01T07:30:26.487
null
null
18,387,900
null
74,638,469
2
null
74,633,068
0
null
I set this in .vsixmanifest file: [](https://i.stack.imgur.com/Kls8Q.png) And get this error: [](https://i.stack.imgur.com/iEBxl.png) You can right click on the .vsixmanifest file and choose View Code: [](https://i.stack.imgur.com/TdbWF.png) And then delete `<ProductArchitecture>amd64</ProductArchitecture>` in this code: [](https://i.stack.imgur.com/UCEoe.png) For more information you can check [this link](https://learn.microsoft.com/en-us/visualstudio/extensibility/migration/target-previous-versions?view=vs-2022).
null
CC BY-SA 4.0
null
2022-12-01T07:47:53.037
2022-12-01T07:47:53.037
null
null
17,296,043
null