query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
cb7ea33f1929a583578bd94d72df1968 | 358ac16a7b8433b8a487e50ed72363a1 | Responsavel por enviar as referencias de login e vendedor para a tela MenuVendedor | public class MenuVendedor extends javax.swing.JFrame
public void enviaVendedorLogin(Login login, Vendedor vendedor) {
this.login = login;
this.vendedor = vendedor;
} | 1 |
2ed41a22fe2da4671caf448d284b93e0 | 7a99305485b6430c22c9b07f3d778742 | Converts a supplied domain model object to a persistence model object. | namespace Beaker.Core
IRecord MapToRecord(TDomain domainObject); | 1 |
794c67465ddce736e4a9b169ec522a63 | 60abfec7cf16f8b393c5b588cc4e2485 | hashPasswords
Overrides CakePHP's password hashing. It passes the parameter straight through,
thus disabling the default hashing function.
This is a workaround until a newer version supports this. | class CasAuthComponent extends AuthComponent
function hashPasswords($data) {
$model =& $this->getModel();
$data[$model->alias][$this->fields['password']] = '*';
return $data;
} | 1 |
0e6349e766314b5acef0e7efa4d493db | f6bb84a8b383fddffcce6e91c9472797 | Draws a depiction of the palette with the colors visible as rectangles without blending. | int cols = areaWidth / (rectWidth + 10);
int rows = colors.size() / cols + 1;
int padding = (areaWidth - (cols * rectWidth)) / cols;
int i = 0;
for (int row = 0; row < rows; row++) {
for (int col = 0; col < cols; col++) {
if (i < colors.size()) {
... | 1 |
106b93967bbd6dcbf1b655b0963f5abd | 7c4b3f77d79288114c157411f79a5adb | Ausgabe auf der Konsole (mit Zeilenumbruch). | namespace Yanesdk.Math
void output() {
Console.Write(ToString());
} | 0 |
2e2d2f8ae82e6a8597c7c8428343dc52 | 12e1c157d9e32c664e36a72d304aefb6 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Create some 'init.c' related artefacts.
# Not currently automatically inserted, but they should be
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | assign("gIrlsLogStrings", NULL, envir = .GlobalEnv)
assign("gOutputBad1", NULL, envir = .GlobalEnv)
assign("gOutputBad2", NULL, envir = .GlobalEnv)
testOutputFileNames = c(
"A549_CV4_3-14-21-28_NA_combined_simple-null-w-lfdr_f.txt",
"A549_CV4_3-14-21-28_NA_combined_simple-null-w-lfdr_fc.txt",
"A549_... | 0 |
19589944c8a85be2af800f0fa7dfa69b | 9d62463222925a9b4740b6f0c68b453d | Sets the clinical staff repository. | @ManagedBean(name = "pbrm02aMB")
@ViewScoped
public class Pbrm02aMB extends BaseDirectReport
public void setConctbRepository(ConctbRepository conctbRepository) {
this.conctbRepository = conctbRepository;
} | 0 |
522a7e607c82e15e08a3536fc8716a38 | fa9441e8ea11bdc62e8f98f98eb18705 | !
Set the product to be a hot deal or not. True makes
the product a hot deal, false it it just as an ordinary
product. | class Goods extends \Phalcon\Mvc\Model
public function setIsHot($is_hot)
{
$this->is_hot = $is_hot;
return $this;
} | 1 |
4e7db51f17254935e45c7894e07378d3 | feae2ff5a704b5340d026a3d579d81a2 | Instantiates a corresponding piece, according what letter is read in the entered coordinates. Used to
"think" what would happen if a piece is generated somewhere in the board. | public class Board implements Serializable
public void placePiece(String pieceName, Point p) {
Side side = pieceName.charAt(0) == 'W' ? Side.WHITE : Side.BLACK;
switch (pieceName.charAt(1)) {
case 'P':
placePiece(new Pawn(side), p);
break;
case 'N'... | 1 |
b733f5c47dac769f84e62dfdf1b1f65a | fd60c999476f73fe1009435c803874d2 | Henter alle værelser fra databasen der tilhører et specifikt hotel-id. | namespace BackToLife.Services.Impl
class TourServiceImpl : ITourService
public IEnumerable<Tour> GetToursByHotelId(Int64 hotelId)
{
return _tourRepository.Query().Where(x => !x.IsDeleted && x.Hotels.Any(h => h.HotelId == hotelId));
} | 0 |
8521523a3adf265117c839ddaabb2e75 | f866bd81301ac566b4f60a9177e77b84 | 增加跟帖 | var obj = {
BDUSS: app.currentBDUSS, _client_type: settings.clientType, _client_version: settings.clientVersion,
_phone_imei: settings.imei, anonymous: 0, content: content, fid: forumId,
floor_num: floorNum||0, from: settings.from, kw: forumName, net_type: settings.netType,
quote_id:... | 1 |
0d703993672332ef23e5048d95046b1d | 719cd2863d448e4c680720d97575dae5 | Return elapsed time in minutes between current time and last insert time for this metric. | if (self.last_execution_time is None):
return 0
else:
return round(self.last_execution_time, 2) | 0 |
8e0dcb025f290ba9adf7a6b219937f1c | 1968d8f3ae690d7831a7351978d75d14 | 修改轮播图状态(多个) | class Banner
static function setState($bannerList)
{
$sql = "update banner_images
SET state = CASE id
when
END
where";
$when = "WHEN id THEN 'state'
";
$where = "WHERE id IN (idstr)";
$When = '';
foreach ($bannerList as $key => $value) {
$Whentmp = str_replace('state', $va... | 1 |
79d5c4b66ad71746032223378935f600 | 2314424b721a07c0521404bad827eb14 | This function asks the user for coordinates and orientation to place a
ship. The ship length is determined from the name variable, and the board
to place it in is given by the board variable.
This function also checks for valid coordinates and makes sure the ship
does not go out of bounds or overlaps other ships. | coordinates = coordinates.strip()
orientation = orientation.strip()
column = constants.VALID_LETTERS.index(coordinates[0])
row = int(coordinates[1:]) - 1
if orientation.lower() == 'h':
self.board[row][column:(column + ship_length)] = \
['-' for num in ... | 0 |
6920289b7c342996d5bf145e6b7052b3 | 22ff7d75ae98cfb77c6801b709e22c55 | Determine the number of nodes in circular singly linked list | currentNode, counter = self.head, 0
if currentNode:
counter += 1
while currentNode is not self.head:
currentNode = currentNode.next()
counter += 1
return counter | 1 |
741e841d69f08b5ff27b1e56bdb70f36 | 0d7375b51edf3234f0776e272013f81d | Loads controller and methods based on the number of items in url separated by / from _getUrl() | Class Router
public function run()
{
$urlParts = explode('/', $_SERVER['REQUEST_URI']);
array_shift($urlParts);
$fullControllerName = $this->_controller(array_shift($urlParts));
$methodName = $this->_methodName(array_shift($urlParts));
$param = count($urlParts) ? array_shift($urlParts) : '';
if (class_exis... | 1 |
7b655f7e25f9b391262d4531420a0482 | 1c0bdc5fca107b00bd4cdd89154b5116 | ブログ記事削除時、そのブログ記事が持つプチ・カスタムフィールドを削除する | class ProgramContent extends AppModel
public function blog_content_delete($id, $blog_content_id)
{
$return_value = false;
$options = array(
'fields' => array(
'id', 'blog_host_id', 'post_id'
),
'conditions' => array(
'BlogConten... | 0 |
848da04efe490084bff8174f3d848a5f | 8b6a63aab893f347552653c1d63308b6 | Returns the meta object for the reference '{@link asaM1.AttachementRPC2DB#getDatabase_port_requis <em>Database port requis</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getAttachementRPC3CM_Connection_portrequis(); | 0 |
8e719c9aa6013f9d7a3f15f620fb04bd | 6e13c92b972476fd9dc3a24b9d6a28ef | Gets an Array of the keys for all elements in the memory cache.
<p/>
Does not check for expired entries | public class GroupedCache
public String[] sortedKeys() {
return cache.sortedKeys();
} | 1 |
995868dc827c1abaa418180295612bff | f6f3a1dcdaafafc0001844e6e7a51b08 | This method resets to the task created during initialization, i.e. if tasks were changed, this function will
clear them and then re-create them using the config file used when opening the program. | void reloadTasks(); | 1 |
114d0730dd4b237e7f78ba6d745cb293 | 67f687e464d52f45bf8b355f90a2022b | 获取项目选项卡数据 | async getTabItems({commit},callback) {
const result = await getTabItems();
if (result.code === 0) {
const tabItems = result.data;
commit(RECEIVE_TABITEMS, {tabItems});
callback && callback()
}
} | 1 |
cca5abf04809ed974c067f6cd41c8384 | 7b8a8520b9389ec5019fbb3c579a15e9 | Marca uma consulta com uma data limite | class Pesquisar_mdl extends CI_Model
public function setLimite( $value, $offset ) {
return $this->db->limit( $value, $offset );
} | 0 |
6f574f8fb6f262a732681e109e8f0497 | 512d013857ca9935060a66634b43473c | Prüft beim Aufrufen der Szene von welchem gewählten Pfadsuchealgorithmus der Nutzer kommt und Schaltet entsprechend die Anzeige im Programm | namespace RLMAL
public partial class CasinoForm : Form
private void dropDownAlgorithm_SelectedIndexChanged(object sender, EventArgs e)
{
algIndex = dropDownAlgorithm.SelectedIndex;
switch (algIndex)
{
default:
break;
cas... | 1 |
1a8e0dd19a4cd96cb6dcb3100fa369d7 | cbbd07e7de1b336c81e3844534ff4921 | Convert privilege to string. | class Privileges
static function PrivilegeToString($privilege)
{
switch ($privilege)
{
case 0:
$s = "Brak uprawnień";
break;
case Privileges::USER:
$s = "Użytkownik";
break;
... | 1 |
e898904fc349b0ddb1da843c766374d8 | c66bfa8cb787360ad93c5f542218b112 | 申請中かどうか確認する | function hasApply() {
const applyType = applyWays[getApplyType()];
if (!applyType) {
location.href = '/404';
return false;
}
return !!applyWays[getApplyType()];
} | 0 |
65bc4e48e6152a5fd510de637d6f1d37 | 095782885c7e53be38b98db9a268cc55 | Help filter out attributes with blank values.
Not using `blank?` to avoid Rails requirement
and because `false` is a valid value. | safe_params = unsafe_params.select do |key, value|
%w{name address city country email phone}.include? key.to_s
end
safe_params
end | 0 |
5c792f295ca289d0223e1ecf4277b4ab | ccf18eef34b0b3a5bbd3c50a6b2fd9a9 | Немедленный выход | namespace RabotaLINQ
public partial class Form1 : Form
private void Button2_Click(object sender, EventArgs e)
{
Close();
} | 1 |
b27f56e6fa7e36df98a039976f4c2c31 | 9896863f34ff6901476f1c9abfda7cce | How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)? | fn main() {
println!("{}", solve(1901, 2000));
} | 1 |
ead47b889adcd55d825e55df98d7c214 | 032b837ced8e09ecaed7689dfd11b89b | Creates a graphml file with the resulting graph. | throws IOException
{
outputGraphJSON( gr );
file.createNewFile();
try
(
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file)))
)
{
out.write( "{\"vertexes\":[" +outVs+ "]," );
... | 0 |
53c4c04a021e0329f0fcd7af4be300b5 | ad8aa1125b6ccb23ff04f4304e381cf9 | 目的地新增优势 | function advantageVd(view) {
new Swiper('.advantage-vd', {
autoplay: 5000,
slidesPerView: view,
nextButton: '.advantage-next',
prevButton: '.advantage-prev',
})
} | 0 |
67f5c3052343a192101821eddc493579 | 01937abe4eb437ae02b34fc1e1aa5f20 | 動的にレイが外れた時のイベントを登録 | @WiQueryUIPlugin
public class Layout extends Panel implements IWiQueryPlugin
public Layout setOnHideEndEvent(JsScopeLayoutEvent onOnHideEnd) {
this.options.put("onhide_end", onOnHideEnd);
return this;
} | 1 |
e2bc84f51db95b9a50fc3c3e196646a6 | 7ac3dcd8f2f6a5eda9494aef38a51dae | 将简历的纯文本字符串转换为Resume的对象 | public class UserRegisterForm extends User{
public Resume createResume(){
Resume resume=new Resume();
resume.setEmail(getEmail());
resume.setIdNumber(getIdNumber());
resume.setMobile(getMobile());
resume.setName(getName());
try {
Date birthday=new SimpleDateFormat("yyyyMMdd").parse(getIdNumber().substrin... | 0 |
4c27389c188c28959f357768be87d4a6 | 0212b6062e9a9db14ca160ada00ea65e | Limpia la consola, sin importar el sistema (Windows o Linux) | #if defined (_WIN32) && !defined (DEBUG)
system("cls");
#elif (defined (__LINUX__) || defined(__gnu_linux__) || defined(__linux__)) && !defined (DEBUG)
system("clear");
#elif defined (__APPLE__) && !defined (DEBUG)
system("clear");
#endif
} | 1 |
851df819b976c2d2760205f2a6ddd6fb | b0b9ea4dfa48ae62037f2df2c8b727df | Returns the meta object for class '{@link miniJava.SymbolRef <em>Symbol Ref</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getSymbolRef_Symbol(); | 0 |
b0071a33f736ec0bce5e8a7ff8fc528e | de8ca501f09b919f495a786078c608cd | 从start_url解析showurl列表 | content = pq(self.sess.get(start_url).text)
for each in content('ul[@class="carlist clearfix js-top"] > li > a').items():
url = each.attr.href
if not url.startswith('http'):
url = self.baseurl + url
yield url | 1 |
847ff3dc80b42588280282c3de3b697a | bac417a9c32172e4add85ba43542470a | Get errorDescriptions value | class Message
public function getErrorDescription()
{
return $this->errorDescription;
} | 1 |
57a14f04795d7e2c449ec1ec11eaf9ac | e57f91bd761a35bd49ce65a43a3e893b | Load the scenario map layer from the scenario config | {
SceneMapConfig config;
int len=stream.readLen();
sceneMapDic=new IntObjectMap<SceneMapConfig>(len);
for(int i=0;i<len;++i)
{
config=new SceneMapConfig();
config.readBytesSimple(stream);
sceneMapDic.put(config.id,config);
}
} | 1 |
e995083d9f900f9ca5e9ec8bcdb6ab7d | 0c776a41524f95a516937091018cff3c | Retrieves the diaries published by the Oficial Diary in a given year. | url = LetterboxdScraper.URL_DIARY.format(username)
inner_html = self.get_html(url)
diary = []
try:
soup = BeautifulSoup(inner_html, 'html.parser')
entries = soup.find_all('tr', {'class': 'diary-entry-row'})
for entry in entries:
film_de... | 0 |
daf2353418de7a6340d6411d3258e07f | 5590728e69877b1e5106bdc3cef23dea | Removes the status of each player
(questionable, suspended, injured reserve) | {
if (_enemyStatus.Count > 0)
{
for(int i = 0; i < _enemyStatus.Count; i++)
{
if (_enemyStatus[i] != null)
{
_enemyStatus[i].RemoveStatus("PlayerBubbles");
}
}
}
} | 0 |
f513badcaf4b48f0cf5c618b9653aa28 | 1734de46602f6baf21bbbba76b2ac31a | Return a set of words that appears in bow1, but not bow2 | def compute_oov(bow1, bow2):
bow1 = set(bow1)
bow2 = set(bow2)
return(bow1 - bow2) | 1 |
a7b86defd182a9684560340e71fb4d90 | 5777b20c7c81f1611459468129511ab1 | Handles the CommandCellClick event of the RadGridView button column control. | {
if (e.CommandName == "Page")
{
}
else
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow selectedRow = uxAddOnGrid.Rows[index];
}
} | 0 |
babd02d2c373c21f6211cd0881167f32 | 31a6e5c7a76b2d37919f2b249234d125 | 駒数 | class BoardRepositoryImp :BoardRepository{
override fun getCountHoldPiece(turn: Int): Int {
var count = 0
for ((_, v) in getAllHoldPiece(turn)) {
count += v
}
return count
} | 1 |
0538a1bddc72ccea90814f99ac527205 | 910727bca433f2969075c5f77130adfe | returns a tree with several elements, with Integer keys and String values | public class JSONWriter
public static String asObject(TreeMap<String, Integer> elements) {
try {
StringWriter writer = new StringWriter();
asObject(elements, writer, 0);
return writer.toString();
}
catch (IOException e) {
return null;
}
} | 0 |
4c0fcd7cfd060d6b6ef906fb5d07f67b | 5d356d890876dcb1c49e0534191bb648 | Update Carrot yaw angle and wrap to PI | def correct_angle(yaw):
while yaw > math.pi and not rospy.is_shutdown():
yaw -= 2 * math.pi
while yaw < -1 * math.pi and not rospy.is_shutdown():
yaw += 2 * math.pi
assert -1 * math.pi <= yaw <= math.pi, 'Returned yaw was %f' % yaw
return yaw | 1 |
f0eb84145c407053a360755b2ac34f7d | dda6560eb52ba2e4203d368d439e2bb3 | 哪个Observable首先发射了数据(包括onError和onComplete)就会继续发射这个Observable的数据,其他的Observable所发射的数据都会别丢弃。 | tv_log.setText("数据[0,1]" + "判断发射的数据是否大于1\n");
Observable
.just(0, 1)
.single()
.subscribe(new Subscriber<Integer>() {
@Override
public void onCompleted() {
tv_log.append("onCompleted");
... | 0 |
913bac1aa34964464080220460b80325 | fe4611feba37da511e5c8141a1d58ebb | Instrument miscellaneous instructions. | INSTRUCTION(nop)
{
} | 0 |
06905fd87274920a053f5ef8ebcf9202 | 4c441f203f887c13424401b5ca5d12ad | Inserts file data to database | try {
$db = new PDO(PDO_DSN, DB_USERNAME, DB_PASSWORD);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$db->exec("insert into files (id, title, tag, article, datetime) values ($id, '$title', '$tag', '$article', '$datetime')");
} catch (PDOException $e) {
echo $e->getMessage(... | 1 |
6fc8567a23c446f74e476f7fa2ae792f | 759df2d86667db285748e76a09bb3004 | Ввод параметров функционального языка из файла | {
int fun, pos, length, n, m, l;
LETTER* NewNode, *OldNode;
WORDS* LastWord, *NewWord;
EXTENSION* NewExt = NULL;
inp = GetInput();
length = strlen(inp);
if (*inp == '\0')
{
fun = RandBetween (1, 5);
if (fun == 1)
printf("Stop\n\n");
if (fun == 2)
printf("Say something\n\n");
return;
}
Func... | 0 |
f822ba0e9705d8948986bfe376b39f14 | 6a38d7f92bb3340b74eea4b9dac1884d | This method finds the shortest student name. | Student student = studentList.stream().min((s1, s2) -> Integer.compare(s1.getAge(), s2.getAge())).get();
return student;
} | 0 |
cee749c4100f66a2d04e446b1591e16c | d06a55c0cba0a24f642c75a45b01fae5 | Sospende l'esecuzione del SiteCrawler. Se non e' in esecuzione, ignora
l'invocazione. L'esecuzione puo' essere ripresa invocando start. Durante
la sospensione l'attivita' dovrebbe essere ridotta al minimo possibile
(eventuali thread dovrebbero essere terminati). Se e' stata specificata
una directory per l'archiviazione... | if self.is_started:
if self.is_suspended:
self.logger.warn("duplicate suspend")
else:
self.is_suspended = True
self.logger.info("suspend worker")
else:
self.logger.warn("stopped worker not permit to suspend") | 1 |
1ef957a4064c849ab4c32800b588d561 | 96946c99caddcbda78b2422b46613dc1 | `````````数组交集````````````````` | class Arrs{
public static function intersect(){
$arr_one = [
"name" => "lio",
"age" => 123
];
$arr_two = [
"name" => "anna",
"age" => 12123,
"sex" => "famele"
];
$arr_three = [
"name","age","sex"
]... | 1 |
45dd6314c280a7cdc78e1afdb50664e7 | e807cb0901e90ffcea13e31886539788 | Refreshes the list of process, and their hashes. | namespace Quasar.Server.Messages
public class TaskManagerHandler : MessageProcessorBase<Process[]>
public void RefreshProcesses()
{
_client.Send(new GetProcesses());
} | 1 |
cec57578b347dfab19025bbea497f154 | ae5de4341bf41044aa515a0f70208e75 | Поднятие вершины в корень | def Splay(u):
while Parrents[u] != -1:
if Lefts[Parrents[u]] == u:
if Parrents[Parrents[u]] != -1:
if Lefts[Parrents[Parrents[u]]] == Parrents[u]:
zigzig(u)
else:
zigzag(u)
else:
zig(u)
e... | 1 |
f5565ea0d8efeaf67b909648fdd695fd | 7f61448ad6da3ef0f9cb03f40c5be655 | ++++++++++++++ SET UP SERIALIZATION ++++++++++++++++++++++ | cases like (1) | 0 |
320171db8a33432b6e063b3b80a9bd58 | eaed8ed33c2bb7bc7781b767f5a6905b | 辺IDをすべてクリアする | {
edgeItemPool.ForEach(go =>
{
InputField[] inputs = go.GetComponentsInChildren<InputField>();
foreach (var input in inputs)
{
input.text = "";
}
});
} | 0 |
d7150698a837bfd3282ddc685b537e7f | c41c98a806f4414b05402938be100d80 | Sets the transaction watcher. | if (this.mCoinsReceivedEventListener != null)
vWallet.removeCoinsReceivedEventListener(mCoinsReceivedEventListener);
transactionEventListener.setWallet(this);
vWallet.addCoinsReceivedEventListener(transactionEventListener);
mCoinsReceivedEventListener = transactionEventListen... | 1 |
1d5ce0668a6eccd828056f25b557d7c7 | 193716ccdcf1e0230d7f4067195f75a3 | Get the speeds parameters for case test_update_speed, including 2 valid speeds and 1 invalid speed | System.Collections.Generic.Dictionary<string, string> result = new System.Collections.Generic.Dictionary<string, string>();
Take4.Common.Checker.RangeCheck(SpeedELow, 1, 6000, ref result, nameof(SpeedELow));
Take4.Common.Checker.RangeCheck(SpeedEHigh, 1, 6000, ref result, nameof(SpeedEHigh));
Take4.Common.C... | 0 |
753b406e6f54015ea99d445f374ed761 | ec6872d40f54a86d11b211081babcfc4 | @brief Send event to Led server to request Led to display pattern | uint8 Tx_buff[20] = {0};
uint8 index =0,no_of_leds=4;
Tx_buff[index++] = 0x28;
Tx_buff[index++] = data_len;
Tx_buff[index++] = cmnd_id;
Tx_buff[index++] = 0x01;
Tx_buff[index++] = no_of_leds;
for(uint8 i = 0;i<4;i++){
Tx_buff[index++] = config_data[i].led;
Tx_buff[index++] = config_data[i].valid_sta... | 1 |
82ca3da58ac9ca470e7aedd42a9962ec | b1dac01a2de8712a51756e7d8a52cd20 | Ensure search pages aren't cached | response = self.client.get(self.index_url)
new_post = Post.objects.create(author=self.author, text=self.new_post_text)
response = self.client.get(self.index_url)
self.assertNotContains(response, self.new_post_text)
cache.clear()
response = self.client.get(self.index_url)
... | 1 |
073077069b2d8f08ffa1a06f50d8ceed | 258733bfdef4afa483b622f4f9893fd5 | Verify that score is reset to the previous score after undo | public void testU7_PointsRestored() throws FactoryException {
UndoableGame g = makePlay("P..");
g.movePlayer(Direction.RIGHT);
g.movePlayer(Direction.RIGHT);
assertEquals(g.getPointManager().getFoodEaten(), 20);
g.undo();
assertEquals(10, g.getPointManager().getFoodEaten());
g.undo();
assertEquals(0, g... | 1 |
5a078c204edc09c099995c1c6a312375 | f6c347319d66632d064a2f605daea4a4 | Handles the ExecuteCode event of the Decide CodeActivity. | namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities
internal partial class ResolveLookups : SequenceActivity
private void ResolveRequestParameter_ExecuteCode(object sender, EventArgs e)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.ResolveLookupsResolv... | 0 |
c25c1a2fd32d5ca9aa0e36d84a162d04 | 8513e83254a6142d3622ad86d817e407 | Internal callback function that is called when add prefix button is clicked | {
User::LeaveIfError(aErrorCode);
const TDesC8& localPrefix8 = aPrefix.DesC();
HBufC* temp1 = Copy8To16LC(localPrefix8);
const TDesC8& localUri8 = aUri.DesC();
HBufC* temp2 = Copy8To16LC(localUri8);
iConsole->Printf(KPrefixMap, temp1, temp2);
CleanupStack::PopAndDestroy(2, temp1);
iConsole->Printf(KPressAKey);... | 0 |
3ed4bfa5db85904312d6dadb288acc5d | 3dfa92e669eed2a6ae25dbb68ed07842 | convert json data into pandas dataframe,
and sort the data by unversity-year | dfcontainer = []
for val in FormatedPageData:
df = MakeYearDataFrame(val,ColumnName)
dfcontainer.append(df)
gdf = pd.concat(dfcontainer)
gdf.set_index("date",inplace=True)
return gdf | 0 |
15108f31304e4a59e0ce5d3d06a43620 | 07399624dbc90c86d2ee1ab9f5bd2b82 | 상황에 따라서 책목록을 더 보여주거나 숨기거나 하는 함수 | def show_genre():
genre = int(input("보고싶은 장르를 선택하세요 0 : 판타지, 1 : 스포츠, 2 : 사극 3 : 음악"))
print(comic[genre])
if genre== 0:
book = int(input("보고싶은 만화책을 선택하세요 0 : 일곱개의 대죄, 1 : 종말의 세라프" ))
elif genre== 1:
book = int(input("보고싶은 만화책을 선택하세요 0 : 츠루네, 1 : 파워플레이"))
elif genre== 2:
... | 0 |
577a15401c86382ff8f9c98dd92c40a4 | 044123ee60abd5c625aed0b947acaff8 | 加密用户名/昵称 | $_nickname = $nickname;
$nickname = apply_filters('wsocial_user_login_pre', null,$_nickname);
if(!empty($nickname)){
return $nickname;
}
$nickname = apply_filters('wsocial_user_login_sanitize', $nickname,$_nickname);
$nickname = sanitize_user(XH_Social_Helpe... | 0 |
19c6ffd6261db975f452dff142772250 | a43801303ec932a19095768f898a7758 | 返回[min, max]之间的一个整型随机数(包含两边) | public class RandomUtil
public static int randomInt(final int minInclude, final int maxExclude) {
return randomInt(minInclude, maxExclude, true, false);
} | 0 |
9f362a405fb95a74d47fdafe67088716 | dccd52e978d6f542ecc1abb032857ba7 | 异步获取漫画列表 | *getCartoonList({ payload }, { call, put }) {
const { data } = yield call(cartoonList, payload);
console.log(data);
if (data && data.isOk) {
yield put({
type: 'changeCartoonList',
payload: data.cartoonList,
});
}
} | 1 |
890b619c209e4bebafb4637f9e6073de | d9dbde59687502124a9ef14b1e358724 | Returns the meta object for class '{@link uk.ac.kcl.mdd.cw2.pageGenerator.pageGeneratorLanguare.headElement <em>head Element</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | {
switch (classifierID)
{
case SwrtjPackage.FILE:
{
File file = (File)theEObject;
T result = caseFile(file);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SwrtjPackage.IMPORT:
{
Import import_ = (Import)theEObj... | 0 |
50bcf07c76d21aadcf5750ca75542ddd | 3821953c93c6efa820c405b644a73734 | 修改字段
不能修改字段名称,只能修改 | boolean modifyField(Fields field); | 1 |
bf8dbe65001d555f97357d3ffcf9e0c8 | 4e5271df992e2a97769a34ef93d67e51 | 获取某作者其他文章列表(同时排除某篇文章) | List<Article> getArticleByAuthorIdAndPage(Map<String, Integer> map); | 0 |
3855ee717af9be88c268b930e81cd250 | 51c992c31124eee8aff12956dea76246 | 通过好友手机号重置密码 | public function resetByMobile(Request $request)
{
if ($request->isMethod('post')) {
$mobile = $request->get('mobile');
$password = $request->get('password');
$verificationKey = (string)$request->get('verificationKey', '');
$verificationCode = (string)trim($req... | 0 |
4ab847e2e68b95b066323bb7fee3fe37 | 71803f5790e6cdacbf5ed50eacf53432 | 编辑漏洞 | if(isset($this->post['submit'])){
if (file::writetofile($this->hdwiki_root.$this->post['file_path'], stripcslashes($this->post['code'])))
{
$this->message('修改成功','index.php?admin_safe-list');
}else{
$this->message('修改失败','index.php?admin_safe-list');
}
}else{
$func = $code = array();
$file... | 1 |
498e20292b3b2afb8c555a1b7541b1b9 | b7a23a22136c43175c259cb06126b5c4 | Auto sets the parameters for fragments | TvEpisodeFragment().also {
it.arguments = Bundle().also {
it.putString(ARG_PARAM_TV_ID, id)
it.putString(ARG_PARAM_TV_ID, seasonNumber)
it.putString(ARG_PARAM_TV_ID, episodeNumber)
it.putI... | 1 |
7e9398d2f6b6c243d992686576ae9bd3 | 960ec5c1672baf35955d009804587033 | добавление вопроса в тест и файл теста | {
string[] tests = new string[listBox1.Items.Count];
for (int i = 0; i < listBox1.Items.Count; i++)
tests[i] = (string)listBox1.Items[i];
string nextTestName = "test" + nextTestNum;
Adding form2 = new Adding(this, nextTestName, tests);
... | 0 |
2efa0e531dfafb06985b599491b903ca | 88dd27f9b10f111a317d5c0f2dbecc6a | https://leetcode.cn/problems/camelcase-matching | n := len(s1)
m := make(map[byte]int)
for i, _ := range s1 {
m[s1[i]]++
}
need := n
for i, _ := range s2 {
if val, ok := m[s2[i]]; ok {
if val > 0 {
need--
}
m[s2[i]] = val-1
}
if i >= n {
if _, ok := ... | 0 |
c28392943bd10713ad3378527545312d | 7888bf76703a751da416cd9a5192b706 | Genera las líneas código con los imports de la clase. | class TypesGenerator(BaseGenerator):
def __emit_imports_for_sub_package(self, pkg):
lr = emit_line_return()
code = ''
for cls in pkg.classes:
code += 'from py{0}.v{1}.types.{2}.{3} import {4}{5}'.format(
get_ontology_name(self.ontology),
get_ontology_v... | 1 |
44e4f132650e8e305a7455ca2bc3dda5 | be900c01e306a703cd936db640f8f86e | Get how many px the main container has scrolled
Add height of the container to count from the bottom of the screen, minus buffer | var visibleRatio = scrollContainer.offsetHeight / scrollContentWrapper.scrollHeight;
return visibleRatio * scrollContainer.offsetHeight;
} | 0 |
1c6de944ef03fb76d75d0ddb51797035 | a15f7bbbf45a2b4ccf87c5abb94fb6f4 | 获取部门下的机组 | {
int start = (page - 1) * rows;
int end = page * rows;
List<JZInfo> jzs = new List<JZInfo>();
string sql = "SELECT * FROM `web`.`机组表`";
string where = "limit " + start + "," + end;
Dictionary<string, object> d = new Dictionary<string, obje... | 0 |
79c0ccc0f533a731f34c13b8181a721f | cbe22ac526f98820646b5dd0b32cab48 | 获取大学列表信息 | class IndexController extends BaseController
public function universityAction()
{
echo 11;
$infoIns = new \User\InfoModel();
$info = $infoIns->getList();
de($info);
} | 0 |
e128d634789ab1779a811360417d7d27 | 4e3f35925f4b0a12c25cb61e7799f3cf | 大屏抽奖,用户现场主动参与抽奖,如扫码 | $lottery_id=$request->param("lottery_id");
$user_id=$request->param("user_id");
$user_openid=$request->param("openid");
$state=0;
$prize=1;
$send=1;
$time =date('Y-m-d H:i:s',time());
$lottery_data=db('lottery_crowd_list')->where('id',$lottery_id)->find();... | 1 |
10d161198a9d56d5858acbc9ced58adc | 1bf237db6c60e8b95144946b437a69e7 | 遍历数组将所有消息设为已读 | @Service("messageService")
public class MessageService
public void setRead(List<String> list)throws Exception{
dao.update("MessageMapper.setRead", list);
} | 1 |
236ddddae9e6e8b819490bac3ac04ee7 | a0acb82eb2e071cea875a615463085b2 | Configuración de escenario de pruebas no. 3. | namespace N3_AhoracadoTest
[TestClass]
public class LetraTest
public void ConfiguracionEscenario4()
{
m_letra = new Letra('Z');
} | 0 |
3780dd1af490e99d2b65069f2dff80f0 | 3134ccbfd33f37e981ab7cc72b751733 | 生成指定长度全部是false的数组 | {
check = new bool[array_length];
for (int i = 0; i < array_length; i++)
{
check[i] = true;
}
} | 0 |
1de44072f5343e0e3b13fee315556e42 | 5c648928f4e409ad67f4101bf8d7db44 | 随机给出伪造过的IP,http的头文件 | {
$ql = QueryList::getInstance();
$ip=mt_rand(11, 191).".".mt_rand(0, 240).".".mt_rand(1, 240).".".mt_rand(1, 240);
$agentarry=[
"safari 5.1 – MAC"=>"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11",
"safari 5.1 – ... | 1 |
892950d805899c7544e85345f607b72a | 35ebf9acdf743a9e79852254eabcf146 | 根据等级整合strong_base、strong_lev配置数据 | {
if (m_StrongholdInfoList == null)
{
m_StrongholdInfoList = new List<StrongholdInfo>();
}
m_StrongholdInfoList.Clear();
GameLevelEntity entity = m_List.Find(x => x.Level == level);
if (entity == null || string.IsNullOrEmpty(entity.Stronghold))
{
... | 1 |
be10a37b251792cf0a3718f934a1dcd8 | 4b26a3cffcd63fddc9477a658990b1ab | Check to see if QueryAlias property is set | namespace Amazon.NetworkManager.Model
public partial class CoreNetworkPolicy
internal bool IsSetAlias()
{
return this._alias != null;
} | 0 |
84757632440077f02abebcb74bb96a9b | 6079f0e2b3a482169eaf3d05db903957 | Get the total time spend on procedure calls based on the DataFrame
created from the procedurecalls.csv | call_time = {}
for call in calls:
if call[0] in call_time:
call_time[call[0]] += int(call[3])
else:
call_time[call[0]] = int(call[3])
if call[1] in call_time:
call_time[call[1]] += int(call[3])
else:
call_time[call[1]] = int(call[3])
return call_time | 1 |
3071be3be31eb4f659e396f217ac2807 | f29df63d25bfde80e8e207948c18d807 | 判断是不是四带两对 | static huPai(pai) {
let hu = false, dui;
if (pai[27] == 4) {
return true;
}
dui = MahjongRule.getDui(pai);
dui.length=27;
dui.forEach(i => {
let paiTemp = Array.from(pai);
paiTemp[i] = paiTemp[i] - 2;
let sun1 = MahjongRule.... | 0 |
4830ab9f65695767d4f2bdafa17a7a4a | b0db71108cd1d8defcfdb1feb507e092 | 创建数据库的同时创建 账号密码表 | static int create_usr_db_table(sqlite3 *db)
{
int result;
char *sql = "create table usr (usr text unique,\
pwd text check(length(pwd)=6));";
result = run_sql(db, sql);
sql = "insert into usr values ('admin',\
'111111');";
result = run_sql(db, sql);
return result;
} | 1 |
c621ba14957c45cb8a072a80214871bd | c9371f3406ccff97a3ea2eb481b67403 | Try to bind DSMx satellite using specified number of pulses | class PulseBlasterDDS(Instrument):
def setup(self, initialize=False):
assert self.count_boards() > 0, "PB Error: Can't find board"
self.select_board(self.board_number())
if initialize:
self.initialize() | 0 |
16dae6a4611ad3efcd146664bd03bc65 | aacb5185398c598e032db3e8acde723c | adds noise/grain to background | h,w,c=image.shape
for row in range(h):
for col in range(w):
s=np.random.normal(0,200,3)
b= image[row, col, 0]
g = image[row, col, 1]
r = image[row, col, 2]
image[row, col, 0] = clamp(b+s[0])
image[row, col, 1] = clamp(g+s[1])
... | 1 |
dce68d625440e03dc36a85b98f5cf496 | 2c9d44227fc274994ea8aacaa1c9d92f | 顾客不停地每秒吃一个包子 | public class BaoZiPu implements Runnable{
@Override
public void run() {
while(true) {
synchronized (baoZi) {
if(baoZi.flag) {
try {
baoZi.wait();
} catch (InterruptedException e) {
e.printStac... | 0 |
691adb047f15e7d1c14df63236990965 | d767fb2ba3496f7eb1ddf8fe04dc265a | Loads the value of the first local onto the evaluaton stack. | {
if (generator == null)
{
throw new ArgumentNullException("generator");
}
generator.Emit(OpCodes.Ldloc_0);
} | 1 |
0390c3243ce5d57b59889c861fbf87ba | e3ec2242ac7709338a12e97ad5623ba0 | AD18 办案单位确认处罚决定 | namespace Web.Workflows
public partial class CaseWorkflow
private void AD17_Submitted(object sender, EventArgs e)
{
TotalForm finalForm = this.CaseForm.FinalForm;
Form102 form102 = finalForm.Form102;
this.CaseForm.FinalForm.CurrentForm = finalForm.Form117;
Act... | 0 |
cabf6524d79b4215b7e67f7ae21392e1 | ee2044d83bbc1824d08dd986477015c3 | EKF UPDATE - VELOCITY | int i;
float temp1 = 1/(covar[0]+covar[1]+covar[2]+covar[3]+R);
K[0] = (covar[0]+covar[1])*temp1;
K[1] = (covar[2]+covar[3])*temp1;
float yaw_measure = real_angle;
float tmp=0;
if(yaw_measure - angle_estimate > 3000){
tmp = 3600;
} else if(yaw_measure - angle_estimate < -3000){
tmp = -3600;
}
float temp2... | 0 |
a6dec811f1c2f8b3f0961ad95e095b4e | f3bcc91697a5d407b76ec16b53d284c9 | returns the number of times the greatest number appears | public class Question5
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("Number of numbers:");
int amtNum = in.nextInt();
int[] num = new int[amtNum];
for (int i = 0; i < amtNum; i++ ){
num[i] = in.nextInt();
}
Arrays.sort(num);
int c... | 0 |
c50d3382944f28111211632c913162d3 | af302824b16b3862ebc45d2c7fdae5b4 | Writes or updates an item to the Inventories table in the Spanner databse. | public class EditorActivity extends AppCompatActivity implements
LoaderManager.LoaderCallbacks<Cursor>
private void saveItem() {
String nameString = mNameEditText.getText().toString().trim();
String priceString = mPriceEditText.getText().toString().trim();
String quantityString = mQuanti... | 0 |
c0ab3fc79f4501f6839a3ac7232d7632 | 9c1bdf6080d5ab5091ef6ab2a4badab2 | Gets the update event to trigger when a variable is changed | {
try
{
return GetMethod(Source, MethodNames.GetWhenChangingObservable) as IObservable<object>;
}
catch (Exception ex)
{
onError?.Invoke(ex);
throw;
}
} | 1 |
86b42870131a5d590a2a9853e3402756 | 1db1bfebd54ead4864d7caff7fec6624 | Si le fichier output.html existe on le supprime | void cleanOutPutFile() {
remove("output.txt");
} | 0 |
3dda26c7f7724f0db928c89957558250 | 5d5223b3ef3069a8e8caa8c9801152b5 | handles user interaction, loads data and updates GUI
Attributes
.figure : Figure
matplotlib Figure object to contain the Axes object(s) and the FigureCanvas object
.ax : Axes
matplotlib Axes object is the 'plot' itself, the region of the image which contains the data
.canvas : FigureCanvas
matplotlib FigureCanvas is th... | self.fig, self.axes = plt.subplots(nrows=1, ncols=2, sharex=True,
sharey=True, squeeze=True)
plt.subplots_adjust(bottom=0.2)
ax_img, ax_feat = self.axes
imshow_args = {'interpolation': 'none', 'aspect': 1,
'cmap': plt.get_... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.