query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
f0db508d586546d8e1946ecde482d975 | 1ac8c3d04c86dd0dd82178c9732b8ffa | 返回所有期号 | String hql = "select distinct ktrq from KtggPo ";
List<String> listsj = this.getHibernateTemplate().find(hql);
return listsj;
} | 1 |
b6385beb5d7909f87e22df5f3094b9f3 | 9c34339e1964ab9db0a574da355db716 | Sets item size UOM Abb. | public class X_UY_FF_CashOutLine extends PO implements I_UY_FF_CashOutLine, I_Persistent
public void setC_UOM_ID (int C_UOM_ID)
{
if (C_UOM_ID < 1)
set_Value (COLUMNNAME_C_UOM_ID, null);
else
set_Value (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID));
} | 1 |
fdf9a1f632e813261003b5bafa0cd5a1 | 85f63c79b09a00cde97873c124723a43 | Iterate over all map cells and calculate the total halite | namespace Civilization0.ai
public static class DepthSearch
public static int CalculateMapControl(Tile[,] tiles)
{
if (DEBUG_CONTROLS) Game.instance.panels.Clear();
int[,] control = new int[tiles.GetLength(0), tiles.GetLength(1)];
foreach (Tile t in tiles) foreach (Unit u ... | 0 |
e638bdd60b1418b9959f7aad1e2b8b1e | 20620b93de2ca3d32d2b2e86389587df | funcion para ocultar progressbar | public class MainActivity extends AppCompatActivity
public void hideProgressBar() {
miActionProgressItem.setVisible(false);
} | 1 |
e4550c52cc558d2ec8e32a15a4cb0e74 | e572aece8359e7ac22e8b7d364eb8664 | 마커를 삭제하기 위한 함수입니다 | function delMark() {
markers.forEach((item) => {
item.setMap(null);
});
} | 1 |
b8dcc7cfa790b0efe8b7ed3ae46202cc | 7db6b9b838a8423178be9e8fbd9bc1d3 | Generates a list of view port qualified bounding boxes for tile collision. | function partitionViewport(projection) {
const z = geoScaleToZoom(projection.scale());
const z2 = (Math.ceil(z * 2) / 2) + 2.5;
const tiler = utilTiler().zoomExtent([z2, z2]);
return tiler.getTiles(projection)
.map(function(tile) { return tile.extent; });
} | 1 |
cf1557573c32edc6a19946b7e9c4d941 | 82249a3161ab1d3873140f90bcdaff19 | 按照达叔的视觉要求 修正人物跑步动作的播放速度 | public class ActorController : MonoBehaviour
void Update () {
float targetRunMulti = (pi.run ? 2.0f : 1.0f);
anim.SetFloat("forward", pi.Dmag * Mathf.Lerp(anim.GetFloat("forward"), targetRunMulti, 0.5f));
if (rigid.velocity.magnitude > 0f)
{
anim.SetTrigger("roll");
... | 1 |
98dba667c80b5a253dadfb8b7c242f9a | 9c625b4062bcda4fa2918d1c110ae260 | 寄件余额支付 | {
decimal txtZhiFuJinE = Utils.GetDecimal(Utils.GetFormValue("txtZhiFuJinE"));
if (txtZhiFuJinE <= 0) Utils.RCWE(UtilsCommons.AjaxReturnJson("-1", "请填写正确的支付金额"));
MUserInfo loginYongHuInfo = null;
var isLogin = EyouSoft.Security.Membership.UserProvider.IsLogin(out... | 1 |
e26aeb5b71b40852b1e3abeaa7b9f482 | bcaffeaa4c01beb1e5dcf3472a2b3118 | ====================================================
= Mostrar todos los profesores =
==================================================== | try {
$crud = new grocery_CRUD();
$crud->set_table('profesor');
$crud->set_subject('Profesor');
$crud->columns('name','lastname','mail','cube','ext');
$crud->fields('name','lastname','mail','cube','ext');
$crud->display_as('name','Nombre')->display_as('lastname','Apellido')->display_as('mail','Co... | 1 |
9d943b8b0abe28b023190dd2927a9c67 | d81b260d13a7c99ed2119a1d2e80feef | For parallel printing | {
parallel_for(1, 100, [](int value) {
wstringstream ss;
ss << value << L' ';
wcout << ss.str();
});
} | 1 |
2d530e26b2bf22666570dad5b78c3170 | 18abcd6ac6e7f063949caf2d4d65a69a | 统计、分析用户店铺轨迹列表 | class StoreController extends Controller
public function analysis(Request $request)
{
$data = $request->only('start_date', 'end_date', 'keyword');
$st = strtotime($data['start_date']);
$et = strtotime($data['end_date']);
$visitCondition = '';
$orderCondition = '';
... | 1 |
ac22561c2fc699bf0fad0f1f4c4fe7bc | 50156bb325bd505e84aa1f47c44e7cec | 返回宠物身上所有可以在宠物防御触发的技能 | List<Skill> skills = new ArrayList<Skill>();
Iterator<Skill> iter = player.getSkills().iterator();
while (iter.hasNext()) {
Skill skill = (Skill) iter.next();
Q_skill_modelBean skillModel= ManagerPool.dataManager.q_skill_modelContainer.getMap().get(skill.getSkillModelId() + "_" + skill.getRealLevel(player))... | 0 |
38026e3093041e574cc1254f4be98ea3 | 06b596da4d7f8a565d5c1a3e614f8b88 | Generate a transaction instruction to match order. | stop_loss_pips=20, units='10000'):
tp = "{:.5f}".format(last_price + float(take_profit_pips)*0.0001
if pair != 'USD_JPY'else float(take_profit_pips)*0.01)
sl = "{:.5f}".format(last_price - float(stop_loss_pips)*0.0001
if pair != 'USD_JPY' el... | 1 |
3d03a17f0ee6fd0aa44b3ffb10faaa32 | 2db7482716c93ec4cfa63ca33e1d3078 | 已结算订单详情 | @Controller
@RequestMapping("/order")
public class OrderController
@RequestMapping(value = "/{id}/plan", params = "_settleddetail")
public String settledorderdetail(@PathVariable Integer id,Model model,HttpServletRequest request){
Order order = _orderRepository.findOne(id);
BigDecimal exchangerate ... | 1 |
576d0171d15ed6ebcd2711aa14b9af98 | 2427f7420aae45b4d83523d2c8a7f824 | Visits a string valued field that should be interpreted as a soy string. | public class SafeTypeAnnotationVisitor
implements TypeAnnotationVisitor
@Override
public void visit(String name, Object value) {
xav.visit(name, value);
} | 0 |
33f538eb65b12f8ea7e3098d54d3d160 | b70d995ce4d4ff3600e59e9aadc26abb | Requests the default soundboard sounds.
This method is a coroutine.
Returns | def __snufflings__():
return [ SeiSound() ] | 0 |
481dea2f323a30f3c03bd80d89f6b16c | c63ac49e63256a22b806c5df03ece6e1 | get details about network state via the linux ip command. only used
if the netifaces isn't in the python std lib | resp, es = self.command("route -n")
if es:
return resp
else:
raise ControllerError, es | 0 |
3c57f5cd7ac10f9a3c2a04c35fc07b28 | 42fcf6539c22269de8d5f66babfa78a4 | Keep Yoast meta box at bottom of screen | class Yoast_WooCommerce_SEO
public function footer_js() {
?>
<script type="text/javascript">
jQuery( document ).ready( function( $ ) {
// Show WooCommerce box before WP SEO metabox.
if ( $( '#woocommerce-product-data' ).length > 0 && $( '#wpseo_meta' ).length > 0 ) {
$( '#woocommerce-product-data' )... | 0 |
83aa5f3e803bec8e780c46235b7bf957 | 9b364dbb81ba98b28960cdb6277a4312 | Subscribes to the store to update the jobs on the map. | function subscribeState() {
unsubscribeStateUpadte = _store.subscribe(stateUpdateHandler);
} | 1 |
15cd1eba492e771cb05320004f63eaf8 | 8a7827b18e98a54f045bbd052bab556d | we do not get any output if there are no bad filenames. | class RunListTests(TestCase):
def test_good_command(self):
self.options['input_file_path'] = [os.path.join(self.res_path, 'good_command.txt')]
self.run_list.handle(input_file_path=self.options['input_file_path'],
error_file_path=self.options['error_file_path'],
... | 1 |
f757258e3d1d7e140940f1a8e6e0ab36 | 92605817e52944f7332d174cd5b2487c | Updates the current room the bot is in with a given background | void setCurrentRoom(Room ACurrentRoom); | 0 |
8d1ad6fb6c83442f9c7974204222f424 | 518edd391c43abda5722f8e53497ebac | Открытие потока вывода в символьный файл в кодировке UTF-8. Если файл не существует,
он будет создан; если файл уже имеется, он будет полностью перезаписан. | namespace
fputws_t::fputws_t(BSTR fileName, __int32 Code_Page, bool append, bool CrLf) noexcept
: codepage_{ Code_Page }, CrLf_{ CrLf }
{
bool newFile = !append;
if (codepage_ == 65001 && append)
{
std::wifstream ifs{ fileName };
if (!ifs.is_open()) newFile = true;
}
FILE* fp = ... | 1 |
d409dc930b2926f9173d7e53ae7b4a92 | 7af4ef4eb9440007409bdb9813ff1929 | Calculates and returns the kinetic energy using corrected atomic velocities. Components
are projected to the initial velocity vector filtering dissipated energy. | public class Particle
public double kE(){
return 0.5 * mass * (vx*vx + vy*vy);
} | 0 |
9ba6c89d7a5b43294cac3120af196fd9 | e6d0db01237c79be5eebcbd938e1d6cd | 关注指数面积图配置 | return {
title: {
text: `错误总数 ${count}`,
textStyle: {
fontWeight: 'normal'
},
top: '30px'
},
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
... | 1 |
70b66c0225adc3e3fdea92d181e7eed3 | ff8086737484c82439ecffa3a45babbd | 根据Id查询ExemptRecordEntry实体
1、当id为empty时抛出异常
<功能详细描述> | @Service
public class CarRecordServiceImpl implements CarRecordService
@Transactional(propagation = Propagation.SUPPORTS)
public CarRecord getCarRecord(String id) {
CarRecord obj = null;
if (id == null || id.length() == 0) {
log.info(Constant.ERR_MSG_INVALID_ARG + " id = " + id);
return obj;
}
try {
... | 0 |
30803df86e7cae1304a768ccdfd962d5 | ac16c6aa5bc7cc6e79b3e735483ac34a | Convierte una imagen a una secuencia (array) de bytes. | x, y, z = imagen.shape
n_pixeles = x * y * z
pixeles = np.reshape(imagen, n_pixeles)
bits = [format(pixel,'08b') for pixel in pixeles]
bits_Rx = np.array(list(''.join(bits)))
return bits_Rx.astype(int) | 0 |
a3fca261585a3cf6cbfa86e5ad68b36e | e5a61d1b232aff1bc751c390928f87b1 | Create the cards in the pile - overwrite for funky piles | class Table
function generateCardsInPiles()
{
for ($i = 1; $i <= 3; $i++)
{
for ($j = 1; $j <= 50; $j++)
{
DB::addCard($this->id, rand(1, 24), $i, $j);
}
}
$this->pile[1] = 1;
$this->pile[2] = 1;
$this->pile[3] = 1;
... | 1 |
b61bbe62e56d66a67e726b050c69cac6 | d6b469d9b09071f5f29e11a22596f632 | Listener is added to trigger a function when the scroll reach the end | function scrollListener() {
const d = document.documentElement;
const offset = d.scrollTop + window.innerHeight;
const height = d.offsetHeight;
if (offset >= height - 100 && !searchData.fetching && searchData.hasNext) {
searchMovies(searchData.query, searchData.nextPage);
}
} | 1 |
53d498cc63c8750eb6dce54a07bc6586 | b6af814693cf2c2fef937611f9a464a5 | Build a path using this dataset group's root directory. | public final class AllPackageBuilder
private static String buildRootPath(String groupName, String packageName) {
return "/apps/" + groupName + "-" + packageName + "-packages";
} | 1 |
4a23438e2a61de048951a5674336820b | 4b7c107ffb15675f468c06be91d4ac89 | Tests unauthenticated user creating a quote. | class ProcessTest extends BaseTest
public function testExecuteUnableToCreateQuote()
{
$params = [
'brq_ordernumber' => null,
'brq_invoicenumber' => null,
'brq_statuscode' => null
];
$this->request->shouldReceive('getParams')->andReturn($params);
$f... | 0 |
35e9b220c66a846699f33a2eb1670960 | fe94ff9076b43e230d5424c05b53f57b | Setter for <code>WETRN.STG_DSTRBTD_MRKT_SLS.SLS_TYP_ID</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.7.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class TrndCtgrySlsJobRecord extends UpdatableRecordImpl<TrndCtgrySlsJobRecord> implements Record8<BigDecimal, BigDecimal, BigDecimal, Da... | 0 |
0ad69dc6c7015d6e7ac5a2f68ac99878 | 24cb3e91eefcb2cead183f954825fef5 | функция проверки корректности разделителя '-' значений даты | namespace Kursova1
public class Product
public static void checkDateDigit(string date)
{
foreach (char temp in date)
if (!Char.IsDigit(temp) && temp != '.')
throw new Exception("Некоректні символи у даті.");
} | 0 |
2da8d5ee18619a9b68e9864893a7dd0f | 2444d67ea6257a0c52bc1358ea5fc381 | 判断字符串长度是否小于等于最大长度 | class Validate
public static function isLengthGt($value, $max)
{
$value = trim($value);
if (!is_string($value)) {
return false;
}
$length = function_exists('mb_strlen') ? mb_strlen($value, 'UTF-8') : strlen($value);
is_array($max) && $max = $max[0];
if ($m... | 0 |
c16e03243eeec36bea81cd68c1d139ac | 9e90ce30bfacdb263a3da55428e4b16f | Sets card org name. | export class AppleCardModel
set organizationName(value) {
this._organizationName = value;
} | 1 |
3936333d08391f23464e210bb78c9102 | 70375ef7fc15230dab1551383475468c | Recursively renders the data from a surface and its blocks. | namespace TagLib.Flac public class Block
public ByteVector Render (bool isLastBlock)
{
if (this.data == null)
throw new InvalidOperationException (
"Cannot render empty blocks.");
ByteVector data = header.Render (isLastBlock);
data.Add (this.data);
return data;
} | 0 |
f38b93d16e162c26a6dc7537574a1875 | 42bd269f2a33d6ca68e4d9261882a1a0 | 临时脚本,清理帖子内容 | function cleanPost() {
var board = q('.board');
while (board.firstChild) {
board.removeChild(board.firstChild);
}
var hint = document.createElement('span');
hint.innerText = "messgae hacking ...";
board.appendChild(hint);
} | 1 |
3289235218cdbc05dfa683aaec617a40 | 1c1fa8642bde67a6e4e78b8f8bc18c29 | Use igraph to compute degree parameters. | inline void Graph::getAllDegrees(igraph_vector_t *degrees) const
{
igraph_degree(&G, degrees, igraph_vss_all(), IGRAPH_OUT, IGRAPH_NO_LOOPS);
return;
} | 1 |
f0d639133a492abcf68158899c029d07 | d2b0709d75dc25d668999d714a0e2a51 | transform a SteamVR matrix format to Unity matrix format | {
v2f output = new v2f();
output.pos = Transform.MulMVPMat(v.pos);
return output;
} | 0 |
9203ee2a4ba5c90f00f7c108ab2e6645 | 55870b98a380f0860ad4ac963a78c3d6 | Parses a TBL option line | void Setup::parse_prob_blk(vector<string>tokens)
{
if(tokens[0].compare("Tdbase_name") == 0) {
tdbase_name = tokens[2];
} else if(tokens[0].compare("Rule_name") == 0) {
rule_name = tokens[2];
} else if(tokens[0].compare("Out_name") == 0) {
out_name = tokens[2];
} else if(tokens[0].compare("Period") == 0) {
... | 1 |
a70dde0a3ffece2ec221162c48e7595e | c60a336fd84f28fb8a04f6d056153bda | Unique ID of the Datatype used for registration | abstract class RegistrationData
abstract public function getType(); | 0 |
fd36e4416fb1687fb6dffc1e3d645924 | 6504e12c3a73e9a655eb2cfaad3875f3 | 创建动图任务,用于将完整的视频文件或视频文件中的一部分转换为动态图文件,暂只支持输出GIF文件。
待转动图的视频文件需要存储在与媒体处理服务同区域的OBS桶中,且该OBS桶已授权。
Please refer to HUAWEI cloud API Explorer for details. | public class MpcClient
public DeleteAnimatedGraphicsTaskResponse deleteAnimatedGraphicsTask(DeleteAnimatedGraphicsTaskRequest request) {
return hcClient.syncInvokeHttp(request, MpcMeta.deleteAnimatedGraphicsTask);
} | 0 |
7dd2e71dfc8ba98801dd9f4475c17090 | def532aef70dcf524985c91160066346 | 设置存储将OAuth2Authentication.java对象序列化后的二进制数据. | @Embeddable
public class OAuth2AuthenticationMemento
public void setUserAuthenticationMemento(final UserAuthenticationMemento userAuthenticationMemento) {
this.userAuthenticationMemento = userAuthenticationMemento;
} | 0 |
36bb8a78e3258ebc5581ac5f149ca0ca | 1c6ee230bbf6316a8da1bf23a8b2f2d5 | Reads a single single-precision floating point number at the current position and increase the position by 4. | namespace Windows.Storage.Streams
public sealed class DataReader : IDisposable, IDataReader
public float ReadSingle()
{
return BitConverter.ToSingle(bufferData, IncreasePosition(4));
} | 1 |
0925ec48617e14634934664524d0d179 | 8a6fe3d4141a414aa54f076a128b0096 | 是否能作废出库单 | {
string wrHeadNoListStr = "";
for (int i = 0; i < wrHeadTable.Rows.Count; i++)
{
if (DataTypeConvert.GetBoolean(wrHeadTable.Rows[i]["Select"]))
{
wrHeadNoListStr += string.Format("'{0}',", DataTypeConvert.GetString(wrHeadTa... | 1 |
56d351cb0aa066fdc49e23c7b81b351f | 1ce9649b89e1a7cd8ee518a628ac2f95 | Construction récursive d'un arbre BSP selon une liste de facettes | def triangulationb(points,triliste):
n = len(points)
j0 = gauche(points)
j1 = voisin_sommet(n,j0,1)
j2 = voisin_sommet(n,j0,-1)
p0 = points[j0]
p1 = points[j1]
p2 = points[j2]
j = sommetmax(points, p0,p1,p2,[j0,j1,j2])
if j == None:
triliste.append([p0,p1,p2])
polyb =... | 0 |
890f29be7fee9cbd052c3bb91a1cfa88 | c82493b65f3855cb7474075ef55453b8 | 向EditView中填充数据 | Intent intent = getIntent();
mPlanBean = (PlanBean) intent.getSerializableExtra(ContantsUtil.PLAN_BEAN_KEY);
if(null == mPlanBean){
return;
}
nameEt.setText(mPlanBean.getName());
addressEt.setText(mPlanBean.getAddress());
infoEt.setText(mPlanBean.getIn... | 1 |
530162a42c0d270ea12c56ca42390f0a | 75b2a9b85037a97bc2aeee59ad82f4e1 | Test case for serviceBoardsIdTypesTypeIdPut
. | class BoardItemsApiTest extends \PHPUnit_Framework_TestCase
public function testServiceBoardsIdItemsItemIdPut()
{
} | 0 |
1105b8bfb7fab6898a5b7f8eed6f3d0a | 52c4ca508fa4ad4055d5a5f8fcb78420 | Очистка списков, ListView и стоимости. Обнуление переменных | namespace Home_expenses
public partial class Form1 : Form
private void button_Reset_Click(object sender, EventArgs e)
{
listView_Item.Items.Clear();
textBox_TotalPrice.Text = @"0";
price = 0;
} | 1 |
3049006307a336fe1137d028cac09a6a | f801d2619dc344ef4839f388dff3bc62 | Смена статуса у указанного пункта меню | class Menu extends Base
public function changeStatus() {
$id = $this->request->get('id');
$status = $this->request->get('status');
$res = AdminMenu::update([
'id' => $id,
'hide' => $status,
]);
if ($res === false) {
$this->err();
}
... | 1 |
f05b8240d9fb96628ff3d2d2a71d2fd0 | 1c7dc072122f72009ebd7ddfa9614f26 | 启动WRL服务并进行初始化操作 | service.Init(redis.NewPool(redis.Config{Dial: config.CommonConf.RedisIP, Auth: config.CommonConf.RedisAuth}))
go func() {
api_ws_conn.StartRPCServer()
}()
rpc_client.InitLogic(config.WSConnConf.LogicRPCAddrs)
wsServer := ws_conn.NewWebSocketServer(config.WSConnConf.WSListenAddr)
wsServer.Start()
} | 1 |
9eb5ceb7989bec9aa28a99c21c13ed56 | fbfd4a71c021a0a21adfe36c755784dc | 抽象方法(限定子类的方法只能叫这些名字),没有代码体 | public abstract class YourAbstract
public abstract void B(); | 1 |
91a475592eab55f8488a9e0ebd240c6e | d9d4d9561048e81b1b379f4dd6ac5c7b | Tests that runtime configuration actually works during graph validation | public abstract class SpeedmentApplicationLifecycle<T extends SpeedmentApplicationLifecycle<T>> extends AbstractLifecycle<T> implements Lifecyclable<T>
public <C extends Component> T withValidateRuntimeConfig(final boolean validateRuntimeConfig) {
this.validateRuntimeConfig = validateRuntimeConfig;
retu... | 0 |
3565d2ef03fdc2cd9f0a5b49b6c21f74 | 033f3ffe19921bdaaf38c4b4300b78b8 | Retrieves activity logs for tool with given ID | job_id = unicode(job_id)
results = ENGINE.execute(
LOGS_TABLE.select().where(LOGS_TABLE.c.job_id == job_id)).fetchall()
results = [dict(result) for result in results]
for result in results:
result.pop("job_id")
return results | 1 |
2ef2bb7df992f5000d584681068e4ac4 | dc563fd0b6cab037ac866d1951054794 | Group a list by a key or a classifier function
from ftool import groupby | def groupby(entities, dxfattrib='', key=None):
if all((dxfattrib, key)):
raise ValueError('Specify a dxfattrib or a key function, but not both.')
if dxfattrib != '':
key = lambda entity: entity.get_dxf_attrib(dxfattrib, None)
if key is None:
raise ValueError('no valid argument found,... | 1 |
7c1023a8e83ea1c172e30de15c74c420 | d39db22fe99e49c26788122f541f3e71 | Includes the XML comment file if it exists at the specified file path. | namespace Elect.Web.Swagger.Utils.SwaggerGenOptionsUtils
public static class SwaggerGenOptionsExtensions
public static bool IncludeXmlCommentsIfExists(this SwaggerGenOptions options, string filePath)
{
return SwaggerGenOptionsHelper.IncludeXmlCommentsIfExists(options, filePath);
} | 1 |
105526d6c3a3db184c95092367a16dc6 | a5ba697d33ef087fc2bd3a7053631ab6 | If there is a policy selected, fires the Policy_Delete event passing in
the first selected policy | public abstract class PolicyOpViewBeanBase
extends ProfileViewBeanBase
public void handleTblConditionsButtonDeleteRequest(
RequestInvocationEvent event
) throws ModelControlException {
CCActionTable table = (CCActionTable)getChild(TBL_CONDITIONS);
table.restoreStateData();
... | 0 |
af1975a734ee07ea47e53d62bfbea3fa | edf049561864b21e73ec8d96583503f0 | Allows users to register a country. | class ListCountries(APIView):
def post(self, request):
country_json = CountrySerializer(data = request.data)
if country_json.is_valid():
country_json.save()
return Response(country_json.data, status=201)
return Response(status=400) | 1 |
896673c948d2d457e57d037502e7ad0a | b4efddfd0df5060e7aad68c0bca3094e | Ekran wyświetlający sie przy wyjściu z gry, zapraszający do ponownej gry. | {
for(;;)
{
system("CLS");
brzeg_ramki();
for(int i=13;i>=0;i--)
{
cout<<":: ::"<<endl;
if (i==6)
{
cout<<":: Czy chcesz zagrac jeszcze raz? ::"... | 1 |
23ffbb6d81f00feedbdd3ba28b75f7bd | 0a908b624a1497ca6b4d1d66cc5d150e | 判断一个文件是否重复,重复了创建副本,如果副本有了,创建副本的副本,依次叠加,直到没有 | namespace MiniTalk.Model
class ReadFile : IDisposable
private string DuplicateHandle(string fileName)
{
string filePath1 = Path.Combine(this.saveDirectory, fileName);
string filePath2 = Path.Combine(this.saveDirectory, RanExName(fileName, this.kuo));
if (!File.Exists(file... | 1 |
a721160fb9fdbd8506b0a0a04bd59f41 | 8faf787c87b4fc071c3af1f24086ff02 | 有两个排序的数组A1和A2,内存在A1的末尾有足够多的空余空间容纳A2。请实现一个函数,把A2中的所有数字插入到A1中并且所有的数字是排序的。
因为使用数组没有通用性,所以改用切片 | arr := []int{}
i1, i2 := 0, 0
for i1 < len(a1) && i2 < len(a2) {
if a1[i1] <= a2[i2] {
arr = append(arr, a1[i1])
i1++
} else {
arr = append(arr, a2[i2])
i2++
}
}
if i1 < len(a1) {
arr = append(arr, a1[i1:]...)
}
if i2 < len(a2) {
arr = append(arr, a2[i2:]...)
}
return arr
} | 0 |
f0181f241af877bdb9a6c4e5228ca131 | 0ef1af4ee18428bb2fce5889c19b7c70 | 插入发票状态更新记录 | public class SalesOrderStatusDao extends BaseHibernateDaoSupport
public void insertInvoiceStatusTime(Integer soid, Integer invoiceStatus,
String statusDescription) throws DataAccessException {
try {
this.getSession().createSQLQuery(
"insert into InvoiceStatusTime(soid,InvoiceStatus,StatusDescription,Update... | 1 |
73e72d6efa37c45bd0e0183ed03e06a3 | 86a98451417c5c2b5f1814d1439eaa18 | Ignore duplicates | class UniqueTransform(Transform):
def transform(self, record):
if record == self.prev_record:
return None
self.prev_record = record
return record | 1 |
e16225c4a50144f3969c554feda4a39b | 0406a72bd309fa2d531c7e640ca89fa8 | 是否已收藏过该书签 | {
try {
$mdb = new MeekroDB(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_TABLE_NAME, DB_PORT, DB_CHARSET);
$collect = $mdb->queryFirstRow("SELECT coid, deleted FROM collect WHERE uid=%d AND bid=%s", $uid, $bid);
if ($collect && $collect["deleted"] == 0){
return t... | 1 |
810cf0b10c6ab82ad09d0cb85ff9e6d6 | fc1b2459765622bed287a808203ecf9a | Remove all images this screen is parenting. | public void removeImages(); | 1 |
839efbb6b0fe35094c89022dd136f482 | cc80c987d4f73053010dadb1965c4d4e | Returns a new {@code StreamEx} which consists of possibly-overlapping
sublists of given source list having the specified length with given
shift value.
<p>
This method calls {@link List#subList(int, int)} internally, so source
list must have it properly implemented as well as provide fast random
access.
<p>
The shift v... | if (nOther > nLast) {
throw IllegalArgumentException("nLast has to be larger than or equal to nOther")
}
return if (size <= nSingle) {
listOf(this)
} else {
val result = mutableListOf<List<T>>()
var i = 0
var page = 0
while (true) {
val remaini... | 0 |
235203dbcbc6537c00933d35192b513a | bc8ef42167fe51f6d79b67db75974be9 | Функция повреждения корабля | userBad = false;
if (userDirection == true) {
for (let i = 0; i < desk; i++) {
if ((i1 + desk - 1) <= 9 && userField[i1 + i][j1].label == true) {
userBad = true;
} else if ((i1 + desk - 1) > 9 && userField[i1 - i][j1].label == true) {
... | 0 |
48c0063086c6ef2eff2c2eb9f7dd3890 | e788dd046ca651aab7aa53207b571254 | 自动加载路由 并做token权限拦截 | function routerIntercept(router: Router) {
router.beforeEach((to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext) => {
const { getToken } = useToken()
const token = getToken()
NProgress.start()
const userStore = useUserStore(pinia)
const tabStore = useTabStore(pi... | 1 |
262ac126210d30b7f998de25fb362505 | 5d4bb36c0c2faa2d18fa50f5c2f81023 | Returns the meta object for the containment reference '{@link br.com.maisha.wind.terra.OperationProperty#getValidValues <em>Valid Values</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_HyTemporalElement_validSince_feature"),
getString("_UI_HyTemporalElement_validSince_description"),
HyEvolutionPackage.Literals... | 0 |
d58a19806c5d0221a9c4917457bca314 | 3be1dddea18fe9180cff66234a2acee3 | Returns deque's usage ratio. | class ReplayMemory:
def used_fraction(self):
return self.num_used / self.size | 1 |
c238379f9b32c64f2b178d9066e6bfde | 742ece2bce07067717f7cd9067f52c4f | Should convert celsius into kelvin. | class TestConverters(unittest.TestCase):
def test_c2k(self):
self.assertEqual(round(converters.c2k(10), 2), 283.15) | 1 |
ecac423a6fe7ab5e7a17f9d8da4b8abc | 99a542068334dbddea00c9f73c30c149 | === Help === | const b = chalk.hex('#545DA6');
const y = chalk.hex('#ffcc4d');
const CLI_TITLE = chalk.bold.underline('Bolt-CLI');
const CLI_DESCRIPTION = 'Welcome to the Bolt CLI ⚡️ Have fun!';
const CLI_USAGE = 'Usage: `bolt <command> [options ...]`';
const HELP_USAGE = 'Help: `bolt --help` or `bolt <command> --help`... | 1 |
61e0990c71e234247eb93620de97de1a | 652a38515e02532412c2dd19696244a4 | validate username and pwd with predefined credentials | System.out.println("Received request");
String un = username;
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
String pw = password;
try {
Thread.sleep(5000);
} catch (InterruptedExcept... | 1 |
b48a937bbfa4bc057225d3a91c26c8fc | 6e929a3adc3b5a81bbb6a399e5524238 | Gets a request builder for the RiskyServicePrincipal collection | public static class IServiceCollectionExtensions
public static IServiceCollection AddRiskEndpoints(this IServiceCollection services, Action<RiskApiOptions>? configureAction = null) =>
services.AddRiskEndpoints<DbRiskEvent, RiskRequestBase<DbRiskEvent>>(configureAction); | 0 |
084d62fc51ad22c6fa615f1faee437fb | afcabe646e6a3c0d9bce0fb3b43eb13e | Gets the enabled breadcrumb types | public function getBlockTypes(bool $onlyEnabled = false): array; | 0 |
f6798dabd8f9800c7ea9664215156fe9 | 29ba1ece610c4b07de9865467ff8f119 | True if this locus is a template extracted from a single column. | class SpanType(ModelBase):
def is_archetype(self):
return self.widget.is_archetype() | 0 |
2a34b3db22bd871c9f11b7d79dccb262 | b9e3c0ca43571a61d68f247feb14e7f2 | Add service to a service manager associated with a particular Property owner | $this->checkPortalIsNotReadOnlyOrUserIsAdmin($user);
$this->validate($newValues['SERVICEPROPERTIES'], 'serviceproperty');
$this->validateAddEditDeleteActions($user, $service);
$keyname = $newValues['SERVICEPROPERTIES']['NAME'];
$keyvalue = $newValues['SERVICEPROPERTIES']['VALUE... | 0 |
202f894617dcc80bcb49d4ccce8ba550 | 8ca89cdb5f7c1eb26e82f93e1a38ed67 | Locates an Item in the inventory. | int FindInInventory(uint8_t item) {
int i = 0;
while(i<INVENTORY_SIZE) {
if(player.inv[i] == item) {
return SUCCESS;
}
i++;
}
return STANDARD_ERROR;
} | 1 |
8290b74fcdeb2a0d186e67ad914e152c | ea997178742374e710e7186f580195d4 | converts to 16 bit number | {
return ((num/16 * 10) + (num % 16));
} | 0 |
eed61b9aef960ba1f42ce216552c4fc5 | afdc196f57182f846737439897f5f68b | Actualiza una EstadosDelProceso, se basa en el identificador para actualizar el objeto. | class SybaseNC
private function actualizarEstadoDoc($id_docElectronico,$EstPro) {
$obj_con = new cls_BaseSybase();
$pdo = $obj_con->conexionSybase();
$pdo->beginTransaction();
try {
$sql = "UPDATE DBA.TCIDE_FACTURANC_TEMP SET estado_proceso=:estado
WH... | 1 |
efe91ecd10edc41def7e5f9a1f111905 | 294fa7fddb1fd84b7a44ff482f4e1de3 | https://api.playfab.com/Documentation/Server/method/WriteTitleEvent | namespace PlayFab
public class PlayFabServerInstanceAPI
public async Task<PlayFabResult<WriteEventResponse>> WriteCharacterEventAsync(WriteServerCharacterEventRequest request, object customData = null, Dictionary<string, string> extraHeaders = null)
{
await new PlayFabUtil.SynchronizationContext... | 0 |
f922c92a9255a7aac5b9d016b156b399 | 8aeeb0105fd1f23dffed392ed875eadc | ユーザーが出す手を表示するためのメソッド | System.out.println("出したい手を入力してください");
Scanner scan = new Scanner(System.in);
Judge judge = new Judge();
String playerhand = scan.next();
return playerhand;
} | 0 |
bc1e143af3492bc29c02a8c817b19b90 | 6d596e66cb7dfde74d7ac506d5487570 | The ARN of the application. | export class PinpointCdkConstruct extends cdk.Construct
get pinpointArn(): string {
return this.pinpointApp.attrArn;
} | 1 |
2c73a46e98d20efa218094fd9a7d00fa | f17e9323f6c54b3b0301faac75504021 | Finds the highest ID for an account. | global $authIssueText, $mysqli;
$sql = "SELECT MAX($table"."Id) AS 'MaxId' FROM $table WHERE UserId = $userId";
$result = $mysqli->query($sql) or die ($authIssueText);
if($result != null) {
$row = mysqli_fetch_array($result);
return $row['MaxId'];
}
return 0;
} | 1 |
064781d122559b1aec709059ae641343 | 30eff8579837f736a19e95247072d4ca | Add the value 'element' to the matrix entry A(row,column) and store the
result back in the matrix. | void MatrixAddition::createMatrixA(int element){
matrixA.push_back(element);
} | 0 |
1e9e7bdaada41f6d28db3c84a80d5f1e | 8e59940ecbbec5f2b2d8d734c1c4a925 | Metodo que permite controlar el pacman con las acciones del teclado | if event.key == pygame.K_w:
pacman.moving_up = True
pacman.moving_left = False
pacman.moving_down = False
pacman.moving_right = False
elif event.key == pygame.K_a:
pacman.moving_up = False
pacman.moving_left = True
pacman.moving_down = False
pacman... | 1 |
0223e8090c292eee22eafa1810c829c6 | 1b5900c400bbe0f8f49d5cf588460ec2 | Convert an entity to a table. | $data['_start'] = "---";
$data['title'] = '"' . $entity->getTitle() . '"';
$data['date'] = \Drupal::service('date.formatter')->format($entity->getCreatedTime(), 'html_datetime');
$data['last_edit'] = \Drupal::service('date.formatter')->format($entity->getChangedTime(), 'html_datetime');
$data['draft... | 0 |
65fcfe4089d14cd29ffbdd95a039ae00 | a9f8364740f0819c8867cf3ec08d6773 | like get_module_outfile, but does not append .py | class iqSchemeModuleGenerator(object):
def genModuleFilename(self):
name = self.getName()
path = file_func.getProjectPath() if file_func.getProjectPath() else file_func.getFrameworkPath()
return os.path.join(path, name + '.py') | 0 |
b86d80b16682dcbeb868d6aa16dce20c | 0d1a2e6b48bf004edd08d8a5021b7456 | Enable caching behavior for the decorated function. | try:
import cachew
except ModuleNotFoundError:
warnings.warn('cachew library not found. You might want to install it to speed things up. See https://github.com/karlicoss/cachew')
return lambda orig_func: orig_func
else:
import cachew.experimental
cachew.experimental.e... | 1 |
5ccfd054a53b1713e8c7535356f80d1f | 80f6ce6ace34537caec14b17a03439eb | Метод Крамера | {
double x12 = p1.X - p2.X;
double x13 = p1.X - p3.X;
double y12 = p1.Y - p2.Y;
double y13 = p1.Y - p3.Y;
double y31 = p3.Y - p1.Y;
double y21 = p2.Y - p1.Y;
double x31 = p3.X - p1.X;
double x21 = p2.X - p1.X;
... | 0 |
b1265aa9d17c8837651103dc0284232b | de25cf92883ec63c52661064f4fd8606 | 通过网络DNS获取本机Host名 | namespace StephenYang
public static class GetValue
public static string GetHostName()
{
return Dns.GetHostName();
} | 1 |
015ebccd12d03a2dc47783c8701c1863 | 69847e9e8c36bbe7a3c2d40ed7115a99 | 获取所有敌方的部队(左侧敌方部队提示使用 基于线) | function AITroopsFleetVoApi:getLocalWarCurAITroopsList()
if self.localWarCurTroops then
return self.localWarCurTroops
end
return {0, 0, 0, 0, 0, 0}
end | 0 |
7b07f781e8bb92fafad426525910ba91 | da0fe18dfbd23005d1d82cfe9b77f4e2 | Return true if the date is active | {
$sToday = date('Y-m-d H:i:s');
$bIsActive = ($this->fieldActive && ($this->fieldActiveFrom <= $sToday && ($this->fieldActiveTo >= $sToday || '0000-00-00 00:00:00' == $this->fieldActiveTo)));
return $bIsActive;
} | 1 |
506b3e7b59e8b5ba3a62d0c5bf896bd2 | 9797aa22095dd2f4d6b20c45c7ea1958 | Returns the current selection.
<p>
Note that as of 3.2.1 and 3.3, the common viewer caches its selection.
Clients must not set the selection of the viewer's tree control directly.
</p> | getSelection() {} | 1 |
57cb394e9310c0db3ab90a8c50733b60 | 3c297d7e9fe7c20b67849633dbd846ea | Bind unloading events | function bindUnload() {
win.addEventListener('beforeunload', function () {
if (!_unloaded) {
removeWindow();
}
});
win.addEventListener('unload', function () {
if (!_unloaded) {
removeWindow();
}
});
} | 1 |
449a576f76aa967c8fc655339a0b1091 | c44a9f7d7eee1e06d90907dbc45e70c8 | Initialize all the collision handlers between different Pymunk objects. | class MazeExplorer(ShowBase):
def initCollisionDetection(self):
self.cTrav = CollisionTraverser()
self.cTrav.setRespectPrevTransform(True)
self.handler = CollisionHandlerFluidPusher()
self.cnodePath = self.camera.attachNewNode(CollisionNode('cam cnode'))
self.cnodePath.node().add... | 0 |
f3c86ffec20561bb457f3b0f6db7e776 | 0197e2fad0c0c78d4c13f41454ddf801 | Função para Imprimir em Pós-ordem | if(tree != NULL){
exibirPosOrdem(tree->esq);
exibirPosOrdem(tree->dir);
printf(" %-8d- %s\n", tree->aluno.rgm, tree->aluno.nome);
}
} | 1 |
0f4404e9395e741ba36cb0f3b81b07c7 | 001d70e27af95786a9e9c24560bcfc6d | 名前(名)を取得します。 <BR> | public class ShohonZaisankuMeiboJoho
public RString get名称() {
return 名称;
} | 1 |
440f9e6688eeee94ff9c071c192a6d6c | 1c64503d6fe62592949a512377a3cb9d | Get the Dynamik Custom JS file path. | class DSMagentoCustomerFieldsUpdater extends \Gigya\GigyaIM\Model\MagentoCustomerFieldsUpdater
public function getDSPath()
{
return $this->_dsFilePath;
} | 0 |
5b300e51856b94ed75f7bbc36a015976 | e5f0cc665311e30c0d908570ae9f9663 | 检测portal用户在TOP页显示正常 | function checkPortalRight() {
global $db_portal_admins,$manager,$winduid,$windid;
return S::inArray($windid,$manager) || ($winduid && in_array($winduid, $db_portal_admins));
} | 0 |
12898fd6facb6c165ed735783b5ef955 | 26927ecbb55a0a76c64b8629c2e70a70 | # estimateur PWM pour les parametres de la GPD | lenout = max(length(lambda), length(h))
lambda = rep(lambda, length.out=lenout)
h = rep(h, length.out=lenout)
to_optim<-function(period) lambda - g/(2*pi) * period**2 * tanh(2*pi*h/lambda)
guess = lambda / sqrt(g * h)
output = bisection(to_optim, lower = 0.9*guess,
upper=rep(1e+20, le... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.