row_id
int64
0
48.4k
init_message
stringlengths
1
342k
conversation_hash
stringlengths
32
32
scores
dict
16,073
i got a postgresql database with table that includes two columns with latitude and longitude with format like "47.123412". I need to find rows where the distance between some point and latitude and longitude i got is less than 5km. Write an sql code
d48e161d06cb0a5541dad570e586a1a6
{ "intermediate": 0.48606985807418823, "beginner": 0.23492562770843506, "expert": 0.2790044844150543 }
16,074
I need ubuntu equalizer available from synaptic for ubuntu 18.04 or above\
ada1262dd948cc5e5407a0e0a6fbc53a
{ "intermediate": 0.3239637017250061, "beginner": 0.2090446949005127, "expert": 0.4669915735721588 }
16,075
I need ubuntu equalizer available from synaptic for ubuntu 18.04 or above\
97059df0017f58beac972f7932d7598c
{ "intermediate": 0.3239637017250061, "beginner": 0.2090446949005127, "expert": 0.4669915735721588 }
16,076
import time import json from selenium import webdriver from selenium.webdriver.chrome.service import Service executable_path = 'C:\ChromeDriver\chromedriver.exe' def create_chrome_driver(executable_path): # Создание экземпляра Chrome DevTools Service c_service.Service(executable_path) options = webdriver.ChromeOptions() options.add_argument('--ignore-certificate-errors') options.add_argument('--ignore-ssl-errors') options.add_argument('--disable-gpu') # Подключение к Chrome DevTools Protocol capabilities = options.to_capabilities() capabilities['loggingPrefs'] = {'performance': 'ALL'} capabilities['goog:loggingPrefs'] = {'performance': 'ALL'} capabilities['goog:chromeOptions'] = {'w3c': False} driver = webdriver.Chrome(service=Service(executable_path=executable_path), options=options, desired_capabilities=capabilities) return driver def save_page_html(driver, url, file_name): driver.get(url) time.sleep(10) # Дайте странице время для загрузки и рендеринга # Извлечение актуального HTML-кода с помощью Chrome DevTools Protocol performance_log = driver.get_log('performance') events = [json.loads(entry['message'])['message'] for entry in performance_log] html = '' for event in events: if 'method' in event and event['method'] == 'Network.responseReceived': response = event['params']['response'] if response['mimeType'] == 'text/html': response_url = response['url'] if response_url == url: request_id = event['params']['requestId'] html_response = driver.execute_cdp_cmd('Network.getResponseBody', {'requestId': request_id}) html = html_response['body'] break driver.quit() with open(file_name, 'w', encoding="utf-8") as file: file.write(html) start = time.time() driver = create_chrome_driver(executable_path) save_page_html(driver, 'https://www.playscores.com/scanner-futebol-online/ao-vivo', 'rendered_page.html') end = time.time() - start print(end)
44cc45c74a6d51bb9478a7cf67f82b3a
{ "intermediate": 0.32941725850105286, "beginner": 0.4379464387893677, "expert": 0.23263631761074066 }
16,077
<template> {{filteredData}} <hr> {{columnsWithFilter}} <q-table :data="filteredData" :columns="columnsWithFilter" :filter="filter" :filter-method="filterMethod" :sort-method="sortMethod" @request="requestData" row-key="id" > </q-table> </template> <script setup> import {ref, reactive, defineProps, defineEmits, watch, onMounted} from 'vue'; const props = defineProps({ data: { type: Array, default: () => [] }, columns: { type: Array, default: () => [] } }); const filteredData = ref(props.data); const filter = ref(""); const sort = reactive({ column: "", direction: "" }); // 遍历所有列,并在每一列上添加onFilter和sort属性 const columnsWithFilter = props.columns.map((column) => { console.log(column) return Object.assign({}, column, { sort: column.field === sort.column ? sort.direction : false, filter: true }); }); // 筛选数据的方法 const filterMethod = (row, column, filter) => { const val = row[column.field]; return val.toLowerCase().indexOf(filter.toLowerCase()) !== -1; }; // 排序数据的方法 const sortMethod = (rows, column, direction) => { const field = column.field; const sign = direction === "desc" ? -1 : 1; rows.sort((a, b) => (a[field] > b[field] ? sign : -sign)); }; // 请求数据,触发filter和sort事件 const { emit } = defineEmits(["paginate"]); const requestData = (params) => { // if (params.pagination) { // emit("paginate", { // page: params.pagination.currentPage, // perPage: params.pagination.rowsPerPage // }); // } // if (params.filter) { // filter.value = params.filter; // } // if (params.sort) { // sort.column = params.sort.field; // sort.direction = params.sort.order; // } }; // 监听数据变化,更新filteredData // const { watch } = useVue(); watch(props.data, (newData) => { filteredData.value = newData; }); onMounted( requestData({ pagination: null, filter: null, sort: null }) ) console.log("column",props.columns) console.log("columnsWithFilter",columnsWithFilter) console.log('filteredData',filteredData.value) </script> 现在filteredData,columnsWithFilter都是有数据的,怎么展示不了啊,显示无数据
d09d33313999a69b4f4d01720faa090a
{ "intermediate": 0.3064134120941162, "beginner": 0.46877703070640564, "expert": 0.22480949759483337 }
16,078
mport time import json from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.chrome.options import Options executable_path = 'C:\ChromeDriver\chromedriver.exe' def create_chrome_driver(executable_path): service = Service(executable_path) options = Options() # Установка требуемых опций браузера options.add_argument('--start-maximized') # Пример опции driver = webdriver.Chrome(service=service, options=options) return driver #executable_path = '/путь/к/драйверу/chromedriver.exe' def save_page_html(driver, url, file_name): driver.get(url) time.sleep(10) # Дайте странице время для загрузки и рендеринга # Извлечение актуального HTML-кода с помощью Chrome DevTools Protocol performance_log = driver.get_log('performance') events = [json.loads(entry['message'])['message'] for entry in performance_log] html = '' for event in events: if 'method' in event and event['method'] == 'Network.responseReceived': response = event['params']['response'] if response['mimeType'] == 'text/html': response_url = response['url'] if response_url == url: request_id = event['params']['requestId'] html_response = driver.execute_cdp_cmd('Network.getResponseBody', {'requestId': request_id}) html = html_response['body'] break driver.quit() with open(file_name, 'w', encoding="utf-8") as file: file.write(html) start = time.time() driver = create_chrome_driver(executable_path) save_page_html(driver, 'https://www.playscores.com/scanner-futebol-online/ao-vivo', 'rendered_page.html') end = time.time() - start print(end) Этот код выдает ошибку Message: invalid argument: log type 'performance' not found (Session info: chrome=115.0.5790.102) Stacktrace: Backtrace: GetHandleVerifier [0x00007FF6DABA3E62+57250] (No symbol) [0x00007FF6DAB1BC02] (No symbol) [0x00007FF6DA9EE0BB] (No symbol) [0x00007FF6DAA5414C] (No symbol) [0x00007FF6DAA46770] (No symbol) [0x00007FF6DAA1CC71] (No symbol) [0x00007FF6DAA1DE54] GetHandleVerifier [0x00007FF6DAE54CF2+2879026] GetHandleVerifier [0x00007FF6DAEA6F30+3215472] GetHandleVerifier [0x00007FF6DAE9FD4F+3186319] GetHandleVerifier [0x00007FF6DAC35505+652869] (No symbol) [0x00007FF6DAB27518] (No symbol) [0x00007FF6DAB235F4] (No symbol) [0x00007FF6DAB236EC] (No symbol) [0x00007FF6DAB138E3] BaseThreadInitThunk [0x00007FFF7FAB7614+20] RtlUserThreadStart [0x00007FFF810826F1+33] File "C:\Users\MP\Documents\MP_sandbox\WZPV4", line 29, in save_page_html performance_log = driver.get_log('performance') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\MP\Documents\MP_sandbox\WZPV4", line 52, in <module> save_page_html(driver, 'https://www.playscores.com/scanner-futebol-online/ao-vivo', 'rendered_page.html') selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: log type 'performance' not found (Session info: chrome=115.0.5790.102) Stacktrace: Backtrace: GetHandleVerifier [0x00007FF6DABA3E62+57250] (No symbol) [0x00007FF6DAB1BC02] (No symbol) [0x00007FF6DA9EE0BB] (No symbol) [0x00007FF6DAA5414C] (No symbol) [0x00007FF6DAA46770] (No symbol) [0x00007FF6DAA1CC71] (No symbol) [0x00007FF6DAA1DE54] GetHandleVerifier [0x00007FF6DAE54CF2+2879026] GetHandleVerifier [0x00007FF6DAEA6F30+3215472] GetHandleVerifier [0x00007FF6DAE9FD4F+3186319] GetHandleVerifier [0x00007FF6DAC35505+652869] (No symbol) [0x00007FF6DAB27518] (No symbol) [0x00007FF6DAB235F4] (No symbol) [0x00007FF6DAB236EC] (No symbol) [0x00007FF6DAB138E3] BaseThreadInitThunk [0x00007FFF7FAB7614+20] RtlUserThreadStart [0x00007FFF810826F1+33]
54d213b4c19fdb7cb1222544fb708adc
{ "intermediate": 0.36216437816619873, "beginner": 0.4611244201660156, "expert": 0.17671117186546326 }
16,079
In my excel sheet, column 7 is Column 'G' I have a BeforeDoubleClick trigger on Column 7. I also have a Worksheet_Change trigger on Column G which is also colum 7. When I doubleclick a cell in Column 7, how can I stop the Worksheet_change event from being triggered on Column 'G'. I have included the BeforeDoubleClick and Worksheet_Change events below Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Application.EnableEvents = False Dim doubleClickedCell As Range Set doubleClickedCell = Target.Cells(1) If Target.CountLarge > 1 Then Exit Sub If Target.Column = 3 Then TaskReminder Target ElseIf Target.Column = 7 Then ServiceReminder Target ElseIf Target.Column = 9 Then Thankyou Target previousValue = doubleClickedCell.Value doubleClickFlag = True End If If Target.CountLarge > 1 Then Exit Sub If Not Intersect(Target, Range("B2")) Is Nothing Then Call DisplayServices End If Application.EnableEvents = True End Sub Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range Dim cell As Range Set rng = Intersect(Target, Range("I:I")) If Not rng Is Nothing Then For Each cell In rng If IsDate(cell.Value) Then If cell.Offset(0, -7).Value = "Service" Then MsgBox "Thank you for entering Service Date Completed. Please proceed to enter Service Schedule as number of days." Exit Sub Else If Not doubleClickFlag Then MsgBox "Please change the Issue description ( column B ) as required." End If doubleClickFlag = False Exit Sub End If End If Next cell End If Set rng = Intersect(Target, Range("G:G")) If Not rng Is Nothing Then For Each cell In rng If IsNumeric(cell.Value) Then If IsDate(cell.Offset(0, 2).Value) = False Then MsgBox "Date Service Completed not present" Exit Sub ElseIf cell.Offset(0, -5).Value <> "Service" Then Exit Sub Else MsgBox "A New Service row will now be created" cell.Offset(0, -5).Value = "Serviced" cell.Offset(0, 1).Value = "" Dim newRow As Long newRow = Cells(Rows.count, "B").End(xlUp).Row + 1 Range("B" & newRow).Value = "Service" Range("C" & newRow).Value = cell.Offset(0, 2).Value Range("F" & newRow).Value = cell.Offset(0, -1).Value Range("J" & newRow).Value = cell.Offset(0, 3).Value Range("L" & newRow).Value = cell.Offset(0, 5).Value Range("H" & newRow).Value = cell.Offset(0, 2).Value + cell.Value Exit Sub End If End If Next cell End If If Target.Column = 5 Then ColumnList Target End If If Target.CountLarge > 1 Then Exit Sub If Not Intersect(Target, Range("I:I")) Is Nothing Then If IsDate(Target.Value) Then If Range("B" & Target.Row).Value <> "Request" Then Exit Sub Else MsgBox "Please change 'Request' to the relevant Task Issue" Range("B" & Target.Row).Select Exit Sub End If End If End If End Sub
7384a1168501ac40ed104245b1089a62
{ "intermediate": 0.4133143723011017, "beginner": 0.3654986023902893, "expert": 0.22118699550628662 }
16,080
write code in asp .net web forms properly use apereo DotNetCasClient
f5a08fd6257d4c228fb48a3fff31bff0
{ "intermediate": 0.44930732250213623, "beginner": 0.3020331561565399, "expert": 0.24865950644016266 }
16,081
Hello
07258bcc480c9c482a3c9a035bc7cade
{ "intermediate": 0.3123404085636139, "beginner": 0.2729349136352539, "expert": 0.4147246778011322 }
16,082
write code in asp .net web forms properly use apereo DotNetCasClient
85e669ca24c3a1d739753a0754c5ede1
{ "intermediate": 0.44930732250213623, "beginner": 0.3020331561565399, "expert": 0.24865950644016266 }
16,083
I would like to double click on any cell in the range D5 to D500 and when I do so I want the value in Column L of the same row to be displayed in a Pop Up message.
b059ce614ea3336f2732f5dbefb7bf5d
{ "intermediate": 0.4281044900417328, "beginner": 0.21363797783851624, "expert": 0.3582574725151062 }
16,084
can you make a text helper in python
1da15899c7db243247172b28bf50d4e9
{ "intermediate": 0.4995713233947754, "beginner": 0.23450416326522827, "expert": 0.2659244239330292 }
16,085
Translate the text delimited by triple backticks into Vietnamese
37ad7d59f0f92c172771b64446ab2687
{ "intermediate": 0.3492391109466553, "beginner": 0.2639906704425812, "expert": 0.38677018880844116 }
16,086
C# code for rigid body physics 3d
4ba4c707b8733d6e69574afc8398f7f8
{ "intermediate": 0.40831923484802246, "beginner": 0.3446463644504547, "expert": 0.24703438580036163 }
16,087
resolve Apereo Cas Serve We have detected an existing single sign-on session for you. However, you are being asked to re-authenticate again as CAS cannot successfully accept your previous single sign-on participation status which may be related to the policy assigned to xxx. Please enter your Username and Password and proceed.
640bf69d18db811e9080f924cc354684
{ "intermediate": 0.3228239119052887, "beginner": 0.2883038818836212, "expert": 0.3888721764087677 }
16,088
Find and fix an error in following lua programming language code that implements and tests unicode-compatible analog of standart library string.sub() function that causes it to crash on line 24 with an error "attempt to perform arithmetic on a nil value" [Code starts under this sentence and the next line is considered line number 1]
2fe18f355525275672956737b3098371
{ "intermediate": 0.4633890688419342, "beginner": 0.2740424573421478, "expert": 0.26256847381591797 }
16,089
Show me how to make an app in codea that allows the user to access their photo library and display one of their photos
d528ae1475317525c898c434bac96158
{ "intermediate": 0.5492835640907288, "beginner": 0.13172104954719543, "expert": 0.3189953863620758 }
16,090
In the code below, there is a condition for Range("I:I") at the begining of the event and also at the bottom of the code. How can I combine the two conditons to make the code more efficient, Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range Dim cell As Range Set rng = Intersect(Target, Range("I:I")) If Not rng Is Nothing Then For Each cell In rng If IsDate(cell.Value) Then If cell.Offset(0, -7).Value = "Service" Then MsgBox "Thank you for entering Service Date Completed. Please proceed to enter Service Schedule as number of days." Exit Sub Else If Not doubleClickFlag Then MsgBox "Please change the Issue description ( column B ) as required." End If doubleClickFlag = False Exit Sub End If End If Next cell End If Set rng = Intersect(Target, Range("G:G")) If Not rng Is Nothing Then For Each cell In rng If cell.Value = "" Then Exit Sub ElseIf IsNumeric(cell.Value) Then If IsDate(cell.Offset(0, 2).Value) = False Then If Not doubleClickFlag Then MsgBox "Date Service Completed not present" End If doubleClickFlag = False Exit Sub ElseIf cell.Offset(0, -5).Value <> "Service" Then Exit Sub Else MsgBox "A New Service row will now be created" cell.Offset(0, -5).Value = "Serviced" cell.Offset(0, 1).Value = "" Dim newRow As Long newRow = Cells(Rows.Count, "B").End(xlUp).Row + 1 Range("B" & newRow).Value = "Service" Range("C" & newRow).Value = cell.Offset(0, 2).Value Range("F" & newRow).Value = cell.Offset(0, -1).Value Range("J" & newRow).Value = cell.Offset(0, 3).Value Range("L" & newRow).Value = cell.Offset(0, 5).Value Range("H" & newRow).Value = cell.Offset(0, 2).Value + cell.Value Exit Sub End If End If Next cell End If If Target.Column = 5 Then ColumnList Target End If If Target.CountLarge > 1 Then Exit Sub If Not Intersect(Target, Range("I:I")) Is Nothing Then If IsDate(Target.Value) Then If Range("B" & Target.Row).Value <> "Request" Then Exit Sub Else Range("B" & Target.Row).Select MsgBox "Please change 'Request' to the relevant Task Issue" Exit Sub End If End If End If End Sub
7f916864c1c4c8ec4e68534acb0f139b
{ "intermediate": 0.32238224148750305, "beginner": 0.44080179929733276, "expert": 0.23681598901748657 }
16,091
how apereo cas server accept local url
4788d82763f256492e6ba3dff6bd761d
{ "intermediate": 0.4029986560344696, "beginner": 0.23920783400535583, "expert": 0.35779353976249695 }
16,092
Can you show me how to make an app in codea that allows the user to open their photo library and import an image, then allows the user to create a customizable mesh that can deform the image
b314aea50198a4e26297ad515e9011d1
{ "intermediate": 0.6291136741638184, "beginner": 0.08767944574356079, "expert": 0.28320688009262085 }
16,093
please write me some javascript code, that goes through each element on the page and replaces the text of the element.
f59b22ecb61b2a9ca330e0c7aa20938f
{ "intermediate": 0.4152444303035736, "beginner": 0.21114711463451385, "expert": 0.37360846996307373 }
16,094
Mongoose.prototype.connect() no longer accepts a callback
e1bd7838d1b45c425e563eaa7e51bee4
{ "intermediate": 0.45246386528015137, "beginner": 0.2951595187187195, "expert": 0.25237658619880676 }
16,095
please write a javascript function that takes a string, then searches the string for time in am/pm format and replaces that time with the string returned by the function "convertTime12to24".
ff8d5b01003c66f69453529f5264ead0
{ "intermediate": 0.4460597634315491, "beginner": 0.24320784211158752, "expert": 0.310732364654541 }
16,096
I've an asp.net core with reactjs project, this is a code to get images from ClientApp/src/components/imgs "const images = require.context('./imgs', false); const imageList = images.keys().map(image => ({ src: images(image), alt: image.replace('./', '').replace(/\.[^/.]+$/, ''), }));" that works in development mode. In build mode the bundeled react code is inside wwwroot and the images are outside of that folder in that path: gold/src/components/imgs, adjust the code to be suitable for images in that path in production mode
fb3bb58a97c6ddd673893b6c4e747217
{ "intermediate": 0.5422573089599609, "beginner": 0.244672030210495, "expert": 0.21307073533535004 }
16,097
For the code below, instead of using 'For Each cell In rngG, I want the code to focus only on the "Target Cell" and the Target Row Set rngG = Intersect(Target, Range("G6:G500")) If Not rngG Is Nothing Then For Each cell In rngG If cell.Value = "" Then 'End If Exit Sub 'ElseIf IsNumeric(cell.Value) Then If IsNumeric(cell.Value) Then If IsDate(cell.Offset(0, 2).Value) = False Then MsgBox "Date Service Completed not present" End If End If Exit Sub 'ElseIf cell.Offset(0, -5).Value <> "Service" Then If IsNumeric(cell.Value) Then If cell.Offset(0, -5).Value <> "Service" Then MsgBox "Service Schedule Days must ONLY be entered for Services" End If Exit Sub 'Else If IsNumeric(cell.Value) Then If IsDate(cell.Offset(0, 2).Value) <> False And cell.Offset(0, -5).Value = "Service" Then MsgBox "A New Service row will now be created" cell.Offset(0, -5).Value = "Serviced" cell.Offset(0, 1).Value = "" Dim newRow As Long newRow = Cells(Rows.Count, "B").End(xlUp).Row + 1 Range("B" & newRow).Value = "Service" Range("C" & newRow).Value = cell.Offset(0, 2).Value Range("F" & newRow).Value = cell.Offset(0, -1).Value Range("J" & newRow).Value = cell.Offset(0, 3).Value Range("L" & newRow).Value = cell.Offset(0, 5).Value Range("H" & newRow).Value = cell.Offset(0, 2).Value + cell.Value Exit Sub End If End If Next cell End If Exit Sub
664947ba5747222d142d04f51b229649
{ "intermediate": 0.2406970113515854, "beginner": 0.5273232460021973, "expert": 0.23197968304157257 }
16,098
How do I make a circle in CSS that sits on top of other elements and applies a gray scale filter to all of the elements intersecting its area?
a5431c0f016a12af74f21205470ce82e
{ "intermediate": 0.42248138785362244, "beginner": 0.3479531705379486, "expert": 0.22956550121307373 }
16,099
In the woorksheet code below, the following block of code is not being triggered when I enter a value in any cell in column 'G'. Set rngG = Intersect(Target, Range("G5:G500")) If Not rngG Is Nothing Then If rngG.Value = "" Then Exit Sub 'ElseIf IsNumeric(rngG.Value) Then ElseIf rngG.Value <> "" Then If IsDate(rngG.Offset(0, 2).Value) = False Then MsgBox "Date Service Completed not present" End If Exit Sub 'ElseIf IsNumeric(rngG.Value) Then ElseIf rngG.Value <> "" Then If rngG.Offset(0, -5).Value <> "Service" Then MsgBox "Service Schedule Days must ONLY be entered for Services" End If Exit Sub 'ElseIf IsNumeric(rngG.Value) Then ElseIf rngG.Value <> "" Then If IsDate(rngG.Offset(0, 2).Value) <> False And rngG.Offset(0, -5).Value = "Service" Then MsgBox "A New Service row will now be created" rngG.Offset(0, -5).Value = "Serviced" rngG.Offset(0, 1).Value = "" Dim newRow As Long newRow = Cells(Rows.Count, "B").End(xlUp).Row + 1 Range("B" & newRow).Value = "Service" Range("C" & newRow).Value = rngG.Offset(0, 2).Value Range("F" & newRow).Value = rngG.Offset(0, -1).Value Range("J" & newRow).Value = rngG.Offset(0, 3).Value Range("L" & newRow).Value = rngG.Offset(0, 5).Value Range("H" & newRow).Value = rngG.Offset(0, 2).Value + rngG.Value Exit Sub End If End If End If Exit Sub Can you please check the entire worksheet code below to determine what may be causing this. Option Explicit Dim previousValue As Variant Dim doubleClickFlag As Boolean Private Sub Worksheet_Activate() Call Module11.EnableManualMainEvents Application.Wait (Now + TimeValue("0:00:01")) Dim lastRow As Long Dim cellAbove As Range lastRow = Cells(Rows.Count, "J").End(xlUp).Row If lastRow > 1 Then Set cellAbove = Cells(lastRow - 1, "K") cellAbove.Copy Range("K" & lastRow).PasteSpecial xlPasteValues Range("A" & lastRow).Select End If Application.CutCopyMode = False Call Module21.FindEarliestServiceDate Range("J1").Calculate Range("B1").Calculate Range("E1:H1").Calculate Range("E2:I2").Calculate ColumnList Me.Range("B1") Call Module20.RowRequest Application.Wait (Now + TimeValue("0:00:01")) Call Module23.SortTasksByDate End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = "$C$2" Then Dim response As Integer response = MsgBox("This process will copy all existing completed Tasks to the next Uncompleted Task" & vbCrLf & _ "and paste the copy into workbook ‘Service Providers History'." & vbCrLf & _ "After the paste, all copied Tasks will be deleted." & vbCrLf & vbCrLf & _ "Please choose an option:" & vbCrLf & vbCrLf & _ "Yes - SAVE COMPLETED TASKS TO HISTORY" & vbCrLf & vbCrLf & _ "No - OPEN HISTORY AND VIEW SAVED TASKS" & vbCrLf & vbCrLf & _ "Cancel - CANCEL TO DO NOTHING", vbQuestion + vbYesNoCancel, "Confirmation") If response = vbYes Then Call Module22.ServiceProvidersHistory ElseIf response = vbNo Then Dim sourceWB As Workbook Dim sourceWS As Worksheet Dim historyWB As Workbook Dim historyWS As Worksheet Set sourceWB = ActiveWorkbook Set sourceWS = sourceWB.ActiveSheet Set historyWB = Workbooks.Open("G:\Shared drives\Swan School Site Premises\PREMISES MANAGEMENT\SERVICE PROVIDERS\Service Providers History.xlsx") historyWB.Activate Set historyWS = historyWB.Sheets(sourceWS.Name) If historyWS Is Nothing Then sourceWS.Copy After:=historyWB.Sheets(historyWB.Sheets.Count) Set historyWS = historyWB.ActiveSheet historyWS.Name = sourceWS.Name End If historyWB.Sheets(sourceWS.Name).Select ElseIf response = vbCancel Then Exit Sub End If End If If Target.Address = "$B$4" Then Call Module26.TaskIssues End If If Target.Address = "$F$4" Then Call Module27.TaskLocations End If If Target.Address = "$G$4" Then Call DisplaySSDays End If End Sub Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = True Dim rngI As Range Dim rngG As Range Dim cell As Range Set rngI = Intersect(Target, Range("I5:I500")) If Not rngI Is Nothing Then If IsDate(rngI.Value) Then If rngI.Offset(0, -7).Value = "Service" Then MsgBox "Thank you for entering Service Date Completed. Please proceed to enter Service Schedule as number of days." rngI.Offset(0, -2).Select Exit Sub Else If rngI.Offset(0, -7).Value <> "Service" Then If Not doubleClickFlag Then MsgBox "Please proceed to change the Issue description (column B) as required." rngI.Offset(0, -7).Select End If End If End If End If End If doubleClickFlag = False Exit Sub doubleClickFlag = False Set rngG = Intersect(Target, Range("G5:G500")) If Not rngG Is Nothing Then If rngG.Value = "" Then Exit Sub 'ElseIf IsNumeric(rngG.Value) Then ElseIf rngG.Value <> "" Then If IsDate(rngG.Offset(0, 2).Value) = False Then MsgBox "Date Service Completed not present" End If Exit Sub 'ElseIf IsNumeric(rngG.Value) Then ElseIf rngG.Value <> "" Then If rngG.Offset(0, -5).Value <> "Service" Then MsgBox "Service Schedule Days must ONLY be entered for Services" End If Exit Sub 'ElseIf IsNumeric(rngG.Value) Then ElseIf rngG.Value <> "" Then If IsDate(rngG.Offset(0, 2).Value) <> False And rngG.Offset(0, -5).Value = "Service" Then MsgBox "A New Service row will now be created" rngG.Offset(0, -5).Value = "Serviced" rngG.Offset(0, 1).Value = "" Dim newRow As Long newRow = Cells(Rows.Count, "B").End(xlUp).Row + 1 Range("B" & newRow).Value = "Service" Range("C" & newRow).Value = rngG.Offset(0, 2).Value Range("F" & newRow).Value = rngG.Offset(0, -1).Value Range("J" & newRow).Value = rngG.Offset(0, 3).Value Range("L" & newRow).Value = rngG.Offset(0, 5).Value Range("H" & newRow).Value = rngG.Offset(0, 2).Value + rngG.Value Exit Sub End If End If End If Exit Sub If Target.Column = 5 Then doubleClickFlag = False ColumnList Target End If End Sub Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) 'Application.EnableEvents = False Dim doubleClickedCell As Range Set doubleClickedCell = Target.Cells(1) If Target.CountLarge > 1 Then Exit Sub If Target.Column = 3 Then TaskReminder Target previousValue = doubleClickedCell.Value doubleClickFlag = True 'for column C ElseIf Target.Column = 4 Then TaskDetails Target previousValue = doubleClickedCell.Value doubleClickFlag = True ' for column D ElseIf Target.Column = 7 Then ServiceReminder Target previousValue = doubleClickedCell.Value doubleClickFlag = True ' for column G ElseIf Target.Column = 9 Then Thankyou Target previousValue = doubleClickedCell.Value doubleClickFlag = True ' for column I End If If Target.CountLarge > 1 Then Exit Sub If Not Intersect(Target, Range("B2")) Is Nothing Then Call DisplayServices previousValue = doubleClickedCell.Value doubleClickFlag = True End If 'Application.EnableEvents = True End Sub Private Sub TaskDetails(ByVal Target As Range) Dim rng As Range, cl As Range 'Set the range to D5:D500 Set rng = Me.Range("D5:D500") If Not Intersect(Target, rng) Is Nothing Then 'Get the value in Column L of the same row as the double-clicked cell Set cl = Me.Cells(Target.Row, "L") 'Display the value in a pop-up message MsgBox "" & cl.Value, vbInformation, "TASK DETAILS" End If End Sub Private Sub TaskReminder(ByVal Target As Range) If Not IsEmpty(Target.Offset(0, 6).Value) Then MsgBox "Task Date shows as Completed" Else Call OpenTaskReminder End If End Sub Private Sub ServiceReminder(ByVal Target As Range) If Not IsDate(Target.Offset(0, 1).Value) Then MsgBox "Service Due Date needs to be present" Else Call OpenServiceReminder End If End Sub Private Sub Thankyou(ByVal Target As Range) If Not IsDate(Target.Value) Then MsgBox "Task Completed Date needs to be present" Else Dim doubleClickedCell As Range Set doubleClickedCell = Target.Cells(1) Call OpenThankYou previousValue = doubleClickedCell.Value doubleClickFlag = True ' for column I End If End Sub Sub ColumnList(Target As Range) If Not Module9.sheetJobRequestActive Then Exit Sub Dim rowValues As Range Dim lastRow As Long lastRow = Cells(Rows.Count, "B").End(xlUp).Row Set rowValues = Range("B" & lastRow & ":L" & lastRow) Dim mValues As Variant mValues = Application.Transpose(Range("B" & lastRow & ":L" & lastRow)) Dim i As Long For i = 1 To UBound(mValues, 1) Range("M" & i).Value = mValues(i, 1) Next i Range("B" & Cells(Rows.Count, "B").End(xlUp).Row).Select Call Module14.TaskRequest End Sub Sub OpenTaskReminder() Dim wdApp As Object Dim wdDoc As Object Dim WsdShell As Object Set wdApp = CreateObject("Word.Application") Set wdDoc = wdApp.Documents.Open("G:\Shared drives\Swan School Site Premises\PREMISES MANAGEMENT\SERVICE PROVIDERS\zzzz ServProvDocs\TaskReminder.docm") wdApp.Visible = True wdDoc.Activate Set WsdShell = CreateObject("WScript.Shell") WsdShell.AppActivate wdApp.Caption End Sub Sub OpenServiceReminder() Dim wdApp As Object Dim wdDoc As Object Dim WsdShell As Object Set wdApp = CreateObject("Word.Application") Set wdDoc = wdApp.Documents.Open("G:\Shared drives\Swan School Site Premises\PREMISES MANAGEMENT\SERVICE PROVIDERS\zzzz ServProvDocs\ServiceReminder.docm") wdApp.Visible = True wdDoc.Activate Set WsdShell = CreateObject("WScript.Shell") WsdShell.AppActivate wdApp.Caption End Sub Sub OpenThankYou() Dim wdApp As Object Dim wdDoc As Object Dim WsdShell As Object Set wdApp = CreateObject("Word.Application") Set wdDoc = wdApp.Documents.Open("G:\Shared drives\Swan School Site Premises\PREMISES MANAGEMENT\SERVICE PROVIDERS\zzzz ServProvDocs\ThankYouTask.docm") wdApp.Visible = True wdDoc.Activate Set WsdShell = CreateObject("WScript.Shell") WsdShell.AppActivate wdApp.Caption End Sub Sub DisplayServices() Application.EnableEvents = False Dim cellValue1 As String Dim cellValue2 As String Dim cellValue3 As String Dim cellValue4 As String Dim cellValue5 As String Dim cellValue6 As String Dim cellValue7 As String Dim cellValue8 As String Dim cellValue9 As String Dim cellValue10 As String Dim cellValue11 As String Dim cellValue12 As String Dim cellValue13 As String Dim cellValue14 As String Dim cellValue15 As String cellValue1 = Range("N1").Value cellValue2 = Range("N2").Value cellValue3 = Range("N3").Value cellValue4 = Range("N4").Value cellValue5 = Range("N5").Value cellValue6 = Range("N6").Value cellValue7 = Range("N7").Value cellValue8 = Range("N8").Value cellValue9 = Range("N9").Value cellValue10 = Range("N10").Value cellValue11 = Range("N11").Value cellValue12 = Range("N12").Value cellValue13 = Range("N13").Value cellValue14 = Range("N14").Value cellValue15 = Range("N15").Value MsgBox "" & cellValue1 & vbCrLf & _ "" & cellValue2 & vbCrLf & _ "" & cellValue3 & vbCrLf & _ "" & cellValue4 & vbCrLf & _ "" & cellValue5 & vbCrLf & _ "" & cellValue6 & vbCrLf & _ "" & cellValue7 & vbCrLf & _ "" & cellValue8 & vbCrLf & _ "" & cellValue9 & vbCrLf & _ "" & cellValue10 & vbCrLf & _ "" & cellValue11 & vbCrLf & _ "" & cellValue12 & vbCrLf & _ "" & cellValue13 & vbCrLf & _ "" & cellValue14 & vbCrLf & _ "" & cellValue15, vbInformation, "CONTRACTOR SERVICES" Application.EnableEvents = True End Sub Sub DisplaySSDays() Application.EnableEvents = False Dim cellValue1 As String Dim cellValue2 As String Dim cellValue3 As String Dim cellValue4 As String Dim cellValue5 As String Dim cellValue6 As String cellValue1 = Range("N16").Value cellValue2 = Range("N17").Value cellValue3 = Range("N18").Value cellValue4 = Range("N19").Value cellValue5 = Range("N20").Value cellValue6 = Range("N21").Value MsgBox "" & cellValue1 & vbCrLf & _ "" & cellValue2 & vbCrLf & _ "" & cellValue3 & vbCrLf & _ "" & cellValue4 & vbCrLf & _ "" & cellValue5 & vbCrLf & _ "" & cellValue6, vbInformation, "SERVICE SCHEDULE DAYS" Application.EnableEvents = True End Sub Private Sub Worksheet_Deactivate() Module9.sheetJobRequestActive = False Call Module12.MainEventsEnabled Dim objWord As Object On Error Resume Next Set objWord = GetObject(, "Word.Application") If Err.Number <> 0 Then Exit Sub End If If objWord.ActiveDocument.Name = "TaskRequest.docm" Or objWord.ActiveDocument.Name = "AdminRequest.docm" Then objWord.Quit SaveChanges:=wdDoNotSaveChanges Set objWord = Nothing End If End Sub
460b0c8847233d161b6113a59b424899
{ "intermediate": 0.3069613575935364, "beginner": 0.43914586305618286, "expert": 0.25389280915260315 }
16,100
Write dialogue from a scene from the animated teen series “Jane”, where 14 year old Jane finds out that the substitute teacher of her tomboy and girl scout group is her mean old babysitter, she used to babysit Jane when she was a teenager, what blows Jane’s mind is that she was also babysitter for some of the other girl scouts, including Jane’s girlfriend Sam, Jane finds this out when her old babysitter sees all the girl scouts she used to babysit and lists all of the girls she used to babysit all out, and what’s crazier is that she was kind to some of the girls she babysat (including Sam) and was mean to others (including Jane), Jane finds this out when her old babysitter sees all the girl scouts she used to babysit and lists all of the girls she used to babysit all out
6c9832e5d890372293eec106689d3e66
{ "intermediate": 0.3106365203857422, "beginner": 0.30124935507774353, "expert": 0.38811415433883667 }
16,101
I have some tplink firmware (bin) that i wanna attscky own program to, this is designed to run on linux and is written in golang, tplink fiware is closed source, can i somehow make my software run on startup?
72a63cab2d4c1e8af6fb0edbf6a98a5e
{ "intermediate": 0.4670681357383728, "beginner": 0.27231594920158386, "expert": 0.26061585545539856 }
16,102
do you understand the syntax used in stable diffusion
4fe68de0624d8329edb3d2d442f8a9eb
{ "intermediate": 0.2192283570766449, "beginner": 0.638800323009491, "expert": 0.14197130501270294 }
16,103
Write comment for "list_res": // Aspect version of built-in `brw<a>`, represents a non-null pointer. // Suitable for cases where you want to abstract a piece of code that // uses borrows. Keep in mind that this can be considered the "state" // effect. aspect ref<a> = * set(this: ref<a>, value: a): ref<a> * get(this: ref<a>): a; // Aspect version of built-in `ptr<a>`, represent a pointer. // Suitable for cases where you want to abstract a piece of code that // uses pointers and deallocation. It is not suitable for cases where // methods like `realloc` or `calloc` are present, however. aspect res<a> = * set(this: res<a>, value: a): res<a> * get(this: res<a>): option<a> * delete(this: res<a>): (); func list_res<a>(list: list<ref, a>, value: a): res<a> { try res catch res: res<a> { * set(value): resume => list_push(value); resume(res), * get: resume => resume(list_tail(list)), * delete: resume => let _ = list_pop(); resume(()), } }
8cb993f79a086a228281872d2b7a4810
{ "intermediate": 0.46890318393707275, "beginner": 0.3396832048892975, "expert": 0.19141355156898499 }
16,104
name all the bfdia characters
d12971ffe81c7bb5b325b1de371b992e
{ "intermediate": 0.4696578085422516, "beginner": 0.31646624207496643, "expert": 0.21387594938278198 }
16,105
how to make chatgpt in scratch
904e301afc8619a97cc2f639234bdc3f
{ "intermediate": 0.18406082689762115, "beginner": 0.32090455293655396, "expert": 0.49503466486930847 }
16,106
This part of my code is looping; MsgBox "A New Service row will now be created" newRow = Cells(Rows.Count, "B").End(xlUp).Row + 1 Range("B" & newRow).Value = "Service" How do I stop this loop. Private Sub Worksheet_Change(ByVal Target As Range) Dim rngG As Range Dim rngI As Range Set rngI = Intersect(Target, Range("I6:I500")) If Not rngI Is Nothing Then If IsDate(rngI.Value) Then If rngI.Offset(0, -7).Value = "Service" Then MsgBox "Thank you for entering Service Date Completed. Please proceed to enter Service Schedule as number of days." rngI.Offset(0, -2).Select Exit Sub Else If rngI.Offset(0, -7).Value <> "Service" Then 'If Not doubleClickFlag Then MsgBox "Please proceed to change the Issue description (column B) as required." rngI.Offset(0, -7).Select 'End If End If End If End If End If Dim rngD As Range Dim rngId As Range Dim rngB As Range Dim newRow As Long Set rngG = ActiveCell If Not IsNumeric(rngG.Value) Then MsgBox "Only numbers should be used to represent days before next service" Exit Sub End If Set rngId = rngG.Offset(0, 2) If Not rngId.Value = "" Then If Not IsDate(rngId.Value) Then MsgBox "Date Service Completed not present" Exit Sub End If End If Set rngB = rngG.Offset(0, -5) If Not rngB.Value = "" Then If rngB.Value <> "Service" Then MsgBox "Service Schedule Days must ONLY be entered for Services" Exit Sub End If End If MsgBox "A New Service row will now be created" newRow = Cells(Rows.Count, "B").End(xlUp).Row + 1 Range("B" & newRow).Value = "Service" Range("C" & newRow).Value = rngId.Value Range("F" & newRow).Value = rngG.Offset(0, -1).Value Range("H" & newRow).Value = rngId.Value + rngG.Value Range("J" & newRow).Value = rngG.Offset(0, 3).Value Range("K" & newRow).Value = rngG.Offset(0, 5).Value Range("L" & newRow).Value = rngG.Offset(0, 5).Value rngB.Value = "Serviced" rngG.Value = "" rngG.Offset(0, 1).Value = "" Exit Sub If Target.Column = 5 Then 'doubleClickFlag = False ColumnList Target End If End Sub
b8c1209591b72e677a5fd9bebc3b0f8c
{ "intermediate": 0.35333940386772156, "beginner": 0.4242233633995056, "expert": 0.22243720293045044 }
16,107
I dont see the appeal in browser emulation ddos attacks over just http grt wttacks,is it point to also reqyest qll the data on the page or to trick protection somehow?
8ddcfc179a9bb63f44c79cf6ed10b95f
{ "intermediate": 0.3365710973739624, "beginner": 0.33477887511253357, "expert": 0.32864999771118164 }
16,108
Can you write code for Codea that allows the user to access their photo library and display a picture
c31d5d4e08b3f8953197a120581e4237
{ "intermediate": 0.6139050722122192, "beginner": 0.0901719331741333, "expert": 0.29592305421829224 }
16,109
give me a HTML file template for my blof that is about alternative music and add a few images and youtube links
d6cf57f449a7b793f96559c7303fb0a6
{ "intermediate": 0.38251549005508423, "beginner": 0.324472576379776, "expert": 0.29301202297210693 }
16,110
give me a HTML file template for my blof that is about alternative music and add a few images and youtube links
28f246966428edfe0377d14ab72d9892
{ "intermediate": 0.38251549005508423, "beginner": 0.324472576379776, "expert": 0.29301202297210693 }
16,111
const Discord = require('discord.js'); const client = new Discord.Client(); const PREFIX = "!"; client.on('ready', () => { console.log('bot is ready'); }); client.on('message', message => { if (message.content.startsWith(`${PREFIX}gen`)) { const args = message.content.split(' '); const length = parseInt(args[1]) || 18; const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!"#$%&\'()*+,-./:;<=>?@[]^_`{|}~'; let password = ''; for (let i = 0; i < length; i++) { password += characters.charAt(Math.floor(Math.random() * characters.length)); } const embed = new Discord.MessageEmbed() .setTitle('Your Password generated') .setDescription(`||${password}||`) .setColor('#00FF00'); message.channel.send(embed); } }); client.login('MTEzMjU1MTg0MjQwMDgzMzYyNg.GoOLMo.VNlIf8cPz77QsqoS3OfVnsGErCVytoVReDuW-Q'); این کد کاری کن در جواب پسورد در پی وی ارسال کنه و !gen هر عدد نوشت به همون اندازه براش پسورد درست کنه و بفرسته فقط تا 30 رقم مجاز باشه
dd004ee6b75024ac8120e9f5dc50119f
{ "intermediate": 0.42337191104888916, "beginner": 0.31218838691711426, "expert": 0.26443973183631897 }
16,112
const Discord = require('discord.js'); const client = new Discord.Client(); const PREFIX = "!"; client.on('ready', () => { console.log('bot is ready'); }); client.on('message', message => { if (message.content.startsWith(`${PREFIX}gen`)) { const args = message.content.split(' '); const length = parseInt(args[1]) || 18; const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!"#$%&\'()*+,-./:;<=>?@[]^_`{|}~'; let password = ''; for (let i = 0; i < length; i++) { password += characters.charAt(Math.floor(Math.random() * characters.length)); } const embed = new Discord.MessageEmbed() .setTitle('Your Password generated') .setDescription(`||${password}||`) .setColor('#00FF00'); message.channel.send(embed); } }); client.login('MTEzMjU1MTg0MjQwMDgzMzYyNg.GoOLMo.VNlIf8cPz77QsqoS3OfVnsGErCVytoVReDuW-Q'); این کد کاری کن در جواب پسورد در پی وی ارسال کنه و !gen هر عدد نوشت به همون اندازه براش پسورد درست کنه و بفرسته فقط تا 30 رقم مجاز باشه
883b3a4a3de5af1128676e8aa7f1adce
{ "intermediate": 0.42337191104888916, "beginner": 0.31218838691711426, "expert": 0.26443973183631897 }
16,113
I want to get full screen short videos for free where should I search ?
905a83493e28110257ac4342513aacde
{ "intermediate": 0.3204413056373596, "beginner": 0.31337136030197144, "expert": 0.36618736386299133 }
16,114
In the block of code below, if I enter a value in G:G if the target cells offset(0, 2) = False, I then get a message "Date Service Completed not present". After acknowledging the message, I want the value of the Target cell to be restored to "". Can you show me how to adjust the code below to do this. Set rng = Intersect(Target, Range("G:G")) If Not rng Is Nothing Then For Each cell In rng If IsNumeric(cell.Value) Then If IsDate(cell.Offset(0, 2).Value) = False Then If Not doubleClickFlag Then MsgBox "Date Service Completed not present" doubleClickFlag = False End If Exit Sub ElseIf cell.Offset(0, -5).Value <> "Service" Then Exit Sub
65b85b356c42b96768b7810ec7e0e6ff
{ "intermediate": 0.45111939311027527, "beginner": 0.31702572107315063, "expert": 0.2318548560142517 }
16,115
i need help understanding how to interact with an api i am hosting, when i go to the url http://nas.local:44444/api/conversation?text=hello the api responds with "how can I help you" and will accept the value for the urls text parameter, Please create a webpage I can use to to chat with this api where conversation history remains
a4a92ae6c4c6bb9df5e8d7f9e9accc3e
{ "intermediate": 0.631409764289856, "beginner": 0.14919038116931915, "expert": 0.21939988434314728 }
16,116
website coding example
79053e012301024120c52756382af4c0
{ "intermediate": 0.16785535216331482, "beginner": 0.617026150226593, "expert": 0.21511846780776978 }
16,117
In the event below, If I enable the lines 'If Not doubleClickFlag Then ' and 'doubleClickFlag = False ' , then the following block of code does not run; ' If IsNumeric(innerCell.Value) Then If IsDate(innerCell.Offset(0, 2).Value) = False Then MsgBox "Date Service Completed not present" innerCell.Value = "" ' Reset the value to "" ' With the the following lines disabled 'If Not doubleClickFlag Then ' and 'doubleClickFlag = False ' , the following block code is looping continously; ' If IsNumeric(innerCell.Value) Then If IsDate(innerCell.Offset(0, 2).Value) = False Then MsgBox "Date Service Completed not present" innerCell.Value = "" ' Reset the value to "" ' Here is the complete event that contains the problems; Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range Dim cell As Range Dim innerCell As Range Set rng = Intersect(Target, Range("I:I")) If Not rng Is Nothing Then For Each cell In rng If IsDate(cell.Value) Then If cell.Offset(0, -7).Value = "Service" Then MsgBox "Thank you for entering Service Date Completed. Please proceed to enter Service Schedule as the number of days." Exit Sub Else If Not doubleClickFlag Then MsgBox "Please change the Issue description (column B) as required." doubleClickFlag = False End If Exit Sub End If End If Next cell End If Set rng = Intersect(Target, Range("G:G")) If Not rng Is Nothing Then For Each innerCell In rng 'If Not doubleClickFlag Then ' Check if message already displayed If IsNumeric(innerCell.Value) Then If IsDate(innerCell.Offset(0, 2).Value) = False Then MsgBox "Date Service Completed not present" innerCell.Value = "" ' Reset the value to "" Exit For ' Exit the loop 'doubleClickFlag = False ' Set flag to False ElseIf innerCell.Offset(0, -5).Value <> "Service" Then Exit For ' Exit the loop Else MsgBox "A New Service row will now be created" innerCell.Offset(0, -5).Value = "Serviced" innerCell.Offset(0, 1).Value = "" Dim newRow As Long newRow = Cells(Rows.Count, "B").End(xlUp).Row + 1 Range("B" & newRow).Value = "Service" Range("C" & newRow).Value = innerCell.Offset(0, 2).Value Range("F" & newRow).Value = innerCell.Offset(0, -1).Value Range("J" & newRow).Value = innerCell.Offset(0, 3).Value Range("L" & newRow).Value = innerCell.Offset(0, 5).Value Range("H" & newRow).Value = innerCell.Offset(0, 2).Value + innerCell.Value Exit For ' Exit the loop 'End If End If End If Next innerCell End If If Target.Column = 5 Then ColumnList Target End If If Target.CountLarge > 1 Then Exit Sub If Not Intersect(Target, Range("I:I")) Is Nothing Then If IsDate(Target.Value) Then If Range("B" & Target.Row).Value <> "Request" Then Exit Sub Else MsgBox "Please change 'Request' to the relevant Task Issue" Range("B" & Target.Row).Select Exit Sub End If End If End If End Sub
cd151cb27ee0158faea5f6eca7f1f6ec
{ "intermediate": 0.227422833442688, "beginner": 0.6659221649169922, "expert": 0.10665494948625565 }
16,118
write a trading view back testing code for me: from the stated date, use a fixed amount of money to buy the stock, sell 20% when the stock price drops 8% a day
611b45b5dd8459de486254983fd50d48
{ "intermediate": 0.3631594181060791, "beginner": 0.14632219076156616, "expert": 0.49051839113235474 }
16,119
In nodejs, write a very basic binary obfuscator for golang
2641924ae0397e8950fbe4892bf4f76e
{ "intermediate": 0.539728045463562, "beginner": 0.20747056603431702, "expert": 0.25280144810676575 }
16,120
You know in roblox place Flying things and people.
3a126ca35e4cb3bb5556aaa037601ee6
{ "intermediate": 0.4107638895511627, "beginner": 0.31764382123947144, "expert": 0.27159222960472107 }
16,121
I am getting a bBlock if without end if error in this code: Private Sub Worksheet_Change(ByVal Target As Range) Dim rngI As Range Dim rngG As Range Dim cell As Range Dim innercell As Range If Target.CountLarge > 1 Then Exit Sub If Not Intersect(Target, Range("I6:I506")) Is Nothing Then If IsDate(Target.Value) Then If Target.Offset(0, -5).Value = "Service" Then MsgBox "Thank you for entering Service Date Completed. Please proceed to enter Service Schedule as number of days." Range("G" & Target.Row).Select Exit Sub Else MsgBox "Please change the Issue description ( column B ) as required." Range("B" & Target.Row).Select Exit Sub End If End If End If Exit Sub If Not Intersect(Target, Range("G6:G506")) Is Nothing Then For Each Target In Range("G6:G506") If Target.Value = "" Then Exit For Else ' Check if the value in the cell two columns to the right of the current cell is empty Dim rightCell As Range Set rightCell = Target.Offset(0, 2) If rightCell.Value = "" Then ' Display a message box MsgBox "Date Service Completed not present" ' Set the value in the current cell to "" Target.Value = "" End If End If Next Target Exit Sub If Target.Offset(0, -5).Value <> "Service" Then MsgBox "Task is not a current Service" Target.Value = "" Exit Sub End If If Target.Offset(0, -5).Value = "Service" And Target.Offset(0, 2).Value <> "" Then MsgBox "A New Service row will now be created" Target.Offset(0, -5).Value = "Serviced" Target.Offset(0, 1).Value = "" Dim newRow As Long newRow = Cells(Rows.Count, "B").End(xlUp).Row + 1 Range("B" & newRow).Value = "Service" Range("C" & newRow).Value = Target.Offset(0, 2).Value 'column I dDate Completed Range("F" & newRow).Value = Target.Offset(0, -1).Value 'column F Location Range("J" & newRow).Value = Target.Offset(0, 3).Value 'column J Task Notes Range("L" & newRow).Value = Target.Offset(0, 5).Value 'column L Task details Range("H" & newRow).Value = Target.Offset(0, 2).Value + Target.Value 'column I + column G Exit Sub End If End Sub
0bfaefbb27e52d876c5b00ad7888dce7
{ "intermediate": 0.378856360912323, "beginner": 0.3726041316986084, "expert": 0.2485395222902298 }
16,122
import pdf2image import os images = pdf2image.convert_from_path(r"E:\临时文件夹\用20首儿歌拉动1000词.pdf") i =0 if not os.path.exists(r"C:\Users\admin\Desktop\1"): # 查看文件夹是否存在 os.mkdir(r"C:\Users\admin\Desktop\1") # 不存在就创建一个文件夹,此处文件名为image for image in images: i += 1 image.save("C:\Users\admin\Desktop\1\\" + str(i)+ ".jpg","JPEG") 提示错误 File "E:\拼多多项目\Python\PDF转图片\PDF.py", line 10 image.save("C:\Users\admin\Desktop\1\\" + str(i)+ ".jpg","JPEG") ^ SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
792fc6f5a6daf2e29e475208ce2a7a40
{ "intermediate": 0.2692604959011078, "beginner": 0.44313663244247437, "expert": 0.28760287165641785 }
16,123
I used your signal_generator code: def signal_generator(df): if df is None: return '' ema_analysis = [] candle_analysis = [] df['EMA5'] = df['Close'].ewm(span=5, adjust=False).mean() df['EMA20'] = df['Close'].ewm(span=20, adjust=False).mean() df['EMA100'] = df['Close'].ewm(span=100, adjust=False).mean() df['EMA200'] = df['Close'].ewm(span=200, adjust=False).mean() if ( df['EMA5'].iloc[-1] > df['EMA20'].iloc[-1] and df['EMA20'].iloc[-1] > df['EMA100'].iloc[-1] and df['EMA100'].iloc[-1] > df['EMA200'].iloc[-1] and df['EMA5'].iloc[-2] < df['EMA20'].iloc[-2] and df['EMA20'].iloc[-2] < df['EMA100'].iloc[-2] and df['EMA100'].iloc[-2] < df['EMA200'].iloc[-2] ): ema_analysis.append('golden_cross') elif ( df['EMA5'].iloc[-1] < df['EMA20'].iloc[-1] and df['EMA20'].iloc[-1] < df['EMA100'].iloc[-1] and df['EMA100'].iloc[-1] < df['EMA200'].iloc[-1] and df['EMA5'].iloc[-2] > df['EMA20'].iloc[-2] and df['EMA20'].iloc[-2] > df['EMA100'].iloc[-2] and df['EMA100'].iloc[-2] > df['EMA200'].iloc[-2] ): ema_analysis.append('death_cross') if ( df['Close'].iloc[-1] > df['Open'].iloc[-1] and df['Open'].iloc[-1] > df['Low'].iloc[-1] and df['High'].iloc[-1] > df['Close'].iloc[-1] ): candle_analysis.append('bullish_engulfing') elif ( df['Close'].iloc[-1] < df['Open'].iloc[-1] and df['Open'].iloc[-1] < df['High'].iloc[-1] and df['Low'].iloc[-1] > df['Close'].iloc[-1] ): candle_analysis.append('bearish_engulfing') bollinger_std = df['Close'].rolling(window=20).std() df['UpperBand'] = df['EMA20'] + (bollinger_std * 2) df['LowerBand'] = df['EMA20'] - (bollinger_std * 2) if ( df['Close'].iloc[-1] > df['UpperBand'].iloc[-1] and df['Close'].iloc[-2] < df['UpperBand'].iloc[-2] ): candle_analysis.append('upper_band_breakout') elif ( df['Close'].iloc[-1] < df['LowerBand'].iloc[-1] and df['Close'].iloc[-2] > df['LowerBand'].iloc[-2] ): candle_analysis.append('lower_band_breakout') if ('golden_cross' in ema_analysis and 'bullish_engulfing' in candle_analysis) or 'upper_band_breakout' in candle_analysis: return 'buy' elif ('death_cross' in ema_analysis and 'bearish_engulfing' in candle_analysis) or 'lower_band_breakout' in candle_analysis: return 'sell' else: return '' But it giveing me wrong signals , please remove EMA5, EMA100 and EMA200 and add EMA50
ee5d3df4bec3c49274526cee6386d036
{ "intermediate": 0.31162309646606445, "beginner": 0.39074695110321045, "expert": 0.2976299524307251 }
16,124
how to verify if a user is authenticated on Apereo CAS Server using DotNetCasClient in an ASP.NET web forms application
80292c2130edd970905cd4630854bd25
{ "intermediate": 0.4556359350681305, "beginner": 0.30625203251838684, "expert": 0.23811206221580505 }
16,125
cannot open shared object file: No such file or directory 如何解决该问题
c084c1a76c27d04816c44f9c278220d0
{ "intermediate": 0.250599205493927, "beginner": 0.4889957010746002, "expert": 0.2604050934314728 }
16,126
do you understand the sytax for the txt input on txt2img gen using gradio
c53b302a3299b21d79311bf9a3f67dcd
{ "intermediate": 0.38999488949775696, "beginner": 0.1241418644785881, "expert": 0.48586323857307434 }
16,127
in this code class Employee_Profile(MPTTModel): choice = [ ('نعم', 'نعم'), ('لا', 'لا'), ] user = models.ForeignKey(User, on_delete=models.CASCADE) action_creator =models.CharField(max_length=250, null=True, blank=True) rawaf_id = models.IntegerField(null=True, blank=True, unique=True) iqama_no = models.IntegerField(null=True, blank=True, unique=True) full_name = models.CharField(max_length=250, null=True, blank=True) parent = TreeForeignKey('self', on_delete=models.CASCADE, null=True, blank=True, related_name='children', limit_choices_to=lambda: {'user': User.objects.get(username='admin').pk}) job_name = models.CharField(max_length=250, null=True, blank=True) oc_level = models.IntegerField(null=True, blank=True) levels_nt_show = models.IntegerField(null=True, blank=True, default=0) his_chart = TreeForeignKey('self', on_delete=models.CASCADE, null=True, blank=True, related_name='hischart') on_work = models.CharField(max_length=250, null=True, blank=True, choices=choice, default='نعم') def __str__(self): return ", ".join([str(self.job_name), str(self.full_name)]) class MPTTMeta: verbose_name="rawaf_id" ordering = ['rawaf_id','parent','oc_level'] need to make parent = TreeForeignKey('self', on_delete=models.CASCADE, null=True, blank=True, related_name='children', limit_choices_to=lambda: {'user': request.user})
48985a434c9c103d75f7239b22f94c04
{ "intermediate": 0.32046210765838623, "beginner": 0.47675177454948425, "expert": 0.20278611779212952 }
16,128
this is my form class Employee_Profile_Form(ModelForm): rawaf_id = forms.IntegerField(required=False, disabled=True) iqama_no = forms.IntegerField(required=True) full_name = forms.CharField(max_length=250, required=True) job_name = forms.CharField(max_length=250, required=True) parent = TreeForeignKey('self', on_delete=models.CASCADE, null=True, blank=True, related_name='children') his_chart = TreeForeignKey('self', on_delete=models.CASCADE, null=True, blank=True, related_name='his_chart') oc_level = forms.IntegerField(required=True) levels_nt_show = forms.IntegerField(required=True) class Meta: model = Employee_Profile fields = "__all__" def init(self, *args, **kwargs): user = kwargs.pop('user', None) super().init(*args, **kwargs) if user: self.fields['parent'].queryset = Employee_Profile.objects.filter(user=user) and this is my views @login_required(login_url='login') def complete_employee_data(request,id): data = get_user_data(request) cc = Employee_Profile.objects.filter(parent = None) update_Employee_Profile = cc.get(id=id) Employee_Profile_Form(user=request.user) form = Employee_Profile_Form(instance=update_Employee_Profile) if request.method == 'POST': form = Employee_Profile_Form(request.POST, request.FILES, instance=update_Employee_Profile) if form.is_valid(): instance = form.save(commit=False) instance.save() return redirect('orgstructure') context = { **data, 'form':form, } if request.user.is_staff: return render(request, 'orgstructure/update_employee_data.html', context) else: return redirect('no_permission') and i get this error BaseModelForm.__init__() got an unexpected keyword argument 'user'
15a116802a791c4050876981b9ff6b53
{ "intermediate": 0.417941153049469, "beginner": 0.3803436756134033, "expert": 0.2017151564359665 }
16,129
Как обновить значение пользователя в checkAuthorized? package com.example.supportapplication.viewmodel import android.content.Context import android.content.Intent import android.widget.Toast import androidx.activity.result.ActivityResultLauncher import androidx.compose.runtime.MutableState import androidx.lifecycle.ViewModel import androidx.navigation.NavHostController import com.example.supportapplication.R import com.example.supportapplication.util.Routes.HOME_SCREEN import com.google.android.gms.auth.api.signin.GoogleSignIn import com.google.android.gms.auth.api.signin.GoogleSignInClient import com.google.android.gms.auth.api.signin.GoogleSignInOptions import com.google.firebase.auth.FirebaseAuth import dagger.hilt.android.lifecycle.HiltViewModel import javax.inject.Inject @HiltViewModel class AuthenticationViewModel @Inject constructor() : ViewModel() { fun checkRegistration( context: Context, auth: FirebaseAuth, email: MutableState<String>, password: MutableState<String> ) { if (email.value.isNotEmpty() && password.value.isNotEmpty()) { auth.createUserWithEmailAndPassword(email.value, password.value) .addOnCompleteListener { task -> if (task.isSuccessful) Toast.makeText(context, R.string.user_authorized, Toast.LENGTH_SHORT) .show() else Toast.makeText(context, R.string.user_exist, Toast.LENGTH_SHORT).show() } } else { Toast.makeText( context, R.string.enter_email_and_password, Toast.LENGTH_SHORT ).show() } } fun checkAuthorized( context: Context, auth: FirebaseAuth, email: MutableState<String>, password: MutableState<String>, navController: NavHostController, ) { if (email.value.isNotEmpty() && password.value.isNotEmpty()) { auth.signInWithEmailAndPassword(email.value, password.value) .addOnCompleteListener { task -> if (task.isSuccessful) navController.navigate(HOME_SCREEN) { popUpTo(navController.graph.id) { inclusive = true } } else Toast.makeText( context, R.string.check_email_and_password, Toast.LENGTH_SHORT ).show() } } else { Toast.makeText( context, R.string.enter_email_and_password, Toast.LENGTH_SHORT ).show() } } fun getClient(context: Context, signInWithGoogleLauncher: ActivityResultLauncher<Intent>) { val singInClient = getClient(context = context) signInWithGoogleLauncher.launch(singInClient.signInIntent) } private fun getClient(context: Context): GoogleSignInClient { val gso = GoogleSignInOptions .Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(context.getString(R.string.default_web_client_id)) .requestEmail() .build() return GoogleSignIn.getClient(context, gso) } }
c5becd8f07497fb775dca74f835ca27a
{ "intermediate": 0.3061741590499878, "beginner": 0.5572994947433472, "expert": 0.13652628660202026 }
16,130
Как обновить значение пользователя в checkAuthorized? package com.example.supportapplication.viewmodel import android.content.Context import android.content.Intent import android.widget.Toast import androidx.activity.result.ActivityResultLauncher import androidx.compose.runtime.MutableState import androidx.lifecycle.ViewModel import androidx.navigation.NavHostController import com.example.supportapplication.R import com.example.supportapplication.util.Routes.HOME_SCREEN import com.google.android.gms.auth.api.signin.GoogleSignIn import com.google.android.gms.auth.api.signin.GoogleSignInClient import com.google.android.gms.auth.api.signin.GoogleSignInOptions import com.google.firebase.auth.FirebaseAuth import dagger.hilt.android.lifecycle.HiltViewModel import javax.inject.Inject @HiltViewModel class AuthenticationViewModel @Inject constructor() : ViewModel() { fun checkRegistration( context: Context, auth: FirebaseAuth, email: MutableState<String>, password: MutableState<String> ) { if (email.value.isNotEmpty() && password.value.isNotEmpty()) { auth.createUserWithEmailAndPassword(email.value, password.value) .addOnCompleteListener { task -> if (task.isSuccessful) Toast.makeText(context, R.string.user_authorized, Toast.LENGTH_SHORT) .show() else Toast.makeText(context, R.string.user_exist, Toast.LENGTH_SHORT).show() } } else { Toast.makeText( context, R.string.enter_email_and_password, Toast.LENGTH_SHORT ).show() } } fun checkAuthorized( context: Context, auth: FirebaseAuth, email: MutableState<String>, password: MutableState<String>, navController: NavHostController, ) { if (email.value.isNotEmpty() && password.value.isNotEmpty()) { auth.signInWithEmailAndPassword(email.value, password.value) .addOnCompleteListener { task -> if (task.isSuccessful) navController.navigate(HOME_SCREEN) { popUpTo(navController.graph.id) { inclusive = true } } else Toast.makeText( context, R.string.check_email_and_password, Toast.LENGTH_SHORT ).show() } } else { Toast.makeText( context, R.string.enter_email_and_password, Toast.LENGTH_SHORT ).show() } } fun getClient(context: Context, signInWithGoogleLauncher: ActivityResultLauncher<Intent>) { val singInClient = getClient(context = context) signInWithGoogleLauncher.launch(singInClient.signInIntent) } private fun getClient(context: Context): GoogleSignInClient { val gso = GoogleSignInOptions .Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(context.getString(R.string.default_web_client_id)) .requestEmail() .build() return GoogleSignIn.getClient(context, gso) } }
e35ce0be9eb02a60a469331a166b7e55
{ "intermediate": 0.3061741590499878, "beginner": 0.5572994947433472, "expert": 0.13652628660202026 }
16,131
call execute function inside node_modules/dist/server react
734659c0027ca4b3df0575a5b14b8eab
{ "intermediate": 0.32474571466445923, "beginner": 0.3823837637901306, "expert": 0.29287052154541016 }
16,132
api binance
c887da0b97e5c624afb99171970a3e3d
{ "intermediate": 0.46086013317108154, "beginner": 0.25493407249450684, "expert": 0.284205824136734 }
16,133
How do you use addEventListener on an elements children?
41aa4d0472e04c5eecdb8e45fa45f836
{ "intermediate": 0.6532373428344727, "beginner": 0.1506548672914505, "expert": 0.19610781967639923 }
16,134
Give me the bevy rust script to open a file dialog when I click on a button and when I select a glb file, it make a mesh of it in my scene
5bdb11385dc9336d9fada1f397f04113
{ "intermediate": 0.6201483011245728, "beginner": 0.1435517817735672, "expert": 0.23629990220069885 }
16,135
ue4 c++ how to convert array of bytes to a class
ab50899668dab4386b08837225208598
{ "intermediate": 0.4006177484989166, "beginner": 0.3888297975063324, "expert": 0.21055245399475098 }
16,136
how to add 10 random integer numbers into a list with for loop python
1a2991982e3b9f50206e7b78371afaa1
{ "intermediate": 0.2158268839120865, "beginner": 0.4873453676700592, "expert": 0.2968277335166931 }
16,137
I used your signal_generator code: def signal_generator(df): if df is None: return '' ema_analysis = [] candle_analysis = [] df['EMA20'] = df['Close'].ewm(span=20, adjust=False).mean() df['EMA50'] = df['Close'].ewm(span=50, adjust=False).mean() if ( df['EMA20'].iloc[-1] > df['EMA50'].iloc[-1] and df['EMA20'].iloc[-2] < df['EMA50'].iloc[-2] ): ema_analysis.append('golden_cross') elif ( df['EMA20'].iloc[-1] < df['EMA50'].iloc[-1] and df['EMA20'].iloc[-2] > df['EMA50'].iloc[-2] ): ema_analysis.append('death_cross') if ( df['Close'].iloc[-1] > df['Open'].iloc[-1] and df['Open'].iloc[-1] > df['Low'].iloc[-1] and df['High'].iloc[-1] > df['Close'].iloc[-1] ): candle_analysis.append('bullish_engulfing') elif ( df['Close'].iloc[-1] < df['Open'].iloc[-1] and df['Open'].iloc[-1] < df['High'].iloc[-1] and df['Low'].iloc[-1] > df['Close'].iloc[-1] ): candle_analysis.append('bearish_engulfing') bollinger_std = df['Close'].rolling(window=20).std() df['UpperBand'] = df['EMA20'] + (bollinger_std * 2) df['LowerBand'] = df['EMA20'] - (bollinger_std * 2) if ( df['Close'].iloc[-1] > df['UpperBand'].iloc[-1] and df['Close'].iloc[-2] < df['UpperBand'].iloc[-2] ): candle_analysis.append('upper_band_breakout') elif ( df['Close'].iloc[-1] < df['LowerBand'].iloc[-1] and df['Close'].iloc[-2] > df['LowerBand'].iloc[-2] ): candle_analysis.append('lower_band_breakout') if ('golden_cross' in ema_analysis and 'bullish_engulfing' in candle_analysis) or 'upper_band_breakout' in candle_analysis: return 'buy' elif ('death_cross' in ema_analysis and 'bearish_engulfing' in candle_analysis) or 'lower_band_breakout' in candle_analysis: return 'sell' else: return '' Can you add EMA5 and EMA1 please in my code
9ca8f3971b5545347c7ddb7efc64c259
{ "intermediate": 0.3657395541667938, "beginner": 0.3455750346183777, "expert": 0.28868547081947327 }
16,138
how to find a directory in unix in command line
4bd41020343505d4cb47c62cbc194ab3
{ "intermediate": 0.32980355620384216, "beginner": 0.3937475383281708, "expert": 0.27644890546798706 }
16,139
do you knowl how to use stanfordcorenlp to segments a text in Chinese?
909d0c8f359d51aa972d974cc3055882
{ "intermediate": 0.2742215692996979, "beginner": 0.12282015383243561, "expert": 0.6029583215713501 }
16,140
IEEE 802.11ax (Wifi-6) is an IEEE draft amendment that defines modifications to the 802.11physical layer (PHY) and the medium access control (MAC) sublayer for highefficiency operation in frequency bands between 1 GHz and 6 GHz. 1.a) What are the main MAC changes 802.11ax brings compared to earlier 802.11 amendments? (
0fcd1c0038ade8b4d52a5d4be0696dbb
{ "intermediate": 0.42470237612724304, "beginner": 0.2820896506309509, "expert": 0.2932080328464508 }
16,141
Why do we use ASCII code?
3b15ab19034425bd3abbd067f4b7d3d9
{ "intermediate": 0.28260287642478943, "beginner": 0.5445147156715393, "expert": 0.17288240790367126 }
16,142
v-bind:style="[ my_active_id === item.pkgProjectSkuID? background-color:red]"这段代码有问题嘛
8e57b5be4ed155375c8240498e1bca88
{ "intermediate": 0.3922799229621887, "beginner": 0.23609048128128052, "expert": 0.37162959575653076 }
16,143
how to use command to restore mssql express database from a file "db.bak" with replace existing option
3ae79b40cdfcdd82e2a834acdc5041d2
{ "intermediate": 0.6200653910636902, "beginner": 0.16690894961357117, "expert": 0.21302559971809387 }
16,144
Uncaught TypeError: Cannot read properties of undefined (reading 'setState')
723f99d317075cc6235bc2e1896ad2c5
{ "intermediate": 0.43664130568504333, "beginner": 0.2535909116268158, "expert": 0.30976778268814087 }
16,145
how to use sqlcmd.exe to restore database "db.bak" and replace existing one
e270c78f75427228723a45a045f45397
{ "intermediate": 0.5095282793045044, "beginner": 0.17935870587825775, "expert": 0.3111129701137543 }
16,146
TSF输入法开发中,将以下函数用C#改写一下: BOOL RegisterProfiles() { HRESULT hr = S_FALSE; ITfInputProcessorProfileMgr *pITfInputProcessorProfileMgr = nullptr; hr = CoCreateInstance(CLSID_TF_InputProcessorProfiles, NULL, CLSCTX_INPROC_SERVER, IID_ITfInputProcessorProfileMgr, (void**)&pITfInputProcessorProfileMgr); if (FAILED(hr)) { return FALSE; } WCHAR achIconFile[MAX_PATH] = {'\0'}; DWORD cchA = 0; cchA = GetModuleFileName(Global::dllInstanceHandle, achIconFile, MAX_PATH); cchA = cchA >= MAX_PATH ? (MAX_PATH - 1) : cchA; achIconFile[cchA] = '\0'; size_t lenOfDesc = 0; hr = StringCchLength(TEXTSERVICE_DESC, STRSAFE_MAX_CCH, &lenOfDesc); if (hr != S_OK) { goto Exit; } hr = pITfInputProcessorProfileMgr->RegisterProfile(Global::SampleIMECLSID, TEXTSERVICE_LANGID, Global::SampleIMEGuidProfile, TEXTSERVICE_DESC, static_cast<ULONG>(lenOfDesc), achIconFile, cchA, (UINT)TEXTSERVICE_ICON_INDEX, NULL, 0, TRUE, 0); if (FAILED(hr)) { goto Exit; } Exit: if (pITfInputProcessorProfileMgr) { pITfInputProcessorProfileMgr->Release(); } return (hr == S_OK); } void UnregisterProfiles() { HRESULT hr = S_OK; ITfInputProcessorProfileMgr *pITfInputProcessorProfileMgr = nullptr; hr = CoCreateInstance(CLSID_TF_InputProcessorProfiles, NULL, CLSCTX_INPROC_SERVER, IID_ITfInputProcessorProfileMgr, (void**)&pITfInputProcessorProfileMgr); if (FAILED(hr)) { goto Exit; } hr = pITfInputProcessorProfileMgr->UnregisterProfile(Global::SampleIMECLSID, TEXTSERVICE_LANGID, Global::SampleIMEGuidProfile, 0); if (FAILED(hr)) { goto Exit; } Exit: if (pITfInputProcessorProfileMgr) { pITfInputProcessorProfileMgr->Release(); } return; }
3afd5b20db84b5526cc1c9898849f719
{ "intermediate": 0.2817799150943756, "beginner": 0.4085152745246887, "expert": 0.30970481038093567 }
16,147
hello
fb401b1b1c05f47d69a00aa73133141d
{ "intermediate": 0.32064199447631836, "beginner": 0.28176039457321167, "expert": 0.39759764075279236 }
16,148
Get all assignments which has happened after on March 7th 2016 (Assign_date).
94af92a7bcd1bc84b5c47974cce8709a
{ "intermediate": 0.372185617685318, "beginner": 0.19636142253875732, "expert": 0.43145298957824707 }
16,149
are you familair w/ ogre3d 1.7 api?
611855d58224576a74d61c8e6b646980
{ "intermediate": 0.5226260423660278, "beginner": 0.23762212693691254, "expert": 0.23975183069705963 }
16,150
Suppose a student named Alex attends a fictional university called "Eduverse." Eduverse uses Apereo CAS as its single sign-on (SSO) platform for all students, faculty members, staff, and other users. Whenever Alex needs to log into one of the university's web applications, such as the learning management system (LMS), email server, library database, or financial aid portal, they won't have to remember multiple usernames and passwords. Instead, they can simply enter their Apereo CAS credentials once – which authenticates them seamlessly across all participating systems. This way, Eduverse ensures secure, convenient, and integrated access to essential resources and services for the entire campus community. Write code about previous senario
770d94a4672b42e4ec737da2e961f13d
{ "intermediate": 0.2978944182395935, "beginner": 0.4365829527378082, "expert": 0.26552265882492065 }
16,151
Features Polygon based collision, i.e. accurate collision that is not based on bounding box but on actual shape (like in MOC). Collision detection type for different entities (bounding box, sphere, or accurate). Static geometry. Support ogre's query flags. Automatically prevent self-collision. Nearest collision or First hit collision modes. Performance As a basic performance test I rendered a test scene which included ~825 static entities with accurate collision type (200 walls & trees, 625 ground tiles) + some NPCs running around. The scene was rendered multiple times with the same camera and objects, but with different amount of collision queries per frame (random rays checking collision around). The following are the FPS per queries amount (FPS were pretty stable): No collision queries (eg prformance of just drawing the scene): 274 FPS. 50 queries per frame: 274 FPS (no performance hit). 100 queries per frame: 188 FPS. 200 queries per frame: 102 FPS. Caveats Don't support terrains collision, unless they are converted to an entity with mesh. Ignore Ogre query flag types (note: types means billboard, terrain, entity... query flags are supported, types are not.). No skeleton-based animation supported (but node movement / rotation / scaling is supported). Disclaimer This code is pretty old and may be slightly ugly. It works pretty well though, as I recall. How To Use To use this utility first include the source code in your project: NewMOC.h and NewMOC.cpp. Now you can instantiate a 'CollisionTools' manager, which is the main object we use to test collision: // create a new collision tools manager CollisionTools* collision = new CollisionTools(); To test collision with entities you need to register them first, so the collision tools will know them. To register a simple entity: // COLLISION_ACCURATE means accurate polygon-based collision. // if accurate collision is not important for this specific entity, you can use COLLISION_BOX or COLLISION_SPHERE collision->register_entity(entity, COLLISION_ACCURATE); Or if your entity is static, eg its trasnformations never going to change in the future, you can register it as a static entity (much better performance): // register a static entity. its much faster, but future transformations won't apply on it. collision->register_static_entity(entity, position, orientation, scale, COLLISION_ACCURATE); And if you ever want to destroy an entity and make it no longer collideable, use remove_entity: // remove an entity from collision tools collision->remove_entity(entity); Now that your entities are properly registered, you can start using collision: // ray is the ray to test collision for. // query mask is ogre query flags. // ignoreThis is an optional pointer to an entity we want to skip (for example, if you test detection for the player you'd want to skip its own mesh from collision). // maxDistance is maximum distance for collision. // stopOnFirstPositive if true, will return first result hit. if false, will return nearest (more overhead). SCheckCollisionAnswer ret = collision->check_ray_collision(ray, queryMask, ignoreThis, maxDistance, stopOnFirstPositive); // check if we found collision: if (ret.collided) { // handle collision here.. }
c52f3967b734d18fada1947855d147fd
{ "intermediate": 0.5852624773979187, "beginner": 0.2186831682920456, "expert": 0.1960543543100357 }
16,152
make a script that connect to translate.google.com and translate from swedish to english
c2ca287bc5e307ce15372eea9750ff6f
{ "intermediate": 0.4036788046360016, "beginner": 0.20435665547847748, "expert": 0.39196446537971497 }
16,153
fewfew
d4c450bf195af702873c415b76c4546b
{ "intermediate": 0.3274390995502472, "beginner": 0.346129834651947, "expert": 0.3264310657978058 }
16,154
select bookData.bookid,bookname,isbn_code,price,null as pic,pubName,pub_dt,isnull(num_xs,0) as num_xs,isnull(qty,0) as qty ,null as detail,null as mysellprice from (select books.bookid,bookname,books.isbn_code,price,pubName,pub_dt from books where available in(1,2)) bookData left join(select bookid, num_xs, (num_xs * yy_books.price) as mayang from (select serial_no, SUM(num_xs) as num_xs from pubNewBook.dbo.orsttb04 where dt >= '2023-07-13' and dt <= '2023-07-20' group by serial_no) xsNum inner join pubNewBook.dbo.yy_books on xsNum.serial_no = yy_books.serial_no) saleNum on bookData.bookid=saleNum.bookid left join(select goodsNo, SUM(currentQuantity) as qty from ErpStockquantity group by goodsNo) stock on bookdata.bookid=stock.goodsNo order by isnull(num_xs,0) desc,bookid
d0e8f892d4faa6697e251b8032b68cdf
{ "intermediate": 0.35242873430252075, "beginner": 0.32921597361564636, "expert": 0.3183552622795105 }
16,155
Using R to read different sheets in excel and convert the data into a SAS dataset
6f5d21a6305b915a594908758791e896
{ "intermediate": 0.5439807176589966, "beginner": 0.1388467252254486, "expert": 0.3171725273132324 }
16,156
rust pattern matching for String field
524d3be55223a7ec86bf9204aff7a9f7
{ "intermediate": 0.37818586826324463, "beginner": 0.2860850393772125, "expert": 0.33572906255722046 }
16,157
Consider this content "Blogging tool Introduction Your task is to create a deployable blogging tool which a single user could deploy on their own server and use to maintain a blog. The tool should provide discrete author and reader pages. The author must be able to write articles, save them as drafts and publish them. Readers must be able to browse and read published articles as well as comment on and like them. Please read the base requirements carefully for the full detail. Technical specification All submissions MUST use the template project provided with the assignment. Express.js must be used as the basis for the server side functionality. SQLite must be the basis for the data tier. Client side pages must be delivered through server-side rendering using Embedded Javascript Templates. As such the following tools are pre-requisite: Tool Description URL EJS Tool for Embedded Javascript Templates. Allows for dynamic rendering of HTML. https://www.npmjs.com/package/ejs SQLite3 Query your data tier from within your express app https://www.npmjs.com/package/sqlite3 ExpressJS A framework for simplifying building a web server https://expressjs.com/ NodeJs Javascript engine for building web servers https://nodejs.org/en/ SQLite Portable, single file-based SQL database. https://www.sqlite.org/index.html You may make use of NPM addons and front end libraries provided that they are justified and don’t fundamentally alter the above specification. Some example packages are listed below: Tool Description URL Tailwind A popular CSS library. NB. requires some quite tricky build tools https://tailwindcss.com/ Bootstrap An older but still popular CSS library which is easier to use straight off https://getbootstrap.com/ Axios A helpful library for making requests from both client and server https://www.npmjs.com/packag e/axios Assert Internal node module. Useful for testing and basic data validation https://nodejs.org/api/assert.ht ml Joi Really helpful for improving that data validation. https://www.npmjs.com/packag e/joi Express-Valid ator A more scalable approach to data validation. https://express-validator.github. io/docs/ Express Sessions Persistent and secure storage of user details when they are logged in https://www.npmjs.com/packag e/express-session Date-Fns Date/Time formatting tool https://date-fns.org/ ● All source code must be human readable ● Do not use bundlers such as Webpack ● You can use CSS precompilers such as Tailwind provided the built CSS is provided with the submission ● We will run
16913aaca26602ba328bb59a4105a623
{ "intermediate": 0.7278326153755188, "beginner": 0.14711733162403107, "expert": 0.12505000829696655 }
16,158
@Override public myProcessDailyVO myProcessDaily(Integer pageStart, Integer pageSize, String name, boolean finished){ JSONResult result = iFlowTaskService.myProcessPage(pageStart, pageSize, name, finished); Pager pager = (Pager) result.getResult(); int total = pager.getTotalCount(); List<String> totalList = Collections.singletonList(String.valueOf(total)); List<FlowTaskDto> dataList = (List<FlowTaskDto>) pager.getData(); //构建存储结果的列表 List<JSONObject> dailyProcess=new ArrayList<>(); for(FlowTaskDto dataTask: dataList) { JSONObject processedObj = null; if (!finished) {//只展示未完成的 // 处理每条数据--只获取个别字段:流程名称、流程类别、流程状态、创建时间 processedObj = new JSONObject(); processedObj.put("proName", dataTask.getProcDefName()); processedObj.put("proCate", dataTask.getCategory()); processedObj.put("proStatus", finished); Date createTimeDate = dataTask.getCreateTime(); long createTimeTimestamp = createTimeDate.getTime(); Instant instant = Instant.ofEpochMilli(createTimeTimestamp); LocalDateTime createTimeLocalDateTime = instant.atZone(ZoneId.systemDefault()).toLocalDateTime(); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); String formattedCreateTime = createTimeLocalDateTime.format(formatter); processedObj.put("createTime", formattedCreateTime); processedObj.put("ProcInsId",dataTask.getProcInsId()); processedObj.put("ProcDefId",dataTask.getProcDefId()); processedObj.put("DeployId", dataTask.getDeployId()); processedObj.put("TaskId",dataTask.getTaskId()); processedObj.put("ExecutionId",dataTask.getExecutionId()); } dailyProcess.add(processedObj); } myProcessDailyVO processResult = new myProcessDailyVO(); processResult.setDailyProcess(dailyProcess); processResult.setTotal((JSONObject) new JSONObject().put("total", total)); JSONObject t= processResult.getTotal(); return processResult; } }total赋值不成功,返回结果为null,为什么?
825d1a7d4aeaf0d4838a30790216a186
{ "intermediate": 0.40468621253967285, "beginner": 0.4621502459049225, "expert": 0.13316360116004944 }
16,159
can you help me document code
3e105af5ca4f47afeb43e9ec1252b352
{ "intermediate": 0.2973865866661072, "beginner": 0.43504461646080017, "expert": 0.2675688564777374 }
16,160
fix code from ENM_class import Enm from parser_utils import parse_rbs_tr_pars, parse_bbu_tr_pars, combine_data, format_bbu_data, format_rbs_data from dotenv import load_dotenv from file_write import xlsx_write from sql import update_network_live load_dotenv('.env') def enm_main(): """ Update network live with ENM cells. Args: mo_type: string Returns: string """ enms = ['ENM_1','ENM_2'] for enm in enms: enm_site_names = Enm.execute_enm_command('site_names',enm) enm_iublink = Enm.execute_enm_command('iublink',enm) rbs_traffic_IP_data = Enm.execute_enm_command('RBS_IpAccessHostEt',enm) rbs_OAM_IP_data = Enm.execute_enm_command('RBS_IpHostLink',enm) rbs_vlan_mask_GW_data = Enm.execute_enm_command('RBS_IpInterface',enm) bbu_mask_ip_data = Enm.execute_enm_command('BBU_AddressIPv4',enm) bbu_vlan_data = Enm.execute_enm_command('BBU_VlanPort',enm) bbu_gateway_data = Enm.execute_enm_command('BBU_NextHop',enm) rbs_traffic_IP = parse_rbs_tr_pars(rbs_traffic_IP_data, 'IpAccessHostEt=', enm_iublink, enm_site_names) rbs_OAM_IP = parse_rbs_tr_pars(rbs_OAM_IP_data, 'IpHostLink=', enm_iublink, enm_site_names) rbs_vlan_mask_GW = parse_rbs_tr_pars(rbs_vlan_mask_GW_data, 'IpInterface=', enm_iublink, enm_site_names) bbu_mask_ip = parse_bbu_tr_pars(bbu_mask_ip_data, 'Router=', enm_iublink, enm_site_names) bbu_vlan = parse_bbu_tr_pars(bbu_vlan_data, 'Router', enm_iublink, enm_site_names) bbu_gateway = parse_bbu_tr_pars(bbu_gateway_data, 'Router=', enm_iublink, enm_site_names) combine_traffic_vlan_rbs = combine_data(rbs_traffic_IP,rbs_vlan_mask_GW) combine_OAM_vlan_rbs = combine_data(rbs_OAM_IP, rbs_vlan_mask_GW) combine_gw_ip_mask_bbu = combine_data(bbu_mask_ip, bbu_gateway) combine_gw_ip_mask_vlan_bbu = combine_data(combine_gw_ip_mask_bbu, bbu_vlan) format_combine_traffic_vlan_rbs = format_rbs_data(combine_traffic_vlan_rbs) format_combine_OAM_vlan_rbs = format_rbs_data(combine_OAM_vlan_rbs) format_combine_gw_ip_mask_vlan_bbu = format_bbu_data(combine_gw_ip_mask_vlan_bbu) if format_combine_gw_ip_mask_vlan_bbu: # return xlsx_write(format_combine_gw_ip_mask_vlan_bbu, 'bbu'), xlsx_write(format_combine_traffic_vlan_rbs + format_combine_OAM_vlan_rbs, 'rbs') return update_network_live(format_combine_traffic_vlan_rbs + format_combine_OAM_vlan_rbs + format_combine_gw_ip_mask_vlan_bbu,'site') print(enm_main())
f9ddb0bcaf06fa9de178b917038b0420
{ "intermediate": 0.3467128872871399, "beginner": 0.43362340331077576, "expert": 0.21966369450092316 }
16,161
how to use sqlcmd to do the full database backup of database "yausanglive"
3a38cc9bba2d6201873de8c77072363f
{ "intermediate": 0.46869370341300964, "beginner": 0.2321583777666092, "expert": 0.29914793372154236 }
16,162
how return atributtes from apereo cas server to asp .net
4af63989cc24b966e81a3300c5370ca5
{ "intermediate": 0.35694557428359985, "beginner": 0.2564631402492523, "expert": 0.38659125566482544 }
16,163
Act as a Developer Task: to create a deployable blogging tool which a single user could deploy on their own server and use to maintain a blog. The tool should provide discrete author and reader pages. The author must be able to write articles, save them as drafts and publish them. Readers must be able to browse and read published articles as well as comment on and like them. Please read the base requirements carefully for the full detail.We will run `npm install` followed by `npm run build-db` and `npm run start` to run your project. Please ensure that your project runs from these commands alone without need for further compilation or installation of dependencies. Tech Stack: EJS, ExpressJS, NodeJs, SQLite3, SQLite, Bootstrap Base Requirements: Implement these basic features fully to achieve a passing grade. Author - Home Page: This is where the Author can create, review and edit articles. The minimum requirements for the page are as follows: ● It should be accessed through a URL which is distinct from the Reader Home Page ● It should display the blog title, subtitle, and author name ● It should have a second heading which makes it clear that this is the author page ● It should have a link which points to the settings page ● It should have a “Create new draft” button ○ When pressed this should create a new draft article and redirect to it’s edit page ● It should display a dynamically populated list of published articles ○ The list should display useful information about the articles such as when they were created, published, and last modified, and number of likes ○ For each article the list should display a sharing link which points to the relevant Reader - Article Page ○ For each article there should be a delete button for the article. When pressed this should: ■ Remove the article from the database ■ Reload the page to display the updated information ● It should display a dynamically populated list of draft articles ○ The list should display useful information about the articles such as when they were created, published, and last modified ○ Each article in the list should be accompanied by a link which points to its edit page ○ For each article there should be a publish button. When pressed this should: ■ Update the article’s state from draft to published ■ Timestamp the publication date ■ Reload the page to display the updated information ○ For each article there should be a delete button. Author - Settings Page: This is where the Author can change the blog title , subtitle and author name. The minimum requirements for the page are as follows: ● A title which indicates that this is the settings page ● A form with text inputs for Blog title, subtitle, and author name. ○ The form should be dynamically populated with the current settings for the page ○ The form should have a submit button which updates the settings with the new values and redirects to the Author - Home Page. ○ Form validation should be used to ensure that all fields have been completed ahead of submission. ● A back button which points to Author - Home Page. Author - Edit Article Page: This is where the author writes, amends and publishes individual articles. The minimum requirements for the page are as follows: ● Data about the article (Eg. created, last modified) ● A form containing the following input fields and controls: ○ Article title ○ Article subtitle ○ Article text ○ A submit changes button ● The form should be populated with the current article data ● When changes are submitted the article’s last modified date should be changed ● A back button which points to Author - Home Page. Reader - Home Page: This is the front page which readers use to access the blog site. The minimum requirements for the page are as follows: ● It should be accessed through a URL which is distinct from the Author - Home Page ● It should display the blog title, subtitle, and author name ● A list of published articles ○ The article title and publication date should be visible for each item ○ Articles should be ordered by publication date with the latest publication appearing at the top ○ Clicking on an item in the list should take the user to the Reader - article page for that particular article Reader - Article Page: This is where the reader can read and interact with individual articles. The minimum requirements for the page are as follows: ● It should display a single article determined by the url ● It should display information about the article including, article title and subtitle, publication date, number of likes ● It should display the text of the article ● There should be a like button to react to the article ● There should be form for adding a comment to the article containing ○ a text input for the comment. ○ A submit comment button ● When the user submits a comment the page should be reloaded so that their comment appears in the list. ● There should be a list of previous reader comments which should be ordered by the date when they were written ● There should be a back button which redirects the user to the Reader - Home Page
2aaa527a03b30aaf1df82382ad01ada1
{ "intermediate": 0.5362046957015991, "beginner": 0.2600693106651306, "expert": 0.20372597873210907 }
16,164
Could not resolve placeholder 'HOSTNAME%%.*' in value "printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNA
3552867e8323210b073d408c48dd46d9
{ "intermediate": 0.2506951689720154, "beginner": 0.60062575340271, "expert": 0.14867901802062988 }
16,165
Act as a Developer Task: To generate code for the below requirements with file names. We will run `npm install` followed by `npm run build-db` and `npm run start` to run your project. Please ensure that your project runs from these commands alone without need for further compilation or installation of dependencies. Tech Stack: EJS, ExpressJS, NodeJs, SQLite3, SQLite, Bootstrap Requirements: Implement these basic features fully to achieve a passing grade. Author - Home Page: This is where the Author can create, review and edit articles. The minimum requirements for the page are as follows: ● It should be accessed through a URL which is distinct from the Reader Home Page ● It should display the blog title, subtitle, and author name ● It should have a second heading which makes it clear that this is the author page ● It should have a link which points to the settings page ● It should have a “Create new draft” button ○ When pressed this should create a new draft article and redirect to it’s edit page ● It should display a dynamically populated list of published articles ○ The list should display useful information about the articles such as when they were created, published, and last modified, and number of likes ○ For each article the list should display a sharing link which points to the relevant Reader - Article Page ○ For each article there should be a delete button for the article. When pressed this should: ■ Remove the article from the database ■ Reload the page to display the updated information ● It should display a dynamically populated list of draft articles ○ The list should display useful information about the articles such as when they were created, published, and last modified ○ Each article in the list should be accompanied by a link which points to its edit page ○ For each article there should be a publish button. When pressed this should: ■ Update the article’s state from draft to published ■ Timestamp the publication date ■ Reload the page to display the updated information ○ For each article there should be a delete button. Author - Settings Page: This is where the Author can change the blog title , subtitle and author name. The minimum requirements for the page are as follows: ● A title which indicates that this is the settings page ● A form with text inputs for Blog title, subtitle, and author name. ○ The form should be dynamically populated with the current settings for the page ○ The form should have a submit button which updates the settings with the new values and redirects to the Author - Home Page. ○ Form validation should be used to ensure that all fields have been completed ahead of submission. ● A back button which points to Author - Home Page. Author - Edit Article Page: This is where the author writes, amends and publishes individual articles. The minimum requirements for the page are as follows: ● Data about the article (Eg. created, last modified) ● A form containing the following input fields and controls: ○ Article title ○ Article subtitle ○ Article text ○ A submit changes button ● The form should be populated with the current article data ● When changes are submitted the article’s last modified date should be changed ● A back button which points to Author - Home Page. Reader - Home Page: This is the front page which readers use to access the blog site. The minimum requirements for the page are as follows: ● It should be accessed through a URL which is distinct from the Author - Home Page ● It should display the blog title, subtitle, and author name ● A list of published articles ○ The article title and publication date should be visible for each item ○ Articles should be ordered by publication date with the latest publication appearing at the top ○ Clicking on an item in the list should take the user to the Reader - article page for that particular article Reader - Article Page: This is where the reader can read and interact with individual articles. The minimum requirements for the page are as follows: ● It should display a single article determined by the url ● It should display information about the article including, article title and subtitle, publication date, number of likes ● It should display the text of the article ● There should be a like button to react to the article ● There should be form for adding a comment to the article containing ○ a text input for the comment. ○ A submit comment button ● When the user submits a comment the page should be reloaded so that their comment appears in the list. ● There should be a list of previous reader comments which should be ordered by the date when they were written ● There should be a back button which redirects the user to the Reader - Home Page
d98f009da8f206e97fa1974f8dd64dbe
{ "intermediate": 0.4033827483654022, "beginner": 0.33972835540771484, "expert": 0.25688886642456055 }
16,166
/** * New Minimal Ogre Collision - rewritten simple Ogre collision detection based on the MOC idea. * * Author: Ronen Ness * Since: 22/04/14 */ #pragma once #include <Ogre.h> #include <vector> #include <utility> #include <unordered_map> namespace Collision { // return struct for the function check_ray_collision (all the data about collision) // collided - weather or not there was a collision and the data in the struct is valid (if false ignore other fields). // position - will contain the collision position // entity - the collided entity // closest_distance - will contain the closest distance we collided with struct SCheckCollisionAnswer { bool collided; Ogre::Vector3 position; Ogre::Entity* entity; float closest_distance; }; // different collision types enum ECollisionType { COLLISION_ACCURATE, // will check accurate intersection with all verticles of the entity (for complex shapes that need accurate collision) COLLISION_BOX, // will only check intersection with the bounding box (good for walls and crates-like objects) COLLISION_SPHERE, // will only check interection with the object sphere (good for characters) }; // holds vertices data of a mesh struct SMeshData { unsigned int ref_count; // how many entities we have with that mesh registered to the collision tools (when 0, this data is deleted) size_t vertex_count; // vertices count Ogre::Vector3* vertices; // vertices size_t index_count; // indices count Ogre::uint32* indices; // indices SMeshData() : ref_count(0), vertex_count(0), vertices(nullptr), index_count(0), indices(nullptr) { } // delete the inner data void delete_data() { delete[] vertices; delete[] indices; } }; // data about an entity registered to the collision tools struct SCollidableEntity { Ogre::Entity* Entity; // the entity to check ECollisionType CollisionType; // the prefered collision type for this entity bool IsStatic; // is this entity part of a static geometry // Data used only for static entities struct SStaticData { Ogre::Sphere Sphere; // used only for static objects with sphere collision Ogre::AxisAlignedBox Box; // used only for static objects with box or accurate collision Ogre::Matrix4 Mat; // transformation matrix } *StaticData; // delete the static data if have it void remove_static_data() { if (StaticData) delete StaticData; StaticData = nullptr; } }; // collision detection manager for a specific scene class CollisionTools { private: std::vector<SCollidableEntity> m_Entities; // the entities that are registered for collision checks std::unordered_map<const Ogre::Mesh*, SMeshData> m_MeshesData; // data about meshes we need for accurate collision public: CollisionTools(); ~CollisionTools(); // register a dynamic entity for collision detection void register_entity(Ogre::Entity* Entity, ECollisionType CollisionType = COLLISION_ACCURATE); // register a static entity for collision detection void register_static_entity(Ogre::Entity* Entity, const Ogre::Vector3& position, const Ogre::Quaternion orientation, const Ogre::Vector3 scale, ECollisionType CollisionType = COLLISION_ACCURATE); // unregister an entity from collision detection (make sure to call this when the entity is deleted!) void remove_entity(Ogre::Entity* Entity); // check ray collision. check out "SCheckCollisionAnswer" for info about return values. // ray - collision ray to check // queryMask - ogre's query mask (you can set for every entity // ignore - will ignore the entity who has the address of 'ignore'. use this if you want to prevent a character from colliding with itself.. // maxDistance - beyond this distance we'll ignore entities // stopOnFirstPositive - if true, will stop on first positive collision (instead of nearest) SCheckCollisionAnswer check_ray_collision(const Ogre::Ray &ray, const Ogre::uint32 queryMask = 0xFFFFFFFF, void* ignore = nullptr, Ogre::Real maxDistance = 0xffff, bool stopOnFirstPositive = false); // check ray collision. check out "SCheckCollisionAnswer" for info about return values. // fromPoint - ray starting point // toPoint - ray ending point // collisionRadius - ray 'radius' // rayHeightLevel - will add this factor to the yof the ray. // queryMask - ogre's query mask (you can set for every entity // ignore - will ignore the entity who has the address of 'ignore'. use this if you want to prevent a character from colliding with itself.. // stopOnFirstPositive - if true, will stop on first positive collision (instead of nearest) SCheckCollisionAnswer check_ray_collision(const Ogre::Vector3& fromPoint, const Ogre::Vector3& toPoint, const float collisionRadius = 1.0f, const float rayHeightLevel = 0.0f, const Ogre::uint32 queryMask = 0xFFFFFFFF, void* ignore = nullptr, bool stopOnFirstPositive = false); private: // do a simple ray query and return a list of results sorted by distance // NOTE!!! this function only do simple query! it does not do accurate checks or anything, either box collision or sphere collision. // all the accurate checks and range limit is done in one of the 'check_ray_collision' functions // stopOnFirstPositive - if true, will stop on first positive bounding box or sphere collision (not relevant for accurate collisions) typedef std::pair<const SCollidableEntity*, Ogre::Real> RayQueryEntry; std::list<RayQueryEntry> get_basic_ray_query_entities_list(const Ogre::Ray &ray, const Ogre::uint32 queryMask = 0xFFFFFFFF, void* ignore = nullptr, Ogre::Real maxDistance = 0xffff, bool stopOnFirstPositive = false); // comparing function to arranage the result list of get_basic_ray_query_entities_list friend bool compare_query_distance (const CollisionTools::RayQueryEntry& first, const CollisionTools::RayQueryEntry& second); // add mesh data reference to m_MeshesData map. // if first mesh of this type, create all its data, if already exist just increase the reference void add_mesh_data(const Ogre::Mesh* mesh); // remove reference from mesh data. if ref count is 0, data is released void remove_mesh_data(const Ogre::Mesh* mesh); // get all the needed information of a mesh // we use this function to create the mesh data hash table for accurate collision void get_mesh_info(const Ogre::Mesh* mesh, size_t &vertex_count, Ogre::Vector3* &vertices, size_t &index_count, Ogre::uint32* &indices); }; };
7e29435774e6043eca8879d0d8fc3ea0
{ "intermediate": 0.5554331541061401, "beginner": 0.29406875371932983, "expert": 0.15049809217453003 }
16,167
I use SQL server management studio. The default language for the database is Norwegian. I want to write a script that selects records with the name Cozaar from the database by using select * from Table where Name like 'coza%' Since Cozaar is converted to Cozår these records are missing.
ad56ef6804b43dede4c0e4c647afa249
{ "intermediate": 0.5362728238105774, "beginner": 0.2136557251214981, "expert": 0.2500714957714081 }
16,168
pandarallel 报错pickle.UnpicklingError:pickle data was truncated
3d0c2b862ca3dbb3df77168105a41d6d
{ "intermediate": 0.3561023473739624, "beginner": 0.18082980811595917, "expert": 0.46306779980659485 }
16,169
write a java script code to reverse this number 12345
8fc60f6d4e45a65f89fb64ba258fbe76
{ "intermediate": 0.3519018292427063, "beginner": 0.2801189124584198, "expert": 0.3679791986942291 }
16,170
in django admin when i add a new user i need to make it take the permission of staff status by default
294d4152ee17decc5413d8f5d45fb9d1
{ "intermediate": 0.4648049473762512, "beginner": 0.18929523229599, "expert": 0.3458998501300812 }
16,171
explain re pattern ',SubNetwork=[^,]*'
0202de750887559a04419d49b3ff549f
{ "intermediate": 0.1956525593996048, "beginner": 0.24431954324245453, "expert": 0.5600279569625854 }
16,172
how to free up the clipboard via command line
2fd4f8a64664b14d25138d171bc49353
{ "intermediate": 0.3297088146209717, "beginner": 0.3439182639122009, "expert": 0.326372891664505 }