query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
d2700d0483afb8f056139e4d3e342cef | b953e0550534ea247d9f26eb3a265120 | Clear all data and call "DataTable.Dispose()" method (E2MKI) | {
long logScopeId = DataCommonEventSource.Log.EnterScope("<ds.DataTable.Reset|API> {0}", ObjectID);
try
{
Clear();
ResetConstraints();
DataRelationCollection dr = ParentRelations;
int count = dr.Count;
... | 0 |
e3ab1921d758875bc11f99d4cbf28926 | cc0f5c15c4efa34c54b2bfe0fdcb5efd | 填寫簽核記錄檔 | {
string sql = "INSERT INTO VerifyProcess_Records (VRecord_Code,Module_Code,Record_ID,VRecord_VCode,VRecord_Owner,VRecord_Date,VRecord_Opinion,VRecord_Flag,VRecord_UDef1,VRecord_UDef2,VRecord_UDef3,VRecord_UDef4,VRecord_UDef5,VRecord_UDef6,Stat) VALUES (@VRecord_Code,@Module_Code,@Record_ID,@VRecord_VCod... | 1 |
b937b9cf92bdcb8f4eda302d132ea6a3 | deebeabaebc74965555eb58b1466b66e | 函数执行到return的时候会马上停止执行 | def foo():
print('111')
return 1
print('2222')
return 2
print('3333')
return 3 | 1 |
410abdf5d2f93538998a03468747e6fe | af22d5b28fd12c762d5e9a43f3aaa14f | Return the key of the entry pointed to by the iterator. | const void *hashset_iter_next(HashSetIter *iter)
{
TableEntry *entry = hashtable_iter_next(&(iter->iter));
return entry->key;
} | 1 |
c3e72506c5777ed4b51716d41c41d65a | 53a18e324afff04818685959f8dfaf29 | Cross-platform wrapper around getting the current process id. | coreUint32 coreData::ProcessID()
{
#if defined(_CORE_WINDOWS_)
return GetCurrentProcessId();
#else
return getpid();
#endif
} | 1 |
c6a86363cc958b31bb633d3198d671b8 | 0e10569d35d2300b1049bc0be8adce86 | Adds the image labels to the schema. | {
$this->fieldsFactory()->create(SPL_T_IMG)
->identifier("image")
->inList("images")
->name(__("Images"))
->description(__("Product Images"))
->group(__("Product gallery"))
->microData("http://schema.org/Product", "image")
;
... | 1 |
cca34d5e158579720feac8eff5f795ac | d1862525a72ee3f9c31575d0a0de1904 | Getter for the subdirectory where a menu resides.
The subidrectory for a given menu. | class TblMenusub
public function getIdsubmenu()
{
return $this->idsubmenu;
} | 0 |
a11728782569c04b74b75239e910659b | 2dd91fb2bd05b702df01434e5e61afdd | Sets the term service. | namespace EDC.ReadiNow.Scheduling.iCalendar.Serialization
public sealed class SerializationContext : ISerializationContext
public void SetService( object obj )
{
_serviceProvider.SetService( obj );
} | 1 |
7c91f2fa7f118b951b4821b924a02409 | 4b1da91cb368d059b9fbf658ecb1d9b0 | Test that the target is actually a directory, raising OSError if not.
New in pyfakefs 3.0. | with patch.object(path, 'exists', return_value=True, autospec=True),\
patch.object(path, 'getsize', return_value=1000, autospec=True):
yield | 0 |
cb46a40998dd1bad975ad96e0998e315 | 8a77e177e0ae0946381579cd99c7b46a | Function to get the form of a player over the last 5 games | function getPlayerForm($playerid, $seasonid, $competitionid){
global $rootlocal;
global $wpdb;
$location = $_SERVER['DOCUMENT_ROOT'];
include ($location . $rootlocal . '/wp-config.php');
include ($location . $rootlocal . '/wp-load.php');
include ($location . $rootlocal . '/wp-includes/pluggable.php');
$pl... | 1 |
48ac1e548ad7560e6ff37196a2edab6b | 718f9c1ab54032de5df26eabaaa3e826 | 隠れフラグをクリア | public class EvidenceActiveManager : MonoBehaviour
public void AllEvidenceDisapearFlag( ) {
_allDisapear = true;
} | 0 |
7d66a5ca07aa5a5b3a35aaacdd38624d | f3c9d7398becb08897ee55491663620d | 自定义函数求两倍的和 | def tFunction2(num1, num2):
return num1 + num2 | 0 |
6747a6a696ff270fd74cb22655255a5f | 0ba15f3ef1cb9fdcf347654565df0035 | 缓存选中的日期 | console.log('eeee', e)
let dateList = this.data.dateList
if (e.detail.selected) {
dateList.push(e.detail)
}
if (!e.detail.selected) {
dateList = dateList.filter((item) => {
console.log('对比', item, e.detail)
if (item.year == e.detail.year && item.month == e.detail.month &&... | 1 |
08c981240d224e20ce71df7d6ed6a613 | 4302e1dc81d0f3089be23919ddd05bb6 | 把json转换成查询条件,追加在where后面
格式:{"age":20,"name":"abc"} | Query query = new Query();
if(null == params) return query;
Set<Map.Entry<String, Object>> entrySet = params.entrySet();
Iterator<Map.Entry<String, Object>> iterator = entrySet.iterator();
while (iterator.hasNext()){
Map.Entry<String, Object> entry = iterator.next();
... | 1 |
95ebfd3d95a1f302eeac75dfb6e5e08f | ea8a8a3ab0a368489ed986de1dbaf5a3 | Gets the list of Keyframes associated with this shape. | public void setKeyframes(ImmutableShape s) {
throw new UnsupportedOperationException("VisualView cannot set keyframes.");
} | 0 |
aef7630f919843d71b9be34b1d78e169 | f35bf408e96ff5180d3e4a32836a30fb | Test that defense star equations produce correct results | namespace TI4BattleSim
[TestClass]
public class SimulationTests
[TestMethod]
public void SpaceCannonDefenseScenario()
{
List<double> sims = Scenarios.SpaceCannonDefenseSim();
List<double> predicted = new List<double>() { 0.638, 0.362, 0.00 };
AssertWithinToler... | 1 |
0d74eca02203c64215518ca80302d167 | 9ae8b9aeab29716820ccd24f4e43aa15 | Returns a list of channel-specific BTTV emotes in the standard Emote format. | result_hash = {
'title' => @twitch_channel,
'emojis' => []
}
raw_emoticon_response.each do |e|
result_hash['emojis'] << { 'name' => e[:regex].downcase, 'src' => e[:url] }
end
result_hash.to_yaml
end | 1 |
bd225bbd359904f1100bd9f43dcef993 | 6642cf112b06ff8747940fc95402616a | Update the Show/Hide Outputs button to hide or show with the correct label | if (this.$delete_outputs_details.is(':visible')) {
this.hideChildCheckboxes();
} else {
this.$delete_outputs_details.show();
this.$expand_outputs_ctrl.text('▾ Hide list');
}
} | 1 |
b76f0a88c800da47a1198a1fbac171d2 | cb4eb54309b69832d1147595379be58f | Activate an inactive teleporter | if (!RunecraftTeleport.forId(object.getId()).isPresent()) {
return false;
}
RunecraftTeleport teleport = RunecraftTeleport.forId(object.getId()).get();
Teleportation.teleport(player, teleport.getPosition());
return true;
} | 0 |
469eff2ab9dd7af28720cae2d99904ad | 7323734d8e1b3fdb1a0e6a225a08b7c8 | Aceptar una petición de amistad | public void solicitarAmizade(int remetente,int destinatario) throws PersistenciaException; | 0 |
7604cf997921294861eb4c07eff6de7a | 68af07de5ffe8e3438a3e350fdbe74bd | Collection of items and their allocation status. | namespace Nucleus.Api
System.Threading.Tasks.Task<ApiResponse<PageAllocationComposition>> GetAllocationCompositionAllUsingGetAsyncWithHttpInfo (bool? ascending = null, string filter = null, string orderBy = null, int? page = null, int? size = null); | 1 |
37e8ac0112bdb4fe01d8d21164b27e6d | bd8155f6d05b23f749bba4f980359ef0 | 检查生成的rpm是否可以安装 | cmd = "rpm -qa | grep %s | wc -l" % name
count = int(run_cmd(cmd))
result = False
if count > 0:
result = True
return result | 0 |
978068a8b1957d8c694023052542f15f | ddd5c1c2991af2ec241003b7ad73745c | Test destination texture has format that not supported by CopyTextureForBrowser(). | constexpr uint32_t kWidth = 256;
constexpr uint32_t kHeight = 128;
constexpr uint32_t kLayers = 6u;
constexpr uint32_t kSrcBaseLayer = 1u;
constexpr uint32_t kDstBaseLayer = 3u;
constexpr uint32_t kCopyArrayLayerCount = 1u;
TextureSpec defaultTextureSpec;
defaultTextureSpec.textureSize =... | 0 |
231bb210854fd62723337ffc1d4f5139 | dc18e4a7cb5818078766c05acb77765a | Method to query the database for all appointments for the current user
the returned appointments are set to the currentUser's appointment list | class AppointmentController extends Controller
public function index()
{
$appointments = Auth::user()->appointments()->where('date', '>=', DB::raw('CURRENT_DATE'))->get();
return view('appointment.index', compact('appointments'));
} | 1 |
f718982b3d6775717db1dbad10b91d55 | cdb16a0ac1a6e4ee1b5659772e31a05e | 查询根据条件查询分销商-店主信息 | public List<Distributor> getList(Map<String, Object> params); | 1 |
bb2203f0f3ae1eb1fb53511a82335f38 | 3bf37af7930f012f098ee0deb5bc8b88 | 过滤下注的字符串(任选/和值) | function bairennn_input_filter($val) {
if (!preg_match('/^(?:方块|梅花|红心|黑桃)(?:[2-9]|10|[AJQK])$/i', $val)) {
return false;
}
return true;
} | 0 |
ec2c576a398318dfbdf2b7cc4bd5c3e5 | e92c75cb3fe4594dffe3a827188a7730 | get an array of reference sequence names, in the order in which
they occur in the file.
reference sequence renaming is not applied to these names. | public String getRefseq(); | 0 |
77a1a97b4e9703cdf0388dd07bfdf13a | 401c57a415c16d0a3e522615c685e288 | Tests halting the device and waiting until halted | class FrankTest extends PHPUnit_Framework_TestCase{
public function testHalt(){
$this->assertEquals("Go away", $this->get_data('/halt'));
} | 0 |
7928292c14764fe62c26f3cacc45d93f | 3b48af06a57374a9c459d8f4a4bc2a4f | 调计划任务,处理零售日结数据
X_QUEUE | abstract class x_trade_transfer_model extends base_model
private function x_handle_sd_sku($order_id, $trade_info) {
$order_info = $this->db->get_row("SELECT add_time,order_status,pay_status,shipping_status FROM `order_info` WHERE order_id = :order_id", array(':order_id' => intval($order_id)));
$add_time = intval($o... | 0 |
dd215f74de9636698e4bc1bb4375b3de | 3fa7bda94f8e6ef278e14b068a3e1b8e | Adds the dependencies, hooks and mark the parsing as done. | public class MathParser extends BasicMarkdownElementParser
@Override
public void completeParse(Document doc) {
ServerMarkdownUtils.insertExtractedContentToMarkdown(extractor, doc, false);
} | 0 |
0fcfc4a348b4d7cfb023c1611ac32edd | 4f17fb639a657285198bfb1daa79909c | Test a valid use of the "Standby" command | void wh0802aStandby(void)
{
wh0802aPutCommand(EXTENDED_FUNCTION_SET | DATA_LENGTH_DL | EXTENDED_INSTRUCTION_RE);
wh0802aPutCommand(STANDBY);
} | 1 |
128dcf5f39c8a6e40affee9a6159b10f | 758974e2fad74325538e834de6d0b880 | ポストを修正する。 | public ServiceResult modifyPost(PostVO post); | 1 |
e7a2592f51b63953ce06f0f536bf447f | 8538e874482d3f2a3d70d782801f56f3 | Test that list of donor names can be retrieved | donors = Donors()
find = donors.search_donor("Smeagol")
assert "Smeagol" in find | 1 |
81dbb35b67fd5dc2786f037adbe01bf8 | dfa0d85d86b38ec1a0258a79dab80532 | Should be a string | class TestSuite(unittest.TestCase):
def test_remove_callbacks_error(self):
mock = 'ishouldntbeastring'
self.assertRaises(TypeError, rtmaii.Rtmaii.set_callbacks, mock) | 1 |
9e400dba6cfb886789b703d2c6ca530f | 4f172e942c13e4eee422d14d3d297925 | Plot omega_DLA from Crighton et al, 1506.02037 . | from math import *
from pylab import *
import pickle
L=40000.0
xmin=-75.0
xmax=75.0
ymin=-25.0
ymax=25.0
Lx_nd=xmax-xmin
Ly_nd=ymax-ymin
Lx_dim=Lx_nd*L/1000
Ly_dim=Ly_nd*L/1000
n=1501
m=501
lres=Lx_nd/n*L/1000
beta_nd=0.05
... | 0 |
09f0552498821e288bb37863cd91eded | 02a341e2afa70ab183e2f431be2aebb5 | The GrooveFile associated with the item | class FileItem(RecordItem):
def file_id(self):
return self._file.key | 0 |
450c898504bc71ace104019520c0617c | ae60b1357f7cefd29e6e1f1cab2248c5 | Hides pop up with information. | function hideInfoPopup()
{
$infoPopup.removeClass('show');
$popupCover.removeClass('show').removeClass('dim');
infoPopupShown = false;
} | 1 |
c0bef30d28598e81c7b2d1ac53760432 | 0c3ed439dcd5635be776edc3f254a86a | Computes second order mix moment. It will be used to compute axis of least inertia. | def _secondmoment(xdata, ydata):
center = _firstmoment(xdata, ydata)
return np.abs(np.sum((xdata-center)**2 * ydata)/np.sum(ydata)) | 1 |
e6678cbd52056300fed3c0bc739f237f | 9cecf386ebbd357bd1df593667c595b2 | 组装其他出库数据 | public class EasBuildParameter
public static String buildOtherInWare(OtherInWare otherInWare, List<OtherInWareItem> otherInWareItemList) {
EasOtherInWareOrder easOtherInWareOrder = new EasOtherInWareOrder();
List<EasOtherInWareOrderItem> easOtherInWareOrderItemList = new ArrayList<>();
String pr... | 0 |
a2ae0d36058a0782314ad9e7780d817d | 1c079fc56c09d283aab4704bcadb2b3e | Closes the about dialog | class LiloSetup:
def on_about_dialog_close(self, widget, data=None):
self.AboutDialog.hide()
return True | 1 |
bf4bb38266114c6c876462253f54e53c | e751923298b924bf179778e568295312 | Lists all Status models. | class StatusController extends Controller
public function index(Request $request)
{
$statuses = Status::search($request)
->paginate(config('app.pagination'));
return view('statuses.index', ['statuses' => $statuses]);
} | 1 |
fade3bcbd76b66d7036dba91f253ff0a | 8260a7556c0fbceb654e5b9b922fa8f3 | 지정된 연/월 의 마지막 날짜를 구한다. | public class DateUtil
public static int getLastDay(int year, int month) {
GregorianCalendar cal_l = new GregorianCalendar(year, (month - 1), 1);
return cal_l.getActualMaximum(GregorianCalendar.DAY_OF_MONTH);
} | 1 |
55749ba0685d0310ef74ac523bda8673 | 97fe4107a1fbf292572404fa37e7aa07 | Retourne les indices du tableau où il n'y a aucune piece --> Action possible | LinkedList<Integer> action = new LinkedList<Integer>();
for(int i=0; i<s.cols; i++)
if(s.m[0][i] == '_') action.addLast(i);
return action;
} | 1 |
75396c9cf53e11d4f5178b703161c9cf | 4b046e3c1904bf2796fa4d5437ca3aef | 老人计划执行记录详情 | function healthRecordDetails(data) {
return Request({
url: `${oldCadreUrl}personnelRecord/healthRecordSelectDetail`,
method: 'post',
data:data
})
} | 0 |
55ce8743016271642f9d299cb1d80a62 | 610331845479b659b4dc1efac23c1782 | u"""
返回节点集nodes的上确界 | fuzzy_set = self.fuzzy_set[self.membership_fn >= np.amax(self.membership_fn)]
membership_fn = self.membership_fn[self.membership_fn >= np.amax(self.membership_fn)]
return FuzzySet(fuzzy_set, membership_fn) | 0 |
3a4b88ae5dbfc7610325d7dc41083c16 | fabc3a5187224cc4c3f43d34e8f5aa09 | ● 指定ID不需要解锁? | @mutex.synchronize do
account_data = @account_data_hash[chk_uid]
return false if account_data.nil?
member_state = MemberStateCache.instance[MemberState::MEMBER_STATE_CLS_DEFINITIVE]
return account_data.member_state_id == member_state.id
end
end | 0 |
23f87a7a43de9847a6cdb4b248a611fe | 7e4717f30a7e238d427c315e23dc795f | Get the last combatant. | {
ADDTOCALLSTACK("CChar::Attacker_GetLast");
int64 iLastTime = INT64_MAX, iCurTime = 0;
CChar * retChar = nullptr;
for (const LastAttackers & refAttacker : m_lastAttackers)
{
iCurTime = refAttacker.elapsed;
if (iCurTime <= iLastTime)
{
iLastTime = iCurTime;
... | 1 |
318fb0ff44d54551526a03927ce798ec | 78ba73ed822243f2e25d6b11e294a551 | Gets if there is snow on the ground | for i in range(self.snow_segmentation.shape[0]):
for j in range(self.snow_segmentation.shape[1]):
proba = self.snow_segmentation[i][j]
index_max = np.argmax(proba)
if index_max == 1:
self.snowy = True
return True... | 1 |
0914ab31c96ba1d281ba0c7120bb7700 | 70be3daf545b4734f07d9ddad51b415a | Specific oracle sequence query. | class Query
public function sequence( $sequence = null )
{
$this->options['sequence'] = $sequence;
return $this;
} | 0 |
67b0427851794eea2f138dbac3263f7d | 4e727b2a6fb0c32d0e150d991f945902 | Update the session and add variables if necessary | class Koauth
async updateSession(ctx) {
let ctoken = this._private.getToken(ctx);
if (!ctoken) {
return null;
}
let token = null;
try {
token = JSON.parse(decipher(this._private.options.key32, this._private.options.key16, ctoken, this._private.options.form... | 1 |
8b5ac5f76f5c1454802cd4a527c45f30 | 01defece3eddaeb1cf4bf201d3796ed5 | Set the rate of change for ERP variations expressed in ERP change per unit
of time..
<p> | public void setRampRate(double rampRate); | 1 |
e393f55ff7998202da0183cb6976937e | 6ab7c9171a8f6cb29ce78b34d1c027ae | Metodo que inicia o sistema e carrega todos os dados salvos. | public class Dados
public ECOController limparSistema(File filePathSave, File filePathReset) {
filePathSave.delete();
return carregar(filePathReset);
} | 0 |
9b33aa2d3d20bde1c5bb55c5436ad26f | d66dca65ec4221d645c9bcf8d6521c30 | SS 06/04 Method to setup and render the paypal button on the cart page | add_action( 'wp_footer', array( &$this, 'wp_footer' ), 20 );
echo $this->generate_payu_form( $order );
} | 0 |
2bd36c68dcec29c03d3cfe85414fbf8a | 5bd3ab561d88626e002178f8f620e349 | Get the selected language directly from angular-translate module setting | export class DwLanguageService implements Resolve<any>
getDefaultLang(): string {
const language = this.translateService.getDefaultLang();
return language;
} | 1 |
97d891e8c691ff2517c7516e891dcb30 | 80ef653827fbc559f8f9518c4a90ccf2 | 指定Handle的组是否存在 | public function hasGroup(string $groupName): bool
{
if (!isset($this->groups[$groupName]))
{
$serverGroup = $this->getBean('ServerGroup', $this, $groupName);
return $serverGroup->getHandler()->hasGroup($groupName);
}
return true;
} | 1 |
f2774825acf97516d85793ace81de34f | 119ac3f383bc7c9953958a7111b6dc0a | wait for a new character to arrive to the UART2 serial port -don't use during interrupts | void __ISR(_UART2_RX_VECTOR, IPL_NAME(SER2_PRIO)) U2RXInterrupt(void)
{
SERIAL2_RX_IF = 0;
while(U2STAbits.URXDA) psp_serial_rec_next(HW_SERIAL2);
} | 0 |
1e7bb6873ea4330439d55b3a4a942a6d | 214cdf74776a79911f06aed96dd933b4 | Initialize storage for processed kinect data | super().__init__()
self.images_array = None
self.ids_arrays = None
self.object_points_arrays = None
self.image_points_arrays = None
self.reinit() | 1 |
b3c4cc9430810e4c0e97558696f5f99f | ef2d672129b246b2a4cf98e3f9025a4e | Clears the filtering based on chords (allows all chords) | function uiExFilterFunction:clearFilter()
self:setFiltersExact()
end | 1 |
045b184513755d493775db871d794ea7 | f5ea29a1ba31420372f36b0c1042324a | Enables or disables buttons based on whether the user has an android.keystore file. | Button selectImageButton = (Button) findViewById(R.id.manage_person_groups);
selectImageButton.setEnabled(isEnabled);
Button groupButton = (Button) findViewById(R.id.select_image);
groupButton.setEnabled(isEnabled);
Button identifyButton = (Button) findViewById(R.id.identify);
... | 0 |
cd615acebe15935d4fda4b781d3b41c0 | 4bca42a35b66074092d3dcf8302c4e7b | 指定されたバッファに、読み込むべきサイズが満たされるまで、ストリームからデータを読み取ります。 | {
if (baseStream == null)
{
throw new ObjectDisposedException(GetType().FullName);
}
if (position + count > length)
{
count += (int) (length - (position + count));
}
if (count <= 0)
{
... | 0 |
00e01770d1fc96996491375b60bd72b0 | 6aee8e7f195941934e671fcf79d67bd0 | 获取所有的贝宝支付配置 | List<BeChannelConf> findPayBeChannelConfs(); | 1 |
55022d9fd54ad0a2afdd68648005b7bf | 505340f9c9cb9d2feb56294edc8116e9 | Parse a stop node to get the stop ID | Stop stop;
JsonObject obj = elt.getAsJsonObject();
String name = obj.get("name").toString();
String id = obj.get("id").toString();
JsonArray code = obj.getAsJsonArray("operatorCodes");
JsonElement jsElt = code.get(0);
JsonObject jsObj = jsElt.getAsJsonObject();
... | 1 |
69c3b1122a20fa86ed6304993a1d1258 | c9067b599cd2d72d45bb8f304095845e | kickout rows in halo_cat_hydro that do not have matched dmo subhalo | good_idxs = np.logical_and(dbase['pt_qc'] == 0,
dbase['ps_qc'] == 0)
good_idxs = np.logical_and(good_idxs, dbase['dpm'] <= dp_crit)
return dbase[good_idxs] | 0 |
577b78288ad6b4b57e025fded27abb7b | 59b409999bd25bd8f427411d910a3be5 | 当改变日志接收时间,则重新加载日志列表 | namespace SCB.OrderSorting.Client
public partial class frmDayReport : Form
private void pagerMain_PageIndexChanged(object sender, EventArgs e)
{
LoadOrderSortingLogList(pagerMain.PageIndex);
} | 0 |
3017cf6a5a912cbc07e0a5d3b99db731 | 0b88903441e1d718ae5fa9c685a61c8b | Returns the current size of the incoming messages queue,
ie the number of unhandled received messages. | class AsyncWorkerHandler(PollerInterface):
def outq(sock):
return struct.unpack("I", fcntl.ioctl(self._sock.fileno(), SIOCOUTQ, '\0\0\0\0'))[0] | 0 |
27ca0d8edf43cd4aec89d6c26d050e69 | d97cd3ffff8a1e5369897db0ea92304d | Returns the value function output for the most recent forward pass | Eigen::VectorXd BaseGP::get_vf( void ) {
return vf;
} | 1 |
cc163441c7872e16d0b012d711d1ce8f | 54a85e2d2b952f8dd9aa434a8f8966e2 | 格式化成适合zabbix lld的json数据 | if(!jsonData || typeof jsonData != "object" )return jsonData;
var strData = [];
for(var i = 0; i < jsonData.length; i ++ ){
strData.push(jsonData[i].name + "," + jsonData[i].value + ((jsonData[i].lev == undefined) ? "@" : "," + jsonData[i].lev + "@"));
if(jsonData[i].list != undefined){
for ... | 0 |
503d6caab65712663af178b8292db146 | 7890465fa57a57c0b06a43cf1eeb2ae0 | Test that rack contains enough letters to make a longer word,
given a base word. | class TestWSGeneration(unittest.TestCase):
def test_generateWordSalad(self):
for n in [2, 3, 4, 5, 6]:
for _ in range(1000):
word_salad = generateWS.generateWordSalad(self.freqs[n],
n,
... | 0 |
df52b9639170abde655cdd945cdd7776 | 724a9a9502fc526dc3dbcfb4ec4c45fe | 返回一随机字母、数字字符串(a-z 、A-Z 、0-9). | class Str
public static function randomAlphabetAndDigit($length)
{
$charsSpace = self::DIGIT.self::ALPHABET;
return self::randomByCharsSpace($length, $charsSpace);
} | 1 |
1368d0c2c48fabec5d84f22d075d3ecb | fa745c7bd0efed5d50240ad4e638bec1 | 字符串形式获取金额,单位元,保留两位小数 | {
string result = "";
result += Decimal.Round(Decimal.Parse(strmoney), 2).ToString();
return result;
} | 1 |
adea64c7956c8a3896772e77e09213dd | fa2b33c644a06cd06f99430a5fdc4fed | graphs/targets split, trains NN on graphs | realdatas = ["syn","real"]
evols = ["static"]
probs = ["cont","dis"]
smodels = ["si","si","seir","sis"]
graphpref = "graphs"
graphfolderpref = ".."
rawfolderpref = ".."
rawpref = "raw"
outformat = "pickle"
eachcount = 100
parts = list(itertools.product(realdatas,evols,probs,s... | 0 |
2e6327ce2a6f2e0274d84ba697014343 | 1ecb6bdf5966233a498178e0ab3141a5 | Sets up the connection to the language service | export class SorbetLanguageClient implements Disposable, ErrorHandler
public onReady(): Promise<void> {
return this.languageClient.onReady();
} | 0 |
a1ba4c2e68199f1240b4344c8cd9bd58 | 1b11ee561550427b975ca82ee6403a38 | 更改商品毛重单位 | public class ProductItemInfo implements Serializable
public void setWeightUnit(String weightUnit) {
this.weightUnit = weightUnit;
} | 1 |
7650239493368ad7935854b42f772097 | e84ec4dbc0949e37a37b0d71211679c3 | Obtem uma refeição através do seu identificador. | public abstract IDBRecord getMealById(String mealId) throws Throwable; | 1 |
3f11e4438aaef34340cc6957e2634acc | d77cdd47c0f98f723d325fd27cbaded2 | @brief Read the configuration register from the TPS6572. | static ReturnStatus se98a_get_config_reg(const SE98A_Dev *dev,
uint16_t *configValue)
{
return se98a_reg_read(dev, SE98A_REG_CFG, configValue);
} | 0 |
3239fefd4166a2144d188b42c65ac83f | 4640b1764d73ca306c12e943ff00ab0e | Creates the different coloured surfaces for LEDs and the
theresholds used later to use one or another (surface) | blackMaterial = cmds.shadingNode('blinn', asShader = True, n = "blackMaterial")
cmds.setAttr(blackMaterial+".color", 27/255.0, 42/255.0, 52/255.0, type = 'double3')
blackSet = cmds.sets(blackMaterial, empty = True, r = True, noSurfaceShader = True)
cmds.connectAttr(blackMaterial+".color", blackSet+".sur... | 1 |
1c497dafa0f07c7cdb02c34551c4f884 | fd8eec270fe4819c2861a730bb5f25b0 | Sets <code>value</code> as attribute value for ATTRIBUTE10 using the alias name Attribute10. | public class eduEOImpl extends OAEntityImpl
public void setAttribute12(String value) {
setAttributeInternal(ATTRIBUTE12, value);
} | 0 |
1d239855b44081d48e5de9e693fc4032 | f9b23d456008840d0412c885ef4f84e1 | Default balance should be 0. | response = self.client.get(BalanceViewTests.url)
self.assertEqual(response.status_code, status.HTTP_200_OK)
data = response.json()
self.assertEqual(data['count'], 1)
self.assertEqual(data['results'][0]['amount'], 5000) | 0 |
2b0f643a17ff7633ec45043d8e814724 | 9de239e8696312c0c1a7eb6f49a1156a | 查询角色列表 无参 | List searchRoleList(); | 1 |
925d4ca500a803ee712d3895b2524109 | 9d80a7ce0d1e8075ad18de6c767a2ac9 | 更新表扬标签 | namespace WebApiIService
bool Update(UpdateLabelDto dto); | 1 |
78f37a1e230f224bfa5321306d20a330 | 82070fba4cc4d5b2d5c4ef11f247339b | set boolean indicating whether the field is a file field | void setFile( boolean isFile ); | 1 |
9a6518485900fe992d2c5f271c249387 | ada8022f6c625f1ca470a91d87eca009 | Handles the Click event of the GrantDiscountButton control. | namespace Projekt_BD.Controller
public class GrantDiscountController : ControllerBase
private void Form_Load(object sender, EventArgs e)
{
this.RefreshDiscounts();
} | 0 |
48e9d9d738b14aadc636e7bd1727e025 | c0a6b25d7deb73ae6d2fb7d3cd387e7b | Returns an object of edited post attributes for the site ID post ID pairing. | class ForumPost extends Page
private function fetchPostToEdit( $post_id )
{} | 0 |
f7d9e3db4df1fa36c4984ce9db5a5a11 | 3bd40c6dff35d3817b8b0af32ba28bc5 | @brief ArrayEnumerator for all row selection. | __stdcall ERERowX::ERERowX( const DAXResultSetX * pxResultSet, RowIndex_t nIndex )
: m_xDAXRowX(pxResultSet,nIndex),m_pxResultSet(pxResultSet)
{
} | 0 |
9f3983bf03478ea2377d57e81af50ed1 | fb2aecd4b57253369386294e8ac50b5d | Updates the tact 'pace', units per day | namespace OregonTrail
public sealed class Travel : Window<TravelCommands, TravelInfo>
private void ChangePace()
{
SetForm(typeof (ChangePace));
} | 0 |
fe2af318161023bf2a526f3ca478ec5a | 6b916562616d8d9117bd25d8179fe4a1 | arrête les piezo d'émettre du son | def stop():
pwmMotA.ChangeDutyCycle(0)
pwmMotB.ChangeDutyCycle(0) | 0 |
e585cf29b2a6131a20e0df0db86f3522 | cf47548e59f1c3421a1605e0bb2b8073 | 需要恢复网络请求时调用 | abstract class BaseAppCompatActivity : AppCompatActivity()
open fun doReConnected() {
startRequest()
} | 1 |
5eed366e1a4bf63574e10ebb2c494318 | 15cdcf84ae409ebe87b5893c644e67b9 | Initializes KeyTransformDatastore with keytransform function. | return function (target, key) {
var metadata = new TransformMetadata_1.TransformMetadata(target.constructor, key, transformFn, options);
storage.defaultMetadataStorage.addTransformMetadata(metadata);
};
} | 0 |
0ff488cf088bdd6f2458c5fc4e973293 | ab66a0830da7cd2ac2bf212adfcd2210 | Determines whether at least one of the children of the given node are selected. | const descendants = this.treeControl.getDescendants(node);
const result = descendants.some(child => this.checklistSelection.isSelected(child));
return result && !this.descendantsAllSelected(node);
} | 1 |
2510e414d06fb62c1adb9d2dc59304cf | f40384dacbfba38f9cb9ab473591caec | Returns the quality-of-protection, used by DIGEST-MD5 and GSSAPI. | namespace lattice
QualityOfProtection DigestChallenge::qop() const
{
auto it = find("qop");
if (it != end()) {
return QualityOfProtection(it->second);
}
return QualityOfProtection{};
} | 1 |
1ec551505db390b6adcfdccfb62a6139 | 19a5f7f020240d5771db29b112361e41 | Clear Time3 interrupt flag | void T32_INT2_IRQHandler (void)
{
TIMER32_2->INTCLR = 1;
flag++;
} | 1 |
bfa74b426f7b2941e4d7eda6a2faff10 | f5708bf01f4edc103537958f1abf8c6a | Efetua a configuração do swift para envio de emails | {
$this->transport = Swift_SmtpTransport::newInstance()
->setHost(self::SMTP_HOST)
->setPort(self::SMTP_PORT)
->setUsername(self::SMTP_USER)
->setPassword(self::SMTP_PASS)
->setEncryption('ssl')
;
$this->mailer = Swift_Mailer::newInstance($this->transport);
} | 1 |
973e01c3aabd1e3c382fbf0d632ef295 | e84f8fa2d0e792ebadda4e7395fc1350 | 计算点到直线的垂足。 | export class LineUtil
public static getFootPoint(p: IPoint, p1: IPoint, p2: IPoint): IPoint {
const cross: number = (p2.x - p1.x) * (p.x - p1.x) + (p2.y - p1.y) * (p.y - p1.y);
const d2: number = (p2.x - p1.x) * (p2.x - p1.x) + (p2.y - p1.y) * (p2.y - p1.y);
const r: number = cross / d2;
return ... | 1 |
6b3acd37b201032af0ee89959e971a8c | 435583350ea8bdf742c9f5e8cfae5585 | 检查Service是否正在进行 | boolean isRunning = false;
ActivityManager activityManager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
List<ActivityManager.RunningServiceInfo> serviceList = activityManager.getRunningServices(30);
if (!(serviceList.size()>0)) return false;
for (int i... | 1 |
6d6d8dcf07f49f0c34d45b02a71d0176 | b5fa4aa67b9ecd19f11879b5bc4e877b | Calculate the diameter of the graph
Adapted from NetworkX
The diameter of a graph is the greatest distance between any pair of vertices | class GraphUtils:
def graph_diameter(G):
return nx.floyd_warshall_numpy(G).max() | 1 |
323b5db177b15bf6ea1f5ec05f3399c9 | c44c083135178617edbd0daf9def4846 | Scale frequencies | def freqformat(freq):
if type(freq) is list:
freq=np.array(freq)
elif type(freq) in [int, float, np.float64]:
pass
if type(freq) is np.ndarray:
freq[freq==0]=1e-9
return freq | 0 |
ae535529e5cca50aef87c9260ca7316c | a5dfdc0742a60e4bcef466ed5cbbefe2 | Calculates the hull speed in knots | public class hullHydrodynamics : MonoBehaviour
void Update () {
Velocity = hullRB.velocity;
Velocity.y = 00.0f;
headingAngle = hullRB.transform.eulerAngles.y;
Heading = new Vector3(Mathf.Cos((headingAngle)*2*Mathf.PI/360), 0.0f, -Mathf.Sin((headingAngle) * 2 * Mathf.PI / 360));
H... | 0 |
d57f2e27f1589a3c9d74e22571925e9f | aaefeee08416043f491b03803e332bb6 | If a rook has moved, it needs to update the rook accordingly. | if (src.getChessmen() instanceof Rook) {
if (!replay) {
((Rook) src.getChessmen()).setMoved(true);
}
}
else if (src.getChessmen() instanceof King) {
if (!replay) {
((King) src.getChessmen()).setMoved(true);
}
if (src.getY() == 4) {
if (src.getY() - dst.getY() < -1) {
board[src.getX... | 1 |
d96c3bdd0b0ba04fe7ff8183e58ba3a5 | 83397d9b9ef25d71942ffb25a0a0b388 | Funcion encargada de devolver los datos de un Itinerary dado su guId | class Activities extends React.Component{
async componentDidMount(){
var idToSearch = this.props.idItinerary
const res = await this.props.getActivities(idToSearch)
this.setState({
activities: res
})
} | 0 |
dceb87d1405c0037764b1b366afdf159 | 2e5583261c0cbf8fb6e005db37613a4c | Free all resources associated with the debug module and the object itself. | namespace DebugStrings
public sealed class DebugMonitor : IDisposable
public void Dispose()
{
IDisposable d = this.buffer;
if (d != null)
{
this.buffer = null;
d.Dispose();
}
this.data = null;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.