query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
fe62c75627362363a60f48a326263562 | 6def0a8dfe6bf3840251791c463dc0a6 | Updates active player missiles. | void update_game_missiles_frame_count() {
for (int i = 0; i < NUMBER_OF_SHIPS_PER_PLAYER; i++) {
if (host_missiles[i] && host_missiles[i]->active) {
update_ship_frame_count(host_missiles[i]);
}
if (client_missiles[i] && client_missiles[i]->active) {
update_ship_frame_... | 1 |
2dede4b084e4f94bf9814dd623ee67e8 | 762e42c8d686f41aefe74dfe8ab66609 | 自定义Insert方法,主要用于构成并执行T-SQL语言的INSERT语句 | {
SqlQuery q = new SqlQuery(provider);
ISqlGenerator generator = q.GetGenerator();
generator.SetInsertQuery(this);
string sql = generator.BuildInsertStatement();
return sql;
} | 1 |
6ec85c7f11e02a7541b3b39f1c2c9da6 | 1715a4ec0f77181f76c077a0134fb7b7 | @brief 亮度减 | int decrease_brightness (void) {
brightness -= CAMERA_BRIGHTNESS_STEP;
if (brightness < CAMERA_MIN_BRIGHTNESS) {
brightness = CAMERA_MIN_BRIGHTNESS;
printf("Reached min BRIGHTNESS. \n");
} else
printf("Decrease BRIGHTNESS to %d\n", brightness);
mCfgControl.mm_camera_set_parm(CAMERA_PARM_BRIGHTNESS, ... | 1 |
f2d61bb041ef3188ced392dc527d2627 | 36818d519566020b27f1c12906f25c17 | Show the error message and hide the movies data | public class MainActivity extends AppCompatActivity implements MovieAdapter.MovieAdapterOnClickHandler
public void showErrorMessage() {
mRecyclerView.setVisibility(View.INVISIBLE);
mErrorMessageDisplay.setVisibility(View.VISIBLE);
} | 1 |
d1d41f20ef64bf73b5e0cd26ff0d4b0c | d548271222024758325ee25213543713 | ChangeLanguage to American English | namespace DNS_changer.ViewModels.Settings
public class GeneralViewModel : Caliburn.Micro.Screen
private void AddEnglishSystemTray(object sender, EventArgs e)
{
LanguageHelper.SetLanguage(LanguageStrings.ShortEnglishUS);
} | 1 |
d9c4f6310a87d0f5b636c4ae27ebda1a | 7b1c69bdd87dbe9a2addd3f0233c6de9 | Prevent the user from being able to log in without entering
log in information. | $("#loginUser")[0].required = sessionStorage.getItem('user') == null;
$("#loginPassword")[0].required = sessionStorage.getItem('user') == null;
$("#loginUserRow")[0].hidden = sessionStorage.getItem('user') != null;
$("#loginPasswordRow")[0].hidden = sessionStorage.getItem('user') != null;
$("#loginS... | 1 |
bb3da49e29b55356580bbc101830ae40 | 706ecfac0499df403b3d6d7d372da76a | # rename columns for easier access (strip units and whitespace and lowercase) | col_names <- tolower(col_names) %>%
str_replace_all(c(" " = "_" , "," = "" )) %>%
str_replace_all("\\(%\\)","pct") %>%
str_replace_all("\\(ml\\/100g\\)","ml_per_100g") %>%
str_replace_all("\\(%_of_total_oil\\)","oil_fraction") %>%
str_remove_all("_\\(ychhops.com\\)") %>%
{.}
return(col_names... | 1 |
af860143d2023d69cacf7d3933ac6c3c | 5ec61ebcad20e4985155ff4baa43d2f0 | Provides query builder, name of property and expected alias of given property | function queryToProp (
apiQuery: string,
paramNameOrOpts?: string | QueryOptions
): [ string, QueryOptions ] {
let paramName: string | undefined
let propName: string | undefined
if (typeof paramNameOrOpts === 'string') {
paramName = paramNameOrOpts
} else if (paramNameOrOpts) {
paramName = paramName... | 1 |
ab4462fd6b811cb48c28c17bb2921c70 | 0f40d51a6189b1fb45149e3770a94d5b | Gets the nutz. | {
List<Model.T_NUTZER> nutzer = new List<Model.T_NUTZER>();
using (Model.Context context = new Model.Context())
{
nutzer.AddRange(context.T_NUTZER.ToList());
}
return nutzer;
} | 1 |
5e393cbee7f7aa399f3f36989590909b | 85296a5358aca0798f9d022b8e226cb2 | Gets the Ids of all centers of the clusters. | public class SNNGraph implements SNN{
public Set<Long> getClustersIds() {
return clustersIds;
} | 1 |
6bbf4050ec175651f866d5b94fadc40e | ed955bab156c21f420e8e578d76ba45a | # compute the contribution of the time dependent variables to the rate
# of relative survival model for patient iT with Zalphabeta[iT, ]
# at a vector of T (useful to compute numerical integration
# Spline_t0 : splines parameters for the baseline hazard multiplied by gamma0
# : thus no nead to multiply each... | {
y = merlin_util_depvar(gml)
logh = merlin_util_xzb(gml,t=y[,1])
if (gml$NI[[gml$modelind]]) ret <- sweep(logh,1,y[,2],"*") - merlin_ch_exp(gml)
else ret <- sweep(logh,1,y[,2],"*") - sweep(exp(logh),1,y[,1],"*")
return(ret)
} | 0 |
1cfe57ac118cbb6ca47f8251e62a0d11 | 514d39af2c318a8ba42536c9d54a1f10 | Update user's rating of a post | {
$freq_obj = $request->get('reqObj');
$fde_serialize = $this->decodeObjectAction($freq_obj);
if (isset($fde_serialize)) {
$de_serialize = $fde_serialize;
} else {
$de_serialize = $this->getAppData($request);
}
$required_params = array('user_i... | 1 |
1ddd33e87681eee5e91298c8f89c4df3 | bf995bec6033cedbd99255829815ce3b | Gets first response option. | def get_first_response(input_statement, response_list):
logger = logging.getLogger(__name__)
logger.info(u'Selecting first response from list of {} options.'.format(
len(response_list)
))
return response_list[0] | 1 |
8e3979de03c2b3a253dff35836d7759c | 77dbb9e11f1157d047c05474d8fc25ed | Populate list of antibiograms to choose from | namespace GUI
public partial class CustomProteaseWindow : Window
private void PopulateListBoxes()
{
cleavageSpecificityListBox.Items.Add("full");
cleavageSpecificityListBox.Items.Add("semi");
cleavageTerminusListBox.Items.Add("C");
cleavageTerminusListBox.Item... | 0 |
e0b263705e4fe5d32bcebcea6c64cea7 | e8024d7db96ffd303f93e76271edcda9 | #compute confidence interval of mean at 95% | myci<-function(x=c()) {
t=qt(0.95,length(x))
ci=c()
ci[1]=mean(x)-t*sd(x)/sqrt(length(x))
ci[2]=mean(x)+t*sd(x)/sqrt(length(x))
return (ci)
} | 1 |
722f552db7025083764edcc0acbd9738 | 21c7560140f804c56f5452d5cf8c3b41 | Returns report line for package if necessary or null otherwise. | if (line && line.indexOf(':') !== -1) {
var summary = line.split(':'),
issue = summary[1].split(',');
return buildLineReport(summary, issue);
}
return null;
} | 1 |
36398ba7f5c0929fe1b30f322bae3c86 | 995e0fbf9611d0c69fb2bfea8db10447 | 绑定子部门 | {
this.ddlSubDepts.DataSource = fttc.GetAllArea();
ddlSubDepts.DataTextField = "OBJ_NAME";
ddlSubDepts.DataValueField = "GUID";
this.ddlSubDepts.DataBind();
} | 1 |
b668ebbe1215efb9ebb8826cefc3e72f | f6fce6dabdddee088f955fb10d03e27a | Get the resume data from a file, change all letters to uppercase and remove all characters that are not letters | std::string readFile() {
std::string text;
std::ifstream inFile;
std::string filename;
std::string line;
std::cout << "\nEnter filename: \n";
std::getline(std::cin, filename);
if (filename.find(".txt") == std::string::npos) {
filename += ".txt";
}
inFile.open(filename);
if (inFile.fail()) {
std::cout << "... | 0 |
ce275d8a84ecd8d13c05d06778efa2cf | acaea6a00329668090850f4ff616fdac | 构建省名 | {
if (FullName.IsNullOrEmpty()) return;
var name = FullName;
if (ParentID == 0)
{
name = name.TrimEnd("省", "市", "自治区", "壮族", "回族", "维吾尔", "特别行政区");
}
else if (Level <= 3)
{
if (name.Length > 8) na... | 0 |
99794c94d6ec66be3d4e23b5d0e9fa26 | 2bc1f9400d0e12cebc62c17bdf5fcb52 | Test is high card. Sanity checking that when we evaluate the hand, we can see that the HandValue variable is set
to the high card. | namespace TexasHoldem
[TestFixture]
public class TexasHoldemTests
[Test]
public void RankHand_HighCard()
{
var expected = HandRank.HighCard;
Assert.AreEqual(expected, table.RankHand(HighCardHand));
} | 1 |
e37b9e2d7a3497b49e1b084abaf274f8 | 1c8820d72490da1060087f4c62e1e286 | 対象データを$patternでパターンマッチングした結果全てを返す | $this->connect();
$result = false;
if(empty($match))return false;
$keys = $this->master->unpop($this->prefix1 . '_' . $this->prefix2);
foreach ($keys as $key){
$r = $this->master->get($this->prefix1 . '_' . $this->prefix2 . '_' . $key);
if (preg_match("/".$match."/i", $r)) $result[$key] = $r;
}
retu... | 1 |
2b31cd88249c918d35a01aa8e522f989 | 34f08033c02767948e6e32a090955be8 | @brief
Select a device on the 1-wire bus.
Uses the devices serial number to select it. | {
ClearWriteBuffer();
writeDataBuffer[0] = 2;
writeDataBuffer[1] = 186;
writeDataBuffer[7] = 0;
return foundDevices[selectedDeviceIndex].WriteData(writeDataBuffer) == 0;
} | 0 |
721f492e7b9d7c3f905ba02e14577684 | f65c4cb8f444cb28d96e9e4c164fc491 | Sets the number of games won for this user in this particular mini-game. | {
_numSetsWon++;
if(_numSetsWon == 7)
{
for(int i = 0; i < 7; i++)
{
if(i == OtherPlayer.GetSetsWon())
{
_wonMatchResults[i]++;
break;
}
}
}
} | 0 |
5fcec8f86ad63024651a461aef2b20c6 | ce93712dab9297de104400cd11a0bdcc | Test decoding of unicode escaped ASCII (non-HTML special) characters | namespace NServiceKit.Text.Tests.JsonTests
[TestFixture]
public class EscapedCharsTests
: TestBase
[Test]
public void Can_deserialize_unicode_with_escape()
{
JsConfig.EscapeUnicode = true;
var fromJson = JsonSerializer.DeserializeFromString<Model>("{\"Name\":\"J\\u0159\\u00ED... | 1 |
6856f7f2f3c984cce6252a5d40d567a4 | a9d082bc2ad2f55bfefaa535756df2ad | Called from broadcast_usr, it will broadcast user message from origin to other clients | class Server:
def broadcastToOnUsrs(self,message,username):
sendOnce = 0
for user in self.onlineConnList:
if(user!=username):
if(username not in self.userObj[user].blockedList):
self.forwardMsg(user,message)
elif(sendOnce == 0):
... | 1 |
e5eb05716fcc4d0ff8b97fb3904e9308 | 860afbb6efbd5343b6f10176a7337b0e | Appends and returns a new empty "ejb-ql" element | {
synchronized (monitor())
{
check_orphaned();
org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType target = null;
target = (org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType)get_store().add_element_user(EJBJAR$0);
retu... | 0 |
ff70a1408bdaf51de423515752d6559a | 2cb2136fc4f857b4d9d6a8da3c1e4295 | prints all database entries in a Log message | {
List<Log> logs = database.log.SelectLogs();
foreach (Log log in logs)
{
Console.WriteLine("Log: " + log.log + ";" + "Data: " + log.year + ":" + log.month + ":" + log.day + ";" +
"Time: " + log.hours + ":" + log.minutes + ":" + log.seconds + "... | 1 |
c60df2013016bbc709f6dd72abfcb10b | 8e760720bab06385f12f971a1d31aa37 | Declare a variable and store a value in it | func main() {
var age int = 29
fmt.Println("my age is", age)
age = 54
fmt.Println("my age is ", age)
age = 108
fmt.Println("my age is ", age)
fmt.Println("Hello World")
var width, height int = 100, 50
fmt.Println("width is:", width, "height is:", height)
var (
name = "naveen"
age1 = 29
height1 i... | 1 |
a0c302df589488812aa15987b6238b5e | 92c9459af36002521cf28c3b36368698 | 查找某个单词的形似词,拼写错误也会有返回值. ratio:近似程度. | static PyObject* m_suggest(PyObject* self, PyObject* args) {
char* word;
int length;
if (!PyArg_ParseTuple(args, "s#", &word, &length)) {
PyErr_SetString(PyExc_TypeError, "string expeced");
return NULL;
}
return AspellWordList2PythonList( aspell_speller_suggest(Speller(self), word, length));
} | 1 |
e1a51b64e1b40325c706a2c6c1228266 | e78bea03cd1739bbe92bf25bb410b5af | 配送業者選択処理 | {
var chkObj =[];
var hatsu_str = '';
$(FormID+'[name=p_transport]:checked').each(function(){
chkObj.push($(this).data("value"));
});
hatsu_str = chkObj.join(',');
checkboxAction('transport','p_transport',hatsu_str);
} | 1 |
b0935bbdfdc7e62fe6a0aab7d9efcaef | 103a1448574554514384f3f219a8e989 | Check to see if TestingData property is set | namespace Amazon.Rekognition.Model
public partial class CreateProjectVersionRequest : AmazonRekognitionRequest
internal bool IsSetTestingData()
{
return this._testingData != null;
} | 1 |
885a6aa811c0bc04b18a067bf88892cc | 62bfddb2a5eb42dcb3cd800eecc18ad8 | 对字符串进行合并连续空格,合并逗号,句号为空格,去掉头尾空格处理
输入的字符串 | String retVal=null;
if(null==strings||strings.length<1){
retVal= "";
}else{
String spc=",";
if(StringUtils.isNotEmpty(spiltChar)){
spc=spiltChar;
}
for(int i=0;i<strings.length;i++){
if(i==0){
retVal=strings[i];
}else{
retVal+=spc+strings... | 0 |
507bb0847f7cd3b0e2c076a215284156 | 595ed7e8c02492471bde491a5a1c4fa1 | @brief get auto atten track on/off | void RtSa_Interface::setAutoAttenTrack(bool isOn)
{
globalUserVariable->gAutoAttenTrack = isOn;
} | 0 |
a98e80081068c8651714b9ab296b4efa | 03f90cd02e74c505e1ab7578188ab72e | BSTinorder traversal recursive | void bist_postorder( Bist_node root, int N ){
if( root ){
bist_postorder( root->l, N );
bist_postorder( root->r, N );
bist_printnode( root, N );
}
} | 0 |
9c26ab86503592ce1d56d95e56918381 | aed5ade49ca5c0e0e4dace52b5535562 | 获取所有订单明细分页 | function getAllOrder(number){
$("#J_comPage").html("");
if(number) OSS_AJAX_DATA.number=number;
var ossTbBody=$("#J_ossTbBody");
$.ajax({
url:AJAXURL.queryByState,
data:OSS_AJAX_DATA,
type:"POST",
dataType:"JSON",
beforeSend:function(){
ossTbBody.html('<i class="load-one">拼命加载中...</i>');
},
success... | 1 |
3dc4c0cef0211a51330766a6d8d38669 | a11ce2d98a43680df8c952883f8d19e0 | Create a 1D spatial coverage from a list of uniq cells each associated with a value.
The coverage computed contains the cells summing from ``cumul_from`` to ``cumul_to``.
# Arguments
* ``max_depth`` - the largest depth of the output MOC, which must be larger or equals to the largest
depth in the `uniq` values
* ``u... | def _compute_moc_with_v_at_cst_depth(v, grid, X="X", Z="Z"):
v_x_dx = grid.integrate(v, axis=X)
psi = grid.cumint(v_x_dx, axis=Z, boundary="fill", fill_value=0) * 1e-6
psi = psi - psi.isel({grid.axes[Z]._get_axis_coord(psi)[1]: -1})
return psi | 0 |
baa48e55fc6ec715e68aa56de98a7617 | 53ef8d31dff0cb994d704518e9554328 | NewKraken is used to create a kraken provider adapter | var e Exporter
e.repos = repos
e.githubToken = githubToken
return e
} | 0 |
881c5e248c53418b7359901f7b0d5d80 | 173d8a5952d100c1c1e55576b02bee0e | Get the nb attes ijss at. | class Counter(object):
def get_count_at(self):
return self.__count_at | 0 |
300d5d9fa8cc180444e5a94758520356 | ede252aa6162eeb027a7b3fab05cba1b | 根据订单序号查询资源路径
订单号 | @Service
@Import({
ShellmerchantDataSourceConfig.class
})
public class ShellmerchantTestBase
public List<GasDeviceResourceDO> findGasDeviceResourceByOrderNo(Integer orderNo) {
GasDeviceResourceDOExample exam = new GasDeviceResourceDOExample();
exam.createCriteria().andOrderNoEqualTo(orderNo);
return gasDe... | 1 |
e297e901517eabce6c9544498ae35abb | 15a05ababdfc773504abdef3c6c079da | fetch stored settings from db and initialize the component's private variables with them | init(userSettings = {}) {
Object.assign(this.settings, userSettings);
document
.querySelector(this.settings.previewSelector)
.addEventListener('click', event => this.containerClickHandler(event));
} | 0 |
dc5dbd3239129a3ca461ea7d0bff4808 | 25d06b16f6451122881b9e566aac801d | Calculates the coefficent of heat transfer(alpha) from liquid to wall of pipe. | def alpha_coolwater_dist(Nu_dist, lyambda_coolwater_dist, d_outer_dist):
return Nu_dist * lyambda_coolwater_dist / d_outer_dist | 1 |
1ab403817a1c072fa0c72f1034a38afb | d30f582d2d28b7c2feafa2b065e5654e | 通过数据库获取全局主键值,利用数据库锁 | namespace Dt.Core
public abstract class DataAccess<TAccessInfo>
where TAccessInfo : AccessInfo, new()
public static Task<string> GetDbKey()
{
return _da.GetDbKey();
} | 0 |
db699e1c4c913d6661d36085f13cebb2 | f7d73a665c87214d76750187468c1bcd | Sets bIsUpdating on all Opponents | hint.setText(R.string.hint_first_opponent);
enemyPos.setText(R.string.enemy_pos_first);
board[1][1].setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
playerRow = 2;
playerCol = 0;
upd... | 0 |
13d2fd43035263232472c1262c019ced | e2288b24897779809f4399fccebae378 | Get the query sets, which are keySet of the map | @Entity
@Table(name = "SOURCE_MAPPING")
@NamedQuery(name = SourceMappingEntity.BY_NAME, query = "from SourceMappingEntity as e where e.name = ? and e.environment.id = ?")
public class SourceMappingEntity extends OfEnvironment
public List<SetMappingValue> getSets() {
return sets;
} | 0 |
33667edf4490f8e09335416cd7cdb16c | 970095256b11935cba273f8efb7e066c | 对通过get方式传递的数据进行过滤 | if(is_array($get)) {
foreach ($get as $key => $value){
$newget[$key] = self::checkGet($value,$key);
}
} else {
if(isset($get[400])) {
$newget = substr($get,0,400);
} else {
$newget = $get;
}
if( stripos($newget,'set') !== false ){
$newget = str_ireplace(' set','',$newget);
$... | 1 |
935385beb72ec4bc186ccf705e94f083 | 15c9749045fdded939d9f6516125616d | Recognizes a for-each loop. | namespace org.mozilla.javascript.ast
public boolean isForEach() {
return isForEach;
} | 1 |
b5231a5d980083f0309844b4f9c3c21e | b8bfdd74fae4f53f36df177cc6162566 | 武器二确认购买 | def purchase_judge(n):
global coins, step_store1, step_store, current_weapon_id
if coins < weapons[step_store - 2].price:
step_store1 = 20
clock.schedule(reset_step_store1, 2)
else:
key = weapons[step_store - 2]
key.image = f'{key.image[:-6]}'
coins = coins - weapons[... | 1 |
f2f53192939e467f56e43c00d88e3d06 | c63d0fc91d7ea145d01ce87cd93ea448 | 根据“售货机ID、货道号、单据类型=借还“查询“库存交易记录” | public class StVoucherBatchOperDao extends TsBaseJdbcDao<StVoucherBatchOper>
public DataSet voucherInventoryQuery(ParameterSet pset) {
String voucherStatus = (String) pset.getParameter("voucherStatus");
String queryCustCode = (String) pset.getParameter("queryCustCode");
String stockLoc = (String... | 0 |
6bd39e60ae87aab398bc0de29effa7e6 | ff9fcfe6aea1c7ea735b56365203042f | 文字列をコンソールに出力 | void ConsoleWriteString(char* str)
{
if (!str)
{
return;
}
while (*str)
{
ConsoleWriteCharacter(*str++);
}
} | 1 |
d2833e75396646d201884ae58524faae | 31c23837ec38fd1455cc4e9ce8d7526c | Checks if either of strings part of the other | a = re.sub(" ", "", a).lower()
b = re.sub(" ", "", b).lower()
if a in b or b in a:
return True | 1 |
1b3965725135834b43126ce6c5b29c61 | edd21fbad79a91dfcd287b48a31c94ae | 获取活动所有的出口活动 | namespace EAFrame.Workflow.Engine
public class WorkflowPersistence : IWorkflowPersistence
public IList<Definition.Activity> GetOutActivities(string processDefID, string activityID)
{
ProcessDefine processDefine = GetProcessDefine(processDefID);
return processDefine.Activities.Where(a... | 1 |
634a0f288f86f790645545b432780396 | 561cb802f3fe207ab1b6698b7522f56e | ***************************************************** //
Fonction qui récupére l'extension du fichier uploader //
***************************************************** // | function recupextension ($filename)
{
return substr(strrchr($filename, '.'), 1);
} | 1 |
b57fe16a888dde4fac0d9b00afdefc8e | 632ee1d6392e7df03eeb8382f2b03cfe | Sets the cell factories of this controller. | public class ListSelectionView<T> extends ControlsFXControl
public final Callback<ListView<T>, ListCell<T>> getCellFactory() {
return cellFactory == null ? null : cellFactory.get();
} | 0 |
57c69a1374c3604a7d918b6a8b08780d | 09b65fd4094cfcc26cf0e907565f0be4 | Tests conversion of values into human readable format. | {
shared_ptr<UnitConverterMock> mock = make_shared<UnitConverterMock>();
VM::UnitConverterViewModel vm(mock);
vm.UpdateDisplay(L"1234", L"56.78");
VERIFY_IS_TRUE(vm.Value1 == L"1,234");
VERIFY_IS_TRUE(vm.Value2 == L"56.78");
} | 1 |
d2227eb3f27764c5032b0b7312d4d181 | d79704437ce59ccb959d9ed7c70259d2 | 获取所有发布会数据 接口 | function getAll(){
return get("/es/all",{})
} | 1 |
f058052b742e55168f94dcd148364ee5 | 7b28c1475ce304577a0f73f21309477a | 创建项目经理业绩 | public String createperformance(PageData pd) throws Exception; | 1 |
6f980c3c455579fb812236954de7fcd4 | 8c7f69902c5ac80f1e3a4b5e691bbd4c | 更新闪电链特效位置 | {
_lightEffect.Lights[0].Position = new DX.Vector3(e.X, e.Y, _lightEffect.Lights[0].Position.Z);
_torchSprite.Position = new DX.Vector2(e.X - 11, e.Y - 23);
} | 0 |
7a2c949927a294c2a20177435a7a0f75 | 17cfc4566cf595b74c109e7b1f1a42ea | Check to see if StackSetMaxConcurrencyCount property is set | namespace Amazon.OpsWorks.Model
public partial class StackSummary
internal bool IsSetLayersCount()
{
return this._layersCount.HasValue;
} | 0 |
552860443d692b40565b821ef64a0ff1 | 6c5ee7c2c208467608e3c1a8cf64119b | 如果鼠标在窗口上, 则重绘界面 add by TangJian 2017/09/28 21:57:44 | namespace Tang.Editor
public class SkillEditorWindow : EditorWindow
void Update()
{
if (mouseOverWindow)
{
base.Repaint();
}
} | 1 |
307cc5b585f504c65508226351b1624b | 1eda43f9843e98c70ac16455487568c8 | Sends a request to the server and gets the scheduled operating times of a workplace as response. | {
const string Target = @"GetAvailableWorkingHours";
Newtonsoft.Json.Linq.JObject json = Newtonsoft.Json.Linq.JObject.FromObject(getAvailableWorkingHoursRequest);
return await PostAsync<HRworksConnector.Models.GeneralActions.GetAvailableWorkingHoursResponse>(Target, json);
... | 1 |
6c3330e7b497d02101843b1ca5d370e3 | 7ef7b999119d9ec913360e23744953c4 | Returns connection to desired database. | class AbstractSqlController(ABC): # pragma: no cover
def connect_db(self) -> sqlite3.Connection: | 1 |
282ebae050fb23a137bbb0d1140f1482 | 0e40bea11b9a8c7c36fbba028a617a05 | Remove the container. | class ContainerController extends Controller
public function destroy(Container $container): JsonResponse
{
$isDeleted = $container->delete();
return response()->json($isDeleted ? 'true' : 'false');
} | 1 |
7567fe413a7b7219849a27f3cd72b1d8 | 72e530b0051fbc46499f0734c79f4586 | Generate the code for a "return" statement. This ensures
that any returned result is loaded into the appropriate
register. | static LLVMValueRef
gen_return (gencodectx_t gctx, expr_node_t *exp, LLVMTypeRef neededtype)
{
expr_node_t *retexp = expr_exit_value(exp);
LLVMValueRef retval = (retexp == 0 ? 0 : llvmgen_expression(gctx, retexp, gctx->fullwordtype));
llvmgen_btrack_update(gctx, gctx->curfn->btrack[LLVMGEN_K_BT_FUNC], retva... | 1 |
3f9c0419b28334ce6935dcb636b2d8f9 | 43dd9d29dd69a76f6884e1da0580ab63 | Policy evaluation step in the case where policy specifies a
deterministic action | unsigned int
rl_agent_action(unsigned int state, double reward)
{
return policy[state];
} | 1 |
6ffd40cb37d2a0af7b19d648ff14d472 | cb7205768fcbd3c8ef3a1efb67cd9624 | 根据dealerCode,byNo,isFinished 检索工具明细信息
(non-Javadoc) | List<String> getKjDetailByKjCode(Map<String, Object> params) throws RuntimeException; | 0 |
f7b5af25a677dcaffe1074f658113b6a | 43c9d49d89f85986436e03a6d2b88b92 | Exits Card Operations. | namespace Petroules.WindowsCards
public sealed class CardRenderer
[DllImport("cards.dll")]
private static extern void cdtTerm(); | 0 |
b8e235bbfbee1e5cd61034c82cab4a16 | 6bd5ddf6f0a7988975a907223b9956a9 | Constructor for University class | self.name = name
self.courses = []
self.teachers = []
self.students = {} | 0 |
ec945f4cc28f861c1a8cf88d5c0ce60a | e6bc9be89f01efd672c7f23bdab07f73 | Get Host Name From HTTP REQUEST Packet | {
try
{
System.Net.IPHostEntry host = new System.Net.IPHostEntry();
host = System.Net.Dns.GetHostEntry(context.Request.ServerVariables["REMOTE_HOST"]);
return host.HostName.ToString();
}
catch
{
... | 1 |
79043e23493fde1981a155c9166a8bfd | ddf620ec4a3bfbeb200a939c66d99d2d | Returns the constant whose raw value matches to given. An instance of {@link IllegalArgumentException} will
be thrown if no constant matched. | public function getConstant($name); | 0 |
d421b4f7b093bc753f219e01dccd8991 | d163c07f356b32a858050bfd96e3e83f | Permet de récupérer tous les arbitres existants | public class Controleur
public ArrayList<Roi> getRois ()
{
return this.ensRois;
} | 0 |
2c4c49e7e2fcf6cce46de64c1fba9644 | c1ffffacde686ad1f22564f82173fa85 | Returns the next branch to be researched, which is the branch at the front of the research queue.
* NullValue - There is no branch to be researched. | {
lock (mProcessingQueue)
{
return mProcessingQueue.Count > 0
? mProcessingQueue.RemoveFromFront()
: null;
}
} | 1 |
10ad60457ce684d314b8201443f42deb | 20c0577ccf065923051f7d79ed1e35f0 | Used to concat each sequence of GOPRO videos into a single file. | def framesToVideo(imageFileNames, outputFileName):
pass | 0 |
01552661e45830a03cc45c03cd098ea3 | fc2610fcde340832b04f23ea45db6907 | Redux async action which registers a new user | async register({ commit }, data) {
const response = await axios.post("/api/register", data);
commit("setUser", response.data);
return response;
} | 1 |
4a62c7df186b5202afbb7267d369e620 | 0d677d07bb2ac7959c32bcc8094a8bec | FUNCTION
AlmFillInlineEditStructs
DESCRIPTION
Initialize inline structure of input screen.
PARAMETERS
None
RETURNS
None
GLOBALS AFFECTED
None | void mmi_imps_public_profile_1_fill_inline_struct(void)
{
S32 i;
mmi_imps_public_profile_inline_struct *pp_info = imps_p->pp_info;
pp_info->gender_list[0] = (U8*) GetString(STR_ID_IMPS_NO_DISCLOSE);
pp_info->gender_list[1] = (U8*) GetString(STR_ID_IMPS_FEMALE);
pp_info->gender_list[2] = (U8*) GetStr... | 0 |
ed3e8e8ab91676923b78646e1248d504 | 4952e462d20f21629030cf0601cf74bb | NewInMemoryPlayerStore initialises an empty player store | func NewInMemoryStorage() InMemory {
return InMemory{
store: make(map[string][]byte),
}
} | 0 |
d7a3efd16abcf3880da4396139c26e0e | 73387edd2f5d581f88fec759b58fab2a | Returns all the imported types | var imports = new List<T>();
imports.AddRange(base.GetAll(contentType.TypeName));
var baseTypes = contentType.BaseTypes;
foreach (var baseType in baseTypes)
imports.AddRange(GetAll(baseType.TypeName));
return imports;
} | 1 |
2282d9d0418a6c425454adf2874efbd5 | 6afce0eb0ab3b6f52dcd80d0704d58d0 | Midplane gas pressure scale height in [au]. | {
#if (NUMDIMS == 1)
return 2.00000 * PPP[i].Hsml / PPP[i].NumNgb;
#endif
#if (NUMDIMS == 2)
return 1.25331 * PPP[i].Hsml / PPP[i].NumNgb;
#endif
#if (NUMDIMS == 3)
return 1.61199 * PPP[i].Hsml / PPP[i].NumNgb;
#endif
} | 0 |
e4ee98318f9ea9d27e7c08f9379faf0b | 0f419ca33c802ab437d6a7f2038c10b8 | 魔法方法,设置attribute | class BaseClass{
public function __set($key, $value){
$this->setAttribute($key, $value);
} | 1 |
681dc4b91e71d7dd7c4e03fa2e8dd699 | 56e32b6dd8a3f854f27c60e8266d2c56 | Reverts a group of bulk endpoints back to not using stream IDs. | class H2Protocol(asyncio.Protocol):
def reset_stream(self, event):
if event.stream_id in self._flow_controlled_data:
del self._flow_controlled_data
self._reset_streams.add(event.stream_id)
self.end_stream(event) | 0 |
e8c82f61a948a913c99512e282b298f7 | 1155465a746a7d10ada9432de765eb2e | Copy vendor to dist | if dest:
if not dest.startswith('/'):
dest = os.path.join(os.getcwd(), dest)
os.chdir(PROJECT_DIR)
ctx.run('python setup.py sdist --dist-dir {0}'.format(dest))
else:
os.chdir(PROJECT_DIR)
ctx.run('python setup.py sdist') | 0 |
41472418da25873ea066dba10fb27240 | aefb9352645d6639b43c9fabd75d9735 | 获取Password的数量 | float ServerModel::getPasswordCount()
{
return this->SL_currentFilePasswords.size();
} | 1 |
606c37e0e07720c78d256c2f6a3cf568 | 6e1700a5be281bbf12d5e16b3539a3c3 | 编码组ID的设定 | void setCodecId(CodecID codecId); | 1 |
d9686ba518c542ba76fc9e2d5fa8ac35 | 08996d39bcaec626b2a9595cedcb86f6 | Takes an array of input data and returns an
array of the input data with the box plot
interval data appended to each row. | function getBoxPlotValues(array) {
for (var i = 0; i < array.length; i++) {
var arr = array[i].slice(1).sort(function (a, b) {
return a - b;
});
var max = arr[arr.length - 1];
var min = arr[0];
var median = getMedian(arr);
var firstQuartile = getMedian(arr... | 1 |
7475f8e122fff9972d32d2f333d70b96 | 94ed5dee15da1d3ddd2b969353e455d1 | retorna uma somatória dos valores cadastrados na lista | var soma = 0;
for (let i = 0; i < lista.length; i++){
soma = soma + lista[i];
}
return soma;
} | 1 |
7c17f2263ace38f65b1aad324425c6c6 | d985ab0bc4509365001a215aba656ef9 | muestra el contenido de la TS. | void printTS(){
int j = 0;
char *t, *e;
printf("--------------------------------\n");
while(j <= TOPE-1) {
if(tablasimbolos[j].tipo_entrada == 0) { e = "MARK"; }
if(tablasimbolos[j].tipo_entrada == 1) { e = "FUNCTION"; }
if(tablasimbolos[j].tipo_entrada == 2) { e = "VAR"; }
if(tablasimbolos[j].tipo_entra... | 1 |
8fdd62bb0f05257135ac30d32b45f21a | aa52088d1cf40a3eea43552e5caec2ce | Given a mimetype, will attempt to return a string representing the
application it is associated with. If the mimetype is unknown, the default
return is 'document'. | b = self.storage['basedir']
r = self.storage['mimerules']
if mimetype in r:
return "%s%s" % (b, r[mimetype])
_type, _ = mimetype.split('/')
if _type in r:
return "%s%s" % (b, r[_type])
return b | 0 |
c059577e617ae08090af12d607d5ef57 | bd4eb5d60af20b7731e16db91409fc53 | Cleans all game events stored in the database. | void cleanAllGames(); | 1 |
952628a9ebe4228812f54f7c7c605422 | 923a09b740029656982a3811f0b0d4e6 | Создание страницы-новости из mysql | $obj_db = Model_Driver::get_instance();
global $link;
$result = mysqli_query($link, "SELECT news.*, category_news.title AS title_cat FROM news, category_news WHERE news.id='$pages_id' AND news.category_news_id=category_news.id");
if(!$result) return false;
$arr=[];
while($row=mysqli_fetch_assoc(... | 1 |
cb5788e39845cbd235db02da2a1406ba | 606662e3b991e08b249c02e74d025ca1 | CreateAuthority creates a new role in the database. | result := datasource.MasterDatabase().Create(user)
if result.Error != nil {
return nil, result.Error
}
return result.Value.(*models.User), nil
} | 0 |
d8372cfeb14a6bf937650f985b0e72f2 | 929160f9e0bf83152e7ca5cab7983f61 | Returns copy of these parameters with the value added.
The value overwrites an existing parameter with the same name. | class Parameters(OrderedDict):
def add(self, name: str, **kw: Any) -> None:
self[name] = Parameter(name, **kw) | 0 |
2fc009ab95c1d998506990dea209f59a | 1b4405e2eb946fa901c434ef580ae608 | Inicializacion de la configuracion, y carga por ejemplo de las Fuentes
definidas por el usuario. | class JAMatrix():
def setup(self):
if not self.widgets:
self.widgets = pygame.sprite.OrderedUpdates()
if not self.reloj:
self.reloj = pygame.time.Clock()
if not self.fondo:
self.fondo = self.get_fondo(color= VG.get_negro(), tamanio=self.resolucion)
if not self.etiqueta:
self.etiqueta = JAMLabel (te... | 0 |
506e6fb42465f09fa0661f0af3532893 | 04e9f0053ca3c6f79ff39843a62d9504 | I check a yaml definition with a missing lookup. | class TestGet(unittest.TestCase):
def test_get_missing_without_default(self):
result = self.config.get('missing')
self.assertIsNone(result) | 1 |
f6808934fa6269d71eae4add2359b076 | ccb13f2ab2058d4a00bbd545f6eba33f | Calculates the cosine of the angle between the component of the wire vector in the x-y plane and the y axis. | public class VectorFloat
public float getCosY() {
return v[1] / getNorm();
} | 1 |
a6342089f0cd915c776316de0b091331 | 869fb91a11db4fa94a3afb3846971950 | Occurs when directory synchronization process is started. | public ActionResult StartDirSync()
{
try
{
return View(model);
}
catch (Exception exc) { return View("Error", exc); }
} | 0 |
12971067a20914e417cfa4ab01202f1e | 3ba2cc7bf667d972c44de8996c96b4cc | Verify that the 'continue' debugger command returns a truthy value
The truthy value is what triggers the command processor to exit so
that robot can continue. | class Debugger(Variable_Tracer):
def continue_command(self, arg=""):
self.stepping = False
self.interact = False | 0 |
7b54f3336a31c4fcb30112131ab541ef | cbd23182b22077d7c316a9733de94c51 | 查询指定时间段的已交易成功的交易集合 | @Service("trade")
public class TradeService
public List<Trade> findInStatus(Trade record){
return tradeDao.findInStatus(record);
} | 0 |
2667f2354c39933050779ca398744abc | c530278fed351ee67ffb210ed186c598 | Work-around enabling error handling for Fatal Errors. | class ErrorLogging
private function __construct()
{
error_reporting(1);
set_error_handler(array($this,'_customError'), E_ALL ^ E_NOTICE);
register_shutdown_function(array($this, '_fatalError'));
} | 1 |
78a0a63364758b053ce2de480afc1a37 | aae365d5c1daab0a6d2c3bf33a467d07 | Called when the user decides to join the bowler hat team | if request.method == 'GET':
leagueid = int(request.GET['leagueId'])
userid = int(request.GET['userId'])
username = request.GET['username']
user = request.user
contest = request.GET['contest']
level = request.GET['level']
in_league = League_Users.objects.filter... | 0 |
456deabd54a59223be54c368b6bd354c | ca2e7c7620ebeae34f172af0dfc3ffcf | Get Meta Indexers | return Object.entries(klass.meta)
.filter(([_, r]) => r.isIndex)
.map(([_, r]) => ({
isIndex: r.isIndex ? true : false,
isUniqueIndex: r.isUniqueIndex ? true : false,
isMultiEntryIndex: r.isMultiEntryIndex ? true : false,
property: r.property,
desc: r.desc,
}));
} | 1 |
ead63c88ff918f3601f92e24730f866d | 4cdcd7190eecbb76c9e875e9d59546ab | 模糊查找顾客ID或者顾客姓名中包含关键字的顾客信息 | namespace SMOWMS.Application.Services
public class CustomerService : ICustomerService
public List<Customer> GetByKeyword(string keyword)
{
return _customerReposity.GetByKeyword(keyword).AsNoTracking().ToList();
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.