query_id
string
corpus_id
string
query
string
code
string
label
int64
f4653061e25d904c8dc9b368972f7b36
b886bb932e21186860bdd5558edbd5a5
Utility method to convert a List<String> to be passed down to LBSmartTable pushdown method.
String returnValue = ExtUtil.EmptyString; StringBuilder _stringBuilder = new StringBuilder(); _stringBuilder.append("['" + ExtUtil.EmptyNode + "','/u3000'],"); if (list != null && list.size() > 0) { Iterator<?> iterator = list.iterator(); while (iterator.hasNext()) { Object[] object = (Object[]) itera...
0
b96e787e83c62fa06e3c344cf23aea15
ebcf1ad8e681b00067151dbbe475b59f
Sets the "faultcode" element
public class SoapFault extends SoapMessage public SoapFault faultCode(String faultCode) { this.faultCode = faultCode; return this; }
1
d4fe360fddf513bd4c5bfc70d40ceefa
001114d86621e88e7e824b40f93ae854
Test that a builder error status gets forwarded to the device
EXPECT_CALL( *m_mockMessageSender, sendMessage(EventNamed(DEVICE_SETUP_NAMESPACE, SETUP_COMPLETED_EVENT, AssistedSetup::NONE))) .WillOnce(Invoke([](std::shared_ptr<MessageRequest> request) { request->sendCompleted( avsCommon::sdkInterfaces::MessageRequestObserverI...
1
858e15a16818197783116403a92726ae
691ba5bb01b780859972799563c1f78a
Sorts cache resources based on age.
namespace VirtualBicycle.Core public abstract class ResourceManager public void Manage() { if (allowDynLd) { manageTimes++; if (manageTimes >= manageFrequency) { manageTimes = 0; if (curUsedCache ...
0
90e2efceda5938c747955102375f245d
4b67e7d26e033f9e60f810b331487f5b
Set a specific serialiser for a component name
{ return (constructor: Constructor<any>) => { component = component || constructor.name; objectview.OAVComponent[component] = constructor; }; }
0
dca2d120374eff1ed932c0a162e95131
0f349ea98be7cc2ba9703175d71ccb90
Получение расписания из кеша
if ($stmt = $this->_mysqli->prepare("select * from hc_timetable where calendar_id = ?")) { $stmt->bind_param("i", $this->_calendarId); $stmt->execute(); $res=$stmt->get_result(); if ($res) { while ($row = $res->fetch_assoc()) { ...
0
10de452a77ebc361173303921245f09d
8945f3f4ea5fbd2175df1e6dc51540bf
function to provide the actual file location and name from the name of its metafile
class metaSample: def getFileName(self): return self.__fileName
0
7a2278a1fa80806597bf12b397087417
1d7c2b79526e9509856c6b3c05f17f8e
Returns maximum file size from PHP/Apache configuration (in bytes).
class ilDAVServer extends HTTP_WebDAV_Server private function getUploadMaxFilesize() { $val = ini_get('upload_max_filesize'); $val = trim($val); $last = strtolower($val[strlen($val)-1]); switch($last) { case 'g': $val *= 1024; case 'm': ...
1
77e2c3d13db946fae6d185a3dc247e29
07475fb68b14fb1464bb4614cd575e51
判断当前时间石否是白天(6点[包含]-18点[包含])
public class DateUtils public static Boolean isToDayPmSix(Date param) { try { Calendar paramCalendar = Calendar.getInstance(); paramCalendar.setTime(param); Calendar current = Calendar.getInstance(); Calendar yesterday = Calendar.getInstance(); yes...
0
7b9ed824698de88b4bb856f923ca3d9f
bfdcc02ff10926a08408004b8baff504
回覧状況を既読にする
def readit(uid): success = False with Database() as db: if db.toggle_readit(uid): db.commit() success = True return jsonify(success=success)
1
1721163009d7f5b2fc1dfb74dc41c11d
86ce828658c23e9f841b1f6673ad3eef
Turns a byte array into a uint array.
public final class Unsigned public static UInteger[] uint_a(long... values) { UInteger[] array = new UInteger[values.length]; for (int i = 0; i < values.length; i++) { array[i] = uint(values[i]); } return array; }
0
b39908b471d2ce4f4e99a63e10e5c7b7
249853142d399a34c839a5541f8de786
中序遍历对二叉树线索化的递归算法
{ if(p){ InThreading(p->leftchild); if(!p->leftchild){ p->LTag = Thread; p->leftchild = pre; } else p->LTag = Link; if(!pre->rightchild){ pre->RTag = Thread; pre->rightchild = p; } else ...
1
3f0b34367bf0605ccaa872c343979e4d
7c6893bb539f437202b5d5e9f55cf82f
Get the 32x32 bitmap to show in the config dialog
namespace AC.Base System.Drawing.Image GetIcon32();
1
af0223fabf6c4079b27995e50f04789b
d1d4a6ef9a1fd7e65a360f0bb758ef02
Checks is repost
public class SoftwareProjectDataTests @Test public void testIsRepost_default() { assertFalse("The default value is incorrect.", softwareProjectData.isRepost()); }
1
260f57a644274647ebceba43a639d210
9b1a9920d52893222fd566fd6a66861e
set the voice volume (0-255)
void GRRMOD_SetVolume(s16 volume_l, s16 volume_r) { AESND_SetVoiceVolume(modvoice, (volume_l<0) ? 0 : (volume_l>255) ? 255 : volume_l, (volume_r<0) ? 0 : (volume_r>255) ? 255 : volume_r); }
1
92ec2be63e5cf5a36e1b61199258d5b8
e45c3b9a5e5fdfdec414b894725f57cb
casstフォルダを指定し、データを読み込む
class CLAS: def read_clas_data(self, fname='clas.data'): if not os.path.exists(fname): return with open(fname, 'rb') as f: self.clas_group_list = pickle.load(f)
0
af4e3a561a0586c0776f452a632ca553
19af5d005651fd89040a049d7e731162
https://www.geeksforgeeks.org/find-duplicates-in-on-time-and-constant-extra-space/
class Solution: def findRepeating(self,arr,n): temp=arr[0] slow=arr[temp] fast=arr[arr[temp]] while(slow!=fast): slow=arr[slow] fast=arr[arr[fast]] slow=arr[0] while(slow!=fast): slow=arr[slow] fast=arr[fast] repeat=...
1
e7ed59d2cfaa09dc899c7024d840094a
57f6d5092c061e4bd0a372344158d8c7
先模拟登陆,然后访问真正的网址
username='******@qq.com' password='*****' data={ 'form_email':username, 'form_password':password, 'redir':'http://www.douban.com', 'captcha-solution':'', 'captcha-id':'', 'source':'index_nav', } url='https://accounts.douban.com/login' afturl='https...
1
5a467f5cf6bbc345699b9dfe5fce03a3
d0a1aea61de71ec32dd3dfb280ecd937
CSynth::SetChannelPriority() Set the priority for a given channel, to be used in voice stealing.
HRESULT CSynth::SetChannelPriority(DWORD dwChannelGroup,DWORD dwChannel, DWORD dwPriority) { HRESULT hr = S_OK; ::EnterCriticalSection(&m_CriticalSection); dwChannelGroup--; if ((dwChannelGroup >= m_dwControlCount) || (dwChannel > 15)) { hr = E_INVALIDARG; ...
1
f16dfd75f87d844677530796c2d329b3
018ea33960043d8877e2beb525276044
根据年级生成其所有的班级数据
{ List<long> list = new List<long>(); for(int i=11;i<=10+num;i++) { long num1 = year * 100000 + mlid * 100 + i; list.Add(num1); } using (SqlConnection con = new SqlConnection(conStr)) { con.Op...
1
5287b519d7962084ed7fca7dca4918c2
1db9af7a26faeb707060567e37d40d7f
Create the network data structures, given the number of input and output units. Get the MaxUnits value from a variable.
(const UnitIndex nu_units, Layer layer, ActivationClass actv_class, const ActivationParameters parameters, const BoolValue use_layer_default_activation_class, const BoolValue use_activation_class_default_parameters, const Vector coord_distribution, const Vector coord_increment) { Unit aux_unit; ...
0
6552cfcf0ffc22606d1c784dd5413e50
561f07ddaebc01ad534c410a21580916
Initialization of qubits.
class MyAnsatz(ofcq.VariationalAnsatz): def _generate_qubits(self): return cq.LineQubit.range(4)
1
d8ae3ea03dec1d272c932baae98c5377
4c4307872c9b029728718617c659dfb0
Asynchronous task to send welcome msg with mandatory questionnaires.
def send_welcome_msg_with_questionnaire_async(name, email): questionnaires = Questionnaire.objects.filter( is_published=True, is_mandatory=True ).values('id', 'title') send_welcome_msg_with_questionnaire(name, email, questionnaires)
1
27b6de60bb166870381332d51417c618
740f427c1071f0f643c1e3904f7d218a
Entfernt das Explosionsfenster.
namespace SpaceGame.Screens public partial class KamikazeTest private void RemoveExplosions() { for (int i = ExplosionList.Count - 1; i > -1; i--) { Explosion explosion = ExplosionList[i]; explosion.DestroyExplosion(); } }
0
ba5cd7327aab66d751e1d08c53de214e
3505cfee418b76ac75b4c51924a7fbd2
perform a BCI online trial to get answer to the question posed by the robot
def trial_logic(eeg_system, out_buffer_queue, cursor_task, fs, high_freq, low_freq, prompt, window_width, sleep_time_if_not_ran=2): log.info("start: " + str(time.time())) cursor_task.show_all() cursor_task.hide_tb_flags() cursor_task.hide_crosshair() cursor_task.reset_cursor() cu...
1
67fa28dff2cffae4274855e1f1c95b5e
8b6f0c352f70ddd56b94d652b164b492
Import configuration variables from system environment.
class Config: def from_environ(cls): environ = get_environ() data_dir_var = environ.get("DATA_DIR") data_dir = ( PROJECT_PATH / DATA_DIR if data_dir_var is None else Path(data_dir_var).expanduser().resolve() ) database_var = environ.get("DATABA...
1
8bc0a180c79dc2e8c6de51ae8af26ce3
5c8aa16313235530ba14cdc0e27e8f7b
Approve refund for student fee.
public function approveRefund( \Magento\Sales\Api\Data\CreditmemoInterface $creditMemo ): void;
1
8f8ff410dfe6d863efc77ff61dd1e11a
6a3395806e884e13b2797b20cc7bd408
Display the transposed adjacency list. Compute it if needed. Returns
std::ostringstream os; for (size_t i = 0; i < _adjLists.size(); ++i) { os << i << " " << _nodeMap.find(i)->second->_triple.asString() << " : ("; for (size_t j = 0; j < _adjLists[i].size(); ++j) { os << _adjLists[i][j]; if (j < _adjLists[i].size() - 1) { os << ", "; } } os << ')'; ...
0
2c5d5fb69d7cf62a32167d0d9a41eb33
d74d83766042d655bd5d6ba022103a2f
method to check how many ludo buttons have reached to the home
namespace ModelDLL public class GameBoardState internal int NumberOfCheckersInHomeBoard() { return gameBoard .Where(kv => PositionIsInHomeBoard(kv.Key)) .Select(kv => Math.Max(0, kv.Value)) .Sum(); ...
1
da081d67b25be774baa7990977cc38cb
f00e1b8396afd5ff96bbd2a13902431e
Judge whether last expenditure command can be undo
boolean canUndoCommand();
1
f1aa8dde648e23b688867063c12f6ebd
1e588fbd5647a6c8dde54234dae73222
Get configuration for site + command wrapper
def _get_config_data(fqdn): if not upload.extended_info: try: caller = sys._getframe(2) except AttributeError: pass else: config = caller.f_globals.get("config") host = caller.f_locals.get("host") del caller if config ...
1
361d1b4b17c6f541f49bb9a25ad3a6bf
0fe93b899c0aa72c5770774b456e4b4c
Функция, которая вызывается по нажатию кнопки увеличения значения модификатора масштабирвоания
function brushBig() { if (sndOn){ sndSup.play(); } brushSize.value++; }
1
0d4d88ffb3ebb19066e250fcbdfa99de
9d25cb91eb32854e527deef23e0599b3
Converts to instructions to features.
class BlockToFeatures(ProcessorBase): def __init__(self, sendee=None, sending=True): super(BlockToFeatures, self).__init__(sendee, sending=sending)
0
c8bcd47f87b2a75c7445f111db7741c4
034568987e0e3d104ce090e4c6ea24b4
stream is not a wrapper around another stream it simply returns itself.
namespace NPOI.XSSF.Streaming public class SheetDataWriter protected virtual Stream DecorateInputStream(Stream fis) { return fis; }
1
cdb5a43f2d7b60a2735e0fe5ea765dbd
45994b4b25b6ad0dfeeb4cfa81417942
Updates the "total score" field when editing a TestScore.
public class EditingFrame extends JDialog public void updateTotal(int newValue) { EventQueue.invokeLater(new Runnable() { @Override public void run() { totalField.setText(String.format("%,d", newValue)); } }); }
1
5a71b8a29108e7053ad1f84f1be8b12e
b0de3582cd407c6dc77bc0dc065f3293
Writes a line to the browser or the output buffer
class THtmlWriter extends TApplicationComponent implements ITextWriter public function writeLine($str='') { $this->_writer->write($str."\n"); }
1
cf0d2278b1ae09195ef7bf95fd1441c6
7bb374452e96599b9cedfa81fe75723f
Removes all capabilities associated with a given software model.
void removeAllCapabilities();
1
3f2c431779f8cdc2a6f2363ccaecff53
d8c5c609fef48090a3df746595c6078b
Returns the meta object for the containment reference '{@link TTMCHybrid.Assignment#getLhs <em>Lhs</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EAttribute getArgument_Lhs();
1
d331b2ca8f1d87607bae1dadee1237a6
e1541a13cecb3a44eeea1cb1daf7ec9f
Gets the "list" element
{ return PMElementList( owner, owner->getElementList( *this, name ) ); }
1
0dda913b9d33125617bb26e049a8ebc9
389216d33f4f56c51853d32d2861a0e7
Event handler for the click event on button1.
[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:ElementMustBeginWithUpperCaseLetter", Justification = "Default event handler naming pattern")] private void button1_Click(object sender, RoutedEventArgs e) { MessageBox.Show( string.Format(System.Globalization.Cu...
1
bab627efc869ada0bef649b3318df3d2
8fd9650d4a4644ac490843df352a054b
Multiplayer game just ended. Get the results and go back to corresponding state.
{ if (!IsMultiplayerGame() && m_playOptions.loopOnFail) { m_OnEndRun(false); Restart(); } else { if (m_isPlayingReplay) m_scoring.SetScoreForReplay(); FinishGame(); } }
0
44d1f7bd7bb9e8f4035d5687c8639a37
65b8e732951c3ece24ec101b8f4225c2
获取用户最新的一个动态
public class ProfileMainActivity extends CommTitleActivity private void getOneUserDynamicList() { UtilRequest.getOneUserDynamicList(J_Cache.sLoginUser.uid, 0, 1, mHandler); }
1
0613b6b33e036f6080ba848b6035d9e2
9013007ba64df77c2209631c4d9f87f1
Copies a 32bit integer.
*b++ = i >> 24; *b++ = i >> 16; *b++ = i >> 8; *b++ = i; return sizeof(uint32_t); }
1
f6d2c6aa401079d497ac8ddcc2b03fc2
4dea10cfb66073d090e38ecab53312bd
Setup button layout dependent upon the _buttons field.
widget._setup_vertical_layout() widget._setup_horizontal_layout() widget._setup_vertical_layout() for field in self._fields: if field == 'trace_idx': widget._exit_layout() widget._setup_vertical_layout() choices = None i...
0
11b778a347eafa44f2ba47add51748b2
7bdf928bcd050f7643ad180c89c4e804
Basically resets the EditText view fields to a blank state while also setting the spinner to the default meridian position
courseTitleView.setText(""); courseSubjectView.setText(""); courseNumberView.setText(""); professorView.setText(""); locationView.setText(""); startHr_sp.setSelection(0); startMins_sp.setSelection(0); startAMPM_sp.setSelection(0); endHr_sp.setSelec...
1
f924eb3e574ae623d5005ef36786e992
e3c86b29cffcb9809e8cd6e8444e0d41
Data Correspondente a x dias úteis a partir de uma data
public int diasUteisEntreDatas(LocalDate d1, LocalDate d2) { int numUteis = 0; while(d1.isBefore(d2) || d1.equals(d2)) { if(!d1.query(UtilsDate::fimDeSemana)) numUteis++; d1 = d1.plus(1, DAYS); } return numUteis; }
0
34f0c38703858bb43f8157dd92f9ecc4
f82a53da129a7d696d33afa2ee31a82a
绑定银行卡发短信
function sentSMS(){ if($("#selBank option:checked").text() == "请选择支付银行卡"){ AlertDialog.show("请选择支付银行卡", "selBank", 5, 150); return; }else{ AlertDialog.hide(); } $("#sendBtn").unbind("click").text("发送中..."); $.ajax({ url: path + "/fundpool/yeepay/pay/sendPayVerifyCode.html", type: "post", dataType: "jso...
1
b4ebb5f4468565c66daa438a95e78ecc
ae3262dd95b31c0c21b64fd8ee2e7ef0
Cleans name of ASCII values for storage.
class S3ProcessesAdapter(Base): def _clean_name(text: str) -> str: res = unquote(text) return res
0
d7317de6821ae721e0dd7026fa684561
4e99a27240f12101d0cf17c2c5dedac4
Sets name in the table userdata assuming existing value in userdata table with id = 1
{ var update = Builders<UserDataCollection>.Update.Set("Name", name); UserDataCollection.FindOneAndUpdate(x => x.User_id == id, update); }
1
ae2f6ef26b782b6b0dd5cf40036d9b67
5323d56b3565f0f5340b001f0939ad60
Sets the {@link BlockSnapshot} to customarily replace the {@link #getOriginal()} block snapshot. If set to <code>null</code>, the default {@link #getDefaultReplacement()} is used.
default void initializeReplacement() {}
0
33689458747db866caa8470821629e82
f162b2ee7bcfd6c795f4d575cd262d18
根据ID查询基础模块-年份信息信息
@Service public class HistoryService public HistoryYearDO selectHistoryById(Integer id){ return historyYearBaseMapper.selectById(id); }
1
e08ac6e3af527dad62515a827080abcf
cba950db64d81412cb7d08c32dc37ef3
Session-scoped caching.
class QueryKeyCache(object): def __init__(self, session_lifetime=900): self._session_cache = session_cache.SessionCache(session_lifetime)
1
fdad6beed885996e14f0e33d12f5db6f
5f476dc3026ea7e7d26826aafedf2551
Gets ith "serviceOfNoticeEmailAddress" element
{ synchronized (monitor()) { check_orphaned(); org.xmlsoap.schemas.ws.x2004.x09.policy.Policy target = null; target = (org.xmlsoap.schemas.ws.x2004.x09.policy.Policy)get_store().find_element_user(POLICY$0, i); if (target == null) { ...
0
4befc55ab93bc811b4b67d4dbcf01cee
7f4081d60aa9f94af86d715e64f12be8
预处理数据,分为-1和1的二分类
def preprocess_label(labels): for i, v in enumerate(labels): labels[i] = 1 if v == 0 else -1 return labels
1
4b9a8e90f3379b57dc90ec30b6536054
b3d1fc16fbe61534bf6d22b55c97c1c5
将sourceTask转换为TaskOf(targetResultType)
TSource source, TTarget target, IDataConversionContext conversionContext, CancellationToken cancellationToken = default(CancellationToken)) { Contract.Requires(conversionContext != null); return Contract.Result<Task<IDataConversionResult>>(...
0
22d05f82e7ed36362ab028d36fde71b5
a50e37248a20bce3cff785a0366e8bc9
Set command_list flags, based on robot state, parsed from incoming comms
class HardwareComponent(): def _handle_status_bits(self, query, reply): bitlist = [StatusBits.PARAM_CHANNEL] if ControlBits.COMMAND in query.flag_bits: bitlist.append(StatusBits.PROCESS_CHANNEL) if self.is_on: bitlist.append(StatusBits.OPERATION) else: ...
1
eec73cc0e1b7ded382f90459fc664384
9ee3a026775011542a096ce95ae57cd6
Returns the L&F object that renders this component.
public class Scene extends Widget public final LookFeel getLookFeel () { return lookFeel; }
1
cb0f6404aa1b80ef1f768b13f6226b16
0b8ec9349d06c1aba8c0b6bcca2b1051
Get and convert GeoRss XML to an array of objects
class Radcodes_Lib_Google_Map_GeocodedAddress public function geocodeXml($gmap_client) { }
0
dddcdf277f147a9c0e94bc4e65453170
e88b2565eb2def778a908d4f80154e84
檢查使用者三十天內是否有下注記錄
class Summary_model extends CI_Model public function check_record($user_id, $amount, $symbol = '>=') { $data = array( 'user_id' => $user_id, 'amount'.$symbol => $amount ); $query = $this->db->get_where($this->table_name, $data); return $this->db->count_all_results(); }
0
318f3b3cdb00b5695f7d020ff1267de1
a55524dc80493ac15105d00328c3980f
Get all valid input mime types for a certain operation array(mime type => array(toolkit ids, sorted by priority))
if (!isset(self::$mime_types)) { $headers = array('Content-Type: application/json', 'Content-Length: 0'); $result = $this->sendToThumber('GET', self::getThumberUrl(self::ThumberServerMimeTypesPath), $headers); self::$mime_types = !array_key_exists('error', $result) ? json_decode($result...
1
02e85374dcfa0adbcd3d291a5d59bf78
77d744377b0c29b67652777bb8b30db8
Metodo <I>addSprite()</I> <P> Agrega un objeto Sprite al vector sprites.
public class GameLevel implements Animation public void addSprite(Sprite s) { this.sprites.addSprite(s); }
1
94c048ecfe4e64b3308ddc46d18f454e
a520ced17e1d4150b70d9fd6e92e0b7f
Returns a vec4 from component-wise application of Fma (a * b + c).
namespace GlmSharp public static cvec2 Fma(Complex a, cvec2 b, Complex c) => new cvec2(a * b.x + c, a * b.y + c);
0
4fb1455bce1a46df8ab51165b0a67c0a
fec6476a42a20e25ee08ef4be37754bc
Converts a Speedy Device Platform to a Xamarin Device Platform.
{ XDocument doc = XmlEmbeddedResourceResolver.GetXmlTemplate("DeviceExtractionProjectTemplate.dp"); return new DPConfiguration(type, doc); }
0
c5e41639d748bc5492bc6cc1ef537bc5
77da4122fd7675ab07a6b2b60a37d6bc
<summary> 获取预设体实例,可以修改名字 <param name="originalName">预设体原来名字</param> <param name="currentName">预设体实例现在名字</param>
{ try { return remoteobj.Get_Base_OriginalConfigManageByName(Original_ConfigName); } catch (Exception ex) { OnError(ex.Message); return null; } }
0
41e1bd7e780675605a7d2c6998e7633b
bec96b3e65d6fbf1097a8e48bcfc456a
指定したリストからソートマップを作成する
public class RecordSet implements Serializable, PartUpdate, Cloneable{ private Map createOrderByMap(int[] orderBy, boolean[] isAsc){ final Comparator comp = createOrderByComparator(orderBy, isAsc); if(comp == null){ return new LinkedHashMap(); }else{ return new TreeMap(co...
1
1ead29cd8ccf9d70866f217dd2429294
f205122df51eb779eb914fcdb06add5f
setting up theoretical masses for amino acids (also parsed in from sequest output)
class Protein: def setMasses(self): self.ave_masses = {'X': 0.0000, 'G': 57.0513, 'A': 71.0779, 'S': 87.0773, 'P': 97.1152, 'V': 99.1311, 'T':101.1039, 'C':103.1429, 'L':113.1576, 'I':113.1576, 'J':113.1576, 'N':114.1026, 'O':114.1472, 'B':114.5950, 'D':115...
1
f1166134a0cbfc1cea3f6061c9cc7266
89884a78f1ef6f17157372f38dc8c49a
Sets interval for timer to count back by 1 second
seconds = 0; timer = setInterval(() => { seconds += .1; }, 100); }
0
b8646c375715471d551826bc8a15207b
53100132534abb3494c9c02367c50256
Random integer in [0, k-1]
def rand_gen(k): return randint(1, k)
0
aa0ac690c872a2c7715ac5dc2aace2b8
c0320e74af38c52d96313a9a1297ee98
Make sure the operand is actually still in the block. Transformation passes could potentially remove instructions without updating all uses correctly.
return GetSafetyInfo()->CanBeSpeculatedInBlock(instr, block) || (instr->IsLoad() && GetSafetyInfo()->OperandsDominateBlock(instr, block)) || (instr->IsStore() && GetSafetyInfo()->OperandsDominateBlock(instr, block)); }
1
0bbe120b54996c80f7ce117f51d70ca8
abc5545fc5274b52a47cec82b7197030
Get the name of the invalid argument.
class InvalidArgumentException extends PHPInvalidArgumentException implements ILookException public function getArgumentName() : string { return $this->argumentName; }
1
12c459cfec4e8bdf623f8d31bd21857d
79e062fcb8ab9d08ad0993ba36c3972c
Get the value of the specified dihedral angle
def get_phi(strand, res_id): return geometry.dihedral(strand[res_id - 1]['c'], strand[res_id]['n'], strand[res_id]['ca'], strand[res_id]['c'])
1
156757f031cfa0f7812069f2f875573c
ac957a53cecd6b0ba7e62fea293121f7
Test that placeholder methods return NotImplementedErrors
var = PlaceholderVariable("var", None) assert_raises(InvalidOperationError, var.to_python) assert_raises(InvalidOperationError, var) assert_raises(InvalidOperationError, var.equals, None) assert_raises(InvalidOperationError, var.less_than, None) assert_raises(InvalidOpera...
0
e620e13b01b4fa5f8239ec8577a3b891
40319660ab39fa1d5a0d8de7e85a11e2
Copy all files from the source to the target storage that don't exist on the target storage yet While copying the target files will be added to the cache with the etag from the source storage
class SyncOnionWrapper extends OnionWrapper public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) { $result = parent::copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath); $this->scheduleSync($targetInternalPath); return $result; }
0
a653b9f0adef226dee250212e1b8cccc
3e9cb0d0b3704e1b26538f84d0298918
var_export打印类中的所有属性值。
function var_export($expression, bool $return = false) { if (is_array($expression)) { $toImplode = []; foreach ($expression as $key => $value) { $toImplode[] = \var_export($key, true) . '=>' . var_export($value, true); } $code = '[' . implode(',', $toImplode) . ']'; ...
0
b710e023eb0afb3cd40d02d10168c9ff
7a6d677a22fd5484810a8b3f07511e89
If opacity is None just silently ignore the request
def reduce_opacity(im, opacity): assert opacity >= 0 and opacity <= 1 if im.mode != 'RGBA': im = im.convert('RGBA') else: im = im.copy() alpha = im.split()[3] alpha = ImageEnhance.Brightness(alpha).enhance(opacity) im.putalpha(alpha) return im
0
a490b71f49424859f104069175cc8ff2
659c7a4fa9e8bbd106092198a23ab253
The code that executes after the Shutdown status is achieved.
namespace Revit.SDK.Samples.AutoLayout.CS public class ExternalApp : IExternalApplication public Result OnShutdown(UIControlledApplication application) { return Result.Succeeded; }
1
19dc2eba427207a9fb14e7845410736a
4a5a00de0ec5eb8defcd5335ce043a15
Returns the current routing object.
function getRouter() { return Utils.copy(lastRouter); }
1
21e4907964b8cccc406bcccc4c12a1cb
9845f1635c2794b352cff881f340b985
Runs the Ticket Auto Close Routines
{ $tickets = self::where('status', 1)->get(); if (isset($tickets)) { $period = null; foreach ($tickets as $ticket) { $period = explode('@', $ticket->period); if (count($period) > 0 && (intval($period[1]) < time())) { $ticket...
1
7ba2d6f2babbc9d1d63090f4c8a49fda
cb71467fa37f568199bfc1d810743a0d
回收怪物所受部分特效逻辑
local layer = EffectMgr.getConfig("emc_front_layer") local pos = self.mPosition local config = SkillConfig.getSkillEffectInfo(34) local plistName = config.plist_name CCSpriteFrameCache:sharedSpriteFrameCache():addSpriteFramesWithFile(plistName) local animation = FightAnimationMgr.skillEffect(config.st...
1
e61e3078130a190c6a40c37f09382cd3
b8ae36f9aa273ebc00749e2376f38c44
Serializes the object into an XML string, using the encoding method specified in <see> <cref>ExtensionMethodsSettings.DefaultEncoding</cref> </see>
{ using (MemoryStream stream = new MemoryStream()) { _f_XmlSerializeInternal(stream, o, _Encoding); stream.Position = 0; using (StreamReader reader = new StreamReader(stream, _Encoding)) { return reader.R...
1
b35b4e4bdaef917c9752eafbeaa548dd
4cc4087b8221ad357c84483aa104dd5a
This plots two runs where we try to trigger reentry with & without I_kr block. Here the g_NaL parameters were set using source code only
sys = make_system() kwant.plot(sys) sys = sys.finalized() plot_conductance(sys, energies=[0.002 * i for i in range(100)])
0
a2c1126b688411e240368aebfdc5a09e
880963f6e25c327768bb5c04100bbfbe
Suspends the process instance with the given id. If a process instance is in state suspended, activiti will not execute jobs (timers, messages) associated with this instance. If you have a process instance hierarchy, suspending one process instance form the hierarchy will not suspend other process instances form that h...
public void suspendProcessDefinitionById() { final String processDefinitionId = "oasis:9:326204"; this.repositoryService .suspendProcessDefinitionById(processDefinitionId); }
0
5c6f447942a32c7fb10e9521cd1c4a57
b27b52700976c8367ca7d50d5392c202
Setter for <code>cbis.major.major_name</code>.
@SuppressWarnings("serial") @TableName("cdpf_cyjy_qz") public class CyjyQz extends SuperEntity public void setRcmajor(String rcmajor) { this.rcmajor = rcmajor; }
0
af3561d547e3b056fcdb1c26915bdb4c
70e625c13db257bfa0a3c1bff8f8e1af
Given a vertex index, grab the edge clockwise from it
bool BOP_Face4::getNextVertex(BOP_Index v, BOP_Index &w) { if (m_indexs[0] == v) w = m_indexs[1]; else if (m_indexs[1] == v) w = m_indexs[2]; else if (m_indexs[2] == v) w = m_indexs[3]; else if (m_indexs[3] == v) w = m_indexs[0]; else return false; return true; }
1
83d37a3a19dc23987dca752310c4a0e7
d20a8601acf12a68e55a546addf87441
Parse JSON move and return as Position objects
namespace nlohmann::json initMoveInfo() { std::ifstream movesFile("moves.json"); std::stringstream tempStream; tempStream << movesFile.rdbuf(); return nlohmann::json::parse(tempStream.str()); }
0
916d3b0df3472de796ce1f149c446ead
e1284b619afece7a37afdbf6c5e65b67
将数据点值转换成像素点值
{ if (string.IsNullOrWhiteSpace(id)) throw new ArgumentNullException(nameof(id), "echarts控件id不能为空"); var module = await moduleTask.Value; return await module.InvokeAsync<T>("echartsFunctions.convertToPixel", id, finder, value); }
1
b62637f1c72b08c4a1666adabb36a79e
9d95b0cb7b2b1b0665d5bb6481137077
检查人员选择框是否存在
xpath = td_xpath + '/select' try: Container.DRIVER.find_element_by_xpath(xpath) return True except: return False
1
9a84824401eb85ff24dcca3bd67abd34
893e150f7ff5dd4f6578ed56c13afc4b
删除成长记录数据
public String addGrowthRecord(Map<String, Object> entityMap) throws DataAccessException { List<HrGrowthRecord> list = hrGrowthRecordMapper.queryGrowthRecordById(entityMap); if (list.size() > 0) { for (HrGrowthRecord hrGrowthRecord : list) { } } try { @SuppressWarnings("unused") int state = hrGrowth...
0
24406e1450b372fbb567853838b09a32
9c86919f78eb1de95a38c05ecd92b985
Raise the VisibleChanged event
namespace Nuclex.Game [TestFixture] internal class DrawableComponentTest void VisibleChanged(object sender, EventArgs arguments);
0
2bae4760ed0c6e77bafcb4eefebf8d97
2408f233f9a5cab29835660f27443c04
This function is called by the builder to signal progress and to report memory consumption.
void reportMemoryUse(long jvmCurrentBytes, long jvmMaxBytes, long offHeapCurrentBytes, long offHeapMaxBytes, long[] deviceCurrentBytes, long[] deviceMaxBytes);
1
4df568ab7fa818546e780ac99f65d8e3
a9af2eb15478e7f529202057542398cd
Hàm vẽ mắt.
public class Face extends SurfaceView public void drawMouth(Canvas canvas) { paint.setColor(Color.RED); canvas.drawCircle(800, 750, 40, paint); }
0
3b5ef090711cecbc4fa044f43a835148
a3a32ee7bd74a2d96ca11bdf3c0bdff3
Multiple processor coroutines will be launched to receive element from
val fruitArray = arrayOf( "Apple", "Banana", "Pear", "Grapes", "Strawberry" ) val kotlinChannel = Channel<String>() runBlocking(Dispatchers.Unconfined) { launch { for (fruit in kotlinChannel){ println("${Thread.currentThread()} Receive: $fruit") ...
1
77f32cf2ca5bdee7311218a93780ff7a
32188a51112123891d2f3f6bd85abe16
Sort paths in PATHS and remove all paths whose ancestors are also in PATHS.
def unique_abs_paths(paths, prune_children=True): if not isinstance(paths, collections.abc.Iterable): raise TypeError("'%s' object is not iterable" % type(paths).__name__) unique_paths = OrderedSet(os.path.abspath(p) for p in paths) children = OrderedSet() if prune_childr...
1
c3f8b07a85c4122fb224215e2af49d89
065b81b6c4e7091929bbfdfd132a94c2
Checks for camelCase words such as McDonald and MacElroy
function checkIfMatchesCamelCaseLetters( needle: string, haystack: string, ): boolean { const uppercase = haystack.substring(0, 1) + haystack.substring(1).replace(NOT_CAPITAL_LETTERS_REGEXP, ''); return needle.toLowerCase() === uppercase.toLowerCase(); }
1
5986117657bd7b3e03dd3547888fdac0
5366754d9b6661135f35813c9b8bad17
This will capture useful performance counter data until the specified cancellation token is set, at which point it will return the data (as such, it makes sense to call this from a background thread)
Func<CancellationToken, Task<T>> action, IStatisticsObserver observer, CancellationToken token) { var start = Stopwatch.GetTimestamp(); var result = await _policy.ExecuteAndCaptureAsync(action, token); var end = Stopwatch.GetTimestamp(); return StatisticsFromR...
1
cd402cc74b41bed425de479067452b6e
07dd772cc9af7e65be81cb3e13b3fd7e
Puts all 52 cards in the DeisplayDeck (doesn't clear it beforehand).
{ int [] deck = getDeck(); deck = shuffle(deck); dealDeck(deck); updateDisplayedCards(8); }
0
32a3c75988f28bf955794bc12a8329b2
a5d8b17a425d6ae33b92aab4bff5fe6f
Method for changing the ring settings of the rotor. Had some difficulty with this method as there are many interpretations on what the ring setting does or outputs so chose the method that most sources agree with.
self.leftRotor = self.originalLeftRotor self.middleRotor = self.originalMiddleRotor self.rightRotor = self.originalRightRotor self.setRotorWiring(self.leftRotor, self.middleRotor, self.rightRotor)
0
6d00e5e50033f1e931efa9a466d898ac
1b1db2d520c12e74b3b64875b190fc0b
获取增加攻击力比例
if nil == lingshu_info_addper then lingshu_info_addper = HunQiData.Instance:GetLingshuAttrByIndex(self.current_select_hunqi - 1, self.current_selcet_shengling - 1, self.current_hunyin_list_info[self.current_selcet_shengling].lingshu_level).add_per * 0.01 end local all_attr_info = self:GetCurrentShengLingInfo() ...
1
929471c22d630967484c091189a67c2e
e0230b2ddd789a20b2e1a7336c8dae31
Used to sort words in descending freq order for outputting top 50 words
function sort(word_freq) table.sort(word_freq, function(a, b) return a.freq > b.freq end) return word_freq end
1
77c58f69615a80deebb2bed12302d119
affdb19e30c006b6e20f58baf043bba4
Устанавливаем фильтр. Задачи которые должны быть начаты на следующей неделе
public class Main_Menu implements Initializable public void weeklyCalendarFilter(javafx.event.ActionEvent event){ LocalDateTime now = LocalDateTime.now(); LocalDateTime nowPlus7 = now.plusDays(7); FilteredList<Calendar> filteredData = new FilteredList<>(list); filteredData.setPredicate(r...
1