query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
6e754300ca1e03276fb4bd8a55532495 | dcc5e1b6fedbc9cfcd70657d5dddbc29 | Save plot class distribution found in a dataset | data = pd.read_table(pathlib.Path(outdir, "summary.txt"))
plot_data = data[data.columns[3]].tolist()
dtc = Counter(plot_data)
labels = [
f"{k1}: {v1}"
for k1, v1 in dtc.items()
if not k1.startswith("CONFLICT")
]
values = [x for k2, x in... | 1 |
10c41095cebebce66cda95839c5a587f | 7f9382cc9e58c99aed1c00cd5980ef21 | Test that the extracted loan_totals == loan_payments | namespace Elli.Api.Loans.Test
[TestFixture]
public class LoanContractApplicationsTests
[Test]
public void TotalMonthlyPaymentAmountTest()
{
} | 0 |
3b7532df9bb3d12fab00571bc202d6af | 42904139f565d5ea8933ca506a3a9498 | Base implementation for compactly supported radial basis functions. | {
RadialBasisFunctions.CheckArguments(value, origin, distance);
var dist = distance.Compute(origin, value);
return RadialBasisFunctions.Gaussian(dist);
} | 0 |
f02f862cda1c01fdbce561de58bed768 | d3691845754caea9b7f5e8519097689e | 响应菜单项,设置线宽 | {
if (num == 0)
{
f.Style.LineWidth = 6;
}
else if (num == 1)
{
f.Style.LineWidth = 5;
}
else if (num == 2)
{
f.Style.LineWidth = 4;
}
else
... | 1 |
a894d9b933daeaee64f5148d27d077a3 | e87e4a5248057b0647f9a52aa5cb9635 | Calculate radial diffusitivity (RD).
RD = (L2 + L3) / 2.
Outputs to the same directory as dtifit.
Inputs
======
dtifit_output_dir: output directory of FSLs dtifit | lines = open(in_file, 'r').readlines()
rows = [[float(x) for x in line.split()] for line in lines]
cols = np.array([list(col) for col in zip(*rows)])
rotations = np.transpose(np.abs(np.diff(cols[3:6, :])))
translations = np.transpose(np.abs(np.diff(cols[0:3, :])))
FD_power = np.sum(translations,... | 0 |
05b5876dee2ba890482e89bfb94fdcfd | 6a91cf509f33f041a1dbd71135241b8f | 加载领地函数 | function LoadChildArea()
{
$.getJSON(authorityHost+"VisualArea/AreaTree?Id=" + GetUrlParam("id"), function (data) {
for (var i = 0; i < data.length; i++) {
if (data[i].areaType == "1") {
var floorId = GetFloorId(data[i]);
DrawPolygon(floorId, data[i].outline);
... | 1 |
12617d5200383b80eb78575deddd9962 | a31c0fadf97bb0b530902dd6e83df024 | 当某一列宽度改变时记忆该列宽度 | {
var cTitle = DataTitles[columnRC].split("#");
var cWidth = parseInt(cTitle[1]) + parseInt(valWidth);
DataTitles[columnRC] = cTitle[0] + "#" + cWidth + "#" + cTitle[2] + "#" + cTitle[3];
for(i=0;i<DataTitles.length;i++){
var cTitle=DataTitles[i].split("#")
table_width+=parseInt(cTitle[1])
}
WriteTable();
ta... | 1 |
cc3e3438b2ffec69f0780d041a9363a6 | 6b1485403aaa37e31cacae0fbd264f27 | AnimatorOverrideController替换动画片段 实现控制器重用 | public class GeemiSupportActivity extends RxAppCompatActivity implements ISupportActivity, NetStateChangeObserver
@Override
public FragmentAnimator onCreateFragmentAnimator() {
return mDelegate.onCreateFragmentAnimator();
} | 0 |
767cc9c011069b38206c9d9400ea03df | 55879eacb2dcc4096aabc6ea5dbf5a41 | 获取收文登记表中所有收文文号 | namespace Archives.DataAccess.Input_CJ
class CJ_Doc
public int getDocZDJH(int DocID)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select 总登记号 from 城建文件");
strSql.Append(" where 文件ID = @文件ID");
SqlParameter[] parameter = {
ne... | 0 |
a862e2ad86b6518cd899a64388effb46 | a35a0a32708fa83b40f5d9ba60b733eb | A probability distribution estimated from counts in a datafile. | class Distribution(object) :
def from_text_file(fileName, **keywordArgs) :
textFile = open(abspath(expanduser(fileName)))
return Distribution(map(float, textFile.read().split()), **keywordArgs) | 0 |
8813fb3e117f9913fdf58a84b61e0833 | bf56399beff6f3e9bc3dc1cebebe29c3 | 查询借款最大额度 | switch ($count) {
case '0':
$maxloanmoney = getconfigs('INTEREST_OEN_HIGH');
break;
case '1':
$maxloanmoney = getconfigs('INTEREST_TWO_HIGH');
break;
case '2':
$maxloanmoney = getconfigs('INTEREST_THIRD_HIGH');
break;
case '3':
$maxloanmoney = getc... | 1 |
5409ff26df208622d0e7d87dd2d897c2 | 9c031ccc20c0714ed0372044540f051a | API Reference: https://developers.planet.com/docs/api/reference/#operation/ListAssetTypes | class AssetTypesController extends Controller
public function index($keyword = null)
{
$asset_types = AssetType::select('id', 'description','abbrev')
->where("description","LIKE",'%'.$keyword.'%')
->orderBy('description','asc')
->pagina... | 1 |
49adcea51c691b6d1acecdadd7e54849 | 1a8c3510698796617aea8ad527b7635c | returns the number of open parentheses that are in the echoed text field | char text[data.size() + 1];
data.copy(text, data.size() + 1);
text[data.size() + 1] = '\0';
int openPos = closePos;
int counter = 1;
while (counter > 0) {
char c = text[--openPos];
if (c == '(') {
counter--;
} else if (c == ')') {
counter++;
... | 0 |
96a61ade331949eb1450f01c07540748 | 53268859a60781840698e463a673d227 | Given two objects compute a list of differences.
Each diff dict has the following keys:
field - name of the field
new - the new value for the field
one - value of the field in obj1
two - value of the field in obj2
diff - none|one|two|new
list - true if field is a list of related objects | def diff(local, other):
def _recursive_diff(l, r, res, path='/'):
if type(l) != type(r):
res.append({
'replace': path,
'value': r,
'details': 'type',
'prev': l
})
return
delim = '/' if path != '/' else ''... | 0 |
2155a168a8f69188ced8cc54135243a8 | edbc1d54359885e29602532b65bfa352 | Go to selected directory | cwd = self.shell.get_cwd()
self.emit(SIGNAL('redirect_stdio(bool)'), False)
directory = getexistingdirectory(self, _("Select directory"), cwd)
if directory:
self.shell.set_cwd(directory)
self.emit(SIGNAL('redirect_stdio(bool)'), True) | 1 |
8bd6229a793cab2f592a5b8024690204 | 11699493a1be60b471739fa059878b7b | Gets the main form version. | namespace Touch.DummyPos
internal static class Program
public static FormMain FormMain()
{
return _formMain;
} | 0 |
f4d00ed868db235b208617caf7b5e1de | becf51969a0019e29b584398d24fdd58 | Converts the given time string to OAI-PMH's specified ISO 8601 format.
Used to convert the timestamps output from the Omeka database. | class Traptor(object):
def _tweet_time_to_iso(tweet_time):
return parser.parse(tweet_time).isoformat() | 1 |
5d4c1ba00cf8b58b8477a78d7b8d82f7 | eced49b47997f23a1e2696c6f009d19d | Test an instance of ReportApi | namespace IO.Swagger.Test
[TestFixture]
public class ReportApiTests
[Test]
public void InstanceTest()
{
} | 1 |
8742697002aaee595e09601540d4c872 | ede80a6caa5fe41006151bcacff13ad2 | 根据航空公司二字码获取航空公司名称 | $airline_name = '';
$airline_code_list = $this->CI->db_cache_api->get_airline_code_list();
if (isset($airline_code_list[$airline_code])) {
$airline_name = $airline_code_list[$airline_code];
}
return $airline_name;
} | 1 |
3ee8cfb7c9907fae95e44294f6ddf717 | 13847ef8c1813a021c95df29e1068d96 | Sets the TransY value. | public class ViewAnim implements XMLArchiver.Archivable
public ViewAnim setTransY(double aVal) { return setValue(View.TransY_Prop, aVal); } | 1 |
e026529d6846f48cf3eec482c40e0dca | 0cdfa0457f39adcdd49c80fdfbf5eb40 | @brief Добавить заголовок
Заголовок вставляется перед в начало существующих данных.
Если размер превышет максимальный, то будет выбрашено исключение
runtime_error | class Table
public function add_header($content = '')
{
$this->data[self::HEADER_INDEX][] = $content;
return $this;
} | 0 |
3f30d5e57a69c91531afca2b46982074 | 7fe0c8ab71e98aac04426c20f4a3b2a2 | 折叠默认组 | export default class ItemGroup
collapseGroup(id) {
const customGroup = this.getDeletageGroupByRect(id)
const { nodeGroup } = customGroup
const bbox = nodeGroup.getBBox()
const { rect: rectStyle, operatorBtn } = this.styles
const { width, height } = rectStyle.collapse
const rect = nodeGroup.getCh... | 1 |
d196a2987d396c2c0ed6c90fd6a1e0ad | b5ae7f7140f7083e032291ed279f3cc7 | 返回List键中值的个数 | @Component
public class RedisUtil
public Long getListSize(String key) {
return listOperations.size(key);
} | 1 |
5baf82b516f3c681799fbda163accb09 | 62fa6ff306257220785c20d3e584916e | Remove history fields that have been recently updated by HubSpot Webhook | {
var nonUpdatableFields = new List<int>();
nonUpdatableFields.Add((int)ContactFields.FirstNameField);
nonUpdatableFields.Add((int)ContactFields.LastNameField);
nonUpdatableFields.Add((int)ContactFields.CompanyNameField);
nonUpdatableFields.Add((int)Co... | 0 |
5c8cf18ea00ef29ce180216fdd7fe3bd | f1fee0ba75b5c444308d36a8d8c48610 | 測試返回時status不是0,有錯誤訊息 | class YingYuTest extends DurianTestCase
public function testPayReturnResultCodeNotEqualZeroZero()
{
$this->setExpectedException(
'BB\DurianBundle\Exception\PaymentConnectionException',
'支付平台連線異常',
180130
);
$this->verifyResult['resultCode'] = '99';
... | 1 |
669b09fd31d68b00415994bc61e3723c | f29695278d416f581efa305e8c645f96 | Retrieves the list of sailors based on parameters. | namespace CarnivalCorp.Gangway.DataAccess
public class PersonServiceRepository : BaseRepository
public async Task<Person> RetrievePersonsBySearchText(string shipId, string searchText, IList<PersonType> personTypes, SearchType searchType, string dob = null, string documentTypeId = null, int? pageNumber = null, int? ... | 1 |
12ffef4fc6f4f24bfdd5957dd482c321 | 3b63187c21bde635b282b6283619cc0a | Test reconnect on receive fails. | func TestForceReconnect(t *testing.T) {
unitTester := &unitTester{
doneChan: make(chan bool),
errToThrow: errors.New("intentional error to trigger reconnect"),
}
output := testLogOutput{t: t}
reconnectBackoffFn := func() backoff.BackOff {
reconnectBackoff := backoff.NewExponentialBackOff()
reconnectBackof... | 1 |
6e8a258e352145b82b2b21d5a3aaae1f | b066c430630498071c8bfbb10ea62ddf | Ensures that the numbers of individuals are equalised between the comparison and simulated datasets, and
modifies the relevant tables with the new data | ids_rebal = numpy.array(
numpy.unique(self.rebalancing_data['station_id']))
ids_stat = numpy.array(
numpy.unique(self.station_data['station_id']))
bad_ids = numpy.setxor1d(ids_rebal, ids_stat)
for bad_id in bad_ids:
for table in [self.rebalancing_data,... | 0 |
906433420a275d7b59a69922bf2ca964 | 55bed865d0ad3fe80696b678e104ddd0 | 处理release, 这里把根的对象传进来,避免循环依赖导致的死循环 | self:releaseLuaObject()
for _, child in pairs(self.mChildren) do
if child:getSelf() then
child:removeFromScene()
end
end
wls.SafeRemoveNode(self.ui_root)
end | 1 |
95155f8d6237be0965287501a606c99b | a01f913da6ee046eb6dd573ab779a2d0 | 两个DataFrame的笛卡尔积 | R_1 = Row(col1)
R_2 = Row(col2)
df_1 = spark.createDataFrame([R_1(i) for i in list1])
df_2 = spark.createDataFrame([R_2(i) for i in list2])
df_cross = df_1.crossJoin(df_2)
return df_cross | 1 |
e8bcc6cb972cf6f81738d13e1d7be69f | c5719731ea2f0d55fbc8cb57bde75bb1 | Função para seguir aruco | global xb, yb, obj_color, obj_found
xb = 0
yb = 0
bridge = CvBridge()
cv_image = bridge.imgmsg_to_cv2(message, "bgr8")
height, width, depth = cv_image.shape
hsv = cv2.cvtColor(cv_image, cv2.COLOR_BGR2HSV)
thresholded = 0
obj_color = 0
if obj_color == 0:
low_h = 60
... | 0 |
5df5e22ea3598d555ab6d91e48951e86 | b5ed34b44c0c3ace2adacbca423e479c | GetVMResourcegroup function returns resourcegroup to which the virtual machine belongs to | def getCurrentVNetsResourceGroup(self):
currentVNetRGName = self.current_vnet.id.split("/")[4]
resource_groups = self.resource_client.resource_groups.list()
for rg in resource_groups:
if currentVNetRGName == rg.name:
return rg | 0 |
b1e5965f521eaae2864a31bb006d1742 | 61e62426a311442899ba6d8d83a330e5 | ジョイントに仮想的なギャップの差込口をセットする。 | public class InterpolatorActor extends ActorContainer
public InterpolatorActor setGap(double gap) {
this.gap = gap;
return this;
} | 1 |
9c99722728a0715dcda1bd29a592c493 | 9aeb436a6779a50d35380aa185d3997d | 过滤借记卡账户类型 | public class CreditCardHomeFragment extends BussFragment implements View.OnClickListener
private void filterAccountType() {
ArrayList<String> accountTypeList = new ArrayList<String>();
accountTypeList.add(ApplicationConst.ACC_TYPE_ZHONGYIN);
accountTypeList.add(ApplicationConst.ACC_TYPE_GRE);
... | 0 |
4c03fa9d6d12e9f14ece2d7c1b98b95d | edea56dca6b9aeb06679d86dbdf6bdae | 添加通知查看记录 | class News_model extends MY_Model
public function add_look_log($map){
$db_model = array();
$db_model['tab'] = 'msg_look_log';
$db_model['type'] = '1';
return $this->M($db_model)->add($map);
} | 1 |
7821b389c7c7c4ee5c9868b2b323dc1f | 09e4a0dfb57b0d2defe669746dc81b36 | 根据车间主键获取工单号。 | {
using (CatalystEntities db = new CatalystEntities())
{
string wc = System.Web.Configuration.WebConfigurationManager.AppSettings["WorkCenter"].ToString();
var o = (from x in db.tPrimaryOrderTrackings
join y in db.tMachines on x.SF... | 1 |
1ca77fb63cd6c39dfa66cdeb8d516eb1 | cd0949a23e4fddc35c5428f82ca1826f | Scrolls down the terminal screen | void doScroll() {
for (unsigned int y = 1; y < VGA_HEIGHT; y ++) {
memcpy(terminal_buffer + getCharOffset(0, y - 1),
terminal_buffer + getCharOffset(0, y), VGA_WIDTH * 2);
}
for (unsigned int x = 0; x < VGA_WIDTH * 2; x++) {
unsigned int index = getCharOffset(x, VGA_HEIGHT - 1);
terminal_buffer[index] = mak... | 1 |
944b65a40f92fa6cf3f762971054e629 | 70b3ba364d8a97a3e10fc82a7edea787 | 获取政治事件分页列表信息 | const url = BaseUrl + EventInfoUrl.getEventInfoByPage;
return await axios.post(url, pageInfo);
} | 1 |
422a14b455001edd0006af848f792d28 | b6e0ffde7df511e84adfa94fde9e957e | 插入完成后添加对应题型题目 | function insert_question(type) {
var $count_question = $('#list_question').children().length;
var index = $count_question -1;
$.getJSON("/api/insert/question",
{type: type, index: index},
function (data) {
$('#list_question').append(data['html']);
}
);
} | 1 |
3f2e74d0f51c18e7cf3cbf27dfc7498b | cf73b72c6b7ddeb8b6ba3f4d43894b07 | 在点击聚合列表中的列表项的关闭按钮时,动态删除记录数组中的对应项 | export default class DG_Popup2
CloseIndex(nIndex) {
this.List[nIndex].remove();
this.List.splice(nIndex, 1);
} | 1 |
e92c8111898a933fd2ebbf78395d8e0e | 5822243c70ccbdc5b48bbaaad82bce38 | buildServerConfig 构建文件服务器配置 | http
.createServer(function (req, res) {
let filePath = sanitize('.' + req.url)
if (filePath == './') {
filePath = './index.html'
}
const extname = path.extname(filePath)
let contentType = 'text/html'
switch (extname) {
case '.js':
contentType = 'text... | 1 |
bf3c83e8db45961ea63531e58921d6f0 | 60ccc939fc276a51b5494a12ccf98da2 | returns the temperature of the Boltzmann Machine | public class BoltzmannDistribution
public double getTemperature(){
return this.temperature;
} | 1 |
0e2a0c92e2e0a53caaf285a676c1027d | 263346fe1a35a5a0014c1bf553805e57 | Show information box when a polygon is clicked | function displayBeach(mouseEvent) {
if (iw != null) {
iw.close();
}
var content = '<h3>' + mouseEvent.row['name'].value + '</h3>';
iw = new google.maps.InfoWindow({
content: content,
position: mouseEvent.position
});
} | 1 |
d2452c2849410c0571e87b0f30f195bd | 302dec9ecb8b1c0f183ca80d1f1f8633 | Event handler when the raw image is opened | using (ColorImageFrame imageFrame = e.OpenColorImageFrame()) {
if (ColorImageFrameReady != null) { ColorImageFrameReady(null, new IavaColorImageFrameReadyEventArgs((IavaColorImageFrame)imageFrame)); }
}
} | 1 |
8344104c0a692e7241d23cdfa6ec1920 | 579096045029e3eec2d736e28e304182 | Create an instance of {@link szsx.provplatwebservice.GetDoctorInfoResponse } | @XmlRegistry
public class ObjectFactory
public GetDoctorInfoResponse createGetDoctorInfoResponse() {
return new GetDoctorInfoResponse();
} | 1 |
44f074aa325dc51c37737f4c61250131 | f8c530bc00245b44451050e044371448 | 회원가입 완료 안내문 출력 | @Controller("mobileJoinMemberController")
public class JoinMemberController
@RequestMapping("/mobile/member/joinMemFinish")
public ModelAndView joinMemFinish (HttpServletRequest request, @RequestParams Map<String,Object> commandMap) throws Exception
{
ModelAndView mv = new ModelAndView();
if(commandMap.containsKe... | 0 |
df003630a91bea88b32503749d4c1163 | 1095253966301d17bd38decacb0d700e | The ARN of the ELB | class ServiceLoadBalancer(dict):
def elb_name(self) -> Optional[str]:
return pulumi.get(self, "elb_name") | 0 |
693357675541cca659d587f78dbf7ef8 | 4334c2e8b0d984b82a4e0c6027c8d943 | Shows Group tree. | {
$data = Folder::with('parent', 'childs', 'documents')->where('root', true)->where('group_id', Auth::user()->group_id)->first();
$folders = Folder::where('group_id', Auth::user()->group_id)->where('id', '!=', $data->id)->get();
$foldersArray = array();
foreach ($folders as $folder) {
$foldersArray[$f... | 1 |
e8986d4f2e274b51f97114ae929b4270 | 5bf7bbee15b0719bf6aa18ec0a68f7c0 | Gets the value of idMatch. | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MatchingInstructions_Block_t")
public class MatchingInstructionsBlockT
public BigInteger getID() {
return id;
} | 0 |
e679391e43d53b2c3f04ba26087618b6 | 8492fcfe4f4ebab05b127443885800f0 | ===========================================================================
DESCRIPTION
This function writes data to the specified connection.
DEPENDENCIES
None
RETURN VALUE
pdcomm_return_type
SIDE EFFECTS
None
=========================================================================== | {
ConnTableEntry *ConnInfo;
int Ret;
THREAD_INFO_T *thInfo;
ConnInfo = HConnToConnTableEntry(hConn);
if (ConnInfo == NULL)
{
logError("ISAPI exported function WriteClientExport got invalid hConn");
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
thInfo = ConnInfo->thInfo;
Ret = sen... | 1 |
db8f055d9386ee4743801a738a47ac90 | a7ae63ec261b83c266c52052d78913d5 | Gets the server that this process is running on. | {
var result = Async.GetServerInfo().ConfigureAwait(false).GetAwaiter().GetResult();
if (result.IsLeft)
{
throw result.Left;
}
return result.Right;
} | 0 |
cd643308a46449a0e5f9774391c4fc29 | 9c8472cfff5710282604f3e80b8ac951 | Udalost kliknuti na polozku Nabijecky a kabely v strip menu Zvolit kategorii
v sekci Zakaznik podsekci obchod:
Zobrazi jen produkty kategorie Nabijecky a kabely v produktovem nahledu | namespace WRPohodaAdapter
public partial class MainForm : Form
private void showUnpairedProductsToolStripMenuItem_Click(object sender, EventArgs e)
{
UnpairedProductsForm upf = new UnpairedProductsForm();
upf.ShowDialog();
} | 0 |
f5f91459296b3698d583560f7dbf00a0 | 34bcab2c912f984ce104a7ca96b0a335 | 监盘人确认时,判断还有库存没有确认的盘点单 | class StocksManager
public function finishConfirm($type='')
{
try
{
ShareMemory::setShareMemory('while',false);
$confirmerror = ShareMemory::getShareMemory('confirmerror');
$rtn = ($confirmerror)?$confirmerror:'' ;
$confirm = new ConfirmStationAction();
$result = $confirm->checkWhetherDuplic();
... | 0 |
f2616e246122ca7e40f615c14aa62077 | a9384140ed059a0ba6f721344ae09627 | Returns the population variance, or NaN if the input is empty. | namespace Microsoft.Spark.Sql
public static class Functions
public static Column VarPop(Column column)
{
return ApplyFunction("var_pop", column);
} | 1 |
ff1e38e7d52835538c33301db8d82a33 | 0a135bcf994a8d0863015689322bc77a | exits with the returnCode | public class JAliEnCOMMander extends Thread
public void setReturnCode(final int exitCode, final String errorMessage) {
if (out != null)
out.setReturnCode(exitCode, errorMessage);
} | 0 |
b17d61b0e625bbeea048e69e29e70a95 | db9946a8a63150a11c49563f4c67c25a | @brief Data Ready Flag Set Function | {
hts221_ctrl_reg3_t reg;
int32_t ret;
ret = hts221_read_reg(ctx, HTS221_CTRL_REG3, (uint8_t *) ®, 1);
if (ret == 0)
{
reg.drdy = val;
ret = hts221_write_reg(ctx, HTS221_CTRL_REG3, (uint8_t *) ®, 1);
}
return ret;
} | 1 |
3719382cb4c7ebe144f77b62846df1ad | 46fceb053f8277d2326eee2a9f0cf245 | Back to the previous level. | class Gui(MainMenu, GameScreen, LevelBuilder, LevelChooser):
def _to_next_level(self):
try:
super()._to_next_level()
except IndexError:
self.back_to_menu() | 0 |
f4abcf4212b103c8c20651ef9163210f | 90b67b343a454e637194adf1910b77ab | Get the collaboration project attached to a certain workspace | class OC_Collaboration_Project
public static function readProject($pid)
{
try
{
$sql = 'SELECT * FROM `*PREFIX*collaboration_project` WHERE `pid`=?';
$query = OCP\DB::prepare($sql);
$result = $query->execute(array($pid))->fetchAll();
return $result[0];
}
catch(\Exception $e)
{
OCP\Util::writeL... | 0 |
62be53704732c32343bbcb29d77d819e | ae0d427a1f966afedf675c011c85b933 | Gets a package search order. | class InstallationSearchOrder:
def get_agent_search_order(self):
return | 0 |
9f475f4683d5f93b1b36d7b99c9e1d56 | f90024baafb5c126f816dc58e5e414eb | Gets the array of character prefabs. | public class PlayerManager : MonoBehaviour
public string[] GetCharacterNames()
{
return characterOptions.Select(option => option.name).ToArray();
} | 0 |
5067739d005cf0e16ee900476e820b18 | 18a49fac5b671902c1c846172aaf3343 | Set the target position.
Notes:
Position can be either a single position, or a tuple/list
containing in the first position the position, and in the
second a dictionary with the following options:
- immediate (bool): If True, the axis will go to the
position immediately, otherwise it will push the position
to the buffer... | class UR5RobotInterface(RobotInterfaceBase):
def setPosition(self, q_in):
if not self._paused:
buf = self.IO_buffer
with buf.lock():
buf['control_mode'] = ur5_driver.SETPOINT_POSITION
buf['q_commanded'] = q_in | 1 |
6bf33de84abe6664131a4949769ce0cb | 79e07a924a86b2bc7e02504c090d71fe | Vrátí zda je nastaveno uložení hry | public class MainController
protected Boolean isSaved(){
return isSaved;
} | 1 |
f1ea66de8e68af434ecaaf9d664767b4 | e9f0320f834d638eb2da7dc5e72aad6d | 获取层级数组 | $arTop = $this->get_sub_level(0);
foreach($arTop as $keytop => $top){
$arDep = $this->get_sub_level($top['id']);
$arTop[$keytop]['child'] = $arDep;
}
return $arTop;
} | 1 |
79cf9a3eb9fe37596b9d1738a7a94cb1 | 89cb23e8fb81bb07171cc975c1353c29 | change a college name from the spinner to one that we can search the matches for
e.g formateCollegeName("Johnathan Edwards") ==> "johnathanedwards" | if org != "":
org = org.replace('Sch.', 'School')
org = org.replace('Dept.', 'Department')
org = org.replace('Coll.', 'College')
org = org.replace('Inst.', 'Institute')
org = org.replace('Univ.', 'University')
org = org.replace('Lab ', 'Laboratory ')
org = org... | 0 |
9cbff40f204884bd01e033a38e569e99 | a08081eec4da408c18bb42a2cd6ca35b | # initialise ProtoBuf when required | local proTab = {
"Cmd",
"nullcommand",
"logincommand",
"chatcommand",
"LogonUserCmd",
}
local fileUtils = cc.FileUtils:getInstance()
for k,v in pairs(proTab) do
local pbFilePath = "proto/" .. v .. ".pb"
... | 1 |
c5152c9233a83235c2419f677f530b16 | 6e977a9e76bbb1407c5ee20e73edbeb1 | 当改变查询条件必须调用此方法(翻页不算改变),方便追踪是否翻到了最后一页。 | if (pageIndex > 0) {
setPageIndex(pageIndex);
}
if (pagesize > 0) {
setPageSize(pagesize);
}
} | 0 |
47add5443e1d152df1af4f80aa418b70 | 2b38de56c2c020e2be1a2ba0e967c8d3 | 立方体持续绕X、Y轴旋转 | public static void Rotate_3DBox()
{
var acDoc = Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument;
var acCurDb = acDoc.Database;
using (var acTrans = acCurDb.TransactionManager.StartTransaction())
{
Blo... | 0 |
8b1418bb80c4cbd57349899173d70a4f | b01a456936c265207a297ffaf7d9d525 | redirect to the Contact view. | class ContactController extends Controller
public function indexAction()
{
return $this->redirectToRoute('contact_contact_contact', array());
} | 1 |
75b1f615a63fefd928086443c47e5da2 | 5e9f3643199518ab74572fe73abf5566 | Dynamic background image for hero based on props | if (this.state.singleManga.attributes.coverImage) {
let bg = {
backgroundImage: `url(${
this.state.singleManga.attributes.coverImage.original
})`
};
return <div id="cover-image" style={bg} />;
} else {
let bg = {
backgroundImage:
'url(https://r... | 1 |
7448b018c8f938f76e320fb59eb2882f | 80b36991f9ca729568b9ccfacc45e192 | Funzione che ritorna la lista completa dei dipendenti | namespace Avanade.AllocationMonitor.Core.BusinessLayers
public class MainBusinessLayer: BusinessLayerBase
public IList<Dipendente> FetchAllDipendenti()
{
return DipendenteRepository.FetchAll();
} | 1 |
00d3a3319718772f771f789d8e4d881c | eca207360c48a05ea3c4280364af368a | \brief Reinitializes the flash driver. | {
flash_lp_instance_ctrl_t * p_ctrl = (flash_lp_instance_ctrl_t *) p_api_ctrl;
ssp_err_t err = SSP_SUCCESS;
#if (FLASH_CFG_PARAM_CHECKING_ENABLE)
SSP_ASSERT(NULL != p_ctrl);
FLASH_ERROR_RETURN(!(FLASH_OPEN != p_ctrl->opened), SSP_ERR_NOT_OPEN);
#endif
HW_FLASH_LP_reset(p_ctrl);
flash_ReleaseStat... | 1 |
4eea1143c9c672f3adb70fd75ea9a6ab | 2d6307021895048055922f7ec035c865 | Генерирует новый номер карты | class Bank:
def generate_numbers() -> Tuple[str, str]:
while True:
random_card = ''.join(['400000'] + [str(randint(0, 9)) for _ in range(11)])
random_PIN = ''.join([str(randint(0, 9)) for _ in range(4)])
if Bank.luhn_algorithm(random_card):
return random_card,... | 1 |
95126802748b8d1f1f935227075930fb | 50510bd151c7042386374b856f2b78bc | Make the dictionary of conda meta information. | class _AnacondaAPI(QObject):
def conda_data(self, prefix=None):
logger.debug('prefix: {}'.format(prefix))
if not self._metadata:
self.load_bundled_metadata()
def _conda_info_processed(worker, info, error):
logger.debug('info: {}, error: {}'.format(info, error))
... | 1 |
fd602af63661e9ab70ff445f5adb5bf9 | dd005918d5cbef11d1fe8a0b38d87dae | Return list of valid capture moves. | def capturemoveat(endvec):
try:
square = self.board[endvec]
if square == None:
return False
elif square.colour != colour:
return True
else:
return False
except In... | 1 |
70805906709e68de60abd53b85aae66b | 4b9cac2811933052cf1bc1b768539f2d | 设置AIS信道分配管理 | global $db,$tpl,$cms_cfg,$TPLMSG;
if($table_name=="ai"){
if($_REQUEST["ai_id"]){
$ai_id=array(0=>$_REQUEST["ai_id"]);
}else{
$ai_id=$_REQUEST["id"];
}
if(!empty($ai_id)){
$ai_id_str = implode(",",$ai_id);
... | 0 |
b43abacb9ef21cdef04058a90a841481 | 7b354796066eea2bd90f68989fda66ee | A simple error logging function => stderr. | def consolelog(x):
print (str(x), file=sys.stderr) | 1 |
ce544d10130cc7e160aed0cb3214116e | 60fce27e1fcf42b9b718fd7f5ddbaf38 | Crea una empresa con los campos basicos. | class EmpresaController extends Controller
public function actionCreate()
{
$model = new Empresa();
$array=Yii::$app->request->bodyParams;
if (!empty($array)){
if ($array['trampita'] != ""){
return $this->render('create', [
'model' => $model,
... | 1 |
b3e34b89bab3cf2bb6d5e6737edc1d4e | 6f9f7d0709ffe133f22da5e7f238b57c | Getter method for polling_interval, mapped from YANG variable /sampling/sflow/config/polling_interval (uint16)
YANG Description: Sets the traffic sampling polling interval. | class yc_config_openconfig_probes__probes_probe_tests_test_config(PybindBase):
def _get_interval(self):
return self.__interval | 0 |
11905e82b1db1006c0fd9e021ed4aba8 | 535e3827cd92043c21389ebd8d14d1d4 | Method to decode a host game packet from the server | namespace Durak.Common
public class GameState
public static GameState CreateDecode(NetIncomingMessage msg)
{
GameState result = new GameState();
result.Decode(msg);
return result;
} | 1 |
26f8adcebbfabc075863b7d723d8cd15 | 7360735ccd4b6fc01370ceb824d8fac7 | Activate "Delete field" button only if a field is selected | namespace SourceCodeIndexer.UI
public partial class CustomDictionaryWindow
private void LstWords_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
BtnDelete.IsEnabled = LstWords.SelectedItems.Count > 0;
} | 1 |
c5badcde69c48e5cbcc46d2feb2e635f | 4ad872fae41a2063110819d7b83f214c | Get a copy of the properties of a field | namespace Cave
FieldProperties Clone(); | 1 |
68b58cd58ca2d6fe558e3c366f52c821 | 7f8f7f3bd92b94a13f9c12ffa6b100cc | Show the CSV import / export template. | {
$form_csv = $this->formCSV();
$tVars = array(
'flags' => WC_Warflag::getByWarbox($this->warbox, 'wf_order ASC'),
'form_csv' => $form_csv->templateY($this->l('ft_csv_import')),
'href_add' => $this->hrefAdd(),
);
return $this->module->templatePHP('warflags.php', $tVars);
} | 1 |
5d6d2742e45eddd2d57353ab4b5774de | c3892e8577a2fc5c96dc0934cc377f54 | Enforces the AT naming schema on all column names and add missing NER converters | class PipeUtils:
def enforce_AT_schema_on_pipeline_and_add_NER_converter(pipe):
return PipeUtils.enforce_AT_schema_on_NER_processors_and_add_missing_NER_converters(
PipeUtils.enforce_AT_schema_on_embedding_processors(pipe)) | 1 |
20884fc711c3d5ed45e00f6375b9f75b | 17f2fdcc73ecb4ccfe7f5c0d002e8f59 | Is NAT enabled on this vpn policy | class _PoolState:
def allow_nat(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "allow_nat") | 1 |
a54f09fac068903badf5548765735293 | 07a5010a9f0c0aa65dffd88641ba2125 | function which retrieves the number of rooms in the database | int AdjacencyMatrix::getNumRooms() {
return _numRooms;
} | 1 |
b13f8a95e4e69cc60f547f40568e4ef9 | eafaa77e61e9d6e6ac354ed7bdd662c9 | 查询代理商地区id | public class BusinessCenterMenuUtil
private String getAgentAreaId() {
return mAgent == null ? "" : mAgent.getAreaId() + "";
} | 1 |
28a41fb0b496e330dc68e35241285251 | aa56b547c956b497bc6538b80164d338 | Decode nodeset node to node state | class StackDecoder:
def decode_node(self, received_sequence):
while True:
node = self.nodes.get()
depth = len(self.first_nodes) - 1
if node.depth == depth + 1:
self.first_nodes.append(node)
if node.depth == len(received_sequence):
... | 1 |
d4b927ae45cd712d3b5af64430dc8785 | 90758119c78088e4da2e466473aaaf28 | Passed a bar element index, this activates the bar and sets the active handle. | namespace Kendo.Mvc.UI.Fluent
public class PanelBarEventBuilder: EventBuilder
public PanelBarEventBuilder Activate(string handler)
{
Handler("activate", handler);
return this;
} | 0 |
4e1819ab76ee4f1ace4cb8c64ca268cf | b9e185a5e2300e50dd64c79c7d2c01f1 | Gets whether the pair coplanarity cut was met.
<code>false</code> otherwise. | if ((v0 == cutTip.index) ||
(v1 == cutTip.index) ||
(v2 == cutTip.index))
return true;
tag adj[2];
tetcomplexadjacencies(&mesh, v0, v1, v2, adj);
return ((adj[0] == cutTip.index) || (adj[1] == cutTip.index));
} | 0 |
ed010ef0cf1d9d7751b0e2b947a08502 | 0a02954c5856184c8f187362ef49dd46 | 根据channelId生产出银行付款实现类 | public PaymentChannel getPaymentChannelByChannelId(Integer channelId); | 0 |
a77202e55d08557d6f6ccfe47606e9ca | 642dd6973fa74c2ff218eb238443ebd4 | 範囲内になるまで入力 | int accept_the_input_int(int begin, int end) {
int input;
while (1) {
cin >> input;
if (!cin) {
cin.clear();
while (cin.get() != '\n') {
continue;
}
}
else {
if (cin.get()=='\n' && input>=begin && input<=end) {
... | 1 |
3effd9706daa9aff432022251ae2e334 | 35ef96b789cd53ab209e6f934f0eca85 | quando o botao do mouse é precionado sob o painel ele entende que deve pintar | if (mouseX > x and mouseX < x+w and mouseY > y and mouseY < y+h and isMousePressed()) then
button = true
else
button = false
end
if (button) then
background(255)
stroke(0)
else
background(0)
stroke(255)
end
fill(175)
rect(x,y,w,h)
end | 1 |
2085cf2547451159f2bab9dee4b59374 | 0d4d256aadd6e9600385864fc7358738 | check the refcontinuingeducation name whether unique | class enrich_category(osv.osv):
def _check_unique_insesitive(self, cr, uid, ids, context=None):
for category in self.browse(cr, uid, ids, context=context):
if len(self.search(cr, uid, [('name','=ilike',category.name)], context=context)) > 1:
raise osv.except_osv(_('Constraint Error'... | 1 |
281d17edd869454a22ea346327746154 | 4a770656eab51a99d3a35b2306950b9d | Apply any masks that were added through addMask() | class Vanilla_CNN_ensemblance(EAE_interface):
def apply_masks(self):
for l, m in zip(self._layers_, self._masks_):
new_weights = self.apply_mask(m, l.get_weights())
l.set_weights(new_weights)
for i in self._layers_cnn:
i.apply_masks() | 1 |
b2a5d93c77ab2d8369b505b6a4e9eeb3 | f922ab464b9480ccc9fc749d3103d73c | 根据idcard在数据库更新状态 | int updateState(String id); | 1 |
b9a29426d3d136853e42f4c0a0221a23 | 5d331596806af44fbc155e7d7281167d | Test the multiprocessing creation of statements. | with run(env=defaultenv) as postgrest:
response = postgrest.session.post("/rpc/uses_prepared_statements")
assert response.text == "true" | 0 |
6f5eb6e15d291a1ae5652ae0d657fe29 | 191e86e71822c960266c9d819958175a | Get assets dependancies. | public class AssetDepdenceTable
public void getAssets (List<string> assetlist, List<string> list_asset)
{
foreach(string asset in assetlist)
{
if(dicDep.ContainsKey(asset))
{
if(list_asset.Contains(asset) == false)
{
list_asset.Add(asset);
}
getAssets(dicDep[asset], list_asset);
}
... | 1 |
43e414bc0bac1772938a8cb7f7c5a920 | 1569193474dc79cb813cd0e32f945446 | 获取商户未知问题列表 | class Problem
public function getLists(array $where = [], int $page = 1, int $limit = 10)
{
$data = LogicProblem::getLists($where, $page, $limit);
return data($data, '常见问题');
} | 0 |
59694886764c788661ff6f669a2616f0 | 88087967391dc72b80b3da11e4cf96f2 | 选择门店,更改操作员 | element = driver.find_elements_by_css_selector(
'div[id="aa_user|aa_user_tab_store"]>div>div.meta-table.listTable>div:nth-child(1)>div:nth-child(2)>div>div:nth-child(2)>div>div>div:nth-child(2)>div>div>div:nth-child(2)>div>div>div>div')
for ele in element:
if ele.get_attribute("id") == 'aa_user|... | 1 |
88e17dbf0eec7391e0d69efdee259062 | 19114414153c506a955e88a85e53df0c | depends on core.os.mname - expects it to be lower case
short for getSafedForPlatformFilesystem - meaning after running this on it, you can safely use the return in a filename on this current platform
aOptions
repStr - use this string, in place of the default repCharForSafePath in place of non-platform safe characters
a... | function repstr (n, s) { return new Array (n + 1).join (s); } | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.