query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
4df75d50fc4068eb792bfd0e27c244fa | 4f0c78bd469507c9228a3d507a5d2922 | Insert font link in the head section | function mll_insert_head_css($flux){
$css_mll = find_in_path('mll_styles.css');
$flux .='<link rel="stylesheet" type="text/css" media="screen" href="'.$css_mll.'" />';
return $flux;
} | 0 |
2a0662a8fca118181eb46fe86718854b | 9476da17868392dd6372bffb9ae9e2d0 | Loads a Java based IM(C/V) as specified in the given configuration entry
from file and calls the default constructor. | public void load(Resource resource)
throws ConfigurationException; | 0 |
c9978c4a4cbc23d3867e0dd6cc443338 | 1acb261f04687c7cb817561b899889ee | Gets current effect time. | public abstract class Effect extends RunnableImpl implements Comparable<Effect>, FuncOwner
public long getTime()
{
if(_template.isUnlimPeriod() && !_ignoreUnlimit)
return 0;
return System.currentTimeMillis() - getStartTime();
} | 1 |
409919e7303b22141c52f4c9f3220df5 | c13c788accd6323ed26d2406106d63d3 | Retrieve the SCPD for a service and create a UpnpService from it. | mdns_service: mdns.Service, response: mdns.Response
) -> Optional[ScanHandlerReturn]:
name = mdns_service.properties.get("CtlN", "Unknown")
service = MutableService(
get_unique_id(mdns_service.type, mdns_service.name, mdns_service.properties),
Protocol.DMAP,
mdns_service.port,
... | 0 |
c805becda16583a6563d5eb074afe453 | 5488037b122b775db0dce08854fe5a64 | This method used for destroying player object and showing game over panel | [RequireComponent(typeof(Rigidbody2D))]
public class Player : MonoBehaviour
public void DestroyPlayer()
{
PoolObject fx = PoolManager.Get(POOL_EXPLOSION_ID);
fx.GetComponent<SpriteRenderer>().color = Color.yellow;
fx.transform.position = transform.position;
gameObject.SetActive(false);
AudioManager.PlaySound... | 1 |
8c297a4914d000c9233f2799f36af373 | dd5c2fbf9c83fe42d7fd0cf9ad33cf65 | Adds a referential integrity rule that will be used on insert/update attempts. | {
$rules->add($rules->isUnique(['name']), ['errorField' => 'name']);
$rules->add($rules->isUnique(['canonical'], ['allowMultipleNulls' => true]), ['errorField' => 'canonical']);
$rules->add($rules->isUnique(['uri'], ['allowMultipleNulls' => true]), ['errorField' => 'uri']);
$rules->a... | 0 |
54924c712d453aabef2bd9a0569e984c | a2c188002194ec9983df849dbca624d2 | コンポーネントが見つからない場合、例外を送出すること | class ComponentTestCase(unittest.TestCase):
def test_unregistered_component(self):
class NoComponent(object):
pass
self.assertRaises(SeisHubError, self.compmgr.__getitem__, NoComponent) | 1 |
d39a3b6db444fcf8649995e0cfc0c9d7 | 42b29cfff25c42fbb06c4d494b1e39da | convert wofid integer to array of path components | if(typeof path !== 'string' || path === '') {
return [];
}
let i = 0, betweenBrackets = false, onlyDigits = false;
if(path[0] === '.') {
i = 1;
} else if(path[0] === '[') {
i = 1;
betweenBrackets = true;
onlyDigits = true;
}
let resultsArr = [] as Array<string|number>;
let tmp = '';
for(; i < path.le... | 0 |
15cc841640b3928e694823284fae15d3 | 8f4356e30991cbb36854345199de5ab1 | Solves the problem using a naive recursive approach. | class R(PrimRecFunc):
def eval_naive(self, xs: List[int]) -> int:
assert len(xs) >= 2
y = xs[0]
if y == 0:
return self.f.eval(xs[1:])
else:
return self.g.eval([self.eval([y-1] + xs[1:]), y-1] + xs[1:]) | 1 |
70eb61993bf9fcef9edf4ee2542fb19a | 077f9a5136a039b444463e1d96a38051 | Gets an IP address by its ID | $method = is_null($method) ? "id" : $method;
if(isset($this->addresses[$id])) {
return $this->addresses[$id];
}
else {
try { $address = $this->Database->getObjectQuery("SELECT * FROM `ipaddresses` where `$method` = ? limit 1;", array($id)); }
catch (Exception $e) {
$this->Result->show("danger", _("... | 1 |
8a2945b3bb021570f3b360d2df0ccba1 | 54a9bc4df5b28d964fd5858c7eeaa236 | Get next map to be played. | const controller = this;
const navigateMapService = controller.get('navigateMapService');
const profileId = controller.get('session.userData.gooruUId');
const contextId = controller.get('contextId');
controller
.get('quizzesAttemptService')
.getAttemptIds(contextId, profile... | 1 |
88637298629af1390b9449c40d130eb0 | 38b988d8f1aa156071e16f00b7e9cbf5 | Returns filtered data value for the specified electrode (0-11) | public class SensorDevice implements SensorEventListener
public float getValue(int eValueType) {
int index = valueIndex[eValueType];
return value[index];
} | 0 |
30af1c3f13949fa42c59bd7673c5c272 | 7f59f2a8cdf00adb802e9a48df681217 | Display a listing of the CmsMenus. | class MenusController extends Controller
public function index(Request $request)
{
$menus = $this->repository->orderBy('order', 'asc')->paginate($request->limit);
return $this->transform($menus);
} | 1 |
a80deffbfb852c4a3bfad7789021cffd | fa8df331a42d61327fe0ec33f0bd4156 | 功能:点击父节点选中/取消选中子节点
参数:1.元素标识符 | function selectBoxParent(ID){
var a=$("#MenuID" + ID + ":checkbox").attr('checked');
if(a){
var checked=true;
}else{
var checked=false;
}
$("#K_" + ID + " input:checkbox").attr('checked',checked);
} | 1 |
e1a97b049cbb7b5340408b199ab37113 | 38ce427f8f831f519184ad3268df8770 | Update the vocabulary's metadata for scheduling purposes | function scheduleVocabulary(
vocabMeta: IVocabMetaData,
diff: AnswerDifficulty,
answer: AnswerType
): IVocabMetaData {
const pr = performanceRating(diff);
if (answer === AnswerType.CORRECT) {
vocabMeta.consecCorrectAnswers += 1;
} else {
vocabMeta.consecCorrectAnswers = 0;
}
... | 1 |
6e754dc9b214e4a24118f4a02f16ec43 | 6ae41759064de9ba0e0a3025ff47d3c9 | 功能:获取View资源列表 | public class ViewProcessBean extends AbstractDesignTimeProcessBean<View> implements ViewProcess
public Collection<View> get_viewList(String application) throws Exception {
return this.doSimpleQuery(null, application);
} | 1 |
2e80c637e0f2a9705830e05b0c8fbd72 | 6239462b695bfaca766c949d343a44c3 | 删除无序顺序表L中在给定值s与t之间的所有元素 | if (L.length == 0 || s >= t)
return false;
int k = 0;
for (int i = 0; i < L.length; ++i)
if (L.data[i] >= s && L.data[i] <= t)
++k;
else
L.data[i - k] = L.data[i];
L.length -= k;
return true;
} | 0 |
bcf909d9db9c5c7e1fbb5bdba1bbe072 | c4552142d6f5e9b134b4d8a4dfd1398e | Checks to see if TalkBack is currently enabled | public abstract class AheadOfTimeBackCallback
public boolean isEnabled() {
return isEnabled;
} | 0 |
dc5f051bfe9a9ed1ecac32e28e6b930a | d33c748ec0c90b976ecec94800665295 | Emits the RAML model into its string representation and saves it as a file in the specified path | public class ResultWriter
public static void toFile(Model model, String filename) throws IOException {
FileWriter fw = new FileWriter(filename);
fw.write(model.toString());
fw.close();
} | 1 |
267a36a1c57c37f601f862f2024e9328 | d66215769bebfc14d6b174ae1c6dec78 | Deserialize tensor to picklable python object. | def _convert_tensor_value(tensor_data):
tensor_data_dict = {'dtype': tensor_data.dtype,
'shape': tensor_data.shape,
'data_size': tensor_data.data_size,
'data_ptr': tensor_data.data_ptr}
return tensor_data_dict | 0 |
41d35f8d4b74871495675eadc40cb526 | 9a9143c56e5b04f0915391449a3f33db | Updates the databases mounted on a kdb cluster, which includes the <code>changesetId</code>
and all the dbPaths to be cached. This API does not allow you to change a database
name or add a database if you created a cluster without one.
<para>
Using this API you can point a cluster to a different changeset and modify... | {
var options = new InvokeOptions();
options.RequestMarshaller = UpdateKxDatabaseRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateKxDatabaseResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
} | 1 |
f5dcf242976e2c9b87f43cf5abe5e4c6 | 4cffd66b831841d7af271e4bb0cdb820 | The SetupDiEnumDeviceInterfaces function enumerates the device interfaces that are contained in a device information set. | namespace Programmer
class Win32
[DllImport( "setupapi.dll", SetLastError=true )]
public static extern bool SetupDiEnumDeviceInterfaces(
IntPtr lpDeviceInfoSet,
uint nDeviceInfoData,
ref Guid gClass,
uint nIndex,
ref SP_DEVINFO_DATA oInterfaceData ); | 1 |
1cc9774cd731c797bb967d39097304e5 | 3fe235348c277f9e9f57fe17c6f80ab2 | Search lucky draw by phone and receiptNo | try {
t_tlr_mgmt = new T_tlr_mgmt();
t_tlr_mgmt.setPhone(phone);
start = 0;
limit = 1;
starttime = null;
endtime = null;
return findInfoByConditions();
} catch (Exception e) {
e.printStackTrace();
}
return SUCCESS;
} | 0 |
c53a40773aa1e96bf3951263f6462e45 | 9395518478f969767903a66c25473994 | 批量申请好友 | class FriendLogic extends BaseLogic
public function batchAddFriend()
{
try {
$friendDates = $this->getFriendDetail($this->wxId,$this->friends);
$client = new Client();
$res = $client->request('POST', 'http://114.55.164.90:1697/api/Friend/AddFriendRequestList', [
... | 1 |
23eff5b47f15d678ca75a1a2341390a5 | c2a675f47335bb5bc969cc790417066d | Return y position of AlumBox bottom right corner. | INT iY = std::max( 0, m_iHorPos );
LSW_RECT rClient = ClientRect( this );
return std::min( iY, static_cast<INT>(rClient.bottom - m_dwBarWidth) );
} | 0 |
d61c333898d5b674e5d01a88b8f401ae | bd90d0b9413f4fc7225b5b65150deb1c | Serializes the specified <see cref="T:System.Object"/> and writes the XML document to a file using the specified <see cref="IXmlWriter"/>, XML namespaces, and encoding. | {
if (string.IsNullOrEmpty(path))
throw new ArgumentNullException("path");
FileInfo fileinfo = new FileInfo(path);
if (fileinfo.Directory != null && !fileinfo.Directory.Exists)
{
Directory.CreateDirectory(fileinfo.Directory.FullName... | 0 |
8a5c9607ca812051526e93836820b565 | c62222f941d4588c0f6f6147ba5e3831 | This receives the keys from your keyboard and you can type until you want
to send by pressing the enter or return key | def keyboard():
global ch
while not rospy.is_shutdown():
fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(fd)
old_settings[3] = old_settings[3] & ~termios.ICANON & ~termios.ECHO
try:
tty.setraw(fd)
ch = sys.stdin.read(1)
finally:
... | 0 |
9527873a48bb3226e7d6ee2d69c1c89e | 5d90caf52ee8bafe0db924c39b04fca9 | A test with the following structure. The OpSelectionMerge instruction
should be removed.
loop header
|
|
s.header
||
block
| |
| |
| | ^ (to loop header)
s.merge | |
| / loop continue target (unreachable)
loop merge
which becomes:
loop header
|
|
block
||
block
| |
| |
| | ^ (to l... | bb_end = bld.create_basic_block()
bb_next = bld.create_basic_block()
a_val = bld.build_rload(ctx.reg_a)
bld.build_jump(bb_next)
bld.position_at_end(bb_next)
b_val = bld.build_add(a_val, a_val.type.create(1))
bld.build_jump(bb_end)
bld.position_at_end(bb_end)
bld.build_rstore(ctx.reg_... | 0 |
b1dff6ee77521a56623fb86a8da2b71b | 84fed1a3c5f232ccf4cdaf8d043d18f3 | Add a view that returns pages and HTTP operations as JSON. | class Manager:
def add_view(self, **kwargs):
resource_config = self._resources_map.setdefault(kwargs['context'], {})
request_method = kwargs.get('request_method', None) or 'get'
resource_config.setdefault('methods', {})[request_method.lower()] = {} | 0 |
a1b9f7334df6622c3dddc22e5a3bdc7a | de94578ec94f6bf0c44634db4deb10bd | Check if the current player has sufficient money to buy a vowel | namespace PortalRush.GameEngine
public class GameManager
public bool canBuy(int cost)
{
return cost <= this.money;
} | 1 |
bf069df0fd253cb65bfc313e208d0531 | 6d5fba51de5e132c29a9160e89528c8f | Test renaming when old and new names are the same. | def test_rename_package() -> None:
test_root = REFACTOR_TEST_ROOT / "rename_package_test1"
with session.LspSession() as ls_session:
ls_session.initialize()
uri = as_uri(test_root / "rename_test_main.py")
actual = ls_session.text_document_rename(
{
"textDocumen... | 0 |
84fe06ec72e67ca261cb1ee3cc79ba5f | 4059b6139a752c05315c25fa9b336a6c | Возвращает инфо о студенте по id | public class StudentService
public Student getStudentById(int id) {
return repository.showInfoById(id);
} | 1 |
1bd0209b264a521f122dd009c02d708e | e174b7dc8429514e38126e3f30cd26d8 | Encodes the provided device descriptor as text written to the supplied buffer.
with the number of characters written to the buffer.
text description. | struct device_attribute *attr,
char *buf) {
struct acpi_device *acpi_dev = to_acpi_device(dev);
int result;
if (acpi_dev->pnp.str_obj == NULL)
return 0;
result = utf16s_to_utf8s(
(wchar_t *)acpi_dev->pnp.str_obj->buffer.pointer,
acpi_dev->pnp.str_obj->buffer.length,
UTF16_LITTLE_ENDIAN, buf,
PAGE_... | 1 |
02241b9b119f20ef751a95d16ab7b84c | a2fe04bba0416806ab909c47fd63d6f2 | Adds the prologue instructions. | class VM
void genPrologue() {
pushCode({
0x53,
0x41, 0x54,
0x49, 0x89, 0xfc,
});
} | 1 |
b20d1628ea64e18606a82b75ad59d1cd | c589b326b5184ff44158b2f4eba80484 | store a secret and return its identifier | if self.debug:
print("Storing %s in %s" % (secret_name, self.vault_uri))
secret_bundle = self.kv_client.set_secret(name=secret_name, value=value)
return secret_bundle | 1 |
e2d3b6ec69217018b45c5814acf2c0f6 | 4177ebfd8adbd6501881a746af4305c6 | Get the Coffee bean's name | public class Snack
public String getName() {
return name.get();
} | 0 |
7e8fc1243754be3d16602e04a567a443 | 28b859980972e1f17f15d2858138b363 | 某个位置前面最近一个算术运算符的位置 | {
int level = 0;
int operatorLevel = 0;
int operatorPosition = 0;
expression = expression.Trim();
for (int i = 0; i < expression.Length; i++)
{
switch (expression[i])
{
case '(':
... | 1 |
4e00d6339f8f62ad1c572e948b287fda | aa7fd17915aeb9be0140927afd8a0945 | Validates that the argument firstName is not empty, throws an IllegalArgumentException if it is. | public class PersonName
public void setFirstName(String f) {
if(f == null){
f = "";
}
firstName = f;
} | 0 |
f28e46c35f0f77506e84c02ff76e6ed8 | e7cce6ca74af62e0ee71f932c64138d7 | Sets the value of the SO_RCVBUF option on the socket. | bool
XSocket::SetRecvBufSize(
INT32 bufsize
)
{
if ( X_IS_SOCK_VALID )
{
INT32 ret;
socklen_t len = sizeof( bufsize );
ret = setsockopt( _fd, SOL_SOCKET, SO_RCVBUF, &bufsize, len );
return ( 0 == ret );
}
return false;
} | 1 |
8b91e31dd61eadc3ee0b01bdd17975ea | aba1eb90e3760b8e981e80c3f6de6463 | Get an instance of {@link coffeetable.datastructures.web.HtmlTable} | TableTableElement tableElement = getTableElement();
if (tableElement != null) {
return OdfTable.getInstance(tableElement);
}
return null;
} | 0 |
3a6e4ba0817a2d50d8e96021d7ae5d4b | 0b8805d6b1f2a1437ad6b4953722b910 | Function that builds a custom message box based on the type of input parameters | msg = QMessageBox()
msg.setWindowTitle(f"{popup_type}")
if popup_type == "Error":
msg.setText(f"Error: {popup_msg}")
elif popup_type == "Success":
msg.setText(f"Success: {popup_msg}")
if popup_type == "Error":
msg.setIcon(QMessageBox.Warning)
... | 1 |
e7a30013b0d60f0e8115a67109052f2e | be913b45ed3fd14f3e75dbf65a2fc4f3 | This is a paginated call to list linked accounts that are linked to the payer account
for the specified time period. If no information is provided, the current billing
period is used. The response will optionally include the billing group that's associated
with the linked account. | ListSinks(new ListSinksRequest
{
ParentAsBillingAccountName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)),
PageToken = pageToken ?? "",
PageSize = pageSize ?? 0,
}, callSettings); | 0 |
0a2a20b47cd0bcad0e8d9283f7b5e4ff | 35b82ffdf6da82f46c43162f2e289c40 | 結果ビュー表示イベントを購読する。 | namespace Lobby.EditPlayerName public class EditPlayerNamePresenter :
// MonoBehaviorを継承する
MonoBehaviour,
// Initializeメソッドを持っている
Initializable,
// 上位のステート変更に対して呼び出し可能
IStateChangeable,
// LobbyStateに関するステートマシンを受け取り可能
IStateMachineInjectable<LobbyState... | 1 |
c6804eba43ece2770c69de8066ce4f51 | edc10399d17770aad232f6243bf075af | Get the name of the Season that is currently underway | with open(html_file, "r", encoding="utf-8") as f:
soup = BeautifulSoup(f.read(), 'html.parser')
this_season = soup.find("title").string.strip().split(" ")[-2]
return this_season | 1 |
977db5842e3d5ced38dc528e48e13f30 | 399c44108dcc8053bbf55e4f9d7dc470 | Sets the lower symbol. | public class ScopeBuilder implements Scopable
public ScopeBuilder charLow(char charLow) {
this.charLow = charLow;
return this;
} | 1 |
f0d74bd6f3118fb33f5d643aa71ec10e | b36ea063e2f4fa831918636682f212c2 | GET: CompanyDetail | {
CompanyModel CModel = new CompanyModel();
var item = CModel.Get(CID);
ViewBag.CName = item.Name;
ViewBag.CID = CID;
ViewBag.AccountType = LoginAccount.AccountType;
ProfitLoss_CoefficientModel pcModel = new ProfitLoss_CoefficientModel();
... | 1 |
41d3588d83a57d45ca99d2fa603330c4 | f486098ae21d0aa0c7dba65218309b9f | Utility method to explicitly define the name of the CSV file to be sent to
the user when he requests such format.
The name is composed as an underscore-separated list of tokens, the first
one being the controller's +action+ that is handling the request and all
the remaining ones composed from the method arguments. | String[] pieces = method.id().split(REGEX_DELIMITER);
String methodName = pieces[pieces.length - 1];
String resourceName = pieces[pieces.length - 2];
if (!method.isPluralMethod()) {
resourceName = Inflector.singularize(resourceName);
}
return Name.anyCamel(methodName, resourceName, "http",... | 0 |
37af87d24c4b7353ab7b0ac3d07ff932 | 0840c804d9f93f7116025adb5c670768 | Regularly add voices to scene depending on app's role | class GameForm(FlaskForm):
def add_role_fields(self, n):
num_players = len(self.roles)
append_or_pop = (self.roles.append_entry if num_players < n
else self.roles.pop_entry)
for i in range(abs(n - num_players)):
append_or_pop() | 0 |
86ad94482beaf3626588926bc47871f3 | 2e42554d0b4b12001aa689f99d69261c | update the master list object counter after new data is loaded | _onDetailContainerUpdate(evt) {
var widget = evt.getData();
widget.getLeftContainer().remove(this.__masterButton);
widget.getLeftContainer().add(this.__masterButton);
} | 0 |
7d95258e21ddf84cd4e13eef639cf620 | 68362f8ef3a7e224f2671b19ad682ca5 | Callback function from object search box. Sets the post_id for the object. | objRec_comm::objRec_SetObject::Response& res)
{
use_object = req.use_object;
if (use_object)
{
curObject = req.objNum;
}
res.ret = 1;
return true;
} | 0 |
83beb9e4ceedad3ca0c671c2e1f57437 | cc8b052aa300700751fa45250b3cf36e | 在建立连接时调用,记录时间 | public class NettyHandler extends ChannelInboundHandlerAdapter
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
ctx.attr(START_TIME).set(System.currentTimeMillis());
super.channelActive(ctx);
listener.onChannelActive(ctx);
} | 1 |
673a7f8ce49757ed970d027794a939cd | 9717a06acd038f4441b352dfdecc8eaf | read data from MCP3008 | class MCP3008(Sensor):
#######################################################
def get(self):
volts = self._read_chip()
reading = eval(self.conv)
return reading | 1 |
0f373bc7af00c6bd6a8702bb59f99292 | da4a55c7ef4614d55d36feb6a600327e | Navigate to login page with clearHistory | continueAsLoggedIn() {this.history.pushState(null, "/app");} | 0 |
294ee36ba3145dcc2888e23b1303a128 | ecfc8dd4b04c002642fe3048e288f5dd | # This draws a single Rank Abundance Plot | library("dplyr")
library("ggplot2")
library("cowplot")
source("R/utilities/prettyc.R")
load("data/pr_fcast_agg.rda")
df <- pr_fcast_agg
df %<>% mutate(country = prettyc(as.character(country)))
lvls <- df$country[order(df$ebma, decreasing=FALSE)]
df$country <- factor(df$country, levels=lvls)
df %<>... | 0 |
33f4cbd62a73438cf3cea15ec9171136 | ea9ac6bcbe871af15dac7e8650cf31e5 | 将dataframe的date属性转为非格式化的月-日形式
eg:2020-03-06->3-6 | def datetime_month(df):
return pd.to_datetime(df[['Year', 'Month']].assign(day=1)) | 0 |
d0eaef192f2f1219dc257260b7177ac2 | 574782e68c744efb9e83c53252cfdcc1 | functie voor het vullen van de interface van belangrijke stellingen | namespace Feudalism
public partial class Interface : Form
private void fillRelationBoxes(string withWhom, int otherLordNumber)
{
int thisLordNumber = Variables.getTerritory(selectedTerritory).getLordNumber();
Lord thisLord = Variables.getLord(thisLordNumber);
Lord other... | 1 |
20030f02125a5efb5a3083b8953034ea | 387f34bf5d847fd5539fe904139a1370 | Count of individual messages within the thread that are visible to a given user | @Slf4j
public class ProfileMessagingLogicImpl implements ProfileMessagingLogic
@Override
public int getMessageThreadsCount(final String userId) {
return dao.getMessageThreadsCount(userId);
} | 0 |
4b05550e556bc39030db7d8bfde160e3 | c7cf7e5b615fb0f5739dfbae94c37df6 | 游客按钮点击回调 | namespace gm
public partial class Gm : AGmPage
protected void vipButton_Click(object sender, EventArgs e)
{
} | 0 |
8b92d051e4097d02be81d5045683729e | 645c577480b56df79a5972f7819df9fd | あるドメインに関する仮想エイリアスを全て削除する
<p>この関数は、 <i>実験的</i> なものです。この関数の動作・ 名前・その他ドキュメントに書かれている事項は、予告なく、将来的な PHP のリリースにおいて変更される可能性があります。 この関数は自己責任で使用してください。</p><p>この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。</p> | function deleteDomainAlias($customerId, $mainDomainId, $aliasId, $aliasName, $aliasMount)
{
ignore_user_abort(true);
set_time_limit(0);
$db = Database::getInstance();
try {
$db->beginTransaction();
EventsManager::getInstance()->dispatch(Events::onBeforeDeleteDomainAlias, [
'd... | 1 |
be077c1e0230bfd84bb0c6a55cfada13 | 104f2d6a9fa7686497eabb908e246362 | palauttaa sen hetkisen equipatun aseen statit | public class Player extends Entity
public void calEquipStat() {
inven.equipHealth = 0;
inven.equipPower = 0;
inven.equipEvasion = 0;
for (int i = 0; i < inven.equip.size(); i++) {
inven.equipPower += inven.equip.get(i).attackPower;
inven.equipHealth += inven.equip.get(i).health;
inven.equipEvasion += i... | 0 |
31ee0146a4bf1ce16cab6c58f9c8cde5 | c9b96700b65de5b0b6800cc73cf6db03 | метод который описывает алгоритм движения Пешки по игровой доске | void ch::checker()
{
if (SY - FY == 1 * col) {
if (!canhit())
{
move();
}
else MessageBox::Show("Ход невозможен, вы можете бить!", "Ошибка!");
}
else if (abs(SY - FY) == 2) {
if ((desk[SY - ((SY - FY) / 2)][SX - ((SX - FX) / 2)]) == CHECKER + (2 - Plnow)
|| (desk[SY - ((SY - FY) / 2)][SX - ((SX - F... | 1 |
7d53734c14959b9e7472c59b87299b0d | 7dbee9c5b01d4b74c6680df2ffb9a9d9 | 清空右边接受方 | void MainWindow::on_clearReceivePushBtn_released()
{
ui->browDataUdpServer->clear();
} | 1 |
bfbf02042ee2bf72921f3bacd4999a72 | 8512308dcdf2192e9b25baa34335b583 | Returns the event's time as a formatted MBT string (Measure:Beat:Ticks)
as found in MIDI sequencers. | String MBTTime::toString() const
{
String text (measure);
if (measure < 10)
text = "00" + text;
else if (measure < 100 && measure > 10)
text = "0" + text;
text += ":";
if (beat < 10)
text += "0" + String (beat);
else
text += String (beat);
text += ":";
if ... | 1 |
0b5e1e0f2592eafb72ec964b5fe36576 | e99aae3ef0ef46ef064706a3a38f991a | Return a newly allocated counter-mode AES128 cipher implementation,
using the 128-bit key <b>key</b> and the 128-bit IV <b>iv</b>. | p_HAL_Aes128_t HAL_Aes128_Init(_IN_ const uint8_t *key,
_IN_ const uint8_t *iv, _IN_ AES_DIR_t dir)
{
ali_crypto_result result;
void * aes_ctx;
size_t aes_ctx_size, alloc_siz;
uint8_t * p;
bool is_e... | 0 |
d9807257e95575406aaba7593cb4852c | 1c6f75171b007d6c82eef0eb382a62d5 | Provide backwards compatability with OIDs
pickled with pymongo-1.9 or older. | class CollationDict(DbObjectDict):
def _from_catalog(self):
if self.dbconn.version < 90100:
return
for coll in self.fetch():
self.by_oid[coll.oid] = self[coll.key()] = coll | 0 |
c32eb67de4ed906a0382a549d3f0ed29 | 0e9c0dd3f978cb9cfe5c5112aa68a900 | Render a gradient rectangle. | matrices.push();
drawGradientQuad(matrices, provider, layer, startX, startY, endX, endY, 0, 0, 1, 1, light, colorStart, colorEnd, false);
matrices.pop();
} | 1 |
ef66e2e944030004ef3ff4e4afa4a80a | a48ef51a97d62d1f3793e3d1ccbf05f9 | 将日志写入数据库 | class Question_audit extends A_Controller
public function write_log($log)
{
$log['time'] = time();
$log['admin_id'] = $this->session->userdata('admin_id');
$log['admin_name'] = $this->session->userdata('realname');
$keys = array_keys($log);
$values = array_values($log);
... | 1 |
d1efdc47cae8cc5476487216499b0dc5 | 5baa283838a5aa6ef2147ec41b7f71bc | Shows ImPlot style selector dropdown menu. | self.emLigStyle_wg = Dropdown(description='', options=DRAWING_LIGAND_3D, value=self.emLigStyle)
self.emColorScheme = Dropdown(description='', options=LIGAND_COLOR_SCHEME_3D, value='whiteCarbon')
self.wgBox.append(Box([Label(value='emLigStyle'),self.emLigStyle_wg], layout=self.itemLayout))
... | 0 |
47a2e549b775d1e9446f07e9edbd0156 | d900c1fa816fc730fad754443fb81b83 | Specialised observation type that has a measurement (value + uom)
as result type | high: Union[None, int, float, np.ndarray]=np.inf, measurements_names: List[str]=None):
if measurements_names is None:
measurements_names = []
if len(measurements_names) > shape:
raise ValueError("measurement_names size {} is larger than shape {}.".format(
... | 0 |
4b92428c38357d4a43df8e82bb26fc2a | 93793bd72ab99d96382313c37d2fc91a | Vrati herni plan se symbolem hrace umistenym na dane pozici | public class HerniPlan
public boolean getProhral() {
return prohral;
} | 0 |
0b737b56b8a3b836226e2b7f145e70ab | 85104e18365f183833a67264f36fc2ba | Get the track index number with respect to the specified track type. | int32_t APP_DISPLAY_XlatTrackIdx(uint32_t trackidx)
{
return (trackidx + XlatOffset);
} | 0 |
88d0c6d9d15f9312cc50a5700d375717 | a30b8490584fc02e3d47832767b45fe8 | 插入新注册的数据节点到链表最后 | List listTailInsert(List *head, List *rear, char name[], unsigned char type, char pwd[], unsigned int height)
{
node *n = (node*)malloc(sizeof(node));
if(isOverFlow(n))
{
printf("Overflow.\n");
return *head;
}
n->next = NULL;
strcpy(n->name, name);
strcpy(n->pwd, pwd);
n->type = type;
n->height = height;
... | 1 |
29021bc14674aae1c355320320580ead | 3708ed950d5744c0cc21f50d00ad9755 | metodo que actualiza el estado de la particula | void Particule::Update(QOpenGLShaderProgram *program)
{
int nbAlea;
int probaSuicide = generAlea(10);
Life -=0.01;
if(vertPart[3].Position.y()>0.95)
{
nbAlea = generAleaControl();
if(vertPart[3].Position.y()<1.15)
{
if(probaSuicide>=0&&probaSuicide<6)
... | 1 |
47ce9abfabf256fecbdcddce15ba333f | 000924724519a86ff92c25807b8f10e3 | Reset all state of given component to its initial value, by type. | {
CComposableEntity::Reset();
*currentState = *initialState;
embodiedEntity->Reset();
if(controllableEntity)
controllableEntity->Reset();
for(auto& pair : links)
pair.second->Reset();
for(auto& pair : links)
dynamic_cast<CEntity*>(pair.second)->Reset();
UpdateComponents();
if(rootLink)
{
rootLink->Rese... | 1 |
530a56db1d05946119d85928998757b1 | 65c56ffefc1b6a5e96540153a59f264d | Perform an azimuth correction on a trace object. | class Network:
def trace_azimuth_array(self) -> np.ndarray:
return self.trace_data.azimuth_array | 0 |
55ca8d48a5c941a6c39ff319b4ed316b | de607f2a10669e37a93ac5eda45139bb | cette methode retourne une forme en 2D apres une reduction dimensionnnelle | txt=open('F:\ES203\BddApprentFinal',"rb")
mon_depickler = pickle.Unpickler(txt)
BddApp = mon_depickler.load()
txt.close()
j=0
while j < len(BddApp.Objets):
dim = zoneUtile(BddApp.Objets[j].pixels)
BddApp.Objets[j].pixels = BddApp.Objets[j].pixels[dim[0] : dim[1... | 0 |
f5185c5998aa239cba47da3408c02dfb | 4498704d5a3584d384bbbd516c1eb786 | | ----------------
|
| Description:
| ------------
| This is the CVP server's request handler.
| It checks the connection parameter and determines
| the server's handling scheme accordingly.
|
| Parameters:
| -----------
| session - Pointer to an OpsecSession object.
| info - A pointer to an OpsecInfo data... | struct rmcp_plus_ipmi_info *ipmi_info)
{
switch (sess->state) {
case IPMI20_SESS_STATE_OPEN_SESSION_SENT:
if ((ipmi_info->payload_type & IPMI20_PAYLOAD_TYPE_MASK) ==
IPMI20_SESS_PAYLOAD_OPEN_SESS_RSP)
handle_open_session_resp(sess, ipmi_info);
break;
case IPMI20_SESS_STATE_RAKP_1_SENT:
if ((ip... | 0 |
8a1c702590db2417bef3b49d8eac69ba | d96fe6426ceff4db321538309eb72bf3 | 初始化国籍遮罩层点击事件 | initNational() {
this.utils.logDebug('videoList => initNational');
this.topBarSource.leftSrc = this.utils.getIcon('close');
this.topBarSource.rightSrc = this.utils.getIcon('select');
this.bottomBarSource[0].name = this.$t('strings.move');
this.bottomBarSource[0].src = this.utils.... | 0 |
9d604fc1b9130425600740f6fa6a83b7 | c7cdda82bb884ad36101bd7ae2c6b2cb | If a point is in any bounding box, it is a foreground point. | self, point_range: Union[Tensor, np.ndarray,
Sequence[float]]) -> Tensor:
in_range_flags = ((self.bev[:, 0] > point_range[0])
& (self.bev[:, 1] > point_range[1])
& (self.bev[:, 0] < point_range[2])
... | 0 |
4fe88c60618b51bf5b9d291b83709751 | 34d03448548904fb9407ac8515eaa4a8 | Activa o desactiva els botons de selecció de rei.
<p>
Desactiva el botó de cada rei si ja existeix al tauler, per tal d'evitar duplicitats.
</p> | public abstract class AbstractBoard extends AppCompatActivity
protected abstract void setButtons(boolean[][] btnStates); | 1 |
f4512772fc7e057f27aa0b7764259866 | 65a6ebb81d3057a160ea8c4669d9753e | 设置当前可领取奖励的副本id列表 | if id then
table.insert( self.rewardIdList, id )
self:Fire(ConsumConst.ChangeCtrl, id)
end
end | 1 |
2657fe9248db6cad8e6e38b039d8043a | b1e12c09e7bcf08c5dfff02ab89c99b6 | Checks whether or not the current text in the IPv4_textBox is legal. | public class EditorWindow extends JFrame implements ActionListener
private boolean checkIP(String str) {
Pattern pattern = Pattern
.compile("^((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]"
+ "|[*])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]|[*])$");
return pattern.m... | 1 |
7cd959838d73b4aac547536d94ee0ba1 | 96519df8e8819de50389b544a8f8bc16 | 执行每一行用例 | class RunCase:
def run(self,name):
table,nrows = self.database.openFile(name)
token = self.login
for i in range(1,int(nrows)):
Method,data,Api,Key,CaseID,Params,CaseName,CheckPoint,ActualRes,ExpectedRes,Host = self.database.getCase(name,i)
try:
if Method =... | 1 |
0a0b40f7ea9bafe5ad47f6eac30bf428 | 0ac9239fd9eea8fffbcf61bcb6a66d1e | Fonction du cours (équivalente à Montée) pour récupérer le max de façon parallele | {
int *buffer = (int*)lpParameter;
Max = *(buffer + 0);
for(int i = 0;i<N;i++)
{
WaitForSingleObject(handleSemaphore,INFINITE);
if (*(buffer + i) > Max)
{
Max = *(buffer + i);
}
ReleaseSemaphore(handleSemaphore,1,NULL);
}
return 0;
} | 1 |
b92a7c200d4d969674f05d9c70e3735a | cad131b1176555178024350b97245bfe | Loads files from a folder path specified in the command argument
and display the loaded data in various sorted orders. | Path currentDir = Paths.get(Environment.currentDirectory);
int filePosition = ZERO;
String[] toSort = null;
boolean numFlag = false;
if (args == null || args.length == ZERO) {
toSort = SortApplication.readFromStdinAndWriteToStringArray(stdin);
} else if (args.length == ONE) {
filePosition = ZERO;
i... | 1 |
ccca6af6302f240c5ed8c13e945ee3c5 | aed8477d96aea2f50ebee880561b46d2 | Restaura una lista de unidades oraganizacionales eliminados en base al arreglo de identificadores recibidos | var unidadesFinales: { [id: string]: Unidad } = {};
for (var idUnidad in this.UnidadesPorId) {
if (this.HechosPorIdUnidad[idUnidad] && this.HechosPorIdUnidad[idUnidad].length && this.HechosPorIdUnidad[idUnidad].length > 0) {
unidadesFinales[idUnidad] = this.Un... | 0 |
3f919d512e3aee7b756b152d589fcda1 | febc576eb581a4b53b3f316e28a8a001 | Hardware interrupt for limit switch | {
uint8_t mask = 0b00000111;
left_SW_history = ((left_SW_history<<1) & mask) | BIT_VALUE(PINF, 6);
if (left_SW_history == mask) {
while(BIT_IS_SET(PINF, 6))
Game_Over();
}
} | 0 |
0f85fd28854bc448fe561a1daa1fc04a | b2acf20b6bae4e2eeb5c07b91bb09f4b | Takes a spark dataframe input and explodes the array columns to multiple rows, returns a dataframe | class StructMethods(ColumnMethods):
def explode(self):
return cudf.DataFrame._from_data(
cudf.core.column_accessor.ColumnAccessor(
{
name: col.copy(deep=True)
for name, col in zip(
self._column.dtype.fields, self._column... | 0 |
185ea4930b9882eae6755a792c1bf289 | b49b1107ececcc56794da7a022db863d | fonction pour lister en Front les oeuvres publiées | {
$this->works = $this->work->getWork($this->_id, 0, 99);
include template("art", "listWorks");
} | 1 |
f21872667cfd9d5e4c60b45829b2da32 | ca2f4e08862425d735e4469c331362ee | Takes in a username and gets their corresponsing ID from the database.
Returns the users ID if successful and -1 if not. | public class SQL_Accounts
public int getUserId(String username) {
String url = "jdbc:mysql://" + ip + ":" + Integer.toString(port) + "/PSFS5431?autoReconnect=true&useSSL=false";
if (DEBUG_MODE) {
System.out.println("Connecting to database...");
}
try (Connection connection = ... | 1 |
d29021f9ccd7feff5d2ecbe0a42c905e | 91d4f6fc109e46df360cd1214c2329a9 | Saves the force power. | public class ItemMiniGameCombatCharacterInfoCpt : ItemGameBaseCpt
public void SetForce(int force)
{
if (tvForce != null)
tvForce.text = "" + force;
} | 0 |
b206b9dd8d417f22294fd91c03c22624 | 66c2d2f9939cf55ed7f7a2b71adc5d60 | Lists all Contents.
http://sf4.local/api/contents | {
$contents = Content::all();
return $this->sendResponse($contents->toArray(), 'Contents retrieved successfully.');
} | 1 |
1d2825060bbc51e6248197c580029b3e | ae901fc03494ce1334f2b30a35820edf | minimum of three integers | func min(a, b, c int) int {
return minimum(minimum(a, b), c)
} | 1 |
59fbb7b490f52c8a0fa389039eafb6e1 | b5c03abc0e0e1962e1ef4c83c61a4ed1 | Update ULs using global variable arrays | void CSendAsMtmManager::RefreshMtmUidArrayL()
{
iMtmUidArray.Reset();
PopulateL();
} | 0 |
8121801e66db0b6f021b057f028a4dff | d25146aceed5f3e358348f9f96011a5c | Sets rules for organisation name. | public function &setOrganisationName($value); | 0 |
0044c1d013eead5d9362bd8a17b404c7 | d93f0467c7349c642ce42775b434b877 | function decorator for game actions, ensures cleanup | class GameState:
def take_action(action_function):
def turn_wrapper(self):
self._start_of_turn()
action_function(self)
self._previous_action = action_function.__name__
self._end_of_turn()
return turn_wrapper | 1 |
80acf72a2e8732904cd73d5ab841c803 | a638d1590cc330f87305e164de128b7f | Enables / disables bookmark CBs. | {
tvKsRepositories.Enabled = enable;
tsbModBrowserKsRefresh.Enabled = enable;
tsbModBrowserKsBrowseNew.Enabled = enable;
tsbModBrowserKsBrowseFeatured.Enabled = enable;
tsbModBrowserKsBrowseTop.Enabled = enable;
tsbModBrowserKsFirstPage.Ena... | 0 |
cca9b23803cfb3a57710a833c3ecb792 | ffac64d495dc97c63b48d48a93a51e8d | Parsing the json data obtained from the resource file. | public class ProdHeader extends WCMUse
private List<ProdHeaderResourceLinksBean> getResourceLinksData(
String[] prodHeaderResourceLinks) throws JSONException {
List<ProdHeaderResourceLinksBean> resourceItems = new ArrayList<ProdHeaderResourceLinksBean>();
if (null != prodHeaderResourceLinks && prodHeaderResource... | 1 |
a360e80ce03e9a311e6f26cb2666a9e1 | 2f82b6abf9d2e9f321cb539df7e63cef | 指定された年月に日記を書いている日のリストを返す
書いていれば 日記の数
書いていなければ 0
を入れる | $sql = "select count(*) as count, max(r_datetime) as r_date,max(c_diary_id) as did from ". MYNETS_PREFIX_NAME ."c_diary " ;
$sql .= " where c_member_id = ? ";
$params = array(intval($c_member_id));
$list = db_get_row($sql,$params);
return $list;
} | 0 |
32c9e5401519af95fe40d7d68a590155 | 703d3203087ea511e9597a2981443682 | Loads the Win Screen | if (winScreen.activeInHierarchy) {
winScreen.SetActive(false);
}
winText = winScreen.transform.GetChild(0).GetComponent<Text>();
eventSystem = GameObject.Find("EventSystem").GetComponent<EventSystem>();
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.