query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
5b7a8e0e61aa1cea85413044108a8f8b | 9fcb4c42a83606497148f3240cfac55c | Write the buffer to the housekeeping queue. | static void commit_write_buffer(size_t size)
{
pcmbuf_bytes_waiting += size;
commit_if_needed(COMMIT_CHUNKS);
} | 0 |
a5abf351ae900985aaf2ea2974a11b74 | 2410806c9a8a040396a9d6637fa6d3fd | Do we have any support libraries to validate that an uploaded image is an image? | class Image
def backend_validate
end | 0 |
775f7b18d8972c9119e145c9dfc837af | 0fb0dd823713538e053e6f5842f5ed9d | 当前是否为群聊 | public class UltraConversationActivity extends RongBaseActivity
implements UnReadMessageManager.IUnReadMessageObserver
public boolean isGroupManager() {
return isGroupManager;
} | 0 |
4ece0a66b90862f6622d7ddda8ea373a | d0d996622b27d9403ddb45be18e75393 | envía el número de cuántas viviendas hay en venta sin búsqueda | public function BRConsultarVtTipovivienda(); | 0 |
bd5f04e801f9d78969cb492167d97ec8 | a79599b1cabbfca119aa37d91a6575a4 | 删除仪器结果命令 | if(!gCurItem){
jetsennet.alert("请选中一个设备");
return;
}
var comd = {"CtlCode":"00005","address":gCurItem.ADDRESS,"port":gCurItem.PORT};
var params = new HashMap();
params.put("para", JSON.stringify(comd));
ENGDAO.execute("executeCommand", params,
{success : function(resultVal) {
jetsennet.alert(resul... | 0 |
c16692283f84d1e8418bff8c55884b0d | 3cb3e975a6e35ef5a0b65eece1da599e | Initializes ACD on channel 0. | void audcal_initialize(void){
acph_init();
actp_diag_init(acph_execute_command);
} | 0 |
1647c6855f424cc98dcfb416ac6be223 | 0913fb9783f3720b77a3fb8f082c28f3 | Create the LAMP Declarations, should only be run one time | {
$createusers_q = 'CREATE TABLE IF NOT EXISTS Users (UserID PRIMARY KEY, UserName VARCHAR(150) NOT NULL, UserEmail VARCHAR(100), Password VARCHAR(150), ver_code VARCHAR(150), verified TINYINT)';
$_result = $db->query($createusers_q);
if ($_result == false)
print_debug("Creating users table:", $db->errorInfo(... | 0 |
820e5938a8fe390e211e333212b90b5b | 383d5a0a37c85835323557432637b177 | Gets the hover state. | public abstract class DrakonWidget extends Composite
public boolean getHover()
{
return hover;
} | 1 |
83e7dc56949ee23a554e7e511b4ca7e7 | c82a6029818705d2c38ba097f940f9ac | Mouseを離した座標を記録 | class PaintBoard(QWidget):
def mouseReleaseEvent(self, event):
pos_test = (-1, -1)
self.pos_xy.append(pos_test)
self.update() | 0 |
a8eef5b7e7863f4803d227c5f9329e44 | 93e6aebdd0f13424ee7d181f5e7298bf | Returns file type options | {
var fileTypesDictionary = new List<SelectListItem>();
fileTypesDictionary.Add(new SelectListItem() { Value = ((int)FileType.TEXT_FILE).ToString(), Text = "Text File" });
fileTypesDictionary.Add(new SelectListItem() { Value = ((int)FileType.XML_FILE).ToString(), Text = "XML ... | 1 |
ff41b136e2e99c37e9b9ba6aed46715a | c0d47d38c262dd1fcdd6a5c1eebc8d37 | 앱의 상태를 바꾸어 주고 화면에 렌더링을 시작함(하지 않는 경우도 있음) | state = arg;
while(app.stage.children[0]) app.stage.removeChildAt(0);
switch(state){
case State.HOME:
scene = new Home(app);
break;
case State.SNAKE:
scene = new Game_snake(app);
break;
case State.CHESS:
break;
case State.LEADER... | 1 |
dfe98426200bc20863b1965d1947915a | d0589a97e7455981cba3e60408d5f6dc | Test that setting an invalid enum string fails. | public class FuelTypeTests extends TestCase
public void testInvalidEnum () {
String example = "gASOLINE";
try {
FuelType temp = FuelType.valueForString(example);
assertNull("Result of valueForString should be null.", temp);
}
catch (IllegalArgumentException exception) {
fail("Invalid ... | 1 |
0b84b6cadeeda9c088c729e5c024d786 | 74a8e99a09a573a2b1e40c77c8c478ba | Gets query for [[Consignments]]. | $str_sql = $this->_em_read->createQueryBuilder()
->select("DISTINCT fa.voucherNumber, fa.pkId, warehouse.warehouseName,fa.referenceNumber, "
. "fa.expectedArrivalDate, fa.quantity, SUM(fa.receivedQuantity) as receivedQuantity, fa.status")
->from("PipelineC... | 1 |
ee707b3c9d561c432091034180b3acfe | 9887f5198068dfa44aae2b1e91d51972 | 逾期完成故事点数 | taskId = reqMsg.iValue
taskObj = checkTaskOP(who, taskId)
if not taskObj:
return
storyInfo = taskObj.fetch("storyInfo")
if not storyInfo:
return
taskObj.delete("storyInfo")
teamObj = who.inTeam()
if teamObj and teamObj.isLeader(who.id):
roleList = teamObj.getInTeamList()
else:
roleList = [who.id]
for ... | 0 |
57c4e697556a1fca78b7359db58da106 | cbca9368b6e78de26079f5f8aa94cbe6 | Genera un abecedario al azar. | def generar_dict():
dict = {chr(_): _ for _ in range(97, 123)}
print(dict) | 0 |
9a87ffa52ce61fc0422a56bfb071d55e | d7a26f6fb3f66ee7957655cea0aed424 | 判断传入的多个参数 如果有一个为null 则返回true
不为null返回false | public class Tools
public static boolean paramsHasNull(Object... objects) {
for (Object object : objects) {
if (object == null) {
return true;
}
}
return false;
} | 1 |
d296bce208624e28780242d8845c9176 | b6666116a529acb62f855edcf01d5aed | Проверить уникальность кода отдела. | public class DepartmentBo extends CommBo
public String chkStationCode(String allCode) {
String strRet = "";
try {
EncryptionDecryption des = new EncryptionDecryption();
String orgTypes = "";
ArrayList orgTypeList = (ArrayList)CommonSearch.SYS_CODE_MAP.get("ORGANIZATION_TYPE");
for (int i = 0; i < orgTyp... | 1 |
9c994d661db16ed7ed7f0cfb0b73b564 | 71b666e908c69ad830279fa0eb55c4d4 | Update the cutoff day for the current organization | month = Date.new(year, month)
today = Date.today
current_month = Date.new(today.year, today.month)
if month < current_month
false
elsif month == current_month
if today.day <= SystemSettings.cutoff_date
close_at(DateUtils.cutoff_date_of_month(month)).tap do
puts errors.f... | 0 |
ced3191a15e1d73e03edf5ae4deff82a | e7edd4e48afc8057da5c980eb5fe9ada | 查询两队交战记录 | {
string url = "http://op.juhe.cn/onebox/football/combat";
var parameters = new Dictionary<string, string>();
parameters.Add("hteam", HTeamName);
parameters.Add("vteam", VTeamName);
return SendResquestHelper.GetApiResult(appkey, url, parameters);
... | 1 |
ad9415e84c63d84fabb01a391f69565d | 51ae2eb40834a0a32b3fa3d6b1d307a7 | 列出學生沒選過的課程 | @Query("select sub from Subject sub where sub.id not in (select sub.id from Subject sub join sub.students stu where stu.id=:studentId)")
public List<Subject> findAllNotSelectedCourseByStudentId(Integer studentId); | 1 |
138d57bd5a0b5f2b3cf90ba4c9f75514 | 05aa3b005653988faabfc250730c0f55 | 회원 이메일로 이메일 찾기 메일 전송 | public String findEmail(Map<String, Object> map) throws Exception {
return findDAO.findEmail(map);
} | 0 |
a30fbb402aaa15b8747fe2368c21999c | 3c456c2e2a018ae74618f48a4db2dea2 | 更新一个BookListItem进数据库 | Integer[] checkedIds = getCheckedIds();
if (checkedIds.length <= 0) return;
RealmManager.getBookDao().updateOne(book);
showList();
} | 1 |
d82ebc4d88794a524951b0a799ba99a9 | 7f61448ad6da3ef0f9cb03f40c5be655 | e.g. 259b34c9-8752-4553-ab37-f85300daf8f2 | cases like (1) | 0 |
a64df531548bb0e84ab4802caf1ade15 | 8ca749252a7bfced99c59bb76a572b57 | Return whether the structure might have changed in model-tree visually. | public abstract boolean modifiesVisualNodes(); | 1 |
3669d548f2808517ce04f3ff0c2607b2 | 5eaf49969e3dfcbfafc95f520ee22baa | Check if feature toggle is active. | class FeatureManager
public function isEnabled(string $name): bool
{
if (Config::get('app.env') === 'testing') {
return $this->testingDefault();
}
$feature = $this->getFeature($name);
return $feature ? $feature->state : $this->default();
} | 1 |
4b2f580b456ed6f60e216b9878303367 | fcb70069d9af5945371add2317e13d38 | Prints the gallows image | function displayGallows(){
var ctx = c.getContext("2d");
ctx.clearRect(0,0,c.width,c.height);
var base = c.getContext("2d");
base.beginPath();
base.moveTo(10,290);
base.lineTo(110,290);
base.stroke();
base.closePath();
var support = c.getContext("2d");
support.beginPath();
su... | 1 |
1764f9d7795d3b77525c9e32fdddc036 | 0a4d385f2ac9b70628afe91704aea370 | 分词器、中文单独成词,英文单词、连续数字作为一个词 | words = list(jieba.cut(text))
words = self.delPunDigit(words)
words = self.delStopWord(words)
return words | 0 |
614b5aa2ca8e639886445a2273c3a45a | dc6740c84deeae0b952ce36d2369c578 | Helper to access protected class properties that need to be tested | namespace AssertNet.Core.Tests.Helpers
internal static class DummyClasses
internal class FatherClass
[SuppressMessage("Design", "CA1024", Justification = "Needed for testing.")]
public int GetPrivateValue()
=> privateValue; | 0 |
efee30f4683adc5b1d492a1125e5d531 | 4f33e739fd4f758d722f81a581aa757a | Gets the user's current try. | if ($result = Doctrine::getTable('PlayerMap')
->createQuery()
->select('SUM(overall_tries)')
->limit(1)
->fetchOne()) {
return number_format($result->SUM, 0, '', ',');
}
} | 0 |
5218d5565b8362b6a66c5931a26840ea | 1f26b42f2899660dde9ec27ce6e76815 | Recursively finds all modules located on a path | def find_modules(obj):
packages = pkgutil.walk_packages(obj.__path__, obj.__name__ + '.')
modules = [import_module(name) for _, name, _ in packages]
return [obj] + modules | 1 |
c587f045b4741546ab2fbfc331de0c53 | cd1ca642bf3840f115ef163b9ec34568 | eliminate small regions by merging | self.m.message('Merging small clustering', 'DEBUG')
n_elements = self.data.shape[0]
labels = np.reshape(labels, ( n_elements, 1))
dummy, labels = np.unique(
list(labels.flatten()), return_inverse=True)
small_pop_exist = True
time_smallpop_start = time.time()
... | 1 |
41010422b31ab0b55c84dd0b04cb8cb1 | ece396bd4d56b1bd60ddf5338c0dcd29 | Calculates the aggregated min relevance from
the relevances of single parts (title and description)
and their weightages
. | average_current = sum(current_average_rating)/len(current_average_rating)
average_total = sum(total_average_rating)/len(total_average_rating)
weight1 = float(average_current)/average_total
weight2 = float(average_total)/average_current
return min(weight1,weight2) | 0 |
42299134eb034afbdc5775bde6f5d085 | 30e4fba6bde918f0ed9029dea0d42506 | returns number of each label in dataset
'5': 25,
'11': 14, | def class_counts(data):
labels = data[:, -1]
counts = {}
for label in labels:
if label not in counts:
counts[label] = 0
counts[label] += 1
return counts | 1 |
9e132d7f71180baa4f92a4cac8a5c4fa | 2a5f196dadff3c3d94b6a0a6fbb08833 | Delete all credit cards. | public function deleteCard()
{
return (new StripeWrapper($this))->deleteCard();
} | 0 |
4f79621bda74678cfac8bd3fc4f3c592 | 9e9740f434ff8c2cbb21a2ca1df1c622 | analyze all positions of the specified samples, acquire for time specified by dwell time | user_name = "JH"
name = "BPIII_80strain"
rotations = [0, 15, 30]
hexa_poistions = {
0: dict(hexa_x=0.3, hexa_y=0.4, hexa_z=7),
15: dict(hexa_x=2.25, hexa_y=0.3, hexa_z=7),
30: dict(hexa_x=4.15, hexa_y=0.5, hexa_z=7),
}
energies = [2470, 2478]
waxs_arc = [0, 2]
det... | 1 |
267efb0f82a439d7c152f22791ae58ca | a7915154d7b6564acf6d99a72981ebd8 | Replies the key of the tag to be resolved by this resolution | class ArticleImageResolverCompilerPass extends AbstractTagCompilerPass
public function getTagName()
{
return 'elcodi.article_image_resolver';
} | 1 |
4727a8a8ce1f4730ab1c214874bb2326 | cbfed8c33bcb6e7116edacadfba7cdc8 | Checks if tile is a border | bool A1::atBorder( int x, int y ) {
return ( x == -1 || y == -1 || x == 16 || y == 16 );
} | 1 |
0e6db72dc17cf217396e5500f22e885e | f0864b44a286d999a054b5716f0c44d9 | テスト用の ContentDescriptionObject を生成します。 | function createTestDescription(description, args) {
return description + ' [' + args + ']';
} | 0 |
3c967cb49ef5b06c510973fd69901dab | e7c077d74206e264bf445686fc36d22f | Отключает путь, переводя его в завершенное состояние | {
movingStatus = MovingType.None;
time = 0.0f;
totalTime = 0.0f;
if (currentPosOnPath == endPosOnPath)
{
finished = true;
}
} | 1 |
0ce8411d52e5ffacc09bec62cb371b7a | 68a033fb45e0d93b25b93b2de942f147 | When a response is received from the far end, resolve the pending promise | var data, messagehandler
data = event.data
messagehandler = self._messagehandlers[ data.messageId ]
if( data.exception ) {
return messagehandler.reject( createExceptionFromMessage( self, data.exception ) )
}
messagehandler.resolve( data.result )
} | 1 |
9e60f85bd528cd4b88b3521ee2a9b211 | a6ba4f8b74373553bc2eaf37bf6dd00a | Return True if the value is a number. | class MatchParser():
def is_number(self, value):
return self.match('1', value) | 0 |
246a32ee0c02bb90cce566ce74eefddf | 30eefae36ede9887f77c716c857dac03 | 清理所有的星星 | public class MonHeChengUI : MonoBehaviour
public void ClearXX()
{
if(star_1 ==null || star_1.gameObject == null ) return ;
StarMove sm = star_1.gameObject.GetComponent<StarMove>();
sm.ClearS();
if(star_2 ==null || star_2.gameObject == null ) return ;
StarMove sm1= star_... | 1 |
2b66584b01052844b848411ca0675e36 | 6c2e76423b5a331f946d0a1b2236ff59 | Returns True for even plaintexts, False for odd ones. | if (self.nelectrons % 2) == 0:
return False
else:
return True | 0 |
2c8be7310d0ca8144945c1d18f39fc0b | e12e3118538316907d5b13003356cc0c | 测试WebClient下载文件 | {
System.Net.WebClient client = new System.Net.WebClient();
Console.Write("download uri: ");
var inputUri = Console.ReadLine();
var str2 = client.DownloadString(inputUri);
Console.WriteLine(string.Join(", ", client.ResponseHeaders.Keys.Cast<string>().T... | 1 |
199397218222c306b42332d2228cf60b | d115144f4489e9015328e717a7611af9 | Function that returns a fixed sized patch, centered around a coordinate,
from a given numpy array.
Note: The input coordinates should be a tuple in (y, x, z) format. | if type(size) == int:
size = (size, size, size)
patch = np.zeros((size[1], size[0], size[2]))
offset = (size[1]//2, size[0]//2, size[2]//2)
coordinates = np.array(list(coord))
img_shape = np.array(image.shape)
img_shape[[0,1,2]] = img_shape[[1,0,2]]
coordinates[[... | 1 |
30ece70847e5f0de739793a5862b41b0 | ac74aed9d1206bf26e23e345bd588c69 | Returns the object name for a {@link DistributedLockServiceMXBean} used to access a distributed
lock service.
lock service | ObjectName fetchDistributedLockServiceObjectName(String lockServiceName) throws Exception; | 1 |
ecf478ed817c5b4349fa368a41b8da7e | 79a1d15197ef5e850c3b6e0ee701a9d4 | App header. Contains the Logo and authenticaltion buttons | return (
<div className="Header">
<div className="logoContainer">
<img src="https://cdn.discordapp.com/attachments/507585455999418368/521387737161400342/Asset_2.png"/>
</div>
<div className="headerButtons">
<Profile/>
<Share... | 1 |
60c3b2547bdb0e3f39da70ff72c59446 | 6150f79bdb28f81842fc486b66af310b | Exécute le roque à la gauche du roi. | void white_right_castling(void){
piece[31].x_prev = piece[31].x;
piece[31].y_prev = piece[31].y;
piece[31].brow_prev = piece[31].y / 75;
piece[31].bcol_prev = piece[31].x / 75;
piece[31].x = (piece[31].bcol - 2) * 75;
piece[31].y = (piece[31].brow) * 75;
piece[31].brow = piece[31].y / 75;
... | 0 |
7478116e4ba5e0032739cd54d729df9f | a36d89622e09a02573dc5bb8a9943916 | 添加门槛条件表 | class LuckAddons extends SimpleAddons
public function condition() {
$conditionList = M('condition')->select();
$this->assign('conditionList', $conditionList);
$this->display('condition');
} | 0 |
ac7d03b539ccea5c7d0cea4d2f73dfaa | ef92a098b69fd3678848127161bd2d33 | Tests equality between two BuilderEntry instances. | statuses = set()
steps = set()
for aentry in [entry, other_entry]:
steps.add('na' if aentry.failed_step is None else aentry.failed_step)
statuses.add('failed' if aentry.status in ('error', 'canceled') else
aentry.status)
if entry.case_id != other_entry.case_id:
... | 1 |
7b4281adc042ed040a615c4ac2e7bde4 | 5f32512a3f6995b1649f70248ba8f533 | get microseconds relative to seconds since EPOCH | function mgGetMicrotime()
{
return microtime(true);
} | 1 |
21456da105f6c447e4212416c85de4ac | 09318f7f280fb4f9d076053226a9e54f | Calculates the average number of words on each document | public class MyModel extends Observable
public void fnGetAvgDocsLength()
{
double dFinal = 0;
for (MutablePair<double[], String> pair : this.indexer.getHashMapDocsGrade().values())
{
dFinal += pair.getLeft()[1];
}
dFinal = dFinal / 472525;
System.out.print... | 1 |
5171f470a9116cfc732630f96388afe9 | 2fcf75f7c4d8b7d227c200d6591e0b85 | Height of the steps between each pipe in the inlet channel. | class Nozzle(ControlVolume):
def A_s(self):
return self._A_s | 0 |
e4051fa8d33f1982cffc8cefa7051946 | 89b286b436b44673610c680fedcbab6d | Default method for initializing the kernel if another one wasn't provided via dependency injection | namespace Sarjee.SimpleRenamer.DependencyInjection
public class DependencyInjectionContext : IDependencyInjectionContext, IDisposable
public void Initialize()
{
_kernel = new StandardKernel();
_kernel.Load(Assembly.GetExecutingAssembly());
_kernel.Bind<IDependencyInjectio... | 1 |
83cf15c79f4c6090c7589b2c2bf8ffa6 | c90f5768aa27cbbd9a82a97e185c96d0 | \brief Begin describing an instance group, it's a collection of instances. | class InstanceGroupServiceServicer(object):
def Start(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!') | 0 |
422a3470a9d02a5a9879706b1eb4460c | e489b12423b620c016090a6dce5c3a68 | 设置Line行属性,绘制行号码 | namespace CourseManageUI
public partial class FrmAddCourse : Form
private void dgv_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
SolidBrush solidBrush = new SolidBrush(this.dgvCourseList.RowHeadersDefaultCellStyle.ForeColor);
int lineNo = e.RowIndex + 1;
... | 1 |
6d7501cb922684e4e32c779f769b34cc | 0e6bb9c8b7255950a2ff86158c9c66b0 | 前台晒单列表(移动端) | {
$user = new UserModel();
$comment = new CommentModel();
$camera = new ArticleModel();
$time_format = new TimeFormat();
$camera_user_id = $this->request->param('user_id');
if($camera_user_id){
$camera_list = $camera->field('id, user_id, title, is_praise, ... | 1 |
7620d4441b5ddb67957442e1ae998cb9 | 92c648f5932030d35345d9f92c0c40ce | 启用SQL缓存依赖 | @SuppressWarnings("unused")
@Controller(controllerKey = "/jf/platform/resources")
public class ResourcesController extends BaseController
public void refreshSqlCache(){
ToolSqlXml.init(false);
} | 0 |
9e9848c53f359b9acb53544d413cb2d3 | 6448e569fbed7e24d30a0e0806aee10c | 判断订单商品 单价X数量是否等于总价 | if(empty($ary)){
return false;
}
$ary_where = array();
$ary_where['m.m_id'] = $ary['m_id'];
$ary_where['fx_orders_items.o_id'] = $ary['o_id'];
$orders_items = D('OrdersItems')
->join('fx_member_payback as m on (fx_orders_items.pdt_id=m.pdt_id)')
... | 0 |
446a2f97e76e5f8f3f3cf31db5db6521 | bfa94e55c5ca5fcde0896121a269be81 | Select Last Opened Window. | class WebPage(ABC):
def switch_to_last_window(self):
self.driver.switch_to_window(-1) | 1 |
fdbfb2e1548156d39be737fc59ba6b15 | c8e169bbaf015347546b0e9e9b4b894c | Hämtar alla personuppgifter | $sql = "SELECT * FROM person";
$resultat = $this->db->query($sql);
if (!$resultat) {
echo "Et feil har intruffet " . $this->db->error . "</br>";
} else {
return $resultat;
}
} | 1 |
d53dbe32cb0827c755d5d6be3f212a87 | 4434d4c35a46e90c52518a073a1aaff8 | 批量插入工资输入项目数据 | void HardInput(FArray* payrolls)
{
if(!PreProcessPayrolls(payrolls))
{
return;
}
Payroll *newPayroll;
newPayroll = (Payroll *)malloc(sizeof(Payroll));
Payroll_Initialize(newPayroll,"CSU200501","张三",3000,900,5000,50,100,20,560,8900,525,8375);
FArray_Add(payrolls,newPayroll);
free(... | 1 |
29d53ee17b6877297a34cdfc6279ca1f | a9b76f6cab12e07cc55064b54d1ae03d | flashes target with OctoPi image of provided version using dd | class pc(ttbl.power.daemon_c,
ttbl.images.impl2_c,
ttbl.debug.impl_c):
def flash_kill(self, target, images, context, msg):
return | 0 |
9099aa7c215ef0b8eff8f8a539e8ae98 | 216e0a61b95ebdd9ca6c0cb4db586e9b | Navigates to create phone number. | namespace ASPForum.Controllers
[Authorize]
public class ManageController : Controller
public ActionResult AddPhoneNumber()
{
return View();
} | 1 |
dce0e366467897faa7e41119c5d87a7d | 60e3878a9304c8a26c80eb3bfe414422 | Check if readings have changed | bool hasReading() {
return lastReadingDatetime != 0;
} | 0 |
f7ef13aea63695dd6ebd9f5939f401bb | 87cda8ed0c42c0fc6669bfd0bbff40ab | Removes the cat element | class CatController extends Controller
public function destroy(Cat $cat)
{
$cat->delete();
return response()->json(null, 204);
} | 1 |
cc1be1d21850964d7c7a67eee52ab393 | fc9e0e4a2082592cc064ff7d85b2052d | 爆弾を投げるメソッド | public class Enemy : MonoBehaviour
private void Attack()
{
Instantiate(bullectPrefab, transform.position, Quaternion.Euler(transform.eulerAngles + bullectEulerAngles));
timeVal = 0;
} | 0 |
af28d587252f5bab336e8d17ce8c8a32 | c44cc63fe24d885ed71a8ac869d1ac08 | Turn error probability into Phred-scaled integer | def log10prob_to_phred(log10prob):
return -10 * log10prob | 1 |
cdb13ed6b9578cb07f9d254f5f04a041 | 21a25b9a93148859439edc9974a82e06 | Get the star right ascension (RA) and declination (Decl) in pixel.
Returns | class FixedPointingInfo:
def radec(self):
return self._fixed_icrs | 0 |
d68a80777caf7667cb5cf610e13f89b0 | fcdb26f145de5768d136827b15f37a53 | 根据流程实例ID删除流程分发实体 | public void deleteFrmProcessFormEntityByLogic(String id); | 1 |
d899621f63b0752185eb95b45e7676cd | 8f510418c502fd6912433008af4cf637 | überprüft die Existenz des Wortes | bool BinarySearchTree::exists(std::string word) const
{
return checkWord(root,word);
} | 1 |
766fa8f71b4a6bf7711d1c4be961709a | 3651be009fdb113e9c7188f3f08fb334 | @brief Set the low pass filter state | namespace UnrealEngine
public partial class UAudioComponent : USceneComponent
public void SetLowPassFilterEnabled(bool inLowPassFilterEnabled)
=> E_UAudioComponent_SetLowPassFilterEnabled(this, inLowPassFilterEnabled); | 1 |
cb9228facddf6eb2031cc5cdb7dedd0e | ca97f5b67a82d30d7cb140a52840fad1 | 通过区域ID获取区域视频数据 | if organize == nil {
return nil
}
places := placeByOrgainze(organize)
var placeids []string
for _, v := range places {
placeids = append(placeids, v.ID)
}
o := O
var maps []*models.Camera
_, err := o.QueryTable(new(models.Camera)).Filter("place_id__in", placeids).RelatedSel().All(&maps)
if err != nil {
... | 1 |
a2301f07dfbebe69c9fbb3151ec14bbc | f8fbc5ef9d347b03cf90d8bd1e7deee2 | Tests the full execution of the GMPE tables for valid data with
amplification | namespace tudat
namespace unit_tests
BOOST_AUTO_TEST_CASE( testFullPropagationMGAwithDSM )
{
int numberOfLegs = 5;
std::vector< transfer_trajectories::TransferLegType > legTypeVector;
legTypeVector.resize( numberOfLegs );
legTypeVector[ 0 ] = transfer_trajectories::mga1DsmVelocity_Departure;
legType... | 0 |
09e933a2c53e7fe8523bef6629032f18 | fb6ad9bc0bd1fa43ede21c9e45965778 | Returns true if this module is installed.
Uses cache where possible. | class ModuleRunner extends ContainerAware
public static function isModuleInstalled($name)
{
$object = self::getInstalledModulesNamesCached();
return in_array($name, $object);
} | 1 |
cb3e0bf14634f288cfbdc1bbfa5b70c7 | f8f254118ea5048e7b10abf1f2fd7e28 | changesetの終端かどうかを返却する. | public boolean atEnd(); | 1 |
fc34970b8ddbead706c58dbab26007c3 | 2eca2381c7526648e6c8ebc9c7826e93 | posts ordered reverse chronologically. newest at top of page | def post_list(request):
posts = Post.objects.order_by("published_date")[::-1]
return render(request, 'blog/post_list.html', {'posts': posts}) | 1 |
ebd0986aa171b9d759da0f7304e5a1ed | ba6d9ca2f35e3e2ce968b3e6a49ef4ec | P(A or B) = P(A) + P(B) - P(A and B) | def bayes_theorem(p_a, p_b, p_b_given_a):
p_a_given_b = p_b_given_a * p_a / p_b
return p_a_given_b | 0 |
b14ab790e6ad95d21dd19f0d6cc737b5 | 8581d926802e6a4893358a9e0ad7e825 | Threaded version of idft | static void *ifft(void *thread_arg) {
struct fftw_data *data;
data = (struct fftw_data *) thread_arg;
pthread_mutex_lock(&MUTEX);
fftw_plan p = fftw_plan_dft_c2r_1d(data->length, data->cpx, data->real, FFTW_ESTIMATE);
pthread_mutex_unlock(&MUTEX);
fftw_execute(p);
pthread_mutex_lock(&MUTEX);... | 1 |
1e2dc9c27086c1d05847b7b2198945b7 | 2ca382dbf491f3c59bd4e9a89fe17997 | Returns builder of ComDayCqDamPerformanceInternalAssetPerformanceDataHandlerImplInfo. | StatsInfo build(); | 0 |
9059ec3bddf88356ae2fd66afc3c6acc | 85d4a58e5e93bca5a0b8c220b8ced154 | 关闭标绘对话框 | function closeDrawing(){
drawingManager.close();
drawingButtonInit('shouxing');
curBtnType = 'shouxing';
} | 1 |
8e87d3d51301a4c395bf62b32ea69e54 | 7f61448ad6da3ef0f9cb03f40c5be655 | do nothing here, just for subclasses | cases like (1) | 0 |
755922e2e4658323562e44d3ee0f3fab | f06c096d4b48214128974ab36e6a375d | Copy s3boto.S3BotoStorage.url() implementation with flexibility.
response_headers is normally unsupported, but useful for creating URLs
that point to resources with peculiar configurations, i.e.,
'content-disposition': 'attachment'.
querystring_auth is normally configured on S3BotoStorage via the
environment, but defau... | headers_to_copy = ('Range', 'If-Match', 'If-None-Match',
'If-Modified-Since', 'If-Unmodified-Since')
headers = {header: req.headers[header]
for header in headers_to_copy
if header in req.headers}
headers['X-Trans-Id-Extra'] = req.e... | 0 |
bd5a965bf88b1c3a587abebd0212bf8b | afd64a05afd60c82303ae80dad4dcfda | APP异步回调验证支付结果(微信) | class SqbpayController extends Controller
public function actionWappayresult(){
$xml = $GLOBALS['HTTP_RAW_POST_DATA'];
$obj = json_decode($xml,true);
$sn = $obj['sn'];
$client_sn = $obj['client_sn'];
$client_tsn = $obj['client_tsn'];
$ctime = $obj['ctime'];
$status = $obj['status'];
$payway = $obj['payw... | 1 |
b528e9c3341ae2f0ea1cd89d5ec72560 | f83fc8a47247ef269983ce151d72f15a | Decorator that automatically transfers the user from HTTP sessions to
channel-based sessions, and returns the user as message.user as well.
Useful for things that consume e.g. websocket.connect | async def inner_handler(endpoint, request):
server = endpoint.server
user = await user_from_request(server, request)
if isinstance(user, web.Response):
return user
return await do(handler, endpoint, request, user)
inner_handler.__doc__ = handler.__doc__
return inn... | 1 |
ea3f51b97347c126e5097e33a2e99f69 | aa9f048bd373b64c0db82036f0489643 | @brief Launches a transaction (read/write) on SPI. | uint32_t size) {
if (!size)
return;
if (result && buffer) {
} else if (result) {
spi_read_blocking(SPI_PORT, 0, (uint8_t *) result, size);
} else if (buffer) {
spi_write_blocking(SPI_PORT, (uint8_t *) buffer, size);
}
} | 1 |
63fd8d9342e35ef4721e72b4fb430cf6 | b1227a0cf9c2bd9fe61b02a4be49e588 | Runs properties builders and collect the results into `values` dictionary. | class InstanceMethodRunner(ResultHandlerMixin):
def run(self, show_progress: bool) -> Dict[ValidatorInfo, SummaryEx]:
for valinfo in self.validator_infos:
FailingObject.all_objects.filter(
validator_id=valinfo.get_validator_id()
).update(is_valid=False)
progress =... | 0 |
05e6dae0c7c28c2dd0d3e5281b1383c2 | fa593b4e61a4a363517105d1039d8ab0 | Block sum over kxk pixels | def blocksum(m,k):
return add.reduceat(add.reduceat(m,arange(0,m.shape[0],k),axis=0),arange(0,m.shape[1],k),axis=1) | 1 |
3650fd1b604a0374125ee9122bae4230 | c65300d32ce5020df89af0647547a3fa | Updates the name and description of the endpoint identified by the given ID. | public class AzureOpcHistoryClientImpl extends ServiceClient implements AzureOpcHistoryClient
public ServiceFuture<Void> updateEndpointAsync(String endpointId, EndpointRegistrationUpdateApiModel request, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(updateEndpointWithServiceRe... | 1 |
89ac2b3a8dda8ec49ae222e73a36eb28 | 4bbc4d2869629a639b53a164831dc428 | ensures that the object assigned to the template on +key+ is equal to +expected+ object. | def have_key(*args, &block)
HaveKeyMatcher.new(args.pop, *args, &block).spec(self)
end | 0 |
59c051f09ca6b6a2e266383d94625f5e | 54decd63f4af7331ca71f18b6dec7a46 | 根据分类和店铺查所有商品ID | @Repository
public class GoodsRepository
public List<Integer> findGoodsIdByStatusAndCategory(int shopId, GoodsStatus status, int categoryId, Pagination page){
String sql = "SELECT id FROM goods where shop_id=? and status=? AND is_deleted=0 " + page.getOrderByLimitString();
Object[] args = new Object[]{shopId, statu... | 1 |
0d3cd8bf922aafac429897b5496da49f | 6e977cee0907064243e3d0dd25d9c1f5 | 从大到小,获取poker中牌面最大的num张牌 | var arr=$(pos).find(".poker")
var obj=[]
if(num==1){
$(arr).each(function(){
obj.unshift($(this))
})
}
return obj;
} | 0 |
fc9e9e5d38eb96dbf5858d68f527c608 | 7465c26b3c2efd7ed9efe79070e27a18 | Gets the admin home route. | {
if (! $request->expectsJson()) {
if ($this->is_admin_route) {
return route('admin.login.login');
}
return route('index');
}
} | 0 |
30498cf61cf4d77ffa66bc78490a6eab | 5a5093c30774f2f299b0f12e233eb111 | Check Europe hydrosheds DEM file exists, and zipfile deleted. | class TestDemo(TestCase):
def test0_check_HYDROSHEDS_DIR_env(self):
assert HYDROSHEDS_DIR.exists()
assert (HYDROSHEDS_DIR / 'as_dem_30s.bil').exists()
for level in range(1, 13):
assert (HYDROSHEDS_DIR / f'hybas_as_lev{level:02}_v1c.dbf').exists()
assert (HYDROSHEDS_DIR / ... | 0 |
6dc77851cf9ca8ef1c70a20da139d2a9 | 082724e308b33ed6bb9485e98ac1f697 | Устанавливает, следовать ли за перенаправлением
TRUE - следовать
FALSE - не следовать | class Curl
public function setFollowLocaltion($bool)
{
if (!$bool) {
$this->followlocation = false;
} else {
$this->followlocation = true;
}
return $this->followlocation;
} | 1 |
1848e91095ec25a2c5f591b6aa97c306 | a94e5663653b42ec006f86afb74776f8 | @brief Trigger a restart in the future. | fn await_restart_safe(&mut self) {} | 0 |
8a3a5bb0b11d3bacec7cbf740c77b962 | 7214a9dfeb086400635936fcd9d4f833 | Get the creator of oTrapObject, the creature that set the trap.
- oTrapObject: a placeable, door or trigger
* Returns OBJECT_INVALID if oTrapObject was created in the toolset. | namespace NWN public static partial class NWScript
public static NWCreature GetTrapCreator(NWStationary trapObject)
=> new NWCreature(Core.NWScript.GetTrapCreator(trapObject)); | 1 |
78a736845e9a511074fabd920b36f9e9 | 4f5e252d1e15ad0307fd02eb5d43806f | 显示对应的形状的边框 | if (mHalfCornerSize > 0) {
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setColor(mCornerColor);
mPaint.setStrokeWidth(mCornerSize);
if (mCornerDisplayType == 1) {
canvas.drawLine(mFramingRect.left - mHalfCornerSize, mFramingRect.top, mFramingRect.le... | 1 |
69d1b7b2dacac0417a8710f9093dc115 | 672a07f280b8c8c41a75f21550529901 | Get remaining carrying capacity. | class CharacterOnLootTile
inline int64
GetRemainingCapacity () const
{
if (carryCap == -1)
return -1;
if (carryCap < ch->loot.nAmount)
return 0;
return carryCap - ch->loot.nAmount;
} | 1 |
0e5ece25770d05b23841a8fc795bd2af | 6abb81d552dc73ad23e20a5688f1fbb4 | Morris后序遍历 (左 -> 右 -> 根) | function morrsPostorder(tree) {
if(!tree) {
return;
}
var c1 = tree, c2 = null;
while(c1) {
c2 = c1.left;
if(c2) {
while(c2.right && c2.right !== c1) {
c2 = c2.right;
}
if(!c2.right) {
c2.right = c1;
c1 = c1.left;
continue;
} else {
c2.right = null;
printEdge(c1.left);
}... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.