query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
b7dd011ea6ab355208de9a8990883eb7 | 9f410cdc61b5fc7d35c3c247d5975e62 | 状态中包含的最后日志条目的任期号 | public final class RaftLog
public int lastLogOrSnapshotTerm() {
return lastLogOrSnapshotEntry().term();
} | 1 |
d90e0eae834e604be0bf99edf3b06d1a | afa4651aa79743dd8e0ea4822aa3573b | 頻度超過チェック | positionList.forEach { (_, v) ->
if (v >= 4) return true
}
return false
} | 1 |
582717c0bdb5a0af0882775ef4c3d5a2 | 3179201ecba3e586559620c5d77d60e3 | if we're in melee lock, we have to pick an enemy with whom we are locked | void fighter_locking(FIGHTER_MEMORY* my_mem,FIGHTER_SKILL* my_skill) {
if(!my.lockon) {
if(my_mem.lock_ent != NULL) my_mem.lock_ent = NULL;
my_skill.lock_time = 0;
if(my_mem.close_targ != NULL) {
ENTITY* temp_ent = my_mem.close_targ;
if(my.in_use == 1 && my_skill.use_press == 0 && vec_dist(my.x,temp_en... | 1 |
48a9bfcf7e82b494cbc711830ae967f2 | 41d7353409a216b4ece99ce0f73e9c69 | Create neutral pod for layers without statistical information | class CumulativeStatisticsLayer(base_layer.BaseLayer):
def NullState(self):
return py_utils.NestedMap() | 1 |
69057d995ee08ea4355f1901aede9686 | f39c74f430d29d5df7f91209b454334c | membersihkan layar jika tombol reset di klik | namespace AnekaFortuna_rev1._1
public partial class MasterKaryawan : Form
private void btnReset_Click(object sender, EventArgs e)
{
refreshDGVKaryawan();
refreshControl();
} | 1 |
ac2109eba85edc9dae1d8b201c74a02c | bc2205617364497627c4cc7887933828 | saves region into DB if it is not already in there | void addToOnlineRegions(final DBRegion r); | 0 |
be76f1606f4421e1c92aef97e6c1979c | d7396a6de459e07fa2ec9a47b1a78bcd | total kinetic energy of one mass moving in one dimension | double kineticEnergy(double m, double v)
{
double ke = 0.5 * m * v * v;
return ke;
} | 1 |
1168cf8cde3609f2f8a4b074a5b002fa | ba38ecfc40660ea0b5fe10eebb464ade | Sets the current reset next substream option
true means, that it is set to jump to the next substream after
each replication | public void setSendNextLink(boolean b); | 1 |
461d83dfd48451b9ef2875576da8dd78 | 3cf9d18bf45f673699d012b921302386 | Evaluates a detection function. Given the output of a detection function we
find the peaks, and compare them to a list of ground-truth annotations.
Then print out the maximum F-measure found and display a precision-recall
graph. | def main():
parser = argparse.ArgumentParser(
description=__doc__.split('\n')[0] if __doc__ else '',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument(
'--coco-eval-pickle',
help=("Pickle file containing a COCOEval object; usually "
"'detec... | 0 |
29118fce60d6ec6d3928b086049beb10 | c2b378c84b3feb09e3ed43c0db7d6926 | 转化为标准金额显示
例如 1235.26 -->1,235.26 | {
if ($money == null || $money == '') {
return '0.00';
}
return sprintf('%01.' . $number . 'f', $money);
} | 0 |
54c7ed56a69351453a6a5128adbc9982 | c5f062de96829e67747fd60233cc0341 | Return a hash of query parameters, with the +key+ added if it doesn't
exist, or, if it's already in it, it adds it as an array key. | class CompoundQuery
def build_key_values(input_hash)
input_hash = input_hash.clone
keyarray = []
omit = input_hash.delete(:omit)
input_hash.each do |key,val|
query_tag = []
val = val.rfm_force_array
val << nil if val.empty?
val.each do |v|
@key_values["-... | 0 |
f771c401b7817676840281df71bae049 | 457d78f58d408ef7e1e218daaa217f1d | From PubChem keys in array to keys used in view | {
return $models->mapWithKeys(function ($item) {
return [
$item['name_cmc'] => [
'id' => $item['id'],
'symbol' => str_slug($item['symbol'])
]
];
});
} | 0 |
d45ab8c256837bf20fbb1f653c710656 | 67c5c02bce785a96309779c0ec499cf8 | Creates a new ninja and adds them to the DB | query = table.insert().values(
chan = chan.lower(),
name = nick,
shot = shoot,
befriend = friend)
dbEngine.execute(query) | 1 |
6b0bac646080aad627ab26e4afd6bd01 | 1c898f37dab92c226f0c351f4bea12f3 | Updates a value in an array using a path string, eg 'some/setting/here'. | const segments = Array.isArray(path) ? path : String(path).split(".");
if (!segments.length) {
throw new Error("Path cannot be empty");
}
const key = segments.shift() as string;
if (segments.length) {
if (!obj.hasOwnProperty(key)) {
if (segments[0].match(/^\d+$/)) {
... | 1 |
46f67f15da0ca877e45c2e12848b74c2 | e06f0bac5d948534499bf7d6f9f75f44 | Copies all assets from a given source path | public function copy(string $sourcePath, string $destinationPath): void; | 1 |
3dc53b3b6db7c8eb915b3d690f3ee0d3 | 69b1ce0e86521dbe13a3dc826c65c6f4 | Diese Methode testet, ob der Submit Knopf angezeigt wird oder nicht (setzen und holen aus der Datenbank). | public class PersistentTaskConstellationTest extends PersistentAssignmentBefore
@Test
public void setGetSubmitButtonTest() {
try {
testTC.setSubmitButton(true);
assertTrue(testTC.submitButtonExists());
} catch (DatabaseException e) {
fail(e.getClass().getName() + ": " + e.getMessage());
}
} | 1 |
2c049307576b3945eb3a876193a533d5 | b05f513ab2a518393cf9069592ddc585 | Identical to cart2kep_array
Converts arrays of cartesian coordinates to arrays of keplerian coordinates
Provided so that Holman's legacy code will always work | num = len(cartStateArray)
StateArray = Classes.CartState * num
a_arr = np.zeros((num), dtype=np.double)
e_arr = np.zeros((num), dtype=np.double)
incl_arr = np.zeros((num), dtype=np.double)
longnode_arr = np.zeros((num), dtype=np.double)
argperi_arr = np.zeros((num), dtype=np.double)
mean... | 1 |
8a0ca01dee7d0bce1aab1c331010e4f9 | 06967082698e3fdf7678baa7566b0f12 | Event on button to play all turns. | public class BingoGame
public void onPlayButtonClick()
{
card.initialize();
int countOfNumbersCalled = 0;
if(registeredStrategies.isEmpty())
{
onCompleteRowWinsButtonClick();
onCompleteColumnWinsButtonClick();
onCompleteDeclineWinsButtonClick();
... | 1 |
f8763ec20960a7b71a9fd2e3a83c395d | c841993bb581b753711cdd1cbb4fbebb | Creates and sets the TableModel. Also arranges for some columns
to have their particular renderers and/or editors. This method
will be invoked when the dialog is created, and every time a
change request from above causes the table to change. | updateSelectionOnSort = true;
setOpaque(true);
createDefaultRenderers();
createDefaultEditors();
setTableHeader(createDefaultTableHeader());
setShowGrid(true);
setAutoResizeMode(AUTO_RESIZE_SUBSEQUENT_COLUMNS);
setRowHeight(16);
isRowHeightSet = false;
setRowMargin(1);
setRow... | 0 |
21051423dad1262dc448c47cde29b3d1 | 7f1a6b7fdccf385231ff39f04aa548b5 | slot that begins the clock & music | engine.release(1)
engine.pw(0.5)
engine.cutoff(1000)
audio.level_cut(1.0)
audio.level_adc_cut(1)
audio.level_eng_cut(1)
softcut.level(1,1.0)
softcut.level_slew_time(1,0.25)
softcut.level_input_cut(1, 1, 1.0)
softcut.level_input_cut(2, 1, 1.0)
softcut.pan(1, 0.0)
softcut.play(1, 1)
softcut.rate... | 1 |
2e741abfa15e3bef61081975e00b63fe | 23f38e9252847aa9690c16c41b49033c | 把输入转化成字节数 | {
var resultInBytes = new byte[input.Length * sizeof(char)];
Buffer.BlockCopy(input.ToCharArray(), 0, resultInBytes, 0, resultInBytes.Length);
return resultInBytes;
} | 1 |
27529832885840092bf4ef7f70f8b7ad | c0e4c5e22aa07826748a1b28bf635285 | Inicializa lista de Natureza de Despesas e
instancia objetos necessários | class Orcamento(object):
def __init__(self):
self.__itens = []
self.estado_atual = EmAprovacao()
self.__desconto_extra = 0 | 0 |
fe5661e3d2100a0d861bd69d51d80e8e | 59c7400ae7bbc03616613a63ae629fd1 | Given a list of style prop names, map each to its corresponding category and return
a map of style props grouped by category name.
e.g.
'Flex container': ['alignContent', 'justifyItems'],
} | var map = {};
for (var i = 0; i < list.length; ++i) {
var category = list[i][categorize];
if (!map[category])
map[category] = [];
var value = list[i];
delete value[categorize]
map[category].push(list[i]);
}
return map;
} | 1 |
4053c2afc900545d84f380700e9a9cf2 | ceb0088cf30b6d126e4834b596fc7fea | BFS assigning distance from the closest binding site. | class Vectorizer(AbstractVectorizer):
def _single_vertex_breadth_first_visit(self, graph, root, max_depth):
dist_list = {}
visited = set()
q = deque()
q.append(root)
dist = {}
dist[root] = 0
visited.add(root)
dist_list[0] = set()
dist_list[0].add... | 1 |
d4ab3c7b40575c1ef211c146c7cc61a2 | 1ce7a7d51583251ee7e923eb370e5011 | 初始化技术分析界面 | UIManager.setLookAndFeel("com.jtattoo.plaf.mcwin.McWinLookAndFeel");
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
analysis frame = new analysis();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
} | 1 |
4ecab70b84f81910864b2cb0dcfa36e6 | 4fc96b33b890ea55e624ebaa4a7278ee | au 簡易位置情報を取得するためのリンクを返す。 | def test_au_location_link_to
request.user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)'
get :au_location
links = get_href_and_texts(response.body)
assert_equal(1, links.size)
text, _, path, params = links.first
a... | 1 |
21fb5225dfd5a4f90740c5328d75b16a | e41af2c19c8ea3a37c9722c0e6fcc56d | Marks the receiver's header as visible if the argument is true, and marks it
invisible otherwise. | public void informVisibility( boolean visible ); | 1 |
d950d5c658685efc4d66db421fa4d581 | cc435578d9d3bb8a640d0c26de2f3ea8 | 根据email生成nickname | if(StringUtils.isEmpty(email)) return null;
String prefix = email;
String endWith = "";
if (email.indexOf("@") > 0) {
prefix = email.substring(0, email.indexOf("@"));
endWith = email.substring(email.indexOf("@"));
}
if (prefix.length() <= 2)
prefix = prefix.substring(0,1) + "****";
else
prefix... | 1 |
ba8933d9afbed1e7ca6d148dee73e666 | 769d2ac9fd8bcff1773a71367846e5ba | 最小费用最大流
返回最大流的最小费用 | namespace MCMF
int minCost(int n, int s, int t) {
while (spfa(n, s, t)) {
int adt = ~0U >> 1;
for (int x = t; x != s; x = e[pre[x] ^ 1].v) {
adt = std::min(adt, e[pre[x]].c);
}
flow += adt;
cost += adt * dis[t];
for (int x ... | 1 |
b15aef07c14bbb7316050fd1e05cf6f1 | d082ea616d9cdeaaf6fdfec5d8ffd6fc | Visualização 3: Óbitos | background(29, 155, 85);
image(imgfase3, 0, -45)
image(imgcaderno, 25, 360)
noFill()
rect(faseX, faseY, 145, 35, 10)
textSize(18)
fill(0, 0, 0)
text("Estava correndo e esbarrei ", 145, 115)
text("no coleguinha.", 145, 135)
text("O que eu devo fazer?", 145, 155)
textSize(14.5)
fill(0, 0, 0)
tex... | 0 |
a364cf8d9298b5ea4fc76227a5f86883 | 6c1d6e63e4e5638ca81bff60e893a481 | If we can't resolve the host connect should return immediately. | payload = dns.Record_SRV(port=5269, target=b".", ttl=60)
client.theResolver.results = [
dns.RRHeader(
name="example.org", type=dns.SRV, cls=dns.IN, ttl=60, payload=payload
)
]
self.connector.connect()
self.assertIsNotNone(self.factory.reaso... | 1 |
7de8700f384af6d375574568c09dc272 | be804825836764355e8cad6de65b40a4 | 老会员绑卡抽奖接口 | class StartBeforeNew(object):
def new_customer_card(self):
url_customer_card = url_conf + '/api/rts/member/membershipCard/purchaseNewCard/V141'
payload_new_store = {
"rechargeAmount": "1000.0000",
"systemDictionaryId": "456084858905566471",
"journalDate": StartBefo... | 0 |
01ac3d86a0a940d192cc961c12645f51 | 4c4a28b17fbef3914a265223dc38c82e | Validate that the manual grade submitted for a particular question is in range. | var grade = -1;
try{
grade = parseFloat(args.Value);
if (isNaN(grade)) {
args.IsValid = false;
return;
}
} catch (e) {
args.IsValid = false;
return;
}
document.getElementById(source.controltovalidate).value = grade + "";
var maxGrad... | 1 |
278ec7b3e4ffa5f62376026dd76ae081 | 82f635155182a2399e57e1d35a1b9784 | Generate the JSON from the data | public static function generateJSON(); | 1 |
0f9486096129b0d8ff3fa878925e2a62 | 151fa327275361c83d0ea9034ed1e8f2 | 得到某人发布的所有工作<br> | @Controller
public class ShowPageController
@RequestMapping("/people/{domain}/admin/p/getWorks.json")
@ResponseBody
public List<Work> getWorks(HttpServletRequest request) {
return workService.getWorksByUID(SessionUtils.getUserId(request));
} | 1 |
2b0ef848b00ad4856184528c144fe716 | b714dd7965af7056c30b8521655de94b | Sets the abilities the player chose.
Called by Event Handler, used in Database Manager | {
abilityNames = cryptor.characterAbilitySetSelector(player.getPlayerCharacterClass());
qAbilityName = abilityNames[0];
wAbilityName = abilityNames[1];
eAbilityName = abilityNames[2];
rAbilityName = abilityNames[3];
qButton.Text = "&Q: " + ... | 0 |
b1836e3464f68718fe710c4b5f14a62a | 73baba8fb7cc63c12fc38b3c7a12d474 | 寻找指定的日期(如一个月的第三个周一) | var date = new Date((+month + 1) + '/1/' + year)
if (week != 4) {
date.setDate(1);
var i = 1;
while (date.getDay() != day) {
date.setDate(++i);
}
date.setDate(i + (7 * week));
} else {
date.setMonth(date.get... | 1 |
a5e30a02cc61736e6e2f3d0532722787 | 2102eb83756f52a5f921944a850bbf36 | 设置Y轴数值显示范围 | function setYaxis(state) {
var chartYAxis = BASIC_CHART.chart.yAxis;
var YaxisSensorId = $("#YaxisSensorId").val();
for (var i = 0; i < chartYAxis.length - 1; i++) {
if (chartYAxis[i].options.sensorPhysicalId != YaxisSensorId) {
continue;
... | 1 |
209f1ac8e0d4b9e21e26a636d8d30a57 | ae45ea30728603407ea8e3715f35029f | Used to access current date for order_date attribute as integer | class new(object):
def get_current_date(self):
return self.current_date | 0 |
af16d299fbd86397c8c3e3128279b420 | e6148d93f915be0fb20d614fc887ca28 | 人事信息管理 | class ManageController extends AdminBaseController
public function personnel(){
$treeInfo =D('Manage')->personnel();
$this->assign($treeInfo);
$this->display();
} | 1 |
55200e773be7f2d62059fc589f314af4 | 65ad406abff55fa40c029a751d138402 | Determines whether a hand contains a soft ace | var cardInfo = CardID.info[cardID];
return cardInfo.rankIndex === this.webGLHaven.cardLocations.cardsOnAce(cardInfo.suitIndex) + 1;
} | 0 |
1f13ac8a75efa4242cb6338c9ac8d9c5 | c4512f4f6500fd9a843d24db46c12e56 | r"""Expression that will be evaluated to obtain attribute4's value to be sent in Assertion.<br/>Maximum length = 128. | class authenticationsamlidpprofile(base_resource) :
def attribute9expr(self) :
try :
return self._attribute9expr
except Exception as e:
raise e | 0 |
e560fd7cf75cc443a9b0e42b25f65b1a | 1b93bfe68ce54cbf0ce192141cd156b7 | Проверка на совпадение логинов | class Login_model extends CI_Model
protected function check_right_login($lgn)
{
$lines = $this->db->query('SELECT login_name from logins');
if(empty($lines)) {
die('No login found!');
}
foreach($lines->result_array() as $line) {
foreach($line as $value)
... | 1 |
ac27b193239c7aaa508d4cc51e32d5bc | a864d5645235e646d6291c925761583c | Gets the number of blades that have been initialized before. | {
double increment = 16383.0 / (double)flapcount;
double init;
int count = 0;
for (init = 0.0; init <= 16383.0; init += increment)
{
if ((all.dwFlapsCommanded > (init-100.0)) && (all.dwFlapsCommanded < (init + 100.0)))
return(count);
count++;
}
return(count);
} | 0 |
982156c4d8d1731c4cd57e64a43abf08 | 8618b5b0bbfaa590207d214fa45c44a8 | Sets the value of the x3 property. | public void setF32( Integer value ); | 0 |
980bedc9049bc800ea6f9d33c82d9d3b | 4b69fbdba8082ced42d81d84b435a3c2 | 업무형태 ComboBox Html 생성 | namespace GyIMS.App_Helper
public static class RequestHelper
public static List<ComboboxCommon> GetWorkType()
{
List<ComboboxCommon> list = new List<ComboboxCommon>();
foreach (var item in Enum.GetValues(typeof(WorkTypeEnum)))
{
ComboboxCommon com = new Co... | 1 |
4e644d75760bbb4b19077c61a9ee3367 | 4f9daf27422a029d360f2a7ef1ca29cb | проверяет, существует ли клетка поля с заданными координатами | public class Field
public boolean checkCell(int r, int c) {
return field[r][c] == ' ';
} | 0 |
d2b6fbb1245e380a7e16a79ecfad00fb | ff84188b3c367dcb2631c604363dc1b4 | Set order detail tracking company | if(this.props.form.get('id') !== nextProps.form.get('id')) {
this.props.FormActions.formChange({
formName: 'orders',
name: 'shippingCompany',
value: ''
});
this.props.FormActions.formChange({
formName: 'orders',
... | 0 |
b9f402f97123146b256b85d12498cd7b | f6b70a07bf323a98b3f3f1d51dc30455 | Tries to translate using an "object" entry in the context, or, failing
that, tries to find the URL for the view function it was given in the
requested language. | class AutodetectScheme(BasicScheme):
def __init__(self, object_name=None):
self.object_translator = ObjectBasedScheme(object_name)
self.view_translator = DirectToURLScheme() | 1 |
33355253873354598943b36ffa5ef14b | e7a3f6f993e7bcc4eff29c835ebb50d4 | Returns an unmodifiable view of the filtered cap entry list | class FilteredIndex extends BaseIndex
@Override
public List<IndexEntry> getEntries() {
return new ArrayList<>(this.entries.values());
} | 0 |
8426e826bbbca0eef1868d22cec4bdcd | 25fda42515436e7addb1058fabc435c9 | Getter for enemy's health bar. | class Defense_Barrier(GRectangle):
def get_health(self):
return self._health | 0 |
7197900a25bfd79dadb729520178c4eb | 1f63f0fe603d41645be30e65f072d016 | 根据课程ID、学员ID、试卷ID 获取记录 | class RStudentPaperModel extends Model
public function getRow($student_id, $exam_id)
{
$result = $this->where(['student_id' => $student_id, 'exam_id' => $exam_id])->getField('id');
return $result;
} | 0 |
84355194eb2d7e5cf64acdc28167d827 | 4f35cf73b5a3bd0433fcebe4d0f481b9 | 初始化这个建筑的模型 | public class BuildPanelView : MonoBehaviour
private void LoadMaterialsModels()
{
materialModelList.Add(null);
materialModelList.Add(new GameObject[] {
Resources.Load<GameObject>("BuildModule/BuildModels/Ceiling_Light"),
Resources.Load<GameObject>("BuildModule/BuildModels/Pill... | 1 |
e4c6d44bb1cc2b86fe94aa22401a7b29 | 50744ec971b7ca87e4676433d57768e2 | Score the cell using the dot product of the planar surface to the plane that is fit to the points in the
cell intersecting with the shadow. | inline double tableScore(RGBVoxelgrid& map, VoxelIndex index, const Size3D size) {
double result = 0;
size_t neg_x = std::min(index.x, (size_t) 2);
size_t pos_x = std::min(size.x-index.x, (size_t) 2);
size_t neg_y = std::min(index.y, (size_t) 2);
size_t pos_y = std::min(size.y-index.y, (size_t) 2);
for(int i = in... | 0 |
7d169c705051c13d0080fa8ee8e3f456 | 2860aa4ab4cbc68af5108542528b69cd | POST /roms
POST /roms.json | class RomController extends Controller
public function create()
{
return view('roms.create');
} | 0 |
3fd38c97991cef12a1682ebe1ce92324 | 7f7c7a79f4e2acdc4040a678dba7d1a6 | Returns:
name for tensorboard log | tb_log_dir_prefix = (
f"CNN_bn_"
f"run_"
)
i = 0
while i < 1000:
tb_log_dir = args.log_dir / (tb_log_dir_prefix + str(i))
if not tb_log_dir.exists():
return str(tb_log_dir)
i += 1
return str(tb_log_dir) | 1 |
d1500da674b97e224f75d5041abad0c8 | f965c613ed5baaf01f6f7c3bafe50cc4 | [指定字符串是否在字符串中出现过](Specifies whether the string ever appears in the string) | class String2Class
contains(targetString: string) {
return this.value.indexOf(targetString) != -1;
} | 1 |
f6c7743cd790e14d636cffd12ee7585b | 306d961b45907a7c1c919e579c0dc1bb | function to check grooming or not | bool Mammal::hasHair() const{
return hair_;
} | 0 |
8a25a28b79ff7d724f02011d1cf1aea5 | 019d81bfa3a08a46c02a21ef5274bf98 | Displays a dialog with a prompt and textbox where the user can enter information | namespace EZ_TIK
public class DialogService : IDialogService
public async Task<object> ShowInputAsync(string title, string message, MetroDialogSettings settings = null) =>
await (Application.Current.MainWindow as MetroWindow).ShowInputAsync(title, message, settings ?? My.MaterialDialogSettings); | 1 |
0fa2768b4a6c12b565bfb0e5904be4af | 3aa0b376b272df1aa0bae62cc290d8be | 获取系统管理员姓名 | public class GeneralData
public static String getAdminName() {
return adminName;
} | 1 |
e925f8b35d55a6728be8889396e88aec | 2754a3775e02461e2d6b333302d9797a | functie pentru a vedea cine e online | def chatServer():
def onlines():
online = []
for i in range(len(users)):
online.append(users[i][1])
return online | 1 |
1447c18707d43b8abee22c2e08c45321 | 96bd4f1368711e5cb189f8a9af628817 | 京东商品评论爬虫解析评论列表 | JSONObject commentSummaryJson = JSONObject.parseObject(josnObj).getJSONObject("productCommentSummary");
int goodRate = commentSummaryJson.getInteger("goodRateShow");
Map<String, Integer> commentTagMap = new HashMap<String, Integer>();
JSONArray commentTagsJsonArray = JSONObject.parseObje... | 1 |
dca42fac8e8756ca9d15a53842025a89 | 5fb14e2a09a250e8856be8c28e27c7c1 | Writes the specified subarray of Unicode characters in the specified color, followed by the current line terminator, to the standard output stream. | namespace Consolator public static partial class Console
public static void Write(Char[] buffer, ConsoleColor? foregroundColor) {
if (!(foregroundColor is null)) {
ForegroundColor = foregroundColor.Value;
}
Write(buffer);
ResetColor();
} | 0 |
246500a0c1534e22abec5ed9acf9977c | 1716afd175ff81e4fab213c6eb60ee04 | Returns a list of behaviours. | namespace Engine.Managers.Interfaces
IList<IState> getAvailableBehaviours(IPersonality mindP); | 1 |
f5a104c9b406cf2733aaa9f9e2635c88 | e3f59cff452ee7fdb632ece62042bf7a | Remove a consumer from this destination. | req: DeleteConsumerRequest,
cb?: (error: string, rep: DeleteConsumerResponse) => void
): Promise<DeleteConsumerResponse> {
return this.request("DeleteConsumer", req, cb)
} | 1 |
80f4ade8cd455f732ec3101f17fe096e | 34a89c6faa886f1bf072ddf37a4fd402 | 第三场战斗结束剧情 | DelaySleep()
print u"战斗双方各有三张五灵符,每张符有各自的五灵属性和五灵值。"
DelaySleep()
print u"五灵符根据五灵属性相生相克。"
DelaySleep()
print u"若双方五灵符属性一样,则比较五灵值;若五灵值也一样,则平局。"
DelaySleep()
print u"战斗双方每次各出一张符。三局两胜。"
DelaySleep()
print u"若战斗获胜,则对方的五灵值归你所有;否则,你的生命值减一。"
DelaySleep() | 0 |
2f0601d76a3567e8764e7acd5a994e60 | 9098a1debe47ff6a6c52690ed70a8d11 | 獲得一個討論串每一層樓的連結 | class CommonTree:
def getLayer(self,id):
id = int(id)
return self.preStr * len(self.getNodeLever(id)) | 0 |
59b24823c6f90f35bdda93140b5383cd | d18e0d0b38fbef1508f25e5380d16aa1 | The name in a kebab-case format (i.e. "todo-item") for file names. | function getComponentFileName(name: string): string {
return kebabCase(name)
} | 1 |
804947a086e317ffa9b656a98bf7981e | 6b01d88590e04e7113fcadde7c7b2192 | Sets the command box style to indicate a successful command. | public class SecurityBox extends UiPart<Region>
private void setStyleToIndicateCommandFailure() {
ObservableList<String> styleClass = commandTextField.getStyleClass();
if (styleClass.contains(ERROR_STYLE_CLASS)) {
return;
}
styleClass.add(ERROR_STYLE_CLASS);
} | 0 |
ef9b38361664319a5ce6c9b334c373fc | f1cd961789b1f8497a978d54f07bd64b | Exclusive or the bit set in BitToFlip. | public boolean flip(final int bit) {
this.checkBit(bit);
return ArrayUtil.getAndXorVolatile(this.bitset, getIndexForBit(bit), true);
} | 1 |
da6d2b8569dfc1109ac8daa1ddcb292d | 5157260a4247226b2719ac31ba023682 | @brief パラメータを取得する。
onceパラメータは取得時点で削除されるため、2回目以降は異なる配列が返る可能性があります。 | namespace Live2D.Cubism.Core.Unmanaged
public static class CubismCoreDll
[DllImport(DllName, EntryPoint = "csmGetParameterValues")]
public static extern unsafe float* GetParameterValues(IntPtr model); | 1 |
db68415e4b979c88086600c0a6feb00b | 1ffc1ec550176d0ea2b63558c353847e | Уменьшает масштаб изображения в определенное количество раз. | def shrink(img,times):
return img.resize((int(img.size[0]/times),int(img.size[1]/times))) | 1 |
f1794fb9ac11e329dc2ad30571594a6e | bd43f37385f2060d9568b9b8f9fd020c | 通过输入的Name获取匹配的客户Name | public class TranController extends HttpServlet
private void getCustomerName(HttpServletRequest request, HttpServletResponse response) {
System.out.println("enter getCustomerNameController!");
String name = request.getParameter("name");
CustomerService customerService = (CustomerService) Service... | 1 |
f67475dc26bcc80d08ff4ab448635ccf | 3863a32ae5c206c488e2755e364dcce8 | Return mock active connection service. | def file_service():
return FileService(MockFileServiceConfig) | 0 |
0c83d201b66bafb60880ea361f322807 | 11cf7ce6d9d4c04b9bd1eee3c40cb1b6 | This function provides the user with an interface to
write data to a file they have chosen. | const int *ptrFour, const int *ptrFive, const int* choice){
FILE *reportFile = NULL;
char *fileName = (char*)malloc(1000 *sizeof(char));
checkPtr(fileName);
switch(*choice){
case 1:
puts("Enter the name you want to give to the file No Spaces eg format... | 1 |
71cdbc1cf0855192c2e0571983837f2f | 6948a6a9acd6f5435b8f55731f91ab52 | Check someone's current amount of gold, exp and level. | if self.bot.c.execute("SELECT * FROM users WHERE user_id = ?", [ctx.message.author.id]).fetchone() is None:
self.bot.c.execute("INSERT INTO users VALUES (?, 100, NULL, NULL)", [ctx.message.author.id])
money = self.bot.c.execute("SELECT money FROM users WHERE user_id = ?", [ctx.message.au... | 0 |
a6b06b61b1e2d121daffd1ca97551003 | 66ac28967962237b0549dd82491d4596 | 跳转到主城格子 | local function gotoHeroRoom()
local building=player.buildingMgr.getBuildingObjBySid(1022)
building:onClicked()
end | 0 |
add0f4c61fe442bdf0cd304da3d57da4 | c6013408f698bc3003c855f37a5beb68 | 根据Id获得RecomBook对象 | namespace EShop.BLL
Recommend FindById(string id); | 1 |
0dfdf98fa78a9124f5b5db42c9d85785 | b247e6a8ea27017f3aa86743a861925e | 给数组设置默认值 | {
foreach ($indexes as $i => $index) {
$target_array[ $index ] = array_key_exists($i, $source_array) ? $source_array[ $i ] : $default_value;
}
} | 1 |
5dae0ba77eb90cc087ddce1af100b8db | f09a7b0f6f6b18b24e8b9ac8c1025b8e | change format of detections to input_ensemble format | class DETRPostProcessor(Module):
def forward(self, data: dict[str, Tensor], meta: dict[str, Any]) -> list[Tensor]:
logits = data["logits"]
boxes = data["boxes"]
original_sizes = meta["original_size"]
cxcy = boxes[..., :2]
wh = boxes[..., 2:]
boxes = concatenate([cxcy - wh... | 0 |
46534274cf9c8bc6a3bda486657fb24b | 89064e494a2eb35085df7dfe0d4efc70 | Wrap images with figure tag. Courtesy of Interconnectit http://interconnectit.com/2175/how-to-remove-p-tags-from-images-in-wordpress/ | function filter_ptags_on_images($content) {
return preg_replace('/<p>(\s*)(<img .* \/>)(\s*)<\/p>/iU', '\2', $content);
} | 0 |
94aef44c1eb85813a5915de6bb897c75 | 521824a16968cd2d2e281caebf2c7feb | Returns the performance of the agent on the environment for a particular number of episodes. | class MyAgent:
def execute_episodes(self, env, n_episodes, n_steps, n_learning_steps=1,
render_flag=False, batch_size=100, verbose=False, train=True, test=False, train_epoch=False):
for episode in range(n_episodes):
if verbose:
print("Episode: {}".format(episode))
... | 1 |
d11714b878bee6a75d3a9902914d5daa | 7b5a88534a6699eaaddc0d94b945e3fa | Creates main menu object and displays main menu | function buildMainMenu() {
let x = width / 2;
let y = 150 * progScale;
let s = "CUBE";
let title = new DisplayText(x, y, 0, 0, s);
title.textSize = 200 * progScale;
allObjects.push(title);
let buffer = 50 * progScale;
let w = 350 * progScale;
let h = 75 * progScale;
x = (width / 2) - w / 2;
y = 30... | 1 |
5c51742b3d99cc258a9e2f4e8e893385 | eb7914e77545f48b9d6e6ccec9562626 | Helper Method to convert datatable results from SQLquery to
List<Model> to be using in Weather view table | {
WeatherForecast weather = new WeatherForecast()
{
ParkCode = Convert.ToString(reader["parkCode"]),
FiveDayForecastValue = Convert.ToInt32(reader["fiveDayForecastValue"]),
Low = Convert.ToInt32(reader["low"]),
High= Convert... | 0 |
a7d8451867381e97cc7566fb2a17a506 | 5126d92b4909c482ff97be8b72af6bbd | Decode preceding instruction in the execution flow. | def decoder(instr):
op = instr[-6:]
rs = instr[21:26]
rt = instr[16:21]
rd = instr[11:16]
sh = instr[6:11]
func = instr[0:6]
imm = instr[0:16]
return op, rs, rt, rd, sh, func, imm | 1 |
4259a6e133ef3148b44628eb73dd49d8 | 9a78e5cacac268f9c2c009aed43bc4db | Remove <code>TaxRegion</code> with the specified name from the Tax Region map. | void removeByName(String name); | 1 |
9e67d13c34293ee47e9820302eb52b95 | f2c2dc74159f86d0ff9c6b5d79e73d8e | cut image to get just clothes(top) of person | height = img.size[1]
width = img.size[0]
new = img.crop((0,0,144,height))
return new | 0 |
7d8f5181008671c4b7026659655beed0 | 3731d991ea0163fa6201c48c9875eefb | Returns whether to draw bounds rect. | public class RMCrossTabCellTool <T extends RMCrossTabCell> extends RMTextTool <T> implements RMSortPanel.Owner
public boolean drawBoundsRect(RMTextShape aText) { return false; } | 1 |
f077da8677e5beb5f5168e61a75e59cd | 51cf5ccc73bd5e811ed8e1c6d871feb4 | Removes label from task according to the command data. | {
if (newLabelName is null) return;
var commandId = Guid.NewGuid();
var labels = new List<String> { newLabelName };
var labelsArrayString = "[" + string.Join(",", labels.Select(x => $"\"{x}\"")) + "]";
var commandString =
$"{{\"type\": \"item_update\", \"uuid\": \... | 0 |
4c9f5f98078c13166f98ee57b9315839 | 68c643e75e94dc21a5bf12f9d97a5226 | Creates a new ChannelManager | export class Channel
constructor()
{
this._active = false;
this._endPoints = [];
} | 0 |
8870873db14f99fe8d5edbf0e897a0d8 | 4fd66a5204a88ddd8f7ae0c0c8dfde08 | Writes list of services into a file. | ofstream Serv_List("serv_list.txt", ios::app);
string name, passphrase;
if (Serv_List.fail()) {
cout << "\nThere has been an error opening the 'serv_list.txt' file." << endl;
fatal("Terminating");
}
for (int cursor = 0 ; cursor < count ; cursor++) {
Serv_List << s_names[cursor] << ",";
Serv_List << s_... | 1 |
474398dcf2331792cb5c9e9a3de2a32b | 71a81b54a852257ba86922071f9f616d | Returns the meta object for class '{@link com.gentleware.poseidon.dsl.wsn.SensingAction <em>Sensing Action</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getSensingflowTask(); | 0 |
4936875fc6fe1dd50ea21c126cfd3817 | b8d71223643ccb2c5e77b624f4e8e0cb | Finds the user based on ctx.state.userId and stores
the user in ctx.state.user. | function find(req, res, next) {
res.setData(req.queriedUser, next);
} | 0 |
721761ed9db50f7572b603ff4ddb137c | 535d5eb6bbaf127488f8d456c2d289a9 | Colspan for actions in index.rhtml table | [
{ :name => :created_on, :field_label => I18n.t(:created_on), :width => 80, :read_only => true,
:format => 'Y-m-d', :summary_type => :count },
{ :name => :updated_on, :field_label => I18n.t(:updated_on), :width => 80, :read_only => true,
:format => 'Y-m-d' },
{ :name => :name, :fi... | 0 |
7d54a4e66ab2622d5a1d5cb40cd6db36 | cbb9b1e1306b0d16e35bb142e3a82c51 | move the cursor to next avalible or first avalible depending on input | int size = name.size();
int a = abs(cursor-i);
int b = 0;
if(cursor< i) b = cursor + size-i;
else b = i + size - cursor;
moving += (a < b) || (a==b)? a: b;
cursor = i;
} | 0 |
a18416855edd2f0ab9eee43b19507c7b | 8954c3441f740d5f0d67fb120200a3e0 | 非递归反转 | public class Node<E>
public static<E> Node<E> reverse2(Node<E> nodes){
Node<E> p = nodes;
Node<E> head = null;
while(p !=null) {
Node<E> q = p;
p = p.next;
q.next=head;
head =q;
}
return head;
} | 1 |
c9b74210570cbfad30240e6e6b9b9fa6 | 4237e3e206b06b63f99d70b800f0a7f9 | Main function to speak with MERCURY6 manager scripts to
execute the desired number of simulations. | args = _line.split()
if len(args) != 1:
error( 'invalid number of args: simulasi time\n' )
else:
dur=args[0]
h2 = self.mn[ "h2" ]
h3 = self.mn[ "h3" ]
h5 = self.mn[ "h5" ]
h2serv=DOSSMURF(h2,dur)
h3serv=DOSSMURF(... | 0 |
a37f8311060b71f9e1168360de0cec25 | f66ee17ff4132086e275e13db80795ca | POST /applications | @application = Application.new(application_params)
if @application.save
render json: @application, status: :created, location: [:api, @application]
else
render json: @application.errors, status: :unprocessable_entity
end
end | 1 |
b53122a07ba375ae6678b09ed3a2af0e | 4dfbb7d86981dbc71e97a9b5b5be55b2 | Try to keep the fragment around on config changes so the setup task
does not have to be finished. | public class NewLocationUploadTaskFragment extends Fragment
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(true);
} | 1 |
8b6f647f830d322b629f5803d0e9f7dc | f1eedd207613f3d46d99ea4df2c99904 | Initialize the pmap associated with process 0. | void
pmap_init(void)
{
pool_setlowat(&pmap_pv_pool, pmap_pv_lowat);
pmap_initialized = true;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.