query_id
string
corpus_id
string
query
string
code
string
label
int64
92d20406dec919fc074ee78240f30f26
cd854888b01fea02bd48419c64194a53
Unloads the content, called when a new screen has been added
namespace Octopussy.Game.Screens internal class NewGameMenuScreen : MenuScreen public override void UnloadContent() { base.UnloadContent(); _content.Unload(); }
1
03e81f51239bfae484eae067f8466f06
d7d525a5d34ac5c3761b6c2be0b9a3bd
将n随机分为l份(发随机红包)
def rand(n): import random s = {i for i in xrange(n)} ret = [] for i in xrange(n): s.remove(i) gift_from = random.choice(list(s)) ret.append(gift_from) s.add(i) return ret
0
cf46a4ac476134a1b979a182ccec7fcb
cf364616b50103202a98795098b7209e
如果遇到了一个正在调查的点,说明已经遇到一个环
status[u] = 1; for (const auto &a: graph[u]) { if (status[a] == 0) { if (dfs(a)) return true; } else if (status[a] == 1){ return true; } } status[u] = 2; res.push(u); return false; }
1
c05d68ab3b2163da355619043993dee5
ee1c99122672ee7cead71a0adcfa555e
This function computes the weights of the Equal-Weighted strategy.
class DualEmaTalib(zp.TradingAlgorithm): def create_weights(context, stocks): if len(stocks) == 0: return 0 else: weight = 1.0/len(stocks) return weight
1
f49f0d2d0361596181dbdc89641ba257
bd1f91a4df0e71e300e1610668964835
@brief Retorna uma configuração do filtro, caso exista
{ if (cs) { Config *list = cs->config; for (int i = 0; i < cs->total; i++) { if (strcmp((list[i])->filter, filter) == 0) return (list[i]); } } return NULL; }
1
7508bdb8e8ea7a256b334ef9fbbfd142
c15c3de7e293918670a76d29d529ea85
handles setting the texture matrix for the shadow texture.
[ExecuteInEditMode] public class Shadow : MonoBehaviour void Start() { GetComponent<Projector>().enabled = true; m_RT = new RenderTexture(512, 512, 0, RenderTextureFormat.ARGB32); m_RT.anisoLevel = 8; m_ShadowCamera.targetTexture = m_RT; m_Mat.SetTexture("_MainTex", m_RT); }
0
24963d731a917095e1b41c6a6e7dd729
fc559c3b0e329b29e8aa8598a7c5f5cf
根据客户类型查询证件类型
@Service("computeMoneyService") public class ComputeMoneyServiceImpl implements ComputeMoneyService @Override public List<CusType> getCustype(Customer customer) { return computeMoneyDao.selectCusType(customer); }
0
733e717afba9f569a66dab4eaf85d566
1828fc32c1313bde8ada84cc0e6de58e
This function returns an array of all the filenames in the specified path. Note that the last element in the returned array maybe a 'Thumbs.db' file
class Filesystem public static function getFileNamesFromPath($Path) { $Files = array(); $handle = opendir(FRONTEND_PATH.$Path); if ($handle) { while (false !== ($file = readdir($handle))) { if (substr($file,0,1) != ".") { $Files[] = $file; } } closedir($handle); } return $Files; }
1
634d2471e19bad508bcdae886e9c925f
d8493229549127a793087431f6eab4c4
获得像素点的结构数组。 因为橡皮擦是圆形,为了使得擦出的是圆形,就要知道在这个圆里每一行要擦掉多少个像素。 这个函数利用勾股定理,获得1/4圆部分每行要擦拭多少像素
{ int size = radius - 2; return size; }
0
b02a2f7004bd5334b256a2d9288b68c5
a51ce581c47f7a30b31df47c62d89285
Test mutation by altering metadata
class TestSaveSong(unittest.TestCase): def test_with_filename_and_changed_metadata(self, filename): song = Song(testfile) song['artist'] = 'MaSu' song.save(filename=filename) copy = Song(filename) self.assertEqual(copy['artist'], 'MaSu')
1
eb94eb06927ba42ec1bc572e11233ad8
dfe9522e8ad8bad2cc79f3140d68ea51
caseOption에 해당하는 쿼리결과를 반환
public class MultichoicesystemSwitch<T> public T caseAnswer(Answer object) { return null; }
0
9792e9dbfd376922484fb79dc9d79dec
414182ca9fa4e608ea40d561d23c2926
Terminate if agent within threshold of goal. Set threshold to be negative to disable early termination, making environment fixed horizon.
class RobotEnvPath(gym.Env): def _is_goal_reached(self): return self._get_goal_dist() < self.dist_threshold
1
98e4c3b6e190a3b8879e5014b4d4a27c
5c8dd957d20d115d814ccc976b06c850
Gets the similar units to specified one.
export class Paginator public getSimilar(identifier:string):ng.IPromise<any[]> { this.reset(); this.similarTo = identifier; return this.getResponse(this.count); }
1
44a718d4b8424b014cf93f3644b10080
dc5409c28973c7aebba258d5543e293c
Sets alphas of the map-objects referenced to the given location.
export class EngineView extends Container public changeObjAlphasInLocation(value: number, pos: TColumnRowPair): void { const a = this._objArray[pos.r][pos.c]; if (a) { const l = a.length; for (let i = 0; i < l; i++) { if (!a[i].isFloorObject && !a[i].noTransparenc...
1
5eede2c60c097a6292a8b3c83b6fd4ea
f6702a58d6e052ff7d22c0e5df00dc9b
获取token后进行25秒倒计,必须在倒计时结束前进行下一步,否则token失效
function setCountdownAfterGetToken() { var startDate = Date.now(); $('.userCountdownSec').text(MAXseconds); $('.user-password-countdown').show(); countdownInterval = setInterval(function() { var diff = Date.now() - startDate; var seconds = ...
1
484162c966ff85a815f06706351cf0cf
ac143ad4ea6a1fcba725e1228ad613d0
次のテキストを書き込むとファイルが規定サイズをオーバーするかどうかチェックする。
public class Example20OpenFile7Sparse @Test public void case2() { final Path path = new File(FileUtil.getBuildPath("noBig.txt")).toPath(); try (FileChannel channel = FileChannel.open(path, SPARSE, CREATE_NEW, WRITE)) { int fileSize = Integer.MAX_VALUE; fileSize = fileSize + fileSize + fileSize; ...
0
12641c403ea40f0c1bfcbe20a5b779c1
946ede6429d1e5a3c90c265540523b1b
Sets allowDiskUse MongoDB flag. This is supported since MongoDB Server 4.3.1. Using this header with older MongoDB Server version can cause query to fail. The option is a: {@code Boolean} type.
class az_disk_create_command_builder extends CommandBuilder<az_disk_create_command_result> forUpload(value: boolean): az_disk_create_command_builder { this.setFlag("--for-upload", value.toString()); return this; }
0
bed2a715001709b657a5265798cf8603
8a1f88b962a2f9e89bf1fafc0d5b0f84
Gets the submission id for upload hashes if any zero otherwise
boolean hasUploadId();
0
7a8cd092ba48d242f6d9a38b8804325e
a0dbc5eb9606950a47c7c6d3e4a09d4f
注册js方法给安卓原生
function registerAndroidBridge (fnName, callback) { setWebViewJsBridge(bridge => { bridge.registerHandler(fnName, (data, responseCallback) => { callback(data, responseCallback) }) }) }
1
3f754f18e07fa96fd6309feec405a88e
03bf23f687a34d3dbc70f5476335ed30
Makes sure that only one button is toggled at any given time.
public class AxisButtonPanel extends JPanel private void selectOnly(JToggleButton btn) { for (int t=0; t<buttonsArray.length; t++) { if (buttonsArray[t]==btn) { if (!buttonsArray[t].isSelected()) { buttonsArray[t].setSelected(true); } } else { if (buttonsArray[t].isSelected()) { buttonsArr...
1
2e51fd208fde793156fadfbad660f67a
4817839ca39e3b2ea17d9cb8151df69c
Test attribute "inbox_impl_typeprovider_defaulturl_failureitem"
class ComAdobeCqInboxImplTypeproviderItemTypeProviderPropertiesTest extends \PHPUnit_Framework_TestCase public function testComAdobeCqInboxImplTypeproviderItemTypeProviderProperties() { }
0
0938852b97b993b4b941f6156eb105cb
f2c398873f337ee2d07f910fd18e0293
Function to fetching tasks from database
function getTasks(){ try { $q = "SELECT * FROM tasks"; $sql = SQL::getInstance()->Select($q); } catch (PDOException $e) { die("Error: " . $e->getMessage()); } return $sql; }
1
d6482f556043d50bb24483063cb7c233
118b6eb7f9c806fc3457510bd7d765d0
See if checkout is loaded in one go via the OneStepCheckout extension.
class Monetivo_Payment_Model_Config public function getIsOneStepCheckoutEnabled() { return $this->getStoreConfig( 'payment/monetivo_payment/onestepcheckoutenabled' ); }
1
69e573438ed2a725188668f769bcc2db
68b9e66b1e782173a981a32e1eea3598
如果是1号--9号则变成01--09
@SuppressLint("NewApi") public class Kt_Frag_Center_1 extends Fragment implements OnClickListener private String toDoubleDate(int d) { if (d < 10) return String.valueOf("0" + d); else return String.valueOf(d); }
1
6eb97016dd6782f4e76b86ec103c61e9
6da99adb314761ff9e60c822de41e3a8
If on the 'Members' page for a group will automatically get the next set of paginated group members
GroupPage result = null; StringBuilder url = new StringBuilder(128); url.append(groupUrl).append("/memberslistxml/?xml=1"); if (pageNumber > 1) { url.append("&p=").append(pageNumber); } byte[] response = http.getBytes(url.toString()); if (response != n...
1
79baed3d30f9fa96ec4aef56d7e5d92c
7d32c06ed6348e53355d85a5b846d71e
把non OBD故障码转换为PBCU标准码 如从 000C00 转换为 P000C
public class DataCode public String CtgToNumber(String path) throws IOException { String output = path.substring(0, path.indexOf(".")) + "_number.txt"; File fout = new File(output); if (fout.exists()) { fout.delete(); } BufferedWriter bw = new BufferedWriter(new FileWriter(fout)); BufferedReader br = new...
0
951e6af8614f1a4249984c0812022391
1836b29e7839b91f493b71d2102f379d
ハッシュ化文字列がDB内のハッシュ化文字列と一致しているかを判定、DBにハッシュ化文字列がなければ格納する関数
static int checkValue(const char *zKey, const char *zHash) { unsigned int h; HashEntry *p; unsigned int i; h = 0; for (i = 0; zKey[i] && i < sizeof(p->zKey); i++) { h = h << 3 ^ h ^ zKey[i]; } h = h % NHASH; for (p = aHash[h]; p; p = p->pNext) { if (strcmp(p->zKey, zKey) == 0) { return strcmp(p->zHash, z...
1
2019eb1dd6e210a3dd6178b94b9d34ac
493efa6bd49b796de5e54bbcc6b28a8d
购物车删除一项
{ $cart = new \Think\Cart(); $cart_id = I('post.cart_id'); $res = $cart->delOne($cart_id); if ($res) { $result_price = $cart->getPrice(); echo($result_price); } else { echo 0; } }
1
2764cd18301422db6d496c34164ce021
727d07f519225fda05bf4991c5cf848e
Merges costgroups from multiple invoices
data = Data() data.invoiceId = dataList[0] data.payerAccountId = dataList[1] data.billingPeriodStartDate = dataList[2] data.billingPeriodEndDate = dataList[3] data.usageAccountId = dataList[4] data.usageStartDate = dataList[5] data.usageEndDate = dataList[6] data.productCode = dataLi...
0
e2ee35d9adf462c0e07d349799e043d3
e07e6349ca15cabab0d7f62b47e07f98
Sets whether the collection should be updated right now
namespace Domas.Web.Mvc.UI.Fluent public class SchedulerEditableSettingsBuilder public SchedulerEditableSettingsBuilder Update(bool update) { container.Update = update; return this; }
1
eec3668422a8e02440296da482670173
1893a9bf69b84857ae100415ae885290
Test Go stacktrace parsing (with braces in the frame string).
stack = ('[<ffffff90082bf4bc>] SyS_fchownat+0xdc/0x168 http://go/pakernel/' 'msm-google/+/40e9b2ff3a280a8775cfcd5841e530ce78f94355/fs/open.c' '#622;msm-google/fs/open.c;') expected_stack = ('[&lt;ffffff90082bf4bc&gt;] SyS_fchownat+0xdc/0x168 ' '<a href="http://go/...
1
f23bd0b4519f2ab430822c04ee397550
46301259e258f60db59a56f0cf9a5c1e
设置病房护士数
@Table(name = "QX_TP_SICKBED") public class QxTpSickbed public void setBedNeam(String bedNeam) { this.bedNeam = bedNeam == null ? null : bedNeam.trim(); }
0
c15b1b2196a24a69efb54c558e2e962f
5bd0734492154fa9147d8f8cf098597f
Calculate the D_{ij} = |T_{ij} - S_{ij}|, i.e., element-wise distance between the template / signal (self) and the other signal (other). CAUTION: other must have been aligned to self
class Pattern(object): def hamming_distance(self, other): return numpy.power(self.vector - other.vector, 2).sum()
0
c556cc061abd4c6d713121cc17d89d05
995bc013be001c3304ea7128d78ca864
тест загрузки файлов на сервер
driver = self.driver driver.get(self.base_url + "/") driver.execute_script('document.getElementById("upload").style=""') driver.find_element_by_id("upload").clear() driver.find_element_by_id("upload").send_keys( os.path.join(os.path.join(os.path.abspath(os.path.dirnam...
1
9c8cf72332a18d02dfb7c5a1b4bc6590
9c8a483afd1706f3aa2133205d8ee41f
Change palette entry to the corresponding 'used' value.
class WidgetProxyZero(QDialog): def _change_palette(self): if self.useStylePaletteCheckBox.isChecked(): QApplication.setPalette(QApplication.style().standardPalette()) else: QApplication.setPalette(self.originalPalette)
1
926c4ade324a50e4d50f16613292d8d5
961faedcd1b3c105e2e3d900c4c3a4f0
Passa alla visualizzazione per settimane della programmazione negozio
namespace WhereEver public partial class Calender : System.Web.UI.Page protected void Button5_Click(object sender, EventArgs e) { Panel1.Visible = true; Panel2.Visible = false; Panel3.Visible = false; Panel4.Visible = false; Panel5.Visible = false;...
0
3bfa68e9f1a53af471734e6f0ac3caf8
b8430eae601f4a36975f9ad09ed458a7
Извикване на последователни HTTP заявки за успешен запис на продукт
List<Future> postRequests = new ArrayList<>(); for ( int i = 0; i < REQUEST_NUMBER; i++ ) { final Product product = new Product( i + 1 ); final Future<HttpResponse<Buffer>> send = webClient .post( ProductVerticle.HTTP_PORT, "localhost", "/products" ) .sendJsonObject( JsonObject.mapFrom( product ) ) ...
1
bcd121f3b4254e4d21a36801fd7779fb
db0300b8ec473ad7ffecaa3c745f8bdd
Set the given page id as the homepage, replacing the current
HRESULT CHPPUtility::SetHomePage(LPCSTR szNewHomePage, BOOL bCurrentUser) { _bstr_t cbszNewHomePage = szNewHomePage; return SetHomePage((BSTR)cbszNewHomePage, bCurrentUser); }
1
79cdfeee7526969da9f4e09271d10e1c
ab1ddc0a637fe50ecac3ba88df3a6fe4
u""" * 功能 * 反复在一行内输出内容 * 输出前会先将光标移至行首,输出完毕后不换行 * 输入 * 待输出字符 * 返回 * 无 * 若输出失败则将失败的文本输出至『未成功打开的页面.txt』内
x = 0 for item in string: print(item, end='') x += 1 if x % clo == 0: print('\n', end='')
0
0c9df122dfdc14d32c967aa6f31a63bd
3b8b4f3d32ab964d849afffc1bed90e3
возвращает зеркальное отображение дерева
void Btree:: make_Mirror(){ make_Mirror(root); }
0
7581e3b2e38986a7a531e7c7a7ec80ae
8ef1969c967fb278946fdad75eef869a
递归找到节点并打开
const cell = this.field.cellAt(point); if (cell === undefined) { return; } if (cell.isFlag) { return; } if (cell.isOpen) { let arroundFlagCount = this.field.pointsArround(point, c => c.isFlag).length; if (cell.count === arroundFlagCount) { this.openRecursive(point...
1
f958f57c53853efbb25f715f6b73aaa3
3bfeca67f5e2e3dd61deac1c62715ee0
Get the Creative Height of the Banner Video
class Banner extends \Back\PageBundle\Entity\Banner implements \Doctrine\ORM\Proxy\Proxy public function getHeight() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getHeight', array()); return parent::getHeight(); }
0
51628f6419cdc8039bc1f6e465093c94
a1d0fdbae3d9ec453086068590a2ba9b
得到天数的星期数,不足的按1 算
public class DateHelper public static int getWeekDay(int day, int offset) { int result = day + offset; if(result > 7) { result -= 7; } return result; }
0
b9ac6cc540b3604af29b25e2165f602d
97d7ad251b8ab62126ba3db38d00513a
@ingroup CovEbDProtocol.Common @fn public Boolean GetDeviceTime(out String Devicetime) @remarks For Device Time @param Devicetime [@ref OUT] contain device date time value @retval returnvalue [@ref OUT] true if request success else false.
namespace CovEbDProtocol namespace EbDDeviceManager Boolean GetDeviceTime(out String Devicetime);
1
b123b8bb2dc9d38a47ec5368610e3952
f16a8a1adde37dbcf4c5fc626e1de7c3
Get Specific Project Specification or Standard by padding project ID & Spec Type
return { grandSpecId:$('#grandSpecIdQry').val(), parentSpecId:$('#parentSpecIdQry').val(), entitySpecId:$('#entitySpecIdQry').val(), physicalId:$('#entityIdQry').val(), name:$('#standardNameQry').val(), code:$('#standardCodeQry').val(), ...
0
b74445ad28055bdd92e87c3ea6ff6da6
5f066225588b7a0c6d19fdd02c7c69ca
Вернет массив ид всех продуктов
function productAll() { $sqlQuery = "SELECT * FROM products WHERE 1 ORDER BY id ASC"; $result = mysql_query($sqlQuery); $records = array(); if ($result) { while ($records [] = mysql_fetch_assoc($result)) ; array_pop($records); } return $records; }
0
1c44588c2faf913285c6df1658ebbecd
abdf058076a3c0c8dd6741e65f083398
Get the relay being used to trigger the opener motor.
int getRelayState() { return relaystate; }
0
b3d4b5e9f0b9b387e75fbb63d57c1504
c0deab642e5408e54c515e6e8407cb01
Yield modified versions of all strings with brackets.
namespace srcgen class SourcesWriter private string BracketsProc( string val ) { return val.Replace( "{{}", "{" ).Replace( "{}}", "}" ); }
1
538eeecaae28281c5155fc5337d32c9e
988b006703d50b5f8c78ddcb136fed6d
If there's only one allowed value for a slot, set the value to the lone allowed
{ foreach (Slot s in slotGroup) { if (s.AllowedValues.Count == 1 && s.Value == "") { s.Value = s.AllowedValues[0]; } } }
1
4337b6476a904a9cd55adbd9cf19bebc
effd29470a4a0758b35a7a74341ac5be
returns the id of the matrix
{ int res = NO_DATA; if (this.SelectedMatrixId >= MATRIX_ID_MIN) { res = _matrixIdList.FindIndex(id => this.SelectedMatrixId == id); } return res; }
0
90a9bb05aa6ee40863083c187b608e80
fa111ab4940c7a4dd32dc51ebf052e4c
跳转到VIP预订界面
export default class placeOrder extends Component goToVip(navigate){ const { params } = this.props.navigation.state; navigate('toBeVip',{key:'vip',goBackView:'placeOrder',city:params.city,area:params.area,buyCarList:params.buyCarList,returnCash:params.returnCash,totalPrice:params.totalPrice}) }
1
b129ba48e3979483aca83d8647273d0a
f64b0b916a7e95cf5e5aa3582e61975d
The waveInStart function starts input on the given waveform-audio input device.
WAVEFORMATEX wfe; MMRESULT ret; ioent_t *io; int i; wfe.wFormatTag = WAVE_FORMAT_PCM; wfe.nChannels = 1; wfe.nSamplesPerSec = srate; wfe.nAvgBytesPerSec = srate; wfe.wBitsPerSample = 16; wfe.nBlockAlign = wfe.nChannels * wfe.wBitsPerSample / 8; io = ioent_cre...
1
b0877670943354b3428a159f269b9c4f
79adfc21c50a0f7badb0b42e6531ab45
双向链表类 继承自单链表类
function Node(data){ this.data = data this.prev = null this.next = null } this.head = null this.tail ==null this.length = 0 DoubleLinklist.prototype.append = data => { let newNode = new Node(data) if (this.length == 0) { this.tail = newNode this.head = newNode }else { ...
0
6c13ba667eeb8508ef7aaa03695543cf
e6a133c7e172680665019074a00ae769
Test if unauthenticated will be redirected to login page
class AdminPanelTest extends AdminPanelAbstractTest public function testUnauthorised() { $response = $this->get(static::ADMIN_PANEL_URL); $response->assertStatus(302) ->assertRedirect(static::LOGIN_PAGE_URL); }
1
31e44f90f39fed50d46f26c298dd640b
c8c0280b7ad2da5c761dd1e44e10576a
outputs the body of the compounding interest tables
int counter = 1; cout << "N\t\t"<<"10*N\t"<<"100*N\t"<<"1000*N\n"<<endl; while (counter <= 5){ cout << counter<<"\t\t"<<10*counter<<"\t\t"<<100*counter<<"\t\t"<<1000*counter<<"\n"; ++counter; } cout<<endl; }
0
e0cac39779378960b7c45c5aa195c72b
0ede6b92eef801e1afa0cf40d5fd1ba5
An nxm maze has n*m cells but this data structure holds the (m+1)*n+(n+1)*m walls. Each could be on or off. The walls are indexed by their row and collumn and are separated into vertical and horizontal
class Maze: def __init__(self, max_rows, max_columns): self.walls = [[0 for j in range(max_columns)] for i in range(max_rows)] self.add_vert_wall(0, max_rows-1, 0) self.add_vert_wall(0, max_rows-1, max_rows-1) self.add_horiz_wall(0, max_columns-1, 0) self.add_horiz_wall(0, max_co...
1
a3e2586b2c50a480d56585fe6e8e35c2
5ca34b927cb5aab2f5725b870df6c20c
开店回调
class OpenshopAction extends CommonAction{ public function open_success() { $st_id = I('get.st_id', 0, 'intval'); $sc_id = I('get.sc_id', 0, 'intval'); if ($st_id && $sc_id) { $this->assign('st_id', $st_id); $this->assign('sc_id', $sc_id); $this->display('open_success...
1
76148f19c91ee8dc2e47f4691b0f4740
b14b73fac492d738ca97cdd2dcd535c2
get filters of questionnaires
class AnswersAdmin extends Admin protected function configureDatagridFilters(DatagridMapper $datagridMapper) { $datagridMapper ->add('description') ->add('question.description'); }
0
11e36f9393c2ef5e0ddb44e0589836f4
8a3de07467ac183155287802ef885703
异步保存整个工作单元的数据操作
namespace Abp.Domain.Uow Task SaveChangesAsync();
1
3c803c6f19fd90760cd4b8bb86abd3e4
1ed3a9f91b8fb7746077c54ef3763016
SelectBox со списком типов цен
class PriceType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('iso')->add('value'); }
0
95d5886a2207956efadd01a9556460c3
9fdd152cca932f0cfc767244871fd6a3
Recupera todos los comentarios del Usuario en la BD.
List<CommentDTO> getAllCommentsFromUser(Long userID);
1
c4a43bdf83b28e57f23a6db51468e8eb
cbd0d7d21fd4ace394d20b655953c7c8
Рисует бомбу, возвращает поверхность с ней
def display_bombing(screen): for sprite in VERTEX_BOMB: if sprite.rect.colliderect(screen.get_rect()): sprite.rect = sprite.image.get_rect(center=sprite.position) w, h = sprite.image_copy.get_size() new_w = round(w - sprite.index) new_h = round(h - sprite.inde...
0
46dbe2bc0f7548315772e23be16fdc82
bcbda403fb19d4d936f3bd462a936a44
指定されたサブシステムからのコネクションを待ちます。文字列を受信した後、命令を識別して処理を行います。
public class ControlConnection extends AbstractService @Override protected void serviceRun() { InputStreamReader inputStreamReader = null; BufferedReader bufferedReader = null; try { inputStreamReader = new InputStreamReader(clientInputStream); bufferedReader = new BufferedReader(inputStreamReader); Str...
1
e2ef9889803e38185629931ccde768a9
ad27d1fb8a104693159dc0bb8031243b
parses the file with the relationships extracted by the system each relationship is transformed into a ExtracteFact class
in_file = open(in_file_name, 'r') out_file = open(out_file_name, 'a') corpus_file = open(corpus_file_name, 'a') line_index = 1 sentence_number = 0 text_line = in_file.readline() while text_line: if line_index < begin_line: text_line = in_file.readline() line_i...
0
ffd7a9c4971776c5e853257725d6963a
671f326c570e5c2c56798a76e37c4629
Enables or disables node frames.
impl<'a> TreeNode<'a> pub fn framed(mut self, value: bool) -> Self { self.flags.set(TreeNodeFlags::FRAMED, value); self }
1
dfda8805e5a544845a57f2ed1009a951
773890045afe1f56452a44666534ba9e
获取本地配置文件中是否启动网关缓存
@Order(value = Integer.MIN_VALUE) public class ConfigurationApplicationContextInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> public Properties loadPropertiesByLocalCache(){ Properties properties = new Properties(); ClientHelper clientHelper = ClientHelper.getInstanc...
0
780c83ed4e711b1a28df4b36a712cadb
dc305914d6aab34c3c095c235aa6b2bd
This routine returns the coordinates of the neighbor of the hex passed that is on the side passed
{ auto relativeCoords = C_HexGrid<void*>::HorizontalNeighborIndexes[dir]; return lhs + relativeCoords; }
1
eef1dab49409f137659e3bf5712a6b8d
ffcaa1e5280624d2e6400a653fc253dc
获取小程序码,适用于需要的码数量极多的业务场景,数量不限制。
class MiniProgramService public static function qrCodeService() { return self::miniProgram()->app_code; }
0
fbb24954a892949b94845d28dca691e5
38b25534ca1d4012bb8984839939f080
Return the discriminator value for the relation.
class PredictionTaskSchemaBase(BaseModel): def get_discriminator_value(cls, obj: dict) -> str: discriminator_value = obj[cls.__discriminator_property_name] if discriminator_value: return cls.__discriminator_value_class_map.get(discriminator_value) else: return None
1
9da2b39cda710c02b438e6b67133bad1
e7e7c96dffcf660bbb253de598ad402f
Formats a string containing the fully-qualified path to represent a project_dlp_job resource.
namespace Google.Cloud.Deploy.V1 public sealed partial class RolloutName : gax::IResourceName, sys::IEquatable<RolloutName> public static string FormatProjectLocationDeliveryPipelineReleaseRollout(string projectId, string locationId, string deliveryPipelineId, string releaseId, string rolloutId) => s_pr...
0
201092f51a8245812d51240bd172c80a
24189799c66702cfd2eb1b573e1d2b48
Launches background and foreground jobs, responsible for ; and &
Process *p = j->firstProcess; addJob(j); pid_t pid; int outfile; int infile = j->stdin; int mypipe[2]; for(p = j->firstProcess; p; p = p-> next) { if (p->next) { if (pipe(mypipe) < 0) { perror ("pipe"); exit(1); } ou...
1
165daea6ccf737bfc1dce118861362a3
4c3a5e80944e4d13e85f40ea75b8f37e
确定该数据列表页的分页总的页数,并返回一个promise,它的resolve handler会传进分页总页数变量
good_total = self.wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, '#J_ItemList > div.product > div.product-iWrap'))) number_total = self.wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, '.ui-page > div.ui-page-wrap > b.ui-page-skip > form'))) page_total = number_total.text...
0
aec2a30934c817c5bf84f570af9e54d3
590debc572ea7a3d008905f6147aa5de
从数据库读取标记位,确定是否打开了省电模式
uint8_t blsp_read_power_save_mode(void) { if (HBN_Get_Status_Flag() == HBN_STATUS_WAKEUP_FLAG) { return BFLB_PSM_HBN; } else { return BFLB_PSM_ACTIVE; } }
0
0f0dcce334bed8b2b6d84afad56f08c2
f391c51fd5d5a15424e1b9f6e092ace9
用于子类选择重写,在鼠标在控件中抬起时会调用
namespace AFTry public class Node : Button protected override void OnMouseUp(MouseEventArgs mevent) { isDown = false; base.OnMouseUp(mevent); }
1
c0180382c1296ded1490f2b33be1f87e
b64cc0448e7a360733cfd9a311797335
播放多个视频文件
class VodAction extends BaseAction{ public function create(){ if($_POST['ids']){ foreach($_POST['ids'] as $key=>$value){ echo('<iframe src="?s=Admin-Create-Vodid-ids-'.$value.'" width="100%" height="30" frameborder="0" scrolling="no"></iframe>'); } $this->success('操作成功!'); }else{ $this->assign("jump...
0
af7f1c473340a3420106e3a410526635
82a56970eaaf5be93efda9abe9224382
处理暂停播放按钮点击事件
listenerButtonPause () { bgMusic.pause() this.setData({ isOpen: false }) }
1
daf2f5c8f6da49312de0aa40399586df
44e527e334e4c5c3c8d8a1d757dfbc29
Function to deserialize
def deserialize(serialize_bt): if serialize_bt is None: return None value = serialize_bt.pop(0) if value is not None: temp_node = node(value) temp_node.left = deserialize(serialize_bt) temp_node.right = deserialize(serialize_bt) return temp_node else: return None
1
551f6b25d26c0bf03d56727eedcf95dd
dabaa015eefe8ba061c0f77075e97648
Get the memory position of a codepoint according to its position in the utf-8 string
namespace Topten.RichTextKit public class StyledText public int CodePointToCharacterIndex(int codePointIndex) { return _codePoints.Utf32OffsetToUtf16Offset(codePointIndex); }
0
6da4c61698e32a93a8dbc1546739e80f
e638ee8660c7d6bce86aec4cad5d772e
初始化公司积分
{ if(0>= $company_id) return false; $comment_amount = M($this->_module_name) ->where(array( 'company_id'=>$company_id, 'is_delete'=>0, 'is_validate'=>1, )) ->count(); if(false === M('Company') ->where(array('id'=...
0
7bb27bbbf31e2d14ba47077e01d07369
7e6ec08d39a96af185d11aa80fc7ff05
Overrides the Django default, to try and provide a better experience for frontend editing when deleting an object successfully. Ridiculously, there's no response_delete method to patch, so instead we're just going to do a similar thing and hope for the best.
if "_save" in request.POST: opts = obj._meta verbose_name = opts.verbose_name module_name = opts.model_name if obj._deferred: opts_ = opts.proxy_for_model._meta verbose_name = opts_.verbose_name module_name = opts_.m...
0
e79cf4c013475dc6caff1e85ff1f8b02
b0db9a6cd7aefc855fea8e740afa2fce
Convert a stream ID into a table name
class TSN: def getID(self, stream_page, prefix, delimiter): req = urllib2.Request(stream_page) try: resp = urllib2.urlopen(req) except: print "URL error trying to open %s" + stream_page return None page_html = resp.read().lower() start_idx = pa...
0
524045622af6ad71fa645d63a25111e0
583ddea6d2fb1d56fcf71e97c14bc1f6
Method for getting next word burst length
int Hardware_Accelerator_get_data_burst_len(Hardware_Accelerator* ha) { return HARDWARE_ACCELERATOR_mReadReg(ha->base_address,Hardware_Accelerator_ADDR_BURST_SIZE); }
1
91b8f4cb82f8302dd6db3bdd657ea40c
982c076d81c9595527e3e9648301ed82
Desabilita o meio de pagamento por cartão de crédito
paymentType.value = 'credit-card'; ccPayment.style.display = ''; paypal.style.display = 'none'; bitcoin.style.display = 'none'; cardNumber.value = ''; zipCode.value = ''; cvvNumber.value = ''; }
0
a23c7121df5879f697c40b92f7176a3c
c3fd407724e3cc42b46d85dc036ad466
Überprüft veraltete Semesterbescheinigung
{ foreach (StudentScore student in Students) { if (student.CalculationRule == null) continue; foreach (string subject in student.AttendScore) { if (!IsValidItem(subject)) continue; AttendScore atten...
0
21d85ed4a0911cce2837314ab8993a41
7c7cf6360d00b9421e9a8624b9ba27b2
obtener flujos para enviar y recibir datos
public class TCPClient extends JPanel public void getStreams() throws IOException { output = new DataOutputStream(client.getOutputStream()); input = new DataInputStream(client.getInputStream()); }
1
d99a54f89bcd5d9146023f37bb36f112
8fd060aed0f9f43588a6dbc48b7af40c
\brief debug function for printing the source file to stdout \author Niklas Assmann
void display_source_file() { list<char> ::iterator p = source_file.begin(); while(p != source_file.end()) { cout<<*p; p++; } cout<<"\n"; }
1
3dcf681acb67392dbafbdda804ee7829
b70a502b94301c39d7bd00d10a22c709
Verifies that bubble and group ordering may change with updates while the stack is in the collapsed state.
@SmallTest @RunWith(AndroidTestingRunner.class) @TestableLooper.RunWithLooper(setAsMainLooper = true) public class BubbleDataTest extends SysuiTestCase @Test public void test_collapsed_updateBubble_selectionChanges() { sendUpdatedEntryAtTime(mEntryA1, 1000); sendUpdatedEntryAtTime(mEntryB1, 2000); ...
1
b477e6cc1b22890c7fbc5f9039ab86db
ff575626748677c352b54c636b4896ee
Sample from the latent space in the autoencoder.
class VAE(object): def generate(self, latent_sample): return self.generator.predict(latent_sample)
0
fce9ed9226b5ef475e623656d06d6744
cf10d3283cba02ee30dd3215571f669c
去移民页面
function touristModel() { location.href = 'index.html' }
0
7bd7393d3ca783215f06809e0d2f8205
37482ac985ebf4285ddc7e6dccbaaa89
合作机构资金账户查询--总记录数
public class CommonSubSidiaryService implements ICommonSubSidiaryService @Override public Long queryRecordCount(CommonSubSidiaryDto dto) { return commonSubSidiaryDao.queryRecordCount(dto); }
1
34b2ccb9b39ff881f3519df3a6b2a1e6
234dd680ca506f5f0c9c826e49b1bf64
Update Movie api/movies
[Authorize(Roles = "Manager")] public async Task<ActionResult<MovieModel>> Update([FromBody] MovieModel movie) { if (!ModelState.IsValid) return BadRequest(); var model = await _movieService.Update(movie, User.Identity.Name); if (model == null)...
1
7f5e92711361520e436c47b128d87212
23cc9919ed407c2042dea37b85114305
Метод для выполнения всех записей в листе с делегатами
namespace Lab_10 public class TestDelegate private void FillDList() { Func<int, double, char, string, string> sampleOne = (a, b, c, d) => "First Delegate in DList!"; Func<int, double, char, string, string> sampleTwo = (a, b, c, d) => "Second Delegate in DList!"; Func<int,...
0
0d9cdf9061602fb06cc030dff58fc19e
21eb47fb4dc4b7a3bc9caebe175066b6
palauttaa pelinappulan arvon.
public class SolmuPunamusta public int getArvo() { return arvo; }
1
222a30d89c88291b7c3921c9cb54c326
d4cc913e5bfae84e2bddd0cf50859829
@brief set embedded url in object information
{ Bib.Bib_Info.Location.Other_URL_Display_Label = other_label; Bib.Bib_Info.Location.Other_URL_Note = other_note; Bib.Bib_Info.Location.Other_URL = other_url.Replace("\\", "/"); }
1
4c419474d717a04441364a9a54a01cb5
dc5fb3cb00b5218df00723d4fe55f044
Sets the spin of the sprite.
public abstract class Sprite public void setAngle(double angle) { this.angle = angle; }
1
5d5a41d8644b237819d3e1035bfdd97d
28f172bf5726a77b41ed6ea0c2313237
This is the list of points building the current pareto front. .. Note:: This is a shallow copy.
class LassoSelector: def xs(self): return self._xs
0
95e49fdcc2778d0590cc29709dd93ad4
79e8d267ae012e3b91bd0fc1a97ee6f6
Get a single datastream on a Fedora object; optionally, get the version as of a particular date time.
force=False): http_args = {} if logMessage: http_args['logMessage'] = logMessage if startDT: http_args['startDT'] = startDT if endDT: http_args['endDT'] = endDT if force: http_args['force'] = force url = 'objects...
0
5b98ae566d8da3a53d2553a7087d6be3
f864f0294be2bff5aa95eb979bdc31b9
作者:Primo 日期:2015.03.03 描述:判断学员剩下的选修课时是否够上选择的课程
{ var treastu = _tStudent.GetTreatiseList(ConfigHelper.TreatiseID).Count(); var teastu = _tSubject.GetTreatisePassList(ConfigHelper.TreatiseID); if (id != 0) teastu = teastu.Where(d => d.ID != id); var stucount = treastu - (teastu.Sum(d => d.Total)...
1
85e409379fc6a50a285cf3a183e71488
3cff4305fa3b6dfc5dcb6b306c5e1b92
Retourne la liste des déclarations entre deux dates données
class Declaration function get_dates_signature(){ $sql = "SELECT id_usager, date FROM les_signatures_declarations WHERE id_dec = '$this->id_dec'"; $result = $this->bdd->executer($sql); $les_dates_signatures = array(); while ($ligne = mysql_fetch_assoc($result)) { $les_dates_signatures[$ligne['id_usag...
0
2409221be13be6bd527e982ff94e306f
d84f3e6e974407060ba29909c9c06a77
Client Credential Flow authorisation required to access publicly available data
export class APIAuthoriseUserAgent extends APIUserAgent async authorisationRequest(): Promise<AuthorisationResponse & { redirect_uri: string }> { const requestURL = this.authorisationRequestURL(); requestURL.searchParams.append('user', 'me'); const redirectURL = await this.getRedirect(requestUR...
0