query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
58ff567adb97a17f0a5c226929aaaf92 | 1d7846163cb3e9ad10aa0a1af3a95c48 | Sets a new hasNumberOfPreviousCalls
If system can return detailed calling pattern, whether a number of previouscalls to include can be specified. Default is false. | public class MtcCallDb implements MtcCallDbConstants
public static int Mtc_CallDbSetCfnaInfo(boolean bEnable, String pcUri, int iWaitLen) {
return MtcCallDbJNI.Mtc_CallDbSetCfnaInfo(bEnable, pcUri, iWaitLen);
} | 0 |
ceb76cab1db3ce89f75a38c0427d27c2 | 770f99005d6f7d57e8e1ad495d95791f | retourne l'index de départ du patch, pour l'image sous forme d'un vecteur(retourne un int) | int[] rep = new int[chemin.size()];
for (int i = 0; i<chemin.size(); i++){
rep[i] = Z.indexOf(chemin.get(i));
}
return rep;
} | 0 |
75b60733bfcbe43620f2efb169d3b0f6 | 162ead8a4752e7e7bce54be677906471 | 取评论数(不计算评论回复数) | $comment_type = "comment_type IN ($type)";
$count = $GLOBALS['db']->getOne('SELECT COUNT(*) FROM ' .$GLOBALS['ecs']->table('comment').
" WHERE id_value = '$id' AND $comment_type AND status = 1 AND parent_id = 0");
if(!$count || empty($count)){
$count = 0;
}
return $count;
} | 1 |
076323aba8bfcbf9b06970d98bf05428 | 184b065fdb5244ec34089ccbdae3719d | Set the terrain id at the location | public class Chunk
public void PlaceTerrain(Vector3 pos)
{
Vector3Int modifyPoint = new Vector3Int(Mathf.RoundToInt(pos.x), Mathf.RoundToInt(pos.y), Mathf.RoundToInt(pos.z));
modifyPoint -= ChunkPostion;
modifiedTerrain[modifyPoint] = 1f;
CreateMeshData();
BuildMesh();
} | 1 |
c6a7ff096964038acc125c2b99d5816c | 11ba1a5e92d6b41d863aaef903681143 | パーティクルの大きさ初期化 | {
ParticleSystem[] particles = gameObject.GetComponentsInChildren<ParticleSystem>();
foreach (ParticleSystem particle in particles)
{
initialSizes.Add(particle.startSize);
ParticleSystemRenderer renderer = particle.GetComponent<ParticleSystemRenderer>();
i... | 1 |
ebb7ea7ccca3d6c8c0b13a59d4001055 | 20fb21df5cb8b48c9279fcb3571e3943 | Add patient into the treatment queue. | void Simulator::update_caregivers(int clock) {
e1->add_patient_to_treatment_queue(clock);
e1->add_patient_to_discharge(clock);
} | 1 |
fd5cb60851821e76436378b960a3a193 | 6555a36a92ce6fa58d443801592030dd | データが送信されるまで待つ | class Sms:
# コンストラクタ
def wait_response(self):
time.sleep(1)
while self.serial.inWaiting() == 0:
time.sleep(0.5) | 0 |
f7feaa69cc93f4f9db4bf4140670537c | 934914a01850fe47833b5494071b2814 | 暑期工管理审核删除操作 | if(IS_POST){
$id = $_POST['id'];
$res = D('Signup')->deleteWork($id);
$this->ajaxReturn($res,'JSON');
}else{
$this->ajaxReturn(array('code'=>'500','msg'=>'内部错误'),'JSON');
}
} | 1 |
ec800c3f2ffef388f0c31e7abc918ae3 | ce6eaed16fb9ba55f02e6b07efbb0ca9 | String RGB(A) 값을 RGB 각각의 integer 값으로 변환 | def int2Rgb(v):
return value01(((v >> 16) & 255)/255.0), value01(((v >> 8) & 255)/255.0), value01((v & 255)/255.0) | 0 |
867c716e5f6bda2fe9fa3ba59b51c5e9 | b11198d3872136ff115c7a820c477e48 | Displays the current gamestate, with numbers on the side to help keep track | class Game
def show_board
puts <<-eos
===============================
|| #{state("A1")} | #{state("A2")} | #{state("A3")} | #{state("A4")} | #{state("A5")} | #{state("A6")} | #{state("A7")} ||
-------------------------------
|| #{state("B1")} | #{state("B2")} | #{state("B3")} | #{state("B4")} | #{state("... | 1 |
86f89feabc4edae31e0e59f2e7374ab8 | 9238c1a5b374d0031f3cb7d8e9c59427 | randomised test of /copy and /upload | func TestTCPSimple(t *testing.T) {
go serverMain()
var wg sync.WaitGroup
wg.Add(5)
for j:=0;j<5;j++{
go func(k int){
name := "abc.txt"
contents1 := "01010101101010101010100101110001010 this is new version"
contents := "Hiii this is CS733 course here u go with assignment-1"
exptime := 300000
conn, err := net.D... | 0 |
419ca0a007d01bc46e687911529155a4 | 5d2dc3d8cb2a6b51f43fe2084851504e | Simple delay function using busy wait. | static void
busywait(uint32_t ms)
{
uint32_t i;
while(ms--) {
for(i = 0; i < 3037; i++) {
asm ("nop");
}
}
} | 1 |
ba4d3d2af8355ad15a7c23cf81962ca6 | e106c85534fcf25179e6782c574c5997 | Actualiza o modifica los datos descriptivos de una Suscripción. Si no existe, crea una nueva. | public class Subscriptions extends AbstractApi{
public SubscriptionResponse updateSubscription(String customerId, String subscriptionId, UpdateSubscriptionRequest request){
return client.post(buildUrl(customerId, subscriptionId), SubscriptionResponse.class, request.toRequest());
} | 1 |
1c0f65830d3d3a23bbe4df0e24a29405 | fd393016e58dc29ded61374c8bca6acc | Renders the standard header. | namespace CODE.Framework.Wpf.Controls
public class ListBoxFastGridHeader : Panel
protected virtual void RenderStandardHeaderElements(DrawingContext dc, double headerHeight)
{
dc.DrawLine(GetGridLinePen(), new Point(0d, headerHeight - .5d), new Point(ActualWidth, headerHeight - .5d));
} | 1 |
edc5f887b2442a14f10cf73a3e716b0b | 01f1904c8439af52d4dc437b461d8e01 | <pre>
Creates a new HMAC key for the given service account.
</pre> | @javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/storage/v2/storage.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class StorageGrpc public static final class StorageBlockingStub
extends io.grpc.stub.AbstractBlockingStub<StorageBlockingStub>
public ... | 1 |
3c1f107a8a4415f0f434bf1892212cfb | dd23b5051c76da5e2f3522fe52b4c1c5 | 已发货订单列表优化 | $getData = $_GET;
$where = [];
$where['o.id_order_status'] = array('NOT IN', array(1, 2, 3, 11, 12, 13, 14, 15));
if ($getData['id_increment']) {
$where['o.id_increment'] = array('like', "%{$getData['id_increment']}%");
}
if ($getData['created_at_s']) {
... | 1 |
3d2df23a65e3c498e9f4424d54c82698 | 866aff73de895680b0964e59996e0af3 | Return a list of lines describing the results of `target`, if any. | from subprocess import Popen, PIPE
cmds = [
cmd, '-b', '-sl={}'.format(sl), '-tl={}'.format(tl), target
]
proc = Popen(cmds, stdout=PIPE, stderr=PIPE)
stdout_data, stderr_data = proc.communicate()
if stderr_data:
raise AssertionError(stderr_data.decode())
else:
return... | 1 |
1b605326848260b49dcb064f55cfda65 | f318bd609492e97eec8a9395bd0336c2 | On mouse over of the buildable characters, this will display the attributes | {
GameObject.Find("EnemyName").GetComponent<Text>().enabled = true;
GameObject.Find("EnemyDescription").GetComponent<Text>().enabled = true;
GameObject.Find("DamageBonus").GetComponent<Text>().enabled = true;
GameObject.Find("EnemyConcept").GetComponent<Text>().enabled = true;
... | 1 |
36968e0313c6ed00383dfc302f0bd6ca | 1c3081f1c8175ac7ddfd6dedd16caba1 | OBTIENE NOMBRE DEL CONCEPTO DE DESEMBOLSO | class Conceptos
public function getStrconceptoKy()
{
return $this->strconceptoKy;
} | 0 |
0bb001dcb1725a658e9b786b45a9dabd | fcb6b0d3d562695fa7f11d7923ad9018 | 3) disable analog functionality on PD6 | void InitApp(void) {
ANSELGbits.ANSG6 = 0;
TRISGbits.TRISG6 = 0;
ANSELGbits.ANSG15 = 0;
TRISGbits.TRISG15 = 0;
ANSELBbits.ANSB11 = 0;
TRISBbits.TRISB11 = 0;
PORTDbits.RD4 = 0;
TRISDbits.TRISD4 = 0;
LD1_PORT_BIT = 1;
LD4_PORT_BIT = 1;
LD3_PORT_BIT = 1;
LD2_PORT_BIT = 1;... | 0 |
bffd7fb59231b0a047de3b85a3a3e060 | 59f4f8b73c7a64d1c456ea35e86f912e | Creates a row of letter notes, converted from the midi numbered notes. | class MidiLoader:
def load_sheet(self):
def note2key(note: int) -> str:
n = str(note)
if n not in self.mapping:
return ''
return self.mapping[n]
sheet = []
tempo = 500
for track in self.midi.tracks:
tick = 0.0
fo... | 1 |
fcfa620634908b5a7981bcd4a3037e75 | d417246f163da6793366806f0b77a5e6 | 在结束的时候将feature加一是为了下次画的时候画新的一段, 并不是接着上一段继续画 | for i, xi in enumerate(self.x):
tem_fs = {}
yis = self.labels
if i == 0:
yis = [self.start_y]
for yi in yis:
tem_fs_yi = {}
for yj in self.labels:
tem_fs_yi[yj] = [f(x, yi, yj, i) for f in... | 0 |
a652a791dba01b6364c9b771c8126ca5 | 39ce8f7ac95fc0fe4a736c098fa1a34a | Attach one global listener to handle event "refresh access token" | export default class StoreUserAccessToken extends Listener<void>
public async handle(event: AccessTokenEvent, app: ContainerInterface, dispatch: Dispatch): Promise<void> {
const cache: CacheInterface = app.make('cache');
return cache.set('oauth2.accessToken', event.accessToken.getAttributes());
} | 0 |
7b44637244f1e6303a2f0890bb1cae14 | e0697d81a1aa05e159624e91097aaf1b | 使用科目を取得 | class SubjectMark
public String getSubject() {
return mSubject;
} | 1 |
4c5b8665256f98e5bc97ecd8952040a2 | ef98211a4b6c260e06d76d7bb363ce5d | Function to convert ReceitaCriteria to a {@link Specifications} | Map<String, SearchFilter> filters = SearchFilter.parse(searchParams);
Specification<Recipe> spec = DynamicSpecifications.bySearchFilter(filters.values(), Recipe.class);
return spec;
} | 1 |
056dab84157c6edf2332e674a47f9261 | dbb940abe5e718c72f3bf062f5b60328 | Define colours for display LED based on temperature range | tempColors = [
{temp: [30, 40], color: '#FF6600'},
{temp: [20, 30], color: '#FF9955'},
{temp: [10, 20], color: '#FFCC00'},
{temp: [0, 10], color: '#DDFF55'},
{temp: [-10, 0], color: '#00FF00'},
{temp: [-20, -10], color: '#80FFE6'},
{temp: [-30, -20]... | 1 |
be0e755198404b60b764bb4a0756e7a1 | c367748947f32b7deb6e827f7c79da6e | Obtain dict of trial data | rec = {}
trl_start = int(parsed_lines[(parsed_lines["command"] == trial_result_token) & (parsed_lines['argument'].str.contains(trial_outcome_token))]['time'])
lt_right = parsed_lines[(parsed_lines["command"] == trial_lick_command) & ((parsed_lines['argument'] == str(RIGHT)) | (parsed_lines['argument'] == s... | 1 |
4238ed15ec923a50b7d579d349893356 | cddcabd0954b4d4d08bb244ce48cec71 | проверка предусловия:если контакт не добавлен ни в одну группу, добавить в любую | def proper_group_to_remove_contact(app, db, orm):
i = 0
lg = len(orm.get_group_list())
group = object
for g in orm.get_group_list():
if len(orm.get_contacts_in_group(g)) > 0:
group = g
break
else:
i = i + 1
if i == lg:
g... | 1 |
10cdee7f178844569337f5cf842604b7 | 3dd82a18f748e91573b97b0d94e0ca00 | Removes asteroid from array at index. | uint8_t i;
for(i = index; i < ASTEROID_COUNT - 1; i++) {
ASTEROIDS[i] = ASTEROIDS[i + 1];
}
ASTEROID_COUNT--;
} | 1 |
d903f41e80d559b613378526a63c7016 | 3661595cac971c9b42d62dec41527f0b | Set artist ID | val = self.__item__.artistPersistentID
if val is not None:
val = str(val)
return val | 0 |
e6b70c2bcebddc1fecae9a6a5291df41 | 83c4a33402635eda395a878c462e28a0 | Charge l'écran de recherche | try {
FXMLLoader loader = new FXMLLoader ();
loader.setLocation(Controller.class.getResource("/views/search_screen.fxml"));
root = (AnchorPane) loader.load();
scene = new Scene (root);
search_controller ctrl= (search_controller) loader.getController();
stage.hide();
Thread.sleep(100);
ctrl.sta... | 1 |
25a7ed3b50a7d0eb6e571ea523b7b4c8 | f26e098b35498b0c9ed09d63c9614676 | переход на строку с указанным индексом | {
if (CurrentTextData == null) return;
SC2_GameTranslater_GoToIndex dialog = new SC2_GameTranslater_GoToIndex(CurrentTextData.Rows.Count);
if (!dialog.ShowDialog() == true) return;
string id = Data_GameText.FindIDByDataIndex(CurrentTextData, dialog.GoToIndex);
... | 1 |
e57e2fe5dba95be688f8a2ced51587a3 | 48bbd6658aff4ad2a5b1a6c7dd3bf76c | Sort a list of points by x then y value | def sort_points(pts):
if pts is None:
return None
pts_x = []
for pt in pts:
pts_x.append(pt[0])
ret = []
for i in range(len(pts)):
idx = pts_x.index(min(pts_x))
ret.append(pts[idx])
pts_x.pop(idx)
pts.pop(idx)
return ret | 0 |
01371b071bb3d7ef63423a736bc4048e | 7692521ad9d040dc85d82e981aa605ce | This API (DetachInstances) is used to remove CVM instances from an auto scaling group. Instances removed via this API will not be terminated. | export class DetachInstancesCommand extends $Command<
DetachInstancesCommandInput,
DetachInstancesCommandOutput,
AutoScalingClientResolvedConfig
>
constructor(readonly input: DetachInstancesCommandInput) {
super();
} | 1 |
93f7ca28fdd32013ee9c8165016b5d03 | 3c0a939ffc1b278cc49b49940965181e | Gets nearby building parcels | coroutineScope.launch {
_status.value = ApiStatus.LOADING
try {
partyRepository.getPartiesNearYou(
usr!!.maxDistance,
usr!!.latitude!!,
usr!!.longitude!!,
usr!!.id
)
... | 0 |
6a43e581fac559bc5accb82fdcf8aeea | 8d3896c8eb5e81560ce11dae839ecb20 | 模擬查詢超商條碼的資料到payment center | {
try
{
var primaryAccountNumber = "0000000000000000001";
var processingCode = "220000";
var amount = "000000000100";
var transmissionDateTime = DateTime.Now.ToString("MMddHHmmss");
var timeLocalTransacti... | 0 |
467a6959a7c49b5e2bc43c46ba1435d8 | b71849f33611c3efdafb87d594b222e5 | 设置扫描状态:0-待扫描(无任何扫描结果);1-扫描中(正在进行扫描);2-已扫描(有扫描结果且不正在扫描);3-扫描完成待同步结果。 | public class ScanView extends View
public void setState(int state) {
this.curState = state;
} | 1 |
713555fc05635fe9b496d8b5a5119f15 | e2851f34029e912a2da573a6ea169da4 | !查询节点的组ID2 | {
var newGroupList = new List<long>();
groupList.EachNode(item =>
{
newGroupList.AddRange(
TreeComponentHelper.ConvertToList<Group>(this.GetGroupAndLowerByTreeParentIndex(item.TreeIndex))
.Select(p => p.Id));
... | 1 |
4eae91d3bf2ba47906590a74f7eaa0e6 | 17fb3fcaa06bdd5c3d6d171a98e02c99 | 读取二进制,以其他进制显示 | print(format(12, "b"))
print(format(12, "o"))
print(format(12, "x"))
a = bin(12)
b = 0b1010
print(a, b)
a = oct(12)
b = 0o1010
print(a, b)
a = hex(12)
b = 0x1010
print(a, b)
print(int("10110", 2))
print(int("17", 8))
print(int("4d2", 16)) | 1 |
741e1c2f572079dbec1f6186271e9310 | 9ae89416833c932f22d4d1e18f20ad63 | 获取包含该点的最小子树 | Node center, int cost, Dictionary<Node, int> nodesMap)
{
Init(nodesMap);
canGetMinNodelist.Add(center);
reachCostLeave[center] = cost;
while (canGetMinNodelist.Count > 0)
{
Node cur = canGetMinNodelist.First();
... | 1 |
b0648f8289fc9dd350d2668ff42a31f7 | b8282bc8064cd84f27d5ca142446f3f8 | Reset the status bar to display further messages | public class BTSInternalFrame extends JInternalFrame
public void clearMessage()
{
((BTSStatusBar) getStatusBar()).setLeftMessage(" ");
} | 1 |
23537daff6ee5d2986e96956dc31af9d | dbceda1486d1cb0e1d2c11bb0c4b1fb1 | 将一个单元格的值赋给另一个单元格 | int decColIndex) throws RowsExceededException, WriteException {
WritableCell srcCell = src.getWritableCell(columnIndex, rowIndex);
WritableCell newCell = srcCell.copyTo(decColIndex, decRowIndex);
desc.addCell(newCell);
} | 1 |
2acee42e50bbc8d3a8867101a2c13e75 | 1fd6f8ece7d1959bb6be21aa123a8ad6 | 具体请求网络的操作由子Fragment实现 | public abstract class BaseFragment extends Fragment implements BaseHttpManager.IRequestListener
public void sendRequest(int tag) {
} | 1 |
47530b3f1530d646f9d29c0c0c238f1d | 535952041e34fc522b7ee67aea2ec626 | Trains the irises model and returns the evaluation statistics. | if not os.path.exists(self.config.model_save_path):
os.makedirs(self.config.model_save_path, exist_ok=True)
self.office = Office(train_corpus=self.train_data,
dev_corpus=self.dev_data,
tet_corpus=self.tet_data,
... | 1 |
9d05a056730d859228175d7ada494916 | c1c82b6fae0c4eb4af6821310954e247 | Reads the default TypeScript configuration. | if (!fileName) {
fileName = path.resolve(__dirname, 'conf', 'tsconfig.ngc.json');
}
return ng.readConfiguration(fileName);
} | 1 |
c35545c9295a05797eff903bb67ca7cd | 5b964a3535186c769f89bbae1aae1781 | Returns a view with all the supporters | class SupportersController extends Controller
public function create()
{
return view('dashboard.supporter.create');
} | 0 |
519f744ad90150026e8175d5d0970c02 | c8b1477f291f0481f5e464a02fa27826 | 通过门店获取分组 | public class CustomerEditDialog extends CommonDialog
private void getShopGroup() {
Map<String, String> params = new HashMap<>();
params.put("shopId", ParamHelper.noNullWrap(mShopId));
mDisposables.add(MyHttpClient.get(CustomerUrlPath.URL_GET_SHOP_GROUP, params, new RequestCallBack<List<ShopGroup... | 1 |
afcc1c900cbf2dea156cb01b7f391110 | 66170f9f6aad5d7ca0e02a8396cb5016 | Gets all the valid descriptors for the ScoreModel (i.e. name, shortName
or cvAccession, some additional names) | public class PeptideOccurrence implements Occurrence<ExtendedIdentifiedPeptide>, PeptideContainer
@Override
public Set<String> getScoreNames() {
Set<String> ret = new THashSet<String>();
if (peptideList != null) {
for (ExtendedIdentifiedPeptide peptide : peptideList) {
List<String> scoreNames = peptide.getS... | 0 |
c3d7301bd1387a7591d74b8700e0ee7c | 9982efcc0b9b2b2c2d937a727b1ff201 | Clears refinement modifications. | final class PropertyValueEditor
public void resetModifications()
{
mods.clear();
} | 1 |
d9fa6a39178593fa5dbf8db528373fd8 | fa45ed10e34ab90b763dd988d47f0df0 | 初始化ViewPagaer数据 | viewList = new ArrayList<View>();
LayoutInflater layoutInflater = getLayoutInflater().from(this);
view1 = layoutInflater.inflate(R.layout.viewpager_capital_interest, null);
view2 = layoutInflater.inflate(R.layout.viewpager_capital, null);
viewList.add(view1);
viewList.add... | 1 |
53b13d10e8bc7d34915a958c5b81508e | eb62ba75075f79c3fc15e32bd1ae182b | fonction pour récupérer tous les billets
get all bills | $ind = 0;
$bdd = $this->dbConnect();
$chaineReq = "SELECT BIL_ID, UTI_ID, BIL_TITRE, BIL_DAT_CRE, BIL_DAT_MOD, BIL_TXT, BIL_DAT_VISU, BIL_EST_PAGE,BIL_IMG FROM billet B WHERE BIL_EST_PAGE = '0' AND BIL_DAT_VISU < CURRENT_TIMESTAMP ORDER BY BIL_CHAP ASC LIMIT 0,10";
$requete = $bdd->prepare($ch... | 0 |
90ecb32fc54aa4b59ae5c5b64ff3b0ea | 7e9bbb37fc6f395b82596cde3e767fba | Test that list properties that are currently not implemented
give a sensible response. | a = ts.TimeArray(list(range(10)))
with pytest.raises(NotImplementedError) as e_info:
a.var()
with pytest.raises(NotImplementedError) as e_info:
a.prod() | 1 |
214063a3bbc2b5f555c2f2c068c13839 | 396a9118f051ca8aee5e8c7c84da656b | Returns the number of active (open) connections of this pool. This is the number of <code>Connection</code> objects that have been
issued by getConnection() for which <code>Connection.close()</code> has not yet been called. | public int getConnectionsInPool(); | 1 |
c7862b43fd7451070f1912aeeaf2eba2 | e968981f27c16260f0355b277947864c | 检查图片的宽度 | $size = getimagesize($sourcePic);
if(!$size) return false;
$full_width = $size[0];
return $full_width;
} | 1 |
f367746ea8f6efbcfc35822db36e86f5 | 9a3c4f38067363f4a10a0f90f7af41f1 | Closes the How to Play window and returns to the main page. | public class HowToPlayButton implements ActionListener
@Override
public void actionPerformed(ActionEvent e) {
new MenuGui(new HowToPlay());
frame.dispose();
clip.getMusicMenu().stop();
} | 0 |
e7c906754f33ad1f8b40f4bb5e991d85 | 90ed0ed0603e77acb397a999f6bf5626 | truncate middle | def trunc_str(str)
return str if str.length < 124
str = str[0..123].
split(/\b/)[0..-2].
join('').
rstrip
end | 0 |
38c3f4f2bfa64f3b2c3d3a1886836435 | 5316d5006cf3e894c4f2b6c570801358 | 视频拍摄方法 | public class CameraUtil
public static void startVideoTape(Activity activity) {
Intent intentvideo = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
ContentValues contentValues = new ContentValues(1);
contentValues.put(MediaStore.Images.Media.DATA, "/sdcard/video.mp4");
Uri uri = activity.ge... | 1 |
b6e0a668d07eff4a777edf77607e1605 | ed3ca49fb8ee04cf00a8542363f2a044 | 关联Profile和子Profiles,用于新增Profile的时候调用. | ProfileDefinitionPathExample example = new ProfileDefinitionPathExample();
ProfileDefinitionPathExample.Criteria criteria = example.createCriteria();
criteria.andAncestorEqualTo(parentPdp.getId());
List<ProfileDefinitionPath> pdpList = profileDefinitionPathMapper.selectByExample(example);
if (Object... | 1 |
d7f6efe6c76e46189e589670164dd22c | b1447b4ced6980071f49b420693af463 | Character coding scheme (09). | class Utf8 implements EncodingInterface
public function getCode(): string
{
return "\x03";
} | 0 |
fa932c101422c47622f31ca5883b341d | 80ab60f5369298292499443417b77998 | Test that removing a string removes it from the trie. | from .trie import Trie
t = Trie()
t.insert('aa')
with pytest.raises(KeyError):
list(t.traverse('b')) | 0 |
a7b6a856c796297372517ac5ebea269c | 96f34b8b1fcae02660978f68e533ac5b | Read raw magnetometer data into a provided buffer | {
ism303dac_axis3bit16_t data_raw;
if (ism303dac_magnetic_raw_get(&(pObj->Ctx), data_raw.i16bit) != ISM303DAC_OK)
{
return ISM303DAC_ERROR;
}
Value->x = data_raw.i16bit[0];
Value->y = data_raw.i16bit[1];
Value->z = data_raw.i16bit[2];
return ISM303DAC_OK;
} | 1 |
26a7aa0b7ce0da7b992290a614fd46e2 | 9ff6c2e4a070b78ea2c97baf5b6e7e41 | 判断context是否已被销毁 | abstract class BaseActivity : AppCompatActivity(), AnkoLogger
fun isValidContext(context: Context?): Boolean {
if (context == null) {
return false
}
if (context is Activity) {
val activity = context as Activity?
val isDestroyed = Build.... | 1 |
0356f27f546a10fb866f8c91ec04b574 | 1c11c0eac492bb8d16cbba09b0ec34d9 | A normalization tool for ensuring that '0' occurs in the
middle of a colorbar. | x = np.asanyarray(x)
m, M = from_ if from_ is not None \
else [np.nanmin(x), np.nanmax(x)]
if m == M:
return np.ones_like(x) * np.mean( to )
return (x - m) * (to[1] - to[0]) \
/ (M - m) + to[0] | 0 |
bd475743ead1518fe34a37c283f1389d | afd040ddeee97d258db59480a6389563 | 删除LayerListDataTable行 | namespace GSYGeo
public partial class BoreholeControl : UserControl
private void DeleteRowLayerListDataTable(int _rowIndex)
{
dtLayer.Rows.RemoveAt(_rowIndex);
} | 1 |
8ae159ea988a5c757071b366057f2a55 | 1d1d2b76c11ad63f198f833f52190f29 | 품목코드 찾기(저울스캔시) | public String selectColitem_Code(String Colitem_id) throws Exception; | 1 |
7b8e3b800cfabf9997b32cdb4a4d7288 | 50e79820f12bc5dc92a4bdbf2614f83f | inicializo el estado de teclas | fila = 1;
timer_id = TIMER_getTimer();
PORTBbits.RB6 = 1;
PORTBbits.RB7 = 0;
PORTBbits.RB8 = 0;
PORTBbits.RB9 = 0;
TIMER_resetTics(timer_id);
state = 0;
tecla = 0;
} | 1 |
e293e05ee4443003b54022158da69756 | df236b1f03252e9ed1630db72ed590dc | Restart GMMQ service | void MESNetPrivate::_q_restart()
{
start();
} | 0 |
68c519372380b15def535a451151b9e9 | eca62c42afd1f841ff4b814ba3b82397 | updates the existing answer from the collection of answers | class DBHelper(object):
def update_answer(self, answer):
self.answers.update({"answer_id": answer['answer_id']},
{"$set": {"content": answer['content'], "excerpt": answer['excerpt'],
"len": answer['len']}}) | 1 |
260a59b77931d10eb276fe1a92c97de7 | 836927377635b096456ee8da2e888e55 | 屈折テーブル作成関数 | void make_table(uchar *table)
{
register uchar a, *tab=table, fac;
fac=(uchar)((int)((int)256/(int)atoi(otree[SLIDE].ob_spec.tedinfo->te_ptext)));
a=255;
do
{
tab[a]=(a/fac)*fac;
--a;
}while(a < 255);
} | 1 |
4f6e502b22b4603832980119ecbd90f3 | 6927ee2d3966e1c55497f832eb9d9826 | @brief Remove given file entry from seeded file list | std::string file_name)
{
TCP_Client index_client = TCP_Client();
auto it = file_entry_table.find(file_name);
if (it == file_entry_table.end())
{
index_client.connect_to_server(leecher_ip, leecher_portno);
ErrFileNotFoundMsg *m = create_... | 0 |
7202b5efa010bc0b13676288e8d96a27 | 3f872fdb41721c2bf1f13d795b16b1ac | Checks if the portlet (marked module) should be displayed for the logged member | class DropperDimmer extends BaseDimmer
public function shouldBeDisplayed()
{
return app('VoyagerAuth')->user()->can('browse', Voyager::model('User'));
} | 1 |
dff17cf98f3cb268e1e370eb0d35d6a2 | 76f14c8bc443863313d4226759a9361f | a decorator for executing a function in a loop at
a specified frequency | def set_interval(interval):
def decorator(function):
def wrapper(*args, **kwargs):
stopped = threading.Event()
def loop():
while not stopped.wait(interval):
function(*args, **kwargs)
t = threading.Thread(target=loop)
t.daemon = True
... | 1 |
3a26403d503ca42bfb8dbdad6d7408ef | f251ce38ccae6cd7a4113fb2f89b2e3c | sadece belirli bir operator icin kısıtı sağlayan veya kısıt içermeyen
tarifeleri getir. sadece kullanıcının aylık harcamasından düşük olan
tarifeleri getir. tarifelerin sabit ücretine göre sıralı şekilde | DateTime raRecCreatedDate)
{
return
DbSet.Include(ir => ir.InsuranceRtMain).Where(ir => ir.UserDomainKey == UserDomainKey && !ir.IsDeleted && ir.HireGroupDetailId == hireGroupDetailId &&
ir.StartDt <= raRecCreatedDate && ir.InsuranceTypeId == insur... | 0 |
69d4305ca2a138f015766fbee00d6766 | e062311b38b353bb8b939f0231c6990f | disable aid detect poll mode | class Dot11ControlFramePSPoll(ProtocolPacket):
def set_aid(self, value):
nb = value & 0xFFFF
self.header.set_word(0, nb, "<") | 0 |
bb4a917467509262193c119cfbc39e21 | cf0eb410e8843418645b4b1a4f944fcf | This test creates a folder structure that the logger doesn't have
permission to create things in. | {
try
{
File dir = new File("tests");
if (dir.exists() && dir.isDirectory())
{
delete(dir);
}
dir.mkdir();
dir = new File("tests" + File.separator + "folder1");
dir.mkdir();
dir = new File... | 0 |
69ef8c7e3ad60ab2453f0c39eb788b18 | 255d9dd240974da18d67065318952d26 | Рассчет количства рейсов для второй машины | {
EFRailWay ef_rw = new EFRailWay();
RWReference rw_ref = new RWReference(true);
Stations station = rw_ref.GetStationsUZ(code_station_uz, true);
Ways way_from = ef_rw.GetWaysOfArrivalUZ(station.id);
Ways way_on = ef_rw.GetWaysOfSendingUZ(station.id);
... | 0 |
b7815d7cb4796729985bae960627a806 | c792ba83ced7493dd051cee7972daf13 | The game serialized into the round, hunter state, prey state, and the walls
Note, the presence of "YOURTURN" at the start implies that the server only sends state when it is a player's turn to act | class JsonSerializer(object):
def serialize_game_corp(self):
game = self.game
if game.run and game.run.server == game.corp.rnd:
run_hidden = True
else:
run_hidden = False
top_level = {
'choice_count': game.choice_count,
'corp_turn_count': game.corp_turn_count,
'runner... | 0 |
667e0938542ec26c057224ec06c33e1a | d4d335b4292f988ce561297a0572fd41 | Gets the string format used for drawing or measuring text. | public String getFormatString()
{
return formatString;
} | 1 |
7fcdf31f02a79936dbf096a915123c07 | d4686db3f290c33570f659d3017cbd3a | Stop serving from indicated thread. waits for thread to stop | class Main(Temp_box_gui, ModBus):
def stop_thread(self, thread):
try:
self._async_raise(thread.ident, SystemExit)
except Exception as e:
print("NOTE: stop thread raise a Exception: " + e) | 0 |
3ff6dfc6bcc6eff03d8bfe28756fb67a | 3789669bdfcccf15a57ac9436e606b50 | Cerrar una ventana con el comando Alt+F4 | public class Util
public static void cerrarVentana(Moveable parent) throws InvalidInputException{
showMessage(parent, "Cerrar "+APP_TITULO, "Desea realmente cerrar?", "Si", "No");
} | 0 |
aec52b6a87fde7b3bc12ffb60f61fb9d | de6778183548d3e9796beb250b90a8f5 | Build the form for after bac inputs | class ZemogaHasp2 extends ZemogaHaspe
public function buildForm(array $form, FormStateInterface $form_state) {
$form = parent::buildForm($form, $form_state);
$form['city'] = array(
'#type' => 'textfield',
'#title' => $this->t('Your city'),
'#default_value' => $this->store->get('city') ? $this-... | 1 |
f8463e1ad40d56eef586dfad2c1aa284 | 1f35a06d270d71b0f42dc31aaf35b5e2 | モーションとラベルをXMLから読み込み | namespace MikuMikuDance.Core.Motion
MMDMotion Load(string filename, float scale); | 0 |
e7b3a8444de8fc2324447ec82903755e | 9dd8e087680907b52cc84e86f58cf3b1 | 在进入HTTP响应处理方法之前被调用,可以重写该方法来预先设置默认的headers | namespace Tornado.web
public class RequestHandler
public virtual void set_default_headers()
{
return;
} | 1 |
2c49b993d376dbd60ccce963a1a424b8 | 478ed7df8900ff8ec2f17172d1da6902 | Return completion list for object named *name*
IPython only | if state == 0:
import readline
origline = readline.get_line_buffer()
line = origline.lstrip()
stripped = len(origline) - len(line)
begidx = readline.get_begidx() - stripped
endidx = readline.get_endidx() - stripped
if begidx > 0... | 0 |
439496a3a9e7748ddd6e290b3b824af1 | 8eabb5d41d2f39a0b2bd24199e99531f | Finds all the sessions with products purchased. | List<CartItem> findAllProducts(); | 0 |
31b15aea5c4ef6f6b308c26f70f3b4ed | 50edef5c67c1429f7bf806131db0172b | Return clauses as a list of tuples of ints. | public IBooleanClause[] getClauses(); | 0 |
7ca04041e3fc4a538f20fcebd0fee59e | 0db45cb986f92e0dc0f192e05a063892 | Retrieves a configuration value. Can process dotted (option.suboption) options. | class PyValIRCProtocol(irc.IRCClient):
def get_config(self, option, default=None):
if not option:
return default
if option.startswith('--'):
argopt = option
option = option.strip('-')
else:
argopt = '--{}'.format(option)
val = self.get_argd... | 0 |
0bdfd2da9b70a6e709f2125f79d6621d | 9cfcee29e0573c6430a38506972274ba | Clears the duration value terms.
*compliance: mandatory -- This method must be implemented.* | class OsidEnablerQuery:
def clear_schedule_id_terms(self):
pass | 0 |
c7eafd82b24b8b9d084a8743bdb2798c | 098db75a46458988bfe9f4001629b9ee | Check to see if AllowInterrupt property is set | @objid ("323c7a48-3513-424f-8f04-f67ea5061287")
void setIsInterrupting(boolean value); | 0 |
0625102dfc32aa30c575cf4f4f4f8a7c | 7ec9ac1da5d2b9e70ebd04b959fb0bf5 | Generate a random vector and matrix, and compute the brute force product. | {
const int m = 8;
const int p = 8;
const int n = m;
std::vector<std::vector<int>> matrix_1(m);
std::vector<std::vector<int>> matrix_2(p);
for (int ii = 0; ii < m; ++ii)
{
matrix_1[ii].resize(p, 0);
for (int jj = 0; jj < p; ++jj)
{
matrix_1[ii][jj] = rand(... | 1 |
be22a1f5fa2e6ac48fb6557b0cb011b6 | a13efd30ca594a1c844a0b2a5faa0cbe | Don't do anything if DCache is already enabled | void rt_hw_cpu_dcache_enable()
{
dcache_enable();
} | 0 |
0517d0235d682a573c6a4d219a5f1c0f | 2fb377af6b730dda0f7a4e23991079d1 | Receives a callback when inbox controller updates/deletes/marks as read any {@link CTInboxMessage} object | function addReadReceiptReceivedListener (listener: (message: UniListenerResult<{message: Message}>) => void) {
RCIMClient.addEventListener('rcimlib-read-receipt-received', listener)
} | 0 |
516a315789e16968a10d8658a2b2fd0c | 1a4bbf6beb9766a0863e31d857a5ad2d | Gets a value from the context or parent context(s) using a specified key. Asserts if the key is not
found. | if (findLast) {
contexts = new ArrayList<>(contexts);
Collections.reverse(contexts);
}
for (Map<String, ? extends Object> map : contexts) {
if (map == null || map.isEmpty()) {
continue;
}
try {
return Obj... | 1 |
0f02a04ac5302b58f50656509f7580cb | 07a8bafb4f04e3539345d2a1177c304c | Set 输入的RTSP_PULL配置信息。 | {
JsonResponseModel<ModifyPullStreamConfigResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "ModifyPullStreamConfig");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<ModifyPullStreamConfigResponse>>(strResp);... | 1 |
68055ea4588f7e06796c3d99961c0442 | 1b74c9536c69c5cbd68b40e3ee04df39 | функция возвращает является ли клетка палубой | {
if (i * 5 + j == 5 || i * 5 + j == 7 || i * 5 + j == 15 || i * 5 + j == 30 || i * 5 + j == 32 || i * 5 + j == 40)
return 1;
else
return 0;
} | 1 |
040f49b9e9f680cb05a3f5e3bfb10217 | a4a1e5aa6b47ec6b456758d07bd46792 | Returns the meta object for the containment reference '{@link org.xtext.example.mydsl.esper.Timer#getDefaultMethod <em>Default Method</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getEmfTest_Mydefault(); | 0 |
f2c4b246d1e18e3e6785706fd641e11f | 9e4c5e521bc6950df8decd64cc4e59ce | 分页查询常量信息 | int CCMConstantltempage() throws SQLException; | 0 |
aa995cc6f2c8054f0958371170a3bb79 | 61f8fda56269a331dc7843d123dc78cb | 新增部门
<p>
这里需要返回新增的部门信息,构建成TreeVO用于前端渲染页面,直接concat到到部门树形上:listDepsTrees
<p>
同时初始化children为空数组,否则前端连续新增挂在到children时还需要判断是否为null | @RestController
@RequestMapping("/sys/basic/deps")
public class DepartmentController
@PostMapping
public ApiResponse<?> saveDep(@RequestBody DepartmentDO dep) {
boolean flag = service.saveDepByProcedure(dep);
TreeVO newNode = new TreeVO(dep.getInsertId(), dep.getName(), new ArrayList<>());
r... | 1 |
098bc9e9d349f53485b1e87373ce0baf | 1a44a12e59442563acadd916d184f0d2 | Sets the value of the '{@link architectural_metamodel.Binary#getTarget <em>Target</em>}' reference.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getBinaryExpression_Target(); | 0 |
c0d3f009344a6d3c4948f93849181a87 | cc12e8043c960ad4b5632a0ec792ef1e | add Bootstrap GroupAddOn to all inputs for easy reading | function rekord_wc_bootstrap_form_field_args($args, $key, $value)
{
$args['input_class'][] = 'form-control';
return $args;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.