row_id int64 0 48.4k | init_message stringlengths 1 342k | conversation_hash stringlengths 32 32 | scores dict |
|---|---|---|---|
21,200 | write the game code in c# for unity, a quiz, a random question is asked from an array, there are four possible answers to it, one correct and three incorrect, they are always randomly lined up. The player has three lives, if the answer is correct, then he earned 10 points and moved on to the next question, if the answer is incorrect, then he loses one life and moves on to the next question without getting points. There is also a timer in the game, 20 seconds are given for one question, if the time runs out, then the game ends. With each new question, the countdown starts anew. The game should have a mute button, a menu exit button, a button to view the leaderboard. There should be a score of points, the number of lives, the timer time, the question number out of the total (for example, 1/100). | 38d0bfcf7618eee5cab88ecfeb75f32d | {
"intermediate": 0.3305736780166626,
"beginner": 0.3554927408695221,
"expert": 0.3139335811138153
} |
21,201 | Этот метод проверяет лимит карты с которой переводим, нужно добавить проверку карты на которую переводим
public boolean checkCard2cardLimit(FraudCheckRequest request, PayLimitType payLimitType) {
LocalDateTime truncDateDay = LocalDateTime.now().truncatedTo(ChronoUnit.DAYS);
LocalDateTime truncDateMonth = truncDateDay.withDayOfMonth(1);
LocalDateTime thresholdDate = PayLimitType.DAILY.equals(payLimitType) ? truncDateDay : truncDateMonth;
log.info("[checkCard2cardLimit] thresholdDate = {}", thresholdDate);
String panHashCode = md5Hex(request.getPan());
log.info("[checkCard2cardLimit] panHashCode = {}", panHashCode);
List<BusinessOperationTurnover> turnoverList = dataService.selectFromWhere(QBusinessOperationTurnover.businessOperationTurnover, QBusinessOperationTurnover.class, p -> p.panHash.eq(panHashCode).
and(p.processingDate.goe(thresholdDate))).fetch();
log.info("[checkCard2cardLimit] turnoverList = {}", new Gson().toJson(turnoverList));
BigDecimal previousAmount = turnoverList.stream().map(BusinessOperationTurnover::getSumAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
log.info("[checkCard2cardLimit] previousAmount = {}", previousAmount);
BigDecimal currentAmount = previousAmount.add(request.getAmount());
log.info("[checkCard2cardLimit] currentAmount = {}", currentAmount);
BigDecimal limit = PayLimitType.DAILY.equals(payLimitType) ? getTransferLimit(NcsProperty.KEY_CARD2CARD_DAY_LIMIT) : getTransferLimit(NcsProperty.KEY_CARD2CARD_MONTH_LIMIT);
log.info("[checkCard2cardLimit] limit = {}", limit);
if (limit == null) {
log.info("[checkCard2cardLimit] limit value = null, returning true");
return true;
}
return currentAmount.compareTo(limit) < 1;
} | 22a14b042d7912265a8d734b799c1796 | {
"intermediate": 0.31291237473487854,
"beginner": 0.454083114862442,
"expert": 0.23300455510616302
} |
21,202 | The following code is a ngrx 4 reducer could you make it compatible for ngrx 16 so it works with createReducer()
export function reducer(state = initialState, action: any): State {
switch (action.type) {
case logicalService.ActionTypes.DELETE_LOGICAL_SERVICE_SUCCESS:
return Object.assign({}, state, {
isSaving: false,
item: null,
descriptors: null,
lcnOverrides: null
});
case descriptor.ActionTypes.ADD_DESCRIPTOR_SUCCESS:
case descriptor.ActionTypes.UPDATE_DESCRIPTOR_SUCCESS:
if (action.payload.targetType === 'LogicalService' && action.payload.targetId === state.item.id) {
return Object.assign({}, state, {
isSaving: false,
descriptors: state.descriptors.set(action.payload.id, action.payload)
});
}
return state;
case descriptor.ActionTypes.DELETE_DESCRIPTOR_SUCCESS:
if (action.payload.targetType === 'LogicalService' && action.payload.targetId === state.item.id) {
return Object.assign({}, state, {
isSaving: false,
descriptors: state.descriptors.delete(action.payload.id)
});
}
return state;
case descriptor.ActionTypes.MOVE_DESCRIPTOR_UP_SUCCESS:
case descriptor.ActionTypes.MOVE_DESCRIPTOR_DOWN_SUCCESS:
if (action.payload.targetType === 'LogicalService' && action.payload.targetId === state.item.id) {
let newDescriptors = state.descriptors.set(action.payload.id, action.payload);
newDescriptors = newDescriptors.set(action['payload2'].id, action['payload2']);
return Object.assign({}, state, {
isSaving: false,
descriptors: newDescriptors,
});
}
return state;
case actions.ActionTypes.CREATE_SCHEDULE_SERVICE_SUCCESS:
case actions.ActionTypes.UPDATE_SCHEDULE_SERVICE_SUCCESS:
return Object.assign({}, state, {
scheduleService: action.payload
});
default:
return state;
}
} | b5c9c88c983a879438a86d9ccb049c15 | {
"intermediate": 0.27284541726112366,
"beginner": 0.4929811656475067,
"expert": 0.23417340219020844
} |
21,203 | i have a list of strings i am looping through. in the loop i want to only do something if the string does not contain : | c0bb6cc92ec70a2340d9b4fa920f4108 | {
"intermediate": 0.2424376904964447,
"beginner": 0.5076146721839905,
"expert": 0.24994762241840363
} |
21,204 | """
Wiki Page Titles
"""
# Dictionary to cache search results
search_cache = {}
wiki_titles = []
# Helper function to perform a single API call
def search_wrapper(term):
if term in search_cache:
return search_cache[term]
else:
search_result = wp.search(term, results=250, suggestion=True)
search_cache[term] = search_result
time.sleep(0.1) # Add a small delay to prevent rate limiting
return search_result
# Batch size for API calls
batch_size = 25
# Process search terms in batches using ThreadPoolExecutor
def process_batch(batch_search_terms):
with ThreadPoolExecutor() as executor:
search_results = list(executor.map(search_wrapper, batch_search_terms))
for search in search_results:
if search[1] is not None:
search2 = wp.search(search[1], results=250)
unique_list = list(set(search[0] + search2))
else:
unique_list = list(set(search[0]))
wiki_titles.append(unique_list)
# Process search terms in batches
for i in tqdm(range(0, len(dtic_list), batch_size)):
batch_search_terms = dtic_list[i:i + batch_size]
process_batch(batch_search_terms)
# Using list comprehension
wiki_titles_flat = [item for sublist in wiki_titles for item in sublist]
# Ensure unique
wiki_titles_unique = list(set(wiki_titles_flat))
does this use all my cpu resources? | e4975870e55739c2c21a34118716d1a4 | {
"intermediate": 0.5306755900382996,
"beginner": 0.19365999102592468,
"expert": 0.27566441893577576
} |
21,205 | Generate postgres for this model
const tracksSchema: Schema = new Schema<ITrack>(
{
trackId: {
type: String,
},
campaignId: {
type: String,
},
domainId: {
type: String,
},
sourceId: {
type: String,
},
campaign: {
type: String,
},
domain: {
type: String,
},
source: {
type: String,
},
network: {
type: String,
},
trackTime: {
type: Date,
},
campaignIdRT: {
type: String,
},
adGroupIdRT: {
type: String,
}, //sub3
adIdRT: {
type: String,
}, //sub4
placement: {
type: String,
}, //sub5
campaignNameRT: {
type: String,
}, //sub6
adGroupNameRT: {
type: String,
}, //sub7
adNameRT: {
type: String,
}, //sub8
country: {
type: String,
},
},
{ timestamps: true },
); | a4931f7f197d98b4db85a7236ab75447 | {
"intermediate": 0.303343266248703,
"beginner": 0.3738150894641876,
"expert": 0.3228416442871094
} |
21,206 | I would like a VBA module 'Sub FixedRates()' that does the following:
Dim wsjr As Worksheet
Dim wsfr As Worksheet
Set wsjr = Sheets("Job Request")
Set wsfr = Sheets(Range("I2").Value)
wsjr.Range("E9:E14").ClearContents
If wsjr.Range("I2") <> "" Or 0 Then
copy wsfr.Rang("O2").value to wsjr.Range("E9")
copy wsfr.Rang("O3").value to wsjr.Range("E10")
copy wsfr.Rang("O4").value to wsjr.Range("E11")
copy wsfr.Rang("O5").value to wsjr.Range("E12")
copy wsfr.Rang("O6").value to wsjr.Range("E13")
copy wsfr.Rang("O7").value to wsjr.Range("E14")
End Sub | ce8dd40e647edc22c4c5d91be509f05f | {
"intermediate": 0.49292436242103577,
"beginner": 0.29892975091934204,
"expert": 0.208145871758461
} |
21,207 | im designing a push button game with a grid of random color square buttons. At the moment pressing a red button increments the score, non red decrements the score. suggest ways to make the game concept more appealing | d066a6875956894637cf9109a8adedbe | {
"intermediate": 0.3472301661968231,
"beginner": 0.267607718706131,
"expert": 0.3851620554924011
} |
21,208 | make me a map of a post apocalyptic roof using printing in java in the terminal | d59d6d95255923750247eccd42d54354 | {
"intermediate": 0.3809168338775635,
"beginner": 0.34980520606040955,
"expert": 0.2692779302597046
} |
21,209 | for C++, What is the name of the language, and a brief history of the language? | c1c0ec2c7cf8af551cb7ed5ec01f7fb1 | {
"intermediate": 0.38367101550102234,
"beginner": 0.2617841958999634,
"expert": 0.3545447289943695
} |
21,210 | oracle 12 installation on ubuntu | 7000b4e5083a84feab380240b338b51c | {
"intermediate": 0.34595513343811035,
"beginner": 0.23992273211479187,
"expert": 0.4141221344470978
} |
21,211 | for C++ How do you declare a class (object-oriented) in this language? Provide a code example. | 2409a0ffd462a960fcd173662d6998e0 | {
"intermediate": 0.20536163449287415,
"beginner": 0.6696544885635376,
"expert": 0.12498390674591064
} |
21,212 | Python, How does this language declare datatypes? Provide examples. | 7675be74f75b93dd32b909a6462bd549 | {
"intermediate": 0.44211480021476746,
"beginner": 0.25040000677108765,
"expert": 0.3074852228164673
} |
21,213 | can you learn about farming from this page? https://docs.google.com/document/d/1bjqQGwzhW7wsIpSDoO3xCMwqbX7ZbsdsuuXmPEXCrjE/edit | 273a4998ed8f022009ea0cdf93ee8ff2 | {
"intermediate": 0.3257756531238556,
"beginner": 0.40714597702026367,
"expert": 0.2670784592628479
} |
21,214 | In a c++ wxwidgets project I am getting an error when creating and object of a class:
//Config.h
class Config
{
public:
Config(wxString configPath);
}
//Config.cpp
Config::Config(wxString configPath)
{
config = new wxFileConfig("App", wxEmptyString, configPath, wxEmptyString, wxCONFIG_USE_LOCAL_FILE);
}
//FrameMain.h
#include "Config.h"
class FrameMain : public FrameMainView
{
private:
Config config;
}
//FrameMain.cpp
FrameMain::FrameMain(wxWindow* parent) : FrameMainView(parent)
{
config("config.cfg"); //ERROR
The error is:
In constructor 'FrameMain::FrameMain(wxWindow*)':|
error: no matching function for call to 'Config::Config()'|
include\Config.h|10|note: candidate: 'Config::Config(wxString)'|
include\Config.h|10|note: candidate expects 1 argument, 0 provided|
include\Config.h|7|note: candidate: 'constexpr Config::Config(const Config&)'|
include\Config.h|7|note: candidate expects 1 argument, 0 provided| | be350b197e8fa989315dc398455cdace | {
"intermediate": 0.4074876010417938,
"beginner": 0.4585650861263275,
"expert": 0.13394731283187866
} |
21,215 | How to extract iptables rules from memory | 7658d827782befd789a655107c5302a7 | {
"intermediate": 0.29419150948524475,
"beginner": 0.2098810374736786,
"expert": 0.49592745304107666
} |
21,216 | 1) During heating water, bubbles first show up at the bottom and get smaller to the top. After water boils, the bubbles also show up at the bottom but get larger to the top. Explain what is inside bubbles before and after water boiling respectively. | eea19ecc2b3ee2fb6d308b2f5a0edd99 | {
"intermediate": 0.4092896282672882,
"beginner": 0.25091031193733215,
"expert": 0.33980005979537964
} |
21,217 | write a game of pong in lua | d42345c1209a02c3e3fb0a02e7ae7842 | {
"intermediate": 0.3670681416988373,
"beginner": 0.37035736441612244,
"expert": 0.26257455348968506
} |
21,218 | In an age of endless noise, where silence is so scarce,
We search for melodies that take us anywhere,
A bit of magic in the air, a song that never dies,
Through the passage of the years, we still harmonize. | ccf63e5fe8b7051bdcd14506202f4057 | {
"intermediate": 0.3530846834182739,
"beginner": 0.38828909397125244,
"expert": 0.25862619280815125
} |
21,219 | The workbook 'TasksTodayAA.xlsm' is in the folder 'Premises Staff Schedules'
'Premises Staff Schedules' is in the folder 'zzzz ServProvDocs'
'zzzz ServProvDocs' is in the folder 'SERVICE PROVIDERS'
The workbook 'Service Providers.xlsm' is in the folder 'SERVICE PROVIDERS'
How can I create a Relative Path in my workbook 'Service Providers.xlsm' to the workbook 'TasksTodayAA.xlsm' | 467aefc63af80d9dc859182ae7760dd5 | {
"intermediate": 0.4570469856262207,
"beginner": 0.28199973702430725,
"expert": 0.26095321774482727
} |
21,220 | Write a bash script to check outgoing connections to ip 192.168.1.1 & 192.168.1.2 and find that process id | 0d0371497580935978824db8f7b2bc25 | {
"intermediate": 0.36563193798065186,
"beginner": 0.2511391341686249,
"expert": 0.3832288682460785
} |
21,221 | can you tell me which are the expenditures for the IRPF tax in Spain for autonomo? include references | 456e1c820d3fa82727138c2f5b853fcc | {
"intermediate": 0.35633230209350586,
"beginner": 0.2658822238445282,
"expert": 0.37778550386428833
} |
21,222 | В единственной строке входных данных записана одна строка - непустая последовательность строчных букв английского алфавита. Длина строки от 2 до 200000. Выведите минимальную по длине подстроку строки из входных данных, состоящую хотя бы из двух символов, являющуюся палиндромом и лексикографически минимальную.
Ограничение времени - 1 секунда, ограничение памяти - 512 мегабайт, язык программирования - Rust. | 4e135372469d749ec598ebf9e9331848 | {
"intermediate": 0.32424017786979675,
"beginner": 0.3545515239238739,
"expert": 0.32120823860168457
} |
21,223 | public static Map<String, byte[]> getDOCXHeadersAndFooters(byte[] docx) {
ZipInputStream zip = new ZipInputStream(new ByteArrayInputStream(docx));
ZipEntry entry = next(zip);
ByteArrayOutputStream out = new ByteArrayOutputStream();
Map<String, byte[]> fileNameByteArray = new HashMap<String, byte[]>();
while (entry != null) {
if (entry.getName().contains("footer") || entry.getName().contains("header")) {
byte[] buf = new byte[4096];
int bytesRead;
try {
while ((bytesRead = zip.read(buf)) != -1)
out.write(buf, 0, bytesRead);
fileNameByteArray.put(entry.getName(), out.toByteArray());
out.
} catch (IOException e) {
F.ormat(Messages.getString("ru.fisgroup.reportscommons.core.model.Template.0"), "Unable to parse header or footer");
}
}
closeEntry(zip);
entry = next(zip);
}
close(zip);
return fileNameByteArray;
} fix this code, cause: all values in fileNameByteArray is same, I think thats happen cause out.write(buf, 0, bytesRead) | 831a30de6bb10de737ba1dbde799b74f | {
"intermediate": 0.4505871832370758,
"beginner": 0.3768242597579956,
"expert": 0.1725885421037674
} |
21,224 | My button markup shows up as purple for some reason " <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
app:icon="@drawable/back"
app:iconGravity="textStart"
app:iconPadding="12dp"
app:iconTint="@color/black" />" | 0242309dc1ad3d0b7205e64fb193d0b3 | {
"intermediate": 0.36623308062553406,
"beginner": 0.32611802220344543,
"expert": 0.3076489269733429
} |
21,225 | try catch and continue when error | b00f3dccd9c3aea9f14c5e7b87744963 | {
"intermediate": 0.5319553017616272,
"beginner": 0.2101019024848938,
"expert": 0.257942795753479
} |
21,226 | In my sheet 'PREQUEST' I would like to double click on The company Name in column A
then using the company Name sheet which is column K on the same row,
get all the values of Column O from the sheet name in a popup message | 06bfc6ceab4b7f4c39cca4d72037f06e | {
"intermediate": 0.3890424966812134,
"beginner": 0.2510794997215271,
"expert": 0.3598780632019043
} |
21,227 | java, What software tools (web and/or application systems) can one use to develop (write code) in this particular language? | 89ade7afe2f202252e21b624f926a67d | {
"intermediate": 0.6293588280677795,
"beginner": 0.2504216432571411,
"expert": 0.12021954357624054
} |
21,228 | Java How do you implement a FOR, WHILE, DO While and/or FOREACH loop (if applicable) in this language? Provide code examples for each. | 834d300097d0d3f64186aa00f2aba217 | {
"intermediate": 0.23075786232948303,
"beginner": 0.6691610217094421,
"expert": 0.10008113086223602
} |
21,229 | StringBuilde delete first char and last char java code | b3464693814f484d1a482e9249ad3ca6 | {
"intermediate": 0.4417301416397095,
"beginner": 0.28333353996276855,
"expert": 0.2749362885951996
} |
21,230 | menga O'zbekiston bayrog'ini htmlda tuzib ber | 2bcf1805582c47d23aee18b1754dcef8 | {
"intermediate": 0.32855281233787537,
"beginner": 0.31576764583587646,
"expert": 0.35567954182624817
} |
21,231 | write me a C# script that can make a ball change colors every time it hits the paddle in unity | 586547017389ddc4456b8ef93e1389e5 | {
"intermediate": 0.3469701111316681,
"beginner": 0.29739078879356384,
"expert": 0.35563912987709045
} |
21,232 | align outputs perfectly in c++ | 8b24d6eade80761856f6dc3c7828e358 | {
"intermediate": 0.29779285192489624,
"beginner": 0.34998050332069397,
"expert": 0.35222670435905457
} |
21,233 | Create an Arduino program that will turn 1 of 3 LEDS using a POT. Divide thePOT into 3 equal section, low, medium and high, and during each section,turn 1 LED on, and the rest off, as the POT is turned from low to high, it willmove between the low, medium and high sections | d97f09b5a9c95f9632d4a1d13900c8aa | {
"intermediate": 0.3777085840702057,
"beginner": 0.1488851010799408,
"expert": 0.4734063148498535
} |
21,234 | i have bootstrap form in angular popup modal, i want when click on button print this form open in print window with bootstrap classes and styles | 61af7af77f02a13ec5d49c4ddfce5dfb | {
"intermediate": 0.48170533776283264,
"beginner": 0.21750885248184204,
"expert": 0.3007858395576477
} |
21,235 | i have bootstrap form in angular popup modal, i want when click on button print this form open in print window with bootstrap classes and styles | baf56e5b1cfa7e6029a49100c643d34c | {
"intermediate": 0.48170533776283264,
"beginner": 0.21750885248184204,
"expert": 0.3007858395576477
} |
21,236 | in unity, can you write a code in which whenever an object enter a trigger, the trigger blow up the object in an accelerate manner | 9b73b0efc55935cf30cf423fcb793707 | {
"intermediate": 0.36934980750083923,
"beginner": 0.12913917005062103,
"expert": 0.5015110373497009
} |
21,237 | "invoke
public Object invoke(Object obj, Object... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
Invokes the underlying method represented by this Method object, on the specified object with the specified parameters. Individual parameters are automatically unwrapped to match primitive formal parameters, and both primitive and reference parameters are subject to method invocation conversions as necessary.
If the underlying method is static, then the specified obj argument is ignored. It may be null.
If the number of formal parameters required by the underlying method is 0, the supplied args array may be of length 0 or null.
If the underlying method is an instance method, it is invoked using dynamic method lookup as documented in The Java Language Specification, section 15.12.4.4; in particular, overriding based on the runtime type of the target object may occur.
If the underlying method is static, the class that declared the method is initialized if it has not already been initialized.
If the method completes normally, the value it returns is returned to the caller of invoke; if the value has a primitive type, it is first appropriately wrapped in an object. However, if the value has the type of an array of a primitive type, the elements of the array are not wrapped in objects; in other words, an array of primitive type is returned. If the underlying method return type is void, the invocation returns null.
Parameters:
obj - the object the underlying method is invoked from
args - the arguments used for the method call
Returns:
the result of dispatching the method represented by this object on obj with parameters args
Throws:
IllegalAccessException - if this Method object is enforcing Java language access control and the underlying method is inaccessible.
IllegalArgumentException - if the method is an instance method and the specified object argument is not an instance of the class or interface declaring the underlying method (or of a subclass or implementor thereof); if the number of actual and formal parameters differ; if an unwrapping conversion for primitive arguments fails; or if, after possible unwrapping, a parameter value cannot be converted to the corresponding formal parameter type by a method invocation conversion.
InvocationTargetException - if the underlying method throws an exception.
NullPointerException - if the specified object is null and the method is an instance method.
ExceptionInInitializerError - if the initialization provoked by this method fails."
Explain what the return type is in an easy-to-understand manner. | befc107e9eb5db0312bb9df6d05ec0a9 | {
"intermediate": 0.3783115744590759,
"beginner": 0.2903413474559784,
"expert": 0.3313470780849457
} |
21,238 | how would i theorotically start scraping a minio storage bucket from a specific bucket? | 6456c38c947b7cb00896b166f19b65ba | {
"intermediate": 0.3299541473388672,
"beginner": 0.13980570435523987,
"expert": 0.5302401185035706
} |
21,239 | Things to do near Smith mountains | 745c20c5a5da488bcc6be9bc586d658d | {
"intermediate": 0.38444653153419495,
"beginner": 0.31579115986824036,
"expert": 0.2997623383998871
} |
21,240 | In unity, when an object enter a trigger, the object will accelerated upward until it reaches certain height, and then decelerated to 0, can you write the code in C# | 4d47deff04ca065cc849ee7cf40df728 | {
"intermediate": 0.5165199041366577,
"beginner": 0.16160018742084503,
"expert": 0.32187992334365845
} |
21,241 | create table emp (name varchar(10), salary int, dep_id int)
insert into emp values ('Anna',500,1),
('Nancy',620,1),
('Alli',700,1),
('Steve',500,2),
('Sarah',540,2),
('Bob',850,2)
;with cte as
(select name, salary
avg(salary) over (partition by dep_id) as avg_per_dep
from emp)
select name, salary from cte where salary > avg_per_dep it's not working on tsql | 807aab8187c7d28d69fafc58eda8af09 | {
"intermediate": 0.36020004749298096,
"beginner": 0.31262820959091187,
"expert": 0.3271717131137848
} |
21,242 | select name,
salary,
dep_id,
--(select avg(salary)from emp b where a.dep_id = b.dep_id) as avg_per_dep
from emp a
where salary > (select avg(salary)from emp b where a.dep_id = b.dep_id) it's not working | 63e81590ec4648e32c35a065da59a399 | {
"intermediate": 0.32844361662864685,
"beginner": 0.36006492376327515,
"expert": 0.311491459608078
} |
21,243 | code pour creer une application multimedia | 29fbea3c3fe1df0424c1739551e8c161 | {
"intermediate": 0.23142454028129578,
"beginner": 0.22779089212417603,
"expert": 0.5407845377922058
} |
21,244 | when i click the checkbox the row is converted to textbox
then when i tried to change the data then uncheck the checkbox the value change
what i want is to return the original value when i uncheck the checkbox
<table
class="table table-borderless text-custom-fs-16px border-b border-custom-gray2"
>
<thead class="bg-custom-orange">
<tr>
<th class="text-white w-custom-5% rounded-none text-center">
<input
type="checkbox"
[(ngModel)]="selectAll"
(change)="toggleSelectAll()"
/>
</th>
<th class="text-white w-custom-5% rounded-none text-center">No.</th>
<th class="text-white w-custom-10% rounded-none text-center">
Code
</th>
<th class="text-white w-custom-25% rounded-none text-center">
Name
</th>
<th class="text-white w-custom-25% rounded-none text-center">
Description
</th>
<th class="text-white w-custom-10% rounded-none text-center">
Actions
</th>
</tr>
</thead>
<tbody>
<ng-container
*ngFor="
let country of filteredCountries;
let counter = index;
let isOdd = odd
"
>
<tr
*ngIf="!isInputRowVisible|| !country.selected"
[class.even:bg-custom-white-bg]="isOdd"
[class.odd:bg-white]="!isOdd"
class="border-t border-b"
>
<td class="w-custom-5% rounded-none text-center">
<input
type="checkbox"
[(ngModel)]="country.selected"
(change)="anySelected()"
/>
</td>
<td class="w-custom-5% rounded-none text-center">
{{ counter + 1 }}
</td>
<td class="w-custom-10% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.code" maxlength="10" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.code }} {{ code }}
</ng-container>
</td>
<td class="w-custom-25% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.name" maxlength="100" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.name }}
</ng-container>
</td>
<td class="w-custom-25% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.description" maxlength="180" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.description }}
</ng-container>
</td>
<td class="w-custom-10% rounded-none text-center">
<button
(click)="openModal(2, country)"
type="button"
class="bg-custom-gray text-custom-blue border-none w-custom-w-60px h-custom-h-30px mr-1 hover:bg-custom-gray focus:bg-custom-gray rounded"
>
<i class="material-icons align-top">edit</i>
</button>
<button
(click)="openConfirmationDialogBox(3, country)"
type="button"
class="bg-custom-red-del text-custom-white border-none w-custom-w-60px h-custom-h-30px hover:bg-custom-red-del focus:bg-custom-red-del rounded"
>
<i class="material-icons align-top">delete_forever</i>
</button>
</td>
</tr>
<tr *ngIf="isObjectEmpty(countries)">
<td colspan="6" class="text-center">{{ EMPTY_LIST }}</td>
</tr>
</ng-container>
</tbody>
</table> | 07f881bf0f312a0d910357e30944a55f | {
"intermediate": 0.37354347109794617,
"beginner": 0.5079744458198547,
"expert": 0.11848213523626328
} |
21,245 | when i click the checkbox the row is converted to textbox
then when i tried to change the data then uncheck the checkbox the value changed
what i want is to return the original value when i uncheck the checkbox
<table
class="table table-borderless text-custom-fs-16px border-b border-custom-gray2"
>
<thead class="bg-custom-orange">
<tr>
<th class="text-white w-custom-5% rounded-none text-center">
<input
type="checkbox"
[(ngModel)]="selectAll"
(change)="toggleSelectAll()"
/>
</th>
<th class="text-white w-custom-5% rounded-none text-center">No.</th>
<th class="text-white w-custom-10% rounded-none text-center">
Code
</th>
<th class="text-white w-custom-25% rounded-none text-center">
Name
</th>
<th class="text-white w-custom-25% rounded-none text-center">
Description
</th>
<th class="text-white w-custom-10% rounded-none text-center">
Actions
</th>
</tr>
</thead>
<tbody>
<ng-container
*ngFor="
let country of filteredCountries;
let counter = index;
let isOdd = odd
"
>
<tr
*ngIf="!isInputRowVisible|| !country.selected"
[class.even:bg-custom-white-bg]="isOdd"
[class.odd:bg-white]="!isOdd"
class="border-t border-b"
>
<td class="w-custom-5% rounded-none text-center">
<input
type="checkbox"
[(ngModel)]="country.selected"
(change)="anySelected()"
/>
</td>
<td class="w-custom-5% rounded-none text-center">
{{ counter + 1 }}
</td>
<td class="w-custom-10% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.code" maxlength="10" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.code }}
</ng-container>
</td>
<td class="w-custom-25% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.name" maxlength="100" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.name }}
</ng-container>
</td>
<td class="w-custom-25% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.description" maxlength="180" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.description }}
</ng-container>
</td>
<td class="w-custom-10% rounded-none text-center">
<button
(click)="openModal(2, country)"
type="button"
class="bg-custom-gray text-custom-blue border-none w-custom-w-60px h-custom-h-30px mr-1 hover:bg-custom-gray focus:bg-custom-gray rounded"
>
<i class="material-icons align-top">edit</i>
</button>
<button
(click)="openConfirmationDialogBox(3, country)"
type="button"
class="bg-custom-red-del text-custom-white border-none w-custom-w-60px h-custom-h-30px hover:bg-custom-red-del focus:bg-custom-red-del rounded"
>
<i class="material-icons align-top">delete_forever</i>
</button>
</td>
</tr>
<tr *ngIf="isObjectEmpty(countries)">
<td colspan="6" class="text-center">{{ EMPTY_LIST }}</td>
</tr>
</ng-container>
</tbody>
</table> | dd76efc469e8d4de9be013581daf01f7 | {
"intermediate": 0.35467517375946045,
"beginner": 0.4995911717414856,
"expert": 0.14573363959789276
} |
21,246 | A database table has 4 columns. ID, Network, Text, Date.
ID column has unique numbers.
Network is either A or B.
Create an sql query to count the Text rows for each ID grouped by Network. | 733aae6f060e7849bf78aab5ec95d7b6 | {
"intermediate": 0.39800187945365906,
"beginner": 0.29226404428482056,
"expert": 0.3097341060638428
} |
21,247 | i cloned a repository a while ago. made some changes. now i want to get the latest version of the repository and delete all my changes. how to achive tat? | f4c80f5a407b6b8de07b249e453bae6b | {
"intermediate": 0.3558894395828247,
"beginner": 0.2949983775615692,
"expert": 0.3491120934486389
} |
21,248 | when i click the checkbox the row is converted to textbox
then when i tried to change the data then uncheck the checkbox the value changed
what i want is to return the original value when i uncheck the checkbox
<table
class="table table-borderless text-custom-fs-16px border-b border-custom-gray2"
>
<thead class="bg-custom-orange">
<tr>
<th class="text-white w-custom-5% rounded-none text-center">
<input
type="checkbox"
[(ngModel)]="selectAll"
(change)="toggleSelectAll()"
/>
</th>
<th class="text-white w-custom-5% rounded-none text-center">No.</th>
<th class="text-white w-custom-10% rounded-none text-center">
Code
</th>
<th class="text-white w-custom-25% rounded-none text-center">
Name
</th>
<th class="text-white w-custom-25% rounded-none text-center">
Description
</th>
<th class="text-white w-custom-10% rounded-none text-center">
Actions
</th>
</tr>
</thead>
<tbody>
<ng-container
*ngFor="
let country of filteredCountries;
let counter = index;
let isOdd = odd
"
>
<tr
*ngIf="!isInputRowVisible|| !country.selected"
[class.even:bg-custom-white-bg]="isOdd"
[class.odd:bg-white]="!isOdd"
class="border-t border-b"
>
<td class="w-custom-5% rounded-none text-center">
<input
type="checkbox"
[(ngModel)]="country.selected"
(change)="anySelected()"
/>
</td>
<td class="w-custom-5% rounded-none text-center">
{{ counter + 1 }}
</td>
<td class="w-custom-10% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.code" maxlength="10" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.code }}
</ng-container>
</td>
<td class="w-custom-25% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.name" maxlength="100" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.name }}
</ng-container>
</td>
<td class="w-custom-25% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.description" maxlength="180" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.description }}
</ng-container>
</td>
<td class="w-custom-10% rounded-none text-center">
<button
(click)="openModal(2, country)"
type="button"
class="bg-custom-gray text-custom-blue border-none w-custom-w-60px h-custom-h-30px mr-1 hover:bg-custom-gray focus:bg-custom-gray rounded"
>
<i class="material-icons align-top">edit</i>
</button>
<button
(click)="openConfirmationDialogBox(3, country)"
type="button"
class="bg-custom-red-del text-custom-white border-none w-custom-w-60px h-custom-h-30px hover:bg-custom-red-del focus:bg-custom-red-del rounded"
>
<i class="material-icons align-top">delete_forever</i>
</button>
</td>
</tr>
<tr *ngIf="isObjectEmpty(countries)">
<td colspan="6" class="text-center">{{ EMPTY_LIST }}</td>
</tr>
</ng-container>
</tbody>
</table> | 5074ea8b9c6964db983a9fa89a6a3386 | {
"intermediate": 0.35467517375946045,
"beginner": 0.4995911717414856,
"expert": 0.14573363959789276
} |
21,249 | when i run a project on vscode it says you dont have an extension for debugging xml | 2a09140d96a7f77cbbf6c36ff45f122d | {
"intermediate": 0.813395082950592,
"beginner": 0.10910046845674515,
"expert": 0.077504463493824
} |
21,250 | как улучшить этот код?
if (child.isMesh) {
child.material.side = DoubleSide;
child.castShadow = true;
child.receiveShadow = true;
}
if (child.name === 'Cube001') {
child.material = new ShaderMaterial({
fragmentShader: `
void main() {
gl_FragColor = vec4(1.0);
}`
});
} | 371ff7feef81b0b761bfa0db93a69bc4 | {
"intermediate": 0.40917736291885376,
"beginner": 0.3390042185783386,
"expert": 0.2518185079097748
} |
21,251 | when i run a dotnet project it says: MSBUILD : error MSB1009: Proje dosyası yok. | 01a31250e003922491bc407f3bfd2dd8 | {
"intermediate": 0.43301644921302795,
"beginner": 0.2308439463376999,
"expert": 0.33613958954811096
} |
21,252 | when i click the checkbox the row is converted to textbox
then when i tried to change the data then uncheck the checkbox the value changed
what i want is to return the original value when i uncheck the checkbox
<table
class="table table-borderless text-custom-fs-16px border-b border-custom-gray2"
>
<thead class="bg-custom-orange">
<tr>
<th class="text-white w-custom-5% rounded-none text-center">
<input
type="checkbox"
[(ngModel)]="selectAll"
(change)="toggleSelectAll()"
/>
</th>
<th class="text-white w-custom-5% rounded-none text-center">No.</th>
<th class="text-white w-custom-10% rounded-none text-center">
Code
</th>
<th class="text-white w-custom-25% rounded-none text-center">
Name
</th>
<th class="text-white w-custom-25% rounded-none text-center">
Description
</th>
<th class="text-white w-custom-10% rounded-none text-center">
Actions
</th>
</tr>
</thead>
<tbody>
<ng-container
*ngFor="
let country of filteredCountries;
let counter = index;
let isOdd = odd
"
>
<tr
*ngIf="!isInputRowVisible|| !country.selected"
[class.even:bg-custom-white-bg]="isOdd"
[class.odd:bg-white]="!isOdd"
class="border-t border-b"
>
<td class="w-custom-5% rounded-none text-center">
<input
type="checkbox"
[(ngModel)]="country.selected"
(change)="anySelected()"
/>
</td>
<td class="w-custom-5% rounded-none text-center">
{{ counter + 1 }}
</td>
<td class="w-custom-10% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.code" maxlength="10" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.code }}
</ng-container>
</td>
<td class="w-custom-25% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.name" maxlength="100" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.name }}
</ng-container>
</td>
<td class="w-custom-25% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.description" maxlength="180" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.description }}
</ng-container>
</td>
<td class="w-custom-10% rounded-none text-center">
<button
(click)="openModal(2, country)"
type="button"
class="bg-custom-gray text-custom-blue border-none w-custom-w-60px h-custom-h-30px mr-1 hover:bg-custom-gray focus:bg-custom-gray rounded"
>
<i class="material-icons align-top">edit</i>
</button>
<button
(click)="openConfirmationDialogBox(3, country)"
type="button"
class="bg-custom-red-del text-custom-white border-none w-custom-w-60px h-custom-h-30px hover:bg-custom-red-del focus:bg-custom-red-del rounded"
>
<i class="material-icons align-top">delete_forever</i>
</button>
</td>
</tr>
<tr *ngIf="isObjectEmpty(countries)">
<td colspan="6" class="text-center">{{ EMPTY_LIST }}</td>
</tr>
</ng-container>
</tbody>
</table>
what i want is to return the original value when i uncheck the box
so lets say i check the box then put in textbox then i cancel using unchecking it | 6db017b38d98a49bbc4a343ba7a4bcbc | {
"intermediate": 0.35467517375946045,
"beginner": 0.4995911717414856,
"expert": 0.14573363959789276
} |
21,253 | return to the original value when i only uncheck the checkbox
<table
class="table table-borderless text-custom-fs-16px border-b border-custom-gray2"
>
<thead class="bg-custom-orange">
<tr>
<th class="text-white w-custom-5% rounded-none text-center">
<input
type="checkbox"
[(ngModel)]="selectAll"
(change)="toggleSelectAll()"
/>
</th>
<th class="text-white w-custom-5% rounded-none text-center">No.</th>
<th class="text-white w-custom-10% rounded-none text-center">
Code
</th>
<th class="text-white w-custom-25% rounded-none text-center">
Name
</th>
<th class="text-white w-custom-25% rounded-none text-center">
Description
</th>
<th class="text-white w-custom-10% rounded-none text-center">
Actions
</th>
</tr>
</thead>
<tbody>
<ng-container
*ngFor="
let country of filteredCountries;
let counter = index;
let isOdd = odd
"
>
<tr
*ngIf="!isInputRowVisible|| !country.selected"
[class.even:bg-custom-white-bg]="isOdd"
[class.odd:bg-white]="!isOdd"
class="border-t border-b"
>
<td class="w-custom-5% rounded-none text-center">
<input
type="checkbox"
[(ngModel)]="country.selected"
(change)="anySelected()"
/>
</td>
<td class="w-custom-5% rounded-none text-center">
{{ counter + 1 }}
</td>
<td class="w-custom-10% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.code" maxlength="10" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.code }}
</ng-container>
</td>
<td class="w-custom-25% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.name" maxlength="100" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.name }}
</ng-container>
</td>
<td class="w-custom-25% rounded-none text-center">
<ng-container *ngIf="country.selected">
<input type="text" [(ngModel)]="country.description" maxlength="180" required/>
</ng-container>
<ng-container *ngIf="!country.selected">
{{ country.description }}
</ng-container>
</td>
<td class="w-custom-10% rounded-none text-center">
<button
(click)="openModal(2, country)"
type="button"
class="bg-custom-gray text-custom-blue border-none w-custom-w-60px h-custom-h-30px mr-1 hover:bg-custom-gray focus:bg-custom-gray rounded"
>
<i class="material-icons align-top">edit</i>
</button>
<button
(click)="openConfirmationDialogBox(3, country)"
type="button"
class="bg-custom-red-del text-custom-white border-none w-custom-w-60px h-custom-h-30px hover:bg-custom-red-del focus:bg-custom-red-del rounded"
>
<i class="material-icons align-top">delete_forever</i>
</button>
</td>
</tr>
<tr *ngIf="isObjectEmpty(countries)">
<td colspan="6" class="text-center">{{ EMPTY_LIST }}</td>
</tr>
</ng-container>
</tbody> | 97e9d5829e6df2ddc3465bbb34bd379a | {
"intermediate": 0.26457664370536804,
"beginner": 0.5998799204826355,
"expert": 0.13554346561431885
} |
21,254 | Is there any thing wrong with my code?
#include <stdio.h>
#include <math.h>
#include <stdbool.h>
bool NamNhuan(int a){
if(a % 400 == 0) return 1;
if(a % 4 == 0 && a%100 != 0) return 1;
return false;
}
bool checkdmy(int day, int month, int year){
if(day < 1) return 0;
if(month == 2)
if(NamNhuan(year)){
if(day <=29 ) return true;
}
else{
if(day<=28) return true;
}
else
if(month == 4 || month == 6 || month == 9 || month == 11){
if(day<=30) return true;
}
else{
if(day<=31) return true;
}
return false;
}
bool checkmonth(int month){
if(month <= 0 || month > 12) return 0;
return 1;
}
// 4 6 9 11: 30 dm4
// 2: 28/29 dm2
// con lai: dm
int main(){
int date,month,year,flag = 1,dm2,dm4=30,dm=31;
scanf("%d",&date);
scanf("/");
scanf("%d",&month);
scanf("/");
scanf("%d",&year);
if(date== 1 && month == 1){
printf("Yesterday: 31/12/%d\n",year-1);
printf("Tomorrow: 02/01/%d",year);
flag = 0;
}
if(date == 31 && month == 12) {
printf("Yesterday: 30/12/%d\n",year);
printf("Tomorrow: 01/01/%d",year+1);
flag = 0;
}
if(NamNhuan(year)) dm2 = 29;
else dm2 = 28;
if(month == 4 || month == 6 || month == 9 || month == 11 && flag == 1){
if(date == dm4){
printf("Yesterday: 29/%.2d/%d\n",month,year);
printf("Tomorrow: 01/%.2d/%d",month+1,year);
}
else if(date == 1){
printf("Yesterday: 31/%.2d/%d\n",month-1,year);
printf("Tomorrow: 02/%.2d/%d",month,year);
}
else{
printf("Yesterday: %.2d/%.2d/%d\n",date-1,month,year);
printf("Tomorrow: %.2d/%.2d/%d",date+1,month,year);
}
}
else if(month == 2){
if(date == dm2){
printf("Yesterday: %.2d/%.2d/%d\n",dm2-1,month,year);
printf("Tomorrow: 01/%.2d/%d",month+1,year);
}
else{
printf("Yesterday: %.2d/%.2d/%d\n",date-1,month,year);
printf("Tomorrow: %.2d/%.2d/%d",date+1,month,year);
}
}
else{
if((month == 12 || month == 10 || month == 7 || month == 5) && date == 1){
printf("Yesterday: %.2d/%.2d/%d\n",dm4,month-1,year);
printf("Tomorrow: %.2d/%.2d/%d",date+1,month,year);
flag = 0;
}
if((month == 3) && date == 1 ){
printf("Yesterday: %.2d/%.2d/%d\n",dm2,month-1,year);
printf("Tomorrow: %.2d/%.2d/%d",date+1,month,year);
flag = 0;
}
if(date == dm && flag == 1){
printf("Yesterday: %.2d/%.2d/%d\n",dm-1,month,year);
printf("Tomorrow: 01/%.2d/%d",month+1,year);
flag = 0;
}
else if(date == 1 && flag == 1 && month!=3){
printf("Yesterday: 30/%.2d/%d\n",month-1,year);
printf("Tomorrow: 02/%.2d/%d",month,year);
}
else{
if(flag ==1){
printf("Yesterday: %.2d/%.2d/%d\n",date-1,month,year);
printf("Tomorrow: %.2d/%.2d/%d",date+1,month,year);
}
}
}
} | fc1bb2f06d73453fb294a6d22fdfc570 | {
"intermediate": 0.38812264800071716,
"beginner": 0.4487934410572052,
"expert": 0.1630839705467224
} |
21,255 | напиши на swift FBM noise 2D | 6592382f9a1e652b385e20c615e47df2 | {
"intermediate": 0.4154576361179352,
"beginner": 0.23125700652599335,
"expert": 0.3532853424549103
} |
21,256 | How to define button onlick event in vue2 | 4ddb0a5b02a7f357e551ecbc0f67f51f | {
"intermediate": 0.3775888681411743,
"beginner": 0.22140158712863922,
"expert": 0.40100952982902527
} |
21,257 | var transferSummaries = await _dbContext.MaterialTransactionTrackings
.Where(ts => ts.MaterialTransferSummary == id)
.OrderBy(ts=> ts.RouteDetailNavigation.Sequence)
.Select(mts => new RoutesTransferDto{
SubLocation = mts.RouteDetailNavigation.RouteLocationNavigation.LocationName,
MainLocation = mts.RouteDetailNavigation.RouteLocationNavigation.MainLocation.LocationName,
Approver = mts.Approver,
Status = mts.Approver == null ? "On Progression" : "Approved",
ApproverList = string.Join(", ", _dbContext.LocationAuthorities
.Where(la => la.LocationId == mts.RouteDetailNavigation.RouteLocation)
.Select(la => la.Username))
//PendingApprove =
})
.ToListAsync();
let say say we have 5 data, if the last approver is null, pending become "OK" | 7716b6997eaeef9407afab5b1f04344e | {
"intermediate": 0.44548216462135315,
"beginner": 0.3042224049568176,
"expert": 0.25029540061950684
} |
21,258 | User-Agent HTTP header sql injection how to prevent in short | aaa04ff1b58876237d965a7ea369811a | {
"intermediate": 0.34386226534843445,
"beginner": 0.3791256546974182,
"expert": 0.27701202034950256
} |
21,259 | This power bi measure does not work. I want it to filter so that it chooses the MAX year selected for the visualisation. Make corrections: "Liikevoitto Budjetti € Max Vuosi = CALCULATE(SUM(F_Budjetti[BudjettiEUR]), H_Tilihierarkia[TiliryhmaTaso2] = "Liikevoitto", F_Budjetti[Versio] = "Budjetti", MAX(D_Paiva[VuosiNro]))" | bfef640b0e2676888bbb85bf0469025b | {
"intermediate": 0.3385569751262665,
"beginner": 0.3490276336669922,
"expert": 0.31241536140441895
} |
21,260 | #include <bits/stdc++.h>
using namespace std;
signed main() {
int n;
string S;
cin >> n >> S;
unordered_map<char, int> charCount;
int maxF= 0, minF = n, maxD = 0;
int l=0,r=0;
while (r < n) {
char currentChar = S[r];
charCount[currentChar]++;
maxF = max(maxF, charCount[currentChar]);
minF = min(minF, charCount[currentChar]);
if (maxF - minF > maxD) {
maxD = maxF - minF;
}
while (minF > 1) {
char leftChar = S[l];
charCount[leftChar]--;
minF = min(minF, charCount[leftChar]);
l++;
}
r++;
}
cout << maxD;
return 0;
}
fix code please | 292cff656e4376b99c694d8797668354 | {
"intermediate": 0.3101819157600403,
"beginner": 0.3876418173313141,
"expert": 0.302176296710968
} |
21,261 | sign in button not working dotned core project | d1f98a9de0db103e6e56ed03fdb5b927 | {
"intermediate": 0.2896362841129303,
"beginner": 0.32299500703811646,
"expert": 0.38736870884895325
} |
21,262 | Explain python code: """Fill excel file with cells missing in atoll."""
from openpyxl import Workbook
def fill_sheet(sheet, missed_cells):
"""
Fill the excel sheet with missed cells.
Args:
sheet: openpyxl sheet object
missed_cells: list
"""
if len(missed_cells) == 0:
return
columns = missed_cells[0]._fields
row = 1
for col in columns:
sheet.cell(
row=row,
column=columns.index(col) + 1,
value=col,
)
row = 2
for missed_cell in missed_cells:
for cell_val in missed_cell:
sheet.cell(
row=row,
column=missed_cell.index(cell_val) + 1,
value=cell_val,
)
row += 1
def fill_excel(selected_data, path):
"""
Fill excel file with missed in atoll cells, each technology to separate sheet.
Args:
selected_data: dict
path: string
"""
work_book = Workbook()
for tech, missed_cells in selected_data.items():
work_sheet = work_book.create_sheet(tech)
fill_sheet(work_sheet, missed_cells)
del work_book['Sheet']
work_book.save(path) | 8aa0f27387b268400fc56aa408d4ac80 | {
"intermediate": 0.49524128437042236,
"beginner": 0.24203576147556305,
"expert": 0.2627229392528534
} |
21,263 | pivot_df_copy['tutorial_after_level_choice'] = (pivot_df_copy['tutorial_start'] - pivot_df_copy['level_choice'])/pd.Timedelta('1 hour')
пишет ошибку
TypeError Traceback (most recent call last)
d:\загружено\Project_3-Markin.ipynb Ячейка 45 line 1
----> 1 pivot_df_copy['tutorial_after_level_choice'] = (pivot_df_copy['tutorial_start'] - pivot_df_copy['level_choice'])/pd.Timedelta('1 hour')
TypeError: 'method' object is not subscriptable
что это за ошибка и как исправить? | af1f16f8e6384ea65c3ebe6d4c6946c2 | {
"intermediate": 0.35980987548828125,
"beginner": 0.4003446102142334,
"expert": 0.23984549939632416
} |
21,264 | generic type request body spring boot | 7c992d713619ee9b6d6e7e8465bf9f31 | {
"intermediate": 0.435879647731781,
"beginner": 0.3454250693321228,
"expert": 0.2186952382326126
} |
21,265 | what this error concern about?
“statusCode”: 500,
“message”: “Object reference not set to an instance of an object.”,
“details”: " at API.Controllers.TransactionStatusController.<>c__DisplayClass6_0.<GetRoutes>b__0(MaterialTransactionTracking mts) in C:\Users\AdityaYulfan\Documents\IFBT Projects\Itrack_V2\API\Controllers\TransactionStatusController.cs:line 158\r\n at System.Linq.Enumerable.SelectListIterator2.ToList()\r\n at API.Controllers.TransactionStatusController.GetRoutes(Int32 id, String username) in C:\\Users\\AdityaYulfan\\Documents\\IFBT Projects\\Itrack_V2\\API\\Controllers\\TransactionStatusController.cs:line 157\r\n at lambda_method6(Closure, Object)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at API.Middleware.ExceptionMiddleware.InvokeAsync(HttpContext context) in C:\Users\AdityaYulfan\Documents\IFBT Projects\Itrack_V2\API\Middleware\ExceptionMiddleware.cs:line 23" | 799342e673ffbe98fcc3ec722e22074d | {
"intermediate": 0.30547261238098145,
"beginner": 0.5958949327468872,
"expert": 0.09863249212503433
} |
21,266 | is there a way using node.js and puppeteer to instead of listening to the response event of the page to listen to data as a stream? | 674cc8ef2c41ac6db92cd36f529439b6 | {
"intermediate": 0.690850019454956,
"beginner": 0.10559441149234772,
"expert": 0.20355558395385742
} |
21,267 | как работает этот метод?
@Singleton
@Startup
@AccessTimeout(value = 0, unit = TimeUnit.MINUTES)
public class AlertPaidPaymentsTimerBean {
private static final Logger LOGGER = LoggerFactory.getLogger(AlertPaidPaymentsTimerBean.class);
@EJB(mappedName = "java:global/acq-company-web/AcquiringProcessingHelpServiceImpl")
private AcquiringProcessingHelpService acquiringProcessingHelpService;
@Schedule(hour = "*", minute = "*/10", persistent = false)
@Lock(WRITE)
public void alertPaidPayments() {
LOGGER.info("Проверка не проведенных платежей. Старт");
acquiringProcessingHelpService.checkPaidOrders();
LOGGER.info("Проверка не проведенных платежей. Стоп");
}
} | b7ef0b07d67ffb5881c1f0dc59986b01 | {
"intermediate": 0.5405411720275879,
"beginner": 0.329791784286499,
"expert": 0.12966713309288025
} |
21,268 | # -*- coding:utf-8 -*-
import xlrd
import xlwt
# 打开excel文件,获取工作簿对象
wb = xlrd.open_workbook('normal.xlsx')
# 创建写入excel文件,
workbook = xlwt.Workbook(encoding = 'utf8')
# 单页写入255条 多余的分页
worksheet = workbook.add_sheet('My Worksheet')
staticNumber = -1
# 获取指定的表单
sheet3 = wb.sheet_by_name('Sheet1')
# 获取A列单元格中的值内容
titleArray = sheet3.col_values(0)[1:]
colArray = sheet3.col_values(1)[1:]
for index in range(len(colArray)):
titleCell = titleArray[index]
colCell = colArray[index]
#增加多重索引
screenNum = 1
for selCell in sheet3.col_values(2)[1:]:
#摒弃空值
if len(str(selCell)) < 1:
continue
if str(selCell) == str(" "):
continue
#先索引覆盖
if str(selCell).lower() in str(colCell).lower():
#存在覆盖索引 进一步判断
#将两个数据转为数组
if str(" ") in str(selCell):
#索引词组
selCell = selCell + ' '
colCell = colCell + ' '
if str(selCell.lower()) in str(colCell.lower()):
if screenNum == 1:
staticNumber += 1
worksheet.write(staticNumber, 0, label = titleCell)
worksheet.write(staticNumber, 1, label = colCell)
worksheet.write(staticNumber, screenNum + 1, label = selCell)
screenNum += 1
print ('<<<>>>###########################################')
print (colCell)
print (selCell)
print ('/////////SUCCESS /////////')
else :
#索引单词
col_list = str(colCell).split(" ")
for ColStr in col_list:
if str(ColStr).lower() == str(selCell).lower():
if screenNum == 1:
staticNumber += 1
worksheet.write(staticNumber, 0, label = titleCell)
worksheet.write(staticNumber, 1, label = colCell)
worksheet.write(staticNumber, screenNum + 1, label = selCell)
screenNum += 1
print ('<<<>>>###########################################')
print (colCell)
print (selCell)
print ('/////////SUCCESS /////////')
workbook.save('Excel_Workbook_sele.xls') | b9e8b9b0ff97e8427c103ced6899615d | {
"intermediate": 0.3191605508327484,
"beginner": 0.4118141829967499,
"expert": 0.26902520656585693
} |
21,269 | write a robot for blogger | c21fb99f2eebb5c681e12d0c9b18751b | {
"intermediate": 0.25367292761802673,
"beginner": 0.24308384954929352,
"expert": 0.5032432079315186
} |
21,270 | Can I have a vba code that does the following.
In my sheet PREQUEST once a value is entered into a cell in column K
then the cells in column A:F in the sheet PORDER of the same row where column K was enetered are calculated | 705d167963c2e161f0d5d35998d3e809 | {
"intermediate": 0.5301410555839539,
"beginner": 0.24019981920719147,
"expert": 0.22965914011001587
} |
21,271 | Below are two models I have in prisma.
I want you to send me a query where by we can query using stattimeday and advertiserid
model metric {
id Int @id @default(autoincrement())
advertiserid String? @db.VarChar(255)
adgroupid String? @db.VarChar(255)
campaignid String? @db.VarChar(255)
click Int?
spend Decimal? @db.Decimal(10, 2)
impressions Int?
cpm Decimal? @db.Decimal(10, 2)
cpc Decimal? @db.Decimal(10, 2)
ctr Decimal? @db.Decimal(10, 2)
campaignname String? @db.VarChar(255)
adgroupname String? @db.VarChar(255)
adname String? @db.VarChar(255)
adid String? @db.VarChar(255)
stattimeday DateTime? @db.Date
type String? @db.VarChar(255)
created_at DateTime? @default(now()) @db.Timestamp(6)
updated_at DateTime? @default(now()) @db.Timestamp(6)
metric_dimensions metric_dimensions[]
}
/// This table contains check constraints and requires additional setup for migrations. Visit https://pris.ly/d/check-constraints for more info.
model metric_dimensions {
id Int @id @default(autoincrement())
adid String? @db.VarChar(255)
stattimeday DateTime? @db.Date
type String? @db.VarChar(255)
metric_id Int?
created_at DateTime? @default(now()) @db.Timestamp(6)
updated_at DateTime? @default(now()) @db.Timestamp(6)
metric metric? @relation(fields: [metric_id], references: [id], onUpdate: NoAction,onDelete: Cascade)
} | 7c45dac5ec41148d90a462abd1ad877b | {
"intermediate": 0.368944376707077,
"beginner": 0.35133233666419983,
"expert": 0.27972325682640076
} |
21,272 | write java program to parse jira export file | f2fe009c4134926a654d455645a00dda | {
"intermediate": 0.5172151923179626,
"beginner": 0.21975597739219666,
"expert": 0.2630288898944855
} |
21,273 | e\_logs\2023-10-04T10_35_20_262Z-debug-0.log
PS C:\Users\click\Downloads\EbiografAngular-master> ng serve
Workspace extension with invalid name (defaultProject) found.
Error: Could not find the '@angular-devkit/build-angular:dev-server' builder's node package. حل الايرور | 45bc5db1d7ae1708d706ceff6072655e | {
"intermediate": 0.5235469937324524,
"beginner": 0.22667428851127625,
"expert": 0.24977868795394897
} |
21,274 | elseif rep.input_processing == "Elements as channels" && rep.rate_options == "Allow multirate processing"
if rep.counter <= rep.repetition_count
max_ticks = rep.repetition_count
tick = rep.counter
if tick == max_ticks
output_signal = input_signal
else
output_signal = rep.initial_conditions
end
end
rep.counter += 1
end
return output_signal
end | ba586227d68f39dac3ebff763d74c5bc | {
"intermediate": 0.3316286504268646,
"beginner": 0.35530030727386475,
"expert": 0.31307104229927063
} |
21,275 | Is redos good for storing more valus than two? I need a few more than just username and password but it might work as I heard redis is best to use by storing the data in the format you wanna use it in, in my case just a small cpp data structure | a462847957db7240500758340fa9fda5 | {
"intermediate": 0.6798640489578247,
"beginner": 0.14189261198043823,
"expert": 0.17824332416057587
} |
21,276 | peux tu me montrer le test unitaire de cette fonction d'un smart contrat avec truufle test ? "function startGame() public {
gameId = getGameId();
require(state == State.waitingWord, "no random words");
if(games[gameId].player1Joined && games[gameId].player2Joined) {
require(games[gameId].player1 != address(0) && games[gameId].player2 != address(0),
"players not defined");
require(playerBalances[gameId][games[gameId].player1].balance == playerBalances[gameId][games[gameId].player2].balance,
"bet the same amount");
}
emit GameStarted(gameId, games[gameId].player1, games[gameId].player2);
wordsList();
} " | 9d89aa6f442cb81c3b037a1d21b15b6d | {
"intermediate": 0.4248155653476715,
"beginner": 0.2808094620704651,
"expert": 0.2943749725818634
} |
21,277 | dodaj KOD1 i KOD2 do siebie, aby program mógł konwertować YAML na JSON lub HCL
KOD1:
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"strings"
"github.com/hashicorp/hcl/v2/hclsimple"
"gopkg.in/yaml.v2"
)
func main() {
// Get the YAML or HCL file path as a command line argument
if len(os.Args) < 2 {
log.Fatal("Please provide the path to the YAML or HCL file as an argument")
}
filePath := os.Args[1]
// Check the file extension
fileExt := filepath.Ext(filePath)
if fileExt == ".yaml" || fileExt == ".yml" {
// Convert YAML to JSON
jsonData, err := convertYamlToJson(filePath)
if err != nil {
log.Fatal(err)
}
// Display the converted JSON
fmt.Println(string(jsonData))
// Convert YAML to HCL
hclData, err := convertYamlToHcl(filePath)
if err != nil {
log.Fatal(err)
}
// Display the converted HCL
fmt.Println(string(hclData))
} else if fileExt == ".hcl" {
// Convert HCL to JSON
jsonData, err := convertHclToJson(filePath)
if err != nil {
log.Fatal(err)
}
// Display the converted JSON
fmt.Println(string(jsonData))
} else {
log.Fatal("Unsupported file extension. Supported extensions are .yaml, .yml, and .hcl")
}
}
func convertYamlToJson(filePath string) ([]byte, error) {
yamlData, err := ioutil.ReadFile(filePath)
if err != nil {
return nil, err
}
var data interface{}
err = yaml.Unmarshal(yamlData, &data)
if err != nil {
return nil, err
}
jsonData, err := json.Marshal(data)
if err != nil {
return nil, err
}
return jsonData, nil
}
func convertYamlToHcl(filePath string) ([]byte, error) {
yamlData, err := ioutil.ReadFile(filePath)
if err != nil {
return nil, err
}
var data map[interface{}]interface{}
err = yaml.Unmarshal(yamlData, &data)
if err != nil {
return nil, err
}
hclData := convertMapToHcl(data, "")
return hclData, nil
}
func convertMapToHcl(data map[interface{}]interface{}, indent string) []byte {
hcl := ""
for key, value := range data {
if subMap, ok := value.(map[interface{}]interface{}); ok {
hcl += fmt.Sprintf("%s%s {\n", indent, key)
hcl += string(convertMapToHcl(subMap, indent+" "))
hcl += fmt.Sprintf("%s}\n", indent)
} else {
hcl += fmt.Sprintf("%s%s = %v\n", indent, key, value)
}
}
return []byte(hcl)
}
func convertHclToJson(filePath string) ([]byte, error) {
hclData, err := ioutil.ReadFile(filePath)
if err != nil {
return nil, err
}
var data map[string]interface{}
err = hclsimple.Decode(filePath, hclData, nil, &data)
if err != nil {
return nil, err
}
jsonData, err := json.Marshal(data)
if err != nil {
return nil, err
}
return jsonData, nil
}
KOD2:
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"gopkg.in/yaml.v2"
)
func main() {
// Get the YAML file path as a command line argument
if len(os.Args) < 2 {
log.Fatal("Please provide the path to the YAML file as an argument")
}
filePath := os.Args[1]
// Check the file extension
fileExt := filepath.Ext(filePath)
if fileExt == ".yaml" || fileExt == ".yml" {
// Convert YAML to JSON
jsonData, err := convertYamlToJson(filePath)
if err != nil {
log.Fatal(err)
}
// Display the converted JSON
fmt.Println(string(jsonData))
} else {
log.Fatal("Unsupported file extension. Supported extensions are .yaml and .yml")
}
}
func convertYamlToJson(filePath string) ([]byte, error) {
yamlData, err := ioutil.ReadFile(filePath)
if err != nil {
return nil, err
}
var data interface{}
err = yaml.Unmarshal(yamlData, &data)
if err != nil {
return nil, err
}
jsonData, err := json.Marshal(data)
if err != nil {
return nil, err
}
return jsonData, nil
} | a0b3115bab5bca15a771957d43a24a02 | {
"intermediate": 0.39579302072525024,
"beginner": 0.382781445980072,
"expert": 0.2214256227016449
} |
21,278 | generic jpa repository spring boot | 7fa5934696fd733ed96578db9330a986 | {
"intermediate": 0.5188156366348267,
"beginner": 0.21167127788066864,
"expert": 0.2695130705833435
} |
21,279 | elseif rep.input_processing == "Elements as channels" && rep.rate_options == "Allow multirate processing"
if rep.counter <= rep.repetition_count
max_ticks = rep.repetition_count
tick = rep.counter
if tick == max_ticks
output_signal = input_signal
else
output_signal = rep.initial_conditions
end
end
rep.counter += 1
end
return output_signal
end
obj = Repeat(1,"Elements as channels", "Allow multirate processing", ones(3,4))
step(obj,[1.1 2 3 4 ;1 2 3 4;1 2 3 4])
step(obj,[1.1 2 3 4 ;1 2 3 4;1 2 3 4])
код должен выводить несколько матриц. их количество равно repetition_count. все матрицы, кроме последней должны быть равны initial_conditions, последняя input_signal | ba074b2f52e2abfd8e294b071ce0c276 | {
"intermediate": 0.3096311390399933,
"beginner": 0.34761717915534973,
"expert": 0.342751681804657
} |
21,280 | hi | 0b406151137f613de3ef4a042b4f48b9 | {
"intermediate": 0.3246487081050873,
"beginner": 0.27135494351387024,
"expert": 0.40399640798568726
} |
21,281 | from openpyxl import Workbook
from openpyxl.styles import Alignment
def fill_sheet(sheet, sites):
"""
Fill the excel sheet with missed cells.
Args:
sheet: openpyxl sheet object
sites: list
"""
if len(sites) == 0:
return
columns = [
'Region',
'ENM',
'ERBS_Name',
'ID',
'eNBId',
'Vlan',
'VlanRef',
'ExtEnodeB VlanRef',
'EranLink',
'PTP Time Sync',
'Elastic Ran LKF',
'Elastic Ran Feature',
'BBU',
'Port Bitrate',
'10G LKF',
'10G Feature',
'EUtranCells',
'Eran EUtranCells',
]
row = 1
for col in columns:
cell = sheet.cell(row=row, column=columns.index(col) + 1)
cell.value = col
row = 2
for site in sites:
for col, cell_val in site.items():
col_index = columns.index(col) +1
cell = sheet.cell(row=row, column=col_index)
cell.value = str(cell_val)
row += 1
def fill_excel(sites, path):
"""
Fill excel file with missed in atoll cells, each technology to separate sheet.
Args:
selected_data: dict
path: string
"""
work_book = Workbook()
work_sheet = work_book.create_sheet('ElasticRan')
fill_sheet(work_sheet, sites)
del work_book['Sheet']
work_book.save(path) | bc623a73e0527916641e0ae9d4add7cd | {
"intermediate": 0.49291688203811646,
"beginner": 0.21966128051280975,
"expert": 0.2874218225479126
} |
21,282 | C# using color dialog how would i refresh form and controls to show new color | 2c9d776e7adb9296033ed3b0ce7ab29e | {
"intermediate": 0.7391716837882996,
"beginner": 0.15453019738197327,
"expert": 0.10629819333553314
} |
21,283 | C# call InitializeComponent() without restarting application | ea6a5c1d86d6744e96b3238cd5246a74 | {
"intermediate": 0.4154789447784424,
"beginner": 0.318319708108902,
"expert": 0.26620134711265564
} |
21,284 | here is the data, please work out the logic of each column
Date|Day Name|Previous Working Date|Previous Working Day Name
2023-09-01|Friday|2023-08-31|Thursday
2023-09-02|Saturday|2023-09-01|Friday
2023-09-03|Sunday|2023-09-01|Friday
2023-09-04|Monday|2023-09-01|Friday
2023-09-05|Tuesday|2023-09-04|Monday
2023-09-06|Wednesday|2023-09-05|Tuesday
2023-09-07|Thursday|2023-09-06|Wednesday
2023-09-08|Friday|2023-09-07|Thursday
2023-09-09|Saturday|2023-09-08|Friday
2023-09-10|Sunday|2023-09-08|Friday
2023-09-11|Monday|2023-09-08|Friday
2023-09-12|Tuesday|2023-09-11|Monday
2023-09-13|Wednesday|2023-09-12|Tuesday
2023-09-14|Thursday|2023-09-13|Wednesday
2023-09-15|Friday|2023-09-14|Thursday
2023-09-16|Saturday|2023-09-15|Friday
2023-09-17|Sunday|2023-09-15|Friday
2023-09-18|Monday|2023-09-15|Friday
2023-09-19|Tuesday|2023-09-18|Monday
2023-09-20|Wednesday|2023-09-19|Tuesday
2023-09-21|Thursday|2023-09-20|Wednesday
2023-09-22|Friday|2023-09-21|Thursday
2023-09-23|Saturday|2023-09-22|Friday
2023-09-24|Sunday|2023-09-22|Friday
2023-09-25|Monday|2023-09-22|Friday
2023-09-26|Tuesday|2023-09-25|Monday
2023-09-27|Wednesday|2023-09-26|Tuesday
2023-09-28|Thursday|2023-09-27|Wednesday
2023-09-29|Friday|2023-09-28|Thursday
2023-09-30|Saturday|2023-09-29|Friday
2023-10-01|Sunday|2023-09-29|Friday
2023-10-02|Monday|2023-09-29|Friday | 9127a092cf43bd614c48ca51f3fbcf6e | {
"intermediate": 0.3512971103191376,
"beginner": 0.36261269450187683,
"expert": 0.286090224981308
} |
21,285 | using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class AnswerQuestion : MonoBehaviour {
class Question
{
public string QuestionContent { get; set; }
public List<string> Answers { get; set; }
public Question(string content, List<string> answerList)
{
QuestionContent = content;
Answers = answerList;
}
}
List<Question> questionList = new List<Question>();
Question currentQuestion = null;
public Text QuestionText;
public Text AnswerTextA;
public Text AnswerTextB;
public Text AnswerTextC;
public Text AnswerTextD;
public Text AnswerTextE;
public Button AnswerButtonA;
public Button AnswerButtonB;
public Button AnswerButtonC;
public Button AnswerButtonD;
public Button AnswerButtonE;
string answer;
int correct = 0;
int wrong = 0;
ColorBlock green = new ColorBlock();
ColorBlock red = new ColorBlock();
ColorBlock normal = new ColorBlock();
public Text FinalText;
public GameObject MainSet;
// Use this for initialization
void Start()
{
questionList.Add(new Question("What type of phrase is in the sentence \"I need to sharpen the bread knife.\"?", new List<string> { "Indefinite noun phrase", "Definite noun phrase", "Adjective phrase", "Unmodified noun phrase", "Compound noun phrase" }));
questionList.Add(new Question("Which of the following sentences does not contain a noun?", new List<string> { "Eat, drink, have fun, laugh, play!", "It is a place where the suns and days are different.", "The months look out from the window in fear at night.", "There are people lying in this place, an empty nothingness.", "There is a festival outside, a celebration." }));
questionList.Add(new Question("Which of the following sentences contains a dropped noun phrase?", new List<string> { "His uncle will get very angry about this.", "Not everyone can own a place like this.", "The students' situation is heart-warming.", "I couldn't get used to the air in Çukurova.", "It is not advisable to go down a well with a rope that is his." }));
questionList.Add(new Question("In which of the following lines has the modifier switched places with the modified?", new List<string> { "Absences, the most fearsome of all absenses.", "Fate made us in the phonographs of scorpions.", "You are as bright and beautiful as Turkey.", "What is this hole where my face should be?", "There are green curtains with vines in the room." }));
questionList.Add(new Question("Which of the star nouns phrases is different from the others?", new List<string> { "These *footsteps* are always roaming outside.", "I'm imagining *underneath the clouds*.", "You are the *reflection of our horizon*, a flag of fire!", "Our family's problems have been resolved.", "The *child's arm* was sticking out of the blanket." }));
questionList.Add(new Question("Which of the following sentences has the starred word taken a case suffix?", new List<string> { "They've beautifully painted *the house*.", "His mother never leaves his side.", "His anger is like a hay fire.", "His smile gives life to people.", "His face was changing colors." }));
newQ();
green = AnswerButtonA.colors;
red = AnswerButtonA.colors;
normal = AnswerButtonA.colors;
green.normalColor = Color.green;
green.pressedColor = Color.green;
green.highlightedColor = Color.green;
green.disabledColor = Color.green;
red.normalColor = Color.red;
red.pressedColor = Color.red;
red.highlightedColor = Color.red;
red.disabledColor = Color.red;
}
float timeToWait = 0;
bool changeTime = false;
bool returnTime = false;
void Update()
{
timeToWait -= Time.deltaTime;
if (timeToWait < 0 && changeTime)
{
AnswerButtonA.colors = normal;
AnswerButtonB.colors = normal;
AnswerButtonC.colors = normal;
AnswerButtonD.colors = normal;
AnswerButtonE.colors = normal;
newQ();
changeTime = false;
}
if (timeToWait < 0 && returnTime)
{
SceneManager.LoadScene("Main");
returnTime = false;
}
}
void newQ()
{
if (questionList.Count != 0)
{
currentQuestion = questionList[(new System.Random()).Next(questionList.Count)];
answer = currentQuestion.Answers[0];
QuestionText.text = currentQuestion.QuestionContent + " (C:" + correct + " W:" + wrong + ")";
var availableAnswers = currentQuestion.Answers;
List<int> notIncluded = new List<int>();
var curr = Random.Range(0, 5);
while (notIncluded.Contains(curr))
{
curr = Random.Range(0, 5);
}
notIncluded.Add(curr);
AnswerTextA.text = "" + availableAnswers[curr];
while (notIncluded.Contains(curr))
{
curr = Random.Range(0, 5);
}
notIncluded.Add(curr);
AnswerTextB.text = "" + availableAnswers[curr];
while (notIncluded.Contains(curr))
{
curr = Random.Range(0, 5);
}
notIncluded.Add(curr);
AnswerTextC.text = "" + availableAnswers[curr];
while (notIncluded.Contains(curr))
{
curr = Random.Range(0, 5);
}
notIncluded.Add(curr);
AnswerTextD.text = "" + availableAnswers[curr];
while (notIncluded.Contains(curr))
{
curr = Random.Range(0, 5);
}
notIncluded.Add(curr);
AnswerTextE.text = "" + availableAnswers[curr];
}
else
{
MainSet.SetActive(false);
FinalText.gameObject.SetActive(true);
FinalText.text = string.Format("You got {0} correct and {1} wrong answers!", correct, wrong);
changeTime = false;
returnTime = true;
timeToWait = 5;
}
}
void commonStuff(bool isCorrect, Button currentButton)
{
questionList.Remove(currentQuestion);
if (isCorrect) { correct++; currentButton.colors = green; } else
{
wrong++; currentButton.colors = red;
if (AnswerTextA.text == answer)
{
AnswerButtonA.colors = green;
}
else if (AnswerTextB.text == answer)
{
AnswerButtonB.colors = green;
}
else if (AnswerTextC.text == answer)
{
AnswerButtonC.colors = green;
}
else if (AnswerTextD.text == answer)
{
AnswerButtonD.colors = green;
}
else if (AnswerTextE.text == answer)
{
AnswerButtonE.colors = green;
}
}
timeToWait = 1.5f;
changeTime = true;
}
public void AnswerA()
{
if (!changeTime)
{
commonStuff((AnswerTextA.text == answer), AnswerButtonA);
}
}
public void AnswerB()
{
if (!changeTime)
{
commonStuff((AnswerTextB.text == answer), AnswerButtonB);
}
}
public void AnswerC()
{
if (!changeTime)
{
commonStuff((AnswerTextC.text == answer), AnswerButtonC);
}
}
public void AnswerD()
{
if (!changeTime)
{
commonStuff((AnswerTextD.text == answer), AnswerButtonD);
}
}
public void AnswerE()
{
if (!changeTime)
{
commonStuff((AnswerTextE.text == answer), AnswerButtonE);
}
}
} where are the correct answers in this code? | e32589a0a527ea5fc3dbae13d82507c0 | {
"intermediate": 0.2916770577430725,
"beginner": 0.5074343085289001,
"expert": 0.20088861882686615
} |
21,286 | Given The second-order problem
u" = 3u' - 221 + t ,
u(0) = 1.75,
u'(0) = 1.5,
after it has been reduced to a system of two first-order equations.
The exact solution is u(t) = et + 0.5t + 0.75.Solve this system of first-order initial value differential equations u' = f(t, u), u(t0) = u0, using the fourth order Runge-Kutta method. | 67f31f3535a1eac4d8e492a8ea69cbcb | {
"intermediate": 0.35421228408813477,
"beginner": 0.3301451504230499,
"expert": 0.31564250588417053
} |
21,287 | get style of some bootstrap classes and set it in print window to print the form inside ngb popup modal with these classes style | 2f3f2cac2f33ead3f661a58eeb735437 | {
"intermediate": 0.35036972165107727,
"beginner": 0.413655161857605,
"expert": 0.23597508668899536
} |
21,288 | print the form inside the ngb popup with bootstrap style and classes | 0cffba004f15a505af2155c11c4385cb | {
"intermediate": 0.34586116671562195,
"beginner": 0.3033810257911682,
"expert": 0.35075774788856506
} |
21,289 | open print window to print the from in ngb popup modal with bootstrap classes | 7d1b23852e19f1996d79fe015bd5c6fe | {
"intermediate": 0.38291388750076294,
"beginner": 0.25830790400505066,
"expert": 0.3587781488895416
} |
21,290 | when click on button call print function like this var printContents = document.getElementById('contentToPrint').innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents; there is grey overlay show in print i want to remove | f3108aecb3a9cd3486f1b856a1e45a27 | {
"intermediate": 0.3875323534011841,
"beginner": 0.2814755141735077,
"expert": 0.33099210262298584
} |
21,291 | Change the following mongoose schema to postgres tables and relations
const reportSchema = new mongoose.Schema(
{
date: Date,
trafficChannelId: String,
final: Boolean,
report: {
details: [
{
adGroups: [
{
adGroupId: String,
ads: [
{
adId: String,
adName: String,
adGroupName: String,
campaignName: String,
date: Date,
totalSpent: Number,
totalClicks: Number,
totalImpressions: Number,
revenue: Number,
estimate: Number,
conversions: Number,
clickDetail: [
{
trackId: String,
domainId: String,
conversion: {
estimate: Number,
conversionId: String,
revenue: Number,
keyword: String,
},
},
],
feedSource: String,
},
],
},
],
campaignId: String,
funnelTemplateId: String,
campaignIdRT: String,
},
],
domains: [
{
campaigns: [String],
domainId: String,
name: String,
weight: Number,
feedSource: String,
},
],
},
compressedReport: Buffer,
isCompressed: Boolean,
},
{ timestamps: true },
); | 2e806f704a1f557f1d2ae08619c36d63 | {
"intermediate": 0.3414222300052643,
"beginner": 0.3742886781692505,
"expert": 0.28428906202316284
} |
21,292 | у меня есть строка 'pow(pow(C_1[1, 5], C_2[2, 6]), C_3[3, 10])", нужно создать функцию, которая возвращает массив элементов [C_1[1, 5], C_2[2, 6], C_3[3, 10]] | 8a683eab747c0b0dd02d099ccf5c2264 | {
"intermediate": 0.12251497805118561,
"beginner": 0.6806983947753906,
"expert": 0.19678662717342377
} |
21,293 | remove modal overlay when click on function to print the form inside popup modal | 451c586068b043b0b79ff3b8145a43c6 | {
"intermediate": 0.44125184416770935,
"beginner": 0.21098534762859344,
"expert": 0.3477627635002136
} |
21,294 | set background color to body before window.print() | e2f3d8f10f060d575036f7e7b3380ce7 | {
"intermediate": 0.42253759503364563,
"beginner": 0.28282344341278076,
"expert": 0.2946389317512512
} |
21,295 | C++ code to C# | 0cfe9ffdc225481c6ff3655673678399 | {
"intermediate": 0.41670748591423035,
"beginner": 0.40420788526535034,
"expert": 0.17908470332622528
} |
21,296 | how do i write a c# script in unity that makes a sound every time a ball hits a brick? | 083afafe4797b151cc0685ece63a5251 | {
"intermediate": 0.3677756190299988,
"beginner": 0.32134175300598145,
"expert": 0.3108825981616974
} |
21,297 | Develop the design of the weather station to show the interaction
between the data collection subsystem and the instruments that
collect weather data. Use sequence diagrams to show this
interaction | 12e94dde57d1a638a10b38f6bbd8d0ac | {
"intermediate": 0.3235408365726471,
"beginner": 0.3257448673248291,
"expert": 0.3507143557071686
} |
21,298 | Marshal.GetDelegateForFunctionPointer Invalid function pointer 0x5f002830 should be 64bit address | 2b66807d773370747384db5501498004 | {
"intermediate": 0.40150243043899536,
"beginner": 0.3305891752243042,
"expert": 0.26790839433670044
} |
21,299 | Despite the icon being 24x24, the button resulting from the following code is rectangular. What could be the cause? | 0bc8dc3a858dc81aecc4c6e3e6fcaf7f | {
"intermediate": 0.4013630151748657,
"beginner": 0.288174033164978,
"expert": 0.31046298146247864
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.