query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
409b0eb95db0acb3360e504158b9d9d6 | 4c8e1f4d3e9ff855b65faa9b7fd4b7a1 | 派生クラスで実装された場合、実行中のプロセスにアタッチされたVisual Studioデバッガーの情報を返します。 | {
var debugViewDelegate = typeof(Expression).GetPropertyGetterDelegateFromCache(
"DebugView", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
var debugView = debugViewDelegate(expression);
if (debugView == null)
{
... | 0 |
0c48448dddd1bb181a8f0fba5a0cad05 | faa2a177d729d2300008aa87b6660f78 | This function will parse the object files into the respective
vectors, and then at the end, they will all be printed out. | ifstream inputFile ("Parts_List.txt");
brakesCounter = lightsCounter = oilCounter = tireCounter = 0;
findObjects(inputFile, brakesCounter, lightsCounter, oilCounter, tireCounter);
Brake *brakeObjs = new Brake[brakesCounter];
Light *lightObjs= new Light[lightsCounter];
Oil *oilObjs = new Oil[oilCounter];
T... | 0 |
e2ac5f6709fd82c77e67761063084c57 | 0f70a87462440c8d39908c7daf13e9c3 | 多角形が凸であるかを判定する
多角形は、反時計回りに頂点を格納する配列で表現される | boolean isPositive = false;
for (int i=0; i<nVertices; ++i){
int lower = (i==0)?(nVertices-1):(i-1);
int middle = i;
int upper = (i==nVertices-1)?(0):(i+1);
float dx0 = x[middle]-x[lower];
float dy0 = y[middle]-y[low... | 1 |
fb6fe4a9262f3913fe23420a9b70201d | df033a9cbec5dc3287bacd6c48968271 | 按照employeeNum查找employeeInfo | @Service
public class GetEmployeeInfoService
public EmployeeInfo selectEmployeeInfo(int employeeNo) {
EmployeeInfo employeeInfo = employeeMapper.selectEmployeeInfo(employeeNo);
return employeeInfo;
} | 1 |
195e6de47f435149ca2e4a57cfd6eabb | 01773c859fa9acdc564479181bcec91e | Move buffer up one line | namespace RexSimulatorGui.Forms
public partial class BasicSerialPortForm : Form
private void MoveUp()
{
for (int i = 0; i < NUM_ROWS - 1; i++)
{
for (int j = 0; j < NUM_COLS; j++)
{
mScreenBuffer[i, j] = mScreenBuffer[i + 1, j];
... | 1 |
f00ab80253f4679b5c1f75491f644d24 | b14e1675f15404ff12564879bf807c01 | Método que asigna un nodo Task a un nodo usuario. | @Controller
@RequestMapping(value="/subprocess")
public class SubprocessController
@RequestMapping(value="/assign/{taskId}/{user}")
@ResponseBody
public String assign(@PathVariable String taskId,@PathVariable String user){
this.util.addCandidateUserToTask(taskId,user);
return "SUCCESS";
} | 1 |
7a5a25215a684fa96a9f281f29f34a1b | 757927b3db206015b6bb360e347b2059 | Metodo para agregar un nuevo curso | if data[0] and data[1] and data[2] and data[3] and data[4]:
cur = Curso.connection.cursor()
sql = """INSERT INTO `Curso` VALUES
(NULL, ?, ?, ?, ?, ?)"""
try:
cur.execute(sql, data)
Curso.connection.commit()
... | 1 |
3a7abc7903bc75d6f5f3504b510879f9 | d997c9c880f3835a0a1588495f848795 | 设置消耗的金额数量 | if self.useNum < 1 then
self.useNum = 1
GComAlter(language.pack18)
end
local amount = self.mData and self.mData.amount or 0
if self.useNum > amount then
self.useNum = amount
GComAlter(language.pack21)
end
self.countText.text = self.useNum
end | 1 |
4f595ac5e7440d5a4eb0ac03e7eb2be3 | 12fc411de3f2cf8f60418f10286950e7 | Méthode permettant d'envoyer une instruction de dessin au serveur | var client = paletteLocale.id;
var data = {
id: client,
type: 'dessin',
evenement: 'erase',
brush: paletteLocale.brush
};
ws.send(JSON.stringify(data));
} | 1 |
ffe8a99be59b0afb6292705676d5b527 | 11d80299da053d90df8eae1a625c1520 | 设置籍贯信息; | @Table(name = "OUTPATIENT_INFO")
public class OutpatientInfo
public void setNationality(String nationality) {
this.nationality = nationality == null ? null : nationality.trim();
} | 0 |
8008ba4573a0f6301df46e8c3799173f | b8a569a0cf5de9421335b15691f39a33 | Sets the event which opens the sub menus of the root level buttons.
<code>false</code> to make them openable by clicking. | namespace Kendo.Mvc.UI.Fluent
public class ContextMenuBuilder : WidgetBuilderBase<ContextMenu, ContextMenuBuilder>, IHideObjectMembers
public ContextMenuBuilder OpenOnClick(bool value)
{
Component.OpenOnClick = value;
return this;
} | 1 |
292b6b3236281f1825dda2fd99484978 | aab1c7b7d4b1231367eb899644e1c979 | Method to clear the net status | void resetNetDataState(); | 1 |
104f1c02c21422479c398b2046692506 | f06ff922659d1ec06b931b92fa65b498 | Convert Celsius temperature to Fahrenheit | def to_f(c):
if c < -273.15:
raise ValueError("Temperature value is below absolute zero.")
return ((9/5) * c) + 32 | 1 |
2b3d8453eed12168be98b07a7fe212ab | 4ce3d56911913571dcb90327f78c3635 | 指定appname进行应用容器销毁,返回状态和应用容器的id | def end_app(appname):
return _applicationmanager.end_app(appname) | 0 |
f4b87c348cd82bdf0e69b3a60cd134ef | 00bbeb512f96823ddae8ad83e2adbcc1 | Returns average directional index. | def average_directional_moving_index_rating(high,low,close,n):
try:
admir_data=talib.ADXR(high, low, close, timeperiod=n)
return admir_data
except Exception as e:
raise(e) | 1 |
ebe212b865fdcb161f16183638c90f90 | e5cd2942aff54c12fdffed1bd304e81f | Enable a specific tab based on the given id | this.tabs.forEach(tab => {
if (tab.tabId == tabId) {
this._selectTab(tab);
}
});
} | 0 |
70db6c0c266bac26721304954659ad32 | 503796ae02508f175f86094613784cc9 | Gets the expected Java source code encoding. | public final class PlannerWriter extends AbstractProjectWriter
public String getEncoding()
{
return m_encoding;
} | 1 |
5bb7914f4461309d44c02dc423b98a08 | 6a61d8a7393f244c11bd8182c1854170 | map touch events to mouse events for touch compatibility: | function onPointerDown( event ) {
if( event.pointerType === event.MSPOINTER_TYPE_TOUCH ) {
event.touches = [{ clientX: event.clientX, clientY: event.clientY }];
onTouchStart( event );
}
} | 1 |
5b0e2d1be1ecf478c35634a1d91d22aa | 775438c6977eaec692befed782114eb9 | Returns the last client name that was entered | public class InputListener extends Thread implements Comparable<InputListener>
public String getClientName() {
return (name);
} | 0 |
2d8e25310a6d8522a04b9423ed66886d | 350daf0b75c3e2f216565b5409c1aaf2 | Sets the contact person phone of this dms poc. | public class DetailedDomain extends AIMDomain
public void setContactPhone(String sContactPhone) {
_sContactPhone = sContactPhone;
} | 1 |
f5418c28829770f295be2dbfcb7f62b5 | 57a63bb91e2bd78e94bbb86e919abd21 | Return the standard deviation of the elements outside the diagonal in a confusion matrix | np.seterr(divide='ignore', invalid='ignore')
up = up.sum(axis=1)
down = down.sum(axis=1)
expected = (up + down) / 2.0
standard_DI = (np.sign(down - up) * ((up - expected) ** 2 + (down - expected) ** 2)/expected)
return standard_DI | 0 |
f2485e2b7c19eec680250ffac141a90f | 5715703dbf775b752e5c74ade7991551 | @brief Indica la capacitat del punt de recàrrega | public class LienzoToolBar extends JPanel
public int getDirRelleno(){ return this.dirrelleno; } | 0 |
256139d85127291298be7fd9197ea713 | 46e6218cf4a88679a544abc5d830f9d5 | Assert that the the combined style does not have a specific style in it. | public void assertNotStyle(final String elementLocator, final String style)
{
assureCondition(styleMatches(elementLocator, style, false));
} | 1 |
c5c8d869cc76d3610a04a9e543a0ca4a | d4c84e30be6b0b3faef992405c3bbbb7 | Call base class implementation. | void CNotificationScreen::OnSizeChanged() {
CScreen::OnSizeChanged();
} | 1 |
71e4f48060d69779054384c0c1b47cae | 5000ddc4e74a3ed1324e8a3c276326c1 | ## Random-effects ANOVA Model parameter estimation | stEstANCOVA <- function(data, ...) {
data <- stData(data, ...);
fml.A <- update(data$fml.W, "Y ~ A + .");
rst.lm <- lm(fml.A, data = data$data);
coefficients(rst.lm)["A"]
} | 0 |
eab9991de8a8fa9d85f70e592b70225f | 6bcb8eed0aae55f03024d0a93c71f541 | Update the minimal number of players. | var item = document.getElementById("numberOfPlayers");
item.textContent = playerCount + "/" + maxPlayers;
} | 0 |
e1b420e6e8d6e58938388c9ae95e7c69 | 0fca2a8b3e5a7704b64ed516dbf5d7bb | Atualiza os valores da vida e mana do player | public class UIManager : MonoBehaviour
public void UpdatePlayersLife(int enemyLife, int playerLife)
{
playerLifeValue.text = playerLife.ToString();
enemyLifeValue.text = enemyLife.ToString();
appInfo.text = "Players life changed.";
} | 0 |
542f02d66fe5dd03ab49c53fa7e08b32 | f51d13b343d434900a64cd887fb0b3ed | Propagate the attributes recursively. | class Group(SubmittableContainer):
def propagate_attribute(self, attr, val):
for activities in self.activities:
activities.propagate_attribute(attr, val) | 1 |
7c7638967de2551fcaa233c4476aac26 | a9445e3327de2632bf0afde802543ee9 | Printing calculation steps | class Newton_GUI(Tk):
# import methods
def print_work(self):
print("\n\n")
print("x0 = ", self.newtonValues[0])
count = 0
for i in self.newtonValues:
print("x",count+1, " = ", "x", count, " - ( f(", self.newtonValues[count],") / f'(", self.newto... | 1 |
3d381092e6dc70009529c41aa0544ec4 | e4f360fa1ffeecddc6bbdada5436ec6c | List all blogs | class BlogController extends Controller
public function index ()
{
$blogs = ListBlog::all();
return view('blog.list', compact('blogs'));
} | 1 |
f8ef976516da741b6759e16ba6664f35 | b8d97bd35af0c867530da13f05dd118b | Indicates if data will be loaded | public class NoiseSourceExcessPainter extends SpatialRasterPainter implements NoiseSource
public boolean isDataLoaded()
{
return true;
} | 0 |
d0c014bb62fe14dcb4f5b2ff952c9aba | 4fc29511f385ab726782eb5dcea62a23 | Reset the event handled flag before each test | class EventTest(unittest.TestCase):
def tearDown(self):
self._event = None;
self._eventDispatcher = None; | 0 |
7c5db77c075a4613d8128a1713bdba57 | 861b04f8ee3f8ee70469fb24090f7c91 | @brief This function sets WLAN Blanking Parameters | wlan_uap_bss_ioctl_uap_wmm_param(pmlan_adapter pmadapter,
pmlan_ioctl_req pioctl_req)
{
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
mlan_status ret = MLAN_STATUS_SUCCESS;
t_u16 cmd_action = 0;
ENTER();
if (pioctl_req->action == MLAN_ACT_SET)
cmd_action = HostCmd_ACT_GEN_SET;
else
cmd_a... | 0 |
95476d1a3b3c70646399be82050cd816 | 0dffd5896f998eec2e4113474d6063c0 | # ----------------------------------
# Orthogonal Initialization
# ---------------------------------- | def ortho_init(scale=1.0):
# (copied from OpenAI baselines)
def _ortho_init(shape, dtype, partition_info=None):
shape = tuple(shape)
if len(shape) == 2:
flat_shape = shape
elif len(shape) == 4:
flat_shape = (np.prod(shape[:-1]), shape[-1])
else:
... | 1 |
1fbf654a157c43a6c1d9345e05a6b7d3 | fe30992c90e309ed8c49a4b22d91d2c3 | Adds a JOIN clause to the query using the SalesData_Error relation | {
$this->_parts[self::_JOIN_][] = ' LEFT JOIN ' . TableQccheckinglistreport::_TABLE_NAME_ . ' ' . $this->table_alias_qccheckinglistreport_passed . ' ON (
' . $this->table_alias_qccheckinglistreport_passed . '.' . TableQccheckinglistreport::_TABLE_QCCHECKINGLISTREPORT_COLUMN_QCREPORT_ID_ . ' = ' . $this->... | 0 |
8de9aa57bf947c564ee1b1c318b140f0 | 44738d1ec8cd605fb24afa8921551564 | Se detiene el cronometro, retorna la diferencia de tiempo en segundos. | final class Timer
public static function stop(string $name): float
{
if (isset(self::$starts[$name])) {
$delta = microtime(true) - self::$starts[$name];
unset(self::$starts[$name]);
return $delta;
}
return 0.0;
} | 1 |
3b559bf23a88302e056190146d2f57ae | afb824124e50e18ee7b31b9dac76d9ff | ===========================================================================
DESCRIPTION
This function is the optimized Signal handler for ETH NO QOS mode. It decides
if the packet needs to take the legacy path or should be forwarded to Um
iface.
PARAMETERS
rx_sig : RmNet signal type.
user_data : pointer to user data... | {
dsm_item_type *dsm_item_ptr = NULL;
uint32 rab_id = lb_get_rab_id_from_key (wm_key);
uint32 wm_id = lb_get_chan_id_from_key (wm_key);
if (wm_id >= UE_MAX_DL_LOGICAL_CHANNEL)
{
ERR( "Invalid DL WM Key = %d, watermark ID = %d, mapped for RAB ID = %d", wm_key, wm_id, rab_id);
}
else if (is_... | 0 |
d747b1a73b2758c04cf0e98962a40a8c | 1b00b1b045342feec13f39d11a601404 | Метод устанавливает порт удаленного хоста, к которому надо подключиться. | {
$this->url->setPort($port);
if (($this->url->getScheme() == 'http' && $port != 80) || ($this->url->getScheme() == 'https' && $port != 443)) {
$this->headers->set('Host', $this->url->getHost() . ':' . $port);
} else {
$this->headers->set('Host', $this->url->getHost()... | 1 |
a70dabc44de5107b68d50ed1d5d20758 | 07d5ecfd641197a6f91560b8468045e3 | 1664. 生成平衡数组的方案数 | var res [][]int
helper2(2, n, []int{}, &res)
return res
} | 0 |
0a803df98618eb5b943d42f02d337786 | 62083f11b032c2b7728eaab3408d4a07 | 将一个文件进行压缩 | public class $Compress
public File zip(File file, String targetPath) {
return zip.compress(file, targetPath);
} | 1 |
1a2f3b77b1373d4e7ea783fde14575f6 | 1a9050c30b4bbdc7b35a57ac5a736425 | Selects contacts or login fragment based on currently stored accounts
count. | public class HomeActivity extends SherlockFragmentActivity implements Constants
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mInterface = ((TwidereApplication) getApplication()).getServiceInterface();
StringBuilder where = new StringBuilder();
where.append(Acc... | 1 |
272ba43089a796158c33466c982ba1c2 | bb544b0e773fca198a4e7ca5909d6a53 | 通过邀请码获取用户列表 | User getUserByInvitedCode(String invitedCode)throws Exception; | 0 |
f61b4c89cbad53cb9aada589eff70ec0 | a3e65e822a07ed021792c81232a8f0f8 | !
@brief Syncronizer deinitialization function | int32_t crc_sync_deinit(struct crc_sync_descriptor *const descr)
{
ASSERT(descr);
return _crc_sync_deinit(&descr->dev);
} | 1 |
27f359014e03ff1a5712230b0cf24984 | cf64cd153fb50f817e32a461e758ba56 | 기본 카메라 앱을 시작하고 두 개의 촬영 결과를 받을 수 있도록 설정한다. | public class Camera extends Activity
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent cameraIntent = new Intent("android.media.action.IMAGE_CAPTURE");
cameraIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
cameraIntent... | 0 |
e353883720e6e1ba8f10e9a554a6a2fd | f1313845cd7ff9b570532de24a8bc865 | Monto de IVA | {
if (\array_key_exists(Tokens::T_PTMA_NORMAL_TOTAL_IVA, $this->properties)) {
return (float) $this->properties[Tokens::T_PTMA_NORMAL_TOTAL_IVA];
}
return null;
} | 1 |
c54e25744c5b54854246ff38c64c5742 | 058a328c7688ece09b45f5d340fa608f | 42.在有序但是含有空的数组中查找字符串 | int[] arr = {33,88,-2,34,1,9};
int value = -2;
int index = search(arr, value);
if (index == -1){
System.out.println("404");
}else {
System.out.println(value + "的下标为" + index);
}
} | 0 |
e53c1a9eabe2099b96f8851dcaf539b6 | 35f8f62e2a3d1218b4f5aefad8189d0a | 指定した複数銘柄の決算情報を取得する。 | let mut futures = vec![];
for f in codes.iter() {
futures.push(self.get_detail(f.as_str()));
}
let funds = join_all(futures).await;
let mut res = vec![];
for f in funds.iter() {
if let Ok(v) = f {
res.push(v.clone());
}
... | 1 |
00b7174cdb0385c697460396e487f57c | 9626dacb7514cf89bb166fc5a9b88df3 | Find the way that the encoded images are permuted off of the original images | R = 1
P = 8
hist = {h:0 for h in range(0, P+2)}
hist_temp = np.zeros(10)
for r in range(R,image.shape[0]-R):
for c in range(R,image.shape[1]-R):
pattern =[]
for p in range(0,P):
d_u = float(R*math.cos(2*math.pi*p/... | 0 |
5a3f3399e5db9a61721f6b833c01da46 | bb232b3f414a5e898b7894c736c1ff41 | Splitter constructor. | class SplitterLayout extends Layout
constructor(orientation: Orientation) {
super();
this._m_orientation = orientation;
} | 0 |
4c243c8a708b2988c6d123d0f390c439 | 78aee826a1a3b4d7f1cf32bca8fb1041 | Generates dict of required widget for validation. The key is the validation
label and the value is a list of widgets in the same row as the validation label | form = self.get_form()
if len(form.fields) > 5:
raise ValueError(
"The form contains more than 5 fields and this is not " +
"allowed by Slack's dialog")
extra_attrs = self.get_extra_attrs_for_fields()
for field in form:
element = {
... | 0 |
fcdb413eaa355eb0ad6dd3603e19627b | 3b8d479a2d6b9fa3ae6aa02fa08f7854 | return the 10001st prime | int main(int argc, char **argv) {
int num = 2, index = 1;
while (index < 10001) {
num = nextPrime(num);
index += 1;
}
printf("the answer is %d.\n", num);
} | 1 |
52f2ffad8507b0fdf63349492fdea48f | 1c007ab3b0f41739876738cf2b8fb574 | Parse an email address in "Mr. Name <name@example.com>" format. Returns an object. | function getEmailAddress(raw: string): EmailAddress | EmailAddress[] | null {
const list: EmailAddress[] = [];
const parts = raw.match(/('[^']*')|[^,]+/g);
if (!parts) {
return list;
}
for (let i = 0; i < parts.length; i++) {
const address: EmailAddress = {
name: '',
email: '',
};
const partsStr = u... | 1 |
936c55852ee0ef7f311c5aacd48d8eb7 | 67ca227382532b03cf1332c9f2c9b183 | Strings used in the 'List' widget properties dialog. | void SystemPropertyWindow::_initProperties(void)
{
PRNL_NAME = _("Name");
PRNL_SYSTEM_CATEGORY = _("Category");
PRNL_SYSTEM_KEEP_LOCAL = _("Keep local");
PRNL_SYSTEM_ITERATION_INTERVAL = _("Iteration interval");
PRNL_SYSTEM_FIXED_TIMEOUT = _("Fixed timeout");
PRNL_SYSTEM_NONVIS_UPDATE_TIMEOUT = _("Nonvisible upda... | 1 |
1237feeaf4fcc4f0ccaa4640e3e26510 | 6e5a87b0c32fc02f85f8108f20b97ff3 | moves all items from listBox1 to ListBox2 | {
foreach (object item in listBox1.Items)
listBox2.Items.Add(item);
listBox1.Items.Clear();
enbutton();
} | 1 |
d368db6ec57f425bcf11883ba0590f00 | d2d34091c821caeb69cb6585319df051 | Calculates the number used to normalize with a square root function | {
double normalizationFactor = 0.0f;
if(m == 0)
normalizationFactor = sqrt(1.0f / NumFilters);
else
normalizationFactor = sqrt(2.0f / NumFilters);
return normalizationFactor;
} | 1 |
a8d459964cece1f5b6cbbda4cc0d4f65 | fdd4959772cb3e94d067121d55c6d3c7 | Implementation of fgetc - for someone else's buffer in memory | {
if(!src || !src->buffer)
{
errno = ENODATA;
return errchar;
}
long pos = src->curpos;
if(pos == initsrcpos)
{
pos++;
}
pos++;
if(pos >= src->bufsize)
{
return endoffile;
}
return src->buffer[pos];
} | 1 |
206c46a6ab1ce311148fbe7a993a447b | 08202e9f86933af2366178925f22eada | This sets the reason as to why a video was flagged | class Video:
def flagged_reason(self) -> Sequence[str]:
return self._flagged_reason | 0 |
59b4eb5e58bd38754ccf9a03fbc4a489 | fa06c27735619419ba0b668e794bc319 | 启动欢迎界面 | public class MainView extends JFrame
private void showWelcome() {
String nextWelcome = ConfigurationFactory.getConfig("config").getProperty("next_welcome");
if (!"1".equals(nextWelcome)) {
new WelcomeView().setVisible(true);
}
} | 1 |
fbd74870d85b2de6507cc7a45864631f | 4360d563927207b53e76476052909773 | Display QRCode on the donate page by replacing placeholder qr_image. | const opts = {
errorCorrectionLevel: 'H',
type: 'image/jpeg',
margin: 1,
rendererOpts: {
quality: 0.3,
}
};
QRCode.toDataURL(this.qrCode, opts, function (err, url) {
if (err) {
throw err;
}
const img = document.getElementById('image');
im... | 1 |
b96f181e9968e7b0669f8af8c4a6e7d1 | 93071ccd12ad4edbb98e61cfdf806e57 | Display a listing of the resource.
path="/stacks",
summary="All stacks",
security={{"highcore_auth":{}}},
) | class StackController extends BaseController
public function create()
{
return view('pipe::stacks.create');
} | 0 |
4b0d0f60247ab006d935e99d003e4b7f | 29fd26566954ad31c88c9a5134833547 | Função geradora de lista de movimentos da rodada, dada uma lista de peças | def acoes(T):
actions = []
for i in range(0, 4):
y = movimento(T, i)
if(T[y] == 0):
actions.append(y)
actions = list(dict.fromkeys(actions))
return actions | 1 |
29778603d14f3cfc7dfae7f4d63fc7b5 | 5bb9f6144dae0fd4e83bea8c6c54ee99 | !
@brief Diaables the WakeUp Pin functionality. | void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
{
assert_param(IS_PWR_WAKEUP_PIN(WakeUpPinx));
CLEAR_BIT(PWR->CR3, (PWR_CR3_EWUP & WakeUpPinx));
} | 1 |
376127e5e9eba0c5a1e2638379fc13cc | 4b2ff04821dbfb40045fe6dd19113fa0 | Enqueue the user onto the borrow queue | class LiveOrg:
def enqueue_user_borrow(self, date, user_id):
self._activate_day_queue(date)
return self._enqueue_obj(
self._borrow_queue(date), self.live_user(user_id)
) | 1 |
82ad270e436b0c981107a36087c906a2 | e9f2b72315c5fc2552156b1587acc74a | 清除所有存储的未读角标 | function handleClearBadge({ topicId }) {
dispatch({
type: ACTIONS.CHAT_LIST.UPDATE,
payload: {
item: {
unread: 0,
},
condition: {
topicId,
},
},
});
} | 0 |
95c4da6997909f512467d9c8b188e3c5 | e768bc848da8c9247e5c08fbc1642235 | @brief multiplies two hex numbers | TInt HexMul(TDesC8& a1,TDesC8& a2,TDes8& a3)
{
TInt l1=a1.Length();
TInt l2=a2.Length();
TInt l3=l1+l2;
if (a3.MaxLength()<l3)
return(KErrArgument);
a3.Zero();
TInt x;
TInt y;
TInt z;
for (x=0;x<l3;x++)
a3.Append('0');
for (y=0;y<l2;y++)
{
TUint8 carry='0';
for (z=0;z<l1;z++)
{
if(HexMulAdd(a... | 1 |
f6d2de8d05f272545dd6ec3f282739a7 | d21bc8a042d4454a1a8344af24cfd305 | Загрузка водителей | class Admin_Export extends Controller{
public function drivers(){
$this->load->model("export/models/Export_driver_model");
$drivers = $this->Export_driver_model->get_drivers();
$this->template_lite->assign("drivers", $drivers);
$this->Menu_model->set_menu_active_item("admin_export_menu", "export_drivers_items")... | 1 |
8fb376c82c3e3be9c18dc3aa0207d9f9 | 9b1b2993749f96d5143b9e255dce3b17 | DrawSymbol --
Draw the symbol centered at the given xy screen coordinate
based upon the line symbol type.
None.
Most notable is the round-off errors generated when
calculating the centered position of the symbol. | {
float ssize = opt.SymbolSize;
if (g.PageUnit == GraphicsUnit.Document)
{
ssize = ssize * 300f / 96f;
}
RectangleF rect = new RectangleF(
x - ssize / 2,
y - ssize / 2,
ssize,
... | 1 |
a96cc3e711780784329e8a635dc4a074 | f2cc4d60a74e772754d05e21e831ab94 | Set the date with a string.
as '2018-01-30'. | public class MultipleDayCheckCalendar extends LinearLayout implements AdapterView.OnItemClickListener
public void setDate(String date) {
this.date=date;
try {
setDate(DATE_FORMAT.parse(date));
} catch (ParseException e) {
e.printStackTrace();
}
} | 1 |
986c3b96b096cc7065fbf84494cf4fe5 | 351bf3e9af4216fac122e0da955304fe | 将用户对象转为MAP对象 | public class User:Java.Lang.Object
public HashMap ToMap()
{
HashMap map = new HashMap();
map.Put("username", this.username);
map.Put("email", this.email);
return map;
} | 1 |
4243c84ab353ff358b91dbeb21984637 | 487097cd229014346dcfc8ddf01ae5ff | Método crea una vista y un controlador para eliminar registros | class ProductoController extends Controller
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
} | 0 |
901eadf9d843301210e5372ea477ffc2 | c45aecdaf32108116fbefef2c1ed471d | $classがclassか(interfaceやabstractではなく) | if(null == clazz) {
return false;
}
if(Modifier.isAbstract(clazz.getModifiers()) || Modifier.isInterface(clazz.getModifiers())) {
return false;
}
return true;
} | 1 |
24bfc9d671d39f0227a8578697a118f9 | d998b1b0bc9fda6ea0fe5096683d01ea | 订单项AssetsLeaseOrderItem转PrintDto | AssetInventoryScopeDto dto = new AssetInventoryScopeDto();
dto.setId(model.getId());
if (!VGUtility.isEmpty(model.getAssetInventoryModel())) {
dto.setAssetInventoryId(model.getAssetInventoryModel().getId());
}
if (!VGUtility.isEmpty(model.getAssetStatus())) {
... | 0 |
a41c4e67379631d5b51f30e6841f402a | 658ffdc17a4b8d26353c175d515e9fab | Request template from running Webpack DevServer | const withDocs = Object.assign(context, {
entry: context.entry.concat([require.resolve('./docs')]),
});
return this.webpack.createDevServer(withDocs, webpackConfigFactory(this.workspace.path));
} | 0 |
8cf1a3111cacb1c7be3bd2c65912d28a | ac21f63eafb7320348bd7d1704eb8b3f | 返回指定标签页的textArea | String text;
if (textAreaIndex == 0 && textArea1 != null) {
text = textArea1.getText();
textAreaIndex++;
} else if (textAreaIndex == 1 && textArea2 != null) {
textArea2.selectAll();
text = textArea2.getText();
textAreaIndex++;
} else
text = null;
return text;
} | 0 |
49e7962dcf6e54469128064c5876ecd5 | 7453ce9b67f00b8937e06fd6ea7908e4 | Guides the user through setting up an experiment. | def run_experiment():
participant_info = {
"participantID": "",
"age": "",
"sex": "",
"major": "",
"reaction_times": [],
"stimulus_types": [],
"correct": []
}
collect_info(participant_info)
stimuli = prepare_stimuli()
present_instructions()
... | 1 |
36bbe87a51309bee0c1f70c0ec0c4fa2 | 0b8d2cff2fe2de7d6c7c7db714a233c5 | クラスタへの割り当てリストを返す | class AdminIP
def cluster_list
super
end | 0 |
55a1f4ed022707ee7e01dd3784884322 | 8a0501ee9065a1ae8da7280e36e869d6 | 获取商品增量更新规则 | public class GoodsApi : PddCommonApi
public async Task<GetGoodsCatRuleResponse> GetGoodsCatRuleAsync(GetGoodsCatRule getGoodsCatRule)
{
var result = await PostAsync<GetGoodsCatRule, GetGoodsCatRuleResponse>("pdd.goods.cat.rule.get", getGoodsCatRule);
return result;
} | 1 |
5c4c968be70ed592f9513ad265717a95 | ebf2ae5bbee23c29e2fb69f47fc6de07 | 点击任一个Item都打开课程详情页面 | public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent it = new Intent(getApplicationContext(), LectureDetailActivity.class);
it.putExtra("path", sp.getString("picUrl",""));
it.putExtra("id", sp.getString("id", ""));
... | 1 |
7f59078ad5847c9a07d1b9e4dea328ed | fc7e3841ad9ba7f9b26f2d2bc1f34829 | Returns matrices with x- and y-coordinates of grid points.
M = number of rows (unique grid-point y-coordinates)
N = number of columns (unique grid-point x-coordinates) | Nn = int((np.abs(ymax - ymin)) / dy) + 1
Ne = int((np.abs(xmax - xmin)) / dx) + 1
x_i = np.linspace(xmin, xmax, num=Ne)
y_i = np.linspace(ymin, ymax, num=Nn)
return np.meshgrid(x_i, y_i) | 1 |
648d6f8d9b6986d1be27401cc9fc6a0e | df5cfb229998c09cf4870dae2135df13 | Read a channel node (note: not all members of Channel are filled (e.g. mesh frames)) | if isinstance(channel_node, dict):
channel_node = [channel_node]
return {
key: value for channel in channel_node for key, value in parse_c13s_node(channel['Characteristics']).items()
} | 1 |
1ed0f284421013897522a5fa574f0802 | 2471a0edcfefb115bd6e2f2e7de99e5b | 마지막 생성된 패치 정보를 가져온다 | File filedir = new File(this.getCompressZipPath());
File[] arrayFiles = filedir.isDirectory() ? filedir.listFiles() : null;
return arrayFiles!=null && arrayFiles.length > 0 ? getLastCreate(arrayFiles) : null;
} | 1 |
645dbd62618e44596d0a40242af5baac | ed5d41af9c514830fcd394544f125ae7 | take the cleverbot.com response and populate properties. | self.bot_public = parse_bot_public(data)
self.bot_require_code_grant = parse_bot_require_code_grant(data)
self._set_cover(data)
self.description = parse_description(data)
self.flags = parse_flags(data)
self.hook = parse_hook(data)
self._set_icon(data)
self... | 1 |
18aaa18599436303bc2a96456251a916 | 992d69a88fd9bf13a86721b169002fee | если модель загружена НЕ ИЗ Android-приложения - то меняем таймстамп последнего обновления на текущее время | namespace ThreatDataBase
public partial class MainWindow : Window
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var timer = new System.Windows.Threading.DispatcherTimer();
timer.Interval = new TimeSpan(0, 1, 0);
timer.IsEnabled = true;
timer.... | 0 |
a27e4d4d263327a5713de6553c596118 | 41bfcd305fbdd1c03ca56c9a252df1fb | Obtiene cantidad de plus de la tarjeta | class Tarjeta implements TarjetaInterface
public function plusAPagar() {
return $this->plusPPagar;
} | 1 |
4a4754f3e9978ca8fc70da81bcf557aa | 5986adc6535cafc39663bd1b82f7443f | 查询微信CPC部门分配统计数据 | public class DdkApi : PddCommonApi
public async Task<QueryDdkStatisticsDataResponse> QueryDdkStatisticsDataAsync(QueryDdkStatisticsData queryDdkStatisticsData)
{
var result = await PostAsync<QueryDdkStatisticsData, QueryDdkStatisticsDataResponse>("pdd.ddk.statistics.data.query", queryDdkStatisticsData);
... | 0 |
80db953a11aefe94b556a1e159bcf543 | e3189c6ee5a037423e763419f08b92c5 | 设置按钮的摆放样式 | public class ChangeSurfaceDialog extends JDialog
private void setButtonStyle(JRadioButton btn) {
btn.setBorderPainted(false);
btn.setContentAreaFilled(false);
btn.setHorizontalTextPosition(SwingConstants.CENTER);
btn.setVerticalTextPosition(SwingConstants.BOTTOM);
} | 1 |
0b4c268fc6a0cee34292fc62b4498c8f | 7c8be57b4eb5f81466b0933f1ebd88a0 | 同步所有玩家資料,傳給所有玩家除了自己以外的資料
<para>格式 = 同步代碼,其他玩家數,玩家1名稱|玩家素質(由管線符號'|'分隔),玩家2名稱| ...</para> | namespace DungeonGame
public class ClientManager
private void SyncAllPlayersData(string playerDatas)
{
foreach (string name in playerUpdateStatus.Keys.ToList())
if (name != playerName)
playerUpdateStatus[name] = false;
foreach (string dataPack in E... | 1 |
7701f8f0ba57e3cbc67f3cba518f50de | 815881b2e07890449cff742c2a42b79b | Generic update for the specified otype and primary key. | namespace Passive
public class DynamicModel
public virtual int Update(object o, object key, object whitelist = null)
{
return this.Database.Execute(this.CreateUpdateCommand(o, key, whitelist));
} | 1 |
6fd70766215f0cbbe13d70a57c7beeab | 05abc475fc9e94e740b59a5404bbffce | 获取指定消费者可用消费的所有模块id | used_key = self.used_key_frmt.format(pool_id=self.pool_id)
used_list = await self.redis.smembers(used_key)
return {int(pid) for pid in used_list} | 0 |
bd75bc3d04477cf964d00fd454a5e830 | 453abbd656a80c1e6f8e2944b72587e7 | Returns the document if exists, else creates a new doc | function getDBDocument(document) {
let documentUrl = `${collectionUrl}/docs/${document.id}`;
console.log(`Getting document:\n${document.id}\n`);
return new Promise((resolve, reject) => {
client.readDocument(documentUrl, (err, result) => {
if (err) {
if (err.code == HttpSt... | 1 |
fa441305cb54e44e43e55cdae76de632 | 2f4e0458042393d70e0263270c24b4f7 | 出現させるガラクタをランダムに選ぶ | sp = allgroup.sprites()
while 1:
spn = random.randint(0,51)
x = sp[spn].rect.centerx
y = sp[spn].rect.centery
if x==OUTSIDE and y==OUTSIDE :break
return spn | 1 |
4ffc28c366d9e684fbc8c050961911fa | 0641e9d197f508f07c653a02b7d43092 | Liefert einen UTF8 codierten String. | namespace BeckyApi
public class CallsIntoBecky
public string UTF_8(string lpSrc,bool bEncode) {
IntPtr strPtr = PureApi.UTF_8(lpSrc, bEncode);
var res = Marshal.PtrToStringAnsi(strPtr);
PureApi.Free(strPtr);
return res;
} | 1 |
d51961fc2f7b21fd04a0fb89832bf698 | c5d618dc879d49c51406ca66dc9d3623 | Set geo midpoint. | double longitude) {
this.latitude = latitude;
this.longitude = longitude;
return this;
} | 0 |
2c034f3c078cce09aa343f1bfadd425d | cdd556f012eb18ada6c13585799ef257 | accumulate fluxes, average state and diagnostics | self.state.structsurf += (self.fluxes.surf_struct_litter -
(self.fluxes.surf_struct_to_slow +
self.fluxes.surf_struct_to_active +
self.fluxes.co2_to_air[0]))
self.state.structsoil += (self.fluxes.soil_s... | 1 |
982b0f4c6225f3fb06035a7d87c7a839 | 25f90b65b82bf05eae0fcd8c17c9ef07 | Get the module holding the setting | abstract class ContentTranslationConfigOverrideBase implements ConfigFactoryOverrideInterface
abstract protected function getModule(); | 1 |
f9aae5fda8d810a29f12d1e61b4ab25f | 685376c19306c33f1f85ef8a5cf4f15b | Users | export class User {
protected instance;
protected UserModel: any;
protected User: any;
protected languageManager: Language;
protected genderManager: Gender;
constructor(instance:any) {
this.instance = instance;
}
/**
* Getters
* ====================================... | 1 |
14d3178a0c0b9b17646d41902c7d9a3e | ee91a65a524bee8dd5c2b968b1a90591 | Skriver ut given kalendermånad i konsolen. | {
System.out.printf(ANSI_BLUE + "%25.14s" + ANSI_RESET + "\n\n", calendar.getYear() + " calendar");
} | 0 |
7273e3a1b48ece160aca8865ddb19811 | 153235704d2c4440d1b1e57ee47c190c | 查询redis是否有此会话记录 | Integer checkSession(@Param("sessionId") String sessionId); | 1 |
3fdbe003efa88bf2f176bce2e2f56b37 | 7cdb27932a5952a9b9269036e1831cad | These functions record and recall the full arguments, including the
+RTS ... -RTS options. The reason for adding them was so that the
ghc-inplace program can pass /all/ the arguments on to the real ghc. | static void parse_args(char **argv)
{
char *ts;
int flags;
opt_complementary = "-2:t+";
flags = getopt32(argv, opt_string,
&G.initstring, &G.fakehost, &G.issue,
&G.login, &G.timeout
);
if (flags & F_INITSTRING) {
G.initstring = xstrdup(G.initstring);
strcpy_and_process_escape_sequences(G.initstring, G.in... | 0 |
4b8b64476ce0b392f26a1e465ef9b390 | 10e61c3956dac4edcfcb6f1fba7237e3 | Call id from signaling | String callId(); | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.