query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
1f7f7cc78e48d50e6a232c10c0060eff | 13da1ff6e02dd4c840608d6c9b8d02ec | @brief Pop the current bling mode off the stack | bling_t *ff_bling_current_mode_get() {
return &m_bling_modes[m_curr_bling_index];
} | 0 |
b91f253a80ba00fe9a791eaa2cf1b46d | 71527caae8685ed2fafd8bd310bb2a4c | memindahkan titik apabila shape di gambar dengan arah yang kebalikan sehingga tetap bisa di undo | void undo() {
if (_shapeArrayList.size() > 1){
_shapeArrayList.remove(0);
_shapeArrayList.add(_initShapeIndex, _shape);
}
_drawingPanel.repaint();
} | 0 |
5a4e3a70e19f476a5418a59fa6fdd5d1 | 7530d8d35a19049a832c390d9c6c74f4 | Returns a list of users that are currently logged-in. | def get_logged_users() -> list:
sessions = Session.objects.filter(expire_date__gte=timezone.now())
uid_list = []
for session in sessions:
data = session.get_decoded()
if '_auth_user_id' in data:
uid_list.append(data['_auth_user_id'])
return User.objects.filter(pk__in=uid_list... | 1 |
c88fbc02f6ff95a8a97dcbb1b48c2dce | 1da6e2b9a5b6ca88db064f7bb77e07bf | \brief Pwm_Isr_Channel_8_Cat1
Channel specific CAT1 interrupt handler which calls internal interrupt handler
The interrupt handler is associated to base timer 8 interrupt. | void TIM8_CC_IRQHandler(void)
{
if(timer_handles[7] != NULL) {
HAL_TIM_IRQHandler(timer_handles[7]);
}
} | 1 |
056b638bfd28a5f985e01d828e883775 | e69726c7b7e16d0276e1ba413252ca3e | Generates the SQL statement to add a column to the specified table | namespace FluentMigrator
string Generate(CreateTableExpression expression); | 0 |
4f1ce0507d0f17e8ddc669115dcef022 | b10035fe09757726e453296ccf4a1f78 | Ensures that copying from a root element works as expected. | namespace mesos namespace internal namespace tests
TEST_F(CopyBackendTest, ROOT_CopyBackend)
{
string layer1 = path::join(sandbox.get(), "source1");
ASSERT_SOME(os::mkdir(layer1));
ASSERT_SOME(os::mkdir(path::join(layer1, "dir1")));
ASSERT_SOME(os::write(path::join(layer1, "dir1", "1"), "1"));
ASSERT_SOME(os:... | 1 |
1b9b976b7340592aad9a2964b6c64f5e | bf99b216be700e631fdd3b03ca3defc3 | Get the maximum possible value associated with the specified property | namespace FRC.CameraServer
public class VideoProperty
public int GetMax()
{
return CsCore.GetPropertyMax(m_handle);
} | 1 |
8454151db6f06858c16f64799ecfd54b | 921d2e2bf5ee8f2aa6d90232f8cbde94 | Delete an existing full page load monitor | required = ['monitorId']
optional = []
req_args = validate_kwargs(required, optional, **kwargs)
monitor_id = req_args['monitorId']
if isinstance(monitor_id, list):
req_args['monitorId'] = ','.join(monitor_id)
return post(action='deleteFullPageLoadMonitor', **req_args) | 1 |
58f9981be1eeeb903947ae0ceba714cd | 929cf3058141120b55e264070c0a399a | Returns the Lift produced at Lift-off conditions | {
return (float)(-2.011 + Math.Sqrt(2.011 * 2.011 - 4 * 0.04953 * (-12.82 - lift)) / (2 * 0.04953));
} | 0 |
1cb4438e394c83d8552b36f34e8ef35b | 1d305c2e9d4fa81d771df3aac344c7c1 | Gets an item from the HTTP context. | namespace Nalarium.Web
public static class HttpData
public static T GetItem<T>(String name)
{
HttpContext context = Http.Context;
if (context.Items[name] is T)
{
return (T)context.Items[name];
}
return default(T);
} | 1 |
08551ab1f6f37fd7891be603d58b02b3 | 6eef9cd41ee04e72ec6be13b99fc9899 | Provides GLFW initialization, and then hands everything over to the 'Manager' class. | void cppCore::Init()
{
glfwInit();
m_pMainWindow = glfwCreateWindow(m_iWinWidth, m_iWinHeight, "Doom Fire", NULL, NULL);
glfwSetFramebufferSizeCallback(m_pMainWindow, ResizeCallback);
glfwMakeContextCurrent(m_pMainWindow);
InitFire();
CalcPalette();
while(!glfwWindowShouldClose(m_pMainWindow))
{
glfwPollEvent... | 0 |
fac8f7d2fc5bcf435c44286d40573cd4 | a200d8b6fe3c7b1718c280a68f27d51d | 0808 수정
우리 유닛의 시야 내에 적이 있는가 체크하는 메소드 | public class Agent : MonoBehaviour
public bool EnemyInSight(List<Agent> TargetAgent)
{
targetInSight.Clear();
bool[] TargetFlag = new bool[TargetAgent.Count];
for (int i = 0; i < TargetAgent.Count; i++)
{
TargetFlag[i] = false;
for (int x = -1; x <= 1; x++)
... | 1 |
b8217d96c769b0e294a2e94cae46cd02 | 13425e960587df90d358a911eee671ea | GET: Meldings | namespace MyStik.TimeTable.Web.Controllers
public class MessagingController : BaseController
public ActionResult Index()
{
var org = GetMyOrganisation();
var model = new MessagingOverviewModel();
model.Organiser = org;
model.Newsletter = Db.Activities.OfType<N... | 1 |
7288724df2485c08f473c16295023a4c | 07828426c9963af0a4a500d84b6ec661 | Set the output level of logs. | class VLog:
def setLevel(level):
VLog.level = level | 1 |
0961be868fae851dff97bc6a4a8a6fd0 | e44aa04b93135d527219385889181345 | Summary:
点击QQ登录
Returns: | class Login_page(BasePage):
#账号密码登录
def click_QQ_login(self):
self.click("xpath->//div[@class='login_qq']") | 1 |
22025ad959ebd190f260bdbf70342b32 | 4db0e1a019f4c70db04e255fb246c06b | Calculated the longest time that some car waited till it was fueled-up at one of the dispensers. | class Lane:
def max_waiting_time(self):
return max([float(0)] + [traci.vehicle.getAccumulatedWaitingTime(car_id) for car_id in traci.lane.getLastStepVehicleIDs(self.lid)]) | 0 |
d516e354868a886291b0e5f177f19892 | 9f7a89caf77cdb023b1f0a2453fb7adc | Assert that a specific checkbox is not selected. | public abstract class AbstractHtmlUnitScriptAction extends AbstractHtmlPageAction
protected void assertNotChecked(final String elementLocator)
{
getAdapter().assertNotChecked(elementLocator);
} | 1 |
7a99266a435f39543aa91a306d4940c8 | d2b9885c66d50eb9d579df9cb6c19934 | Initialize a low-level communications channel.
re-armed via hammer2_iocom_restate(). | CHSCommRelay::CHSCommRelay(void)
{
} | 0 |
c29a46d8689b37673f4398f8895b4edb | 7e49db734d242a058ae9612a66a1d384 | Click on "project details expand collapse" button in project window. | class Application(UiDriver):
def clickExpand(self):
loc = Operation().readXml("application", "expand")
self.clickElement(loc) | 1 |
0eb8a77fa4791475e33c6c4f923580a6 | 6bf247bb587e7642c25227b7dbd93bf0 | Sets the String to be associated with MainField1 | public class MEmailConfig
public void setA1(String A1){
this.A1 = A1;
} | 1 |
7e06829254bf39efa4c4923f80e0cf6c | ae4f7144c1c54f26c0399620f4c39657 | Updates the polygon's position and rotation based on its translational and angular velocities. | namespace flxSharp.flxSharp
public class FlxObject : FlxBasic
protected void updateMotion()
{
float delta;
float velocityDelta;
velocityDelta = (FlxU.computeVelocity(AngularVelocity, AngularAcceleration, AngularDrag, MaxAngular) - AngularVelocity) / 2;
Angular... | 1 |
273ff46e572018b9c1213e9b66e31cfc | 9a717b8de8e21983ff7e24eefe253c45 | Converts the entire pattern into an RLE | def to_rle(bits):
rle = []
pos = 0
for bit, group in itertools.groupby(bits):
group_list = list(group)
if bit:
rle.extend([pos, sum(group_list)])
pos += len(group_list)
return rle | 1 |
be19860968cc2a1db7c4d96f411d87d4 | bbd522ffcac7d78ac35bb3a31c5e7340 | 设置hbase 开启kerberos 连接必要的固定参数 | public class HbaseDropTable
public static int init() {
System.out.println("-----enter init ----- ");
Configuration conf = HBaseConfiguration.create();
System.setProperty("java.security.krb5.conf", "krb5.conf");
conf.set("hbase.zookeeper.quorum",zkQuorum );
conf.set("hadoop.secu... | 1 |
69ec004dbc9fea3eb2eff4a8948a47b1 | 6961dbf5f5fd66f1eedaba50a878684c | Вывод данных статистического анализа по распределению координат вокселей по оси Z | class coords(object):
def zhist(self, binsize=50):
x=self.data[2,:]
nbins=int((max(x)-min(x))/binsize)
plt.hist(x,bins=nbins)
return plt | 1 |
e8823a4ed945f3e426b860981cf77262 | 9574f990116cb8fc7e4ca77a088861dd | Gets size to be used for array / list / IEnumerable. | public abstract class EsSearchBase<TSearch, TResult> : IEsSearch<TSearch, TResult>
where TSearch : EsSearchBase<TSearch, TResult>
where TResult : class
protected virtual int GetSize() => _size > 0 ? _size.SafeValue() : 10; | 1 |
d48e47de9eb74abd6983b1357343aeb4 | fc38b700f6f72f0a2c80fcd9990e6774 | (11 + 0i + 0j)^2 = 121 + 0i + 0j = 121 | static complex complexSquare (complex c) {
return complexMultiply (c, c);
} | 1 |
b56931760cb81a6928e37c304e6e170a | c94243ea1f2ce5369ceafe6f5c21dc1d | Test retrieving question categories used by the activity instance | class TriviaTestCase(unittest.TestCase):
def test_retrieve_categories(self):
res = self.client().get('/categories')
data = json.loads(res.data)
self.assertEqual(res.status_code, 200)
self.assertEqual(data['success'], True)
self.assertIsInstance(data['categories'], dict)
s... | 1 |
de8b7539bbf66c73e88caea4ea2b401b | abdf2277f111e8307d805e1ae0ef39cd | 查询导入修改的数据 | function queryImportRecord(body = { enterprise_id }) {
return request(
`${apiconfig.baseUrl}/console/enterprise/${body.enterprise_id}/app-models/import`,
{
method: 'post'
}
);
} | 0 |
9b027c61e642905b8433cfaa0176fa16 | 84c85e0631a03853c33c8514ae5d4ef6 | The amount of vertices. | class VertexArray:
def num_vertices(self) -> int:
return self._num_vertices | 1 |
be2c20207f4a7cf5eaebb1c2d14d6dd3 | 25ec694da1c829dff648ec15490441ae | 刷新符号工具栏 | namespace longtermcare.NursingPlan.Shift_Exchange
public partial class SHIFT_EXCHANGE_RECORD_View1 : System.Web.UI.Page
protected void btnSymbolsTools_Click(object sender, EventArgs e)
{
if (PanelSymbolsTools.Visible == false)
{
PanelSymbolsTools.Visible = true;
... | 0 |
75ab5281fa48457446580d49eb44434a | 916dc8a228598c355523bf4a956a1daa | Get all Graph Cancellation events | $predicate = new Predicate();
$sql = $this->getSql();
$select = $sql->select();
$select->from(array('e' => $this->entityTable))
->columns(array('*'))
->where($predicate->greaterThanOrEqualTo('effectiveFrom',date('Y-m-d')))
->where(array('isCanceled' => 0))
->where(array('isApp... | 0 |
abddc617bff6345f07b9652e48b6463c | 98101807978fe2305eb8d6b97e8ee0b7 | http://codeforces.com/problemset/problem/691/A | int main(int argc, const char * argv[]) {
int n, scoreA = 0, scoreB = 0;
cin >> n;
for (int i = 0; i < n; ++i) {
int x, y;
cin >> x >> y;
if (x > y) {
++scoreA;
}
else if (x < y) {
++scoreB;
}
}
if (scoreA < scoreB) {
co... | 1 |
6b323907b03fee04facfc0a37fbb2f63 | 5451af5c0869cbd07c4c6eb644a6f424 | generate new motor program towards current target belief | if (mIsBalanced && mCurrTargetPose != 0) {
learnRobotParameters();
cout << "\rBeta: " << mGuessRobotParameters.block(0, 0, 1, 12);
}
} | 0 |
ecc57e37c8e9a0f8bc88fe8530d1f78b | dd7e3be22530e254e764f6a8e5f90898 | 学生修改自己发送的简历 | $req = I('');
$user = $this-> _user;
if ($user['meb_type'] != 1){
return;
}
$db = D('student_resume');
$data = $db-> where(array(
'uid'=> $user['id'],
'id'=> $req['id']
))-> _delete();
} | 0 |
924954d16cd1d268ee227ab1df418a81 | 1e22742037a25b8ce686313784ff1aa4 | Returns the vertex AGAL code for the material. | public _iGetVertexCode(shaderObject:ShaderObjectBase, regCache:ShaderRegisterCache, sharedReg:ShaderRegisterData):string
{
return "m44 vt0, va0, vc8 \n" +
"m44 vt1, va1, vc8 \n" +
"sub vt2, vt1, vt0 \n" +
"slt vt5.x, vt0.z, vc7.z \n" +
"sub vt5.y, vc5.x, vt5.x \n" +
"add vt4.x, vt0.z, ... | 1 |
085457522265e15e4eafd2aa434d5438 | 88a086100bbf17045fe9b4c96d9a8914 | Assistance themes are specific per root organisation | {
$rootline = BackendUtility::BEgetRootLine($pageUid);
foreach ($rootline as $page) {
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('sys_template');
$queryBuilder->select('*')
->from('sys_template... | 1 |
28dcff2888e312458c08377504432a63 | ae19649f6f650fd8a219ae2cd46d431f | Calls forth the "New Simulation" window. | Parent root = FXMLLoader.load(getClass().getResource("/fxml/simulator4.fxml"));
stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("/css/application.css").toExternalForm());
stage.setScene(scene);
stage.show();
Sett... | 1 |
81cb2f3f0d709027510a6941762f59c7 | 9cc5dfa4055436d9a051d25ad21ae9ee | Returns the minimum similarity fuzzy search setting, value should be between 0 and 1. | public class Project
public DoubleProperty getMinSimilarity() {
return minSimilarity;
} | 1 |
d172577c7fd232ae2b30dcea4c3ad4c3 | 84d141af3a21f2b3258abd17eddebe3b | Retrieve the overridden port of the nx executor for integrated setups | func getExecutorHttpPort() (engine_http_port int, err error) {
engine_http_port = DEFAULT_EXECUTOR_CONTAINER_PORT
var env_engine_http_port = utils.GetEnv(ENV_DEFAULT_EXECUTOR_SERVER_PORT, "")
if env_engine_http_port != "" {
engine_http_port, err = strconv.Atoi(env_engine_http_port)
if err != nil {
return 0, e... | 1 |
eb920b6ad8072c971a24c4c965017902 | fd01a111da17267f93b1e8a6083e6882 | Добавляет новые товары на сайты получатели | class Handlers extends HandlerAbstract
public static function getPages($urls)
{
$api = new Dirapi();
$api->setFilter('public', 1);
$page = 1;
if (ModuleManager::staticModuleExists('partnership') && ModuleManager::staticModuleEnabled('partnership')) {
$partner = Partnershi... | 0 |
c78fc3a7b3098b6f6da1df03990bba13 | 74ef62a7a96d9179f8ac77a01253b7d5 | Get the releases from the project.
Usually nothing, unless you use Poi in combination with
PloneSoftwareCenter. | try:
results = self.repo.releases()
return results, None
except (GitHubError, GitHubException) as err:
return None, str(err) | 1 |
f89fe7fbcbbd35866c1fe60c4637c191 | 1fe8e858a470c1df30ca2d08927657ad | POST /salespeople | class SalesmanController
async edit ({ params, request, response, view }) {
} | 0 |
871ab9a74c6773157f47e9fe06ce9aee | 32b75cf26507fe39ee4e10894e5e08c8 | r"""Maximum receive window that application advertizes to peer in linked connection. | try :
self._maxtimewaitconn = maxtimewaitconn
except Exception as e:
raise e | 0 |
ef79f12dc83133c9e89961429b294cb1 | a61d5333a25fb1bbf9ab177791bb05a1 | 查询是否包含某cpuID | class Chip(object):
def is_processor_with_id(self, processor_id):
return processor_id in self._p | 1 |
7e304260a2c3957c0bc9f0767abe2006 | fe8149b77548da2c500f5af5238b51b7 | Método para obtener las Máquinas virtuales de la base de datos | {
List<ViewModel.Machine> machineModels = new List<ViewModel.Machine>();
var allMachines = (from machines in DevOpsContext.Machines
select machines).ToList();
foreach (var machine in allMachines)
{
machineModels.Add(n... | 1 |
e5b8c7a2a04fcb8374faf5dc809db6d0 | cc7ed0e2bc0335c82c71e4801714b6fe | Get visits of today | int getVisitorToday(); | 1 |
08d4008bb3f4a75d7a1e7117de1b1dc9 | fb57b43411ba48b7e2bec068b43ed4e0 | Get the path with the given base path removed.
This method is useful in host/location agnostic routing, where
you might want to eliminate the base directory from the path
before matching it against a pattern, therefore making the
routing safe and consistent even though the location of the
application may be changed.
Th... | $urlParts = self::splitPath($urlPath);
$baseParts = self::splitPath($basePath);
$resolved = array_slice($baseParts, 0, -1);
foreach ($urlParts as $part) {
if ($part === '..') {
array_pop($resolved);
} else {
$resolved[] = $part;
}
}
return '/' . implode('/', $resolved);
} | 1 |
fe47f9117d4987d78fbb5276d6b55929 | 4ffb3b66165a6864c7d485f04e3708a9 | 通过集群ID获取java实例 | java_class = cls._java_loader_class(clazz)
java_obj = _jvm()
for name in java_class.split("."):
java_obj = getattr(java_obj, name)
return java_obj | 0 |
73e10e3c1dd9315e48d949c102267a04 | 6486500810f8794392bd253b56a22ba1 | 讀取心理測驗的函數,會隨機回傳一個問題及對應的四個選項 | def get_q_and_a():
begin = random.randint(1, 100)
step = random.randint(1, 10)
seq = make_seq(begin, step, SEQ_SIZE)
answer = random.choice(seq)
seq = hide_element(seq, answer)
question = ' '
question = question.join(seq)
return question, answer | 0 |
2e565362687d5d74b256559bd3023e90 | 976520ee86cc71732c9e41da5e568ddb | 更新退卡表结账状态 | @Component("updateDataTick")
public class UpdateDataTick
boolean updateNoCardBookingsState() {
try {
this.tbookingrecordMapper.updateWithDev();
return true;
} catch (Exception e) {
e.printStackTrace();
logger.info(e);
return false;
}
} | 0 |
d19e2c6137b5be0bf21d0f251d394b52 | 5e344c3a2e93e0d566d8fa0321e825c4 | Rounds down the specified <see cref="DateTime"/> to the current hour. | namespace Pylypeiev.Extensions
[DebuggerStepThrough]
public static class DateTimeCalculationsExtensions
[DebuggerStepThrough] public static DateTime TrimToHour(this DateTime time) => new DateTime(time.Year, time.Month, time.Day, time.Hour, 0, 0, time.Kind); | 1 |
934e8e0640f34b5711280e7207b142d2 | 2985ea7c954b5f8e667dfce2b595b46d | Internal method.
Once self.root is set to a note, and self.typ is a chord type, like 'major', return the notes in the chord. | if sym == '-':
return []
note_or_chord = self.do(sym)
if note_or_chord is None:
return []
elif type(note_or_chord) == Chord:
return note_or_chord.notes
else:
return [ note_or_chord ] | 1 |
9bc73793241ecabb45a7c10ec8424130 | 2c2df92aa46b71ace0d21be6a08fa812 | 彙整與轉置多個使用者的用電資料 (96 期) | {
DataTable destination = new DataTable();
DateTime startTime = new DateTime(year, month, 1);
DateTime endTime = new DateTime(year, month, startTime.AddMonths(1).AddDays(-1).Day);
for (DateTime dayLooper = startTime; dayLooper <= endTime; dayLooper = dayLooper.Add... | 1 |
1b245ad0fe356e557537b7eff47778ea | f04d76d83cdb2b5053ac1fe4f5df2a58 | 获取该期和是否选中的数量 | return this.produces.reduce((num,next)=>{
return num = (next.isSelected? num+1 : num)
},0)
} | 1 |
565e4e44892e4feb7b95fa89da016dfa | 1ddcfb57490654a1170247f97e68c445 | compares the string values of two candidates | KeySizeCandidate **cand_a, **cand_b;
cand_a = (KeySizeCandidate**) a;
cand_b = (KeySizeCandidate**) b;
double x = (*cand_a)->score;
double y = (*cand_b)->score;
if (x < y)
return -1;
else if (x > y)
return 1;
return 0;
} | 0 |
f8d65efb20e83c4a7ae2c30268679655 | e9a520848cf9f49aaecec8e8ff09ab4a | Show the form for creating a new Observacion. | {
$form = $this->createForm(new ObservacionDeComportamientoType(), $entity, array(
'action' => $this->generateUrl('observacion_update', array('id' => $entity->getId())),
'method' => 'PUT',
));
$form->add('submit', 'submit', array('label' => 'Guardar'));
return... | 0 |
012a4f19a4383bae050b6a2ddd65a0c2 | 771568022b67c3bc9b82c33fc6a84863 | 判断loginName是手机号或者账号,然后放入user中 | $users_model=M("Users");
$rules = array(
array('username', 'require', '手机号/用户名不能为空!', 1 ),
array('password','require','密码不能为空!',1),
);
if($users_model->validate($rules)->create()===false){
$this->error($users_model->getError());
}
$username=I('post.username');
if(p... | 1 |
edbb6f913e79e8be44a7950ac0fc924a | 80424a21c55170cdad8dae39e5dcb14b | https://stackoverflow.com/a/50890409 | function copyTextToClipboard(text) {
var textArea = document.createElement("textarea");
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
textArea.style.width = '2em';
textArea.style.height = '2em';
textArea.style.padding = 0;
... | 1 |
64f72517266962ebdde74bd8a7243dfb | 0e6a5922f29784a7fe1a2a085254a140 | The handler for a user selection of running a given Routine from a list of Routines | {
if(SubSecMenuItem_ID == SubSecMenu_Routine_Type)
{
GUI_DispString(cFuelADCInputType[CoderData[2]]);
}
else if(SubSecMenuItem_ID == SubSecMenu_Routine_SampleNum)
{
GUI_DispDec(CoderData[1],3);
}
} | 0 |
5b263236c38f5eeb3abcb30fc92a4e35 | 8f2b6ee9959027c8cb992b00c04bf6cc | vê se um pixel é preto | if(pixel[0] != 255):
return(True)
if(pixel[1] != 255):
return(True)
if(pixel[2] != 255):
return(True)
return(False) | 0 |
8b6fe9a0fde8a30389a6935592741c2d | bf0c547e0f29c79a7eeeb050939efce5 | 如果没有上传头像, 就加载默认头像 | if (mUser.avatar != null) {
String loadAvatar = "";
if (!mUser.avatar.startsWith("http://wx.qlogo.cn/")
&& !mUser.avatar.equals("")) {
loadAvatar = mUser.avatar + "?imageView2/1/w/200/h/200";
} else {
loadAvatar = mUser.avat... | 0 |
3a855d8e4ea075c8581a789cd139a74a | 7646c5558aef3ca00a9ab637fa6f00cc | Решение системы линейных уравнений из 2 штук с 2 неизвестными. | if len(A) == len(A[0]) == len(B):
l = len(A)
for i in range(l-1):
n = i + 1
while A[i][i] == 0:
A[i], A[n] = A[n], A[i]
B[i], B[n] = B[n], B[i]
if n > l:
raise ValueError('At least one of the coefficients of ... | 1 |
42700ac0e37f421184799c7e7e19f9cc | 06ab222a1166cae8634c8a8e28b99135 | Unregister an ISynchronizer.
Synchronizers are notified about some major events in a transaction's
life. See ISynchronizer for details. | class ITransactionManager(Interface):
def unregisterSynch(synch): | 1 |
d16e30a509bf5e541378e5b23133618c | 46ef0a8d440067d35813055bf32329bf | Ensures that the given behavior has been restored so that it can be edited with the
proper data populated. This also verifies that the object is displaying the most recent
prefab data. | def thor_restore(controller, init_action, object_poses, object_toggles, dirty_and_empty):
if len(object_toggles) > 0:
controller.step((dict(action='SetObjectToggles', objectToggles=object_toggles)))
if dirty_and_empty:
controller.step(dict(action='SetStateOfAllObjects',
... | 1 |
4f2c20d20b8766396d7077a66ff777d2 | f46a2b0ace213a490973215f1e34e507 | Turn off SSL verification on plugin updates. | class LSSM extends TimberSite
function disable_updates() {
global $wp_version;
return (object) array(
'last_checked' => time(),
'version_checked' => $wp_version,
);
} | 0 |
bbe78936860d0df549921ea1295ffd5e | 41d2699582ce5843ee091b95e386c7cf | Setter for <code>privdoc.DoctorAction.extra</code>. 额外的数据 | public function setExtra($value); | 1 |
1338a102ff7f16fa4ddcc6481234b51f | 9bbd5d297effeaff6676653241ba951b | Default Images and Icons if missing | function HTML.Unit.GetImages(sUnitID)
local sFaction = string.lower(GetFaction(sUnitID));
local tRet = {
Faction = {
Icon = "../Images/Factions/"..sFaction.."-icon.png",
Full = "../Images/Factions/"..sFaction.."-full.png",
},
Tech = "",
Type = "../Images/Util/amph_over.png",
Unit = {
Backer = "../Images/Util... | 1 |
199f17994f88f81fc1b6cc7c7b2c4687 | 2372e3284e2650022cb1629183735a6f | 创建索引至内存 | namespace Demo
class Program
private static void CreateIndex(string[] contents)
{
var writer = new IndexWriter(FSDirectory.Open(INDEX_DIR), analyzer, true,
IndexWriter.MaxFieldLength.UNLIMITED);
foreach (var content in contents)
{
var docum... | 0 |
780f6f0990d4cd185f66d1256b3ccc3d | 308a7fac39dfc430c3f9eb211286a64d | Returns the index of the edge, on which the pin with specified number is located | for (var i = 0; i < circuit.connections.length; i++) {
if(circuit.connections[i].from.idDispositive.indexOf(sensor) >= 0)
return circuit.connections[i].to.idPin;
else if(circuit.connections[i].to.idDispositive.indexOf(sensor) >= 0)
return circuit.connections[i].from.idPin;
};
} | 0 |
25ef653bf9bbf3e3a1cd34a3e22099c8 | dadeeeaa86dbfe7044487f47817e1935 | Gets the uric without slashes. | final class Options
boolean uric() {
return uric;
} | 0 |
ea9ee9c58c05a2342d361cc860d6bd75 | d2149f53dfbef3a66102a790a06beb31 | 获取成员标签树结构 | function TagsTree() {
return request({
url: `/api/WeChat/MPTag/Tree`,
method: 'get'
})
} | 1 |
ff099a2b49d6d90ce8cda317bc4d1099 | bd49dcaaafd7370f6f9cc48a3eb411d8 | 批量新增SysArticleEntity | namespace KaPai.Pay.Web.Areas.Admin.Controllers
public class ArticleEntitiesController : ArticleEntitiesControllerBase
public override async Task<AjaxResult> Create(ArticleEntitiesInputDto[] dtos)
{
Check.NotNull(dtos, nameof(dtos));
if (User.IsInRole("供应商"))
{
... | 1 |
ea76b094377c0de2418d0d19686de0f1 | e1c8435955c5c0df3aefac045e183903 | レポート内容の取得。 | public class Report extends BaseEntity
public java.lang.String getContent() {
return content;
} | 1 |
a88d0f99e6c5222c2c9ea184202b4da4 | 5e854bb91672177ae3edb9a14d74c18e | 生成个人印章 | public abstract class SealUtil
public static void buildAndStorePersonSeal(int imageSize, int lineSize, SealFont font, String addString,
String fullPath) throws Exception {
storeBytes(buildBytes(buildPersonSeal(imageSize, lineSize, font, addString)), fullPath);
} | 1 |
9099db425653da36299c89b137889234 | cec7872c970d349a099a5b95fe65f128 | Create an instance of {@link Phone } | @XmlRegistry
public class ObjectFactory
public AddDialPhone createAddDialPhone() {
return new AddDialPhone();
} | 0 |
e7a01e6a57664703ddebd8105f30bd1b | db4addb9510a70ebca0ef28c005b4c61 | Retrieval of all Intracity Rate types | List<RrrTypeTO> getRrrTypes() throws WebServiceClientException; | 0 |
cdcff7249763ff3f4746930678d82043 | c1cb84a2e896cb0362f323c00418f81c | 显示该文件该用户的所有批注 | public String userAnnotationList(@PathVariable("fileId") int fileId,
HttpServletRequest request){
String header = request.getHeader("X-Token");
User user = tokenUtil.getUser(header);
List<Annotation> annotation = annotationService.userAnnotationList(user,fileId);
if(annotation == null) {
return JSON.toJS... | 1 |
e0fccd2ef923a69b78b1c4cdcbf7b35c | ae100434d453a1e696134b48b8d9a05f | Get a property's value, returning any error code, or the actual
length of the property | n_uint property_type)
{
n_int index = mm_obj_prop_index(obj, property_type);
if (index > -1) return obj->property_value[index];
return 0;
} | 0 |
318a1393f46fff9fe70f8f414ddc4201 | e8249e90ae98e9f17b4714ba1b588af0 | 标准型单位转换 | public class UnitConversion{
public static double lengthConversion(double number,String curUnit,String tarUnit){
int curIndex = -1,tarIndex = -1;
for (int i = 0; i < lengths.length; i++) {
if(lengths[i].equals(curUnit)){
curIndex = i;
}else if(lengths[i].equals(tarUnit)){
tarIndex = i;
}
if(curI... | 1 |
0ebb7e578a42a7c85bc48befc4416a28 | 57fd6c86ae2625263e350dccdd65792b | Sheep is too close to edge | function collisionDogToSheep(dog, sheep){
if(dist(dog.x, dog.y, sheep.x, sheep.y) < 50){
moveAway(dog, sheep);
}
} | 0 |
2b04bc65c8bf236c90315df2ecf24b7a | 14a44279185e1196453242f7345e844e | Initialize the pipeline with the transformer. | public function init($transformers, $keys, array $params = []); | 1 |
75855fbb44d832610e9c7ad64f1e788f | a10dd53a08c4910dcc0752a93801dfc1 | Binds the corporate data grid. | namespace CSharpBible.CSV_Viewer.Visual
public partial class FrmCSVViewerMain : Form
private void BindToDataGrid()
{
dataGrid1 = new DataGrid();
dataGrid1.SetDataBinding(dataSet, "ParentTable");
dataGrid1.Parent = panel1;
dataGrid1.Dock = DockStyle.Fill;
... | 1 |
4d4fde362f5c9ff8c1127cf44c459d0e | 990f9dda6dd83955a03ba64f0ac94e58 | Find all child directories recursively, including [this] if it is a directory. | function recursiveDirectory(path) {
return readdir(path, { withFileTypes: true }).then((files) => {
const childDirs = files.reduce((names, dirent) => {
const isChildDir = dirent.isDirectory();
const isChildDirVisible = dirent.name.indexOf('.') === -1;
if (isChildDir && isChildDirVisible) {
... | 0 |
14bf111480035fe7420c0da80a884642 | e3b837057fb9c0ca0774694ccfc6434a | Code de hachage, si besoin (pas nécessaire). | namespace GestContact.Entities
public class Civilite : Entity, IComparable<Civilite>
public override int GetHashCode()
{
return !string.IsNullOrEmpty(LibelleCourt) ? LibelleCourt.GetHashCode() : 0;
} | 1 |
89c1be5f5d6e41d5b39f282ed4dc186b | f8dbbfe8bdd4335ca15f13fd375f7bc2 | 测试单个Realm | public void testCustomRealm(){
Factory<SecurityManager> factory = new IniSecurityManagerFactory("classpath:shirorealm.ini");
SecurityManager securityManager = factory.getInstance();
SecurityUtils.setSecurityManager(securityManager);
Subject subject = SecurityUtils.getSubject();
UsernamePasswordToken token = ... | 1 |
1c1b61b0eaea019bb589801928c59208 | 26db7a1f4d275020718942a396a91d9a | Запускає новий буфер перехвату вихідного потоку | class Loggerator(object):
def redirect_out_to(self, out_buff=None):
if not self.__redirect:
self.__redirect = True
self.__buffer = out_buff if out_buff is not None else []
self.__save_out = self.__out
self.__out = io.StringIO()
return True
retu... | 1 |
4c8ad5d2d3555b7c73fca3d8596bbcb3 | b7e9a007961a8a40a2fe03bde753b884 | Sends an email when an assignment is returned. | text_template, html_template,
exception_text):
context = {'resource': resource,
'request': request}
text_content = render_to_string(text_template, context)
html_content = render_to_string(html_template, context)
message = EmailMultiAlterna... | 1 |
604ed03542d7f1686f20f6fa4cc33f3e | 19332b06a46c566ade81422c05a6cf62 | initialize the array (supports TypedArray) | super();
this.length = size.length/3 || size;
this.storage = new Float32Array(size.length && size || size * 3);
} | 1 |
71c705d7bc1b051d9daf800589682070 | 714245e243b0ba5894f585981fe33124 | POST: Pontos/Create | namespace CampeonatoLD_app.Controllers
public class CampeonatoController : Controller
[HttpPost]
public ActionResult Create(FormCollection collection)
{
try
{
return RedirectToAction("Index");
}
catch
{
retur... | 0 |
1be1de2ba788e2d49f051df39acb3873 | 64e7ea576c62fdb7b1b38845e6a45ef7 | extracts and counts loops and conditionals | PC_FindLoops (PC_Graph cfg)
{
PC_Block h_bb;
PC_BuildDomSets (cfg);
for (h_bb = cfg->first_bb; h_bb; h_bb = h_bb->next)
{
PC_Flow be;
PC_Loop *loop;
int num_back_edge;
int num_exit;
int s_lp_head = -1;
Set s_lp_body = Set_new (), s_lp_exits = Set_new ();
num_back_edge... | 1 |
6a27d98ce7a18a4ac897b189737a9faa | 3f3c41e69ce866323ae52679776bc230 | Rehighlights any nodes that should be highlighted, ex. after refreshScreen() | for (MpNode n : highlightedNodes) {
n.setHighlighted(false);
applyStyle(n);
}
highlightedNodes.clear();
eventTrigger.fireRefreshRequest();
} | 0 |
f43a4ea8cdc0a80db3227bf4d18cc368 | 6b70d5e8fc005e4c4c71e0caa9a87b02 | Traverses the children of the AddressOf expression. | namespace Lore public class AssignStatement: AstNode
public override void VisitChildren (AstVisitor visitor) {
Expressions.ForEach (expr => expr.Visit (visitor));
} | 0 |
82ca1c9ec2ff750e2d9535f339ce84eb | ec78b7387d56cd82940dd384b45ec16e | Removes the leading underscore from internal key | def __clean_up_for_key(key):
return string.replace(key, '/', '_') | 0 |
5a4c388f23258c45f4dfa356c3c284d1 | bd39c737d780ae304f9432a6d87eca55 | 资金计划明细列表弹窗 | export default class purchase_Plan extends Component
purchase_detail(obj){
if(this.state.visible_1){
let planPic = 0;
let obj = this.state.obj;
let rowId = obj.rowId;
let rowData = obj.rowData;
let sectionId = obj.sectionId;
let grpcd = rowData.grpcd;
let jsons = this.ajson.jsons;
let dataSour... | 1 |
81e8523a05852864217d4e918d8fac52 | b56a70834758d61cb2de1104a18e1abf | 重新启动tcp 客户端 | public class SocketVisitClient
public void restart()
{
new Thread(new Runnable()
{
@Override
public void run()
{
try
{
if (socketClientThread != null)
{
socketClientThread.interrupt();
socketClientThread = null;
close();
}
Thread.sleep(Global.CLIENT_RESTART_SLEE... | 1 |
fae62f0a6a4b1dbdd0b073e65cdf9d32 | 9da42f111a9a73c980d47aeaccaf7573 | 測試支付銀行為二維,但沒返回resultCode | class AIPayTest extends DurianTestCase
public function testPayReturnWithoutResultCode()
{
$this->setExpectedException(
'BB\DurianBundle\Exception\PaymentConnectionException',
'Get pay parameters failed',
180128
);
$sourceData = [
'number' => '1... | 1 |
918dd9e2210e7ee5ef50584b63e2bfe0 | 15fd4a80177838a6ffa163f2b8d30363 | Отправка показаний счётчика | namespace Charaterizator
public partial class FormMensor : Form
private void timer1_Tick(object sender, EventArgs e)
{
try
{
if (_activCH == 0)
{
bSetCHA.BackColor = Color.DarkGreen;
bSetCHB.BackColor = Color.T... | 0 |
4435e24e5ca4edbb21c62a19c1817589 | 1e76ca64e696edfb7a9c718bbb4c22c7 | Add a deputy to some Fraction by name | {
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DEPUTY$2, 0);
if (target == null)
{
target = (org.apache.x... | 1 |
a60dd8ba85f610e263fb39f5663bd0b3 | 3b7fe439c958ebe91fe137248b9c205c | Count's number of search results from vNWS_Tag at Database based on the 'Approved_byLang' search. | [ResponseType(typeof(List<LabApprovalSearchGetCountModel>))]
[CacheHttpGet(0, 0, false)]
public async Task<IHttpActionResult> GetLaboratoryApprovalSearchListCountAsync([FromBody]LaboratorySearchParameters parameters)
{
log.Info("LaboratoryApprovalSearchGetListCountAsync is ca... | 0 |
47c9be83423e3173c6515b3a827901b4 | 7411e586df394c4228dc653212343350 | Check if the search by image is supported. | public class GroupManager
public boolean isSearchSupported() {
return provider.isSearchSupported();
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.