row_id int64 0 48.4k | init_message stringlengths 1 342k | conversation_hash stringlengths 32 32 | scores dict |
|---|---|---|---|
18,588 | make me a javascript code to automatically download an image in a website.
the link will be contained in an element as such:
"<div class="media" style="max-height: 815.1px;">
<img src="https://static.wikia.nocookie.net/leagueoflegends/images/9/94/Aurelion_Sol_StormDragonSkin_HD.jpg/revision/latest/scale-to-width-down/1000?cb=20200917183858" height="563">
</div>"
the target image being downloaded begins with "https://static.wikia.nocookie.net/leagueoflegends/images/" and ends with .jpg, ignoring the "/revision/latest/scale-to-width-down/1000?cb=20200917183858" part | 8a5bde032c76be37a134b53558886313 | {
"intermediate": 0.4507471024990082,
"beginner": 0.189955934882164,
"expert": 0.35929691791534424
} |
18,589 | rename column in dataframe | 3508c135691be4efd5518058cf07e706 | {
"intermediate": 0.31033968925476074,
"beginner": 0.266719251871109,
"expert": 0.42294105887413025
} |
18,590 | make me a javascript code to automatically download an image in a website.
the link will be contained in an element as such:
"<div class="media" style="max-height: 815.1px;">
<img src="https://static.wikia.nocookie.net/leagueoflegends/images/9/94/Aurelion_Sol_StormDragonSkin_HD.jpg/revision/latest/scale-to-width-down/1000?cb=20200917183858" height="563">
</div>"
the target image being downloaded begins with "https://static.wikia.nocookie.net/leagueoflegends/images/" and ends with .jpg, ignoring the "/revision/latest/scale-to-width-down/1000?cb=20200917183858" part | c923db7f23957f8b7ea685abe03d7be2 | {
"intermediate": 0.4507471024990082,
"beginner": 0.189955934882164,
"expert": 0.35929691791534424
} |
18,591 | make me a userscript code to automatically download an image in a website.
the link will be contained in class="media" > img src="target"
the target image link to be downloaded begins with "https://static.wikia.nocookie.net/leagueoflegends/images/" and ends with .jpg, ignoring the rest, such as"/revision/latest/scale-to-width-down/1000?" part | d86750c5edc8ca1b275caefab73bfbf0 | {
"intermediate": 0.46995288133621216,
"beginner": 0.2497074007987976,
"expert": 0.2803397476673126
} |
18,592 | fix this code: SELECT inquiry_id, FROM `i2ms-debug`.inquiry_analytics_vw as i WHERE i.type = 'TINQ' AND i.received_date > '2010-01-01 00:00:00'; | c7bc617eabc0c0776db8d61bda91d0d7 | {
"intermediate": 0.4475246071815491,
"beginner": 0.3585830628871918,
"expert": 0.19389227032661438
} |
18,593 | # Retrieve Text for the open inquiry
query_open_inq = "SELECT * FROM inquiry_analytics_vw WHERE inquiry_id;"
with connection.connect(**mydbconfig) as mydb:
mycursor = mydb.cursor()
mycursor.execute(query_open_inq)
xq = mycursor.fetchone()
how would i make xq a df | 150f3815353c4df0b52bc7bcbb5ab019 | {
"intermediate": 0.5561760663986206,
"beginner": 0.23033267259597778,
"expert": 0.21349121630191803
} |
18,594 | MS SQL
Constrains
Procedural Integrity Constraints
Declarative Integrity Constraints
Not Null, Unique, Default and Check constraints
Primary Key and Referential Integrity or foreign key constraints
Data Types In TSQL | 7ba0d8b667f1e989289bdf301d2327e8 | {
"intermediate": 0.36101964116096497,
"beginner": 0.23820333182811737,
"expert": 0.40077701210975647
} |
18,595 | make a userscript that shows a button on tope left corner that runs a function | fb711942ec1405df7d36fb6d1793087f | {
"intermediate": 0.33406946063041687,
"beginner": 0.41218724846839905,
"expert": 0.2537432909011841
} |
18,596 | import React, {useCallback, useEffect, useRef, useState} from "react";
import {Box, Checkbox, Stack, Typography, useTheme} from "@mui/material";
import {Check, Clear} from "@mui/icons-material";
const OrderFeed = ({workerRef, symbol, settings}: OrderFeedProps) => {
const [volumeChoice, setVolumeChoice] = useState(false);
const [volumeAsDollars, setVolumeAsDollars] = useState(false);
return <Box onClick={() => setVolumeChoice(true)} position="absolute" sx={{backgroundColor: "#ececec", bottom: 0, width: "100%", height: volumeChoice ? "96px" : "26px"}}>
{
!volumeChoice ? <Typography sx={{mr: "20%" , float: "right"}}>1000</Typography>
: <Stack textAlign="center">
<Typography sx={{}}>Выберите объем заявки</Typography>
<Stack flexDirection="row" justifyContent="center" alignItems="center" >
<Typography><Checkbox checked={volumeAsDollars} onChange={(e) => setVolumeAsDollars(e.currentTarget.checked)} /></Typography>
<Typography color="#006943"><Check /></Typography>
<Typography ml={2} sx={{cursor: "pointer"}} color="#b41c18"><Clear /></Typography>
</Stack>
</Stack>
}
</Box>
нужно добавить инпут с выбором числа, на иконку Clear setVolumeChoice(false)
по клику на галочку выводить в консоль выбранный объем из инпута | c97621d1cda1d40fd20432dceb0dca06 | {
"intermediate": 0.5227829813957214,
"beginner": 0.31774863600730896,
"expert": 0.15946847200393677
} |
18,597 | If I were to provide code from a working Minecraft Forge mod for Minecraft 1.4.7 involving altering sounds for blocks (such as by metadata), would you be able to update most or all of it to the newer sound system in Minecraft Forge for Minecraft 1.7.10? In 1.4.7, the names of the sounds were passed as Strings, but this was changed at some point between then at 1.7.10 to use Block.SoundType. | acaaaf3f4f75bf46d4a46598b7834883 | {
"intermediate": 0.573018491268158,
"beginner": 0.18670742213726044,
"expert": 0.240274116396904
} |
18,598 | LLaMA-2-7B-32K
Model Description
LLaMA-2-7B-32K is an open-source, long context language model developed by Together, fine-tuned from Meta's original Llama-2 7B model. This model represents our efforts to contribute to the rapid progress of the open-source ecosystem for large language models. The model has been extended to a context length of 32K with position interpolation, allowing applications on multi-document QA, long text summarization, etc.
What's new?
This model introduces several improvements and new features:
Extended Context: The model has been trained to handle context lengths up to 32K, which is a significant improvement over the previous versions.
Pre-training and Instruction Tuning: We have shared our data recipe, which consists of a mixture of pre-training and instruction tuning data.
Fine-tuning Examples: We provide examples of how to fine-tune the model for specific applications, including book summarization and long context question and answering.
Software Support: We have updated both the inference and training stack to allow efficient inference and fine-tuning for 32K context.
Model Architecture
The model follows the architecture of Llama-2-7B and extends it to handle a longer context. It leverages the recently released FlashAttention-2 and a range of other optimizations to improve the speed and efficiency of inference and training.
Training and Fine-tuning
The model has been trained using a mixture of pre-training and instruction tuning data.
In the first training phase of continued pre-training, our data mixture contains 25% RedPajama Book, 25% RedPajama ArXiv (including abstracts), 25% other data from RedPajama, and 25% from the UL2 Oscar Data, which is a part of OIG (Open-Instruction-Generalist), asking the model to fill in missing chunks, or complete the text. To enhance the long-context ability, we exclude data shorter than 2K word. The inclusion of UL2 Oscar Data is effective in compelling the model to read and utilize long-range context.
We then fine-tune the model to focus on its few shot capacity under long context, including 20% Natural Instructions (NI), 20% Public Pool of Prompts (P3), 20% the Pile. We decontaminated all data against HELM core scenarios . We teach the model to leverage the in-context examples by packing examples into one 32K-token sequence. To maintain the knowledge learned from the first piece of data, we incorporate 20% RedPajama-Data Book and 20% RedPajama-Data ArXiv.
Next, we provide examples of how to fine-tune the model for specific applications. The example datasets are placed in togethercomputer/Long-Data-Collections You can use the OpenChatKit to fine-tune your own 32K model over LLaMA-2-7B-32K. Please refer to OpenChatKit for step-by-step illustrations.
Long Context QA.
We take as an example the multi-document question answering task from the paper “Lost in the Middle: How Language Models Use Long Contexts”. The input for the model consists of (i) a question that requires an answer and (ii) k documents, which are passages extracted from Wikipedia. Notably, only one of these documents contains the answer to the question, while the remaining k − 1 documents, termed as "distractor" documents, do not. To successfully perform this task, the model must identify and utilize the document containing the answer from its input context.
With OCK, simply run the following command to fine-tune:
bash training/finetune_llama-2-7b-32k-mqa.sh
Summarization.
Another example is BookSum, a unique dataset designed to address the challenges of long-form narrative summarization. This dataset features source documents from the literature domain, including novels, plays, and stories, and offers human-written, highly abstractive summaries. We here focus on chapter-level data. BookSum poses a unique set of challenges, necessitating that the model comprehensively read through each chapter.
With OCK, simply run the following command to fine-tune:
bash training/finetune_llama-2-7b-32k-booksum.sh
Inference
You can use the Together API to try out LLaMA-2-7B-32K for inference. The updated inference stack allows for efficient inference.
To run the model locally, we strongly recommend to install Flash Attention V2, which is necessary to obtain the best performance:
# Please update the path of `CUDA_HOME`
export CUDA_HOME=/usr/local/cuda-11.8
pip install transformers==4.31.0
pip install sentencepiece
pip install ninja
pip install flash-attn --no-build-isolation
pip install git+https://github.com/HazyResearch/flash-attention.git#subdirectory=csrc/rotary
You can use this model directly from the Hugging Face Model Hub or fine-tune it on your own data using the OpenChatKit.
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("togethercomputer/LLaMA-2-7B-32K")
model = AutoModelForCausalLM.from_pretrained("togethercomputer/LLaMA-2-7B-32K", trust_remote_code=True, torch_dtype=torch.float16)
input_context = "Your text here"
input_ids = tokenizer.encode(input_context, return_tensors="pt")
output = model.generate(input_ids, max_length=128, temperature=0.7)
output_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(output_text)
Alternatively, you can set trust_remote_code=False if you prefer not to use flash attention.
Limitations and Bias
As with all language models, LLaMA-2-7B-32K may generate incorrect or biased content. It's important to keep this in mind when using the model. | f177deb3809dd17df19b1f4da7c13a71 | {
"intermediate": 0.44333216547966003,
"beginner": 0.26302874088287354,
"expert": 0.29363909363746643
} |
18,599 | can you have multiple rabbitmq shovel on the same queue? | 8e913d57b1f66ab8b7ea93d8704feb06 | {
"intermediate": 0.29062217473983765,
"beginner": 0.15516729652881622,
"expert": 0.5542105436325073
} |
18,600 | Are there any errors in this vba event: Sub ServiceDueSoon()
Dim wscf As Worksheet
Dim wsjr As Worksheet
Dim lastRow As Long
Dim copyRange As Range
Dim cell As Range
Set wscf = Sheets(Range("G3").Value)
Set wsjr = Sheets("Start Page")
Range("F5:F8").Calculate
Application.Wait (Now + TimeValue("0:00:01"))
ActiveSheet.Range("G3").formula = ActiveSheet.Range("G3").formula
Application.Wait (Now + TimeValue("0:00:01"))
ActiveSheet.Range("H3").formula = ActiveSheet.Range("H3").formula
If ActiveSheet.Range("G3") = "" Or 0 Then
Exit Sub
End If
Dim LastRowJ As Long
Dim lastRowF As Long
Dim i As Long
Set wscf = Sheets(Range("G3").Value)
Set wsjr = Sheets("Start Page")
LastRowJ = wscf.Cells(wscf.Rows.Count, 9).End(xlUp).Row
If LastRowJ < 5 Then
Exit Sub
End If
lastRowF = wsjr.Cells(wsjr.Rows.Count, "F").End(xlUp).Row + 1
' Add the label "Service Due Soon" in column F, row lastRowF
wsjr.Cells(lastRowF, 6).Value = "Service Due Soon"
' move down to the next row
lastRowF = lastRowF + 1
For i = LastRowJ To 1 Step -1
If wscf.Cells(i, "B") = "Service" Then
If wscf.Cells(i, "H").Value < Date + 31 Then
lastRowF = lastRowF + 1
End If
Next i
Call LastTwentyJobs
End Sub | bd3fd85f127142a82687cb9ba0a1ebf1 | {
"intermediate": 0.5848647952079773,
"beginner": 0.2219626009464264,
"expert": 0.1931726336479187
} |
18,601 | In MS SQL
Outer Join
Left Outer Join
Right Outer Join
Full Outer Join
Cross Join | 461282a213d828b1e722005919ed5f54 | {
"intermediate": 0.3029821217060089,
"beginner": 0.38043415546417236,
"expert": 0.3165837526321411
} |
18,602 | Give me code based on thos params: Get all informations of user's asset
GET https://contract.mexc.com/api/v1/private/account/assets
Required permissions: Trade reading permission
Rate limit:20 times/2 seconds
Request parameters:
None
Response parameters:
Parameter Data Type Description
currency string currency
positionMargin decimal position margin
frozenBalance decimal frozen balance
availableBalance decimal available balance
cashBalance decimal drawable balance
equity decimal total equity
unrealized decimal unrealized profit and loss | e5412f2c643f95326593303d17b20ae8 | {
"intermediate": 0.5138707160949707,
"beginner": 0.19634366035461426,
"expert": 0.2897855341434479
} |
18,603 | Give me Python code based on those params: Signature is not required for public endpoint.
For private endpoint, ApiKey, Request-Time, Signature and Content-Type need to be passed into the header, must be specified as application / JSON, Recv-Window (optional) parameters, Signature is a signature string. The signature rules are as follows:
1) When signing, you need to get the request parameter string first. It is "" if there is no parameter:
For GET/DELETE requests, the service parameters are spliced in dictionary order with & interval, and finally the signature target string is obtained (in the API of batch operation, if there are special symbols such as comma in the parameter value, these symbols need to be URL encoded when signing).
For POST requests, the signature parameter is a JSON string (dictionary sorting is not required).
2) After obtaining the parameter string, the signature target string is spliced. The rule is: accessKey + timestamp + obtained parameter string.
3) The HMAC SHA256 algorithm is used to sign the target string, and finally the signature is passed into the header as a parameter.
Note:
1) When the service parameter participating in the signature is null, it does not participate in the signature. For the path parameter, it does not participate in the signature; note that when get request stitches the parameter and pass it in the URL, if the parameter is null, it will be parsed into "" in the background parsing, fixed post request, when the parameter is null, do not pass the parameter, or set the value of the parameter to "" when signing, otherwise signature verification will fail.
2) When requesting, put the value of Request-Time used in signing into the Request-Time parameter of the header, put the obtained signature string into the signature parameter of the header, put the Access Key of APIKEY into the ApiKey parameter of the header, and pass the other service parameters.
3) The obtained signature string does not need to be base64 encoded. | c8455abfb7905192a5f6df2f5e8fc39f | {
"intermediate": 0.45599326491355896,
"beginner": 0.24054324626922607,
"expert": 0.3034634590148926
} |
18,604 | Can you show me how to write a real time rendering algorithm similar to eevee in Codea? | 77796b23c3ac5b4c0ce3d2a60bae4ea2 | {
"intermediate": 0.1147896870970726,
"beginner": 0.03329276666045189,
"expert": 0.8519175052642822
} |
18,605 | give me a blender script create a rigged small dog | b3954107357bf76ad2bf2b2e0dead38b | {
"intermediate": 0.37521693110466003,
"beginner": 0.33030444383621216,
"expert": 0.2944786250591278
} |
18,606 | <ComboSkill>
<Class index="0" check_quest="6"> <!-- 法师 -->
<SkillListFirst>
<Skill index="3"/> <!-- 掌心雷 -->
<Skill index="379"/> <!-- 掌心雷强化 -->
<Skill index="1"/> <!-- 毒咒 -->
<Skill index="384"/> <!-- 毒咒强化 -->
<Skill index="7"/> <!-- 冰封 -->
<Skill index="5"/> <!-- 火龙 -->
<Skill index="378"/> <!-- 火龙强化 -->
<Skill index="389"/> <!-- 冰封术强化 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="12"/> <!-- 极光 -->
<Skill index="14"/> <!-- 毁灭烈焰 -->
<Skill index="381"/> <!-- 毁灭烈焰强化 -->
<Skill index="38"/> <!-- 毒炎 -->
<Skill index="387"/> <!-- 毒炎强化 -->
<Skill index="39"/> <!-- 暴风雪 -->
<Skill index="391"/> <!-- 暴风雪强化 -->
<Skill index="393"/> <!-- 暴风雪精通 -->
</SkillListSecond>
</Class>
</ComboSkill> | aae93c5823f5cfcb77d41d4999e6a42f | {
"intermediate": 0.4104115664958954,
"beginner": 0.29594558477401733,
"expert": 0.29364287853240967
} |
18,607 | How I can place order through this code :def order(self,
symbol: str,
price: float,
vol: float,
side: int,
type: int,
open_type: int,
position_id: Optional[int] = None,
leverage: Optional[int] = None,
external_oid: Optional[str] = None,
stop_loss_price: Optional[float] = None,
take_profit_price: Optional[float] = None,
position_mode: Optional[int] = None,
reduce_only: Optional[bool] = False) -> dict:
"""
### Order (Under maintenance)
#### Required permissions: Trading permission
Rate limit: 20 times / 2 seconds
https://mxcdevelop.github.io/apidocs/contract_v1_en/#order-under-maintenance
:param symbol: the name of the contract
:type symbol: str
:param price: price
:type price: decimal
:param vol: volume
:type vol: decimal
:param leverage: (optional) leverage, Leverage is necessary on Isolated Margin
:type leverage: int
:param side: order direction 1 open long ,2close short,3open short ,4 close l
:type side: int
:param type: orderType,1:price limited order,2:Post Only Maker,3:transact or cancel instantly ,4 : transact completely or cancel completely,5:market orders,6 convert market price to current price
:type type: int
:param openType: open type,1:isolated,2:cross
:type openType: int
:param positionId: (optional) position Id, It is recommended to fill in this parameter when closing a position
:type positionId: long
:param externalOid: (optional) external order ID
:type externalOid: str
:param stopLossPrice: (optional) stop-loss price
:type stopLossPrice: decimal
:param takeProfitPrice: (optional) take-profit price
:type takeProfitPrice: decimal
:param positionMode: (optional) position mode,1:hedge,2:one-way,default: the user's current config
:type positionMode: int
:param reduceOnly: (optional) Default false,For one-way positions, if you need to only reduce positions, pass in true, and two-way positions will not accept this parameter.
:type reduceOnly: bool
:return: response dictionary
:rtype: dict
"""
return self.call("POST", "api/v1/private/order/submit",
params = dict(
symbol = symbol,
price = price,
vol = vol,
side = side,
type = type,
openType = open_type,
positionId = position_id,
leverage = leverage,
externalOid = external_oid,
stopLossPrice = stop_loss_price,
takeProfitPrice = take_profit_price,
positionMode = position_mode,
reduceOnly = reduce_only
)) | 37834d0297648b38bd682cf6eb307d69 | {
"intermediate": 0.3669683337211609,
"beginner": 0.28909367322921753,
"expert": 0.3439379632472992
} |
18,608 | <?xml version="1.0" encoding="utf-8"?>
<ComboSkill>
<Class index="0" check_quest="6"> <!-- 法师 -->
<SkillListFirst>
<Skill index="3"/> <!-- 掌心雷 -->
<Skill index="379"/> <!-- 掌心雷强化 -->
<Skill index="1"/> <!-- 毒咒 -->
<Skill index="384"/> <!-- 毒咒强化 -->
<Skill index="7"/> <!-- 冰封 -->
<Skill index="5"/> <!-- 火龙 -->
<Skill index="378"/> <!-- 火龙强化 -->
<Skill index="389"/> <!-- 冰封术强化 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="12"/> <!-- 极光 -->
<Skill index="14"/> <!-- 毁灭烈焰 -->
<Skill index="381"/> <!-- 毁灭烈焰强化 -->
<Skill index="38"/> <!-- 毒炎 -->
<Skill index="387"/> <!-- 毒炎强化 -->
<Skill index="39"/> <!-- 暴风雪 -->
<Skill index="391"/> <!-- 暴风雪强化 -->
<Skill index="393"/> <!-- 暴风雪精通 -->
</SkillListSecond>
</Class>
</ComboSkill>
<Class index="1" check_quest="3"> <!-- CLASS_DK -->
<SkillListFirst>
<Skill index="19"/> <!-- 地裂斩 -->
<Skill index="328"/> <!-- 地裂斩强化 -->
<Skill index="329"/> <!-- 牙突刺强化 -->
<Skill index="326"/> <!-- 旋风斩强化 -->
<Skill index="327"/> <!-- 天地十字剑强化 -->
<Skill index="20"/> <!-- 牙突刺 -->
<Skill index="21"/> <!-- 升龙击 -->
<Skill index="22"/> <!-- 旋风斩 -->
<Skill index="23"/> <!-- 天地十字剑 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="41"/> <!-- 霹雳回旋斩 -->
<Skill index="42"/> <!-- 雷霆裂闪 -->
<Skill index="43"/> <!-- 袭风刺 -->
<Skill index="232"/> <!-- 致命一击 -->
<Skill index="344"/> <!-- 血腥风暴 -->
<Skill index="339"/> <!-- 袭风刺熟练 -->
<Skill index="330"/> <!-- 霹雳回旋斩强化 -->
<Skill index="332"/> <!-- 霹雳回旋斩精通 -->
<Skill index="331"/> <!-- 雷霆裂闪强化 -->
<Skill index="333"/> <!-- 霹雳回旋斩精通 -->
<Skill index="342"/> <!-- 袭风刺精通 -->
</SkillListSecond>
</Class>
<Class index="2" check_quest="6"> <!-- CLASS_FE -->
<SkillListFirst>
<Skill index="24"/> <!-- 多重箭 -->
<Skill index="414"/> <!-- 多重箭强化 -->
<Skill index="418"/> <!-- 多重箭精通 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="46"/> <!-- 天堂之箭 -->
<Skill index="51"/> <!-- 冰封箭 -->
<Skill index="424"/> <!-- 冰箭强化 -->
<Skill index="235"/> <!-- 五重箭 -->
<Skill index="411"/> <!-- 五重箭强化 -->
<Skill index="431"/> <!-- 五重箭精通 -->
</SkillListSecond>
</Class>
<Class index="3" check_quest="6"> <!-- CLASS_MG -->
<SkillListFirst>
<Skill index="73"/> <!-- 幻魔光束 -->
<Skill index="57"/> <!-- 风舞回旋斩 -->
<Skill index="56"/> <!-- 天雷闪 -->
<Skill index="482"/> <!-- 天雷闪强化 -->
<Skill index="7"/> <!-- 冰封 -->
<Skill index="489"/> <!-- 冰封强化 -->
<Skill index="491"/> <!-- 冰封精通 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="236"/> <!-- 火剑袭 -->
<Skill index="492"/> <!-- 火剑袭强化 -->
<Skill index="494"/> <!-- 火剑袭精通 -->
<Skill index="55"/> <!-- 玄月斩 -->
<Skill index="493"/> <!-- 玄月斩精通 -->
<Skill index="237"/> <!-- 闪电轰顶 -->
<Skill index="496"/> <!-- 闪电轰顶强化 -->
<Skill index="12"/> <!-- 极光 -->
</SkillListSecond>
</Class>
<Class index="4" check_quest="6"> <!-- CLASS_DL -->
<SkillListFirst>
<Skill index="78"/> <!-- 火舞旋风 -->
<Skill index="518"/> <!-- 火舞旋风强化 -->
<Skill index="520"/> <!-- 火舞旋风精通 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="74"/> <!-- 神圣火焰 -->
<Skill index="61"/> <!-- 星云火链 -->
<Skill index="508"/> <!-- 星云火链强化 -->
<Skill index="514"/> <!-- 星云火链精通 -->
<Skill index="65"/> <!-- 圣极光 -->
<Skill index="519"/> <!-- 闪电之舞强化 -->
<Skill index="62"/> <!-- 地裂 -->
<Skill index="512"/> <!-- 地裂强化 -->
<Skill index="516"/> <!-- 地裂精通 -->
</SkillListSecond>
</Class>
<Class index="5" check_quest="6"> <!-- CLASS_SU -->
<SkillListFirst>
<Skill index="7"/> <!-- 冰封 -->
<Skill index="214"/> <!-- 摄魂咒 -->
<Skill index="458"/> <!-- 摄魂咒强化 -->
<Skill index="462"/> <!-- 摄魂咒精通 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="230"/> <!-- 烈光闪 -->
<Skill index="456"/> <!-- 烈光闪强化 -->
<Skill index="215"/> <!-- 链雷咒 -->
<Skill index="455"/> <!-- 链雷咒强化 -->
</SkillListSecond>
</Class>
<Class index="6" check_quest="6"> <!-- CLASS_RF -->
<SkillListFirst>
<Skill index="261"/> <!-- 斗气爆裂拳 -->
<Skill index="262"/> <!-- 回旋踢 -->
<Skill index="558"/> <!-- 回旋踢强化 -->
<Skill index="562"/> <!-- 回旋踢精通 -->
<Skill index="552"/> <!-- 斗气爆裂拳强化 -->
<Skill index="555"/> <!-- 斗气爆裂拳精通 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="265"/> <!-- 嗜血之龙 -->
<Skill index="564"/> <!-- 嗜血之龙强化 -->
<Skill index="566"/> <!-- 嗜血之龙精通 -->
<Skill index="263"/> <!-- 幽冥光速拳 -->
<Skill index="559"/> <!-- 幽冥光速拳强化 -->
<Skill index="563"/> <!-- 幽冥光速拳精通 -->
<Skill index="269"/> <!-- 冲锋 -->
</SkillListSecond>
</Class>
</ComboSkill> | 31fff68cc9d0eb84aedef17468305184 | {
"intermediate": 0.25943121314048767,
"beginner": 0.4016548693180084,
"expert": 0.3389139175415039
} |
18,609 | <?xml version="1.0" encoding="utf-8"?>
<ComboSkill>
<Class index="0" check_quest="6"> <!-- 法师 -->
<SkillListFirst>
<Skill index="3"/> <!-- 掌心雷 -->
<Skill index="379"/> <!-- 掌心雷强化 -->
<Skill index="1"/> <!-- 毒咒 -->
<Skill index="384"/> <!-- 毒咒强化 -->
<Skill index="7"/> <!-- 冰封 -->
<Skill index="5"/> <!-- 火龙 -->
<Skill index="378"/> <!-- 火龙强化 -->
<Skill index="389"/> <!-- 冰封术强化 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="12"/> <!-- 极光 -->
<Skill index="14"/> <!-- 毁灭烈焰 -->
<Skill index="381"/> <!-- 毁灭烈焰强化 -->
<Skill index="38"/> <!-- 毒炎 -->
<Skill index="387"/> <!-- 毒炎强化 -->
<Skill index="39"/> <!-- 暴风雪 -->
<Skill index="391"/> <!-- 暴风雪强化 -->
<Skill index="393"/> <!-- 暴风雪精通 -->
</SkillListSecond>
</Class>
</ComboSkill>
<Class index="1" check_quest="3"> <!-- CLASS_DK -->
<SkillListFirst>
<Skill index="19"/> <!-- 地裂斩 -->
<Skill index="328"/> <!-- 地裂斩强化 -->
<Skill index="329"/> <!-- 牙突刺强化 -->
<Skill index="326"/> <!-- 旋风斩强化 -->
<Skill index="327"/> <!-- 天地十字剑强化 -->
<Skill index="20"/> <!-- 牙突刺 -->
<Skill index="21"/> <!-- 升龙击 -->
<Skill index="22"/> <!-- 旋风斩 -->
<Skill index="23"/> <!-- 天地十字剑 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="41"/> <!-- 霹雳回旋斩 -->
<Skill index="42"/> <!-- 雷霆裂闪 -->
<Skill index="43"/> <!-- 袭风刺 -->
<Skill index="232"/> <!-- 致命一击 -->
<Skill index="344"/> <!-- 血腥风暴 -->
<Skill index="339"/> <!-- 袭风刺熟练 -->
<Skill index="330"/> <!-- 霹雳回旋斩强化 -->
<Skill index="332"/> <!-- 霹雳回旋斩精通 -->
<Skill index="331"/> <!-- 雷霆裂闪强化 -->
<Skill index="333"/> <!-- 霹雳回旋斩精通 -->
<Skill index="342"/> <!-- 袭风刺精通 -->
</SkillListSecond>
</Class>
<Class index="2" check_quest="6"> <!-- CLASS_FE -->
<SkillListFirst>
<Skill index="24"/> <!-- 多重箭 -->
<Skill index="414"/> <!-- 多重箭强化 -->
<Skill index="418"/> <!-- 多重箭精通 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="46"/> <!-- 天堂之箭 -->
<Skill index="51"/> <!-- 冰封箭 -->
<Skill index="424"/> <!-- 冰箭强化 -->
<Skill index="235"/> <!-- 五重箭 -->
<Skill index="411"/> <!-- 五重箭强化 -->
<Skill index="431"/> <!-- 五重箭精通 -->
</SkillListSecond>
</Class>
<Class index="3" check_quest="6"> <!-- CLASS_MG -->
<SkillListFirst>
<Skill index="73"/> <!-- 幻魔光束 -->
<Skill index="57"/> <!-- 风舞回旋斩 -->
<Skill index="56"/> <!-- 天雷闪 -->
<Skill index="482"/> <!-- 天雷闪强化 -->
<Skill index="7"/> <!-- 冰封 -->
<Skill index="489"/> <!-- 冰封强化 -->
<Skill index="491"/> <!-- 冰封精通 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="236"/> <!-- 火剑袭 -->
<Skill index="492"/> <!-- 火剑袭强化 -->
<Skill index="494"/> <!-- 火剑袭精通 -->
<Skill index="55"/> <!-- 玄月斩 -->
<Skill index="493"/> <!-- 玄月斩精通 -->
<Skill index="237"/> <!-- 闪电轰顶 -->
<Skill index="496"/> <!-- 闪电轰顶强化 -->
<Skill index="12"/> <!-- 极光 -->
</SkillListSecond>
</Class>
<Class index="4" check_quest="6"> <!-- CLASS_DL -->
<SkillListFirst>
<Skill index="78"/> <!-- 火舞旋风 -->
<Skill index="518"/> <!-- 火舞旋风强化 -->
<Skill index="520"/> <!-- 火舞旋风精通 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="74"/> <!-- 神圣火焰 -->
<Skill index="61"/> <!-- 星云火链 -->
<Skill index="508"/> <!-- 星云火链强化 -->
<Skill index="514"/> <!-- 星云火链精通 -->
<Skill index="65"/> <!-- 圣极光 -->
<Skill index="519"/> <!-- 闪电之舞强化 -->
<Skill index="62"/> <!-- 地裂 -->
<Skill index="512"/> <!-- 地裂强化 -->
<Skill index="516"/> <!-- 地裂精通 -->
</SkillListSecond>
</Class>
<Class index="5" check_quest="6"> <!-- CLASS_SU -->
<SkillListFirst>
<Skill index="7"/> <!-- 冰封 -->
<Skill index="214"/> <!-- 摄魂咒 -->
<Skill index="458"/> <!-- 摄魂咒强化 -->
<Skill index="462"/> <!-- 摄魂咒精通 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="230"/> <!-- 烈光闪 -->
<Skill index="456"/> <!-- 烈光闪强化 -->
<Skill index="215"/> <!-- 链雷咒 -->
<Skill index="455"/> <!-- 链雷咒强化 -->
</SkillListSecond>
</Class>
<Class index="6" check_quest="6"> <!-- CLASS_RF -->
<SkillListFirst>
<Skill index="261"/> <!-- 斗气爆裂拳 -->
<Skill index="262"/> <!-- 回旋踢 -->
<Skill index="558"/> <!-- 回旋踢强化 -->
<Skill index="562"/> <!-- 回旋踢精通 -->
<Skill index="552"/> <!-- 斗气爆裂拳强化 -->
<Skill index="555"/> <!-- 斗气爆裂拳精通 -->
</SkillListFirst>
<SkillListSecond>
<Skill index="265"/> <!-- 嗜血之龙 -->
<Skill index="564"/> <!-- 嗜血之龙强化 -->
<Skill index="566"/> <!-- 嗜血之龙精通 -->
<Skill index="263"/> <!-- 幽冥光速拳 -->
<Skill index="559"/> <!-- 幽冥光速拳强化 -->
<Skill index="563"/> <!-- 幽冥光速拳精通 -->
<Skill index="269"/> <!-- 冲锋 -->
</SkillListSecond>
</Class>
</ComboSkill> | 7fc89c470b3fbad6915f6faa44f5d42d | {
"intermediate": 0.25943121314048767,
"beginner": 0.4016548693180084,
"expert": 0.3389139175415039
} |
18,610 | In MS SQL
Exception Handling
Implementing Exception Handling
Adding and removing User Defined Error Messages To And From SQL Server Error Messages List
Raising Exceptions Manual | 4838ca6a1311cb350b84dce6960451a1 | {
"intermediate": 0.39881381392478943,
"beginner": 0.33162716031074524,
"expert": 0.2695590555667877
} |
18,611 | In PL/SQL
Iterations in PL/SQL
Simple LOOP,WHILE LOOP,FOR LOOP and NESTED LOOPS
SQL within PL/SQL
Composite Data types (Complete)
Cursor Management in PL/SQL
Implicit Cursors | 78aa0b2cd002f5618731b89a5113b6db | {
"intermediate": 0.15093645453453064,
"beginner": 0.7376999258995056,
"expert": 0.11136366426944733
} |
18,612 | I have a compile problem. In the following function the line "if (((LPTREEFOLDER)tvi.lParam)->m_nFolderId == folder_id)" crashed the program:
void SelectTreeViewFolder(int folder_id)
{
HWND hTreeView = GetTreeView();
HTREEITEM hti = TreeView_GetRoot(hTreeView);
TVITEM tvi;
memset(&tvi,0,sizeof(tvi));
while (hti != NULL)
{
tvi.hItem = hti;
tvi.mask = TVIF_PARAM;
(void)TreeView_GetItem(hTreeView, &tvi);
if (((LPTREEFOLDER)tvi.lParam)->m_nFolderId == folder_id)
{
(void)TreeView_SelectItem(hTreeView,tvi.hItem);
SetCurrentFolder((LPTREEFOLDER)tvi.lParam);
return;
}
HTREEITEM hti_next = TreeView_GetChild(hTreeView, hti);
if (hti_next == NULL)
{
hti_next = TreeView_GetNextSibling(hTreeView, hti);
if (hti_next == NULL)
{
hti_next = TreeView_GetParent(hTreeView, hti);
if (hti_next != NULL)
hti_next = TreeView_GetNextSibling(hTreeView, hti_next);
}
}
hti = hti_next;
}
// could not find folder to select
// make sure we select something
tvi.hItem = TreeView_GetRoot(hTreeView);
tvi.mask = TVIF_PARAM;
(void)TreeView_GetItem(hTreeView, &tvi);
(void)TreeView_SelectItem(hTreeView, tvi.hItem);
SetCurrentFolder((LPTREEFOLDER)tvi.lParam);
}
What can i do? | 0403f666b5f54ac92f1802608fa2c6f1 | {
"intermediate": 0.4135015308856964,
"beginner": 0.31102418899536133,
"expert": 0.27547430992126465
} |
18,613 | Select distinct t1.日期, xm.bh,xm.mc,fy.编码,fy.名称,t1."数量",t1."金额" ,t2."cb数量1",t2.cb数量2,t2.cb金额1+t3.sq金额1 金额合计,t2.cb金额2+t3.sq金额2 累计金额,t4.sp金额1,t5.fk金额1,t4.sp金额2,t5.fk金额2,t1.计量产值,t1.施工产值,t1.合同金额,t1.目标利润率
from
(select field0005 bh,field0007 mc from formmain_0190) xm
left join
/*项目预算表*/
(select distinct a.field0008"合同金额", a.field0033 计量产值, a.field0034 施工产值, a.field0009 目标利润率, convert(varchar(7),a.field0004,120)"日期", a.field0005"项目编码",a.field0006"项目名称",b.field0028"费用编码",b.field0018"费用类型",sum(b.field0019)over(partition by a.field0005,a.field0006,b.field0028,b.field0018,convert(varchar(7),a.field0004,120) order by convert(varchar(7),a.field0004,120))"数量",sum(b.field0021)over(partition by a.field0005,a.field0006,b.field0028,b.field0018,convert(varchar(7),a.field0004,120))"金额"
from formmain_0309 a left join formson_0312 b on a.id=b.formmain_id
where a.finishedflag=1
) "t1" on xm.bh=t1.项目编码
full join
( select field0007 编码,field0004"名称" from formmain_0275) fy on fy.编码=t1.费用编码
full join
/*成本过程结算*/
(select distinct convert(varchar(7),a.field0004,120)"日期1", a.field0015"项目编码1",a.field0016"项目名称1",b.field0035"费用编码1",b.field0036"费用名称1",sum(b.field0038)over(partition by convert(varchar(7),a.field0004,120), a.field0015,a.field0016,b.field0035,b.field0036) "cb数量1",
sum(b.field0038)over(partition by a.field0015,a.field0016,b.field0035,b.field0036 order by convert(varchar(7),a.field0004,120) ) "cb数量2",
sum(b.field0040)over(partition by convert(varchar(7),a.field0004,120), a.field0015,a.field0016,b.field0035,b.field0036) "cb金额1",
sum(b.field0040)over(partition by a.field0015,a.field0016,b.field0035,b.field0036 order by convert(varchar(7),a.field0004,120) ) "cb金额2"
from formmain_0316 a left join formson_0318 b on a.id=b.formmain_id where a.finishedflag=1)"t2"
on xm.bh=t2."项目编码1" and fy.编码=t2.费用编码1
full join
/*项目付款申请*/
(select distinct convert(varchar(7),a.field0005,120)"日期2",a.field0006"项目编码2",a.field0007"项目名称2",b.field0093"费用编码2",b.field0062"费用类型2",sum(b.field0050)over(partition by convert(varchar(7),a.field0005,120),a.field0006,b.field0093)"sq金额1",
sum(b.field0050)over(partition by a.field0006,a.field0007,b.field0093,b.field0062 order by convert(varchar(7),a.field0004,120) )"sq金额2"
from formmain_0360 a left join formson_0361 b on a.id=b.formmain_id where a.finishedflag=1)"t3"
on xm.bh=t3.项目编码2 and fy.编码=t3.费用编码2
full join
/*收票登记*/
(select distinct convert(varchar(7),a.field0009,120)"日期3",a.field0010"项目编码3",a.field0011"项目名称3",b.field0019"费用编码3",b.field0018"费用类型3",sum(b.field0015) over (partition by convert(varchar(7),a.field0009,120),a.field0010,a.field0011,b.field0019,b.field0018)"sp金额1" ,
sum(b.field0015) over (partition by a.field0010,a.field0011,b.field0019,b.field0018 order by convert(varchar(7),a.field0009,120))"sp金额2"
from formmain_0295 a left join formson_0296 b on a.id=b.formmain_id where a.finishedflag=1)"t4"
on xm.bh=t4.项目编码3 and fy.编码=t4.费用编码3
full join
/*项目付款*/
(select distinct convert(varchar(7),a.field0005,120)"日期4",a.field0006"项目编码4",a.field0007"项目名称4",b.field0093"费用编码4",b.field0062"费用名称4",sum(b.field0050)over(partition by convert(varchar(7),a.field0005,120),a.field0006,a.field0006,b.field0093,b.field0062)"fk金额1",sum(b.field0050)over(partition by convert(varchar(7),a.field0005,120),a.field0006,b.field0093 order by convert(varchar(7),a.field0009,120))"fk金额2"
from formmain_0380 a left join formson_0381 b on a.id=b.formmain_id where a.finishedflag=1)"t5"
on xm.bh=t5."项目编码4" and fy.编码=t5.费用编码4 | b58f791feefb88e55c8c523dd9ab4324 | {
"intermediate": 0.29196271300315857,
"beginner": 0.3961222767829895,
"expert": 0.31191498041152954
} |
18,614 | how to clear windows disk | b94660a7f9fb655411d135e28fefc139 | {
"intermediate": 0.3347451686859131,
"beginner": 0.40780094265937805,
"expert": 0.257453978061676
} |
18,615 | unserialize($_GET | 3a1551b5841bdd3b4c9f357eaaaf676a | {
"intermediate": 0.3241260051727295,
"beginner": 0.2817833125591278,
"expert": 0.3940907418727875
} |
18,616 | vue3+quasar为什么无法通过这样拿到两个id <div v-if="column.name === 'pkgTestTypeID'" :id="[props.row[row_key],props.row[row_key1]]" class="my_PK q-pa-none flex justify-center content-center" @click="handle_my_PK_Click" style="">
<span class="text-center" :id="[props.row[row_key],props.row[row_key1].pkgProjectComboID]">{{ props.row[column.field]?.pkgTestTypeName }}</span>
</div> | b4d90a13f9c1dd77985ed80f30b8823e | {
"intermediate": 0.4031068980693817,
"beginner": 0.28752338886260986,
"expert": 0.3093697428703308
} |
18,617 | i have this text رواية أماريتا .. أرض زيكولا 2 i want change its special chars with - | 652f90ca730eb3d9a0bf9300490cf5af | {
"intermediate": 0.316485196352005,
"beginner": 0.31420445442199707,
"expert": 0.36931031942367554
} |
18,618 | <div v-if="column.name === 'pkgTestTypeID'" :id="props.row[row_key]" :id1="props.row[row_key1].pkgProjectComboID" class="my_PK q-pa-none flex justify-center content-center" @click="handle_my_PK_Click" style="">
<span class="text-center" :id="props.row[row_key]" :id1="props.row[row_key1].pkgProjectComboID">{{ props.row[column.field]?.pkgTestTypeName }}</span>
</div>为什么这样子e.target.id能拿到id,但是这样拿不到id1 | c76714e0267632cdc247d5c28b1cb23d | {
"intermediate": 0.40946727991104126,
"beginner": 0.31929811835289,
"expert": 0.27123454213142395
} |
18,619 | write a very brief sentence for "I am interested in data science because" | b833037c3b9db7fd39ec2da54bb08094 | {
"intermediate": 0.11574911326169968,
"beginner": 0.07961895316839218,
"expert": 0.8046318888664246
} |
18,620 | /Fix grammar errors of following email, rewrite it to make the email more fluently, then name a title of the email. | be95346bd3ff4b9279bb3e84bf965e53 | {
"intermediate": 0.3399227559566498,
"beginner": 0.25156059861183167,
"expert": 0.40851664543151855
} |
18,621 | hi | c99d80e2cd239f1b460b451b36658ce4 | {
"intermediate": 0.3246487081050873,
"beginner": 0.27135494351387024,
"expert": 0.40399640798568726
} |
18,622 | How do I set Hibernate dialect for SQlite to be org.hibernate.community.dialect.SQLiteDialect? | c31a25a91b4353f05aaabefc17d87549 | {
"intermediate": 0.5160886645317078,
"beginner": 0.24082571268081665,
"expert": 0.24308563768863678
} |
18,623 | pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>MathenoHibernate</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<exec.mainClass>com.mycompany.mathenohibernate.MathenoHibernate</exec.mainClass>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.hibernate.orm/hibernate-core -->
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
<version>6.2.7.Final</version>
</dependency>
<!--https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc-->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.42.0.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate.orm/hibernate-community-dialects -->
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-community-dialects</artifactId>
<version>6.2.7.Final</version>
</dependency>
</dependencies>
</project>
ClientCode.java:
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
*/
package com.mycompany.mathenohibernate;
import org.hibernate.Session;
public class ClientCode {
public static void main(String[] args) {
System.out.println("Hello World!");
try {
Session session = HibernateUtil.getSessionFactory().openSession();
Object result = session.createNativeQuery("select version()").getSingleResult();
System.out.println("MY DATABASE VERSION IS::::\n"+result);
} catch (Exception e) {
//
}
}
}
HibernateUtil.java:
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.mycompany.mathenohibernate;
import org.hibernate.SessionFactory;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.Configuration;
public class HibernateUtil {
private static SessionFactory sessionFactory;
static {
try {
if(sessionFactory == null) {
Configuration cfg = new Configuration().configure();
StandardServiceRegistry ssRegistry = new StandardServiceRegistryBuilder().applySettings(cfg.getProperties()).build();
sessionFactory = cfg.buildSessionFactory(ssRegistry);
}
} catch(Exception e) {
e.printStackTrace();
}
}
public static SessionFactory getSessionFactory() {
return sessionFactory;
}
}
Output of running main method:
cd /home/user/NetBeansProjects/MathenoHibernate; JAVA_HOME=/app/jdk /app/netbeans/java/maven/bin/mvn -Dexec.vmArgs= "-Dexec.args=${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}" -Dexec.executable=/app/jdk/bin/java -Dexec.mainClass=com.mycompany.mathenohibernate.ClientCode -Dexec.classpathScope=runtime -Dexec.appArgs= process-classes org.codehaus.mojo:exec-maven-plugin:3.1.0:exec
Scanning for projects...
-------------------< com.mycompany:MathenoHibernate >-------------------
Building MathenoHibernate 1.0-SNAPSHOT
from pom.xml
--------------------------------[ jar ]---------------------------------
--- resources:3.3.0:resources (default-resources) @ MathenoHibernate ---
Copying 1 resource
--- compiler:3.10.1:compile (default-compile) @ MathenoHibernate ---
Nothing to compile - all classes are up to date
--- exec:3.1.0:exec (default-cli) @ MathenoHibernate ---
Hello World!
Aug. 26, 2023 12:49:02 A.M. org.hibernate.Version logVersion
INFO: HHH000412: Hibernate ORM core version 6.2.7.Final
Aug. 26, 2023 12:49:02 A.M. org.hibernate.cfg.Environment <clinit>
INFO: HHH000406: Using bytecode reflection optimizer
Aug. 26, 2023 12:49:02 A.M. org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using built-in connection pool (not intended for production use)
Aug. 26, 2023 12:49:02 A.M. org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001005: Loaded JDBC driver class: org.sqlite.JDBC
Aug. 26, 2023 12:49:02 A.M. org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001012: Connecting with JDBC URL [jdbc:sqlite:mydatabaseyo.sqlite]
Aug. 26, 2023 12:49:02 A.M. org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001001: Connection properties: {}
Aug. 26, 2023 12:49:02 A.M. org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001003: Autocommit mode: false
Aug. 26, 2023 12:49:02 A.M. org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections <init>
INFO: HHH10001115: Connection pool size: 20 (min=1)
Aug. 26, 2023 12:49:02 A.M. org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator initiateService
WARN: HHH000342: Could not obtain connection to query metadata
org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.dialect.SQLiteDialect] as strategy [org.hibernate.dialect.Dialect]
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:154)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:236)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:189)
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:123)
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:86)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:224)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:34)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:119)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:264)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:239)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:216)
at org.hibernate.boot.model.relational.Database.<init>(Database.java:45)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:230)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:198)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:166)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:125)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:451)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:102)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:910)
at com.mycompany.mathenohibernate.HibernateUtil.<clinit>(HibernateUtil.java:21)
at com.mycompany.mathenohibernate.ClientCode.main(ClientCode.java:13)
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [org.hibernate.dialect.SQLiteDialect]
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:123)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:150)
... 20 more
Caused by: java.lang.ClassNotFoundException: Could not load requested class : org.hibernate.dialect.SQLiteDialect
at org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader.findClass(AggregatedClassLoader.java:215)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:120)
... 21 more
Caused by: java.lang.Throwable
at org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader.findClass(AggregatedClassLoader.java:208)
... 26 more
Suppressed: java.lang.ClassNotFoundException: org.hibernate.dialect.SQLiteDialect
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader.findClass(AggregatedClassLoader.java:205)
... 26 more
Suppressed: java.lang.ClassNotFoundException: org.hibernate.dialect.SQLiteDialect
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader.findClass(AggregatedClassLoader.java:205)
... 26 more
Suppressed: java.lang.ClassNotFoundException: org.hibernate.dialect.SQLiteDialect
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader.findClass(AggregatedClassLoader.java:205)
... 26 more
org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] due to: Unable to resolve name [org.hibernate.dialect.SQLiteDialect] as strategy [org.hibernate.dialect.Dialect]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:277)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:239)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:216)
at org.hibernate.boot.model.relational.Database.<init>(Database.java:45)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:230)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:198)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:166)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:125)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:451)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:102)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:910)
at com.mycompany.mathenohibernate.HibernateUtil.<clinit>(HibernateUtil.java:21)
at com.mycompany.mathenohibernate.ClientCode.main(ClientCode.java:13)
Caused by: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.dialect.SQLiteDialect] as strategy [org.hibernate.dialect.Dialect]
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:154)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:236)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:189)
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:123)
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:86)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:274)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:34)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:119)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:264)
... 12 more
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [org.hibernate.dialect.SQLiteDialect]
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:123)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:150)
... 20 more
Caused by: java.lang.ClassNotFoundException: Could not load requested class : org.hibernate.dialect.SQLiteDialect
at org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader.findClass(AggregatedClassLoader.java:215)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:120)
... 21 more
Caused by: java.lang.Throwable
at org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader.findClass(AggregatedClassLoader.java:208)
... 26 more
Suppressed: java.lang.ClassNotFoundException: org.hibernate.dialect.SQLiteDialect
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader.findClass(AggregatedClassLoader.java:205)
... 26 more
Suppressed: java.lang.ClassNotFoundException: org.hibernate.dialect.SQLiteDialect
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader.findClass(AggregatedClassLoader.java:205)
... 26 more
Suppressed: java.lang.ClassNotFoundException: org.hibernate.dialect.SQLiteDialect
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader.findClass(AggregatedClassLoader.java:205)
... 26 more
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 1.428 s
Finished at: 2023-08-26T00:49:02-04:00
------------------------------------------------------------------------ | fffe8b18797f9401bcff9c324c057683 | {
"intermediate": 0.3337748646736145,
"beginner": 0.42758652567863464,
"expert": 0.23863868415355682
} |
18,624 | pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>MathenoHibernate</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<exec.mainClass>com.mycompany.mathenohibernate.MathenoHibernate</exec.mainClass>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.hibernate.orm/hibernate-core -->
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
<version>6.2.7.Final</version>
</dependency>
<!--https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc-->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.42.0.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate.orm/hibernate-community-dialects -->
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-community-dialects</artifactId>
<version>6.2.7.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate.orm/hibernate-dialects -->
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-dialects</artifactId>
<version>6.2.7.Final</version>
</dependency>
</dependencies>
</project>
cd /home/user/NetBeansProjects/MathenoHibernate; JAVA_HOME=/app/jdk /app/netbeans/java/maven/bin/mvn clean install
Scanning for projects...
-------------------< com.mycompany:MathenoHibernate >-------------------
Building MathenoHibernate 1.0-SNAPSHOT
from pom.xml
--------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/hibernate/orm/hibernate-dialects/6.2.7.Final/hibernate-dialects-6.2.7.Final.pom
The POM for org.hibernate.orm:hibernate-dialects:jar:6.2.7.Final is missing, no dependency information available
Downloading from central: https://repo.maven.apache.org/maven2/org/hibernate/orm/hibernate-dialects/6.2.7.Final/hibernate-dialects-6.2.7.Final.jar
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 1.348 s
Finished at: 2023-08-26T01:01:11-04:00
------------------------------------------------------------------------
Failed to execute goal on project MathenoHibernate: Could not resolve dependencies for project com.mycompany:MathenoHibernate:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: org.hibernate.orm:hibernate-dialects:jar:6.2.7.Final (absent): Could not find artifact org.hibernate.orm:hibernate-dialects:jar:6.2.7.Final in central (https://repo.maven.apache.org/maven2) -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
ClientCode.java:
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
*/
package com.mycompany.mathenohibernate;
import org.hibernate.Session;
public class ClientCode {
public static void main(String[] args) {
System.out.println("Hello World!");
try {
Session session = HibernateUtil.getSessionFactory().openSession();
Object result = session.createNativeQuery("select version()").getSingleResult();
System.out.println("MY DATABASE VERSION IS::::\n"+result);
} catch (Exception e) {
//
}
}
}
HibernateUtil.java:
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.mycompany.mathenohibernate;
import org.hibernate.SessionFactory;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.Configuration;
public class HibernateUtil {
private static SessionFactory sessionFactory;
static {
try {
if(sessionFactory == null) {
Configuration cfg = new Configuration().configure();
StandardServiceRegistry ssRegistry = new StandardServiceRegistryBuilder().applySettings(cfg.getProperties()).build();
sessionFactory = cfg.buildSessionFactory(ssRegistry);
}
} catch(Exception e) {
e.printStackTrace();
}
}
public static SessionFactory getSessionFactory() {
return sessionFactory;
}
} | e0c15661902530b4c613b00ea2d1a9d6 | {
"intermediate": 0.3895246684551239,
"beginner": 0.3395172357559204,
"expert": 0.2709580659866333
} |
18,625 | Read this log grok expression Provided Grok expressions do not match field value: [2023-08-25 05:57:00 172.19.125.203 POST /UAT_SMF/OrganizationalSetup/EmployeeMaster - 443 - 172.19.101.152 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/114.0.0.0+Safari/537.36 https://sit.osourceglobal.com/UAT_SMF/OrganizationalSetup/EmployeeMaster 200 0 0 61287 3452 57 61.247.249.62] | 665bd17589f9e3066f9c5df2176a815e | {
"intermediate": 0.4673808217048645,
"beginner": 0.21992583572864532,
"expert": 0.31269338726997375
} |
18,626 | select xm.field0005 bh,xm.field0007 mc,fy.field0007 编码,fy.field0004"名称",rq.field0001 rq,xm.field0122 cz,xm.field0121 jl,xm.field0078 zb,xm.field0103 lr from formmain_0275 fy full join formmain_0190 xm
on 1=1 full join formmain_0394 rq on 1=1 | 134b6f6b41c814968368622dcc4b6517 | {
"intermediate": 0.33188948035240173,
"beginner": 0.3372798264026642,
"expert": 0.3308306932449341
} |
18,627 | select qb.bh,qb.mc,qb.编码,qb.名称,t1."数量",t1."金额" ,t2."cb数量1",t2.cb数量2,t2.cb金额1+t3.sq金额1 金额合计,t2.cb金额2+t3.sq金额2 累计金额,t4.sp金额1,t5.fk金额1,t4.sp金额2,t5.fk金额2,qb.rq,qb.cz,qb.jl,qb.qb,qb.lr from
(select xm.field0005 bh,xm.field0007 mc,fy.field0007 编码,fy.field0004"名称",rq.field0001 rq,xm.field0122 cz,xm.field0121 jl,xm.field0078 zb,xm.field0103 lr
from formmain_0275 fy
full join
formmain_0190 xm
on 1=1 full join formmain_0394 rq on 1=1)
qb
left join
/*成本过程结算*/
(select convert(varchar(7),a.field0004,120)"日期1", a.field0015"项目编码1",a.field0016"项目名称1",b.field0035"费用编码1",b.field0036"费用名称1",sum(b.field0038)over(partition by convert(varchar(7),a.field0004,120), a.field0015,a.field0016,b.field0035,b.field0036) "cb数量1",
sum(b.field0038)over(partition by a.field0015,a.field0016,b.field0035,b.field0036 order by convert(varchar(7),a.field0004,120) ) "cb数量2",
sum(b.field0040)over(partition by convert(varchar(7),a.field0004,120), a.field0015,a.field0016,b.field0035,b.field0036) "cb金额1",
sum(b.field0040)over(partition by a.field0015,a.field0016,b.field0035,b.field0036 order by convert(varchar(7),a.field0004,120) ) "cb金额2"
from formmain_0316 a left join formson_0318 b on a.id=b.formmain_id where a.finishedflag=1)"t2"
on qb.bh=t2."项目编码1" and qb.编码=t2.费用编码 and qb.rq=t2.日期
left join
/*项目预算表*/
(select convert(varchar(7),a.field0004,120)"日期", a.field0005"项目编码",a.field0006"项目名称",b.field0028"费用编码",b.field0018"费用类型",sum(b.field0019)over(partition by a.field0005,a.field0006,b.field0028,b.field0018,convert(varchar(7),a.field0004,120) order by convert(varchar(7),a.field0004,120))"数量",sum(b.field0021)over(partition by a.field0005,a.field0006,b.field0028,b.field0018,convert(varchar(7),a.field0004,120))"金额"
from formmain_0309 a left join formson_0312 b on a.id=b.formmain_id
where a.finishedflag=1
) "t1" on qb.bh=t2."项目编码1" and qb.编码=t2.费用编码 and qb.rq=t2.日期
left join
/*项目付款申请*/
(select convert(varchar(7),a.field0005,120)"日期2",a.field0006"项目编码2",a.field0007"项目名称2",b.field0093"费用编码2",b.field0062"费用类型2",sum(b.field0050)over(partition by convert(varchar(7),a.field0005,120),a.field0006,b.field0093)"sq金额1",
sum(b.field0050)over(partition by a.field0006,a.field0007,b.field0093,b.field0062 order by convert(varchar(7),a.field0004,120) )"sq金额2"
from formmain_0360 a left join formson_0361 b on a.id=b.formmain_id where a.finishedflag=1)"t3"
on qb.bh=t2."项目编码1" and qb.编码=t2.费用编码 and qb.rq=t2.日期
left join
/*收票登记*/
(select convert(varchar(7),a.field0009,120)"日期3",a.field0010"项目编码3",a.field0011"项目名称3",b.field0019"费用编码3",b.field0018"费用类型3",sum(b.field0015) over (partition by convert(varchar(7),a.field0009,120),a.field0010,a.field0011,b.field0019,b.field0018)"sp金额1" ,
sum(b.field0015) over (partition by a.field0010,a.field0011,b.field0019,b.field0018 order by convert(varchar(7),a.field0009,120))"sp金额2"
from formmain_0295 a left join formson_0296 b on a.id=b.formmain_id where a.finishedflag=1)"t4"
on qb.bh=t2."项目编码1" and qb.编码=t2.费用编码 and qb.rq=t2.日期
left join
/*项目付款*/
(select convert(varchar(7),a.field0005,120)"日期4",a.field0006"项目编码4",a.field0007"项目名称4",b.field0093"费用编码4",b.field0062"费用名称4",sum(b.field0050)over(partition by convert(varchar(7),a.field0005,120),a.field0006,a.field0006,b.field0093,b.field0062)"fk金额1",sum(b.field0050)over(partition by convert(varchar(7),a.field0005,120),a.field0006,b.field0093 order by convert(varchar(7),a.field0009,120))"fk金额2"
from formmain_0380 a left join formson_0381 b on a.id=b.formmain_id where a.finishedflag=1)"t5"
on qb.bh=t2."项目编码1" and qb.编码=t2.费用编码 and qb.rq=t2.日期 | 0c3ce33c6f83b102a495f0687000f4f8 | {
"intermediate": 0.2631129026412964,
"beginner": 0.47247132658958435,
"expert": 0.26441577076911926
} |
18,628 | code for the meter for the period with Аrduino? | bebf2f64959248d67ab4c90bbf406030 | {
"intermediate": 0.3152909576892853,
"beginner": 0.1839759200811386,
"expert": 0.5007331371307373
} |
18,629 | This line of code opens NotePad - Shell "notepad.exe", vbNormalFocus - is there a way to set the window size of NotePad when it opens | 01fd997b1701dc86c4bf2e44c22ffa06 | {
"intermediate": 0.5662103295326233,
"beginner": 0.16916795074939728,
"expert": 0.2646217346191406
} |
18,630 | how to show plots in pandas of timeseries without gaps if I use datetime index | 4ada2fa68244a213a3d2c12e752edd93 | {
"intermediate": 0.44367536902427673,
"beginner": 0.15323388576507568,
"expert": 0.4030907154083252
} |
18,631 | Hi HuggingFace! I'm building a project because I thought it would be a great idea. I want you to help me build Geometry Dash. | 730dcf5cd10576c274ba1c8de1a3009f | {
"intermediate": 0.3732340633869171,
"beginner": 0.2787865698337555,
"expert": 0.347979336977005
} |
18,632 | write FQA have open-close tag flutter | a4aebe52368f48ba41ffcd1b67300415 | {
"intermediate": 0.2989003658294678,
"beginner": 0.418460875749588,
"expert": 0.2826387882232666
} |
18,633 | How my code of order need to seem with thise params: def order(self,
symbol: str,
price: float,
vol: float,
side: int,
type: int,
open_type: int,
position_id: Optional[int] = None,
leverage: Optional[int] = None,
external_oid: Optional[str] = None,
stop_loss_price: Optional[float] = None,
take_profit_price: Optional[float] = None,
position_mode: Optional[int] = None,
reduce_only: Optional[bool] = False) -> dict:
"""
### Order (Under maintenance)
#### Required permissions: Trading permission
Rate limit: 20 times / 2 seconds
https://mxcdevelop.github.io/apidocs/contract_v1_en/#order-under-maintenance
:param symbol: the name of the contract
:type symbol: str
:param price: price
:type price: decimal
:param vol: volume
:type vol: decimal
:param leverage: (optional) leverage, Leverage is necessary on Isolated Margin
:type leverage: int
:param side: order direction 1 open long ,2close short,3open short ,4 close l
:type side: int
:param type: orderType,1:price limited order,2:Post Only Maker,3:transact or cancel instantly ,4 : transact completely or cancel completely,5:market orders,6 convert market price to current price
:type type: int
:param openType: open type,1:isolated,2:cross
:type openType: int
:param positionId: (optional) position Id, It is recommended to fill in this parameter when closing a position
:type positionId: long
:param externalOid: (optional) external order ID
:type externalOid: str
:param stopLossPrice: (optional) stop-loss price
:type stopLossPrice: decimal
:param takeProfitPrice: (optional) take-profit price
:type takeProfitPrice: decimal
:param positionMode: (optional) position mode,1:hedge,2:one-way,default: the user's current config
:type positionMode: int
:param reduceOnly: (optional) Default false,For one-way positions, if you need to only reduce positions, pass in true, and two-way positions will not accept this parameter.
:type reduceOnly: bool
:return: response dictionary
:rtype: dict
"""
return self.call("POST", "api/v1/private/order/submit",
params = dict(
symbol = symbol,
price = price,
vol = vol,
side = side,
type = type,
openType = open_type,
positionId = position_id,
leverage = leverage,
externalOid = external_oid,
stopLossPrice = stop_loss_price,
takeProfitPrice = take_profit_price,
positionMode = position_mode,
reduceOnly = reduce_only
)) | 2bdb98ad3bdb678cef7f924c2c29236e | {
"intermediate": 0.37359288334846497,
"beginner": 0.34750816226005554,
"expert": 0.2788989543914795
} |
18,634 | hey. can you write me an eample of html css code to make a landing page in neuromorphic style ? | 90205017179ce01a83f7f02459d14dcf | {
"intermediate": 0.2431224286556244,
"beginner": 0.1970619559288025,
"expert": 0.5598156452178955
} |
18,635 | 请逐句翻译一下Python代码:import string
upperletter = string.ascii_uppercase
s = input().upper()
code = list(set(upperletter) - set(s))
code.sort()
ls = list(set(s))
ls.sort(key=s.index)
keys = "".join(ls + code)
decode = input().upper()
table = "".maketrans(upperletter,keys)
print(decode.translate(table)) | 4efc6a5a27bce6d7129aa8ba5ddbac1d | {
"intermediate": 0.4058227241039276,
"beginner": 0.28932666778564453,
"expert": 0.30485066771507263
} |
18,636 | I have this code : def order(self,
symbol: str,
price: float,
vol: float,
side: int,
type: int,
open_type: int,
position_id: Optional[int] = None,
leverage: Optional[int] = None,
external_oid: Optional[str] = None,
stop_loss_price: Optional[float] = None,
take_profit_price: Optional[float] = None,
position_mode: Optional[int] = None,
reduce_only: Optional[bool] = False) -> dict:
"""
### Order (Under maintenance)
#### Required permissions: Trading permission
Rate limit: 20 times / 2 seconds
https://mxcdevelop.github.io/apidocs/contract_v1_en/#order-under-maintenance
:param symbol: the name of the contract
:type symbol: str
:param price: price
:type price: decimal
:param vol: volume
:type vol: decimal
:param leverage: (optional) leverage, Leverage is necessary on Isolated Margin
:type leverage: int
:param side: order direction 1 open long ,2close short,3open short ,4 close l
:type side: int
:param type: orderType,1:price limited order,2:Post Only Maker,3:transact or cancel instantly ,4 : transact completely or cancel completely,5:market orders,6 convert market price to current price
:type type: int
:param openType: open type,1:isolated,2:cross
:type openType: int
:param positionId: (optional) position Id, It is recommended to fill in this parameter when closing a position
:type positionId: long
:param externalOid: (optional) external order ID
:type externalOid: str
:param stopLossPrice: (optional) stop-loss price
:type stopLossPrice: decimal
:param takeProfitPrice: (optional) take-profit price
:type takeProfitPrice: decimal
:param positionMode: (optional) position mode,1:hedge,2:one-way,default: the user's current config
:type positionMode: int
:param reduceOnly: (optional) Default false,For one-way positions, if you need to only reduce positions, pass in true, and two-way positions will not accept this parameter.
:type reduceOnly: bool
:return: response dictionary
:rtype: dict
"""
Give me code through code which I can place my orders | ad3798ff5e3d7c8ab2f0b95b5d673739 | {
"intermediate": 0.3291022479534149,
"beginner": 0.3464024066925049,
"expert": 0.324495404958725
} |
18,637 | Modal with id staticModal has not been initialized. Please initialize it using the data-modal-target attribute. in tailwindcss | 4d7eac7b5ce88c0594a5aedcfd999051 | {
"intermediate": 0.3855022192001343,
"beginner": 0.22789105772972107,
"expert": 0.3866066634654999
} |
18,638 | Please write a Delphi function calcultating the time of sun rise | f14dc31f7a062b93f63132335b2e1114 | {
"intermediate": 0.34588855504989624,
"beginner": 0.3053797483444214,
"expert": 0.34873166680336
} |
18,639 | Please write a Delphi function that can calculate sun rise and sun set in ancient time | ec29896d89ef2ed5e50b55489a4770bf | {
"intermediate": 0.3796384334564209,
"beginner": 0.32771867513656616,
"expert": 0.29264286160469055
} |
18,640 | progress downloading flutter | 0d1e320ee1c0b017d43343e62d53ab84 | {
"intermediate": 0.3054211437702179,
"beginner": 0.23029005527496338,
"expert": 0.4642888009548187
} |
18,641 | How to use a variable to be displayed in a input prompt in python | 26e7c92090cac06c036cb66250a3992b | {
"intermediate": 0.3311082422733307,
"beginner": 0.5361902713775635,
"expert": 0.13270147144794464
} |
18,642 | есть ли ошибки в коде:
from threading import Thread
from time import sleep
from PIL import ImageGrab
from googletrans import Translator
import pytesseract
from colorama import Fore
import cv2
import numpy as np
import re
import keyboard
import pyautogui
custom_conf = "--psm 11 --oem 1"
translator = Translator()
sharpening_kernel = np.array([
[-1, -1, -1],
[-1, 9, -1],
[-1, -1, -1]
], dtype=np.float32)
preset = 1
last_result = None
last_phone = None
def tr(image):
global last_result
pytesseract.pytesseract.tesseract_cmd = r"D:\Tesseract\tesseract.exe"
result = pytesseract.image_to_string(image, config=custom_conf, output_type='string')
if result != last_result:
try:
text = re.sub("\n", " - ", result, count=1)
text = re.sub("\n", " ", text)
text = text.replace('|', 'I')
print(Fore.RED + '--en--')
print(Fore.RED + text)
translate = translator.translate(text, dest='ru')
print(Fore.GREEN + '--ru--')
print(Fore.GREEN + translate.text)
last_result = result
except:
pass
def tr_phone(image, image_phone):
global last_result
global last_phone
pytesseract.pytesseract.tesseract_cmd = r"D:\Tesseract\tesseract.exe"
phone = pytesseract.image_to_string(image_phone, config=custom_conf, output_type='string')
if phone != last_phone:
try:
ptext = re.sub("\n", " - ", phone, count=1)
ptext = re.sub("\n", " ", ptext)
ptext = ptext.replace('|', 'I')
print(Fore.CYAN + 'Phone')
print(Fore.RED + '--en--')
print(Fore.RED + ptext)
translate = translator.translate(ptext, dest='ru')
print(Fore.GREEN + '--ru--')
print(Fore.GREEN + translate.text)
last_phone = phone
except:
pass
result = pytesseract.image_to_string(image, config=custom_conf, output_type='string')
if result != last_result:
try:
text = re.sub("\n", " - ", result, count=1)
text = re.sub("\n", " ", text)
text = text.replace('|', 'I')
print(Fore.CYAN + 'Kiruy')
print(Fore.RED + '--en--')
print(Fore.RED + text)
translate = translator.translate(text, dest='ru')
print(Fore.GREEN + '--ru--')
print(Fore.GREEN + translate.text)
last_result = result
except:
pass
def tr_cut_mess(image):
global last_result
pytesseract.pytesseract.tesseract_cmd = r"D:\Tesseract\tesseract.exe"
result = pytesseract.image_to_string(image, config=custom_conf, output_type='string')
if result != last_result:
try:
text = re.sub("\n", " ", result)
text = text.replace('|', 'I')
print(Fore.RED + '--en--')
print(Fore.RED + text)
translate = translator.translate(text, dest='ru')
print(Fore.GREEN + '--ru--')
print(Fore.GREEN + translate.text)
last_result = result
except:
pass
def crop(image):
match preset:
case 1:
crop_sub = image[765:1000, 450:1480]
preprocessing(crop_sub)
case 2:
crop_phone = image[100:260, 500:1500]
crop_sub = image[765:1000, 450:1480]
preprocessing_phone(crop_sub, crop_phone)
case 3:
crop_cut = image[880:1050, 440:1480]
preprocessing_cutscene(crop_cut)
case 4:
mess_crop = image[400:875, 630:1320]
preprocessing_message(mess_crop)
def preprocessing(image):
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
_, image = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)
image = cv2.medianBlur(image, 3)
image = cv2.filter2D(image, -1, sharpening_kernel)
tr(image)
def preprocessing_phone(image, image_phone):
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
_, image = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)
image = cv2.medianBlur(image, 3)
image = cv2.filter2D(image, -1, sharpening_kernel)
gray = cv2.cvtColor(image_phone, cv2.COLOR_BGR2GRAY)
_, image_phone = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)
image_phone = cv2.medianBlur(image_phone, 3)
image_phone = cv2.filter2D(image_phone, -1, sharpening_kernel)
tr_phone(image, image_phone)
def preprocessing_cutscene(image):
hsv = cv2.cvtColor(image, cv2.COLOR_BGR2HSV)
lower_white = np.array([230, 230, 230])
upper_white = np.array([255, 255, 255])
mask = cv2.inRange(image, lower_white, upper_white)
image = cv2.bitwise_and(image, image, mask=mask)
image[np.where((image == [0, 0, 0]).all(axis=2))] = [0, 0, 0]
image = cv2.bitwise_not(image)
image = cv2.medianBlur(image, 3)
image = cv2.filter2D(image, -1, sharpening_kernel)
tr_cut_mess(image)
def preprocessing_message(image):
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
_, image = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)
image = cv2.medianBlur(image, 3)
image = cv2.filter2D(image, -1, sharpening_kernel)
tr_cut_mess(image)
def main():
global preset
block_number = 1
last_clipboard_image = ImageGrab.grabclipboard()
while True:
if block_number == 'auto':
while True:
screen = pyautogui.screenshot()
screen = np.array(screen)
crop(screen)
sleep(0.5)
if keyboard.is_pressed('f'):
break
if keyboard.is_pressed('z'):
preset = 1
print(Fore.YELLOW + 'preset - dialog')
if keyboard.is_pressed('x'):
preset = 2
print(Fore.YELLOW + 'preset - phone dialog')
if keyboard.is_pressed('c'):
preset = 3
print(Fore.YELLOW + 'preset - cutscene')
if keyboard.is_pressed('v'):
preset = 4
print(Fore.YELLOW + 'preset - message')
elif block_number == 'screen':
while True:
clipboard_image = ImageGrab.grabclipboard()
if clipboard_image is not None and clipboard_image != last_clipboard_image:
screen = np.array(clipboard_image)
crop(screen)
last_clipboard_image = clipboard_image
sleep(0.5)
if keyboard.is_pressed('f'):
break
if keyboard.is_pressed('z'):
preset = 1
print(Fore.YELLOW + 'preset - dialog')
if keyboard.is_pressed('x'):
preset = 2
print(Fore.YELLOW + 'preset - phone dialog')
if keyboard.is_pressed('c'):
preset = 3
print(Fore.YELLOW + 'preset - cutscene')
if keyboard.is_pressed('v'):
preset = 4
print(Fore.YELLOW + 'preset - message')
block_number = 'auto' if block_number == 'screen' else 'screen'
print(Fore.YELLOW + block_number)
thread = Thread(target=main)
thread.start()
thread.join() | 4c57a8d0399fdbe08a9f3c0c017aba38 | {
"intermediate": 0.26942178606987,
"beginner": 0.5653812885284424,
"expert": 0.16519695520401
} |
18,643 | php remove all files and folders | d33e445ebc5041d5f0fac4130a3b7167 | {
"intermediate": 0.41228410601615906,
"beginner": 0.22062459588050842,
"expert": 0.3670913279056549
} |
18,644 | create table emp(id int, name varchar(20))
create table officevisits(emp_id int, visit_id int, visit_date date)
insert into emp values (1,'Anna'), (2, 'Nancy')
insert into officevisits values(1,1,'2023-04-01'),
(1,2,'2023-04-03'),
(2,1,'2023-04-02'),
(2,2,'2023-04-05')
select id, name from emp
select emp_id, visit_id, visit_date from officevisits
--====== Q: give me information of id, name, absencedate for the period between '2023-04-01' and '2023-04-10'
;with a as
(
select cast('2023-04-01' as date) as dates
union all
select dateadd(day,1, dates) from a where dates < '2023-04-10'
)
select id, name, dates from a
cross join emp b
left join officevisits c
on b.id = c.emp_id and a.dates = c.visit_date
where c.emp_id is null
order by id, dates
--1. do with while statement for above Q | 3c430414d9c36be5222e6b07d006b0fb | {
"intermediate": 0.3485458195209503,
"beginner": 0.37798288464546204,
"expert": 0.27347129583358765
} |
18,645 | write code pass data to new root flutter | 8e53eeb33afd0e53cbc65e2be8cc9ab3 | {
"intermediate": 0.43207401037216187,
"beginner": 0.2441537082195282,
"expert": 0.3237723112106323
} |
18,646 | write code flutter save data without SharedPreferences | e5491d6444c32345935e6f2a644ff646 | {
"intermediate": 0.6103726029396057,
"beginner": 0.15364554524421692,
"expert": 0.2359817773103714
} |
18,647 | hi | c726cf8e1b8a8bd0260e3c296e447b93 | {
"intermediate": 0.3246487081050873,
"beginner": 0.27135494351387024,
"expert": 0.40399640798568726
} |
18,648 | --2.make date values appear as date on mysql: the result must be 1-23-22 | 2a78836d1328d0db2cbcdd9abff4c086 | {
"intermediate": 0.4717271625995636,
"beginner": 0.19676800072193146,
"expert": 0.33150482177734375
} |
18,649 | hI THERE | 06eddfa6d1178e4a5292801cc986c681 | {
"intermediate": 0.3202860355377197,
"beginner": 0.29859229922294617,
"expert": 0.3811216354370117
} |
18,650 | create table dates ([date] varchar(20))
insert into dates values ('12322'),('11122'),('21821'),('30723'),('40920'),('111223'),('121320')
select * from dates, --2.make date values appear as date on mysql: | 41088d1ab52dcc350033145ff3f3f4ef | {
"intermediate": 0.40167245268821716,
"beginner": 0.29167360067367554,
"expert": 0.3066539168357849
} |
18,651 | How to disable the first operation when the window has just appeared?
bool isFocusWindow = false;
std::string callback;
HWND foregroundWindow;
//init window...
foregroundWindow = GetForegroundWindow();
callback = "launcherOutOfFocus";
bool noQuit = true;
while (noQuit)
{
if (isFocusWindow && callback != "launcherInFocus")
{
g_playerASI->Call(L"launcherInFocus");
callback = "launcherInFocus";
}
else if (!isFocusWindow && callback != "launcherOutOfFocus")
{
g_playerASI->Call(L"launcherOutOfFocus");
callback = "launcherOutOfFocus";
}
if (GetForegroundWindow() != foregroundWindow)
isFocusWindow = false;
else
isFocusWindow = true;
} | 9d38a2a5f3b92a954054e358101b78b7 | {
"intermediate": 0.3304072916507721,
"beginner": 0.48172086477279663,
"expert": 0.18787187337875366
} |
18,652 | const Cup = ({workerRef, symbol, settings, setShowSettings}: CupProps) => {
const cupParams = useSelector((state: AppState) => state.cupSlice);
const [dpiScale, setDpiScale] = useState(Math.ceil(window.devicePixelRatio));
const [canvasSize, setCanvasSize] = useState<CanvasSize>({height: 0, width: 0});
const containerRef = useRef<HTMLDivElement|null>(null);
const canvasRef = useRef<HTMLCanvasElement|null>(null);
useEffect(() => {
if (!workerRef.current) return;
let animationFrameId: number|null = null;
workerRef.current.onmessage = (event: MessageEvent<{
type: string,
camera: number,
aggregation: number,
bestBidPrice: number,
bestAskPrice: number,
maxVolume: number,
pricePrecision: number,
quantityPrecision: number,
priceStep: number,
cup: {[key: number]: CupItem},
rowsCount: number,
volumeAsDollars: boolean,
}>) => {
if (event?.data?.type === "update_cup") {
if (null !== animationFrameId) {
cancelAnimationFrame(animationFrameId);
}
animationFrameId = requestAnimationFrame(() => {
const context = canvasRef.current?.getContext("2d");
const zoomedTickSize = event.data.priceStep * event.data.aggregation;
if (context) {
const rowsOnScreenCount = cupTools.getRowsCountOnScreen(
canvasSize.height,
cupOptions().cell.defaultHeight * dpiScale,
);
const realCellHeight = parseInt((canvasSize.height / rowsOnScreenCount).toFixed(0));
if (event.data.rowsCount !== rowsOnScreenCount) {
workerRef.current?.postMessage(JSON.stringify({type: "change_rows_count", value: rowsOnScreenCount}));
}
cupDrawer.clear(context, canvasSize);
if (cupParams.rowCount !== rowsOnScreenCount
|| cupParams.cellHeight !== realCellHeight
|| cupParams.aggregation !== event.data.aggregation
) {
dispatch(setCupParams({
aggregation: event.data.aggregation,
rowCount: rowsOnScreenCount,
cellHeight: realCellHeight,
pricePrecision: event.data.pricePrecision,
priceStep: event.data.priceStep,
quantityPrecision: event.data.quantityPrecision,
}));
}
if (event.data.camera === 0 && isLoaded) {
setIsLoaded(false);
}
if (event.data.camera > 0 && !isLoaded) {
setIsLoaded(true);
}
if (event.data.camera !== 0) {
cupDrawer.draw(
context,
canvasSize,
dpiScale,
event.data.bestBidPrice,
event.data.bestAskPrice,
event.data.maxVolume,
event.data.pricePrecision,
event.data.quantityPrecision,
event.data.priceStep,
event.data.aggregation,
rowsOnScreenCount,
event.data.camera,
realCellHeight,
{
buy: parseInt((Math.floor(event.data.bestBidPrice / zoomedTickSize) * zoomedTickSize).toFixed(0)),
sell: parseInt((Math.ceil(event.data.bestAskPrice / zoomedTickSize) * zoomedTickSize).toFixed(0)),
},
darkMode,
event.data.volumeAsDollars,
handleClick,
event.data.cup,
);
}
}
});
}
};
return () => {
if (null !== animationFrameId) {
cancelAnimationFrame(animationFrameId);
}
};
}, [workerRef.current, canvasSize, darkMode, dpiScale, isLoaded]);
return <div ref={containerRef} className={styles.canvasWrapper}>
<canvas
ref={canvasRef}
className={[styles.canvas, isLoaded ? "" : styles.loading].join(" ")}
width={canvasSize?.width}
height={canvasSize?.height}
/>
</div>;
};
export default Cup;
const cupDrawer = {
clear: (ctx: CanvasRenderingContext2D, size: CanvasSize) => {
ctx.clearRect(0, 0, size.width, size.height);
},
draw: (
ctx: CanvasRenderingContext2D,
size: CanvasSize,
dpiScale: number,
bestBidPrice: number,
bestAskPrice: number,
maxVolume: number,
pricePrecision: number,
quantityPrecision: number,
priceStep: number,
zoom: number,
rowCount: number,
camera: number,
cellHeight: number,
zoomedBestMicroPrice: any,
darkMode: boolean,
volumeAsDollars: boolean,
handleClick: any,
cup: {[key: number]: CupItem},
) => {
const zoomedTickSize = priceStep * zoom;
const startMicroPrice = camera + rowCount / 2 * zoomedTickSize - zoomedTickSize;
const quantityDivider = Math.pow(10, quantityPrecision);
const priceDivider = Math.pow(10, pricePrecision);
for (let index = 0; index <= rowCount; index++) {
const microPrice = startMicroPrice - index * zoomedTickSize;
if (microPrice < 0) continue;
const item = cup[microPrice] || {};
let side = "undefined" !== typeof item?.bid
? "bid"
: "undefined" !== typeof item?.ask ? "ask" : "";
if ("" === side || (!item?.bid && !item.ask)) {
side = (microPrice >= (zoomedBestMicroPrice?.buy || zoomedBestMicroPrice?.sell || 0) ? "ask" : "bid");
}
const yPosition = cellHeight * index;
const quantity = volumeAsDollars
? ((side === "bid" ? item?.bid || 0 : item?.ask || 0) / quantityDivider) * (microPrice / priceDivider)
: (side === "bid" ? item?.bid || 0 : item?.ask || 0) / quantityDivider;
const isBestPrice = cupTools.isBestPrice(
side,
microPrice,
zoomedBestMicroPrice,
);
if ((microPrice / zoomedTickSize) % 5 === 0) {
ctx.beginPath();
ctx.strokeStyle = darkMode ? "#232425" : "#dddedf";
ctx.lineWidth = Math.max(1, dpiScale);
ctx.moveTo(0, yPosition);
ctx.lineTo(size.width, yPosition);
ctx.stroke();
}
cupDrawer.drawCell(
ctx,
quantity,
side,
maxVolume,
isBestPrice,
yPosition,
cellHeight,
size.width,
dpiScale,
darkMode,
handleClick,
);
}
},
drawCell: (
ctx: CanvasRenderingContext2D,
quantity: number,
side: string,
maxVolume: number,
isBestPrice: boolean,
yPosition: number,
cellHeight: number,
fullWidth: number,
dpiScale: number,
darkMode: boolean,
handleClick: any,
) => {
ctx.beginPath();
ctx.strokeStyle = cupOptions(darkMode).border.color;
ctx.lineWidth = cupOptions(darkMode).border.width;
ctx.fillStyle = cupTools.getCellBackground(side, isBestPrice, darkMode);
// @ts-ignore
ctx.roundRect(
0,
yPosition,
cupTools.getCellWidth(fullWidth, quantity, maxVolume, isBestPrice),
cellHeight,
cupOptions(darkMode).border.radius * dpiScale,
);
ctx.canvas.addEventListener("click", (event) => {
if (event.clientY >= yPosition && event.clientY <= yPosition + cellHeight - 1) {
console.log("click");
}
});
ctx.fill();
ctx.stroke();
},
export default cupDrawer;
по клику на drawCell происходит очень много кликов, draw рисуется много иногда по 100-1000 раз, и по этому клик срабатывает на каждый раз моментально.
Как можно это обойти, чтобы клик срабатывал только один раз | 5d8b634d31370c292af484ef00a94fed | {
"intermediate": 0.3712165355682373,
"beginner": 0.42977991700172424,
"expert": 0.19900351762771606
} |
18,653 | Write sql query to get the invoice which are more than 100 rs | 42da2204d81cd300f0d847286cafac21 | {
"intermediate": 0.4445062577724457,
"beginner": 0.32015714049339294,
"expert": 0.23533661663532257
} |
18,654 | You plan to create a YAML Azure Pipelines build pipeline that will use Azure virtual machines from your Azure subscription as build agents.
Which YAML schema elements must you include in the YAML build pipeline? | b2199874af841c1a35ecd32b06db7b87 | {
"intermediate": 0.33709990978240967,
"beginner": 0.4214833974838257,
"expert": 0.24141673743724823
} |
18,655 | generate interesting usecase for workshop conducted for college students using RDBMS | ec6f82d2941d99db7269cf5d3b6c8a85 | {
"intermediate": 0.25384601950645447,
"beginner": 0.2784689962863922,
"expert": 0.4676849842071533
} |
18,656 | # Напишите определение декоратора double_it
# Код ниже не удаляйте, он нужен для проверки
@double_it
def multiply(num1, num2):
return num1 * num2
@double_it
def some_func_return(a, b, c):
return a ** b + c
@double_it
def get_sum(*args):
return sum(args)
assert multiply(9, 4) == 72
assert multiply(100, 4) == 800
assert get_sum(1, 2, 3, 4, 5) == 30
assert some_func_return(4, 5, 4) == 2056
assert get_sum(14, 51, 34) == 198
assert get_sum(14) == 28
assert get_sum() == 0
assert get_sum(43, 5, 43, 43, 43, 43, 3, 2) == 450
print('Good') | d3c9da0b23251ed1bf29b242ec85d5a7 | {
"intermediate": 0.2597111761569977,
"beginner": 0.531140148639679,
"expert": 0.20914871990680695
} |
18,657 | Rewrite this to actionscript 3 please
#define SPINNER_HEADER(pos, size, centre, num_segments) ImVec2 pos, size, centre; int num_segments; if (!detail::SpinnerBegin(label, radius, pos, size, centre, num_segments)) { return; }; ImGuiWindow *window = ImGui::GetCurrentWindow(); \
auto circle = [&] (auto point_func, auto dbc, auto dth) { window->DrawList->PathClear(); for (int i = 0; i < num_segments; i++) { ImVec2 p = point_func(i); window->DrawList->PathLineTo(ImVec2(centre.x + p.x, centre.y + p.y)); } window->DrawList->PathStroke(dbc, false, dth); }
inline ImColor color_alpha(ImColor c, float alpha) { c.Value.w *= alpha * ImGui::GetStyle().Alpha; return c; }
/*
const char *label: A string label for the spinner, used to identify it in ImGui.
float radius: The radius of the spinner.
float thickness: The thickness of the spinner's border.
const ImColor &color: The color of the spinner.
float speed: The speed of the spinning animation.
float ang_min: Minimum angle of spinning.
float ang_max: Maximum angle of spinning.
int arcs: Number of arcs of the spinner.
*/
inline void SpinnerRainbow(const char* label, float radius, float thickness, ImColor color, float speed, float ang_min = 0.f, float ang_max = PI_2, int arcs = 1)
{
SPINNER_HEADER(pos, size, centre, num_segments);
for (int i = 0; i < arcs; ++i)
{
const float rb = (radius / arcs) * (i + 1);
const float start = ImAbs(ImSin((float)ImGui::GetTime()) * (num_segments - 5));
const float a_min = ImMax(ang_min, PI_2 * ((float)start) / (float)num_segments + (IM_PI / arcs) * i);
const float a_max = ImMin(ang_max, PI_2 * ((float)num_segments + 3 * (i + 1)) / (float)num_segments);
static float isRed = 0.0f, isGreen = 0.01f, isBlue = 0.0f;
ImVec4 isRGB = ImVec4(isRed, isGreen, isBlue, 1.0f);
if (isGreen <= 0.01f && isBlue <= 0.0f)
{
isRed += 0.01f * speed / 2.0f;
}
if (isRed > 0.99f && isBlue == 0.0f)
{
isRed = 1.0f;
isGreen += 0.01f * speed / 2.0f;
}
if (isGreen > 0.99f && isBlue == 0.0f)
{
isGreen = 1.0f;
isRed -= 0.01f * speed / 2.0f;
}
if (isRed < 0.01f && isGreen == 1.0f)
{
isRed = 0.0f;
isBlue += 0.01f * speed / 2.0f;
}
if (isBlue > 0.99f && isRed == 0.0f)
{
isBlue = 1.0f;
isGreen -= 0.01f * speed / 2.0f;
}
if (isGreen < 0.01f && isBlue == 1.0f)
{
isGreen = 0.0f;
isRed += 0.01f * speed / 2.0f;
}
if (isRed > 0.99f && isGreen == 0.0f)
{
isRed = 1.0f;
isBlue -= 0.01f * speed / 2.0f;
}
if (isBlue < 0.01f && isGreen == 0.0f)
{
isBlue = 0.0f;
isRed -= 0.01f * speed / 2.0f;
if (isRed < 0.01f)
isGreen = 0.01f * speed / 2.0f;
}
color = ImColor(isRed, isGreen, isBlue);
circle([&](int i) {
const float a = a_min + ((float)i / (float)num_segments) * (a_max - a_min);
const float rspeed = a + (float)ImGui::GetTime() * speed;
return ImVec2(ImCos(rspeed) * rb, ImSin(rspeed) * rb);
}, color_alpha(color, 1.f), thickness);
}
} | c38ae740cbf20766419bb456541f218a | {
"intermediate": 0.3020404875278473,
"beginner": 0.459297776222229,
"expert": 0.23866170644760132
} |
18,658 | How to get loading circle like windows 10 boot loading in actionscript 3? | 5961f2a528153382a4f029384b603553 | {
"intermediate": 0.37495890259742737,
"beginner": 0.20289964973926544,
"expert": 0.4221414625644684
} |
18,659 | In my excel table,
C:C values are the names of employees that worked hours
T:T values are recorded dates of hours for each employee
I:I values are names of employees
I3 is employee X
U:U values are the start dates
V:V values are the end dates
I want a formula that will look at employee X in I3.
Find the number of times employee X appears in C:C on the same row where the start period = U3 and the end period = V3,
and total the number of hours recorded in column T:T on the same row as employee X | 6dd83a7126aaeb09a29859eb53d6c0a7 | {
"intermediate": 0.3486965000629425,
"beginner": 0.2916892170906067,
"expert": 0.3596143126487732
} |
18,660 | Help me make a sealed class with for handling different states of UI errors in Kotln. I'll need the main sealed class to contain 3 types of UI errors, some requiring some values to be passed to them as parameters | ac7a09d41d30a2815447450480da48ec | {
"intermediate": 0.45688679814338684,
"beginner": 0.30008772015571594,
"expert": 0.24302546679973602
} |
18,661 | i need the code for a custom stream elements widget that lets me keep track of tasks for the audeience on twitch | fa19373ab4db692e9bd75edb66cb63e5 | {
"intermediate": 0.6164920330047607,
"beginner": 0.12213342636823654,
"expert": 0.2613745331764221
} |
18,662 | I used this code :def signal_generator(df, symbol):
if df is None or len(df) < 2:
return ''
# Retrieve depth data
threshold = 0.35
depth_data = client.get_depth(symbol=symbol)
bid_depth = depth_data['data']['bids']
ask_depth = depth_data['data']['asks']
buy_price = float(bid_depth[0][0]) if bid_depth else 0.0
sell_price = float(ask_depth[0][0]) if ask_depth else 0.0
mark_price_data = client.ticker(symbol=symbol)
mark_price = float(mark_price_data['price']) if 'price' in mark_price_data else 0.0
buy_qty = float(bid_depth[0][1]) if bid_depth else 0.0
sell_qty = float(ask_depth[0][1]) if ask_depth else 0.0
if (sell_qty > (1 + threshold)) > buy_qty:
signal = 'sell'
elif (buy_qty > (1 + threshold)) > sell_qty:
signal = 'buy'
else:
signal = ''
return signal
But it doesn't give me any signal to sell or buy | ac8935d46556c4b22afcf1ba3635f673 | {
"intermediate": 0.4121500253677368,
"beginner": 0.37021344900131226,
"expert": 0.21763654053211212
} |
18,663 | how can i make my bot on discord.js have a custom status? | c65d766014e1ac33328ad64f9d3ca7b6 | {
"intermediate": 0.4812381863594055,
"beginner": 0.23106002807617188,
"expert": 0.2877018451690674
} |
18,664 | how can i make my bot on discord.js have a custom status? | b9d4994b3c3ca1e18c01b67fdaf0a9a0 | {
"intermediate": 0.4812381863594055,
"beginner": 0.23106002807617188,
"expert": 0.2877018451690674
} |
18,665 | how can i make my bot on discord.js have a custom status? | cb673a79ed7ed30d07bb0534de7eff63 | {
"intermediate": 0.4812381863594055,
"beginner": 0.23106002807617188,
"expert": 0.2877018451690674
} |
18,666 | how can i make my bot on discord.js have a custom status? | 6469dddb03ce6d5801edd4a341d0a8f7 | {
"intermediate": 0.4812381863594055,
"beginner": 0.23106002807617188,
"expert": 0.2877018451690674
} |
18,667 | This code is only copying the last value in column A to the stop row and notto the other empty cells above it: If Target.Column = 15 And Target.Value = "Calculated" Then ' Column O
Dim rowAddress As Integer
rowAddress = Target.Row
Dim lastValue As Variant
lastValue = Cells(Rows.Count, 1).End(xlUp).Value ' Last value in column A
Dim stopRow As Integer
stopRow = rowAddress
If Not IsEmpty(lastValue) Then
Range("A" & rowAddress & ":A" & stopRow).Value = lastValue
End If
End If | 546ca7ebe1d4b095f20e600854709dde | {
"intermediate": 0.3787820339202881,
"beginner": 0.33766597509384155,
"expert": 0.2835519313812256
} |
18,668 | Is it normal / typical for the latest stable release of Hibernate to not (yet) support a or the SQLite dialect? | f6a93c1ffddcc79d9ed52c1337eb89df | {
"intermediate": 0.6175867915153503,
"beginner": 0.18832121789455414,
"expert": 0.19409197568893433
} |
18,669 | \\Device\\KProcessHacker3
i have my driver device here how can i access this from usermode deviceiocontrol | e1f9aa010c5c4e68c1285a62e5aad2de | {
"intermediate": 0.541659414768219,
"beginner": 0.2454313188791275,
"expert": 0.2129092663526535
} |
18,670 | hello | afba7ff798494b22cfe57c44873b412b | {
"intermediate": 0.32064199447631836,
"beginner": 0.28176039457321167,
"expert": 0.39759764075279236
} |
18,671 | what is the command for prevalence in stata? | 48e9911dc5df6ee43d12d287133ba5bf | {
"intermediate": 0.25050076842308044,
"beginner": 0.36526063084602356,
"expert": 0.3842385709285736
} |
18,672 | what is the command for calculating risk in stata? | cdb0d06823d35055bbae53be1ed3b850 | {
"intermediate": 0.2533262372016907,
"beginner": 0.17064251005649567,
"expert": 0.5760312676429749
} |
18,673 | На языке Си написать функция расчета строки из чисел в обратной польской нотации. Пример 43+5+
На языке программирования Си разработать программу graph.c для построения графиков функций, задаваемых произвольными выражениями. Для вычисления значений выражений использовать алгоритм Дейкстры для перевода выражения в польскую нотацию. Сборку программы осуществлять при помощи Makefile. Имя стадии сборки - all. Исполняемый файл должен храниться в корне в папке build с именем graph.
Условия:
- Размер поля для вывода графиков - прямоугольник 25 на 80 точек.
- Область определения - [0; 4 Пи].
- Область значений - [-1; 1].
- Ориентация координатной плоскости - ось ординат направлена вниз, ось абсцисс - направо.
- Центр координат - середина левой границы (точка {0, 13}).
- Рисовать оси не нужно.
- Ничего кроме графика выводиться не должно.
- Значения округляются по правилам математики.
График должен быть выведен с помощью знаков "Звездочек" для линии графика и "." для всего остального пространства экрана.
Модули:
- Разбор строки выражения и получение списка лексем.
- Перевод в польскую нотацию и вычисление по ней.
- Отрисовка графика в терминале.
- Библиотеки для организации динамических структур данных (стек, список и т.д.).
Пример входных данных: sin(cos(2*x)).
Использовать можно только <math.h>, <stdio.h>, <stdlib.h>, <string.h> и ваши собственные библиотеки. | 927e7f466dc893afdc2286a2999873e7 | {
"intermediate": 0.15879826247692108,
"beginner": 0.5311647057533264,
"expert": 0.3100370168685913
} |
18,674 | You have two arrays. One shows the names of the people names, while the other shows their occupation jobs. Your task is to create an object displaying each person to their respective occupation.
Names Jobs
Annie Teacher
Steven Engineer
Lisa Doctor
Osman Cashier
Example
const names = ["Dennis", "Vera", "Mabel", "Annette", "Sussan"]
const jobs = ["Butcher", "Programmer", "Doctor", "Teacher", "Lecturer"]
assignPersonToJob(names, jobs) ➞ {
Dennis: "Butcher",
Vera: "Programmer",
Mabel: "Doctor",
Annette: "Teacher",
Sussan: "Lecturer"
} solve in javascript | 30b984b2694076b4835d8ce183960e44 | {
"intermediate": 0.5186588764190674,
"beginner": 0.22322978079319,
"expert": 0.2581113874912262
} |
18,675 | implement 3d objects angular | e02c60599215aac9af451826bb6b2f13 | {
"intermediate": 0.4062497913837433,
"beginner": 0.3514977693557739,
"expert": 0.24225246906280518
} |
18,676 | how get monitor width and height from wmi in c# | cb5dde874526e9945c5542bf03698e88 | {
"intermediate": 0.5269279479980469,
"beginner": 0.16328281164169312,
"expert": 0.3097892701625824
} |
18,677 | stored procedure with dotnet | d17739fe52d3c8c024d002baa2f0e549 | {
"intermediate": 0.29725179076194763,
"beginner": 0.25755706429481506,
"expert": 0.4451911449432373
} |
18,678 | implement 3d objects library in angular | ae7b25600aea012100913ce97c955fae | {
"intermediate": 0.7930156588554382,
"beginner": 0.13073374330997467,
"expert": 0.07625054568052292
} |
18,679 | python i have dataframe with columns datetime and temperature, and i have database with columns datetime and temperature
i want to insert data to database | 57080b0dbeea83db4404473b8652c6a2 | {
"intermediate": 0.6187581419944763,
"beginner": 0.1571897268295288,
"expert": 0.22405213117599487
} |
18,680 | Give me code based on those params: Signature is not required for public endpoint.
For private endpoint, ApiKey, Request-Time, Signature and Content-Type need to be passed into the header, must be specified as application / JSON, Recv-Window (optional) parameters, Signature is a signature string. The signature rules are as follows:
1) When signing, you need to get the request parameter string first. It is "" if there is no parameter:
For GET/DELETE requests, the service parameters are spliced in dictionary order with & interval, and finally the signature target string is obtained (in the API of batch operation, if there are special symbols such as comma in the parameter value, these symbols need to be URL encoded when signing).
For POST requests, the signature parameter is a JSON string (dictionary sorting is not required).
2) After obtaining the parameter string, the signature target string is spliced. The rule is: accessKey + timestamp + obtained parameter string.
3) The HMAC SHA256 algorithm is used to sign the target string, and finally the signature is passed into the header as a parameter.
Note:
1) When the service parameter participating in the signature is null, it does not participate in the signature. For the path parameter, it does not participate in the signature; note that when get request stitches the parameter and pass it in the URL, if the parameter is null, it will be parsed into "" in the background parsing, fixed post request, when the parameter is null, do not pass the parameter, or set the value of the parameter to "" when signing, otherwise signature verification will fail.
2) When requesting, put the value of Request-Time used in signing into the Request-Time parameter of the header, put the obtained signature string into the signature parameter of the header, put the Access Key of APIKEY into the ApiKey parameter of the header, and pass the other service parameters.
3) The obtained signature string does not need to be base64 encoded. | 4b280db3ebdcfbbc71a7690c48943d1a | {
"intermediate": 0.476043164730072,
"beginner": 0.23136398196220398,
"expert": 0.2925928831100464
} |
18,681 | Give me same code on Python | 2d394e35867fb5faeca7cb3aaafa053c | {
"intermediate": 0.32953768968582153,
"beginner": 0.3139882981777191,
"expert": 0.35647401213645935
} |
18,682 | write listbox in flutter | e21a4284db317d4ac5c2ff45818efffb | {
"intermediate": 0.4784778356552124,
"beginner": 0.29756271839141846,
"expert": 0.2239595353603363
} |
18,683 | Give me this code on Python, code: public static String getRequestParamString(Map<String, String> param) {
if (MapUtils.isEmpty(param)) {
return "";
}
StringBuilder sb = new StringBuilder(1024);
SortedMap<String, String> map = new TreeMap<>(param);
for (Map.Entry<String, String> entry : map.entrySet()) {
String key = entry.getKey();
String value = StringUtils.isBlank(entry.getValue()) ? "" : entry.getValue();
sb.append(key).append('=').append(urlEncode(value)).append('&');
}
sb.deleteCharAt(sb.length() - 1);
return sb.toString();
}
public static String urlEncode(String s) {
try {
return URLEncoder.encode(s, "UTF-8").replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
throw new IllegalArgumentException("UTF-8 encoding not supported!");
}
}
/**
* signature
*/
public static String sign(SignVo signVo) {
if (signVo.getRequestParam() == null) {
signVo.setRequestParam("");
}
String str = signVo.getAccessKey() + signVo.getReqTime() + signVo.getRequestParam();
return actualSignature(str, signVo.getSecretKey());
}
public static String actualSignature(String inputStr, String key) {
Mac hmacSha256;
try {
hmacSha256 = Mac.getInstance("HmacSHA256");
SecretKeySpec secKey =
new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA256");
hmacSha256.init(secKey);
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException("No such algorithm: " + e.getMessage());
} catch (InvalidKeyException e) {
throw new RuntimeException("Invalid key: " + e.getMessage());
}
byte[] hash = hmacSha256.doFinal(inputStr.getBytes(StandardCharsets.UTF_8));
return Hex.encodeHexString(hash);
}
@Getter
@Setter
public static class SignVo {
private String reqTime;
private String accessKey;
private String secretKey;
private String requestParam; //get the request parameters are sorted in dictionary order, with & concatenated strings, POST should be a JSON string
} | 4036e3e75342e5bcee4b6d138f60529a | {
"intermediate": 0.6338857412338257,
"beginner": 0.1677355021238327,
"expert": 0.1983787566423416
} |
18,684 | how to watch props in vue3 in opetionAPI | 549ffed872da03bb7eeae1f623741bfd | {
"intermediate": 0.6715893745422363,
"beginner": 0.15852944552898407,
"expert": 0.16988112032413483
} |
18,685 | Give me code for MEXC signature | b2b279a437c7d8cccf4d6e94d4c5c89d | {
"intermediate": 0.35374778509140015,
"beginner": 0.15516184270381927,
"expert": 0.4910903573036194
} |
18,686 | Hi! I was thinking about building SpaceEngine in HTML, CSS, JS. So, can you help me build it? | e28295ba955f3ab47b008514608c59cf | {
"intermediate": 0.5599083304405212,
"beginner": 0.23655003309249878,
"expert": 0.20354165136814117
} |
18,687 | gee python | b199e56e8efe97dc4318345461780f1f | {
"intermediate": 0.27583837509155273,
"beginner": 0.347779244184494,
"expert": 0.37638232111930847
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.