query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
7bc5019369266a26292c6c6b85a69fc5 | a0bd94030a11ee528b5cbdcac1f8fbd6 | Получает грани элемента | export class Positioning extends mixinAsClass(ListenerOrganizerMixin)
getEdge_ (side) {
let x1, x2, y1, y2
if (side === 'top') {
x1 = 'left'
x2 = 'right'
y1 = y2 = 'top'
} else if (side === 'right') {
x1 = x2 = 'right'
y1 = 'top'
y2 = 'bottom'
} else if (side === 'bot... | 1 |
fc75339e58ec229b9c0c01730394939c | 87a67bd4c5c7d6b9562d3a943c28b0bd | Constrói uma solução ótima. | public class BestFirst
public static void bestFirst(String initialState, int nNursey) {
String state = initialState;
String bestState = state;;
generated = new LinkedList<>();
redundance = new HashSet<>();
generated.add(initialState);
while (!generated.isEmpty()) {
... | 1 |
00b85528dcdec1df0d6e1d47d6cd80f8 | e180516c01aa2a83edddcc349e0200f0 | Appends the object to the end of a set. | class Collection implements Aggregate
public function append($obj)
{
array_push($this->objs, $obj);
$this->last++;
} | 1 |
57901da3e7533414903e18243e91372f | 603921f41cd474297bce6578b6788586 | Iterative Find Max | {
int maxEle = INT_MIN;
while (s)
{
maxEle = max(maxEle, s->data);
s = s->next;
}
return maxEle;
} | 1 |
c58f14b06a1b2d2a05461a58a61536c2 | 78ec0898e9e23a596f8e2dbfdf6c3686 | Data sent from a client that is being used as a relay
Decrypt with the server key and look at the attached username
Put the encrypted portion of the message into the SOCK dictionary
for that user | {
struct turnserver *turn = arg;
struct channel *chan;
int err = 0;
++turn->n_recv;
chan = find_channel_peer(turn, src);
if (chan) {
uint16_t len = (uint16_t)mbuf_get_left(mb);
size_t start;
if (mb->pos < 4) {
DEBUG_WARNING("relay_udp_recv: mb pos < 4\n");
return;
}
mb->pos -= 4;
start = mb->pos... | 0 |
9fdee04d3ee44c019cb8205133f5a976 | eb0ac7e30ac494c406436ad90e08fb2b | 设置此ConnectionFactory应委托给的目标ConnectionFactory. | public class DatabaseOHLCDatasetFactoryService extends OHLCDatasetFactoryService
implements DatabaseOHLCDatasetFactoryServiceMBean{
public void setConnectionFactory(ConnectionFactory connFactory){
this.connFactory = connFactory;
} | 1 |
d437bd72d1cdd0996943d546fbf0b723 | c1f8037260b8b7d1a7a2eb6dc6223ec7 | Auxiliar method to control the max attribute value. That is, any attribute can only reach the max value. | namespace Ducode.Essentials.Validations.Attributes
public class MaxValueAttribute : ValidationAttribute
public override bool IsValid(object value)
{
return (int?)value <= _maxValue;
} | 1 |
756f56c40368b7a2791958e6a3d4b197 | 16392755921be69c0eff728b3e2bfffd | 获取目的地所有国家Id | class ReviewSpider(scrapy.Spider):
def get_nation_urls(self, response):
for destination_urls in response.xpath('//ul[@class="col"]/li/a/@href').extract():
yield scrapy.Request(url=destination_urls,
callback=self.switch_tag_to_comment,
headers=self.get_headers()) | 0 |
24a514ef0927d93b6d4cf4ca2942662d | 2fcda95a80a462b119035ab694fde21e | 獲取商品建議採購量信息 | namespace BLL.gigade.Mgr
public class ProductItemMgr : IProductItemImplMgr
public DataTable GetSuggestPurchaseInfo(ProductItemQuery query,out int totalCount)
{
try
{
return productItemDao.GetSuggestPurchaseInfo(query,out totalCount );
}
catch (... | 1 |
4f83b7f81abe04c75b92c286093b8c12 | 6e77fd1d462940242b2448fadeadb255 | 设置任务状态回调 | public class DownApkTask
public void setOnCallbackListener(OnCallbackListener listener) {
this.listener = listener;
} | 1 |
78c286090a2a4d1cc33d87d571b6ad99 | e21f33d29894747acd65d3b89734f2dc | A new instance with each new connection. | class Connection:
def __init__(self):
self.new_state(ClosedConnectionState) | 1 |
11972734e005636fc5c9ec2d1ebfa24c | 8e046c8b7301b3d9313e89013f468dbc | 销毁一行 | {
string *text=({ });
mapping me=pl->query_temp("me");
me["is_Command_Mode"] = me["is_NewFile"] = 0;
me["is_Modify"] = 1;
if (me["iS_Row"]+me["iRow"]-3 >= 0)
text = me["sText"][0..me["iS_Row"]+me["iRow"]-3];
text += ({ "" });
text += me["sText"][me... | 0 |
4b76a933650a14c4c8dab477bfdc5814 | ec74a81bdfd330fa76804c0451660d72 | vypis obsahu struktury a dealokacia struktury | int main(){
outer_struct* st = alloc_struct();
free(st);
printf("Finished\n");
} | 0 |
eac1df3e864d59e97dca26a915933b29 | dd78f27ba4801e82557c43d96eb4b635 | The priority of a worker is the priority of the first method it's going
to run. | public int getPriority() {
return m_methodInstances.length > 0 ? m_methodInstances[0].getMethod()
.getPriority() : 0;
} | 1 |
823bf5c18b9788e0c581d7946991eec1 | 5b5b8bd24268e053627e03ea58c0bc3a | isIdentifier reports whether s is a Go identifier. | for _, r := range s {
if !unicode.IsLetter(r) {
return false
}
}
return true
} | 0 |
04e65bdeb80808d32dfd237d0348c00f | 928764cb898d18c5e1dd4c5882e3756f | ##title<<
## Method 'Trs' to calculate phenology metrics
##description<<
## This function implements threshold methods for phenology. This is rather an internal function; please use the function \code{\link{Phenology}} to apply this method. | tryCatch({
trajectories <- Sim.DiffProc::GBM(N = N$UP[index, 1],
M = 1000,
T = T$UP[index, 1],
theta = Stock_Daily_Data3$UP$mu[index],
sigma = Stock_Daily_Dat... | 0 |
88b8198d5f885b4275e74d9cafddaf8d | 678b9569d54787da93d5f20068be28f7 | Рекурсивна реалізація знаходження числа Фібоначі через лямда-вираз | public class ThreadHelper
public static long fib(final long numberToCalculate) throws Exception {
final FibCalculator fibCalculator = new FibCalculator(numberToCalculate);
final Future<?> first = EXECUTOR_SERVICE.submit(fibCalculator);
first.get();
return fibCalculator.getResult();
} | 0 |
0c02aa1b96835892fb14ad8acc4bfa5b | 026febd0cd226487b7b2d27be9ff9889 | Check to see if DatabaseHost property is set | namespace Amazon.GlueDataBrew.Model
public partial class UpdateRecipeJobRequest : AmazonGlueDataBrewRequest
internal bool IsSetDatabaseOutputs()
{
return this._databaseOutputs != null && this._databaseOutputs.Count > 0;
} | 0 |
7ceedfb3f1abfa7a7dffef2e3c033bf7 | 022f882a376ab02566e9f93f1288db92 | 更新累计登陆活动奖励领取位图 | function ClsFestivalActivityData:updateDailyGiftHadReward(had_reward)
self.recharge_info.had_reward = had_reward
self:updateView(VIEW_UPDATE.RECHARGE_INFO)
end | 0 |
bdac823ef513eec5d5f5cf781f877ad1 | d51e8d7c2f6e9adbc79b4e82728de96e | Create product group and product, store fb-specific info | {
try {
$response = $this->productServices->addProductToGroup(
$request->product_id,
$request->group_id,
$request->group_name
);
return response()->json(['message' => $response],200);
} catch (\Exception $exception) ... | 0 |
e09cda579d0ac3e1a4c26ca0d84acfb8 | 7ec2620f3349c776175ac68e18bfaf8b | Returns a URL encoder for this resource. Framework use only. | public class FixedLoadProvider<A, T, Z, R> implements LoadProvider<A, T, Z, R>
@Override
public ResourceEncoder<Z> getEncoder() {
return dataLoadProvider.getEncoder();
} | 0 |
44d7d469d47444bc40d0a8e5ca56359c | 4bdffa534fd218592e5b3ff6d197f95f | 全てのシートを再描画する | namespace SuperDoku
public class Grid
public void RePaint()
{
foreach (Square s in mSquares)
{
s.RePaint();
}
} | 1 |
d1c1c9c2e6b23fcde8ef204b74a91470 | 9bfd07692090d232bea8f4177d34e3e8 | アプリ起動中に呼び出すことで、ウィンドウが移動していればその位置を記録します。 | {
Properties.Settings settings = Properties.Settings.Default;
if (settings.App_IsPositionSaved && (0 <= settings.TermWindow_Left && 0 <= settings.TermWindow_Top)) {
this.Left = settings.TermWindow_Left;
this.Top = settings.TermWindow_Top;
}
... | 0 |
ed45caf07fff38db9b4da6143817f700 | 4c871a1682463079ed707154d6aabcba | 获取企业部门列表以及部门下人员列表 | public IActionResult Getalluseranddeps()
{
var response = ResponseModelFactory.CreateInstance;
using (_dbContext)
{
var userinfo = ZWDingHelp.GetscopesV2();
if (userinfo.success == true)
{
if (userinf... | 1 |
f41e464d09f1e54b3e5896c5d3bc8fe3 | 80a898bfb083ea12e86f0398c1236103 | 庄家左右看动画 | removeLord()
if mArmatureFarmerRight ~= nil then
mArmatureFarmerRight:setScaleX(-1)
mArmatureFarmerRight:setPosition(TableConfig.StandardPos[2][1], TableConfig.StandardPos[2][2])
mArmatureFarmerRight:getAnimation():play(ARMATURE_NONGMIN_PREFIX..ARMATURE_DAIJI)
mArmatureFarmerRight:setVisible(true)
end
if mA... | 1 |
4751f4f17042e8f9904ccfc2727e6668 | a5beca6722612872e6750920b020435b | 判断流水号是否存在,并进行相应的缓存维护 | public int isExistCashFlow(String tradeNO); | 1 |
ea31ee9884836d82c5509b20338b8a09 | 0c4ee0cc37880fe7d5e56c66d2960324 | Initialize the KAA connection and wait for the callback to initialize the coffee machine connection | public class Main
public static void main(String[] args) {
CoffeeServer myServer = new CoffeeServer(USER_EXTERNAL_ID, USER_ACCESS_TOKEN, HOST, PORT);
myServer.initKaa(() -> {
myServer.initCoffeeMachine();
});
} | 1 |
318ef251e033a52e0e4b085a222925a1 | 5e49ba6cea5d833502dde284460c0502 | 依次答题 | if(g_test||g_recordData[g_pageIdx].isRight){
if(g_pageIdx<g_question.length-1){
g_recordData[g_pageIdx].ui=$(".user .ansui").html();
g_pageIdx++;
updateUserUi();
allReset();
}
}
} | 1 |
96b06c29ebfec834e1d24bae604d0205 | 7078fd1b692a810bf77e1bf251f6d3a9 | Specify a string to display when users connect to a server. This string is displayed before the user authenticates. | class ServerArgs:
def post_authentication_login_banner(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "post_authentication_login_banner") | 0 |
7f02867ad8dafd88c71e28b66bef9650 | d1b784665b667807d5bce85717b2b9d0 | Filter the collection to show only positions with a total market value > one million | namespace Solnet.Extensions.Models
public class TokenWalletFilterList : IEnumerable<TokenWalletAccount>
public TokenWalletFilterList WithNonZero()
{
return new TokenWalletFilterList(_list.Where(x => x.QuantityRaw > 0));
} | 0 |
f0dfcf0000097b3fa5864bdad63f7dff | 9bf9c6a9118df09e036e0f8efd96a442 | List and add all the batchify_functions to current module. | F.linear = TORCH_FUNCTIONS[F.linear.__name__]
F.conv1d = TORCH_FUNCTIONS[F.conv1d.__name__]
F.conv2d = TORCH_FUNCTIONS[F.conv2d.__name__]
F.conv3d = TORCH_FUNCTIONS[F.conv3d.__name__]
F.conv_transpose1d = TORCH_FUNCTIONS[F.conv_transpose1d.__name__]
F.conv_transpose2d = TORCH_FUNCTIONS[F.conv_tr... | 0 |
45f71a74a899d0738cf661ff578bcb4d | b9375ea1bddedc1d67f8dd3b37541af6 | When the items have changed, we need to adjust the selection. | __changeSelectionArray() {
this._updateSelection();
} | 1 |
f8842a6dab31ea0a36aaac9477410bba | 4072a0ded916bf28d0b7f3bfe4aa2273 | calculate g costs: 10 (vertical/horizontal move) or 14 (diagonal move) | int G_calc(int dis_cal_line, int dis_cal_column)
{
if((dis_cal_line == current.ln) || (dis_cal_column == current.clmn))
return maze[current.ln][current.clmn].pth_lngth.G + ORTHOGONALLY;
else return maze[current.ln][current.clmn].pth_lngth.G + DIAGONALLY;
} | 1 |
a2645b2ad4003293d2057940d73ea57f | a32a524cc4c5f30d7fefe23e985f9716 | Audits a request for a given folder's meta data (e.g. through <see cref="IFileSystemProvider.GetFolderInfo"/>.
Be aware that this might cause verbose audit trails. | namespace Vfs.Auditing
public static class AuditHelper
public static void AuditFolderInfoRequest(this IAuditor auditor, FileSystemTask context, IVirtualFolderItem folder)
{
if (!auditor.IsInfoEnabledFor(context)) return;
string msg = String.Format("Folder information requested:\n{0}", folder.CreateRes... | 1 |
017169098dc1c8eca1a1d701142fd7ec | 86f4adaed273d3d9f77a8b6394dc3770 | Returns an existing <see cref="ShellContext"/> or creates a new one if necessary. | TContext Create(); | 0 |
98fc7ccdf435398cd6f125228f24cd73 | 2c177bc923a5dff92cfb38ee2167975b | increase player's runningspeed after every certain distance | {
if (playerSpeed > startSpeed)
{
playerSpeed = startSpeed - Mathf.Log10(Time.time - startTime + 1) / 10;
}
else
{
playerSpeed = startSpeed - Mathf.Log10(Time.time - startTime + 1) / 10;
}
} | 0 |
cc41573405df125cd0037360f2c585f3 | 55dd00e96b9fd073574ea0833ba26205 | 阻斷陣列排序 | class ArraySort
public function sort()
{
('asc' == strtolower($this->order)) ? asort($this->arr_num) : arsort($this->arr_num);
} | 0 |
0d61094079228b15eea38c580791b6e4 | 0e2b95240229dd23876ab7bb50724cfc | Constructor of Session class | class Session extends CI_Model
function __construct()
{
parent::__construct();
} | 1 |
bf335d6c53c7a7bcebe6ef3479a03286 | 5b2edeaf4a10baa761bea7b990f3c7ad | Configure DMA - Port to Memory on RX module
UART RX DMA (DMA1 Ch5) | {
dma_port_mem3.Instance = DMA1_Channel5;
HAL_DMA_Init(&dma_port_mem3);
if (huart->Instance == USART1) {
__HAL_DMA1_REMAP(HAL_DMA1_CH5_USART1_RX);
} else if (huart->Instance == USART2) {
__HAL_DMA1_REMAP(HAL_DMA1_CH5_USART2_RX);
} else if (huart->Instance == USART3) {
__HAL_DMA1_REMAP(HAL_DMA1_CH5_... | 1 |
0e836e8d8f33eb421cf69650c5fd2a69 | 28150aecb752d8685cc5e720e0fdd6d6 | 通知PlayService-播放 | Intent musicIntent = new Intent(this, MusicPlayService.class);
try {
musicIntent.putExtra("MSG", Constant.PlayerMsg.PLAY_MSG);
startService(musicIntent);
} catch (Exception e) {
e.printStackTrace();
}
} | 1 |
46b4719253ba67b4c3c3b0ede8cf0a70 | 21cba63978fd9c52ddb7bfd15a72d4ca | arranges child windows from left to right then down | {
layout_mode = FLOATING;
int i;
Node *curr = first;
int yOffset = 0;
int xOffset = 0;
for (i = 0; i < win_ct; curr = curr->next, i++) {
int windowWidth = (screen_width / 3) + (screen_width / 100);
int windowHeight = screen_height / 3;
int x = screen_width / 2 - (windowWidth / 2);... | 0 |
4197d20a0500307beca948b4aee4b307 | ae51a50b4e3d9a5e44184a95976a880e | Gets rows from the datasource based on the ActionProductReview_PK index. | {
List<ProcessReview> listProcessReview = null;
try
{
string userID = utilitie.GetCurrentUserID();
Constants constants = new Constants();
connFactory = new ConnectionFactory();
conEservices = connFactory.getNewCo... | 0 |
c1ba6f5927c7c4eaff1bf84156f0ea9b | 98bf86d7e365ded269949fd4a4f4b018 | 查找最近注册的用户 | public List<UserValue> getRecentRegistUsers(Date startDate, Date endDate,
int startindex, int fetchcount) throws Exception; | 1 |
29b433e24e68344443429ccb328bb78a | 9ca155c9fe4bd648d3e784111ff155fd | 根据id获取月计划数据 | public AttenMonthPo getById(Long id); | 1 |
c345ac2b1a0e6a09378bf5fd5fa44f55 | f256774536f44ba6deec182e1801d35f | Extracts first stage RPN features. | memory_feature = self._memory_feature
if self._use_memory_feature:
if self._num_mask_slots:
memory_feature = self._memory_feature[:, :self._num_mask_slots, :]
memory_feature = tf.tile(memory_feature,
[tf.shape(inputs)[0], 1, 1])
endpoints = {}
output = ... | 0 |
bc8b465dbc1dc8193c29265d48952be6 | 0589bfeecea85d879325c9f21457d05a | Get the current roller speed parameter | float __MoonRoverGetSpd(void){
return getSpeed();
} | 1 |
82b1c5450cfa265c2a27af27dcf92777 | 0f185d1b6eb2761c09319c7911c4cda2 | Returns the meta object for the '{@link ClassDiagram.Customer#addEventBooking(ClassDiagram.EventBooking) <em>Add Event Booking</em>}' operation.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EOperation getIBookingManager__SetBookingCustomer__Booking_Customer(); | 0 |
dd07099256db9d8a13446bcc0e5c0d8d | bac07e548bd7837bb8a08da0ae7b748f | adds digit to the monitor | function addDigit(dig) {
if ((eval(currentInput) == 0) && (currentInput.indexOf(".") == -1)) {
currentInput = dig;
} else {
currentInput = currentInput + dig;
}
displayCurrentInput();
} | 1 |
e0ae9d365157cacfdf5ee4a6bcaeac2a | 511972f71b26efa48e239a3540d5fe73 | Set the context refresh period, in milliseconds. | public class MobclixAndroid
public static void setRefreshTime( long refreshTime )
{
if( Application.platform != RuntimePlatform.Android )
return;
_mobclixPlugin.Call( "setRefreshTime", refreshTime );
} | 1 |
36bee88d7cede07f53e4f3efba686cd9 | 7cdbd811c45f730d1ae61a3ee8f5550f | ## Returns the confusion matrix | if (attr(mat,'class')!='confusion.matrix') stop('mat must be of class confusion.matrix')
return(mat[1,2]/sum(mat[,2]))
} | 0 |
de094668fb4ad7073bf4ebe5f2e5434a | 7851c2f49ad595684564b8e4f4490930 | == 5.1 국제표준도서번호(ISBN) 중복 검사하기 == | Connection conn = DAO.getConnect();
try {
return bookDAO.selectIsbn(conn, isbn);
} catch (Exception e) {
e.printStackTrace();
System.out.println(e.getMessage());
return null;
} finally {
DAO.close(conn);
}
} | 1 |
6b550e36071b2666ee40c0c8f454f0e2 | 2a90dbb4293936e9ab42929f7b7956d3 | 西元==>民國 日期轉換 (格式:2010/10/21 ==> 99/10/21) | function formatDateYYYMMDD2(dateStr) {
if (!checkIsNullSpace(dateStr)) {
var returnDate = new Date(dateStr);
var displayMonth = "";
if ((returnDate.getMonth() + 1 < 10)) {
displayMonth = "0" + (returnDate.getMonth() + 1);
} else {
displayMonth = returnDate.getMonth() + 1;
}
var displayDay = "";
if ... | 1 |
6c3e27de09377c22586e5540bf1a0519 | 7efef619f11d9e31d2eb1c38c34f5eb8 | 验证客户是否为 该理财师下 | StringBuffer sql = new StringBuffer("SELECT COUNT(1) NUM FROM BD_MDM_KHQXGLB WHERE KHBH=? AND (");
sql.append(" SUBSTR(KHFZR,0, INSTR(KHFZR,'[',1)-1)=? ");
sql.append(" OR SUBSTR(FHSPR,0, INSTR(FHSPR,'[',1)-1)=? ");
sql.append(" OR SUBSTR(ZZCXDD,0, INSTR(ZZCXDD,'[',1)-1)=? )");
Integer num = 0;
Connection c... | 1 |
7b47e48528a9cc9c62359c0f5206e6b3 | 69718dc67c4df5d9c323093ce15e6673 | Return the intersection of two closed intervals as an interval
If the two intervals do not overlap, return None | def union_intervals(p1: (int, int), p2: (int, int)) -> tuple | None:
if p1[0] < p2[0]:
if p1[1] < p2[0]:
return None
else:
return p1[0], max(p1[1], p2[1])
elif p2[0] < p1[0]:
if p2[1] < p1[0]:
return None
else:
return p2[0], max(p1[... | 0 |
a8a83bed0b738f1d829bcc576602965c | d51f893cb464047f5f3a4c094a214117 | Splits message by spaces so that we can parse the commmand sent from client. | public class MyVelibController
public String[] parseCommand(String command) {
return command.split(" ");
} | 1 |
f332a7e16726d7574ecb2bae02bdec15 | a35d2ec9ee2ce791c632a59da4361fd6 | Affiche ou cache l'icone choisi | lienObjId,
subIdSaisieEditeur,
subIdOutputText,
libelleDescription
) {
var reg=new RegExp(":", "g");
var escapedLienObjId = lienObjId.replace(reg, '\\:');
var lien = jQuery('#' + escapedLienObjId);
var parent = lien.closest('table');
var saisieEditor = parent.find('[id$="' + s... | 1 |
a9344efd2373bee357abfd4d180ffe36 | 5f68ac37765fe87a05d3cbd11dafd8eb | Metodo que retorna os dados do endereco de uma pessoa fisica | namespace ControleClientes.API.Controllers
[ApiController, Route("[controller]")]
public class EnderecosController : BaseController
[HttpGet("{enderecoId}")]
public IActionResult Get(int idPessoa, int enderecoId)
{
var endereco = _dbContext.Enderecos.SingleOrDefault(e => e.Id == ende... | 1 |
366a5bde2935d486114d8d457981acba | ebad0a036dc1d8ff5821a203ee2e09ff | Visits the specified unit reference. | public Object visitReference(Reference reference); | 1 |
52f6be3aae7478e5701670cf9fd4a3ea | 32da5f5b5c9e1f3bf7c97778e5a15298 | 返回指定长度和带小数点及之后长度的转换自数值数据的字符数据。 | namespace DotNetCore.Common
public static class CommonConvertor
public static decimal? ToDecimal(this object obj, int length)
{
if (obj == null || !obj.IsNumber())
return null;
return Math.Round(Convert.ToDecimal(obj), length, MidpointRounding.AwayFromZero);
} | 0 |
7bd3f6489c31e6033c7780f5f8963e07 | d4b1ffe4ef5915e040dfd093b625d35b | Drains a given channel of any points. | double[] toBeDeleted = (double[]) channels[channel];
for (int i = channel; i < this.channelCount - 1; i++) {
channels[i] = channels[i + 1];
}
if (!lazy) {
grow(this.channelCount - 1, true);
} else {
channels[this.channelCount - 1] = toBeDeleted;
}
channelCount--;
} | 0 |
fc9e79dadd1333607d632545a4148ba3 | aa8702ffedd3f016768c50395dfd30c7 | Test A, B, k, d, r, properties. | class TestBaseSolver:
def test_properties(self):
solver = self.Dummy()
assert solver.A is None
assert solver.B is None
assert solver.k is None
assert solver.d is None
assert solver.r is None
with pytest.raises(AttributeError) as ex:
solver.A = 1
... | 1 |
c1495f84b73168441321276b0e281977 | e822d3720829023b5e201b475a68917b | Build a sprite sheet from images found in the given source directory
and output the result in the given destination directory. | spritesDirs = getDirs(outImgPath, prefix);
needSprite = !!spritesDirs.length;
if (!needSprite) {
done();
}
var tasks = spritesDirs.map(function (spritesDir) {
var tempstr = spritesDir.replace(outImgPath, ''),
dirName = pJoin('./', pDirname(tempstr)),
baseName ... | 1 |
831956b72dfe258122607abacb2c0ed0 | 371c073d8eaadfb580cc48a661d6ebf1 | Parses a list of comments and returns a list of `Comment`
instances. | def render_comment_list(parser, token):
ref_token = handle_tokens(token)
return CommentListNode(ref_token) | 0 |
4cdc369347dde9736f2c2a2183d46650 | 8e70483c12e3eee72fa3921d2b270dfb | pinta una linea horizontal | void draw_line_horizontal()
{
glLineWidth(2.0);
glBegin(GL_LINES);
glVertex2f(25.0,25.0);
glVertex2f(35.0,25.0);
glEnd();
glFlush();
} | 1 |
886b4afc6ae56399dc29fdc142275da8 | a0ae67727230053ac0cd1788f81b0080 | testing pop_front() invalidation | List *list = new();
pushBack(list, 1);
pushBack(list, 2);
for (int i = 1; i < 3; ++i) {
assert(i == valueAt(list, i-1));
}
destroy(list);
} | 0 |
830ac44da9c72e5fceb87f95cced171b | ca85608d915f473df7a3c9ebf2d02b07 | Query the value of the BalanceMax property. | class ParagraphStyle extends AbstractStructBase
public function getBalance()
{
return isset($this->Balance) ? $this->Balance : null;
} | 0 |
f40182a6085f269d662fee6391c3c354 | 5721db39a6c5593d2491fac5c14e9d1f | Return a list of (year,month) tuples spanning the first date to the last | if start > end:
temp = start
start = end
end = temp
ret = []
while start.year != end.year or start.month != end.month or start.day != end.day:
ret.append(start)
start = start + timedelta(days=1)
ret.append(end)
return ret | 0 |
5e6b292ca89cb0f1359ec00d9fc86188 | 852385aad10a811d78ca6ca371444bd3 | 메일 서버의 Timezone을 설정에서 검색 | public TimeZone findTimeZone(String zipCode); | 0 |
0a04ddb24920583950f6ccd29d0db708 | 4124a540cc8036d09328b2afb40e48d9 | 删除QuestionRecord信息的方法 | namespace Tellyes.DAL
public partial class QuestionInfo
public bool Delete(int Q_ID)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("delete from QuestionInfo ");
strSql.Append(" where Q_ID=@Q_ID");
SqlParameter[] parameters = {
new SqlParameter("@Q_ID", SqlDbType.Int,4)
};
parameter... | 0 |
f373b0c68ee387f82cfff5a288e28150 | 2a1674b399c74efe83a983502f27c735 | Megvizsgálja, hogy a belsõ állapot állapot-e.
Ha igen, akkor igazat ad vissza, egyébként hamisat. | public class Sator extends Targy implements Epitmeny, Serializable
@Override
public boolean megvedHovihartol() {
if(all)
return true;
else return false;
} | 1 |
5cc3ecb77603510e381382a5bec588ae | 50eb91a383a66fb88c7d804a9625e3ec | Gets the notional of the transaction (in currency1). | public class BondFuturesYieldAverageSecurityDefinition extends FuturesSecurityDefinition<BondFuturesYieldAverageSecurity>
public double getNotional() {
return _notional;
} | 1 |
0a6bc05635ab7e71833714dc7fe89cf3 | b4b93403f241131864d971a90bf040b2 | Provides a list of team member labels | {
$lists = array();
if(is_array($this->_lists)){
foreach($this->_lists['data'] as $list){
$lists []= array('value' => $list['id'], 'label' => $list['name'] . ' (' . $list['stats']['member_count'] . ' ' . Mage::helper('monkey')->__('members') . ')');
}
}else{
$lists []= array(... | 0 |
caa553ff83d6be85e2468925b29b6ee7 | 5ef3e8352615c391a46604b5f1a42294 | @brief Slot for Point Grey Top Camera JPEG checkbox. | void TWAIN_App_QT::on_chkExtImageInfo_clicked(bool bChecked)
{
EnableGUIByCurrentState();
return;
} | 0 |
feb6e578ad976ee66b3ddf47a52b2c20 | c66359a9836d2fbcb5ac49f580518a84 | 飞行人员统计 根据管理局id查询 | @ApiIgnore
@ApiOperation(value = "获取公司同型号航空器飞行总时长",notes = "返回两个参数,第一个参数为航空器型号,第二个参数为该型号航空器飞行总时长")
@ApiImplicitParams({
@ApiImplicitParam(value="公司ID(可以是','分隔的多个id,可以是单个id)",name="companyIds",dataType="String"),
@ApiImplicitParam(value="查询开始时间",name="startDate",dataType="String"),
@ApiImplicitParam(value="查询截止... | 0 |
d2ddb243a61d6541f32bf2acd0dbef68 | 0f2f08a888897036e4f5c2491eba20ed | Calcular el INCREMENTO segun la edad del propietario | class Auto
def calcular_incremento
if edad_propietario < 26
return 1.25
elsif edad_propietario >=26 and edad_propietario <= 30
return 1.10
elsif edad_propietario > 65
return 1.1
else
return 1
end
end | 1 |
55912f15415767771035b5626237b4be | 92c01e45039e60494bbb8608433a1f8b | Getter for <code>gouchehui2.0.gch_user_4s.tel</code>. 电话 | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DomQuotaApplyInfo1", propOrder = {
"applicant",
"applyTime",
"areano",
"buyerChnAddress",
"buyerChnName",
"buyerFax",
"buyerRegNo",
"buyerTel",
"clientNo",
"contractSum",
"contractTimeBegin",
"contractTimeEnd",
"c... | 0 |
8fd0333ab6d46c8113c080a00a00babb | e4f9a1b6b595f629eccf483c205f0fc9 | Sets the property wkHtmlToPdfEngine value | class Phoenix_Stats_Service_PdfRenderer
public function setPdfEngineConfig(array $aPdfEngineConfig)
{
$this->setPdfEngineConfig($aPdfEngineConfig);
return $this;
} | 0 |
a520f569bf975025bd33c2f675233bbb | 88262a68ece3b4dd8ccb1dd1c3f03429 | Get all locally saved neighborhoods with proper error handling. | export class RestaurantsDatabase
getNeighborhoods() {
return (
this.getRestaurants()
.then(restaurants =>
restaurants.map(restaurant => restaurant.neighborhood)
)
.then(neighborhoods =>
neighborhoods.filter(
(neighborhood, i) => neighborhoods.indexOf(nei... | 0 |
6e90fff5e466bcb0c5970b20bab2e790 | 9be8b0478948ee14f352f86bfd8620b8 | 检验tick数据的正确性 | timestamp = str(data["data_time"])
dt = datetime.strptime(timestamp, "%Y%m%d%H%M%S%f")
tick = TickData(
symbol=data["ticker"],
exchange=EXCHANGE_XTP2VT[data["exchange_id"]],
datetime=dt,
date=dt.strftime('%Y-%m-%d'),
time=dt.strftime('%... | 0 |
8d0d3e44ae6dc72f3fb22cc0dfbb3bc2 | dc42a93c5980ff299acbd1304607ccd7 | tohyo_Keiを設定します。 | @Entity
public class HaitoKinKakutei
public void setSeiYmd(Date seiYmd) {
this.seiYmd = seiYmd;
} | 0 |
53ebd81be53377e0a0a4661f0f134698 | 965ce1dd3744be8a5e5dbb920424935c | checks to see if combat is over | function clsCombat:CheckFinish()
assert(false, "override me")
end | 1 |
d6f86cbd30528aa87443a615371a2186 | 25f40766184b77e68a44cabc8b98d078 | hashSHA1Cfg : Функция, создающая hash SHA1 config.rsc | {
using namespace winreg;
try
{
string policyPath = [&]()
{
if (policy == SecOption::BLACKLIST)
return R"(SOFTWARE\Policies\Microsoft\Windows\Safer\CodeIdentifiers\0\Hashes\)" + guid;
else
return R"(SOFTWARE\Policies\Microsoft\Windows\Safer\CodeIdentifiers\262144\Hashes\)" + guid;
} ();
RegKey ... | 0 |
87df42888b6ddc3b3581be63ad1113f3 | 4f19a1296a4e62ce70f95869586def95 | Sets the edition for the SQL Database. | @Beta(Beta.SinceVersion.V1_7_0)
SqlDatabaseOperations.DefinitionStages.WithEditionDefaults withStandardEdition(SqlDatabaseStandardServiceObjective serviceObjective); | 1 |
d43b127ae249de4c76550f63d8e94bdc | 739592cb52116458f3a60623ecf6daaf | returns an instance of Ag::Point2d | class Point
def initialize(*coords)
@coords = coords
end | 0 |
5804e9b317f9c0fe00bcb579f08ca41e | 0c1d3977d6214c2ebc90b6158491b23d | ● 更新右移 | class Window_Selectable
def cursor_right(wrap = false)
if col_max >= 2 && (index < item_max - 1 || (wrap && horizontal?))
select((index + 1) % item_max)
end
end | 1 |
57b999daac0d734d485b7ece044555ba | 595e88c9e5f4b72c26f5cd4dda1e8f0a | https://gist.github.com/ianmcloughlin/c4c2b8dc586d06943f54b75d9e2250fe | func round(x float64, prec int) float64 {
var rounder float64
pow := math.Pow(10, float64(prec))
intermed := x * pow
_, frac := math.Modf(intermed)
intermed += .5
x = .5
if frac < 0.0 {
x = -.5
intermed -= 1
}
if frac >= x {
rounder = math.Ceil(intermed)
} else {
rounder = math.Floor(intermed)
}
... | 1 |
f6338ef9d81a429137f5621c6243b8a8 | 47691ecd2fa808634aab8a3c8eaf9988 | The time, in seconds,
to wait after an APD timeout event to run the response action defined in
`ha_datastore_apd_response`. Default: `180`
seconds (3 minutes). <sup>\\*</sup> | public class tmtrafficaction extends base_resource
public void set_apptimeout(long apptimeout) throws Exception {
this.apptimeout = new Long(apptimeout);
} | 1 |
2f41af4038ae21a2e254ba347e178b11 | 782148bab99e4776235122c797118c8b | 更新Gradient四角的半径 | @SuppressLint("AppCompatCustomView")
public class TagTextView extends TextView
private void setRadius(GradientDrawable drawable, int leftTopRadius, int leftBottomRadius,
int rightBottomRadius, int rightTopRadius){
if (radius != 0) {
drawable.setCornerRadius(radius);
... | 1 |
1273395cccaa4b493f9d40c81e5ea4b8 | 74190718ab333e17c673d42b0f2b3b09 | Algorithme de Breadth-First-Search, pour trouver le plus court chemin entre deux élèves | int ParcoursEnProfondeur(int depart, int arrivee, graph_t graphe){
if (depart >= graphe.size_vertex || arrivee >= graphe.size_vertex ){
printf("Les sommets demandés ne sont pas dans le graphe");
return 0;
}
if (depart == arrivee){
return 1;
}
else{
int trouve = 0;
... | 0 |
91e262e2910691f60d623461daee2985 | a0d111a8fc6f2d1503c1e96325269884 | 写入生成简化商品二进制文件 | public class FileLoader
public static void writeGoods(List<CSGOItems> item) {
try {
File goodsFile = new File("Goods_" + START_DATE + ".json");
if (!goodsFile.exists())
goodsFile.createNewFile();
FileWriter writer = new FileWriter(goodsFile);
write... | 0 |
a40f32850319f84c1d076bdef9c8ed82 | 819618a822f5ec73225b735ea0b7b9d2 | DataTableをCSVで保存 | namespace MySqlBulkLoaderDemo
public static class CSVEx
public static void ToCsv(this DataTable table)
{
StringBuilder sb = new StringBuilder();
DataColumn colum;
foreach (DataRow row in table.Rows)
{
for (int i = 0; i < table.Columns.Count; i+... | 1 |
f2d24c37a3f77824d05d77a78b8137f1 | a8eb96609457d65bfb3d5333e5d2a545 | Returns current unix timestamp in microseconds. | class Servers extends AbstractClient
protected function preciseMicroTime() : float {
[$usec, $sec] = explode(' ', microtime());
return ((float) $usec + (float) $sec);
} | 0 |
78a1d3202e3483b69331e5cad7d62fdd | 9a8344cefb2e47a76f02b4e46d3ed4ee | Gets `spread` input of Splay.
:: | Quaternion jointRotation = Quaternion.identity;
if (finger_ != null) {
jointRotation = Quaternion.Inverse (finger_.Bone ((Bone.BoneType)(0)).Basis.Rotation (mirror_z_axis_))
* finger_.Bone ((Bone.BoneType)(1)).Basis.Rotation (mirror_z_axis_);
} else if (bones [0] && bones [1]) {
jointRo... | 1 |
6fc94b4885bbe703582bca71af4576d0 | 157ad92e3f6c548435a9ae2bb8726799 | Sets the css class of the tab title | namespace AutotaskCorporation.Autotask.Web.Mvc.Html.Buttons
public class TitleBarNavigationButton : IconButton
protected override IList<string> CreateCssClasses()
{
IList<string> cssClasses = base.CreateCssClasses();
cssClasses.Add("TitleBarNavigation");
return cssClasses;
} | 0 |
0fbbb15d5f972bf6b06ca6c239476efd | 4d4f45a2a0fe968a63631398b0db8fff | A new instance of &struct drm_gem_vram_object on success, or
an ERR_PTR()-encoded error code otherwise. | struct ttm_bo_device *bdev,
size_t size,
unsigned long pg_align,
bool interruptible)
{
struct drm_gem_vram_object *gbo;
int ret;
gbo = kzalloc(sizeof(*gbo), GFP_KERNEL);
if (!gbo)
return ERR_PTR(-ENOMEM);
ret = drm_gem_vram_init(dev, bdev, gbo, size, pg_align, interruptible);
if (ret < 0... | 1 |
89d7efa3180e7f88bd2a4ddb6cedc6d1 | f3eab08c15d5456a76c5320ee7e1ddf2 | run a rule based classifier and calculate the accuracy | class NaiveBayes:
def evaluate_classifier_accuracy(self):
correct = 0.0
total = 0.0
l = len(self.test_tweets)
f = open(file_paths.results_nb, 'a')
f.seek(0)
f.truncate()
f2 = open(file_paths.us_test_path, 'a')
f2.seek(0)
f2.truncate()
for t... | 0 |
df286ef1daf5dd244133c7c9134beb54 | b215beab025e1e9cc4cf8e92494b2c11 | Add this workspace to the workspace removal tree if it is not
already there. | public void authorizedToAddWorkspace(EndpointReferenceType ctxEPR,
String callerDN)
throws ContextBrokerException; | 0 |
a8eb6eaf1b105c847572ca009d2c880f | 0634bc7893acd888c92e34190f0e1b52 | Function to compute length of the active elements of the data. | def length(sequence):
used = tf.sign(tf.reduce_max(tf.abs(sequence), 2))
length = tf.reduce_sum(used, 1)
length = tf.cast(length, tf.int32)
return length | 1 |
5bb037f523b3688e9bc6ad155dc5b3f6 | 31f5f4af55e055006ea858fab431316d | Loads Author's data from XML "author" node | {
using XmlReader xmlReader = XmlReader.Create(textReader);
while (xmlReader.Read())
{
if (xmlReader.NodeType == XmlNodeType.Element && xmlReader.Name == "member")
{
string? raw_name = xmlReader["name"];
if (raw_name != null)
... | 0 |
071a90d6a13c22cb93a5f773499721a0 | b1ce92316cf45a65ff1923df27005a38 | Computes and sorts the distances between word(s) and every word. | filter_nan=True, print_len=10, as_strings=True,
dist_fn=angle, order='i'):
return dist_word_word(word_or_words, self.corpus,
self.model.word_matrix.T, weights=weights,
filter_nan=filter_nan,
... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.