query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
0dcb2b09fa7afac9f78978fd7baf7897 | 4c8aa2cf96e80bf84d2eedf0f71edc26 | Resource가 생성된 경우 데이터를 state에 넣어주고 모달을 닫는다 | closeDelResourceModal() {
this.showDelResourceModal = false;
this.deleteResource = null;
} | 0 |
d90d8e14253ff053797b6859e0afb7fd | ccf597588639525eb38477f36eeec02f | 加载PCD文件到data容器 | loadInputCloud (const std::string &pcd_file)
{
xyz_ = PointCloud::Ptr (new PointCloud);
pcl::io::loadPCDFile (pcd_file, *xyz_);
processInput ();
} | 1 |
dbe193c72e5ac4fecf605f0806187e93 | e2c04b57bd5952c16adf9b3287a1aebd | 查询问答召回数统计列表(知识点粒度,日报) | public List<PtrainAskitemBean> findPtrainAskitemListQue(Map map); | 0 |
6b92565ee4ecc3a2579c8f3c5da0ac6c | 43badfda1d7c4393ecbb2eb87e51a2e6 | Change the field to not being actively set: TargetAmount (HISTORIC_CONTRIBUTION.target_amount) | wallet: Wallet,
): Promise<TransactionResult> {
return this.coreXrplClient.changeFlag(
AccountSetFlag.asfRequireDest,
false,
wallet,
)
} | 0 |
b034e72ede8bde8aa2caff0efe4b84eb | dc7d5262cac9506d7b5eac257898e4e7 | Vende um item para um personagem. | namespace UndeadEarth.Contract
void BuyItem(Guid userId, Guid itemId); | 0 |
dcc48a6ba3dbdde5e0fb187688afea27 | be104a46d5d168c130abe8471f36a8c7 | Check if the entity is a bundle of an entity type.
TRUE if the entity is a bundle of an entity type. | public boolean isBundle(); | 1 |
3347e4a4ddc34f3a7cfb07b2a72b64ff | 5c67274af96e29436297412323ebe35c | @brief Initialise the system tick timer, interrupt every 1ms | void initSysTick(void)
{
while (SysTick_Config(CMU_ClockFreqGet(cmuClock_CORE) / 1000)) {}
} | 1 |
1d56a6ab0a03b42d5cffa55a4e9a70b3 | d762a3d0c872c028377194950dd3d95f | 转发视图 | void viewTv(); | 0 |
db157a9ed5384c314d05afe2a221c04c | 2c190695a1a2917844fd158dad4fdf8a | Do nothing. Bots don't save avatars. | public final class ParticipantNameViewBuilder implements IntrinsicParticipantView, UiBuilder
@Override
public void setAvatar(String avatarUrl) {
} | 1 |
d82a77b77d0e86fc4e69d37195a7a5f2 | 06d212d2d1bdfb167353ab8d659f4191 | load image from file and resize to 32x32 | newImage= PIL.Image.open(path).convert("L").resize((300,300))
imageData = PIL.ImageTk.PhotoImage(newImage)
imageLabel.configure(image = imageData)
imageLabel.image = imageData | 0 |
4d7857f57b2c16060e1fed486c9fcb11 | 4c49a09985ca95c9099f699291a50317 | 大盤 | class ExternalConnector(BaseConnector):
# マーケットの通貨情報とかを取得するメソッド(たぶん使わない)
def getBoard(productCode=""):
path = rootUrl + "v1/getboard/"
response = BaseConnector.getRequest(path, productCode)
return response | 0 |
41cec5030fe43aa8638f2a94043d5282 | 17f0e2a444bcac8bb015a58fdbe8b631 | Handles actor-char attachment to title. | getLookTitle(character) {
return __('Actions:');
} | 0 |
6bd5bf4dbcd91fec68b7bc60cf52c34c | e4d7f6962b3d4fc95ae04bacdb859e99 | 单个盘口委托买和卖分别N次 | class FinancialMarketEnv(gym.Env):
def _buy_stock(self, index: int, action, exercised_actions) -> list:
def _buy_paper(index, action, exercised_actions) -> list:
max_n_assets_to_buy = self.state["cash"][0] // self.data[self.price_colname].values.tolist()[index]
exercised_action = min(max... | 0 |
2229befb3628bde9aa1d7f4c58ea2db5 | 64d23a79906a8d2039b63dad72182f82 | Property setting access control.
Controls write access to email fields. | class I4_LMS_EMAILS
public function __set($key, $value) {
$this->$key = $value;
} | 0 |
015406547b008aafaf979d0c94541f3c | 9cbd098dfd2d908974e738d60661d544 | Set the time the task was last executed | public class ContentMonitor<T extends ContentTeaser> extends BaseEntity
public void setExecutedDate(Instant executedDate)
{
this.executedDate = executedDate;
} | 1 |
214a937f8f0915c879bab54d22f602ef | 92ff1d265524f6f74a2aa8cfa2c94e43 | get megamenu from oauth. | {
if (!$this->access_token && !$this->checkAuth()) {
return false;
}
$result = $this->http_get(self::API_URL_PREFIX.self::MENU_GET_URL.'access_token='.$this->access_token);
if ($result) {
$json = json_decode($result,true);
if (!$json || isset($json['errcode'])) {
$this->errCode = $json['errcode'];... | 1 |
25b89c7ef8b61f1d7d50fd87abc67878 | 6855e01b169625ac9dbb67b60c718b31 | Starts at a given coordinate and changes the cluster to the replace char | void BattleGround::colorAt(int row, int col, char newChar){
colors[row][col] = newChar;
} | 0 |
68278f42e794b48f0cc98176a3a3dd40 | 113093981512206f1054815039283d4a | Writes prediction to mongoDB | class predictLooper
dbWrite(info, index) {
this.db[index].storeValue('predizione' + this.variables[index].name, info);
} | 0 |
0da9e23964dfd7b087891e4757698d22 | 1b882d72e7660eba3ead56de3a6b27ec | <b>转发到登录界面</b> | @Controller
public class UserController
@RequestMapping(value="userAction_toLogin")
public String userAction_toLogin(){
return "forward:login.jsp";
} | 1 |
69a337f68658225d960f2eacb31ca2a7 | 32cfeecb34c2388c484e91682f0081c4 | Add contours to 1D incident photon flux signal axes objects. | class UCN_obj:
def contourf(self, it=None, gr=None, ax=None, **kw):
if it is None:
ValueError("You must specify it.")
hdl = ax.contourf(gr.XM[:, 0, :], gr.ZM[:, 0, :], self.conc[it][:, 0, :], **kw)
return hdl | 0 |
f1ab0c5cc287377bd6022c3412cb9897 | d61594de069507da917c7f6aea623979 | Selects a random ID from the ordered list provided.
The selection is favored towards higher skill values. | {
Random.State _oldState = Random.state;
Random.InitState(_seed);
int _randomIndex = Random.Range(0, GetSelectionList(_length, _mask).Count);
Random.state = _oldState;
return _randomIndex;
} | 0 |
5470acf9c1b452d574c9633eb9100c34 | 5e70eb60f916fd7ba7a84c41e8b6f544 | To swap the colors of two nodes | void swap_nodes(struct Node *p,struct Node *q){
if(p==q){return;}
struct Node *temp=p;
move_node(p,q);
move_node(q,temp);
} | 0 |
37efa664ff5aeaea9d9b82711a65ed0e | 01483521c73ed4819d1564e89f15487e | Gets the recipient names associated with an email address.
This function performs a `GET` to the `/v2.1/accounts/{accountId}/recipient_names` endpoint.
Retrieves a list of all of the names associated with the email address that you pass in. This list can include variants of a single recipient's name that are used for s... | class RecipientsApi
def recipients_get(opts = {})
data, _status_code, _headers = recipients_get_with_http_info(opts)
data
end | 0 |
c10ad5c3b8edbb8310b1f6b36e2d9309 | 2b142ad6ab432fb49ef0b105517313f4 | 从Json格式中读取服务调用参数,并组装成ServiceCall对象
一个参考片段如下 | if (null == jsonParameter || "".equals(jsonParameter.trim())) {
jsonParameter = "{}" ;
}
List<Method> targetMethods = service.getMethods().stream().filter(element ->
element.name.equals(invocationContext.getMethodName()))
.collect(Collectors.toList());... | 0 |
962ea9dc2c6049836e3138589f82c4ff | 57cd4488734510301e01e8ed551455d7 | 代理店コード(agentCode)の取得 | @Service
public class AgentServiceImpl extends AbstractService implements AgentService
@Override
public AgentDetailSvDto getAgentDetail(String dairitenCd) {
try {
AgentDetailBlDto entity = agentLogic.getAgentDetail(dairitenCd);
if (entity == null) {
AgentDetailSvDto result = new AgentDetailSvDto();
Be... | 0 |
9a8e32458b498d60edd158c607c25eac | 8fb9e9f6b0edb30952c6969008ecbb5d | 设置标签的背景色 | class TagView @JvmOverloads
constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) :
FrameLayout(context, attrs, defStyleAttr)
fun setTagBackGround(tagBackground: Int) {
this.tagBackground = tagBackground
updateBackgroundReal()
} | 1 |
b27f2cc869e40e3fbd6e447713b05fce | b163c603043ddbef7cf1356227b31ff8 | export all flows to xml | console.log(definitions)
definitions.rootElements.forEach((el: any, index: number) => {
if (el.hasOwnProperty("messageFlows")) {
el.messageFlows.forEach((el: any) => insertIntoElement(el))
}
if (el.hasOwnProperty("flowElements")) {
el.flowElements.forEach((el: any... | 1 |
798b5be3d7f69679d89ca474a0d9d686 | 3b9517ef5ce045183a5c1317592ce541 | Parse a raw asset name. | class TripadivsorStaticSpider(scrapy.Spider):
def parse_asset_name(self, response):
return response.selector.xpath(self.asset_name_xpath + '/text()').extract_first() | 1 |
a0136df5dae093b11dd849d93d950703 | 84749a2e93a094a80aea2c92a7b36b8f | Wrap the open set in a read-only view | void AsReadOnly(); | 1 |
ce4de55e00ca29f42f63d59bd707e84f | 3e20bd089fd8e62468f5a043d9264e57 | Sets the value of the isTask property. | public class TaskItem
public void setComplete(boolean isComplete) {
this.isComplete = isComplete;
} | 0 |
e2f98ce17de4c7e99572a74fa06eb1e4 | 4d8aa7e4aa0046b6969d329a724b73e2 | criei um validador personalizado para não permitir criação de duas categorias com mesmo nome | {
$errors = array();
if (empty($categories["name"])) {
array_push($errors, "Name is required");
}
$existingCategorie = selectOneInTable("categories", ["name" => $categories["name"]]);
if ($existingCategorie) {
if (isset($_POST["update-categorie"]) && $existingCategorie["id"] != $cat... | 1 |
c31367bbde3f14fd81747fd41c55a5e6 | ef045ecea9a1d79bf8f7c2d4993b523b | Gets results from persistent storage. | const result = this._results;
if (reinitialize)
this.reinitialize();
return result;
} | 0 |
8566c6866f2a588eb08f2b419126c58b | 6cf5b3330b17f3d9ec288ddc6f2c07d7 | registra a função de ativação do plugin no hook apropriado | class HW_HOANGWEB extends HW_Core
public static function register_activation_hook($module_file, $callback='') {
if(is_file($module_file) && !is_dir($module_file)) {
$module_path = realpath(dirname($module_file));
}
else $module_path = $module_file;
if(!isset(self::$hw_global[... | 1 |
cbddd106de94cdf2c4f386443a2b56d0 | b054d8f4c23de34abb4663c97c10cdd2 | test that two objects from sibling hierarchies export correctly with materials | public void testMaterialsExport() {
final Material m = new Material(myTestString, "sq. ft.", 4.50, "Lowe's");
try {
m.exportMaterial(myTestString);
} catch (IOException e) {
e.printStackTrace();
}
assertEquals("Export failed.", "Passed", "Passed");
} | 0 |
86687079c628f371dcf41f83043e6828 | 7ccc835af9e15877782fce03a15bdeeb | @brief 打开默认的配置参数文件 | {
FILE *fp_default_para = NULL;
char temp_str[50] = {0};
char str[1024] = {0};
unsigned int i = 0;
if((fp_default_para = fopen(DEFAULT_PARA_FILE, "r")) != NULL)
{
fscanf(fp_default_para, "sample_time_hours =\t%d\n", &gui_para.sample_time_hours);
fscanf(fp_default_para, "sample_ti... | 1 |
b6cc66eaf58c772c96e4c4be990aaa9e | eff61a3d5b20057c4a5817c87fef170c | 这里返回的是剩余延时,当延时为0 时,此元素延时期满,可从take()取出 | public class BlockingQueueStudy<T>
@Override
public int remainingCapacity() {
return 0;
} | 0 |
ded98e3152bc891c17f9e726626029ba | 4d729e3bc5c3720ccbb47849d0de1e90 | Performs a Layout and arranges all appointments on the MonthView's
appointment canvas. | tableIds = tableLayoutIds();
String[][] dateInfoObj = dateInfoObj();
fillDayDateRows(dateInfoObj);
SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat sdfTime = new SimpleDateFormat("h:mm");
for (Event event : eventsList)
{
... | 1 |
69aceae54fd8e1ebdb3d9a82ef06bb4f | 515cc402e58c01d3c2599335fcf04b7c | The minimum time in seconds that a session must be idle before
it can be swapped out of memory, or -1 if it can be swapped out
at any time. | public long getMinEvictableIdleTime(); | 1 |
d4301a4303b8ab49ef22299c3f77cf15 | 20fe177be049d187779ae6ea76a72639 | Get the max instance quantity in the given item. | {
if(list.ContainsKey(itemType)) {
return list[itemType].maxStackSize - list[itemType].stackSize;
}
return 0;
} | 0 |
21b4b57c6e3eaafde41af18492529120 | 92d9a9236db724cf07ca9d02af42d178 | On each controller action, we reconnect to Cyclos using the cyclos session token saved | {
$session = Mage::getSingleton('admin/session');
$request = Mage::app()->getRequest();
$user = $session->getUser();
$requestedActionName = $request->getActionName();
$openActions = array(
'forgotpassword',
'resetpassword',
'resetpasswordpo... | 0 |
24f1f2f53d9b2f351772bfa38963fc72 | 839e3eb996986d90e4b1200afda4081f | 普通用户组成员 | try{
response.setContentType("text/html;charset=UTF-8");
String userid;
String groupid;
groupid=request.getParameter("groupid");
java.util.Map paramMap=new java.util.HashMap();
paramMap.put("snsgroupid", groupid);
java.util.List list1=snsService.findsnsgroupuser(paramMap);
java.util.List list=... | 1 |
5139450dc0565d10f8b552ee62ba9663 | 5111b8b21f037aa6461d1c359f183207 | получение значения поля login с подрезкой пробелов | {
string loginI = null;
try
{
loginI = loginI + funcDictionaryInic(imya[0]);
}
catch
{
loginI = loginI + imya[0];
}
return loginI;
} | 0 |
1c249dea9b751b6dc628c645545d9fcc | 677ca04bfb4fbcc5d4dc46839ff389c3 | Code hook called after Amazon Lex successfully captures a slot value. | def post_process_slot_value(key, value):
logger.debug('<<BIBot>> post_process_slot_value() - returning key=%s, value=%s', key, value)
return value | 1 |
4d2cbff5e5af0cfb67dea86dd867632f | 44ceb4d1819882cc5e84af460964e4d7 | 在某个事件类型前面添加一个新的事件监听器 | class EventEmitter
prependListener(type, listener) {
return this.addListener(type, listener, true)
} | 1 |
d274e69d153d40e381431fdec9d3985a | 1a3b00485e7f04c8c0a81b4b1a01eb5d | Определяет является ли переданная компания банком | @Component
@Scope(proxyMode = ScopedProxyMode.INTERFACES)
public class CompanyRepositoryImpl extends AbstractSecuredRepository<Company> implements CompanyService
@Override
public boolean isBank(final Company company) {
return company != null && !company.isNew()
&& !CollectionUtils.isEmpty(co... | 1 |
0f03ff43b7d6f0527c968de5673f1707 | 9ad6c689849a582a07caf1e4dab37073 | Recorre el tablero de izquierda a derecha, de arriba abajo y se fija si es
posible hacer algun movimiento o si en alguna posicion hay algun GANADOR. | class Tablero:
def __check_gir(self):
puntos = rota(self._pieza.get_tipo(), self._pieza.casillas())
for i in puntos:
if i.get_x() >= self._x or i.get_x() < 0:
return False
elif i.get_y() >= self._y or i.get_y() < 0:
return False
else:
... | 0 |
339539adaf5df5f8e368f9a2f225b9e2 | 36c49aed1711c8c9439bce789aa160ea | 功能:随机生成邻接矩阵 | tbl = [[None for j in range(n)] for i in range(n)]
for i in range(n):
for j in range(i + 1, n):
tbl[i][j] = random.randint(1, max_distance)
tbl[j][i] = tbl[i][j]
return tbl | 1 |
160a573601695a502661871ef0d92aa8 | 3e6f04a62972722bce2afcfc02264474 | Delete a product tag link permanently. | class ProductTagController extends Controller
public function destroy($id)
{
$this->productTagRepository->deleteById($id);
return redirect()->route('product-tags.index')
->with(config('core.session_success'), _t('tag') . ' ' . _t('delete_success'));
} | 1 |
2c8df1545cd747515c902247dc0b2f87 | 415943e603e83f11c49573b54e3dbeca | Sets the value of the address1 property. | @Entity
@Table( name = "address" )
public class Address
public void setAddress1( String address1 ) {
this.address1 = address1;
} | 1 |
4b0165ead049aa01662353fa27fdbc72 | bf9486003a291e3d8d9785c16c4533bf | Main dancing links solver. | if start == end:
return []
nodeProps1 = {start : NodeProperties(None, 0)}
nodeProps2 = {end : NodeProperties(None, 0)}
parent1 = {start : None}
parent2 = {end : None}
deque1 = deque()
deque2 = deque()
deque1.append(start)
deque2.append(end)
result = []
while T... | 0 |
f24284dba80b3cec40a4147dee75ba55 | 2f0f2f9e36655a5b7188dc84a9e31e5c | Creates test JSONComponents. | ArrayList<DependenciesEntry> entries = new ArrayList<DependenciesEntry>();
Component a = new Component("a", "1.0", ComponentLanguage.JAVA);
List<ComponentDependency> aDependencies = new ArrayList<ComponentDependency>();
aDependencies.add(new ComponentDependency("b", "2.0", ComponentLangu... | 0 |
cf55b5db1a7743f501c68b6308e862d0 | 25f7f019e0bb710b87992b7e5dc8df0d | Returns a list of extra libraries to scan before the standard ones | public function getExcludedLibraries(); | 0 |
5560bc0c0e67beb176f62f6151dd1e01 | 03b5f34deae76bd00b3966577087c948 | open case file in external reader | static idl_action
idl_fileOpen(
idl_scope scope,
const char *name,
void *userData)
{
OS_UNUSED_ARG(scope);
OS_UNUSED_ARG(name);
OS_UNUSED_ARG(userData);
idl_fileOutPrintf(idl_fileCur(), "using DDS;\n");
idl_fileOutPrintf(idl_fileCur(), "using System.Runtime.InteropServices;\n");
idl_... | 0 |
3251400515f1503415f04b8e1599c884 | 2943ea72a4db3239beb8f557e12cf557 | Test Response Header setter and getter | class ResponseTest extends BaseTestCase
public function testWithHeader()
{
$serverHeaders = [
'test' => 'test_' . mt_rand(),
];
$newHeader = 'test_new_' . mt_rand();
$stream = $this->getMockBuilder(StreamInterface::class)->getMock();
$response = new Response(200, ... | 1 |
b2c9c5fa5289ef6c119d9a1ea47597cd | 7ef7edef2135ba9a53ea9291bd738b4b | Colapso day -> month: debe haber valores hasta el último día del mes | def compare_last_year_today(rec, ids, mun):
date_t = datetime.now()
year = date_t.year - 1
count = 0
query = {"q": "{}".format(mun), "limit": 3000}
query["resource_id"] = ids[0]
url = 'https://cali.ckan.io/api/3/action/datastore_search'
resp = requests.get(url, params=query)
records = re... | 0 |
2ece6c5414fa38f2561c74b07a2183aa | 3e91f21cdcb72fb9c3a174bb16e15fdc | Returns the manufacutuerID of the inventory item | public class UPBProduct implements UPBProductI
public int getManufacturerID() {
return manufacturerID;
} | 1 |
bb52e2c55186ecf9fe5e8bb72cfd0e3b | eb1ab7b6087b44eb738939b9582b8bb8 | 将商品加入商城中 | public void eventGoodsToShop(AGoods goods); | 1 |
ab8344ae0c24107b6e6d8e17ed5354b9 | c89c545c2abe087ccd2cd287266a910c | Fix-up URL when page rendered from search engine cache or translated page | class tx_sduconnect_pi1 extends tslib_pibase
function fixLinks($content) {
$host = ($this->conf['host'] ? $this->conf['host'] : t3lib_div::getIndpEnv('HTTP_HOST'));
$pattern = '/(\'|")((?:(?:http:\/\/' . preg_quote($host, '/') . '\/[^\?"\']*)?\?).*?)\1/';
$group = 2;
$matches = array();
preg_match_all($patter... | 1 |
b90a3f816cf71cb0ac411ecd1849616c | 9a3831ec65a8d78811c1f7aff589993b | Upload a new image using a URL. | public function uploadFromUrl($url); | 1 |
fe76da71467b2f11b87360472c157e89 | 67b311f35ae988bfaf88fbd7b42036e8 | Metoda koja pronalazi najbliži objekt kojeg dodiruje zraka(ako postoji) i
poziva računanje boja | public class BeetleController
public static GeometryObject seekGeometryObject(ByteImage original) {
for (int i = 0; i < original.getWidth(); i++) {
for (int j = 0; j < original.getHeight(); j++) {
if (original.getPixel(i, j) == BeetleFinder.BLACK_VALUE) {
Geometry... | 0 |
72062d8ec8dc865d4b4cf38b61d98245 | f93a59a78cb3244359802f832dac4d47 | What loses to the input value | double TLpPredictor::GetLoss(const double& Val) const {
if (Val < 0) { return 0; }
else if (Val < Z) { return Val*Val/(2.0*Z); }
else { return Val-Z/2.0; }
} | 1 |
c16ecf310bd7f0cf3920f9de67c87417 | 0c4fc510cf703e05619d86ce7a0d91ba | POST /vendor_brands
POST /vendor_brands.json | @vendor = Vendor.new(vendor_params)
if @vendor.save
render json: @vendor, status: :created, location: api_v1_vendor_path(@vendor)
else
render json: @vendor.errors, status: :unprocessable_entity
end
end | 0 |
56fff57baafd107f32ec1529fc8ccdcf | 9a319f2749824bcf76ba271669ad9a51 | Método que asigna los íconos a cada Tab | public class MainMenu extends AppCompatActivity
private void setupTabIcons() {
tabLayout.getTabAt(0).setIcon(tabIcons[0]);
tabLayout.getTabAt(1).setIcon(tabIcons[1]);
tabLayout.getTabAt(2).setIcon(tabIcons[2]);
} | 1 |
d52fcfa6d3299e2da74200d1e407e497 | 5e601f7d4209d429a766b5b36e5bdc49 | resets form field after user submit | class Signup extends React.Component
resetForm() {
this.setState({
lastName: '',
firstName: '',
email: '',
password: '',
redirection: false,
});
} | 1 |
7ad57dc1102683b9b7ce2aae30045bc5 | ae725fbaa5de13b088168adc9485a6fb | Returns a description of the translator to enable users to choose
the translator they need. | public JobDescriptionTranslator getJobDescriptionTranslator() throws NoSuccessException; | 0 |
597f2939b9c9b689239f3579d5945efd | acdebfe2e3d474f53c813d7b1b5dc9d8 | 返回sys_GroupTable实体类的ArrayList对象 | open class MiraiGroupList(val groups: ContactList<Group>): GroupList
override fun getList(): Array<com.forte.qqrobot.beans.messages.result.inner.Group> = groupList | 0 |
3bd1510d17dc84e3c7e89a84f8dff573 | 7b9ae884f59275df9f791c73a52de50b | 白の残り時間の表示を変更する. | public class InfoPanel extends JPanel
public void setWhiteTime(double time) {
whiteTime.setText(time + "");
} | 1 |
639274504cd12452be759539758ba0cc | 36e576f1da73617a4028dc57f51820f5 | 弗洛伊德算法 | int A[MAXVEX][MAXVEX],path[MAXVEX][MAXVEX];
int i,j,k,pre;
int count[MAXVEX];
for(i= 0;i < G->n; i++) {
for(j = 0;j <G->n;j++){
A[i][j] = G->dis[i][j];
path[i][j] = -1;
count[i] = 0;
}
}
for(k= 0;k < G->n; k++) {
for(i = 0;i <G->n;i++){
for(j = 0;j < G->n;j... | 1 |
e724b1fdae6ff774e5f96cc99d23cca5 | 0f24a4d142ef9a60324a33f08f8806df | 判断是不是字母行,通过key比较,这里是NameValuePair对象,其他对象,就由你自己决定怎么判断了. | public class HttpUtil public static String getQueryStr(Object bean) throws Exception
public boolean apply(Map.Entry<String, Object> input) {
return !(input.getKey().equals("class") || input.getValue() == null);
} | 0 |
3272a05728c43d8a7f948fce7f54477f | 6c824bd84999a405d532a53dfa8b8274 | 绑定KeyUp事件 | {
#region 键盘事件
this.owner.KeyDown += (s, e) => { this.DoKeyDown(e); };
this.owner.KeyPress += (s, e) => { this.DoKeyPress(e); };
this.owner.KeyUp += (s, e) => { this.DoKeyUp(e); };
#endregion
} | 1 |
ef5753db4098adf597867baa226c2366 | e8a461bd6a24b4c29389925a2883e368 | Compute the efficiency gap expectation over many simulated elections.
This uses the same estimator as `get_efficiency_gap`,
but computes the efficiency gap over many simulated elections. | params_ = params.copy()
options_ = options.copy()
n_datasets = 100
sim_seeds = np.linspace(0, 99, n_datasets)
sol_seeds = np.linspace(1000, 1099, n_datasets)
col_to_keep = [
"Experience_A",
"Experience_B",
"Experience_Edu",
"Present_Bias",
"Discount_Rate",... | 0 |
bf13588c701bcb7430625d746135bbc3 | eee98e8afd885aca71ab25465fbcb067 | Returns the Reading Histories | public HistoryPO[] getHistory() throws RemoteException; | 1 |
5907e0033df7e79a99191fc3c1bf05e7 | f07e916d4b4119976f8d521f15b0658e | Convert the splash angles to mcfost angles | def convertEmanEulersToXmipp(alt, az, psi):
phi = math.fmod((az-90), 360.0)
theta = math.fmod(alt,360.0)
psi = math.fmod((psi+90), 360.0)
return phi, theta, psi | 0 |
e5fca614032fdb851f8271c607c4f474 | 56fd720d3d8293d62e1ebb0e32f62c75 | 鼠标覆盖时,显示按钮组 | {
this._group.mouseover(function(event){
if (self._stateChangeEvent != null)
self._stateChangeEvent({Button: self._buttonNum, stateEvent: event});
})
this._group.mouseout(function(event){
if (self._stateChangeEvent != null)
self._stateC... | 0 |
39378b4f0fdf132b26ffe296c7ccbb21 | c826760a95812df8cd140d4954b40f40 | Initialize any variables used in this state while it is active | {
mWorld = World;
mPlayerId = PlayerIndex;
mActive = false;
_counter = 0;
} | 1 |
6110fe77c8dcec654520136d274b96b9 | a81fd2d948a5971b157f660760d8bd3a | saves the error metrics (stored in `results`) as a csv file | class LearningModel:
def errors_to_csv(self):
if self.results is not None:
errors_df = self.results
path = self.output_folder + 'error_metrics_csv/'
if not os.path.exists(path):
os.makedirs(path)
errors_df.to_csv(path + 'errors.csv') | 1 |
cfd0e1a38c5243a8664286cd9101731d | f697952da8e2b625a0541e20a1fd5248 | Check whether the moving player has just won by reaching the back row or by capturing all the opponent's pieces. | {
return (numberOfDiagonalsWithExactly(3, forLastPlayerToMove) >= 1) ||
(numberOfVerticalsWithExactly(3, forLastPlayerToMove) >= 1) ||
(numberOfHorizontalsWithExactly(3, forLastPlayerToMove) >= 1);
} | 0 |
bedc2e2622c37508832030f212c60c9f | 0b9daf0fbd929b393d4876aaf682dc24 | 获取所有“省”和“市”的列表 | @RestController
@Api(tags="区域地址", value = "/regioninfo", description = "省市区 区域接口", consumes="application/json")
public class RegionInfoController extends BaseController{
@RequestMapping(value = "/regioninfo/getProvinceCity", method = RequestMethod.GET)
@ApiOperation(value = "获取所有省市", notes = "获取所有省市列表", response = Re... | 1 |
ae546e96faa2ee2a5f7dd607b4d5f76a | 541602476e77743d1deaa0a4d6c63a15 | 设置最大允许的HTTP并发请求数,默认值:1000 | void setMaxRequestNum(int maxRequestNum); | 1 |
67a8dc5177596c04e7096084d3a58491 | ba48a53c259066fe1f25153657fa950d | 模板列表控件单击事件 | {
try
{
LoadData();
pnlTitle.Focus();
}
catch (Exception ex)
{
LogHelper.WriteLog("刷新选择模板界面失败,原因:", ex);
}
} | 0 |
f8529db670a0c7760eb4f6fa0aff382e | ad4f6ff862a910a841f7f87bee5ea2e3 | Log all Adwords Links Destinations to a sheet. | class ReportLogAdWords:
def __init__(self, klops):
self.klops = klops
self.sql = klops.sqlconn | 0 |
511f675d9ae9c895d3170217238cb33e | b40160c01a64ebedd5aec4b71d4778bc | Save Test Session | class TQB_Database
public function save_test( $model ) {
if ( is_object( $model ) ) {
$model = get_object_vars( $model );
}
$_columns = array(
'id',
'page_id',
'date_started',
'date_added',
'date_completed',
'config',
'status',
'conversion_goal',
'title',
'notes',
'auto_win_ena... | 1 |
9439d1488fff23431db03c632be802a9 | b0acfc8469aee040ab77811641a66373 | Operation archiveStream
Archive a stream. | {
Q_D(QMPQArchive);
void * hFile;
bool result = true;
int size = data.size();
if (!checkOpened())
return false;
result &= SFileCreateFile(d->mpq,
archivedName.toLocal8Bit().data(),
0,
size,
... | 1 |
ca1a97aeb5934ed9c22ab9f2dd665c48 | f776c265133775e09d8d2a8f15d6bfb9 | Kiểm tra chuỗi để khôi phục mật khẩu có đúng hay không | namespace WCF_Service
[OperationContract]
bool KiemtraDk(string tendangnhap); | 0 |
6e8831d10ef668aeff0aa87b0f359ca3 | 79f38e7463f29cf70f9937c8648ba4b9 | @brief : disable the IMU module | void API_StopImu( void )
{
LSM6DS3_Sleep();
} | 1 |
3f5ff97711ba67e1433165346ec174bd | 212291194838b11a512d7e8c3d64b924 | Submit code for algorithm to guess, then repeat until solved | while (!puzzleSolved) {
int guess = 0;
for (Player turn : Players) {
Players.get(guess);
guess++;
playTurn(turn);
if (puzzleSolved) {
break;
}
}
}
} | 1 |
011d8d93f6c464d6c32f44180c5976a3 | 9a4840c03fe33972b524bda7faeaafc3 | CheckDestinationMaster performs multiple checks on a destination master. | var (
srcRouterID string
srcGroupName string
srcPrimary string
srcSecondary string
srcRouteFilter string
destPrimary string
destSecondary string
bandwidth string
)
r := regexp.MustCompile(`^[\w&()-]{1,64}$`)
validateSrc := func(splitSrc []string, isPrimary, hasSecondary bool) err... | 0 |
fe6a6d9cbc2d490fabf77980d09814b3 | 4a4ad5591d42330f21ff89f01ec8877e | Gets the locator with the specified content id. | namespace Boa.Constrictor.WebDriver
public class WebLocator : IWebLocator
public static WebLocator Id(string id) =>
new WebLocator($"ID for \"{id}\"", By.Id(id)); | 1 |
458848d636ecc164b5c990b98c0d56d0 | 4caadf23eb9a74f6246a9878541e7b31 | Setter method for twelfth argument | public final class Task extends MPXRecord implements Comparable
public void setNumber12 (Double val)
{
m_number12 = val;
} | 1 |
e9c84f82083827232275acfd9a56fd22 | 9187c71b43d70742abdbe4ffcb26b1da | Setter for maximum HTTP connection age. The units are in minutes. Value must be > 0 for objects to
expire. Values <= 0 means the HTTP connections never expire. | if maxAgeSeconds.class == Fixnum && !block_given?
@j_del.java_method(:maxAgeSeconds, [Java::int.java_class]).call(maxAgeSeconds)
return self
end
raise ArgumentError, "Invalid arguments when calling max_age_seconds(maxAgeSeconds)"
end | 0 |
76bb17536d5e68a36fd2a7dc7ad5874b | 9b596070892e6c74b604ebc65d451ebc | Get the black player of the game | class Game:
def player_black_id(self) -> str:
return self._player_black_id | 1 |
60441ecbdea4099847c54599f5d6e19e | ae9350ec86be2281ccde9fb45b62f6a1 | 左ステップ | class Change extends InitArray
public function Left($player, $y, $x, $array) {
$buck_array = $array;
if ($array[$y][$x - 1] == " " . (3 - $player)){
$array[$y][$x] = " " . $player;
}
while ($array[$y][$x - 1] === " " . (3 - $player)){
$x--;
$array[$y][... | 1 |
a7b82ad146844a853a14faa3e2153293 | 0da06b4bda77dd0fa35465b0b06d48bc | Evaluation of a simple predicate, that uses the "xs:decimal()" function. . | @SuppressWarnings("all")
public class OpNumericEqual extends QT3TestSet
@org.junit.Test
public void opNumericEqualdec2args1() {
final XQuery query = new XQuery(
"xs:decimal(\"-999999999999999999\") eq xs:decimal(\"-999999999999999999\")",
ctx);
try {
result = new QT3Result(query.value());
... | 1 |
16e964ec86e5842e4dd54b080c2c95e0 | 6adf56d2752295f69011cc32657fcba2 | POST: api/auth/logout | namespace WebAPI.Controllers
[Route("api/[controller]/[action]")]
[EnableCors("FreePolicy")]
public class UsersController : ControllerBase, IUsersController
[HttpGet]
[ValidateAntiForgeryToken]
public async Task<IActionResult> LogOut()
{
try
{
... | 0 |
154a22d24004534b5740c9156c69a4ab | aac7cf4087da21b8c55b669ef022a431 | Outputs the user-defined widget CSS that gets inserted into every blog
page, assuming that the user actually specified some styles. | global $post;
$output = '';
$custom_css = get_post_meta(get_the_ID(), 'custom_css_style', true);
if ( ! empty( $custom_css ) ) {
$output = "<div id=\"customCSS\" data-css=\"" . $custom_css . "\"></div>\n";
}
echo $output;
} | 1 |
0f75554eade359e8e16148d7e5ab1036 | 4cdb580e0243ed806855319563e9b191 | подготовить списки возможных значений,
взяв их из соотвествующих моделей | class SelectRelation extends FormWidgetBase
public function prepareVars()
{
$this->vars['name'] = $this->formField->getName();
$this->vars['list'] = (new $this->modelClass)->all()->lists($this->displayField, $this->valueField);
$this->vars['value'] = $this->getLoadValue();
$this->var... | 1 |
56c899feee6df3f174ed7cc92988e36d | 47b253539ca2b32b3dfdfe74fb243aaa | This method checks the vector data for duplicates | {
int iSize = 0;
Vector v = new Vector();
for(int ndx = 0; ndx < vData.size(); ndx++) {
v = (Vector)vData.elementAt(ndx);
if(ndx == 0) iSize = v.size();
if(v.size() != iSize) {
v = null;
vData = null;
return false;
}
}
v = null;
vData = null;
... | 0 |
47526d305205807d6d11f877864eb2dd | 5bfec41ac16558f01cdd74fd0806748a | 判断该行是否有描述信息或者注释信息 | public class XLSSheet
public boolean hasDesc() {
return desc != null && !"".equals(desc);
} | 1 |
cb1f75f340d66545a838f034f7adde5f | fa163b0cf9b2d3dbf9c26ee22dbd2059 | 按条件分页查询(高尔夫组团详细表)信息,模糊查询 | public int getGolfGroupDetailCountDim(Map<String,Object> paramMap); | 0 |
42a23dcccbdd4f5eabfa2218508e056a | 9067278a4f96426c946d37f03158fbfb | Verify that the correct number of target are filtered | def _is_filtered(config, tu_list):
tu_list = _run_pipeline(config, prepoperator.ProcessType(Task.TRAINING), tu_list)
return len(tu_list) == 0 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.