row_id int64 0 48.4k | init_message stringlengths 1 342k | conversation_hash stringlengths 32 32 | scores dict |
|---|---|---|---|
21,300 | C# embed a dll then inject that dll into another process | 553c0f6a655c73027f7281aecf8bba68 | {
"intermediate": 0.6440984606742859,
"beginner": 0.14980122447013855,
"expert": 0.20610032975673676
} |
21,301 | C# embed dll and inject it into another process | 2c2f09fbc55dbc09b3e22b1f35121b5a | {
"intermediate": 0.5799841284751892,
"beginner": 0.23097999393939972,
"expert": 0.18903590738773346
} |
21,302 | C# embed dll as embedded resource and inject dll into another process | 4f531e1b909e7a8bc1f251907be555aa | {
"intermediate": 0.5217620134353638,
"beginner": 0.23217250406742096,
"expert": 0.24606549739837646
} |
21,303 | hi | f8750284aafb86463d8064f6e25c5318 | {
"intermediate": 0.3246487081050873,
"beginner": 0.27135494351387024,
"expert": 0.40399640798568726
} |
21,304 | En base a este código me puedes añadir que el cliente haga un swipe este se comporte como el ajuste de los botones Next y prev "class VamtamHrScrolling extends elementorModules.frontend.handlers.Base {
getDefaultSettings() {
return { selectors: { container: ".elementor-widget-container", items: ".products.elementor-grid, .elementor-posts-container" } };
}
getDefaultElements() {
const selectors = this.getSettings("selectors");
return { $container: this.$element.find(selectors.container), $items: this.$element.find(selectors.items) };
}
onInit(...args) {
super.onInit(...args), this.checkHandleHrLayout();
}
checkHandleHrLayout() {
const isTouchDevice = window.VAMTAM.CUSTOM_ANIMATIONS.VamtamCustomAnimations.utils.isTouchDevice();
if (isTouchDevice) return;
const hasHrLayout = this.$element.hasClass("vamtam-has-hr-layout"),
hasNav = this.$element.hasClass("vamtam-has-nav");
hasHrLayout && hasNav && this.handleHrLayoutNavigation();
}
handleHrLayoutNavigation() {
const addNavElements = () => {
const $navigation = jQuery(
'<div class="vamtam-nav">\n\t\t\t\t\t<span class="vamtam-nav-btn vamtam-nav-btn-prev">\n\t\t\t\t\t\t<i class="vamtamtheme- vamtam-theme-arrow-left"></i>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class="vamtam-nav-btn vamtam-nav-btn-next">\n\t\t\t\t\t\t<i class="vamtamtheme- vamtam-theme-arrow-right"></i>\n\t\t\t\t\t</span>\n\t\t\t\t</div>'
);
this.elements.$items.after($navigation);
},
bindNavEvents = () => {
const colGapPropName = this.getWidgetType().includes("posts") ? "--grid-column-gap" : "--vamtam-col-gap",
onNavBtnClick = (e) => {
e.preventDefault();
const $items = this.elements.$items,
visibleWidth = $items.width(),
isNext = jQuery(e.target).hasClass("vamtam-nav-btn-next");
let colGap = parseFloat(this.getCachedCSSPropForDevice(colGapPropName)) || 0,
colHint = this.normalizeMultiUnitValue(this.getCachedCSSPropForDevice("--vamtam-col-hint"));
colHint < 0 ? (colHint = 0) : (colGap = 0), isNext ? $items.scrollLeft($items.scrollLeft() + visibleWidth + colGap - colHint) : $items.scrollLeft($items.scrollLeft() - visibleWidth - colGap + colHint);
};
jQuery(this.$element.find(".vamtam-nav-btn")).off("click").on("click", onNavBtnClick);
const onItemsScroll = (e) => {
const items = this.elements.$items[0],
$items = this.elements.$items;
0 === items.scrollLeft
? (this.$element.find(".vamtam-nav-btn-prev").addClass("disabled"), this.$element.find(".vamtam-nav-btn-next").removeClass("disabled"))
: items.scrollLeft === items.scrollWidth - $items.width()
? (this.$element.find(".vamtam-nav-btn-prev").removeClass("disabled"), this.$element.find(".vamtam-nav-btn-next").addClass("disabled"))
: (this.$element.find(".vamtam-nav-btn-prev").removeClass("disabled"), this.$element.find(".vamtam-nav-btn-next").removeClass("disabled"));
},
onItemsScrollDebounced200 = window.VAMTAM.debounce(onItemsScroll, 200),
onItemsScrollDebounced500 = window.VAMTAM.debounce(onItemsScroll, 500);
this.elements.$items.off("scroll", onItemsScrollDebounced200),
this.elements.$items.on("scroll", onItemsScrollDebounced200),
jQuery(window).off("resize", onItemsScrollDebounced500),
jQuery(window).on("resize", onItemsScrollDebounced500),
this.elements.$items.trigger("scroll");
};
addNavElements(), bindNavEvents();
}
normalizeMultiUnitValue(valWithUnit) {
let normalizedVal = 0;
if (valWithUnit.includes("px")) return (normalizedVal = parseFloat(valWithUnit) || 0), normalizedVal;
if (valWithUnit.includes("%")) {
const width = this.$element.width();
return (normalizedVal = (parseFloat(valWithUnit) / 100) * width), normalizedVal;
}
if (valWithUnit.includes("em")) {
const fontSize = parseFloat(this.$element.parent().css("font-size"));
return (normalizedVal = parseFloat(fontSize) * parseFloat(valWithUnit)), normalizedVal;
}
return 0;
}
getCachedCSSPropForDevice(propName) {
if (!propName) return "";
const curDevice = jQuery("body").attr("data-elementor-device-mode");
return (
this.cachedProps || (this.cachedProps = {}),
this.cachedProps[curDevice] || (this.cachedProps[curDevice] = {}),
this.cachedProps[curDevice][propName] || (this.cachedProps[curDevice][propName] = getComputedStyle(this.$element[0]).getPropertyValue(propName)),
this.cachedProps[curDevice][propName]
);
}
}
jQuery(window).on("elementor/frontend/init", () => {
const attachTo = [
{ name: "woocommerce-products", skin: "default" },
{ name: "woocommerce-product-related", skin: "default" },
{ name: "woocommerce-product-upsell", skin: "default" },
{ name: "posts", skin: "classic" },
{ name: "posts", skin: "vamtam_classic" },
{ name: "archive-posts", skin: "archive_classic" },
{ name: "archive-posts", skin: "vamtam_classic" },
];
if (elementorFrontend.elementsHandler && elementorFrontend.elementsHandler.attachHandler)
attachTo.forEach((widget) => {
elementorFrontend.elementsHandler.attachHandler(widget.name, VamtamHrScrolling, widget.skin);
});
else {
const addHandler = ($element) => {
elementorFrontend.elementsHandler.addHandler(VamtamHrScrolling, { $element: $element });
};
attachTo.forEach((widget) => {
elementorFrontend.hooks.addAction(`frontend/element_ready/${widget.name}.${widget.skin}`, addHandler, 100);
});
}
});" porfavor dame el código completo con la modificación que me vayas a dar para ver cómo quedaría el código completo integrado | 55e96eecfd49085ab4ec708c86ee2063 | {
"intermediate": 0.31115347146987915,
"beginner": 0.49504193663597107,
"expert": 0.1938045620918274
} |
21,305 | File.Create(); with path.getrandomfilename | e021d2979746bff803b1ed01ac1fa96b | {
"intermediate": 0.39537182450294495,
"beginner": 0.19625182449817657,
"expert": 0.4083763360977173
} |
21,306 | C# using embedded resource dll inject into another process | 5cb2e2efdfe0fa158ce44a8b4499272c | {
"intermediate": 0.49286171793937683,
"beginner": 0.3265499174594879,
"expert": 0.18058834969997406
} |
21,307 | using Assembly.GetExecutingAssembly().GetManifestResourceStream create temp file and write bytes into it | 630afa3559fd2114649e3c3804b6a042 | {
"intermediate": 0.5586592555046082,
"beginner": 0.2552461326122284,
"expert": 0.18609461188316345
} |
21,308 | using Assembly.GetExecutingAssembly().GetManifestResourceStream(embeddedresourcename) write bytes into file | cd7bbb4504784fb06af11713281c589a | {
"intermediate": 0.4901791512966156,
"beginner": 0.2681194245815277,
"expert": 0.24170145392417908
} |
21,309 | clone the element with class name 'slider-primary' from ths website https://tairo.cssninja.io/documentation/reference/integration/slider | eed338d1d88bdb08c69d7131f8f0d2e0 | {
"intermediate": 0.4010758101940155,
"beginner": 0.30146223306655884,
"expert": 0.29746195673942566
} |
21,310 | C# embed dll and inject it into another process | f6d1cd1ef6e1f5a792ac9eaa5e9902d0 | {
"intermediate": 0.5799841284751892,
"beginner": 0.23097999393939972,
"expert": 0.18903590738773346
} |
21,311 | Create a constructor function called SetTimeConstruct to construct a structure called TimeHrMin with two fields: hours to hold the hours, and mins to hold the minutes. The function has integer inputs hoursVal and minutesVal. The constructor function should check if and . If not, the value should be set to 0.
Ex:
>> time1 = SetTimeConstruct( 23, 31)
time1 =
struct with fields:
hours: 23
mins: 31
>> time2 = SetTimeConstruct( 25, 31)
time2 =
struct with fields:
hours: 0
mins: 31
>> time3 = SetTimeConstruct( 25, -1)
time3 =
struct with fields:
hours: 0
mins: 0
Use this code:
function TimeHrMin = SetTimeConstruct( hoursVal, minutesVal)
% Your code goes here %
end | 6d2a76e199b01f06d580979b3b4a4556 | {
"intermediate": 0.43274277448654175,
"beginner": 0.29950734972953796,
"expert": 0.2677497863769531
} |
21,312 | C# create file and write bytes to it with permissions | 24a0c63be1e2126dfa6c57a5e0f25d5d | {
"intermediate": 0.5055356621742249,
"beginner": 0.21329356729984283,
"expert": 0.2811707854270935
} |
21,313 | What is a sink in pulseaudio? | 81683062a8962535db4f58c386f7968b | {
"intermediate": 0.29446083307266235,
"beginner": 0.3304077982902527,
"expert": 0.3751313388347626
} |
21,314 | Good afternoon! Can you write a MATLAB script that plots a sine wave? | 54f061a9efddd42d17d13976a1996fa2 | {
"intermediate": 0.3530351519584656,
"beginner": 0.18622249364852905,
"expert": 0.46074235439300537
} |
21,315 | ERR_TOO_MANY_REDIRECTS my dotnet core project gives error | 8cbe6d64acdfdc768d47095a5cc5e1b2 | {
"intermediate": 0.30400362610816956,
"beginner": 0.28215548396110535,
"expert": 0.4138408601284027
} |
21,316 | What is 0/0? | 0c5f9381c3dbaf7dd3d347c10c381268 | {
"intermediate": 0.31933319568634033,
"beginner": 0.24292370676994324,
"expert": 0.43774303793907166
} |
21,317 | how do I write a function in excel that tells me if a given value in another column shows up more than once in the same sheet | a54918357f543a787f2d250ce21f199f | {
"intermediate": 0.3207457363605499,
"beginner": 0.43852922320365906,
"expert": 0.2407250553369522
} |
21,318 | Help me understand. Why should I use chatgpt? | 99f9d04d092cb08b2787600ecdff69f5 | {
"intermediate": 0.5378871560096741,
"beginner": 0.14461009204387665,
"expert": 0.31750282645225525
} |
21,319 | Act as c++ developer, i will send you a few lines of code, you need to find where is an issue | c326a84b1e02045aef87d503589cf98b | {
"intermediate": 0.36040425300598145,
"beginner": 0.4013715982437134,
"expert": 0.23822414875030518
} |
21,320 | 可以说中文吗 | a69b5b26d871ee8e7e36a30393eb09d9 | {
"intermediate": 0.3539918065071106,
"beginner": 0.28168967366218567,
"expert": 0.3643185496330261
} |
21,321 | ERR_TOO_MANY_REDIRECTS dotnet project | 60656db0dc5be26442a3e3591b6ddb54 | {
"intermediate": 0.28696542978286743,
"beginner": 0.24198408424854279,
"expert": 0.471050500869751
} |
21,322 | Exception has occurred: CLR/System.NullReferenceException
An exception of type 'System.NullReferenceException' occurred in Project.dll but was not handled in user code: 'Object reference not set to an instance of an object.'
at Project.Program.<>c__DisplayClass0_0.<Main>b__0(JwtBearerOptions opt) in C:\Users\Acer\Desktop\Ctrl-Future-Cohort5-Group4-Project-1\Project\Program.cs:line 34
at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
at Microsoft.Extensions.Options.OptionsCache`1.<>c__3`1.<GetOrAdd>b__3_0(String name, ValueTuple`2 arg)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd[TArg](TKey key, Func`3 valueFactory, TArg factoryArgument)
at Microsoft.Extensions.Options.OptionsCache`1.GetOrAdd[TArg](String name, Func`3 createOptions, TArg factoryArgument)
at Microsoft.Extensions.Options.OptionsMonitor`1.Get(String name)
at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.<InitializeAsync>d__42.MoveNext() | ec54d71e5267b41424d619f8b5dfe316 | {
"intermediate": 0.3313579559326172,
"beginner": 0.3892076313495636,
"expert": 0.27943435311317444
} |
21,323 | how send params in http angular get api | 8f0b950bd52e14cae1aa13362c22fca1 | {
"intermediate": 0.7408052682876587,
"beginner": 0.12878358364105225,
"expert": 0.13041111826896667
} |
21,324 | in Go how can i use print Timespec using the builtin print() function and can’t use fmt | 55747c8d4a1848ae3664aa006459c0a7 | {
"intermediate": 0.5493698716163635,
"beginner": 0.3682026267051697,
"expert": 0.08242747187614441
} |
21,325 | Change Request method to receive lambda function with HttpResponse as argument
class HttpAdapter {
public:
static void Request(const char* url, HttpMethod method, const char* headers, const char* body);
};
class HttpResponse {
private:
std::string _responseBody;
int _responseCode;
public:
HttpResponse(const std::string& responseBody, int responseCode)
: _responseBody(responseBody), _responseCode(responseCode)
{
}
const std::string& getResponseBody() const;
int getResponseCode() const;
}; | 8563ea3ee0c8445dcd59a6a1feeed3db | {
"intermediate": 0.2654528021812439,
"beginner": 0.6020731329917908,
"expert": 0.13247409462928772
} |
21,326 | How to implement class which allows add/get/remove key:value pairs in it in c++ 14 | 48d3b209506ba471bb3e797dc7596161 | {
"intermediate": 0.36028751730918884,
"beginner": 0.47031092643737793,
"expert": 0.1694016009569168
} |
21,327 | i want to change the all categories when i press something in my dropdown
<div class="flex">
<label
for="search-dropdown"
class="mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"
>Your Email</label
>
<button
id="dropdown-button"
data-dropdown-toggle="dropdown"
class="flex-shrink-0 z-10 inline-flex items-center py-2.5 px-4 text-sm font-medium text-center text-gray-900 bg-gray-100 border border-gray-300 rounded-l-lg hover:bg-gray-200 focus:ring-4 focus:outline-none focus:ring-gray-100 dark:bg-gray-700 dark:hover:bg-gray-600 dark:focus:ring-gray-700 dark:text-white dark:border-gray-600"
type="button"
>
All categories
<svg
class="w-2.5 h-2.5 ml-2.5"
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 10 6"
>
<path
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="m1 1 4 4 4-4"
/>
</svg>
</button>
<div
id="dropdown"
class="z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700"
>
<ul
class="py-2 text-sm text-gray-700 dark:text-gray-200"
aria-labelledby="dropdown-button"
>
<li *ngFor="let item of items">
<button
type="button"
class="inline-flex w-full px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
>
{{ item }}
</button>
</li>
</ul>
</div>
<div class="relative w-full">
<input
[(ngModel)]="searchKeyword"
(input)="searchCountries()"
placeholder="Search for a country"
type="search"
id="search"
type="search"
id="search-dropdown"
class="block p-2.5 w-full z-20 text-sm text-gray-900 bg-gray-50 rounded-r-lg border-l-gray-50 border-l-2 border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-l-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:border-blue-500"
placeholder="Search Code, Name or Description"
required
/>
</div>
</div> | bee853077732c514dbd4367795bce3c4 | {
"intermediate": 0.4188495874404907,
"beginner": 0.4260648787021637,
"expert": 0.15508544445037842
} |
21,328 | Write a MatLab function called ConvertToDecadesAndYears to convert totalYears to decades and years. The decades and years should be returned using a struct that has two fields, decades for the number of decades, and years for the number of years.
Restrictions: ConvertToDecadesAndYears must use direct field indexing.
Ex:
>>TimeDecadesYears = [];
>>TimeDecadesYears = ConvertToDecadesAndYears(24)
TimeDecadesYears =
struct with fields:
decades: 2
years: 4
Use this code:
function tempVal = ConvertToDecadesAndYears( totalYears)
% your solution goes here %
end | aa0fd5c28f52c514b645955f0e084a73 | {
"intermediate": 0.49068599939346313,
"beginner": 0.22471080720424652,
"expert": 0.28460320830345154
} |
21,329 | i want to change the {{ selectedCategory }} when i press something in my dropdown
ex.
{{ selectedCategory }} = "All categories"
items = ['All categories', 'code', 'name', 'description'];
i want is when i press the 'code' the dropdown will display the items other than the code
<div class="flex">
<label
for="search-dropdown"
class="mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"
>Your Email</label
>
<button
id="dropdown-button"
data-dropdown-toggle="dropdown"
class="flex-shrink-0 z-10 inline-flex items-center py-2.5 px-4 text-sm font-medium text-center text-gray-900 bg-gray-100 border border-gray-300 rounded-l-lg hover:bg-gray-200 focus:ring-4 focus:outline-none focus:ring-gray-100 dark:bg-gray-700 dark:hover:bg-gray-600 dark:focus:ring-gray-700 dark:text-white dark:border-gray-600"
type="button"
>
All categories
<svg
class="w-2.5 h-2.5 ml-2.5"
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 10 6"
>
<path
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="m1 1 4 4 4-4"
/>
</svg>
</button>
<div
id="dropdown"
class="z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700"
>
<ul
class="py-2 text-sm text-gray-700 dark:text-gray-200"
aria-labelledby="dropdown-button"
>
<li *ngFor="let item of items">
<button
type="button"
class="inline-flex w-full px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
>
{{ item }}
</button>
</li>
</ul>
</div>
<div class="relative w-full">
<input
[(ngModel)]="searchKeyword"
(input)="searchCountries()"
placeholder="Search for a country"
type="search"
id="search"
type="search"
id="search-dropdown"
class="block p-2.5 w-full z-20 text-sm text-gray-900 bg-gray-50 rounded-r-lg border-l-gray-50 border-l-2 border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-l-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:border-blue-500"
placeholder="Search Code, Name or Description"
required
/>
</div>
</div> | 15ea4f29a441af83608c80d0881475ea | {
"intermediate": 0.34278804063796997,
"beginner": 0.5026658773422241,
"expert": 0.1545461118221283
} |
21,330 | i want to disable a button when the input textbox is empty angular | ab97cd422c7ff2dd97d2fea85aa1f2f9 | {
"intermediate": 0.4177149534225464,
"beginner": 0.21900975704193115,
"expert": 0.36327534914016724
} |
21,331 | I want to print the form inside in ngb popup modal with bootstrap classes in javascript function | b009cb69b071f83ec1a66d09e62c112c | {
"intermediate": 0.43363645672798157,
"beginner": 0.2947503328323364,
"expert": 0.271613210439682
} |
21,332 | How to implement class which allows add/get/remove key:value pairs in it in c++ 14 | 81c01afc83ae9c1f78c0cb8c1592292f | {
"intermediate": 0.36028751730918884,
"beginner": 0.47031092643737793,
"expert": 0.1694016009569168
} |
21,333 | add pagination with 10 rows
<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>
<tr *ngIf="isObjectEmpty(countries)">
<td colspan="6" class="text-center">{{ EMPTY_LIST }}</td>
</tr>
<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(country)"
/>
</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>
</ng-container>
</tbody>
</table>a | 0aad3107cf5eef5e7234d93f14c12b6f | {
"intermediate": 0.39395561814308167,
"beginner": 0.4487980008125305,
"expert": 0.15724638104438782
} |
21,334 | how can i implement my pagination in my table
<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>
<tr *ngIf="isObjectEmpty(countries)">
<td colspan="6" class="text-center">{{ EMPTY_LIST }}</td>
</tr>
<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(country)"
/>
</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>
</ng-container>
</tbody>
</table>
<nav aria-label="Page navigation example">
<ul class="flex justify-center items-center -space-x-px h-10 text-base">
<li>
<a href="#" class="flex items-center justify-center px-4 h-10 ml-0 leading-tight text-gray-500 bg-white border border-gray-300 rounded-l-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
<span class="sr-only">Previous</span>
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 1 1 5l4 4"/>
</svg>
</a>
</li>
<li>
<a href="#" class="flex items-center justify-center px-4 h-10 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">1</a>
</li>
<li>
<a href="#" class="flex items-center justify-center px-4 h-10 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">2</a>
</li>
<li>
<a href="#" aria-current="page" class="z-10 flex items-center justify-center px-4 h-10 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white">3</a>
</li>
<li>
<a href="#" class="flex items-center justify-center px-4 h-10 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">4</a>
</li>
<li>
<a href="#" class="flex items-center justify-center px-4 h-10 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">5</a>
</li>
<li>
<a href="#" class="flex items-center justify-center px-4 h-10 leading-tight text-gray-500 bg-white border border-gray-300 rounded-r-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
<span class="sr-only">Next</span>
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/>
</svg>
</a>
</li>
</ul>
</nav> | fb566c898f0535cf3da7bfba5adf6c4a | {
"intermediate": 0.3172060549259186,
"beginner": 0.4992697536945343,
"expert": 0.1835242211818695
} |
21,335 | id yourself | ed703b98ee54a709388ec39c1c49cf3a | {
"intermediate": 0.3771987557411194,
"beginner": 0.30433228611946106,
"expert": 0.31846895813941956
} |
21,336 | Incorporate the following in the script:
- fastest possible libraries for the task at hand
- whatever else to make it better
from minio import Minio
client = Minio(
"s3-api.laokyc.gov.la",
access_key = "Laokyc_admin",
secret_key = "L@0kyc@2021"
)
for bucket in client.list_buckets():
for item in client.list_objects(bucket.name, recursive=True):
client.fget_object(bucket.name, item.object_name, "./" + bucket.name + "/" + item.object_name) | 32dd24c39d8a034842f9c3ee766ea203 | {
"intermediate": 0.6641466021537781,
"beginner": 0.1809813231229782,
"expert": 0.1548720896244049
} |
21,337 | how to place string variable value instead of rgngodot:// in c++
https://development-oauth.ready.gg/?url_redirect=rgngodot://%2F&returnSecureToken=true&appId=io.getready.rgngodot&lang=ru | ff540389bc979a2be3a12d6bc42da735 | {
"intermediate": 0.42626872658729553,
"beginner": 0.45143401622772217,
"expert": 0.1222972720861435
} |
21,338 | when i click the next, prev or the pages its not going anywhere
<nav aria-label="Page navigation example">
<ul class="flex justify-center items-center -space-x-px h-10 text-base">
<li>
<a
(click)="goToPreviousPage()"
class="flex items-center justify-center px-4 h-10 ml-0 leading-tight text-gray-500 bg-white border border-gray-300 rounded-l-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
>
<span class="sr-only">Previous</span>
<svg
class="w-3 h-3"
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 6 10"
>
<path
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M5 1 1 5l4 4"
/>
</svg>
</a>
</li>
<li>
<a
(click)="goToPage(1)"
class="flex items-center justify-center px-4 h-10 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
>1</a
>
</li>
<li>
<a
(click)="goToPage(2)"
class="flex items-center justify-center px-4 h-10 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
>2</a
>
</li>
<li>
<a
(click)="goToPage(3)"
aria-current="page"
class="z-10 flex items-center justify-center px-4 h-10 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white"
>3</a
>
</li>
<li>
<a
(click)="goToPage(4)"
class="flex items-center justify-center px-4 h-10 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
>4</a
>
</li>
<li>
<a
(click)="goToPage(5)"
class="flex items-center justify-center px-4 h-10 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
>5</a
>
</li>
<li>
<a
href="#"
(click)="goToNextPage()"
class="flex items-center justify-center px-4 h-10 leading-tight text-gray-500 bg-white border border-gray-300 rounded-r-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
>
<span class="sr-only">Next</span>
<svg
class="w-3 h-3"
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 6 10"
>
<path
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="m1 9 4-4-4-4"
/>
</svg>
</a>
</li>
</ul>
</nav>
calculateTotalPages() {
this.totalPages = Math.ceil(this.filteredCountries.length / 10);
}
getCountriesForCurrentPage() {
const startIndex = (this.currentPage - 1) * 10;
const endIndex = startIndex + 10;
return this.filteredCountries.slice(startIndex, endIndex);
}
goToPreviousPage() {
if (this.currentPage > 1) {
this.currentPage--;
}
}
goToNextPage() {
if (this.currentPage < this.totalPages) {
this.currentPage++;
}
}
goToPage(pageNumber: number) {
if (pageNumber >= 1 && pageNumber <= this.totalPages) {
this.currentPage = pageNumber;
}
} | e7caca7871e791bbc07c9566f20d7485 | {
"intermediate": 0.32085829973220825,
"beginner": 0.5357293486595154,
"expert": 0.14341236650943756
} |
21,339 | 1. First, determine the number of items you want to display per page. Let’s say you want to display 10 items per page.
2. In your component, create variables to store the current page number and the total number of pages. For example:
currentPage: number = 1;
totalPages: number = 0;
3. In your component, create a function to calculate the total number of pages based on the number of items and the page size. For example:
calculateTotalPages() {
this.totalPages = Math.ceil(this.filteredCountries.length / 10);
}
4. Call this function whenever the filteredCountries array changes.
5. In your template, update the ngFor loop to only display items for the current page. Modify the ngFor loop like this:
*ngFor=“let country of getCountriesForCurrentPage(); let counter = index; let isOdd = odd”
6. In your component, create a function to get the countries for the current page based on the currentPage variable and the page size. For example:
getCountriesForCurrentPage() {
const startIndex = (this.currentPage - 1) * 10;
const endIndex = startIndex + 10;
return this.filteredCountries.slice(startIndex, endIndex);
}
7. Call this function from the ngFor loop in the template.
8. Update the pagination links in your template to include the necessary logic for changing the current page. You can bind click handlers to functions that update the currentPage variable. For example:
<a href=“#” (click)=“goToPreviousPage()”>Previous</a>
<a href=“#” (click)=“goToPage(1)”>1</a>
<a href=“#” (click)=“goToPage(2)”>2</a>
<!-- and so on -->
<a href=“#” (click)=“goToNextPage()”>Next</a>
9. In your component, implement the functions to change the current page. These functions should update the currentPage variable and call the getCountriesForCurrentPage() function. For example:
goToPreviousPage() {
if (this.currentPage > 1) {
this.currentPage–;
}
}
goToNextPage() {
if (this.currentPage < this.totalPages) {
this.currentPage++;
}
}
goToPage(pageNumber: number) {
if (pageNumber >= 1 && pageNumber <= this.totalPages) {
this.currentPage = pageNumber;
}
}
in this instruction i didnt do the number 4 thats why the pagination is not working | 53336ca08581946367541ea739888d97 | {
"intermediate": 0.35214972496032715,
"beginner": 0.4042263329029083,
"expert": 0.24362394213676453
} |
21,340 | express this in javascript in shortest way possible: (x-1)^3+(x-1)^2+x | dfaf29d13c69eee3b2caccb493287e19 | {
"intermediate": 0.3261842429637909,
"beginner": 0.36323419213294983,
"expert": 0.31058165431022644
} |
21,341 | how to avoid error “initial value of reference to non-const must be an lvalue” without make it static
void RGNCore::signIn() {
std::string redirectUrl = _applicationId + “://”;
std::string url = “https://development-oauth.ready.gg/?url_redirect=” + redirectUrl + “%2F&returnSecureToken=true&appId=” + _applicationId;
OSAdapter::OpenURL(url.c_str());
DeepLinkAdapter::AddListener(&onDeepLink);
}
void RGNCore::onDeepLink(std::string payload) {
} | f98c5974bbe55d2891abea2c90fcdb3d | {
"intermediate": 0.4338286519050598,
"beginner": 0.38797783851623535,
"expert": 0.17819355428218842
} |
21,342 | I need a simple either python or bash script to encode text into a image with fsb stenography. I don't need a decoder. | 4dfd68996611110da45006c72ca26eda | {
"intermediate": 0.4696095287799835,
"beginner": 0.2465617060661316,
"expert": 0.2838287949562073
} |
21,343 | Please implement RemoveListener method
class DeepLinkAdapter {
private:
static std::vector<std::function<void(std::string)>> _listeners;
public:
static void Initialize();
static void Start();
static void Stop();
static void AddListener(std::function<void(std::string)>& listener);
static void RemoveListener(std::function<void(std::string)>& listener);
}; | a28ca0cd5307b18290578d40252327f4 | {
"intermediate": 0.33245834708213806,
"beginner": 0.4374591112136841,
"expert": 0.23008258640766144
} |
21,344 | implement observer pattern in c++ 14 | 35f7ce9e098386698e31e283f7ba4209 | {
"intermediate": 0.3776731789112091,
"beginner": 0.23902346193790436,
"expert": 0.38330334424972534
} |
21,345 | can you implement events as in c# in c++ 14 | 2ffe3606576fb648f743b4170731ad27 | {
"intermediate": 0.6845946311950684,
"beginner": 0.13226225972175598,
"expert": 0.1831430345773697
} |
21,346 | can you implement events as in c# in c++ 14 with supporting one, two and three arguments | 7d82baa62a21dc426da8838a3e94b17b | {
"intermediate": 0.6509473323822021,
"beginner": 0.17215123772621155,
"expert": 0.1769014298915863
} |
21,347 | now i want the selected or active page is highlighted with color blue
<li *ngFor="let page of pages">
<a
(click)="goToPage(page)"
[class.active]="currentPage === page"
class="flex items-center justify-center px-4 h-10 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
>
{{ page }}
</a>
</li> | 3a96285ba27bf5836e920a9e1cd2c840 | {
"intermediate": 0.29826411604881287,
"beginner": 0.327106237411499,
"expert": 0.3746296763420105
} |
21,348 | i want to add this class if currentPage === page
class="z-10 flex items-center justify-center px-4 h-10 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white"
<li *ngFor="let page of pages">
<a
(click)="goToPage(page)"
class="flex items-center justify-center px-4 h-10 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
>
{{ page }}
</a>
</li>
<li> | 6ed463b7d00057e1bdb5fc703ac0a989 | {
"intermediate": 0.3067840039730072,
"beginner": 0.4612587094306946,
"expert": 0.23195728659629822
} |
21,349 | compute all selected population and area
anySelected(country: any): boolean {
if (!country.selected) {
country.code = this.originalValues.code;
country.name = this.originalValues.name;
country.description = this.originalValues.description;
country.population = this.originalValues.population;
country.area = this.originalValues.area;
} else {
this.originalValues = {
code: country.code,
name: country.name,
description: country.description,
population: country.population,
area: country.area
};
}
this.allSelected = this.countries.every((country) => country.selected);
this.someSelected = this.countries.some((country) => country.selected);
this.selectAll = this.allSelected ? true : (this.someSelected ? null : false);
return this.someSelected;
} | 88f1b9f5119e27e542a9fa88a4c35ec3 | {
"intermediate": 0.3146577775478363,
"beginner": 0.31144922971725464,
"expert": 0.37389299273490906
} |
21,350 | fix this
this.allSelected = this.countries.every((country) => country.selected);
this.selectedPopulation = selectedItems.reduce((total, country) => total + parseInt(country.population), 0);
this.selectedArea = selectedItems.reduce((total, country) => total + parseInt(country.area), 0);
console.log(this.selectedPopulation); | 78a2fb37ecbea10e0f1a309ea1f0258d | {
"intermediate": 0.3373938798904419,
"beginner": 0.36035075783729553,
"expert": 0.30225539207458496
} |
21,351 | from openpyxl import Workbook
from openpyxl.styles import Alignment
from openpyxl.utils import get_column_letter
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)
if col in ['ExtEnodeB VlanRef', 'EranLink', 'EUtranCells', 'Eran EUtranCells']:
cell.alignment = Alignment(wrap_text=True)
row += 1
# Autofit columns except for specific columns
for column_cells in sheet.columns:
column_letter = get_column_letter(column_cells[0].column)
# Exclude the specific columns by checking the column letter
if column_letter == 'Q':
sheet.column_dimensions[column_letter].width = 15
elif column_letter == 'R':
sheet.column_dimensions[column_letter].width = 17
elif column_letter == 'H':
sheet.column_dimensions[column_letter].width = 31
elif column_letter == 'I':
sheet.column_dimensions[column_letter].width = 21
else:
max_length = 0
adjusted_width = 0
for cell in column_cells:
if cell.coordinate in sheet.merged_cells:
continue
if cell.value:
max_length = max(max_length, len(str(cell.value)))
adjusted_width = (max_length + 1)
sheet.column_dimensions[column_letter].width = adjusted_width
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) | abbc58c9ce1d7f3dc64e0c2859316aaa | {
"intermediate": 0.33888304233551025,
"beginner": 0.4843354821205139,
"expert": 0.17678140103816986
} |
21,352 | seascape by Ray Collins and artgerm, front view of a perfect wave, sunny background, ultra detailed water, 4k resolution | d4716dfa65ea4903af2301dab2340fc7 | {
"intermediate": 0.38067853450775146,
"beginner": 0.2646141052246094,
"expert": 0.3547073304653168
} |
21,353 | montre moi les tests unitaires de cette fonction " function validFirstLetter() public {
require(state == State.wordGenerated, "no word");
bytes memory wordBytes = bytes(word);
require(wordBytes.length > 0, "word is empty");
bytes1 firstLetterBytes = wordBytes[0];
firstLetter = string(abi.encodePacked(firstLetterBytes));
state = State.firstLetter;
emit FirstLetter(gameId, firstLetter);
}" en prenant en compte "const Penduel = artifacts.require("Penduel");
const { BN, expectRevert, expectEvent } = require('@openzeppelin/test-helpers');
const { expect } = require('chai');
const Web3 = require('web3');
contract("Penduel", accounts => {
let penduelInstance;
const subId = 12226;
const player1 = accounts[0];
const player2 = accounts[1];
const s_owner = accounts[2];
const web3 = new Web3("http://localhost:7545");" " context ("FONCTION POUR VALIDER LA 1ERE LETTRE DU MOT A DEVINER - fonction validFirstLetter", () => {
beforeEach(async function() {
penduelInstance = await Penduel.new(subId);
});
describe ("vérifie la fonction validFirstletter", () => {" | 5fd5f5282cca236ff2122ad122f15ceb | {
"intermediate": 0.470790833234787,
"beginner": 0.3585141599178314,
"expert": 0.17069502174854279
} |
21,354 | i dont want a duplicate number here
what should i use
selectedPages: number[] = []; | 23d1d086a00d1b5c629885ef5cf6c176 | {
"intermediate": 0.3531630039215088,
"beginner": 0.35240423679351807,
"expert": 0.29443275928497314
} |
21,355 | Помоги получить все элементы typedef struct mutex_node { struct mutex_node *next; OsTaskHandle htask; OsMutex mtx; unsigned long caller; volatile OS_TICKTYPE start_time; volatile uint32_t ref_cnt; } mutex_node_t; Компилятор C99 | 17f3f9376a48b74df6c2754e8926d711 | {
"intermediate": 0.4616152346134186,
"beginner": 0.2515844702720642,
"expert": 0.2868002653121948
} |
21,356 | Write jquery code to take values of inputs and save to variables.
<div class="form_control_container">
<input class="form_control_container__time__input" type="number" id="fromInput" value="0" min="0" max="{{ highestProductPrice }}"/>
</div>
<div class="form_control_container">
<input class="form_control_container__time__input" type="number" id="toInput" value="{{ highestProductPrice }}" min="0" max="{{ highestProductPrice }}"/>
</div> | 7f1a0cf62e8a9ed2c48407989abfcdc4 | {
"intermediate": 0.3344126343727112,
"beginner": 0.5117651224136353,
"expert": 0.1538221687078476
} |
21,357 | в этом методе обрабатывается карта отправителя pan, мне нужно сюда добавить еще карту получателя pan2, она есть в сущности BusinessOperation, которую принимает этот метод, в pan2 при сохранении нужно изменить cardType на "RECIPIENT"
public void updateTurnover(BusinessOperation operation) {
String panHashCode = md5Hex(operation.getPan());
LOGGER.info("[updateTurnover] panHashCode = {}", panHashCode);
Date truncatedProcessingTime = startDay(operation.getProcessingTime());
List<BusinessOperationTurnover> turnoverList = repository.getAllByPanHashAndProcessingDate(panHashCode, truncatedProcessingTime);
if (turnoverList.size() == 0) {
LOGGER.info("[updateTurnover] Turnover NOT found");
BusinessOperationTurnover turnover = new BusinessOperationTurnover();
turnover.setPanHash(panHashCode);
turnover.setProcessingDate(truncatedProcessingTime);
turnover.setSumAmount(operation.getAmount());
turnover.setCardType("SENDER");
repository.save(turnover);
} else {
BusinessOperationTurnover turnover = turnoverList.get(0);
LOGGER.info("[updateTurnover] Turnover found: {}", new Gson().toJson(turnover));
turnover.setSumAmount(turnover.getSumAmount().add(operation.getAmount()));
repository.save(turnover);
}
} | 72d51610619af9cf126ed0feabf39f96 | {
"intermediate": 0.3570229709148407,
"beginner": 0.35318270325660706,
"expert": 0.28979426622390747
} |
21,358 | give example table footer anguar | f270b9fad5066b34ea59c302c3252f40 | {
"intermediate": 0.3397679328918457,
"beginner": 0.4345584213733673,
"expert": 0.2256736308336258
} |
21,359 | Fix code to set default font size = 10 : from openpyxl import Workbook
from openpyxl.styles import Alignment, Font, PatternFill
from openpyxl.utils import get_column_letter
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)
if col in ['ExtEnodeB VlanRef', 'EranLink', 'EUtranCells', 'Eran EUtranCells']:
cell.alignment = Alignment(wrap_text=True)
row += 1
# Autofit columns except for specific columns
green = "0000FF00"
yellow = "00FFFF00"
green_fill = PatternFill(start_color=green, end_color=green, fill_type="solid")
yellow_fill = PatternFill(start_color=yellow, end_color=yellow, fill_type="solid")
font = Font(size=10)
for column_cells in sheet.columns:
column_cells.font = font
column_letter = get_column_letter(column_cells[0].column)
# Exclude the specific columns by checking the column letter
if column_letter == 'Q':
for cell in column_cells:
cell.font = Font(size=8)
sheet.column_dimensions[column_letter].width = 12
elif column_letter == 'R':
for cell in column_cells:
cell.font = Font(size=8)
if '401' in cell.value:
cell.fill = yellow_fill
sheet.column_dimensions[column_letter].width = 14
elif column_letter == 'H':
sheet.column_dimensions[column_letter].width = 31
elif column_letter == 'I':
sheet.column_dimensions[column_letter].width = 21
for cell in column_cells:
if 'ENABLED' in cell.value and 'DISABLED' not in cell.value:
cell.fill = green_fill
else:
max_length = 0
adjusted_width = 0
for cell in column_cells:
if cell.coordinate in sheet.merged_cells:
continue
if cell.value:
max_length = max(max_length, len(str(cell.value)))
adjusted_width = (max_length + 1)
sheet.column_dimensions[column_letter].width = adjusted_width
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) | 5f92b3289c56c4b82b0e0a55b514936a | {
"intermediate": 0.458356648683548,
"beginner": 0.383517861366272,
"expert": 0.15812551975250244
} |
21,360 | update AuthorityApprove result only true if exist
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 = string.IsNullOrEmpty(mts.Approver) ? "On Progression" : "Approved",
ApproverList = string.Join(", ", _dbContext.AuthorityLocations
.Where(la => la.LocationId == mts.RouteDetailNavigation.RouteLocation)
.Select(la => la.User.Username)),
PendingApprove = mts.TrackingId == lastApproverIsNull ? "OK" : null
,
AuthorityApprove = _dbContext.AuthorityLocations
.Where(la => la.LocationId == mts.RouteDetailNavigation.RouteLocation &&
la.User.Username == username &&
la.Authority.AuthorityName == "Approver")
.Select(la => la.User.Username)
.FirstOrDefault()
})
.ToListAsync(); | d26b09026b16ed793fc39080894d1844 | {
"intermediate": 0.38553231954574585,
"beginner": 0.315076619386673,
"expert": 0.2993910312652588
} |
21,361 | I am working on a python script to automate downloading images from various web sources, be it direct html parsing, or via REST or other APIs using JSON, I already had some functioning code, but I am starting again, this is the new script with what I have right now, with a comment describing my intent: | 9bcf2689fae622279369c0f95d0a7fa8 | {
"intermediate": 0.6573115587234497,
"beginner": 0.17162351310253143,
"expert": 0.1710648536682129
} |
21,362 | Explain code rperc = df['perc'][::-1].reset_index(drop=True) | 293505ee2d14f0fc23f7f9178f68dd4a | {
"intermediate": 0.38171279430389404,
"beginner": 0.27107951045036316,
"expert": 0.3472077548503876
} |
21,363 | var routeNames = await _dbContext.RouteSummaries
.Select(r =>
new {
r.RouteId,
routeName = r.RouteName,
sourceLocation = r.SourceLocationNavigation.LocationName,
destinationLocation = r.DestinationLocationNavigation.LocationName})
.Distinct()
.ToListAsync();
how I select where location sequence is 1 and first sequence of location in list of anme from another table | e0ac3c56965c6a79a486ff163461790f | {
"intermediate": 0.4246591031551361,
"beginner": 0.2964010536670685,
"expert": 0.278939813375473
} |
21,364 | query method to find by embedded id object property spring boot | abfaaa5deb931ab7be354ef7702d4fb3 | {
"intermediate": 0.5813494920730591,
"beginner": 0.19096612930297852,
"expert": 0.2276844084262848
} |
21,365 | write php / symfony code to integrate Aplazame payment system | 8b01c90f2e64a959ff6286ddd4dbd58b | {
"intermediate": 0.6914950609207153,
"beginner": 0.14854978024959564,
"expert": 0.15995511412620544
} |
21,366 | how to count results from query builder in doctrine query language | 22bfce342a6d90a44771f7a057943fc4 | {
"intermediate": 0.4610493779182434,
"beginner": 0.25902315974235535,
"expert": 0.27992746233940125
} |
21,367 | Hello, I'm a beginner in MQL. Can you explain this query?
fetch cloud_run_job
| metric 'logging.googleapis.com/user/QUALIF/JOBS'
| filter (resource.job_name =~ 'qualif.*') && (metric.loglevel =~ '.*')
| group_by 1m, [value_JOBS_aggregate: aggregate(value.JOBS)]
| every 1m
| group_by [metric.jobname, metric.loglevel],
[value_JOBS_aggregate_aggregate: aggregate(value_JOBS_aggregate)] | 9899c38b42417c3e3a7482eaf94b869a | {
"intermediate": 0.5550057291984558,
"beginner": 0.2681345045566559,
"expert": 0.17685970664024353
} |
21,368 | the default value is 640x480? got two constants for width and height aspect-ratio dimension that should be divisible by 8 in values added or substracted independent in which inputfield you change value " const xxx = parseInt(document.getElementById('xxx').value); const yyy = parseInt(document.getElementById('yyy').value);" for " <input type="number" id="xxx" value="640" min="16" max="1280" style='width: 64px;height: 16px; background-color:#010130;
color:#aabbee;
border-top:1px solid #454590;
border-radius:6px;margin:10px;'>" and "<input type="number" id="xxx" value="640" min="16" max="1280" style='width: 64px;height: 16px; background-color:#010130;
color:#aabbee;
border-top:1px solid #454590;
border-radius:6px;margin:10px;'> " accordingly. need to make value change calculation to be divisible by 8 strictly. so, if I change numerical value in some of input fields "xxx" or "yyy" this function will adjust proper values on-the-fly appropriately and change shift actual in input field numerical value to the nearest dividable by8. is it possible?: const inputWidth = document.querySelector('#xxx'); const inputHeight = document.querySelector('#yyy');
function validateInput(inputField) { let currentValue = inputField.value;
while (currentValue % 8 == 0) { if (currentValue % 8 === -1) { currentValue--; } else { currentValue++; } }
inputField.value = currentValue; }
inputWidth.addEventListener('change', validateInput); inputHeight.addEventListener('change', validateInput); | 798bb4b63ebb7d0bf4383ad206313fea | {
"intermediate": 0.49740150570869446,
"beginner": 0.34620314836502075,
"expert": 0.15639539062976837
} |
21,369 | hi | e2e163bcfec0c1e6fa32cef6d68d4e1c | {
"intermediate": 0.3246487081050873,
"beginner": 0.27135494351387024,
"expert": 0.40399640798568726
} |
21,370 | TypeError: inputWidth.addEventListener is not a function : const inputWidth = document.querySelectorAll('xxx');
const inputHeight = document.querySelectorAll('yyy');
if (inputWidth && inputHeight) {
function validateInput(inputField) {
let currentValue = parseInt(inputField.value);
const nearestDivisibleByEight = Math.round(currentValue / 8) * 8;
inputField.value = nearestDivisibleByEight;
}
inputWidth.addEventListener('input', function() {
validateInput(inputWidth);
});
inputHeight.addEventListener('input', function() {
validateInput(inputHeight);
});
} | b91a86fc2851e3dbdd155f2af371cfa5 | {
"intermediate": 0.3982256352901459,
"beginner": 0.35433313250541687,
"expert": 0.24744118750095367
} |
21,371 | using effecto react library write a sample method. Clock should be resetDashboardRights. I would need to use store1 as a source and would also need to use imported store2. In Fn I should take elements from store2 and add them to store1 | 9e021fb6396fe8f47440c69575852317 | {
"intermediate": 0.720901370048523,
"beginner": 0.15761028230190277,
"expert": 0.12148835510015488
} |
21,372 | Use more command to display /var/log/secure*in centos 7 | fe9813dc0d43aab60d5f8bc1a6ea86cf | {
"intermediate": 0.37563005089759827,
"beginner": 0.25398343801498413,
"expert": 0.3703864514827728
} |
21,373 | Use su to switch to another user account (unless you are root, you will need the password of the other account), and get back to the previous account. | 36cec96ef2aac35038b615a58e213f2d | {
"intermediate": 0.3390304744243622,
"beginner": 0.22047573328018188,
"expert": 0.44049379229545593
} |
21,374 | implement source code for this header class
class DeepLinkAdapter {
private:
static std::vector<std::function<void(std::string)>> _listeners;
public:
static void Initialize();
static void Start();
static void Stop();
static void addListener(std::function<void(std::string)> listener);
static void removeListener(std::function<void(std::string)> listener);
}; | 4262a41979879ebb281fcb3ac067123d | {
"intermediate": 0.25623393058776855,
"beginner": 0.544942319393158,
"expert": 0.19882377982139587
} |
21,375 | python pillow webp to gif without losing quality | b5f66dba910c7297440ef5e6455ac7cf | {
"intermediate": 0.381028413772583,
"beginner": 0.2721599042415619,
"expert": 0.3468117415904999
} |
21,376 | how to remove std::function from std::vector | 9f1f977a239a47e3af031bd4769c28cd | {
"intermediate": 0.36926770210266113,
"beginner": 0.43482252955436707,
"expert": 0.1959097534418106
} |
21,377 | I have 3 blocks in React which contain radio buttons at the top.
Each block cointans several checkboxes.
I need to write a logic that disable all of the checkboxes inside of the block if that block's radiobutton is not selected. | c819742c81f73ea39f2e675520e57963 | {
"intermediate": 0.4341607689857483,
"beginner": 0.2124895453453064,
"expert": 0.3533497154712677
} |
21,378 | Why does IntelliJ take long to start up? What's the biggest reason? Be concise. | ef5414fc164cfd558dedb6bf32e15db9 | {
"intermediate": 0.4307261109352112,
"beginner": 0.14284564554691315,
"expert": 0.4264282286167145
} |
21,379 | How install nodejs via yarn? | 87f708a264bad1f79b96ddb7da123af7 | {
"intermediate": 0.5773202776908875,
"beginner": 0.21264143288135529,
"expert": 0.21003830432891846
} |
21,380 | how to get several .csv file in utf-8 coding transfirm into one file with arrow format? | a572993381b1140be3cf4cc780218850 | {
"intermediate": 0.37787219882011414,
"beginner": 0.23740042746067047,
"expert": 0.3847273588180542
} |
21,381 | Hello | dcc12bd976a870a4617578ae679d48af | {
"intermediate": 0.3123404085636139,
"beginner": 0.2729349136352539,
"expert": 0.4147246778011322
} |
21,382 | Power BI Matrix Table: Have column with values True and False. I need to show Tick mark for True and Blank for False | 288d2f900e1f76f1138324114c4497e4 | {
"intermediate": 0.2835852801799774,
"beginner": 0.25783345103263855,
"expert": 0.45858126878738403
} |
21,383 | Power BI Custom column with IF statement syntax | 94e6ecbb9f6e019433cb9deb1d8da8f5 | {
"intermediate": 0.26893332600593567,
"beginner": 0.34059637784957886,
"expert": 0.39047035574913025
} |
21,384 | Нужно отправить этот запрос с помощью javascript POST /my-account/change-email HTTP/2
Host: 0aa3004703be2cb380a604c8002d0003.web-security-academy.net
Cookie: session=Qoh6EzFeQ0d2ZIqiOg4ajqg8yS5f5WaY
Cache-Control: max-age=0
Sec-Ch-Ua:
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: ""
Upgrade-Insecure-Requests: 1
Origin: https://0aa3004703be2cb380a604c8002d0003.web-security-academy.net
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.97 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Referer: https://0aa3004703be2cb380a604c8002d0003.web-security-academy.net/my-account?id=wiener
Accept-Encoding: gzip, deflate
Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7
Content-Type: application/x-www-form-urlencoded
Content-Length: 22
email=d2323f%40asd.com | b9b10677b4899fbcbfc73328b12685a7 | {
"intermediate": 0.3826115131378174,
"beginner": 0.2812232971191406,
"expert": 0.33616510033607483
} |
21,385 | how to implement scheme where class A have method to add and remove listeners in c++
when some internal state reached the class can raise the event and all listeners received callback | 94bdabb0ada3891d3fd5f9a28dcf19d3 | {
"intermediate": 0.5307393074035645,
"beginner": 0.22683730721473694,
"expert": 0.2424234002828598
} |
21,386 | develop a code for the below : a customers comes and stands infront of the camera and choose the celebrity picture and the camera take live shot of customer and place the celebrity next to them | c10e12a5ce6d884843b69d977bf95b7d | {
"intermediate": 0.3246384859085083,
"beginner": 0.10125944763422012,
"expert": 0.574101984500885
} |
21,387 | в чем проблема?
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "i_business_operation_turnover_pan_hash_processing_day"
Подробности: Key (pan_hash, processing_day)=(41141d471d7776b679e87ce0de535607, 2023-10-05 00:00:00) already exists.
at org.postgresql@42.2.4//org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at org.postgresql@42.2.4//org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at org.postgresql@42.2.4//org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql@42.2.4//org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql@42.2.4//org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at org.postgresql@42.2.4//org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:150)
at org.postgresql@42.2.4//org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:127)
at <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>//org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:537)
at <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>//org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175) | 3b0a6face98e7004651f81a34e0e9abb | {
"intermediate": 0.4216034710407257,
"beginner": 0.39927786588668823,
"expert": 0.17911866307258606
} |
21,388 | how to make unreal engine 5 works with JNI | d9d6f63739e19b85ac8ac87ccd3180ed | {
"intermediate": 0.34468239545822144,
"beginner": 0.10707280784845352,
"expert": 0.5482448935508728
} |
21,389 | a) Write a function called isEven that takes an integer n as an arugment and returns True if n is even, and False otherwise. | 489ae0edfb8c313dbf757d63dcc6deb9 | {
"intermediate": 0.3078329563140869,
"beginner": 0.3758150637149811,
"expert": 0.316351979970932
} |
21,390 | in GML(gamemaker studdio 2). create a form for user registering. with four fields. username, password, retype passoword, email. | 4d324fefb402f4444722e49c4577fdd7 | {
"intermediate": 0.3150928020477295,
"beginner": 0.24700798094272614,
"expert": 0.43789923191070557
} |
21,391 | hi | 39837d101220b90739d79c9861de08cf | {
"intermediate": 0.3246487081050873,
"beginner": 0.27135494351387024,
"expert": 0.40399640798568726
} |
21,392 | in GML. a login form with four fields. username, password, retype password, email. | ff9b8d54bcd53f9f3d9dab0c4489df0c | {
"intermediate": 0.3187437355518341,
"beginner": 0.2732442617416382,
"expert": 0.4080119729042053
} |
21,393 | On github actions, how can I create a '.yml' file in which we build docker image from dockerfile? | d509269b534c69f420347ee863cac3ca | {
"intermediate": 0.5082142949104309,
"beginner": 0.25745078921318054,
"expert": 0.23433485627174377
} |
21,394 | provide me a link to sample code where the stat() output is used as input for utimes() | 1e98ec61154812b27c0eaed40921b990 | {
"intermediate": 0.4379839301109314,
"beginner": 0.2152666598558426,
"expert": 0.3467493951320648
} |
21,395 | write a code in c++ which get URL argument as string and should return dictionary where key is URL parameter name and value is URL parameter value | c7bcf0da79ecd28e31c8c83c0dfdfab1 | {
"intermediate": 0.45181548595428467,
"beginner": 0.1832887828350067,
"expert": 0.364895761013031
} |
21,396 | how to do inheriting in c++ with split in header and source and with using constructor | ae26bbb47ac6c7203b4e10f30a57501e | {
"intermediate": 0.41644084453582764,
"beginner": 0.3621366322040558,
"expert": 0.22142256796360016
} |
21,397 | in GML(GameMaker studio 2). a login form with four fields. username, password, retype password, email. | 5f4f3c0fb352e7cd390a317a56212ef0 | {
"intermediate": 0.31525662541389465,
"beginner": 0.32011860609054565,
"expert": 0.3646247684955597
} |
21,398 | Parollarni topuvchi dastur tuzilsin | 7c7012a7e22cc93be3813fb16c8d507c | {
"intermediate": 0.30641669034957886,
"beginner": 0.25024276971817017,
"expert": 0.44334056973457336
} |
21,399 | I used window.print() to print the content in modal, i want to print without the page behind the modal | 23eafd7716372b0d5e6a04ede6a425e0 | {
"intermediate": 0.3698430061340332,
"beginner": 0.19554771482944489,
"expert": 0.43460920453071594
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.