row_id
int64
0
48.4k
init_message
stringlengths
1
342k
conversation_hash
stringlengths
32
32
scores
dict
44,879
defold input action pos, but 0.0 point in middle of screen
7d703800ed38845f20dcc565e66d0646
{ "intermediate": 0.3570939004421234, "beginner": 0.24759259819984436, "expert": 0.39531347155570984 }
44,880
chance defold input action pos in such a way that 0.0 point was in middle of app
0732e9d7179819655679e6182b20a248
{ "intermediate": 0.38350459933280945, "beginner": 0.2284247726202011, "expert": 0.38807064294815063 }
44,881
algorithm that change x value from 0 to 100 by dependence of y = 556 in start and y = 1936 on end
48d09d373bc7e5351aca6821c14ed0a4
{ "intermediate": 0.0937115028500557, "beginner": 0.08234383910894394, "expert": 0.8239446878433228 }
44,882
lua script that change value of x by dependence from y value. When y eqwal 556, x is eqwal 0, when y eqwal 1936, x is 98.
0ed2dff5a7a9dfccef4e9aa154b91171
{ "intermediate": 0.3890593349933624, "beginner": 0.31428077816963196, "expert": 0.2966598868370056 }
44,883
# Initialize Rouge object rouge = Rouge() # Check for empty lists or mismatched lengths if not reference_questions or not generated_questions or len(reference_questions) != len(generated_questions): print("Error: Reference questions or generated questions have mismatched lengths or are empty.") else: try: # Calculate ROUGE scores scores = rouge.get_scores(generated_questions, reference_questions) # Check if scores are available if scores: # Access ROUGE-L F1 scores (other metrics like ROUGE-N are also available) rouge_l_scores = [score["rouge-l"]["f"] for score in scores] print("ROUGE-L F1 Scores:", rouge_l_scores) else: print("Warning: ROUGE scores could not be computed.") except Exception as e: print(f"Error during ROUGE score calculation: {e}")
79cce456c2fce079940082be2e879e1d
{ "intermediate": 0.4851096272468567, "beginner": 0.22687408328056335, "expert": 0.28801625967025757 }
44,884
solution for a double click in react
853042ab33955d72b5685d793ad4a163
{ "intermediate": 0.3031418025493622, "beginner": 0.2500287592411041, "expert": 0.4468294084072113 }
44,885
Using this method as a working baseline, which accepts 5 params: ray start pos, ray end pos, quad vertices 1 2 and 3, how can I make a new method that works for triangles, not quads? private static Vector3 intersectRayWithSquare(Vector3 ray1, Vector3 ray2, Vector3 v1, Vector3 v2, Vector3 v3) { // https://stackoverflow.com/questions/21114796/3d-ray-quad-intersection-test-in-java // 1. Vector3 a = VectorUtils.subNew(v2, v1); Vector3 b = VectorUtils.subNew(v3, v1); Vector3 planeNormal = VectorUtils.cross(a, b); planeNormal.normalize(); // 2. Vector3 difference = VectorUtils.subNew(ray1, ray2); double dotDifference = planeNormal.dot(difference); // Parallel tolerance if(Math.abs(dotDifference) < 1e-6f) return null; double t = -planeNormal.dot(VectorUtils.subNew(ray1, v1)) / dotDifference; Vector3 collision = VectorUtils.addNew(ray1, VectorUtils.scaleNew(difference, t)); // 3. Vector3 dMS1 = VectorUtils.subNew(collision, v1); double u = dMS1.dot(a); double v = dMS1.dot(b); // 4. if(u >= 0.0f && u <= a.dot(a) && v >= 0.0f && v <= b.dot(b)) { return collision; } return null; }
6977ee587b69e869a3d52aa05baac334
{ "intermediate": 0.47330939769744873, "beginner": 0.13409017026424408, "expert": 0.39260047674179077 }
44,886
Hi, I'm making a website with ClojureScript, React, Bootstrap, and Apex Charts. This chart isn't working properly for me: (def approved-invoice-chart [ApexChart {:options (clj->js {:chart {:id "invoice-chart"} :plotoptions {:radialbar {:hollow {:size "60%"}}} :colors (util/colours :teal)}) :labels ["Cricket"] :series (clj->js [{:name "Approved Invoices" :data [83]}]) :type "radialBar" :width 500 :height 400}]) In the chart it says [Object object] % and the data is not being read
198f10c4101a6711bee1a1f2417d085d
{ "intermediate": 0.6713372468948364, "beginner": 0.24243950843811035, "expert": 0.08622322976589203 }
44,887
Hi, I’m making a website with ClojureScript, React, Bootstrap, and Apex Charts. Here’s how one of my charts is currently: (def approved-invoice-chart [:div [ApexChart {:options (clj->js {:chart {:id “invoice-chart”} :plotOptions {:radialBar {:hollow {:size “60%”}}} ; make the bar thinner :title {:text “Approved Invoices” :align “left”} :labels [“”] ; blank out the default apex chart label :colors (colours :orange-dark)}) :series [83] :type “radialBar” :width 500 :height 400}] [:p “Hello”]]) This is the spec: Do it as the % of actual revenue vs the estimated revenue Put a $ total on the chart if possible Total Estimate Revenue Total Actual Revenue Total Left to Invoice Is it possible to modify the chart to include these? Or am I better off overlaying them behind the chart in an overlapping div?
7e0782997d1ec4e27b7be08d8783441f
{ "intermediate": 0.694220244884491, "beginner": 0.2136380821466446, "expert": 0.09214163571596146 }
44,888
i have historical data of crypto as csv files i have following code to train a model on them whithout merging them, check if code has any problem or anything wrong: import os import numpy as np import pandas as pd from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler def data_generator(file_paths, batch_size, train=True, scaler=None): while True: # Loop forever so the generator never terminates # Shuffle file paths to ensure random distribution of data across files np.random.shuffle(file_paths) for file_path in file_paths: data = pd.read_csv(file_path) # Split features and labels X = data.drop([ 'Date', 'Symbol', 'y_High_1d', 'y_Low_1d', 'y_Priority_1d', 'y_High_2d', 'y_Low_2d', 'y_Priority_2d', 'y_High_3d', 'y_Low_3d', 'y_Priority_3d', 'y_High_5d', 'y_Low_5d', 'y_Priority_5d'], axis=1).values y_high_1d = data['y_High_1d'].values y_low_1d = data['y_Low_1d'].values y_Priority_1d = data['y_Priority_1d'].values y_high_2d = data['y_High_2d'].values y_low_2d = data['y_Low_2d'].values y_Priority_2d = data['y_Priority_2d'].values y_high_3d = data['y_High_3d'].values y_low_3d = data['y_Low_3d'].values y_Priority_3d = data['y_Priority_3d'].values y_high_5d = data['y_High_5d'].values y_low_5d = data['y_Low_5d'].values y_Priority_5d = data['y_Priority_5d'].values # Optionally, apply preprocessing here (e.g., Scaler transform) if scaler is not None and train: X = scaler.fit_transform(X) elif scaler is not None: X = scaler.transform(X) # Splitting data into batches for i in range(0, len(data), batch_size): end = i + batch_size X_batch = X[i:end] y_high_batch_1d = y_high_1d[i:end] y_low_batch_1d = y_low_1d[i:end] y_priority_batch_1d = y_priority_1d[i:end] y_high_batch_2d = y_high_2d[i:end] y_low_batch_2d = y_low_2d[i:end] y_priority_batch_2d = y_priority_2d[i:end] y_high_batch_3d = y_high_3d[i:end] y_low_batch_3d = y_low_3d[i:end] y_priority_batch_3d = y_priority_3d[i:end] y_high_batch_5d = y_high_5d[i:end] y_low_batch_5d = y_low_5d[i:end] y_priority_batch_5d = y_priority_5d[i:end] yield X_batch, [y_high_batch_1d, y_low_batch_1d,y_priority_batch_1d, y_high_batch_2d, y_low_batch_2d,y_priority_batch_2d, y_high_batch_3d, y_low_batch_3d, y_priority_batch_3d, y_high_batch_5d, y_low_batch_5d, y_priority_batch_5d] dataset_dir = r'F:\day_spot' file_paths = [os.path.join(dataset_dir, file_name) for file_name in os.listdir(dataset_dir)] train_files, val_files = train_test_split(file_paths, test_size=0.06, random_state=42) batch_size = 72 # Optional: Initialize a scaler for data normalization scaler = StandardScaler() # Create data generators train_gen = data_generator(train_files, batch_size, train=True, scaler=scaler) val_gen = data_generator(val_files, batch_size, train=False, scaler=scaler) input_shape = (6427,) inputs = Input(shape=(input_shape,)) x = Dense(6427, activation='relu', input_shape=(input_shape,)) (inputs) x = Dropout(0.35) (x) x = Dense(3200, activation='relu') (x) x = Dropout(0.30) (x) x = Dense(1800, activation='relu') (x) x = Dropout(0.25) (x) x = Dense(1024, activation='relu') (x) x = Dropout(0.20) (x) x = Dense(512, activation='relu') (x) x = Dropout(0.15) (x) x = Dense(256, activation='relu') (x) x = Dropout(0.1) (x) x = Dense(128, activation='relu') (x) x = Dropout(0.05) (x) x = Dense(64, activation='relu') (x) x = Dropout(0.05) (x) x = Dense(32, activation='relu') (x) # Defining three separate outputs out_high_1d = Dense(1, name='high_output_1d')(x) # No activation, linear output out_low_1d = Dense(1, name='low_output_1d')(x) # No activation, linear output out_priority_1d = Dense(1, activation='sigmoid', name='priority_output_1d')(x) out_high_2d = Dense(1, name='high_output_2d')(x) # No activation, linear output out_low_2d = Dense(1, name='low_output_2d')(x) # No activation, linear output out_priority_2d = Dense(1, activation='sigmoid', name='priority_output_2d')(x) out_high_3d = Dense(1, name='high_output_3d')(x) # No activation, linear output out_low_3d = Dense(1, name='low_output_3d')(x) # No activation, linear output out_priority_3d = Dense(1, activation='sigmoid', name='priority_output_3d')(x) out_high_5d = Dense(1, name='high_output_5d')(x) # No activation, linear output out_low_5d = Dense(1, name='low_output_5d')(x) # No activation, linear output out_priority_5d = Dense(1, activation='sigmoid', name='priority_output_5d')(x) # Constructing the model model = Model(inputs=inputs, outputs=[ out_high_1d, out_low_1d, out_priority_1d,out_high_2d, out_low_2d, out_priority_2d, out_high_3d, out_low_3d, out_priority_3d,out_high_5d, out_low_5d, out_priority_5d]) model.compile(optimizer='adam', loss={ 'out_high_1d': 'mse', 'out_low_1d': 'mse', 'out_priority_1d': 'binary_crossentropy', 'out_high_2d': 'mse', 'out_low_2d': 'mse', 'out_priority_2d': 'binary_crossentropy', 'out_high_3d': 'mse', 'out_low_3d': 'mse', 'out_priority_3d': 'binary_crossentropy', 'out_high_5d': 'mse', 'out_low_5d': 'mse', 'out_priority_5d': 'binary_crossentropy' }, metrics={ 'out_high_1d': ['mae'], 'out_low_1d': ['mae'], 'out_priority_1d': ['accuracy'], 'out_high_2d': ['mae'], 'out_low_2d': ['mae'], 'out_priority_2d': ['accuracy'], 'out_high_3d': ['mae'], 'out_low_3d': ['mae'], 'out_priority_3d': ['accuracy'], 'out_high_5d': ['mae'], 'out_low_5d': ['mae'], 'out_priority_5d': ['accuracy'] } loss_weights={ 'out_high_1d': 1.0, 'out_low_1d': 1.0, 'out_priority_1d': 1.0, 'out_high_2d': 1.0, 'out_low_2d': 1.0, 'out_priority_2d': 1.0, 'out_high_3d': 1.0, 'out_low_3d': 1.0, 'out_priority_3d': 1.0, 'out_high_5d': 1.0, 'out_low_5d': 1.0, 'out_priority_5d': 1.0 } ) def count_samples(file_paths): total_samples = 0 for file_path in file_paths: df = pd.read_csv(file_path) samples = len(df) total_samples += samples return total_samples number_of_training_samples = count_samples(train_files) number_of_validation_samples = count_samples(val_files) print(f'Number of training samples: {number_of_training_samples}') print(f'Number of validation samples: {number_of_validation_samples}') # You'll need to determine steps_per_epoch and validation_steps based on your data size and batch size steps_per_epoch = np.ceil(number_of_training_samples / batch_size) # Replace number_of_training_samples validation_steps = np.ceil(number_of_validation_samples / batch_size) # Replace number_of_validation_samples model.fit(train_gen, steps_per_epoch=steps_per_epoch, validation_data=val_gen, validation_steps=validation_steps, epochs=10000)
326965015cb841e4c563e0a9ab06ff7c
{ "intermediate": 0.4387111961841583, "beginner": 0.3714579939842224, "expert": 0.18983085453510284 }
44,889
How many unique lines in 'man man' contain the string “man”?
b40a4d1350713a9332b1fda22bda47cc
{ "intermediate": 0.374423623085022, "beginner": 0.30532991886138916, "expert": 0.32024645805358887 }
44,890
Hi there, please be a senior sapui5 developer and answer my question with working code examples.
859e7b94a9d2d3df8e67f2ec722ad133
{ "intermediate": 0.4102480113506317, "beginner": 0.2819591760635376, "expert": 0.3077927827835083 }
44,891
Hi there, please be a senior sapui5 developer and answer my question with working code examples.
1418c9a4ff3f1b7e6c4b1265fe3fde24
{ "intermediate": 0.4102480113506317, "beginner": 0.2819591760635376, "expert": 0.3077927827835083 }
44,892
Hi there, please be a senior sapui5 developer and answer my question with working code examples.
c9881dc77abbaf8144fa4b338592eb75
{ "intermediate": 0.4102480113506317, "beginner": 0.2819591760635376, "expert": 0.3077927827835083 }
44,893
subtitles ending very early. can you fix it?: caption_clips = [] for start_time, end_time, text in subtitles: duration = (end_time.hour * 3600 + end_time.minute * 60 + end_time.second + end_time.microsecond / 1000000) - (start_time.hour * 3600 + start_time.minute * 60 + start_time.second + start_time.microsecond / 1000000) caption_clip = TextClip(text, fontsize=40, bg_color='black', color='yellow', font=font_path). set_position(('center ', 'center'), relative=True).set_duration(duration).set_start((start_time.hour * 3600 + start_time.minute * 60 + start_time.second + start_time.microsecond / 1000000)) caption_clips. append(caption_clip)
2b7eea42f304e1131bf67dcf34d11724
{ "intermediate": 0.38213011622428894, "beginner": 0.26602816581726074, "expert": 0.35184168815612793 }
44,894
matplotip
050688482d70a2b269ad96b4e18d5456
{ "intermediate": 0.23494280874729156, "beginner": 0.23951701819896698, "expert": 0.5255401730537415 }
44,895
Hi
8b7606a238962fa1612f7e171b2e3542
{ "intermediate": 0.33010533452033997, "beginner": 0.26984941959381104, "expert": 0.400045245885849 }
44,896
Are you able to write code for a button that if pressed registers you for a met gala
73074ddb706f072bcf4fac6c2b19babe
{ "intermediate": 0.37508150935173035, "beginner": 0.12054949253797531, "expert": 0.5043689608573914 }
44,897
windows cmd text doesnt go on new line
671ca48c2356d5b7e3d0a045d275d224
{ "intermediate": 0.31560084223747253, "beginner": 0.3116927146911621, "expert": 0.37270647287368774 }
44,898
defold lua script with action inupt pos with screen resolution independents
971287135625841864689c892b04493b
{ "intermediate": 0.35241636633872986, "beginner": 0.4425655007362366, "expert": 0.20501813292503357 }
44,899
I have a existing email Script where i need to get the value of "Description" and "Requested for" field from RITM table for that purpose i have written a script. servicenow
d563d5533116bc14810cd502d8d9c714
{ "intermediate": 0.3354749381542206, "beginner": 0.2254585474729538, "expert": 0.4390665590763092 }
44,900
package com.mns.returns.dto; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.util.ArrayList; import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor @Builder public class ReturnChannelResponse { @JsonProperty("OrderHeaderKey") private String orderHeaderKey; @JsonProperty("OrderNumber") private String orderNumber; @JsonProperty("OrderChannels") private List<OrderChannel> orderChannels = new ArrayList<OrderChannel>(); @JsonProperty("MnSReturnAddress") private Boolean mnsReturnAddress; @JsonProperty("OrderItemList") private List<OrderItem> orderItemList = new ArrayList<OrderItem>(); } package com.mns.returns.dto; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.util.ArrayList; import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor @Builder public class OrderItem { @JsonProperty("UpcVariant") private String upcVariant; @JsonProperty("Sku") private String sku; @JsonProperty("ShipNode") private String shipNode; @JsonProperty("ProductType") private String productType; @JsonProperty("salesOrderIndicator") private String salesOrderIndicator; @JsonProperty("levelOfService") private String levelOfService; @JsonProperty("ItemDetails") private ItemDetails itemDetails; @JsonProperty("LineItemChannels") private List<LineItemChannel> lineItemChannels = new ArrayList<>(); } package com.mns.returns.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.mns.returns.dto.address.ChannelAddress; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.util.ArrayList; import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor @Builder public class LineItemChannel { @JsonProperty("ChannelType") private String channelType; @JsonProperty("SubChannelTypes") private List<SubChannelType> subChannelTypes = new ArrayList<>(); @JsonProperty("Address") private ChannelAddress address; } package com.mns.returns.dto.address; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.data.mongodb.core.mapping.Document; @Builder @Data @NoArgsConstructor @AllArgsConstructor @Document("channel-address") public class ChannelAddress { @JsonProperty("channelID") private String channelID; @JsonProperty("address1") private String address1; @JsonProperty("address2") private String address2; @JsonProperty("address3") private String address3; @JsonProperty("city") private String city; @JsonProperty("country") private String country; @JsonProperty("county") private String county; @JsonProperty("postalCode") private String postalCode; @JsonProperty("contactName") private String contactName; @JsonProperty("contactPhoneNo") private String contactPhoneNo; @JsonProperty("contactEmailId") private String contactEmailId; @JsonProperty("clientId") private String clientId; @JsonProperty("childClientId") private String childClientId; @JsonProperty("dsvReturnAddress") private Boolean dsvReturnAddress; } package com.mns.returns.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.mns.returns.dto.address.ChannelAddress; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.util.ArrayList; import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor @Builder public class OrderChannel { @JsonProperty("ChannelType") private String channelType; @JsonProperty("SubChannelTypes") private List<SubChannelType> subChannelTypes = new ArrayList<SubChannelType>(); @JsonProperty("Address") private ChannelAddress address; } Specifically tell me...How to update the java code and strictly provide this implememntation of createmymethod(ReturnChannelResponse response) implementation based on below logic In case of childClientId is there and as value is 0.....add "returnShipNode":8222 in api response if childClientId is not there or not 0 then see postalcode.... starting with xx then it will stamped "returnShipNode":8222 in api reponse...otherwise it will not be stamped here is a sample with new property to be added every addesss where condition satisfied..... "returnShipNode": "8222" in ChannelAddress class which are referenced in OrderItemList and OrderChannel.....set for both places based on the condition provided "Address": { "channelID": "CH24", "address1": "Unit1 Boughton Industrial Estate", "address2": "Clipper Logistics - Ollerton", "address3": "", "city": "Newark", "country": "GB", "county": "", "postalCode": "NG22 9LD", "contactName": "M&S National Returns Centre", "contactPhoneNo": null, "contactEmailId": null, "clientId": "168", "childClientId": "0", "dsvReturnAddress": false, "returnShipNode": "8222" } Only tell me How to update the java code and strictly provide this implememntation of createmymethod(ReturnChannelResponse response) implementation based on below logic
2d0e7c12b83d65027f1d72274987749d
{ "intermediate": 0.397756963968277, "beginner": 0.43010395765304565, "expert": 0.17213909327983856 }
44,901
Bob is a lackadaisical teenager. He likes to think that he's very cool. And he definitely doesn't get excited about things. That wouldn't be cool. When people talk to him, his responses are pretty limited. Instructions Your task is to determine what Bob will reply to someone when they say something to him or ask him a question. Bob only ever answers one of five things: "Sure." This is his response if you ask him a question, such as "How are you?" The convention used for questions is that it ends with a question mark. "Whoa, chill out!" This is his answer if you YELL AT HIM. The convention used for yelling is ALL CAPITAL LETTERS. "Calm down, I know what I'm doing!" This is what he says if you yell a question at him. "Fine. Be that way!" This is how he responds to silence. The convention used for silence is nothing, or various combinations of whitespace characters. "Whatever." This is what he answers to anything else. Write a python program on th above instructions def hey_response(hey_bob):
d96a827b5cf4cfdd0c95854ce8dc8868
{ "intermediate": 0.3270403742790222, "beginner": 0.3495320677757263, "expert": 0.3234274983406067 }
44,902
Beklow is a class CImage in c++ that im working on, I wan you to write only the CImage::forward() and CImage::backward() functions to alter the order of the component with the specified label. It is likely easiest to just maintain the desired order of the Component objects and defer actually copying/moving pixel colors until we actually save a new image. #include "component.h" #include "cimage.h" #include "bmplib.h" #include <deque> #include <iomanip> #include <iostream> #include <cmath> // You shouldn't need other #include's - Ask permission before adding using namespace std; // TO DO: Complete this function CImage::CImage(const char* bmp_filename) { // Note: readRGBBMP dynamically allocates a 3D array // (i.e. array of pointers to pointers (1 per row/height) where each // point to an array of pointers (1 per col/width) where each // point to an array of 3 unsigned char (uint8_t) pixels [R,G,B values]) img_ = nullptr; img_ = readRGBBMP(bmp_filename, h_, w_); // ================================================ // TO DO: call readRGBBMP to initialize img_, h_, and w_; // Leave this check if(img_ == NULL) { throw std::logic_error("Could not read input file"); } // Set the background RGB color using the upper-left pixel for(int i=0; i < 3; i++) { bgColor_[i] = img_[0][0][i]; } // ======== This value should work - do not alter it ======= // RGB "distance" threshold to continue a BFS from neighboring pixels bfsBgrdThresh_ = 60; // ================================================ // TO DO: Initialize the vector of vectors of labels to -1 vector<int> row(w_ , -1); labels_.resize(h_, row); // ================================================ // TO DO: Initialize any other data members } // TO DO: Complete this function CImage::~CImage() { for (int i=0; i < h_;i++){ if (img_[i] != nullptr){ for (int j=0; j < w_;j++){ delete[] img_[i][j]; } delete [] img_[i]; } } delete [] img_; img_ = nullptr; } // Complete - Do not alter bool CImage::isCloseToBground(uint8_t p1[3], double within) { // Computes "RGB" (3D Cartesian distance) double dist = sqrt( pow(p1[0]-bgColor_[0],2) + pow(p1[1]-bgColor_[1],2) + pow(p1[2]-bgColor_[2],2) ); return dist <= within; } // TO DO: Complete this function size_t CImage::findComponents() { size_t count = 0; for (int i=0; i < h_; i++){ for (int j=0; j < w_;j++){ if (!isCloseToBground(img_[i][j], bfsBgrdThresh_) && labels_[i][j] == -1){ Component newcomp = bfsComponent(i, j, count); components_.push_back(newcomp); count++; } } } return count; } // Complete - Do not alter void CImage::printComponents() const { cout << "Height and width of image: " << h_ << "," << w_ << endl; cout << setw(4) << "Ord" << setw(4) << "Lbl" << setw(6) << "ULRow" << setw(6) << "ULCol" << setw(4) << "Ht." << setw(4) << "Wi." << endl; for(size_t i = 0; i < components_.size(); i++) { const Component& c = components_[i]; cout << setw(4) << i << setw(4) << c.label << setw(6) << c.ulNew.row << setw(6) << c.ulNew.col << setw(4) << c.height << setw(4) << c.width << endl; } } // TODO: Complete this function int CImage::getComponentIndex(int mylabel) const { for (int i=0; i< components_.size();i++){ if (components_[i].label == mylabel){ return i; } } return 0; } // Nearly complete - TO DO: // Add checks to ensure the new location still keeps // the entire component in the legal image boundaries void CImage::translate(int mylabel, int nr, int nc) { // Get the index of specified component int cid = getComponentIndex(mylabel); if(cid < 0) { return; } int h = components_[cid].height; int w = components_[cid].width; // ========================================================== // ADD CODE TO CHECK IF THE COMPONENT WILL STILL BE IN BOUNDS // IF NOT: JUST RETURN. if (h < 0 || h >= h_ || w < 0 || w >= w_){ return; } // ========================================================== // If we reach here we assume the component will still be in bounds // so we update its location. Location nl(nr, nc); components_[cid].ulNew = nl; } // TO DO: Complete this function void CImage::forward(int mylabel, int delta) { int cid = getComponentIndex(mylabel); if(cid < 0 || delta <= 0) { return; } // Add your code here } // TO DO: Complete this function void CImage::backward(int mylabel, int delta) { int cid = getComponentIndex(mylabel); if(cid < 0 || delta <= 0) { return; } // Add your code here } // TODO: complete this function void CImage::save(const char* filename) { // Create another image filled in with the background color uint8_t*** out = newImage(bgColor_); // Add your code here writeRGBBMP(filename, out, h_, w_); // Add any other code you need after this } // Complete - Do not alter - Creates a blank image with the background color uint8_t*** CImage::newImage(uint8_t bground[3]) const { uint8_t*** img = new uint8_t**[h_]; for(int r=0; r < h_; r++) { img[r] = new uint8_t*[w_]; for(int c = 0; c < w_; c++) { img[r][c] = new uint8_t[3]; img[r][c][0] = bground[0]; img[r][c][1] = bground[1]; img[r][c][2] = bground[2]; } } return img; } // To be completed void CImage::deallocateImage(uint8_t*** img) const { // Add your code here } // TODO: Complete the following function or delete this if // you do not wish to use it. Component CImage::bfsComponent(int pr, int pc, int mylabel) { // Arrays to help produce neighbors easily in a loop // by encoding the **change** to the current location. // Goes in order N, NW, W, SW, S, SE, E, NE int neighbor_row[8] = {-1, -1, 0, 1, 1, 1, 0, -1}; int neighbor_col[8] = {0, -1, -1, -1, 0, 1, 1, 1}; deque<Location> curr; curr.push_back(Location(pr,pc)); int minrow = pr, maxrow = pr, mincol = pc, maxcol = pc; labels_[pr][pc] = mylabel; while (! curr.empty()){ Location current = curr.front(); // extract item in front of q curr.pop_front(); int x = current.row; int y = current.col; //update bounding box minrow = min(minrow, x); maxrow = max(maxrow, x); mincol = min(mincol, y); maxcol = max(maxcol, y); for (int i=0; i<8;i++){ // loc of neighbors int nx = x + neighbor_row[i]; int ny = y + neighbor_col[i]; if (nx >= 0 && nx < h_ && ny >= 0 && ny < w_){ //check if valid if (!isCloseToBground(img_[nx][ny], bfsBgrdThresh_) && labels_[nx][ny] == -1){ labels_[nx][ny] = mylabel; curr.push_back(Location(nx,ny)); } } } } int height = maxrow - minrow + 1; int width = maxcol - mincol +1; Component component(Location(minrow,mincol), height, width, mylabel); return component; } // Complete - Debugging function to save a new image void CImage::labelToRGB(const char* filename) { //multiple ways to do this -- this is one way vector<uint8_t[3]> colors(components_.size()); for(unsigned int i=0; i<components_.size(); i++) { colors[i][0] = rand() % 256; colors[i][1] = rand() % 256; colors[i][2] = rand() % 256; } for(int i=0; i<h_; i++) { for(int j=0; j<w_; j++) { int mylabel = labels_[i][j]; if(mylabel >= 0) { img_[i][j][0] = colors[mylabel][0]; img_[i][j][1] = colors[mylabel][1]; img_[i][j][2] = colors[mylabel][2]; } else { img_[i][j][0] = 0; img_[i][j][1] = 0; img_[i][j][2] = 0; } } } writeRGBBMP(filename, img_, h_, w_); } // Complete - Do not alter const Component& CImage::getComponent(size_t i) const { if(i >= components_.size()) { throw std::out_of_range("Index to getComponent is out of range"); } return components_[i]; } // Complete - Do not alter size_t CImage::numComponents() const { return components_.size(); } // Complete - Do not alter void CImage::drawBoundingBoxesAndSave(const char* filename) { for(size_t i=0; i < components_.size(); i++){ Location ul = components_[i].ulOrig; int h = components_[i].height; int w = components_[i].width; for(int i = ul.row; i < ul.row + h; i++){ for(int k = 0; k < 3; k++){ img_[i][ul.col][k] = 255-bgColor_[k]; img_[i][ul.col+w-1][k] = 255-bgColor_[k]; } // cout << "bb " << i << " " << ul.col << " and " << i << " " << ul.col+w-1 << endl; } for(int j = ul.col; j < ul.col + w ; j++){ for(int k = 0; k < 3; k++){ img_[ul.row][j][k] = 255-bgColor_[k]; img_[ul.row+h-1][j][k] = 255-bgColor_[k]; } // cout << "bb2 " << ul.row << " " << j << " and " << ul.row+h-1 << " " << j << endl; } } writeRGBBMP(filename, img_, h_, w_); }
e9e44b43f19167b81e656e75c01cecb5
{ "intermediate": 0.534263014793396, "beginner": 0.3071408271789551, "expert": 0.15859617292881012 }
44,903
package com.mns.returns.dto; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.util.ArrayList; import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor @Builder public class ReturnChannelResponse { @JsonProperty("OrderHeaderKey") private String orderHeaderKey; @JsonProperty("OrderNumber") private String orderNumber; @JsonProperty("OrderChannels") private List<OrderChannel> orderChannels = new ArrayList<OrderChannel>(); @JsonProperty("MnSReturnAddress") private Boolean mnsReturnAddress; @JsonProperty("OrderItemList") private List<OrderItem> orderItemList = new ArrayList<OrderItem>(); } package com.mns.returns.dto; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.util.ArrayList; import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor @Builder public class OrderItem { @JsonProperty("UpcVariant") private String upcVariant; @JsonProperty("Sku") private String sku; @JsonProperty("ShipNode") private String shipNode; @JsonProperty("ProductType") private String productType; @JsonProperty("salesOrderIndicator") private String salesOrderIndicator; @JsonProperty("levelOfService") private String levelOfService; @JsonProperty("ItemDetails") private ItemDetails itemDetails; @JsonProperty("LineItemChannels") private List<LineItemChannel> lineItemChannels = new ArrayList<>(); } package com.mns.returns.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.mns.returns.dto.address.ChannelAddress; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.util.ArrayList; import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor @Builder public class LineItemChannel { @JsonProperty("ChannelType") private String channelType; @JsonProperty("SubChannelTypes") private List<SubChannelType> subChannelTypes = new ArrayList<>(); @JsonProperty("Address") private ChannelAddress address; } package com.mns.returns.dto.address; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.data.mongodb.core.mapping.Document; @Builder @Data @NoArgsConstructor @AllArgsConstructor @Document("channel-address") public class ChannelAddress { @JsonProperty("channelID") private String channelID; @JsonProperty("address1") private String address1; @JsonProperty("address2") private String address2; @JsonProperty("address3") private String address3; @JsonProperty("city") private String city; @JsonProperty("country") private String country; @JsonProperty("county") private String county; @JsonProperty("postalCode") private String postalCode; @JsonProperty("contactName") private String contactName; @JsonProperty("contactPhoneNo") private String contactPhoneNo; @JsonProperty("contactEmailId") private String contactEmailId; @JsonProperty("clientId") private String clientId; @JsonProperty("childClientId") private String childClientId; @JsonProperty("dsvReturnAddress") private Boolean dsvReturnAddress; } package com.mns.returns.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.mns.returns.dto.address.ChannelAddress; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.util.ArrayList; import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor @Builder public class OrderChannel { @JsonProperty("ChannelType") private String channelType; @JsonProperty("SubChannelTypes") private List<SubChannelType> subChannelTypes = new ArrayList<SubChannelType>(); @JsonProperty("Address") private ChannelAddress address; } Specifically tell me...How to update the java code and strictly provide this implememntation of createmymethod(ReturnChannelResponse response) implementation based on below logic In case of childClientId is there and as value is 0.....add "returnShipNode":8222 in api response if childClientId is not there or not 0 then see postalcode.... starting with xx then it will stamped "returnShipNode":8222 in api reponse...otherwise it will not be stamped here is a sample with new property to be added every addesss where condition satisfied..... "returnShipNode": "8222" in ChannelAddress class which are referenced in OrderItemList and OrderChannel.....set for both places based on the condition provided "Address": { "channelID": "CH24", "address1": "Unit1 Boughton Industrial Estate", "address2": "Clipper Logistics - Ollerton", "address3": "", "city": "Newark", "country": "GB", "county": "", "postalCode": "NG22 9LD", "contactName": "M&S National Returns Centre", "contactPhoneNo": null, "contactEmailId": null, "clientId": "168", "childClientId": "0", "dsvReturnAddress": false, "returnShipNode": "8222" } Only tell me How to update the java code and strictly provide this implememntation of createmymethod(ReturnChannelResponse response) implementation based on below logic
429819ac9c7a8f21d52450ef3b535c96
{ "intermediate": 0.397756963968277, "beginner": 0.43010395765304565, "expert": 0.17213909327983856 }
44,904
public void setReturnShipNode(ReturnChannelResponse response, String returnShipNode) { log.debug("Entering setReturnShipNode method"); setReturnShipNodeForOrderItemList(response.getOrderItemList(), returnShipNode); setReturnShipNodeForOrderChannels(response.getOrderChannels(), returnShipNode); log.debug("Exit setReturnShipNode method"); } private void setReturnShipNodeForOrderItemList(List<OrderItem> orderItemList, String returnShipNode) { for (OrderItem orderItem : orderItemList) { if (ObjectUtils.allNotNull(orderItem.getItemDetails(), orderItem.getItemDetails().getAddress())) { String childClientId = orderItem.getItemDetails().getChildClientId(); String postalCode = orderItem.getItemDetails().getAddress().getPostalCode(); if (ObjectUtils.isNotEmpty(childClientId) && "0".equals(childClientId)) { orderItem.getItemDetails().getAddress().setReturnShipNode(returnShipNode); log.debug("Setting returnShipNode for OrderItem with Address: {}", orderItem.getItemDetails().getAddress()); } else if (ObjectUtils.isNotEmpty(postalCode) && postalCode.startsWith("XX")) { orderItem.getItemDetails().getAddress().setReturnShipNode(returnShipNode); log.debug("Setting returnShipNode for OrderItem with Address: {}", orderItem.getItemDetails().getAddress()); } } } } private void setReturnShipNodeForOrderChannels(List<OrderChannel> orderChannels, String returnShipNode) { for (OrderChannel orderChannel : orderChannels) { if (ObjectUtils.allNotNull(orderChannel.getAddress())) { String childClientId = orderChannel.getAddress().getChildClientId(); String postalCode = orderChannel.getAddress().getPostalCode(); if (ObjectUtils.isNotEmpty(childClientId) && "0".equals(childClientId)) { orderChannel.getAddress().setReturnShipNode(returnShipNode); log.debug("Setting returnShipNode for OrderChannel with Address: {}", orderChannel.getAddress()); } else if (ObjectUtils.isNotEmpty(postalCode) && postalCode.startsWith("XX")) { orderChannel.getAddress().setReturnShipNode(returnShipNode); log.debug("Setting returnShipNode for OrderChannel with Address: {}", orderChannel.getAddress()); } } } } } orderItem.getItemDetails() is wrong.....use below correct method calling and update the above code public void setReturnShipNode(ReturnChannelResponse response, String returnShipNode) { log.debug("Entering setReturnShipNode method"); setReturnShipNodeForOrderItemList(response.getOrderItemList(), returnShipNode); setReturnShipNodeForOrderChannels(response.getOrderChannels(), returnShipNode); log.debug("Exit setReturnShipNode method"); } private void setReturnShipNodeForOrderItemList(List<OrderItem> orderItemList, String returnShipNode) { for (OrderItem orderItem : orderItemList) { log.debug("Setting returnShipNode for LineItemChannels of OrderItem: {}", orderItem.getLineItemChannels()); setReturnShipNodeForLineItemChannels(orderItem.getLineItemChannels(), returnShipNode); } } private void setReturnShipNodeForLineItemChannels(List<LineItemChannel> lineItemChannels, String returnShipNode) { for (LineItemChannel lineItemChannel : lineItemChannels) { log.debug("Setting returnShipNode for LineItemChannel with address childClientId: {}", lineItemChannel.getAddress().getChildClientId()); if (lineItemChannel != null && lineItemChannel.getAddress() != null && lineItemChannel.getAddress().getChildClientId() != null && lineItemChannel.getAddress().getChildClientId().equals("0")) { lineItemChannel.getAddress().setReturnShipNode(returnShipNode); } } } private void setReturnShipNodeForOrderChannels(List<OrderChannel> orderChannels, String returnShipNode) { for (OrderChannel orderChannel : orderChannels) { if (orderChannel != null && orderChannel.getAddress() != null && orderChannel.getAddress().getChildClientId() != null && orderChannel.getAddress().getChildClientId().equals("0")) { log.debug("Setting returnShipNode for OrderChannel with address childClientId: {}", orderChannel.getAddress().getChildClientId()); orderChannel.getAddress().setReturnShipNode(returnShipNode); } } }
93f323a273c1838cbd288173cdaa08a9
{ "intermediate": 0.3082112967967987, "beginner": 0.5164636969566345, "expert": 0.17532505095005035 }
44,905
hi
37fc020d0c868bfea93c695855eda879
{ "intermediate": 0.3246487081050873, "beginner": 0.27135494351387024, "expert": 0.40399640798568726 }
44,906
What is the output of the following snippet if the user enters two lines containing 11 and 4 respectively? x = int(input()) y = int(input()) x = x % y x = x % y y = y % x print(y) donner moi une explication en français
0d73f53c1bd1a09436793474ed100161
{ "intermediate": 0.2778390645980835, "beginner": 0.5516234040260315, "expert": 0.17053748667240143 }
44,907
Create a Python file and name it list_operations and implement the followings: Given a list [1, 2, 3, 4, 5, 6], reverse the list and then print it. Given a list [4, 6, 8, 6, 12], remove all the occurrences of 6 and then print it. Given a list [5, 10, 15, 200, 25, 50, 20], find the value 20 in the list, and if it is present, replace it with 200. Only update the first occurrence of the value. Given 2 lists of strings: list1 = ["M", "na", "i", "Ke"] list2 = ["y", "me", "s", "lly"] Concatenate the two lists index-wise, so it becomes ['My', 'name', 'is', 'Kelly']
07c439fa4f7be39b2a5c89af56e277a4
{ "intermediate": 0.3254338800907135, "beginner": 0.23164860904216766, "expert": 0.44291749596595764 }
44,908
I have a git lab repository of spring boot application, i want to build the application using CI/CD pipeline and host in centos server machine, how to do that? explain in detail
711f6be278ab37d2cacc226f7639b252
{ "intermediate": 0.4886181354522705, "beginner": 0.1613287776708603, "expert": 0.3500531315803528 }
44,909
generate a beautiful girl pic.
8a372510429c2beafbd97e1565f781a1
{ "intermediate": 0.27402904629707336, "beginner": 0.2064235359430313, "expert": 0.5195474028587341 }
44,910
i have a zip with tensorflow from github. how to install it to python library?
666e877511843901b4ddf7d60f7d3230
{ "intermediate": 0.6363131999969482, "beginner": 0.07778676599264145, "expert": 0.2858999967575073 }
44,911
We have requirement auto close the interaction in workspace once associated incidents closed. I know that we can do it by using BR. Now question, Is it really recommended by ServiceNow to configure this as it is out of the box functionality. Please help with more details, why it is not recommended or any drawback having it in real time project.
60c4e8e9d9d99b110531225b647468ef
{ "intermediate": 0.4945579171180725, "beginner": 0.2755497694015503, "expert": 0.2298922836780548 }
44,912
Implement a program in python that translates from English to Pig Latin. Pig Latin is a made-up children's language that's intended to be confusing. It obeys a few simple rules (below), but when it's spoken quickly it's really difficult for non-children (and non-native speakers) to understand. Rule 1: If a word begins with a vowel sound, add an "ay" sound to the end of the word. Please note that "xr" and "yt" at the beginning of a word make vowel sounds (e.g. "xray" -> "xrayay", "yttria" -> "yttriaay"). Rule 2: If a word begins with a consonant sound, move it to the end of the word and then add an "ay" sound to the end of the word. Consonant sounds can be made up of multiple consonants, such as the "ch" in "chair" or "st" in "stand" (e.g. "chair" -> "airchay"). Rule 3: If a word starts with a consonant sound followed by "qu", move it to the end of the word, and then add an "ay" sound to the end of the word (e.g. "square" -> "aresquay"). Rule 4: If a word contains a "y" after a consonant cluster or as the second letter in a two letter word it makes a vowel sound (e.g. "rhythm" -> "ythmrhay", "my" -> "ymay"). There are a few more rules for edge cases, and there are regional variants too. Check the tests for all the details. Read more about Pig Latin on Wikipedia.
712c85523a65c538c28597cbef257ff0
{ "intermediate": 0.29022568464279175, "beginner": 0.3406817615032196, "expert": 0.3690924644470215 }
44,913
Что случилось в этой ошибке: Exception caught from launcher java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:67) at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87) at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: dev.su5ed.sinytra.connector.mod.DummyTarget at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:32) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.Launcher.run(Launcher.java:108) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.Launcher.main(Launcher.java:78) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) at cpw.mods.bootstraplauncher@1.1.2/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ... 5 more Caused by: java.lang.ClassNotFoundException: dev.su5ed.sinytra.connector.mod.DummyTarget at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:137) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:137) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:534) at java.base/java.lang.Class.forName(Class.java:513) at LAYER SERVICE/dev.su5ed.sinytra.connector@1.0.0-beta.39+1.20.1/dev.su5ed.sinytra.connector.service.ConnectorLoaderService$1.lambda$updateModuleReads$0(ConnectorLoaderService.java:60) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.api.LamdbaExceptionUtils.uncheck(LamdbaExceptionUtils.java:95) at LAYER SERVICE/dev.su5ed.sinytra.connector@1.0.0-beta.39+1.20.1/dev.su5ed.sinytra.connector.service.ConnectorLoaderService$1.updateModuleReads(ConnectorLoaderService.java:60) at MC-BOOTSTRAP/fml_loader@47.2.2/net.minecraftforge.fml.loading.ImmediateWindowHandler.acceptGameLayer(ImmediateWindowHandler.java:71) at MC-BOOTSTRAP/fml_loader@47.2.2/net.minecraftforge.fml.loading.FMLLoader.beforeStart(FMLLoader.java:207) at MC-BOOTSTRAP/fml_loader@47.2.2/net.minecraftforge.fml.loading.targets.CommonLaunchHandler.launchService(CommonLaunchHandler.java:105) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ... 13 more Exiting with ERROR
b0be5db68e61b1ce87955f92f381a244
{ "intermediate": 0.2878413796424866, "beginner": 0.4559469223022461, "expert": 0.25621169805526733 }
44,914
Ты технический писатель. Переведи файл справки " Repository related information Usage: ya dump <subcommand> Available subcommands: all-relations All relations between internal graph nodes in dot format. Please don't run from the arcadia root. build-plan Build plan compilation-database Alias for compile-commands compile-commands JSON compilation database conf-docs Print descriptions of entities (modules, macros, multimodules, etc.) dep-graph Dependency internal graph dir-graph Dependencies between directories dot-graph Dependency between directories in dot format files File list imprint Directory imprint json-dep-graph Dependency graph as json json-test-list All test entries as json loops All loops in arcadia module-info Modules info modules All modules peerdir-loops Loops by peerdirs recipes All recipes used in tests relation PEERDIR relations. Please don't run from the arcadia root. root Print Arcadia root src-deps Dump of all source dependencies test-list All test entries "
5b044cd4d7a69afe664cfd7968651f0c
{ "intermediate": 0.31005269289016724, "beginner": 0.5038713812828064, "expert": 0.18607595562934875 }
44,915
I have created four fields for all Country, City, State, Address and Taking Cmn_loaction Reference for all four fields. When i select country: only country should be displayed. When i select State: based on the country selected state should be displayed. When i select City: Based on country and state selected. City should display. When i select Adress: Based on country and state and city selected. address should display.
a6689bbe76cc081733ea262e4558f625
{ "intermediate": 0.3530542552471161, "beginner": 0.24808497726917267, "expert": 0.39886078238487244 }
44,916
whi is not working pip install "https://github.com/tensorflow/tensorflow.git@v2.9.0"
640de33d0e30732769b2c141f39c50fb
{ "intermediate": 0.306238055229187, "beginner": 0.16936923563480377, "expert": 0.5243926644325256 }
44,917
you are an expert Rust programmer and very good at algorithms. You are given the following problem: Input: A sorted vector of tuples: Vec<(u32, u32)>, representing coordinates. [(5,20), (10,20), (17,20),(25,40),(30,45),(42,45),(50,60),(55,57)] Problem: We need to keep ONLY tuples that ARE NOT inside other tuples in another vector. The first tuple of the list always will be pushed to the new vector. Example: Since the first tuple is always pushed, we will evaluate the second tuple: (10,20) -> 10 is between 5, 20 (first tuple), so it is inside. We discard it. The same occurs with (17,20), but no with (25,40). Since (25,40) does not overlap nothing from the past tuples, we pushed to the new list. Output: a Vec<(u32, u32)> with the tuples that ARE NOT inside other tuples You need to make this the most efficient and fastest implementation. You are free to use any trick, crate, package or algorithm. You are also free to use unsafe code. Provide the code.
64fb5a5bf50f6cd6ff9caadcde491807
{ "intermediate": 0.29266688227653503, "beginner": 0.13772226870059967, "expert": 0.5696108341217041 }
44,918
In servicenow, I want a particular team should have access to only Crisis map in workspace. After providing sn_fam.user and sn_fam.admin still the member in that team is not able to access Crisis map.
153b1f75c4f6bab4312ec5f091762a7f
{ "intermediate": 0.2621749937534332, "beginner": 0.28022587299346924, "expert": 0.45759913325309753 }
44,919
you are an expert Rust programmer and very good at algorithms. You are given the following problem: Input: A sorted vector of tuples: Vec<(u32, u32)>, representing coordinates. [(5,20), (10,20), (17,20),(25,40),(30,45),(42,45),(50,60),(55,57)] Problem: We need to keep ONLY tuples that ARE NOT inside other tuples in another vector. The first tuple of the list always will be pushed to the new vector. Example: Since the first tuple is always pushed, we will evaluate the second tuple: (10,20) -> 10 is between 5, 20 (first tuple), so it is inside. We discard it. The same occurs with (17,20), but no with (25,40). Since (25,40) does not overlap nothing from the past tuples, we pushed to the new list. (42,45) -> 42 is in between 30 and 45 (previous tuple), so we discard it. Output: a Vec<(u32, u32)> with the tuples that ARE NOT inside other tuples You need to make this the most efficient and fastest implementation. You are free to use any trick, crate, package or algorithm. You are also free to use unsafe code. Provide the code. The correct answer for that input should be: [(5,20), (25,40), (50,60)]
82a0c9e75f9439ebbc2d8c8edfe7fb39
{ "intermediate": 0.29063916206359863, "beginner": 0.17839205265045166, "expert": 0.5309687256813049 }
44,920
Whats wrong with this? let field = await questionItem.$('label'); let question = await field.innerText(); console.log('Question:', question); try { let textInput = await page.getByLabel(question); console.log('Text Input HTML:', textInput) } catch (error) { console.log('Error:', error); }
b09bd5c287f9c96d5c310edf64806902
{ "intermediate": 0.41712236404418945, "beginner": 0.44017550349235535, "expert": 0.1427021026611328 }
44,921
if the incident category is IT Infrastructure, then it should be visible to particular group (monitoring, delivery team) other categories should not be visible to these group
54f7af14f1bf9904bc413847a339c687
{ "intermediate": 0.19438153505325317, "beginner": 0.45425885915756226, "expert": 0.35135960578918457 }
44,922
Whats wrong with this Playwright code let field = await questionItem.$('label'); let question = await field.innerText(); console.log('Question:', question); try { let textInput = await page.getByLabel(question); console.log('Text Input HTML:', textInput) } catch (error) { console.log('Error:', error); }
3b1df9cb27d89220dd60faad0dac4ca3
{ "intermediate": 0.3944472074508667, "beginner": 0.45904189348220825, "expert": 0.14651092886924744 }
44,923
Kannst du mir diese Klasse umschreiben als Natives VUE3 Module in Composition Api? import { inject } from 'vue'; class Queue { constructor() { this.$eventBus = inject('eventbus'); this.items = []; this.queueRunning = false; this.playQueued = this.playQueued.bind(this); this.playQueuedEnded = this.playQueuedEnded.bind(this); } isEmpty() { return this.items.length === 0; } addToQueue(item) { item.fromQueue=true; item.step = 3; this.items.push(item); console.log('Queue: adding item to queue: ' + this.items.length, "queueRunning: " + this.queueRunning, this.items); if (!this.queueRunning) { console.log('Queue: added To Queue, start play cause queue is running ', "queueRunning: " + this.queueRunning); this.playQueued(); } } playQueued() { this.queueRunning = true; console.log('Queue: playQueued, queue length is: ', this.items.length); // fifo var item = this.items.shift(); item.step = 4; console.log("Queue: playQueued trigger eventBus", item.type, item); this.$eventBus.emit( item.type, item ); } playQueuedEnded(event){ event.target.removeEventListener('ended', this.playQueuedEnded, true); if (this.isEmpty()) { this.queueRunning = false; console.log( 'Queue: playQueuedEnded no more entries in queue: ' + this.items.length, this.queueRunning, ); } else { console.log( 'Queue: playQueuedEnded item ended, remaining items: ' + this.items.length, this.queueRunning, ); console.log('Queue: setting timer for next run: ', this.$config.settings.alerts.queueTimeDistance); var queueTimeDistanceTimeout = window.setTimeout( this.playQueued, this.$config.settings.alerts.queueTimeDistance ); } } } export default new Queue();
ff0bd3d7f1025ced4e9abb678c861405
{ "intermediate": 0.2826981544494629, "beginner": 0.5522254109382629, "expert": 0.16507646441459656 }
44,924
Kannst du mir diese Klasse umschreiben als Natives VUE3 Module in Composition Api? import { inject } from 'vue'; class Queue { constructor() { this.$eventBus = inject('eventbus'); this.items = []; this.queueRunning = false; this.playQueued = this.playQueued.bind(this); this.playQueuedEnded = this.playQueuedEnded.bind(this); } isEmpty() { return this.items.length === 0; } addToQueue(item) { item.fromQueue=true; item.step = 3; this.items.push(item); console.log('Queue: adding item to queue: ' + this.items.length, "queueRunning: " + this.queueRunning, this.items); if (!this.queueRunning) { console.log('Queue: added To Queue, start play cause queue is running ', "queueRunning: " + this.queueRunning); this.playQueued(); } } playQueued() { this.queueRunning = true; console.log('Queue: playQueued, queue length is: ', this.items.length); // fifo var item = this.items.shift(); item.step = 4; console.log("Queue: playQueued trigger eventBus", item.type, item); this.$eventBus.emit( item.type, item ); } playQueuedEnded(event){ event.target.removeEventListener('ended', this.playQueuedEnded, true); if (this.isEmpty()) { this.queueRunning = false; console.log( 'Queue: playQueuedEnded no more entries in queue: ' + this.items.length, this.queueRunning, ); } else { console.log( 'Queue: playQueuedEnded item ended, remaining items: ' + this.items.length, this.queueRunning, ); console.log('Queue: setting timer for next run: ', this.$config.settings.alerts.queueTimeDistance); var queueTimeDistanceTimeout = window.setTimeout( this.playQueued, this.$config.settings.alerts.queueTimeDistance ); } } } export default new Queue();
d187323ded08bf4df7b7a18ef88e2d37
{ "intermediate": 0.2826981544494629, "beginner": 0.5522254109382629, "expert": 0.16507646441459656 }
44,925
Kannst du mir diese Klasse umschreiben als Natives VUE3 Module in Composition Api? import { inject } from 'vue'; class Queue { constructor() { this.$eventBus = inject('eventbus'); this.items = []; this.queueRunning = false; this.playQueued = this.playQueued.bind(this); this.playQueuedEnded = this.playQueuedEnded.bind(this); } isEmpty() { return this.items.length === 0; } addToQueue(item) { item.fromQueue=true; item.step = 3; this.items.push(item); console.log('Queue: adding item to queue: ' + this.items.length, "queueRunning: " + this.queueRunning, this.items); if (!this.queueRunning) { console.log('Queue: added To Queue, start play cause queue is running ', "queueRunning: " + this.queueRunning); this.playQueued(); } } playQueued() { this.queueRunning = true; console.log('Queue: playQueued, queue length is: ', this.items.length); // fifo var item = this.items.shift(); item.step = 4; console.log("Queue: playQueued trigger eventBus", item.type, item); this.$eventBus.emit( item.type, item ); } playQueuedEnded(event){ event.target.removeEventListener('ended', this.playQueuedEnded, true); if (this.isEmpty()) { this.queueRunning = false; console.log( 'Queue: playQueuedEnded no more entries in queue: ' + this.items.length, this.queueRunning, ); } else { console.log( 'Queue: playQueuedEnded item ended, remaining items: ' + this.items.length, this.queueRunning, ); console.log('Queue: setting timer for next run: ', this.$config.settings.alerts.queueTimeDistance); var queueTimeDistanceTimeout = window.setTimeout( this.playQueued, this.$config.settings.alerts.queueTimeDistance ); } } } export default new Queue();
37dbb83de557654a4856e35eafd50e15
{ "intermediate": 0.2826981544494629, "beginner": 0.5522254109382629, "expert": 0.16507646441459656 }
44,926
Kannst du mir diese Klasse umschreiben als Natives VUE3 Module in Composition Api? import { inject } from 'vue'; class Queue { constructor() { this.$eventBus = inject('eventbus'); this.items = []; this.queueRunning = false; this.playQueued = this.playQueued.bind(this); this.playQueuedEnded = this.playQueuedEnded.bind(this); } isEmpty() { return this.items.length === 0; } addToQueue(item) { item.fromQueue=true; item.step = 3; this.items.push(item); console.log('Queue: adding item to queue: ' + this.items.length, "queueRunning: " + this.queueRunning, this.items); if (!this.queueRunning) { console.log('Queue: added To Queue, start play cause queue is running ', "queueRunning: " + this.queueRunning); this.playQueued(); } } playQueued() { this.queueRunning = true; console.log('Queue: playQueued, queue length is: ', this.items.length); // fifo var item = this.items.shift(); item.step = 4; console.log("Queue: playQueued trigger eventBus", item.type, item); this.$eventBus.emit( item.type, item ); } playQueuedEnded(event){ event.target.removeEventListener('ended', this.playQueuedEnded, true); if (this.isEmpty()) { this.queueRunning = false; console.log( 'Queue: playQueuedEnded no more entries in queue: ' + this.items.length, this.queueRunning, ); } else { console.log( 'Queue: playQueuedEnded item ended, remaining items: ' + this.items.length, this.queueRunning, ); console.log('Queue: setting timer for next run: ', this.$config.settings.alerts.queueTimeDistance); var queueTimeDistanceTimeout = window.setTimeout( this.playQueued, this.$config.settings.alerts.queueTimeDistance ); } } } export default new Queue();
b93177e42f187df7909de994279011ad
{ "intermediate": 0.2826981544494629, "beginner": 0.5522254109382629, "expert": 0.16507646441459656 }
44,927
Kannst du mir diese Klasse umschreiben als Natives VUE3 Module in Composition Api? import { inject } from 'vue'; class Queue { constructor() { this.$eventBus = inject('eventbus'); this.items = []; this.queueRunning = false; this.playQueued = this.playQueued.bind(this); this.playQueuedEnded = this.playQueuedEnded.bind(this); } isEmpty() { return this.items.length === 0; } addToQueue(item) { item.fromQueue=true; item.step = 3; this.items.push(item); console.log('Queue: adding item to queue: ' + this.items.length, "queueRunning: " + this.queueRunning, this.items); if (!this.queueRunning) { console.log('Queue: added To Queue, start play cause queue is running ', "queueRunning: " + this.queueRunning); this.playQueued(); } } playQueued() { this.queueRunning = true; console.log('Queue: playQueued, queue length is: ', this.items.length); // fifo var item = this.items.shift(); item.step = 4; console.log("Queue: playQueued trigger eventBus", item.type, item); this.$eventBus.emit( item.type, item ); } playQueuedEnded(event){ event.target.removeEventListener('ended', this.playQueuedEnded, true); if (this.isEmpty()) { this.queueRunning = false; console.log( 'Queue: playQueuedEnded no more entries in queue: ' + this.items.length, this.queueRunning, ); } else { console.log( 'Queue: playQueuedEnded item ended, remaining items: ' + this.items.length, this.queueRunning, ); console.log('Queue: setting timer for next run: ', this.$config.settings.alerts.queueTimeDistance); var queueTimeDistanceTimeout = window.setTimeout( this.playQueued, this.$config.settings.alerts.queueTimeDistance ); } } } export default new Queue();
043890b120327ab6327b78199a4ab871
{ "intermediate": 0.2826981544494629, "beginner": 0.5522254109382629, "expert": 0.16507646441459656 }
44,928
i have 2 verions of python. how to transfer libs from older to newer one?
4641a5e3a736764a27deed1b2b776e05
{ "intermediate": 0.623889684677124, "beginner": 0.1921485960483551, "expert": 0.18396179378032684 }
44,929
Kannst du mir die folgende Klasse umschreiben als Natives VUE3 Module in Composition Api? "class Queue { constructor() { this.$eventBus = inject('eventbus'); this.items = []; this.queueRunning = false; this.playQueued = this.playQueued.bind(this); this.playQueuedEnded = this.playQueuedEnded.bind(this); } isEmpty() { return this.items.length === 0; } addToQueue(item) { item.fromQueue=true; item.step = 3; this.items.push(item); console.log('Queue: adding item to queue: ' + this.items.length, "queueRunning: " + this.queueRunning, this.items); if (!this.queueRunning) { console.log('Queue: added To Queue, start play cause queue is running ', "queueRunning: " + this.queueRunning); this.playQueued(); } } playQueued() { this.queueRunning = true; console.log('Queue: playQueued, queue length is: ', this.items.length); // fifo var item = this.items.shift(); item.step = 4; console.log("Queue: playQueued trigger eventBus", item.type, item); this.$eventBus.emit( item.type, item ); } playQueuedEnded(event){ event.target.removeEventListener('ended', this.playQueuedEnded, true); if (this.isEmpty()) { this.queueRunning = false; console.log( 'Queue: playQueuedEnded no more entries in queue: ' + this.items.length, this.queueRunning, ); } else { console.log( 'Queue: playQueuedEnded item ended, remaining items: ' + this.items.length, this.queueRunning, ); console.log('Queue: setting timer for next run: ', this.$config.settings.alerts.queueTimeDistance); var queueTimeDistanceTimeout = window.setTimeout( this.playQueued, this.$config.settings.alerts.queueTimeDistance ); } } } export default new Queue();"
179910ee682f93e39cdfc45f45d86878
{ "intermediate": 0.3415246307849884, "beginner": 0.41644811630249023, "expert": 0.24202732741832733 }
44,930
Kannst du mir die folgende Klasse umschreiben als Natives VUE3 Module in Composition Api? "class Queue { constructor() { this.$eventBus = inject('eventbus'); this.items = []; this.queueRunning = false; this.playQueued = this.playQueued.bind(this); this.playQueuedEnded = this.playQueuedEnded.bind(this); } isEmpty() { return this.items.length === 0; } addToQueue(item) { item.fromQueue=true; item.step = 3; this.items.push(item); console.log('Queue: adding item to queue: ' + this.items.length, "queueRunning: " + this.queueRunning, this.items); if (!this.queueRunning) { console.log('Queue: added To Queue, start play cause queue is running ', "queueRunning: " + this.queueRunning); this.playQueued(); } } playQueued() { this.queueRunning = true; console.log('Queue: playQueued, queue length is: ', this.items.length); // fifo var item = this.items.shift(); item.step = 4; console.log("Queue: playQueued trigger eventBus", item.type, item); this.$eventBus.emit( item.type, item ); } playQueuedEnded(event){ event.target.removeEventListener('ended', this.playQueuedEnded, true); if (this.isEmpty()) { this.queueRunning = false; console.log( 'Queue: playQueuedEnded no more entries in queue: ' + this.items.length, this.queueRunning, ); } else { console.log( 'Queue: playQueuedEnded item ended, remaining items: ' + this.items.length, this.queueRunning, ); console.log('Queue: setting timer for next run: ', this.$config.settings.alerts.queueTimeDistance); var queueTimeDistanceTimeout = window.setTimeout( this.playQueued, this.$config.settings.alerts.queueTimeDistance ); } } } export default new Queue();"
c693f30efacbc5fe8828bda7fa6b21ce
{ "intermediate": 0.3415246307849884, "beginner": 0.41644811630249023, "expert": 0.24202732741832733 }
44,931
I want trigger a email notification when approval is requested for RITM and the email should contain Requested for should be the requested for of the RITM Opened by should be the opened by of the RITM Priority, State and Short Description should be the one from the Catalog Task Description should be the one of the RITM. But the thing is condition is being written in sysapproval_approver table and a script also. But the notification is fetching wrong information while triggering email.
c4190b877ecb2d3b62667ae91899edb5
{ "intermediate": 0.3726845681667328, "beginner": 0.3225533664226532, "expert": 0.3047620952129364 }
44,932
how see open port in linux command
f4ecf2bccd94e7f4f3e2a073ad34abb4
{ "intermediate": 0.3905473053455353, "beginner": 0.28514736890792847, "expert": 0.32430538535118103 }
44,933
write a code for training a transformer architectutre.
8029cc80ae2ffe2174bd0ffb61a91a92
{ "intermediate": 0.13657139241695404, "beginner": 0.12002922594547272, "expert": 0.7433993816375732 }
44,934
Из-за чего произошёл вылет игры? Description: Tessellating block in world - Indium Renderer java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.model.SpriteFinder.find(net.fabricmc.fabric.api.renderer.v1.mesh.QuadView)" because the return value of "me.pepperbell.continuity.client.util.RenderUtil.getSpriteFinder()" is null at me.pepperbell.continuity.client.model.CTMBakedModel$CTMQuadTransform.transformOnce(CTMBakedModel.java:112) ~[continuity-3.0.0-beta.4+1.20.1_mapped_srg_1.20.1.jar%23969!/:?] {re:classloading} at me.pepperbell.continuity.client.model.CTMBakedModel$CTMQuadTransform.transform(CTMBakedModel.java:102) ~[continuity-3.0.0-beta.4+1.20.1_mapped_srg_1.20.1.jar%23969!/:?] {re:classloading} at link.infra.indium.renderer.render.AbstractRenderContext.lambda$new$1(AbstractRenderContext.java:48) ~[lazurite-1.0.3+mc1.20.1.jar%23403!/:1.0.3+mc1.20.1] {re:mixin,re:classloading} at link.infra.indium.renderer.render.AbstractRenderContext.transform(AbstractRenderContext.java:66) ~[lazurite-1.0.3+mc1.20.1.jar%23403!/:1.0.3+mc1.20.1] {re:mixin,re:classloading} at link.infra.indium.renderer.render.AbstractBlockRenderContext.renderQuad(AbstractBlockRenderContext.java:123) ~[lazurite-1.0.3+mc1.20.1.jar%23403!/:1.0.3+mc1.20.1] {re:mixin,re:classloading} at link.infra.indium.renderer.render.AbstractBlockRenderContext$2.emitDirectly(AbstractBlockRenderContext.java:76) ~[lazurite-1.0.3+mc1.20.1.jar%23403!/:1.0.3+mc1.20.1] {re:classloading} at link.infra.indium.renderer.mesh.MutableQuadViewImpl.emit(MutableQuadViewImpl.java:261) ~[lazurite-1.0.3+mc1.20.1.jar%23403!/:1.0.3+mc1.20.1] {re:classloading} at link.infra.indium.renderer.mesh.MutableQuadViewImpl.emit(MutableQuadViewImpl.java:56) ~[lazurite-1.0.3+mc1.20.1.jar%23403!/:1.0.3+mc1.20.1] {re:classloading} at net.fabricmc.fabric.impl.renderer.VanillaModelEncoder.emitBlockQuads(VanillaModelEncoder.java:68) ~[fabric-renderer-api-v1-3.2.1+1d29b44577.jar%23634!/:3.2.1+1d29b44577] {re:mixin,re:classloading} at net.minecraft.client.resources.model.BakedModel.emitBlockQuads(BakedModel.java:1039) ~[client-1.20.1-20230612.114412-srg.jar%23464!/:?] {re:mixin,pl:connector_pre_launch:A,pl:runtimedistcleaner:A,re:computing_frames,pl:connector_pre_launch:A,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:fabric-renderer-api-v1.mixins.json:client.BakedModelMixin from mod fabric_renderer_api_v1,pl:mixin:APP:indium.mixins.json:renderer.MixinBakedModel from mod lazurite,pl:mixin:APP:xenon.mixins.json:core.model.BakedModelMixin from mod xenon,pl:mixin:A,pl:connector_pre_launch:A,pl:runtimedistcleaner:A} at net.fabricmc.fabric.api.renderer.v1.model.ForwardingBakedModel.emitBlockQuads(ForwardingBakedModel.java:59) ~[fabric-renderer-api-v1-3.2.1+1d29b44577.jar%23634!/:3.2.1+1d29b44577] {re:computing_frames,re:classloading} at me.pepperbell.continuity.client.model.EmissiveBakedModel.emitBlockQuads(EmissiveBakedModel.java:64) ~[continuity-3.0.0-beta.4+1.20.1_mapped_srg_1.20.1.jar%23969!/:?] {re:computing_frames,re:classloading} at net.fabricmc.fabric.api.renderer.v1.model.ForwardingBakedModel.emitBlockQuads(ForwardingBakedModel.java:59) ~[fabric-renderer-api-v1-3.2.1+1d29b44577.jar%23634!/:3.2.1+1d29b44577] {re:computing_frames,re:classloading}
e80608ab57e63c69ff74de5f2240d155
{ "intermediate": 0.3647725284099579, "beginner": 0.40625786781311035, "expert": 0.22896961867809296 }
44,935
Из-за чего произошёл вылет игры? java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.model.SpriteFinder.find(net.fabricmc.fabric.api.renderer.v1.mesh.QuadView)" because the return value of "me.pepperbell.continuity.client.util.RenderUtil.getSpriteFinder()" is null at me.pepperbell.continuity.client.model.CTMBakedModel$CTMQuadTransform.transformOnce(CTMBakedModel.java:112) ~[continuity-3.0.0-beta.4+1.20.1_mapped_srg_1.20.1.jar%23969!/:?] {re:classloading} at me.pepperbell.continuity.client.model.CTMBakedModel$CTMQuadTransform.transform(CTMBakedModel.java:102) ~[continuity-3.0.0-beta.4+1.20.1_mapped_srg_1.20.1.jar%23969!/:?] {re:classloading} at link.infra.indium.renderer.render.AbstractRenderContext.lambda$new$1(AbstractRenderContext.java:48) ~[lazurite-1.0.3+mc1.20.1.jar%23403!/:1.0.3+mc1.20.1] {re:mixin,re:classloading} at link.infra.indium.renderer.render.AbstractRenderContext.transform(AbstractRenderContext.java:66) ~[lazurite-1.0.3+mc1.20.1.jar%23403!/:1.0.3+mc1.20.1] {re:mixin,re:classloading} at link.infra.indium.renderer.render.AbstractBlockRenderContext.renderQuad(AbstractBlockRenderContext.java:123) ~[lazurite-1.0.3+mc1.20.1.jar%23403!/:1.0.3+mc1.20.1] {re:mixin,re:classloading} at link.infra.indium.renderer.render.AbstractBlockRenderContext$2.emitDirectly(AbstractBlockRenderContext.java:76) ~[lazurite-1.0.3+mc1.20.1.jar%23403!/:1.0.3+mc1.20.1] {re:classloading} at link.infra.indium.renderer.mesh.MutableQuadViewImpl.emit(MutableQuadViewImpl.java:261) ~[lazurite-1.0.3+mc1.20.1.jar%23403!/:1.0.3+mc1.20.1] {re:classloading}
1c2706946371d08f92ffb280053ca93b
{ "intermediate": 0.47720909118652344, "beginner": 0.32177430391311646, "expert": 0.20101672410964966 }
44,936
torch @ file:///tmp/torch-1.12.1%2Bcu113-cp38-cp38-linux_x86_64.whl neeed pip command to install this
5f6ff040c81216fcce28118fbb601d9f
{ "intermediate": 0.3888036012649536, "beginner": 0.2786732316017151, "expert": 0.3325231671333313 }
44,937
How to create online lobby with Colyseus
7b4ea414f9bc50f35c4edad0c53492a9
{ "intermediate": 0.30525267124176025, "beginner": 0.2026965618133545, "expert": 0.49205076694488525 }
44,938
the program below is almost complete. Define void CImage::save(const char* filename) function so that to create a new image array with the translated and re-ordered components and save it to a new .bmp file. For this task, it will likely be easiest to create a new, blank image array that is initially set to the background color (see CImage::newImage()). Then by processing the Components in appropriate order and copying appropriate pixels into this new image, you can create the appropriate component location and ordering. Think carefully how this can be done and how it can be done “simply” even it requires some “wasted” work. #include "component.h" #include "cimage.h" #include "bmplib.h" #include <deque> #include <iomanip> #include <iostream> #include <cmath> // You shouldn't need other #include's - Ask permission before adding using namespace std; // TO DO: Complete this function CImage::CImage(const char* bmp_filename) { // Note: readRGBBMP dynamically allocates a 3D array // (i.e. array of pointers to pointers (1 per row/height) where each // point to an array of pointers (1 per col/width) where each // point to an array of 3 unsigned char (uint8_t) pixels [R,G,B values]) img_ = nullptr; img_ = readRGBBMP(bmp_filename, h_, w_); // ================================================ // TO DO: call readRGBBMP to initialize img_, h_, and w_; // Leave this check if(img_ == NULL) { throw std::logic_error("Could not read input file"); } // Set the background RGB color using the upper-left pixel for(int i=0; i < 3; i++) { bgColor_[i] = img_[0][0][i]; } // ======== This value should work - do not alter it ======= // RGB "distance" threshold to continue a BFS from neighboring pixels bfsBgrdThresh_ = 60; // ================================================ // TO DO: Initialize the vector of vectors of labels to -1 vector<int> row(w_ , -1); labels_.resize(h_, row); // ================================================ // TO DO: Initialize any other data members } // TO DO: Complete this function CImage::~CImage() { for (int i=0; i < h_;i++){ if (img_[i] != nullptr){ for (int j=0; j < w_;j++){ delete[] img_[i][j]; } delete [] img_[i]; } } delete [] img_; img_ = nullptr; } // Complete - Do not alter bool CImage::isCloseToBground(uint8_t p1[3], double within) { // Computes "RGB" (3D Cartesian distance) double dist = sqrt( pow(p1[0]-bgColor_[0],2) + pow(p1[1]-bgColor_[1],2) + pow(p1[2]-bgColor_[2],2) ); return dist <= within; } // TO DO: Complete this function size_t CImage::findComponents() { size_t count = 0; for (int i=0; i < h_; i++){ for (int j=0; j < w_;j++){ if (!isCloseToBground(img_[i][j], bfsBgrdThresh_) && labels_[i][j] == -1){ Component newcomp = bfsComponent(i, j, count); components_.push_back(newcomp); count++; } } } return count; } // Complete - Do not alter void CImage::printComponents() const { cout << "Height and width of image: " << h_ << "," << w_ << endl; cout << setw(4) << "Ord" << setw(4) << "Lbl" << setw(6) << "ULRow" << setw(6) << "ULCol" << setw(4) << "Ht." << setw(4) << "Wi." << endl; for(size_t i = 0; i < components_.size(); i++) { const Component& c = components_[i]; cout << setw(4) << i << setw(4) << c.label << setw(6) << c.ulNew.row << setw(6) << c.ulNew.col << setw(4) << c.height << setw(4) << c.width << endl; } } // TODO: Complete this function int CImage::getComponentIndex(int mylabel) const { for (size_t i=0; i< components_.size();i++){ if (components_[i].label == mylabel){ return i; } } return 0; } // Nearly complete - TO DO: // Add checks to ensure the new location still keeps // the entire component in the legal image boundaries void CImage::translate(int mylabel, int nr, int nc) { // Get the index of specified component int cid = getComponentIndex(mylabel); if(cid < 0) { return; } int h = components_[cid].height; int w = components_[cid].width; // ========================================================== // ADD CODE TO CHECK IF THE COMPONENT WILL STILL BE IN BOUNDS // IF NOT: JUST RETURN. if (h < 0 || h >= h_ || w < 0 || w >= w_){ return; } // ========================================================== // If we reach here we assume the component will still be in bounds // so we update its location. Location nl(nr, nc); components_[cid].ulNew = nl; } // TO DO: Complete this function void CImage::forward(int mylabel, int delta) { int cid = getComponentIndex(mylabel); if(cid < 0 || delta <= 0) { return; } int finalindex = max(0,(cid-delta)); while (cid > finalindex){ swap(components_[cid], components_[cid-1]); cid--; } } // TO DO: Complete this function void CImage::backward(int mylabel, int delta) { int cid = getComponentIndex(mylabel); if(cid < 0 || delta <= 0) { return; } int finalindex = min(static_cast<int>(numComponents()) - 1, (cid + delta)); while(cid < finalindex){ swap(components_[cid], components_[cid+1]); cid++; } } // TODO: complete this function void CImage::save(const char* filename) { // writeRGBBMP(filename, out, h_, w_); } // Complete - Do not alter - Creates a blank image with the background color uint8_t*** CImage::newImage(uint8_t bground[3]) const { uint8_t*** img = new uint8_t**[h_]; for(int r=0; r < h_; r++) { img[r] = new uint8_t*[w_]; for(int c = 0; c < w_; c++) { img[r][c] = new uint8_t[3]; img[r][c][0] = bground[0]; img[r][c][1] = bground[1]; img[r][c][2] = bground[2]; } } return img; } // To be completed void CImage::deallocateImage(uint8_t*** img) const { for (int i=0; i < h_;i++){ for (int j=0; j < w_; j++){ delete[] img[i][j]; } delete [] img[i]; } delete [] img; img = nullptr; } // TODO: Complete the following function or delete this if // you do not wish to use it. Component CImage::bfsComponent(int pr, int pc, int mylabel) { // Arrays to help produce neighbors easily in a loop // by encoding the **change** to the current location. // Goes in order N, NW, W, SW, S, SE, E, NE int neighbor_row[8] = {-1, -1, 0, 1, 1, 1, 0, -1}; int neighbor_col[8] = {0, -1, -1, -1, 0, 1, 1, 1}; deque<Location> curr; curr.push_back(Location(pr,pc)); int minrow = pr, maxrow = pr, mincol = pc, maxcol = pc; labels_[pr][pc] = mylabel; while (! curr.empty()){ Location current = curr.front(); // extract item in front of q curr.pop_front(); int x = current.row; int y = current.col; //update bounding box minrow = min(minrow, x); maxrow = max(maxrow, x); mincol = min(mincol, y); maxcol = max(maxcol, y); for (int i=0; i<8;i++){ // loc of neighbors int nx = x + neighbor_row[i]; int ny = y + neighbor_col[i]; if (nx >= 0 && nx < h_ && ny >= 0 && ny < w_){ //check if valid if (!isCloseToBground(img_[nx][ny], bfsBgrdThresh_) && labels_[nx][ny] == -1){ labels_[nx][ny] = mylabel; curr.push_back(Location(nx,ny)); } } } } int height = maxrow - minrow + 1; int width = maxcol - mincol +1; Component component(Location(minrow,mincol), height, width, mylabel); return component; } // Complete - Debugging function to save a new image void CImage::labelToRGB(const char* filename) { //multiple ways to do this -- this is one way vector<uint8_t[3]> colors(components_.size()); for(unsigned int i=0; i<components_.size(); i++) { colors[i][0] = rand() % 256; colors[i][1] = rand() % 256; colors[i][2] = rand() % 256; } for(int i=0; i<h_; i++) { for(int j=0; j<w_; j++) { int mylabel = labels_[i][j]; if(mylabel >= 0) { img_[i][j][0] = colors[mylabel][0]; img_[i][j][1] = colors[mylabel][1]; img_[i][j][2] = colors[mylabel][2]; } else { img_[i][j][0] = 0; img_[i][j][1] = 0; img_[i][j][2] = 0; } } } writeRGBBMP(filename, img_, h_, w_); } // Complete - Do not alter const Component& CImage::getComponent(size_t i) const { if(i >= components_.size()) { throw std::out_of_range("Index to getComponent is out of range"); } return components_[i]; } // Complete - Do not alter size_t CImage::numComponents() const { return components_.size(); } // Complete - Do not alter void CImage::drawBoundingBoxesAndSave(const char* filename) { for(size_t i=0; i < components_.size(); i++){ Location ul = components_[i].ulOrig; int h = components_[i].height; int w = components_[i].width; for(int i = ul.row; i < ul.row + h; i++){ for(int k = 0; k < 3; k++){ img_[i][ul.col][k] = 255-bgColor_[k]; img_[i][ul.col+w-1][k] = 255-bgColor_[k]; } // cout << "bb " << i << " " << ul.col << " and " << i << " " << ul.col+w-1 << endl; } for(int j = ul.col; j < ul.col + w ; j++){ for(int k = 0; k < 3; k++){ img_[ul.row][j][k] = 255-bgColor_[k]; img_[ul.row+h-1][j][k] = 255-bgColor_[k]; } // cout << "bb2 " << ul.row << " " << j << " and " << ul.row+h-1 << " " << j << endl; } } writeRGBBMP(filename, img_, h_, w_); }
39b9ef1ed15de995cb813a8aa37866fa
{ "intermediate": 0.49123722314834595, "beginner": 0.2893902361392975, "expert": 0.21937260031700134 }
44,939
Где в woocommerce я могу редактировать эти параметры woocommerce_email_customer_details
2fee6ddd67372e454b7154dfa988df92
{ "intermediate": 0.38593870401382446, "beginner": 0.3043176531791687, "expert": 0.3097436726093292 }
44,940
Где в woocommerce я могу редактировать эти параметры woocommerce_email_customer_details
24901286df3b443c74c916e3fdd3532e
{ "intermediate": 0.38593870401382446, "beginner": 0.3043176531791687, "expert": 0.3097436726093292 }
44,941
运行 btrfs check --tree-root 30752768 --super 0 /dev/sdb1,输出结果包含ERROR: transid errors in file system found 453893992448 bytes used, error(s) found,是什么意思?如何修复?
c05784ed098cca5d06de0fcfd2557aa7
{ "intermediate": 0.41032102704048157, "beginner": 0.24751035869121552, "expert": 0.3421686589717865 }
44,942
etapeConnectee(Code_E1, Code_E2) :- relier(Id_T, _, Code_E1), troncon(Id_T, _, _, _, Code_E1, Code_E2). connexionDirecteOuIndirecte(Code_E1, Code_E2) :- etapeConnectee(Code_E1, Code_E2). connexionDirecteOuIndirecte(Code_E1, Code_E3) :- etapeConnectee(Code_E1, Code_E2), connexionDirecteOuIndirecte(Code_E2, Code_E3). confort(1, 'Ville'). confort(2, 'Refuge'). parcours(1, 'Voie'). troncon(1001, ‘Section 1’, 5, ‘Asphalte’' 1, 2). etape(1, 201, 'Début de la Voie', 45, -75). lier(1001, 101). relier(1001, 1, 201).Error parsing program: Tried to consume "," but found "1’".
63a9a9a70f5e7c6ca081faf8878685b2
{ "intermediate": 0.3869597315788269, "beginner": 0.43596431612968445, "expert": 0.17707599699497223 }
44,943
привет, у меня есть массив User мне нужно в unity сделать сортировку по дате(только число) и по имени в Dropdown весь UI есть public class User { public long Id { get; set; } public string Name { get; set; } public string QuestName { get; set; } public DateTime Date { get; set; } public int ErrorAssembly { get; set; } public int CorrectAnswersQuestion { get; set; } public int MaxQuestion { get; set; } public string Result { get; set; } public string TimeTaken { get; set; } }
5fa347c62384dcf7a8c089a2d0153316
{ "intermediate": 0.278530478477478, "beginner": 0.5359899997711182, "expert": 0.18547959625720978 }
44,944
With openwhisk, wsk command create 3 actions and create a sequence and expose curl api, analyse wingbeat mosquito with this librairies : numpy, scipy, IPython, librosa, soundfile, matplotlib
4a9fe7ea011a9bf51c234709ce9b10e4
{ "intermediate": 0.9042835235595703, "beginner": 0.03459326922893524, "expert": 0.06112317740917206 }
44,945
error: ISO C forbids an empty translation unit [-Wpedantic]
e195757081301ae59c2852ca566f41f1
{ "intermediate": 0.3802632987499237, "beginner": 0.3453311622142792, "expert": 0.2744055390357971 }
44,946
public void setReturnShipNode(ReturnChannelResponse response, String returnShipNode) { log.debug("Entering setReturnShipNode method"); setReturnShipNodeForOrderItemList(response.getOrderItemList(), returnShipNode); setReturnShipNodeForOrderChannels(response.getOrderChannels(), returnShipNode); log.debug("Exit setReturnShipNode method"); } private void setReturnShipNodeForOrderItemList(List<OrderItem> orderItemList, String returnShipNode) { for (OrderItem orderItem : orderItemList) { log.debug("Setting returnShipNode for LineItemChannels of OrderItem: {}", orderItem.getLineItemChannels()); setReturnShipNodeForLineItemChannels(orderItem.getLineItemChannels(), returnShipNode); } } private void setReturnShipNodeForLineItemChannels(List<LineItemChannel> lineItemChannels, String returnShipNode) { for (LineItemChannel lineItemChannel : lineItemChannels) { log.debug("Setting returnShipNode for LineItemChannel with address childClientId: {}", lineItemChannel.getAddress().getChildClientId()); if (lineItemChannel != null && lineItemChannel.getAddress() != null) { String postalCode = lineItemChannel.getAddress().getPostalCode(); if ((lineItemChannel.getAddress().getChildClientId() != null && lineItemChannel.getAddress().getChildClientId().equals("0")) || (postalCode != null && postalCode.startsWith("XX"))) { lineItemChannel.getAddress().setReturnShipNode(returnShipNode); log.debug("Setting returnShipNode for LineItemChannel with Address: {}", lineItemChannel.getAddress()); } } } } private void setReturnShipNodeForOrderChannels(List<OrderChannel> orderChannels, String returnShipNode) { for (OrderChannel orderChannel : orderChannels) { if (orderChannel != null && orderChannel.getAddress() != null) { String postalCode = orderChannel.getAddress().getPostalCode(); if ((orderChannel.getAddress().getChildClientId() != null && orderChannel.getAddress().getChildClientId().equals("0")) || (postalCode != null && postalCode.startsWith("XX"))) { orderChannel.getAddress().setReturnShipNode(returnShipNode); log.debug("Setting returnShipNode for OrderChannel with Address: {}", orderChannel.getAddress()); } } } }....Please use ObjectUtil for null check
6ae1fc538e7ca81ece432625e57c96f0
{ "intermediate": 0.4532793164253235, "beginner": 0.30405187606811523, "expert": 0.24266879260540009 }
44,947
tensorflow image classification model, don't show ms/step
48314f2915c2e5ca6674201b8915e7b8
{ "intermediate": 0.09650176763534546, "beginner": 0.06304799020290375, "expert": 0.8404502272605896 }
44,948
this is my code: import matplotlib.pyplot as plt import numpy as np import PIL import tensorflow as tf import pathlib import os from tensorflow import keras from tensorflow.keras import layers from tensorflow.keras.models import Sequential dataset_folder_path = r"D://parser_selenium//2ch wiper//captcha_solver//Dataset//" model_path = f'{dataset_folder_path}model_before_augmentation.h5' dataset_dir = pathlib.Path(dataset_folder_path) batch_size = 32 img_width = 20 img_height = 20 train_ds = tf.keras.utils.image_dataset_from_directory( dataset_dir, validation_split=0.2, subset="training", seed=123, image_size=(img_height, img_width), batch_size=batch_size) val_ds = tf.keras.utils.image_dataset_from_directory( dataset_dir, validation_split=0.2, subset="validation", seed=123, image_size=(img_height, img_width), batch_size=batch_size) class_names = train_ds.class_names # print(f"Class names: {class_names}") # # create model num_classes = len(class_names) model = Sequential([ # т.к. у нас версия TF 2.6 локально layers.experimental.preprocessing.Rescaling(1./255, input_shape=(img_height, img_width, 3)), # аугментация layers.experimental.preprocessing.RandomFlip("horizontal", input_shape=(img_height, img_width, 3)), layers.experimental.preprocessing.RandomRotation(0.1), layers.experimental.preprocessing.RandomZoom(0.1), layers.experimental.preprocessing.RandomContrast(0.2), # дальше везде одинаково layers.Conv2D(16, 3, padding='same', activation='relu'), layers.MaxPooling2D(), layers.Conv2D(32, 3, padding='same', activation='relu'), layers.MaxPooling2D(), layers.Conv2D(64, 3, padding='same', activation='relu'), layers.MaxPooling2D(), # регуляризация layers.Dropout(0.2), layers.Flatten(), layers.Dense(128, activation='relu'), layers.Dense(num_classes) ]) # compile the model model.compile( optimizer='adam', loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True), metrics=['accuracy']) # # print model summary # model.summary() model.load_weights(model_path) loss,acc = model.evaluate(train_ds, verbose=2) def Detect(img_path): img = tf.keras.utils.load_img( img_path, target_size=(img_height, img_width)) img_array = tf.keras.utils.img_to_array(img) img_array = tf.expand_dims(img_array, 0) predictions = model.predict(img_array) score = tf.nn.softmax(predictions[0]) return(class_names[np.argmax(score)]) # import os # print(Detect(r"C:\Users\Plathera\Desktop\Captcha_Tests\Dataset_new_3\о\tjgAa2v2Kb03.png")) # folder_path = r"C:\Users\Plathera\Desktop\Captcha_Tests\Cut_Off" # signs = [] # Iterating through all files in the folder # for filename in os.listdir(folder_path): # file_path = os.path.join(folder_path, filename) # # print('\n') # # print(filename) # symbol = detect(file_path) # signs.append(symbol) # print(signs) # import fix_symbols # fix_symbols.main() how to not print ms/steps info when classifying images
fa1d81f6a92035268a442b47d0065f09
{ "intermediate": 0.2917781472206116, "beginner": 0.48122334480285645, "expert": 0.2269984632730484 }
44,949
explain this: 10 New 20 Print "Hello, World" 30 End
c1678a11e6f49331b2d754c57d33d9e4
{ "intermediate": 0.2715962529182434, "beginner": 0.4576209485530853, "expert": 0.27078279852867126 }
44,950
hy
114f1d2804e0c8123feb7e9dbc5daf3a
{ "intermediate": 0.3395402133464813, "beginner": 0.3001152276992798, "expert": 0.3603445589542389 }
44,951
i am doing something in ROS2. what does this method do? def cancelTask(self): """Cancel pending task request of any type.""" self.info('Canceling current task.') if self.result_future: future = self.goal_handle.cancel_goal_async() rclpy.spin_until_future_complete(self, future) return
1690789d9efe9321c9c33218b70e667f
{ "intermediate": 0.5030297636985779, "beginner": 0.2885115146636963, "expert": 0.20845870673656464 }
44,952
find me 2 commentaries associated with each the biblcal text :“DO YOUR BEST TO PRESENT YOURSELF TO GOD AS ONE APPROVED, A WORKER WHO HAS NO NEED TO BE ASHAMED, RIGHTLY HANDLING THE WORD OF TRUTH.” 2 TIMOTHY 2:15
8ca706cd61ecc752d9346c8041685cd5
{ "intermediate": 0.3844967186450958, "beginner": 0.3301186263561249, "expert": 0.2853846549987793 }
44,953
предложи реализацию функции ExpandCluster points, neighbors, clusterId, eps, MinPts, visited на VBA
3f720a05227d62d2c9e01e94d672c687
{ "intermediate": 0.3254196345806122, "beginner": 0.26827120780944824, "expert": 0.4063091278076172 }
44,954
Can you explain how to add a pay load to the below request?ReportsApi.prototype.missingUnassignedAccelerator = function () { var localVarPath = this.basePath + "/api/excelReports/missingUnassignedAccelerator"; // return localVarPath; return new Promise((resolve, reject) => { var xhr = new XMLHttpRequest(); var reqType = "GET"; xhr.open(reqType, localVarPath, true); xhr.setRequestHeader("Content-type", "application/json"); xhr.withCredentials = true; xhr.responseType = "blob"; var blob, reader, temp, filenameRegex, matches, aDownload, sFilename; xhr.onload = function () { if (this.status === 200) { var promiseText = this.response.text(); promiseText.then((responseText) => { try { JSON.parse(responseText); if (JSON.parse(responseText).status !== "201") { blob = this.response; reader = new FileReader(); temp = this.getResponseHeader("content-disposition"); filenameRegex = /filename[^;=\n]*=(([""]).*?\2|[^;\n]*)/; matches = filenameRegex.exec(temp); sFilename = ""; if (matches != null && matches[1]) { sFilename = matches[1].replace(/[""]/g, ""); } reader.readAsDataURL(blob); reader.onload = function (e) { aDownload = document.createElement("a"); aDownload.download = sFilename; aDownload.href = e.target.result; $("body").append(aDownload); aDownload.click(); resolve(200); $(aDownload).remove(); }; } else { resolve(JSON.parse(responseText)); } } catch (e) { blob = this.response; reader = new FileReader(); temp = this.getResponseHeader("content-disposition"); filenameRegex = /filename[^;=\n]*=(([""]).*?\2|[^;\n]*)/; matches = filenameRegex.exec(temp); sFilename = ""; if (matches != null && matches[1]) { sFilename = matches[1].replace(/[""]/g, ""); } reader.readAsDataURL(blob); reader.onload = function (e) { aDownload = document.createElement("a"); aDownload.download = sFilename; aDownload.href = e.target.result; $("body").append(aDownload); aDownload.click(); resolve(200); $(aDownload).remove(); }; } }); } else { reject(new Error(xhr.statusText)); } }; xhr.send(); }); };
9910fa5eb1e99f1b4a3f448c7b386e44
{ "intermediate": 0.2532515227794647, "beginner": 0.45297086238861084, "expert": 0.29377761483192444 }
44,955
how to add a object payload to the below request?ReportsApi.prototype.missingUnassignedAccelerator = function () { var localVarPath = this.basePath + "/api/excelReports/missingUnassignedAccelerator"; // return localVarPath; return new Promise((resolve, reject) => { var xhr = new XMLHttpRequest(); var reqType = "GET"; xhr.open(reqType, localVarPath, true); xhr.setRequestHeader("Content-type", "application/json"); xhr.withCredentials = true; xhr.responseType = "blob"; var blob, reader, temp, filenameRegex, matches, aDownload, sFilename; xhr.onload = function () { if (this.status === 200) { var promiseText = this.response.text(); promiseText.then((responseText) => { try { JSON.parse(responseText); if (JSON.parse(responseText).status !== "201") { blob = this.response; reader = new FileReader(); temp = this.getResponseHeader("content-disposition"); filenameRegex = /filename[^;=\n]*=(([""]).*?\2|[^;\n]*)/; matches = filenameRegex.exec(temp); sFilename = ""; if (matches != null && matches[1]) { sFilename = matches[1].replace(/[""]/g, ""); } reader.readAsDataURL(blob); reader.onload = function (e) { aDownload = document.createElement("a"); aDownload.download = sFilename; aDownload.href = e.target.result; $("body").append(aDownload); aDownload.click(); resolve(200); $(aDownload).remove(); }; } else { resolve(JSON.parse(responseText)); } } catch (e) { blob = this.response; reader = new FileReader(); temp = this.getResponseHeader("content-disposition"); filenameRegex = /filename[^;=\n]*=(([""]).*?\2|[^;\n]*)/; matches = filenameRegex.exec(temp); sFilename = ""; if (matches != null && matches[1]) { sFilename = matches[1].replace(/[""]/g, ""); } reader.readAsDataURL(blob); reader.onload = function (e) { aDownload = document.createElement("a"); aDownload.download = sFilename; aDownload.href = e.target.result; $("body").append(aDownload); aDownload.click(); resolve(200); $(aDownload).remove(); }; } }); } else { reject(new Error(xhr.statusText)); } }; xhr.send(); }); };
12d90b3e27958c634778b039aa7422ca
{ "intermediate": 0.2276904433965683, "beginner": 0.5158179998397827, "expert": 0.256491482257843 }
44,956
How can I add a payload in the below request? ReportsApi.prototype.missingUnassignedAccelerator = function () { var localVarPath = this.basePath + "/api/excelReports/missingUnassignedAccelerator"; // return localVarPath; return new Promise((resolve, reject) => { var xhr = new XMLHttpRequest(); var reqType = "GET"; xhr.open(reqType, localVarPath, true); xhr.setRequestHeader("Content-type", "application/json"); xhr.withCredentials = true; xhr.responseType = "blob"; var blob, reader, temp, filenameRegex, matches, aDownload, sFilename; xhr.onload = function () { if (this.status === 200) { var promiseText = this.response.text(); promiseText.then((responseText) => { try { JSON.parse(responseText); if (JSON.parse(responseText).status !== "201") { blob = this.response; reader = new FileReader(); temp = this.getResponseHeader("content-disposition"); filenameRegex = /filename[^;=\n]*=(([""]).*?\2|[^;\n]*)/; matches = filenameRegex.exec(temp); sFilename = ""; if (matches != null && matches[1]) { sFilename = matches[1].replace(/[""]/g, ""); } reader.readAsDataURL(blob); reader.onload = function (e) { aDownload = document.createElement("a"); aDownload.download = sFilename; aDownload.href = e.target.result; $("body").append(aDownload); aDownload.click(); resolve(200); $(aDownload).remove(); }; } else { resolve(JSON.parse(responseText)); } } catch (e) { blob = this.response; reader = new FileReader(); temp = this.getResponseHeader("content-disposition"); filenameRegex = /filename[^;=\n]*=(([""]).*?\2|[^;\n]*)/; matches = filenameRegex.exec(temp); sFilename = ""; if (matches != null && matches[1]) { sFilename = matches[1].replace(/[""]/g, ""); } reader.readAsDataURL(blob); reader.onload = function (e) { aDownload = document.createElement("a"); aDownload.download = sFilename; aDownload.href = e.target.result; $("body").append(aDownload); aDownload.click(); resolve(200); $(aDownload).remove(); }; } }); } else { reject(new Error(xhr.statusText)); } }; xhr.send(); }); };
38aca583eabe7e7bfe092a72bb90eee2
{ "intermediate": 0.22992351651191711, "beginner": 0.5089932680130005, "expert": 0.26108330488204956 }
44,957
in reaper walter, how do i make a variable that is: track tcp size / 2
2d0bd5e42c0954f427c7dc820aa62486
{ "intermediate": 0.3357952833175659, "beginner": 0.4850912094116211, "expert": 0.17911352217197418 }
44,958
How can I add a payload to the below request? ReportsApi.prototype.missingUnassignedAccelerator = function () { var localVarPath = this.basePath + "/api/excelReports/missingUnassignedAccelerator"; // return localVarPath; return new Promise((resolve, reject) => { var xhr = new XMLHttpRequest(); var reqType = "GET"; xhr.open(reqType, localVarPath, true); xhr.setRequestHeader("Content-type", "application/json"); xhr.withCredentials = true; xhr.responseType = "blob"; var blob, reader, temp, filenameRegex, matches, aDownload, sFilename; xhr.onload = function () { if (this.status === 200) { var promiseText = this.response.text(); promiseText.then((responseText) => { try { JSON.parse(responseText); if (JSON.parse(responseText).status !== "201") { blob = this.response; reader = new FileReader(); temp = this.getResponseHeader("content-disposition"); filenameRegex = /filename[^;=\n]*=(([""]).*?\2|[^;\n]*)/; matches = filenameRegex.exec(temp); sFilename = ""; if (matches != null && matches[1]) { sFilename = matches[1].replace(/[""]/g, ""); } reader.readAsDataURL(blob); reader.onload = function (e) { aDownload = document.createElement("a"); aDownload.download = sFilename; aDownload.href = e.target.result; $("body").append(aDownload); aDownload.click(); resolve(200); $(aDownload).remove(); }; } else { resolve(JSON.parse(responseText)); } } catch (e) { blob = this.response; reader = new FileReader(); temp = this.getResponseHeader("content-disposition"); filenameRegex = /filename[^;=\n]*=(([""]).*?\2|[^;\n]*)/; matches = filenameRegex.exec(temp); sFilename = ""; if (matches != null && matches[1]) { sFilename = matches[1].replace(/[""]/g, ""); } reader.readAsDataURL(blob); reader.onload = function (e) { aDownload = document.createElement("a"); aDownload.download = sFilename; aDownload.href = e.target.result; $("body").append(aDownload); aDownload.click(); resolve(200); $(aDownload).remove(); }; } }); } else { reject(new Error(xhr.statusText)); } }; xhr.send(); }); };
f4dbfc277d149b27598a3feaaca45d32
{ "intermediate": 0.23358730971813202, "beginner": 0.5032938122749329, "expert": 0.2631189525127411 }
44,959
In Invision Community, how to create a page with custom database that runs custom code
8e3440323cc0ec314ccd09b076e3d568
{ "intermediate": 0.570622444152832, "beginner": 0.19054341316223145, "expert": 0.2388341873884201 }
44,960
Runtime error Fetching model from: https://huggingface.co/Stellaa9/Stellass Traceback (most recent call last): File "/home/user/app/app.py", line 3, in <module> gr.load("models/Stellaa9/Stellass").launch() File "/usr/local/lib/python3.10/site-packages/gradio/external.py", line 60, in load return load_blocks_from_repo( File "/usr/local/lib/python3.10/site-packages/gradio/external.py", line 99, in load_blocks_from_repo blocks: gradio.Blocks = factory_methods[src](name, hf_token, alias, **kwargs) File "/usr/local/lib/python3.10/site-packages/gradio/external.py", line 111, in from_model raise ModelNotFoundError( gradio.exceptions.ModelNotFoundError: Could not find model: Stellaa9/Stellass. If it is a private or gated model, please provide your Hugging Face access token (https://huggingface.co/settings/tokens) as the argument for the `hf_token` parameter.
06ca084c2b2dcb6d7ab87c1342283639
{ "intermediate": 0.5369195342063904, "beginner": 0.26721566915512085, "expert": 0.19586484134197235 }
44,961
the program is finished but the forward and backward function is wrong, help me modify it so it @param mylabel Label of the component to move forward/backward * @param delta positive amount to move the component/layer forward * or backward. (No negative inputs.) * If the amount would place the layer out of bounds * (less-than 0 or greater-than the max index), use 0 * or the max index (respectively),instead. */ #include "component.h" #include "cimage.h" #include "bmplib.h" #include <deque> #include <iomanip> #include <iostream> #include <cmath> // You shouldn't need other #include's - Ask permission before adding using namespace std; // TO DO: Complete this function CImage::CImage(const char* bmp_filename) { // Note: readRGBBMP dynamically allocates a 3D array // (i.e. array of pointers to pointers (1 per row/height) where each // point to an array of pointers (1 per col/width) where each // point to an array of 3 unsigned char (uint8_t) pixels [R,G,B values]) img_ = nullptr; img_ = readRGBBMP(bmp_filename, h_, w_); // ================================================ // TO DO: call readRGBBMP to initialize img_, h_, and w_; // Leave this check if(img_ == NULL) { throw std::logic_error("Could not read input file"); } // Set the background RGB color using the upper-left pixel for(int i=0; i < 3; i++) { bgColor_[i] = img_[0][0][i]; } // ======== This value should work - do not alter it ======= // RGB "distance" threshold to continue a BFS from neighboring pixels bfsBgrdThresh_ = 60; // ================================================ // TO DO: Initialize the vector of vectors of labels to -1 vector<int> row(w_ , -1); labels_.resize(h_, row); // ================================================ // TO DO: Initialize any other data members } // TO DO: Complete this function CImage::~CImage() { for (int i=0; i < h_;i++){ if (img_[i] != nullptr){ for (int j=0; j < w_;j++){ delete[] img_[i][j]; } delete [] img_[i]; } } delete [] img_; img_ = nullptr; } // Complete - Do not alter bool CImage::isCloseToBground(uint8_t p1[3], double within) { // Computes "RGB" (3D Cartesian distance) double dist = sqrt( pow(p1[0]-bgColor_[0],2) + pow(p1[1]-bgColor_[1],2) + pow(p1[2]-bgColor_[2],2) ); return dist <= within; } // TO DO: Complete this function size_t CImage::findComponents() { size_t count = 0; for (int i=0; i < h_; i++){ for (int j=0; j < w_;j++){ if (!isCloseToBground(img_[i][j], bfsBgrdThresh_) && labels_[i][j] == -1){ Component newcomp = bfsComponent(i, j, count); components_.push_back(newcomp); count++; } } } return count; } // Complete - Do not alter void CImage::printComponents() const { cout << "Height and width of image: " << h_ << "," << w_ << endl; cout << setw(4) << "Ord" << setw(4) << "Lbl" << setw(6) << "ULRow" << setw(6) << "ULCol" << setw(4) << "Ht." << setw(4) << "Wi." << endl; for(size_t i = 0; i < components_.size(); i++) { const Component& c = components_[i]; cout << setw(4) << i << setw(4) << c.label << setw(6) << c.ulNew.row << setw(6) << c.ulNew.col << setw(4) << c.height << setw(4) << c.width << endl; } } // TODO: Complete this function int CImage::getComponentIndex(int mylabel) const { for (size_t i=0; i < components_.size();i++){ if (components_[i].label == mylabel){ return i; } } return 0; } // Nearly complete - TO DO: // Add checks to ensure the new location still keeps // the entire component in the legal image boundaries void CImage::translate(int mylabel, int nr, int nc) { // Get the index of specified component int cid = getComponentIndex(mylabel); if(cid < 0) { return; } int h = components_[cid].height; int w = components_[cid].width; // ========================================================== // ADD CODE TO CHECK IF THE COMPONENT WILL STILL BE IN BOUNDS // IF NOT: JUST RETURN. if (h+nr < 0 || h + nr > h_ || w+nc < 0 || w+nc >= w_){ return; } // ========================================================== // If we reach here we assume the component will still be in bounds // so we update its location. Location nl(nr, nc); components_[cid].ulNew = nl; } // TO DO: Complete this function void CImage::forward(int mylabel, int delta) { int cid = getComponentIndex(mylabel); if(cid < 0 || delta <= 0) { return; } int index = cid - delta; if (index < 0){ index = 0; } if (cid != index){ swap(components_[cid], components_[index]); } } // TO DO: Complete this function void CImage::backward(int mylabel, int delta) { int cid = getComponentIndex(mylabel); if(cid <= 0 || delta <= 0) { return; } int size = static_cast<int>(components_.size()); while (cid < size && delta > 0){ swap(components_[cid], components_[cid+1]); cid++; delta--; } } // TODO: complete this function void CImage::save(const char* filename) { // Create another image filled in with the background color uint8_t*** out = newImage(bgColor_); // Add your code here for (size_t i=0; i < numComponents(); i++){ Component& c = components_[i]; int newr = c.ulNew.row; int newc = c.ulNew.col; int origr = c.ulOrig.row; int origc = c.ulOrig.col; int h = c.height; int w = c.width; for (int j=0; j < h;j++){ for (int k=0;k < w; k++){ if (labels_[origr+j][origc+k] == c.label){ out[newr+j][newc+k][0] = img_[origr+j][origc+k][0]; out[newr+j][newc+k][1] = img_[origr+j][origc+k][1]; out[newr+j][newc+k][2] = img_[origr+j][origc+k][2]; } } } } writeRGBBMP(filename, out, h_, w_); // Add any other code you need after this deallocateImage(out); } // Complete - Do not alter - Creates a blank image with the background color uint8_t*** CImage::newImage(uint8_t bground[3]) const { uint8_t*** img = new uint8_t**[h_]; for(int r=0; r < h_; r++) { img[r] = new uint8_t*[w_]; for(int c = 0; c < w_; c++) { img[r][c] = new uint8_t[3]; img[r][c][0] = bground[0]; img[r][c][1] = bground[1]; img[r][c][2] = bground[2]; } } return img; } // To be completed void CImage::deallocateImage(uint8_t*** img) const { for (int i=0; i < h_;i++){ for (int j=0; j < w_; j++){ delete[] img[i][j]; } delete [] img[i]; } delete [] img; img = nullptr; } // TODO: Complete the following function or delete this if // you do not wish to use it. Component CImage::bfsComponent(int pr, int pc, int mylabel) { // Arrays to help produce neighbors easily in a loop // by encoding the **change** to the current location. // Goes in order N, NW, W, SW, S, SE, E, NE int neighbor_row[8] = {-1, -1, 0, 1, 1, 1, 0, -1}; int neighbor_col[8] = {0, -1, -1, -1, 0, 1, 1, 1}; deque<Location> curr; curr.push_back(Location(pr,pc)); int minrow = pr, maxrow = pr, mincol = pc, maxcol = pc; labels_[pr][pc] = mylabel; while (! curr.empty()){ Location current = curr.front(); // extract item in front of q curr.pop_front(); int x = current.row; int y = current.col; //update bounding box minrow = min(minrow, x); maxrow = max(maxrow, x); mincol = min(mincol, y); maxcol = max(maxcol, y); for (int i=0; i<8;i++){ // loc of neighbors int nx = x + neighbor_row[i]; int ny = y + neighbor_col[i]; if (nx >= 0 && nx < h_ && ny >= 0 && ny < w_){ //check if valid if (!isCloseToBground(img_[nx][ny], bfsBgrdThresh_) && labels_[nx][ny] == -1){ labels_[nx][ny] = mylabel; curr.push_back(Location(nx,ny)); } } } } int height = maxrow - minrow + 1; int width = maxcol - mincol +1; Component component(Location(minrow,mincol), height, width, mylabel); return component; } // Complete - Debugging function to save a new image void CImage::labelToRGB(const char* filename) { //multiple ways to do this -- this is one way vector<uint8_t[3]> colors(components_.size()); for(unsigned int i=0; i<components_.size(); i++) { colors[i][0] = rand() % 256; colors[i][1] = rand() % 256; colors[i][2] = rand() % 256; } for(int i=0; i<h_; i++) { for(int j=0; j<w_; j++) { int mylabel = labels_[i][j]; if(mylabel >= 0) { img_[i][j][0] = colors[mylabel][0]; img_[i][j][1] = colors[mylabel][1]; img_[i][j][2] = colors[mylabel][2]; } else { img_[i][j][0] = 0; img_[i][j][1] = 0; img_[i][j][2] = 0; } } } writeRGBBMP(filename, img_, h_, w_); } // Complete - Do not alter const Component& CImage::getComponent(size_t i) const { if(i >= components_.size()) { throw std::out_of_range("Index to getComponent is out of range"); } return components_[i]; } // Complete - Do not alter size_t CImage::numComponents() const { return components_.size(); } // Complete - Do not alter void CImage::drawBoundingBoxesAndSave(const char* filename) { for(size_t i=0; i < components_.size(); i++){ Location ul = components_[i].ulOrig; int h = components_[i].height; int w = components_[i].width; for(int i = ul.row; i < ul.row + h; i++){ for(int k = 0; k < 3; k++){ img_[i][ul.col][k] = 255-bgColor_[k]; img_[i][ul.col+w-1][k] = 255-bgColor_[k]; } // cout << "bb " << i << " " << ul.col << " and " << i << " " << ul.col+w-1 << endl; } for(int j = ul.col; j < ul.col + w ; j++){ for(int k = 0; k < 3; k++){ img_[ul.row][j][k] = 255-bgColor_[k]; img_[ul.row+h-1][j][k] = 255-bgColor_[k]; } // cout << "bb2 " << ul.row << " " << j << " and " << ul.row+h-1 << " " << j << endl; } } writeRGBBMP(filename, img_, h_, w_); } * @brief Get the index of the component with mylabel or * -1 if no component with mylabel exists * * @param mylabel Label of the component * @return int index in the Component storage */ int getComponentIndex(int mylabel) const; /** * @brief Creates an RGB image array with the same dimensions * as the image read by the constructor. Sets all pixels * to the given background color * * @param bground - RGB value to initialize all pixels * @return uint8_t*** pointer to the new image array */ uint8_t*** newImage(uint8_t bground[3]) const; /** * @brief Deallocates all the memory of the input 3D array * * @param img pointer to the 3D array to deallocate */ void deallocateImage(uint8_t*** img) const; //=========================================================== // Add other private functions as necessary //=========================================================== // Data members /// Pointer to the 3D dynamically allocated array of pixels uint8_t*** img_; /// Height and width of input image (not always 256x256) int h_; int w_; // RGB value of the image background uint8_t bgColor_[3]; double bfsBgrdThresh_; // To start/continue the BFS (place neighbors // in the BFS queue), a pixel must be // more than this distance // height x width 2D vector of integers indicating what label each // pixel in img_ belongs to (-1 is used to indicate background) std::vector<std::vector<int> > labels_; /// Vector to store the Components we find in the image std::vector<Component> components_; //=========================================================== // Add any other data member(s) }; #endif
1ac9374b8bc9e478912c5cc6b01682a8
{ "intermediate": 0.43019533157348633, "beginner": 0.26141756772994995, "expert": 0.3083871006965637 }
44,962
create an system on joomla! platform who sort autorities by hierarqy
4b6860990a2e9bed1e3eb98558e38b1b
{ "intermediate": 0.23862701654434204, "beginner": 0.10250414907932281, "expert": 0.6588688492774963 }
44,963
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Все по 5к</title> <link rel="stylesheet" href="css/style.css"> </head> <body> <header id="main"> <div class="logo"> <img src="logo.png" alt="logo"> </div> <h1>Все по 5к</h1> <div class="img1"> <ul> <li><a href="#main">Главная</a></li> <li><a href="#items">Товары</a></li> <li><a href="https://ktk-45.ru/document/110941">О сайте</a></li> <li><a href="#"><img src="../УП.05 Задание/3081822.png"></a></li> <li><a href="#"><img src="e79fb99288e6e8ebcf0579d19497b2f5.png"><br>User</a></li> </ul> </div> </header> <div class="y1" id="items"><br> <h1>Список товаров</h1> <div class="y11"> <div class="h1"> <div> <img src="А112Т4.png" alt="1"> <h3>"Серьги Lux"</h3> <h3>Категория: серьги</h3> <p>Серьги серебряные в позолоте продёвки на цепочке "Звезда"</p> <p>Цена: 5 000 руб.</p> <input type="button" id="123" value="Добавить"> </div> <div> <img src="G843Y6.jpg" alt="2"> <h3>"Подвеска Silv"</h3> <h3>Категория: подвеска</h3> <p>Подвеска серебряная с фианитами 2138729/9 Ювелир Карат</p> <p>Цена: 5 000 руб.</p> <input type="button" id="123" value="Добавить"> </div> <div> <img src="G836H6.jpg" alt="3"> <h3>"Подвеска King"</h3> <h3>Категория: подвеска</h3> <p>Подвеска серебряная в позолоте с фианитами 2139189/9п Ювелир Карат</p> <p>Цена: 5 000 руб.</p> <input type="button" id="123" value="Добавить"> </div> </div> <div class="h2"> <div> <img src="S648N6.png" alt="4"> <h3>"Серьги Butter"</h3> <h3>Категория: серьги</h3> <p>Серьги "Бабочки" в позолоте</p> <p>Цена: 5 000 руб.</p> <input type="button" id="123" value="Добавить"> </div> <div> <img src="D493Y7.jpg" alt="2"> <h3>"Ожерелье Loop"</h3> <h3>Категория: ожерелье</h3> <p>Ожерелье Cordelia муассанит, 11шт, 3,5мм, круг, BS Regular, 40см</p> <p>Цена: 5 000 руб.</p> <input type="button" id="123" value="Добавить"> </div> <div> <img src="D936R6.png" alt="3"> <h3>"Серьги Ty"</h3> <h3>Категория: серьги</h3> <p>Серьги со стразами Swarovski 2129919/96П Ювелир Карат</p> <p>Цена: 5 000 руб.</p> <input type="button" id="123" value="Добавить"> </div> </div> <div class="h3"> <div> <img src="S395J7.jpg" alt="4"> <h3>"Серьги Ref"</h3> <h3>Категория: серьги</h3> <p>Серьги из золота 029038</p> <p>Цена: 5 000 руб.</p> <input type="button" id="123" value="Добавить"> </div> <div> <img src="C635R4.jpg" alt="2"> <h3>"Ожерелье Few"</h3> <h3>Категория: ожерелье</h3> <p>Ожерелье Lace муассанит, круг, BS Regular, 6,5мм, 2 муассанит Кр-57 6мм</p> <p>Цена: 5 000 руб.</p> <input type="button" id="123" value="Добавить"> </div> <div> <img src="F735H6.jpg" alt="3"> <h3>"Серьги Deq"</h3> <h3>Категория: серьги</h3> <p>Серьги из золота с эмалью</p> <p>Цена: 5 000 руб.</p> <input type="button" id="123" value="Добавить"> </div> </div> <div class="h4"> <div></div> <div> <img src="S538J7.jpg" alt="3"> <h3>"Серьги Syt"</h3> <h3>Категория: серьги</h3> <p>Серьги с 4 фианитами из серебра с позолотой</p> <p>Цена: 5 000 руб.</p> <input type="button" id="123" value="Добавить"> </div> <div></div> </div><br> </div> </div> <footer> <div class="img2"><br> <ul> <li><a href="#main">Главная</a></li> <li><a href="#items">Товары</a></li> <li><a href="https://ktk-45.ru/document/110941">О сайте</a></li> <li>Email: <a href="allfor5k@localhost">allfor5k@localhost</a></li> </ul> </div><br> </footer> </body> </html> css:body{ text-align: center; background-color:bisque; font-family:Georgia, 'Times New Roman', Times, serif; } .img1 li, a{ text-decoration: none; list-style: none; font-size: 10px; color:black; } .img2 li, a{ text-decoration: none; list-style: none; font-size: 20px; color:black; } .img1 img{ height: 40px; } .logo img{ height: 200px; } header{ display: grid; grid-template-columns: 1fr 1fr 1fr; } header h1{ font-size: 50px; } .y1{ background-color:navajowhite; } .y11 img{ height: 200px; width: 200px; } .h1{ display: grid; grid-template-columns: 1fr 1fr 1fr; margin-bottom: 10px; } .h2{ display: grid; grid-template-columns: 1fr 1fr 1fr;margin-bottom: 10px; border-top: solid; padding-top: 10px; } .h3{ display: grid; grid-template-columns: 1fr 1fr 1fr;margin-bottom: 10px;border-top: solid; padding-top: 10px; } .h4{ display: grid; grid-template-columns: 1fr 1fr 1fr;margin-bottom: 10px;border-top: solid; padding-top: 10px; } footer ul { padding: 0; margin: 0; } footer ul li { display: inline; margin-right: 20px; } footer ul li:last-child { margin-right: 0; } .y1 img{ border-radius: 20px; } переделай на bootstrap
883f631137cc2d3c00954bed45aa834d
{ "intermediate": 0.22949260473251343, "beginner": 0.6272910833358765, "expert": 0.14321623742580414 }
44,964
how do i keep the current layout for desktop but move <Nav /> above <NavLink to="/"> <img src="images/lemill_shop_logo.png" width="100" alt="my logo img" className="logo" /> </NavLink> on mobile in my header: import React from 'react' import { NavLink } from "react-router-dom"; import styled from "styled-components"; import { useCartContext } from "../context/cart_context"; import { FiShoppingCart } from "react-icons/fi"; import Nav from "./Nav"; const Header = () => { const { total_item } = useCartContext(); return ( <MainHeader> <div id='stars'></div> <div id='stars2'></div> <div id='stars3'></div> <div id='title'> <NavLink to="/"> <img src="images/lemill_shop_logo.png" width="100" alt="my logo img" className="logo" /> </NavLink> <Nav /> <div> <NavLink to="/cart" className="navbar-link cart-trolley--link"> <FiShoppingCart className="cart-trolley" size={30} /> <span className="cart-total--item text-lg"> {total_item} </span> </NavLink> </div> </div> </MainHeader> ); }; export default Header;
a7fc6e873482c411243f1b957297cc9b
{ "intermediate": 0.48379260301589966, "beginner": 0.37565532326698303, "expert": 0.14055202901363373 }
44,965
if condition to check if arr[0] not equal null typescript
293b3e5e20c738db3f1306dfcdfef61b
{ "intermediate": 0.28538593649864197, "beginner": 0.4471624493598938, "expert": 0.26745161414146423 }
44,966
pour mon excercice en cybersécurité j'ai cette partie mais je ne sais pas comment faire pour y acceder : Microsoft SQL Server End Of Life Detection 10.0 (High) 80 % 10.237.131.15 1433/tcp Thu, Mar 28, 2024 8:58 AM UTC Summary The Microsoft SQL Server version on the remote host has reached the end of life and should not be used anymore. Detection Result The "Microsoft SQL Server 2012" product on the remote host has reached the end of life. CPE: cpe:/a:microsoft:sql_server:2012 EOL version: 2012 EOL date: 2014-01-14 Product Detection Result Product cpe:/a:microsoft:sql_server:2012 Method Microsoft SQL (MSSQL) Server Detection (TCP/IP Listener) (OID: 1.3.6.1.4.1.25623.1.0.10144) Log View details of product detection Detection Method Checks if a vulnerable version is present on the target host. Details: Microsoft SQL Server End Of Life Detection OID: 1.3.6.1.4.1.25623.1.0.108188 Version used: 2022-08-04T13:37:02Z Impact An end of life version of Microsoft SQL Server is not receiving any security updates from the vendor. Unfixed security vulnerabilities might be leveraged by an attacker to compromise the security of this host. Solution Solution Type: Vendorfix Update the Microsoft SQL Server version on the remote host to a still supported version.
cb5fe7c2034bff18dda113d0acea7f29
{ "intermediate": 0.33799684047698975, "beginner": 0.3082304894924164, "expert": 0.35377267003059387 }
44,967
I am creating a metric filter in aws cloudwatch i have these logs 10.0.2.90 - - [02/Apr/2024:12:24:31 +0000] "GET /hot/13/2312/3126.png HTTP/1.1" 200 13472 "-" "com.maps.android.trafficradarapp" 10.0.1.84 - - [02/Apr/2024:12:24:31 +0000] "GET /hot/16/18506/25001.png HTTP/1.1" 206 8275 "-" "com.maps.android.trafficradarapp" 10.0.2.90 - - [02/Apr/2024:12:24:32 +0000] "GET /hot/16/18507/25001.png HTTP/1.1" 206 7494 "-" "com.maps.android.trafficradarapp" and this is my pattern [ip, dummya, dummyb, date, endpoint, status, size, dummyc, app] but i want to say that if app is starting with com its okey but if not i want to make app as other
f8d712442d5aed67150b05f425a88dae
{ "intermediate": 0.31101521849632263, "beginner": 0.35464465618133545, "expert": 0.33434009552001953 }
44,968
how to resolve this error in navit application ./vp: symbol lookup error: ../lib/libnavi_app_unit_test_x5h.so: undefined symbol: coord_new
3aa1a9e6221a77ebfc9b0ea92894bcff
{ "intermediate": 0.6828360557556152, "beginner": 0.14590872824192047, "expert": 0.17125524580478668 }
44,969
I have a git lab repository of spring boot application, i want to build the application using CI/CD pipeline and host in centos server machine, how to do that? explain in detail. java version is maven and a war file should be generated. also provide which gitlab runner executor should be created for this pipeline
12dc3f1be2cac06add51766f3300646f
{ "intermediate": 0.46717381477355957, "beginner": 0.23923863470554352, "expert": 0.2935875356197357 }
44,970
this is my python code: Y_train_df = TrainX1 Y_test_df = TestX1 model = NBEATSx(h=1, input_size=24, #loss=MQLoss(level=[80, 90]), loss=DistributionLoss(distribution='Normal', level=[80, 90]), scaler_type='robust', stack_types=['identity'], dropout_prob_theta=0.5, hist_exog_list=['Var1','Var2','Var3','Var4','Var5','Var6' ,'Var7','Var8','Var9','Var10','Var11','Var12','Var13','Var14','Var15','Var16', 'Var17','Var18','Var19','Var20','Var21','Var22','Var23','Var24'], max_steps=200, val_check_steps=10, early_stop_patience_steps=2) nf = NeuralForecast( models=[model], freq=1 ) nf.fit(Y_train_df,val_size=10) Y_hat_df = nf.predict() print(Y_train_df) and this is the error: KeyError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance) 3801 try: -> 3802 return self._engine.get_loc(casted_key) 3803 except KeyError as err: 5 frames pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item() pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item() KeyError: 'ds' The above exception was the direct cause of the following exception: KeyError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance) 3802 return self._engine.get_loc(casted_key) 3803 except KeyError as err: -> 3804 raise KeyError(key) from err 3805 except TypeError: 3806 # If we have a listlike key, _check_indexing_error will raise KeyError: 'ds' how can i fix it?
35d71b509364cd83e1c7e1ddfc6f40cd
{ "intermediate": 0.41494810581207275, "beginner": 0.36853086948394775, "expert": 0.2165210247039795 }
44,971
i am doing optimization of my analog circuit with the RL-GNN algorithm, my action variables from the algorithm are tuning my 13 input parameters of my circuit design component values Channel width and length of transistors, values pf passive devices, and bias values of sources (circuit design components are transistors, passive devices and bias sources). I gave Node features, edge features and edge indices as input to the model for tuning the required 13 parameters, reward function were calculated based on the circuit output performance metrics(whether it reach the predefined target metrics or not, along with the condition of all transistors are with in the saturation region or not). In my stated process, I am having doubt that, can i include the saturation condition of my transistors from my output for the present action variables in to the state variables? whether the components in the node features are associated with the device number, type of device. if i may add the saturation condition of my transistor from the output along with the existing node features will it make any sense to learn for the GNN model or it is unnecessary in to the model?
c7d359667412489513661d04c4693370
{ "intermediate": 0.058126967400312424, "beginner": 0.057172827422618866, "expert": 0.8847002387046814 }
44,972
get file name with extention from full path in python
ea492bae776676314cb0e17a08486b2b
{ "intermediate": 0.39731016755104065, "beginner": 0.20399798452854156, "expert": 0.398691862821579 }
44,973
if i ahve a vector of a class how do i move the leement index 2 to front
796c02a545825d654f2ab497beab8fca
{ "intermediate": 0.32943210005760193, "beginner": 0.3441356420516968, "expert": 0.32643231749534607 }
44,974
import { AccountCommunityType } from "@openchat/types" import { useAccountCommunities } from "@openchat/ui" import React, { useEffect, useState } from "react" import { NestableDraggableFlatList, NestableScrollContainer, RenderItemParams, } from "react-native-draggable-flatlist" import { AppController } from "../../../../app/app.globals" import { DashboardTabsCommunityTabButton } from "../dashboard-tabs-community-tab-button/dashboard-tabs-community-tab-button.component" import { useDashboardSettings } from "../../../../hook/use-dashboard-settings.hook" import { ArrayUtils } from "@openchat/core" // @reviewed export function DashboardTabsCommunityButtons() { // --------------------------------------------------------------------------- // variables // --------------------------------------------------------------------------- const { setSelectedTab } = useDashboardSettings() const allAccountCommunities = useAccountCommunities() const [orderedAccountCommunities, setOrderedAccountCommunities] = useState( () => ArrayUtils.sortAsc(allAccountCommunities, "dashboardTabOrder"), ) const [draggableIndex, setDraggableIndex] = useState<string | null>(null) // --------------------------------------------------------------------------- // effects // --------------------------------------------------------------------------- useEffect(() => { setOrderedAccountCommunities( ArrayUtils.sortAsc(allAccountCommunities, "dashboardTabOrder"), ) }, [allAccountCommunities]) // --------------------------------------------------------------------------- return ( <NestableScrollContainer nestedScrollEnabled showsVerticalScrollIndicator={false} style={{ flexShrink: 1, flexGrow: 0, width: "100%", paddingVertical: orderedAccountCommunities.length > 0 ? 8 : 0, }} > <NestableDraggableFlatList data={orderedAccountCommunities} keyExtractor={(accountCommunity) => accountCommunity.id} renderItem={({ item: accountCommunity, drag, }: RenderItemParams<AccountCommunityType>) => ( <DashboardTabsCommunityTabButton accountCommunity={accountCommunity} drag={drag} communityDraggableIndex={draggableIndex} onCommunityIconClick={(communityId) => { setSelectedTab({ type: "community", communityId: communityId, roomId: null, }) }} /> )} onDragBegin={(index) => { setDraggableIndex(orderedAccountCommunities[index].id) }} onDragEnd={async (result) => { const draggedAccountCommunities: AccountCommunityType[] = result.data setDraggableIndex(null) setOrderedAccountCommunities(draggedAccountCommunities) await AppController.accountCommunity.reorderInDashboardTabs({ accountCommunityIds: draggedAccountCommunities.map( (accountCommunity) => accountCommunity.id, ), }) }} /> </NestableScrollContainer> ) } auto scrolling to new accountCommunity active item
54daec9558f8970104c007b86f6a9abe
{ "intermediate": 0.38677239418029785, "beginner": 0.48097214102745056, "expert": 0.13225549459457397 }
44,975
second keyboad I want your assistance At first, I tried to use my second keyboard as the macro keyboard with the help of autohotkey but then I realised that I have a laptop and I can't carry my secondary keyboard whenever I go So after so much head scratching I figure out a solution that there is nearly negligible use case of function keys for any software which uses the function key combination Like ;- there is a combination like ctrl+f12 or alt+f11 but there is no combination like f1+a or f1+/ or f1+0 etc So by doing this, I can have the 12 different different micro keyboards every time whenever I go without carrying any additional keyboard with me
311d0913d68516c6bf41afe8273a5cb4
{ "intermediate": 0.3482491374015808, "beginner": 0.36777806282043457, "expert": 0.283972829580307 }
44,976
get height and width from game project in lua script (defold engine)
5ed30c9f8885b48c95523ede999369a9
{ "intermediate": 0.3843536078929901, "beginner": 0.22979645431041718, "expert": 0.3858500123023987 }
44,977
// array[N] at address K // sum the values of array // store sum into R0 // N in R5 // K in R6 // if sum even, R2 = 1 // if sum odd, R2 = 0 ///TODO // The value of N is provided in R5 and the value of K is in R6. // There are N values stored in an array starting at address K. // Sum these values and store the result in memory location 0. // The value of N is provided in R5 and the value of K is in R6. // N == @R5 // the number of values in the array // K = @R6 // starting address // @R0 == 0 // This is correct @R6 D=M @K M=D // Start of loop (LOOP) // If R7 (N) is 0, jump to END @R7 D=M @END D;JEQ // Add current value to sum @R0 D=M A=A+D D=M @R0 M=D // Decrement N @R7 M=M-1 // Increment K @R6 M=M+1 // Jump to loop start @LOOP 0;JMP (END) // Check if sum is even or odd @R0 D=M @2 D=D%A @R2 M=D please fix this implementation. follow the instructions. hack assembley
6f969c53b86193a6934624e6ad26e037
{ "intermediate": 0.3393937647342682, "beginner": 0.3682093322277069, "expert": 0.2923968732357025 }
44,978
tell me how to extract cmd argument when running go code
46be5339ff7cf86c287590401906ad66
{ "intermediate": 0.4980546236038208, "beginner": 0.1650734841823578, "expert": 0.336871862411499 }