query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
c9b6e71b21eefd11a5890e2ecc81ae67 | 9241e8e20de78477f6759864006f3ff5 | Ensure 'convert' converts everything in ./tests/docs/.
no_rsrc is a placeholder fixture so that the converted files are always torn down, no resources are generated from this fixture. | class Catalog
class JSON
def convert_file_resources(dry_run = false)
return @options.key?(:basedir) if dry_run
return false unless @options[:basedir]
OctocatalogDiff::CatalogUtil::FileResources.convert_file_resources(self, environment)
end | 0 |
e824d41ba9d913df94ad8994308f9133 | 0c03da574f83044fc41049c73619257c | Post-process embeddings from BERT.
by removing CLS and SEP embeddings and returning CLS token embedding as
sentence representation. | unused_task_name: str = "") -> torch.FloatTensor:
assert "bert_wpm_pretokenized" in sent
var_ids = sent["bert_wpm_pretokenized"]
assert var_ids.size()[1] <= 512
ids = var_ids
mask = (ids != 0)
FILL_ID = 0
ids[ids == 0] = FILL_ID + 2
asser... | 0 |
d90b11a92fedab7c3b030fd7d4082a6e | d7a07ef0ac41733aeddfdfaca1e58f11 | 获取event发生位置相对当前元素的位置 | function getEventPositionLocal(evt){
evt = getEvent(evt);
var pos = {x:evt.clientX, y:evt.clientY};
var win;
if(isGecko){
win = evt.srcElement.ownerDocument.defaultView;
}else{
win = evt.srcElement.ownerDocument.parentWindow;
}
pos.x += Math.max(win.document.body.scrollLeft, ... | 0 |
1777c2cad6a148c9d6b04bf02016c106 | d4c77daf483dc172b789d65b54e3e144 | Метод формирования сообщения об ошибке для ajax запросов | {
return json_encode(array(
"error" => true,
"errorDescription" => $message
));
} | 1 |
6a59a67b6fbe603cd7b59c363753edb9 | 16625c98b8f870697ad983bfd56cec39 | Dequeues an item from the producer/consumer queue. Returns the dequeued item. Throws <see cref="InvalidOperationException"/> if the producer/consumer queue has completed adding and is empty. | namespace GriffinPlus.Lib.Threading
[DebuggerDisplay("Count = {mQueue.Count}, MaxCount = {mMaxCount}")]
[DebuggerTypeProxy(typeof(AsyncProducerConsumerQueue<>.DebugView))]
public sealed class AsyncProducerConsumerQueue<T>
public T Dequeue(CancellationToken cancellationToken)
{
return DoDequeueAsync(cancellation... | 1 |
45906da01c1eea9f31dd75a1a4006098 | 87d04b5af84e1cd7fa7bb45a77eb2691 | upon death, update observers | qtractorSubject::~qtractorSubject (void)
{
QListIterator<qtractorObserver *> iter(m_observers);
while (iter.hasNext())
iter.next()->setSubject(NULL);
m_observers.clear();
} | 1 |
9eb2e9a80cae42d51fb21210cb34ca26 | 28a15385c8759d83c244925a5d66d6fd | 获取用户列表或新增用户 | class AdminUserController extends BaseController
public function get_list(){
if(intval($_POST['uid'])>0){
$this->edit_list();
}else{
$this->add_list();
}
} | 1 |
d5f36e41580bfdd81d83245da6c6a6ed | 047188f29f458f90fcadf55b7ffcb188 | 填充采购单号下拉 | {
DataTable dt = new LN.BLL.POPLaunch().GetNewPOPID();
if (dt != null)
{
if (dt.Rows.Count > 0)
{
foreach (DataRow dr in dt.Rows)
{
ddlPOPID.Items.Add(new ListItem(dr[1].ToString(), dr[0].ToString()));
... | 1 |
89ab16e69a1abcb49eb871a037568588 | 8ece38f160a61c00c4b6e8020f497e49 | Envia um email passando pela renderização do Velocity , o email from já foi setado nos properties mail.from | public final class EmailManager
public void send(MessageTemplate template) throws Exception {
String mailBody = template.renderEmail(null);
if (mailBody != null) {
send(template.getMailAddress(), template.getTitle(), mailBody);
}
} | 1 |
bacc7f179d42077f229f69d31b9cf355 | c7cd84d8e0420abde59856c21786e967 | 第二步的销毁 | function showSecondMenu(index) {
SecondBallonDestroyObject()
TotalBalloonDestroyObject();
LayerManagement.secondBallon = LayerManagement.earth.Factory.CreateHtmlBalloon(earth.Factory.CreateGuid(), '顶部气泡');
LayerManagement.secondBallon.SetScreenLocation(120, 220);
LayerManagement.secondBallon.SetRect... | 1 |
cfdc2a8a10b1ddaa791691f8107b3a66 | 5b41620f205e3cf9165588e1937be369 | Make sure the given URL end with no slash | class misc extends MX_Controller
public function final_slash($context)
{
return preg_match("/\/$/", $context) ? $context : $context . '/';
} | 0 |
c2fa041e3417fefbd4e432c452d6db7d | 28dd8b34a33e274d658118edef84ee43 | Returns true if the Git binary can be found. | public abstract class AbstractGitFlowMojo extends AbstractMojo
protected boolean isGitAvailable() throws MojoFailureException, CommandLineException {
CommandResult gitResult = executeGitCommandExitCode("--version");
return (gitResult.exitCode == 0);
} | 1 |
11b42dfa337ced9e12ba81eff3af5003 | 32200ab30e1ddca35abdaf58dec5ea8b | resumes the animation | namespace WarWolfWorks.UI
[RequireComponent(typeof(Image))]
public sealed class ImageAnimator : MonoBehaviour
public void Resume() => pv_Paused = false; | 1 |
5bc492ff7b327734ca9715d3f1348d92 | a21c4338aa089341f6c4948bfaeb41f1 | Handling an exception when the user already exists in the data base. | @Slf4j
@RestControllerAdvice
public class GlobalExceptionHandler
@ExceptionHandler(AlreadyExistedException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
public Header<?> handlerIdExistedException(AlreadyExistedException ex){
return Header.ERROR(HttpStatus.BAD_REQUEST, ex.getMessage());
} | 1 |
3fc1f98c45153ab70b84625fba8ee7a0 | 9011c5c63415352a410349fcf7992fa2 | Поиск кратчайшего пути по Дийкстра | PriorityQueue<CompDijkstraPath> dijkstraPaths = new PriorityQueue<>();
dijkstraPaths.add(new CompDijkstraPath(from,0,new ArrayList<>()));
List<Integer> visited = new ArrayList<>();
while (!dijkstraPaths.isEmpty()) {
CompDijkstraPath currentElement = dijkstraPaths.poll();
... | 1 |
3c71f7cba48eb404522b8b92d2a917fa | 3355a49010f79f536218b4c57437b496 | Use the same featurization function for partitioning as we do for
choosing a domain. | public class Featurizable<TK, FV>
public int getSegmentNumber() {
return 1;
} | 0 |
9dc71543afda1c3b33e5cfc75dd60a2c | cee93fd8508fdf1fbdab4e418ca251aa | 移除Fragment resume 监听 | super.onFragmentViewDestroyed(fm, f)
viewLifecycleOwnerFragmentMap.filterValues { it === f }.map {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
viewLifecycleOwnerFragmentMap.remove(it.key, it.value)
} else {
viewLifecycleOwnerFragmentMap.r... | 0 |
cc13cd675f434e8b4d8f2220ada1f938 | 8a586eba6606d5babe0bacebd8d6c66c | Gets the current size of array (in bytes)
Returns:
int: size of array in bytes | class Array(object):
def get_size(self):
return self.size | 0 |
b6d8dcbf49efa0ccbbe66f0d0dce87ae | 0c0d74757819afc7ec239b178e72dc39 | 解析第一步xml数据,得到第二步请求的model | class WangyiSpider(scrapy.Spider):
def parse_model(self, response):
pass | 0 |
1bd840c27c07e999d79c3ffaeb5e02cd | 4a5ccb1a36e5d5638df3a62fc49d3c88 | setSingleBtnText 设置一个按钮的文字 | @Suppress("DEPRECATION")
class YFDialog : DialogFragment(), IDialog, DialogInterface.OnShowListener class Builder(context: Context)
fun setSingleBtnView(view: SingleBtnDialog): Builder {
mParams.viewWrapper = view
return this
} | 0 |
544f01362c6cdf51e46131ed52949964 | 9675dc7ead905590a84d47d753d006c7 | Set the JMC status to a given value | void __set_MSTATUS(uint32_t value)
{
__ASM volatile("csrw mstatus, %0" : : "r"(value));
} | 0 |
f2007d8904d381c5c77fa2bbd9905b99 | e4e513b97cf544861d1b87eb6d9dd34c | Gets the batch size to use for each cursor. The default value is 0, which tells the server to use its own default batch size. | namespace Z.Dapper.Plus
public partial class DapperPlusEntityMapper
public int? BatchSize()
{
return _batchSize ?? (!_isMasterConfig ? _masterConfig._batchSize : null);
} | 1 |
8e3cfff061898136a91d6fd36fe47319 | b63a42d019717ae8c2e5411372cddd1e | evaluate_board()
Function to determine the point scale for minemax calculation
returns an int
negative is against current turn player
0 is stalemate. | def evaluate_board(board, movehistory):
if board.is_checkmate():
if board.turn:
return -9999
else:
return 9999
if board.is_stalemate():
return 0
if board.is_insufficient_material():
return 0
wp = len(board.pieces(chess.PAWN, chess.WHITE))
bp = ... | 1 |
26593f366d51d25555df1d3e640a6d44 | ef4cb721ab6874a71ac7c404f5b95dc5 | Match a right parenthesis and fetch the next token | let match = ParentheticalRegex.exec(this.input);
this.input = this.input.substring(match[0].length);
return new ParentheticalToken(match[0].substring(1, match[0].length-1));
} | 0 |
4185f3bf614bcef9d4833a9c2d5817f6 | 9b50622cfea7173304e0e7d48b01f325 | A method to retrieve cross products for candidate series. The cross
products are computed between candidate and all time series. | namespace ahd.Graphite.Base
public abstract class SeriesListBase
public SeriesListFunction MultiplySeries()
{
return Unary("multiplySeries");
} | 0 |
73e6c484d931f22a5b1cf8870745ac01 | 90238558a9c0d10766799886eeec9ecc | En yüksek 10 Puanlık nesneleri bir liste atıp o listeyi döndüren fonk | {
List<SayisalListe> sayilar = new List<SayisalListe>();
for (int i = 0; i < hangilistede.Count; i++)
{
if (hangilistede[i].sayi > sayine)
{
if (hangilistede[i].sayi % 2 == 0)
{
Sa... | 0 |
47ebed20f94dd277e3534856a389fd33 | 8dd0a75b30b1b59273dad50175c9970e | Tests if the interior of the Shape entirely contains the specified rectangular area. | [System.Serializable]
/// <summary>
/// Base class of drawable vector based 2d elements.
/// </summary>
public abstract class VectorShape
public abstract bool IsInside(Rect rect); | 0 |
0634675ce1eaf0da7bbde12b22f9efae | e24bdcd5d7cc8eb34182fcdf4eb31249 | 获取星座运势。 | interface IReturnContext : Conversable, IDiscrete
fun getReturnHoroscope(natalModel: IHoroscopeModel, nowGmtJulDay: GmtJulDay, nowLoc: ILocation): ReturnModel | 1 |
2329d821fadeebffe7dcb8bff4095064 | 6b70e99f5d18f12cb0ab1f013d2d9e91 | Get the Coinbase Rewards based on the Reserve Balances to keep the Coinbase rewards under the Reserve Production Rates. | const sourceInfo = this.getInfo(params.source_ledger)
const destinationInfo = this.getInfo(params.destination_ledger)
const scaleDiff = destinationInfo.currencyScale - sourceInfo.currencyScale
const rate = new BigNumber(1).minus(this.spread).shift(scaleDiff)
let limit
if (sourceInfo.maxBalance !... | 0 |
7f79be320c50800aa20ff919894ee9f7 | e5e5120ec5766f69a2f95a0c89d3c3e4 | Takes a resource file, and loads it differently depending on what its file type is | {
Format format = GetFormat(filename);
switch (format)
{
case Format.Text:
ReadTextResources(filename);
break;
case Format.XML:
ResXResourceReader resXReader = null;
... | 1 |
a014fc30d46e71e68fe0f65b9cd27487 | 716270f369421971ecaf61c8ecd29bd2 | 导出门店商品列表 | @PostMapping("/export")
@ResponseBody
public AjaxResult export(ShopProduct shopProduct)
{
List<ShopProduct> list = productService.selectProductList(shopProduct);
ExcelUtil<ShopProduct> util = new ExcelUtil<ShopProduct>(ShopProduct.class);
return util.exportExcel(list, "shopProduct")... | 1 |
dbcebf3248ad050e3eacd9d261a939fe | e6b2f86c16fc9c98b6634b622b0b9f1a | Returns all items to the centre point and then runs the provided callback | class AppComponent extends React.Component
center(index) {
return function() {
this.rearrange(index);
}.bind(this);
} | 0 |
cfbcbb308e91c57d5cb53d113883816d | a9a0a54192bf6aa7dcb3b8dd850aa62a | Test that the subject is abbreviated when long. | post = BlogPost(
title="Congratulations to Valedictorian Jin Yun Chow '17 and Salutatorian Grant Storey '17")
assert len(post.short_title) == 65
assert post.short_title.endswith('...')
post = BlogPost(title="Congratulations!")
assert post.short_title == post.title | 1 |
55b729bce73b5fe9939244d5e8e03ad5 | 72406a9f4ab943c79d8cfd4361acd35b | Returns true if there is a structure located at the specified
coordinates | public abstract String areCoordsStructure(World world, int xCoord, int yCoord, int zCoord); | 0 |
390335bb77e5b28fc7fc8a9eeb3bd382 | 647abead2cabf7f7ef62ffe316ea9a6f | 获取训练次数 | class CoreEncoder(object):
def get_train_step(self):
return self._train_step | 0 |
701c7e5664437eb577aec89680134762 | 6e1370d860ae5fab6a72f0baf51c4c8f | 최고가/최저가 플롯을 수행하는 함수.
주식의 최고가와 최저가를 그래프로 그리고, 보여준다. | priceOne = np.zeros(2)
date_ = stock.index
open_values = stock['Open'].get_values()
close_values = stock['Close'].get_values()
for i in range(0, date_.shape[0]):
priceOne[0] = open_values[i]
priceOne[1] = close_values[i]
if priceOne[0] > priceO... | 0 |
0da34ac8921d932ecd9183d75d078fd9 | 499d2c91a7e4a4d66132da2f182bb8a9 | Prepare data shape to match `rnn` function requirements
Current data input shape: (batch_size, n_steps, n_input)
Required shape: 'n_steps' tensors list of shape (batch_size, n_input)
Permuting batch_size and n_steps | class GCLSTM(nn.Module):
def input_transform(self, x):
local_inputs, labels, extras = x
local_inputs = local_inputs.permute(1, 0, 2, 3)
labels = labels.permute(1, 0, 2, 3)
extras = extras.permute(1, 0, 2, 3)
n_input_encoder = local_inputs.data.size(2)
batch_size = loc... | 1 |
46ecd3603ba7c545c3fb0770ca655568 | 5c99e017761e72ed2747acfe9a857d0e | Create Junction Event and put it in the event queue: | {
string[] splits = EventData.Split(' ');
string name = splits[0];
string actorName = splits[1];
if (junimoLerpData.ContainsKey(actorName))
{
junimoLerpData.Remove(actorName);
}
++Game1.CurrentEvent.CurrentComman... | 0 |
a64a0ef6cb8f0142c22c2b95ddfb2150 | 7524051fa8027d9dd5b68dcf4f2a86dd | Gets the relations for source object. | Collection srcRelations = pEntity.getSrcRelations();
List srcRelationIds = pEntity.getPEntityConditon().getSrcRelationIds();
if (srcRelationIds==null || srcRelationIds.isEmpty()) {
return null;
}
List actSrcRelationList = new ArrayList();
for (Iterator iterato... | 1 |
7e82ceeb9f57f00907873b5a6026fb63 | 7191910f0cf392330f546e6a17ad79c4 | If it receives duplicate response, it should be ignored | TEST_CASE(IgnoreMessage)
{
handleMessage(shortMessage1);
TEST_ASSERT(dataHandler.responseCounter() == 0);
handleMessage(shortMessage2);
TEST_ASSERT(dataHandler.responseCounter() == 0);
handleMessage(getSingleInvalidSysExID);
TEST_ASSERT(dataHandler.responseCounter() == 0);
handleMessage(shor... | 1 |
8c03dc6e10fa9ea265ff0e128be16357 | 9493797e24abc13fe4f2329233d0cb8b | Helper function to run EOS WorkChain. | logger, handler = cls._try_add_logging(
data.log_path,
data.pickled_filesystem,
data.filter_logs_by_thread,
data.logs_filter,
data.logs_handler_factory,
)
results = data.workflow.execute(data.workflow_kwargs, raise_errors=False)
... | 1 |
5c9ec02df677f0949fe863b5b601f965 | d943477ac3157bfc5c8b02c4696c37cb | 获取异形信息 | namespace SysEx.Net
public class SysExClient
public async Task<string> GetMorphAsync() =>
await GetAnimalAsync(new Uri(APIBase, "/v1/morphs.json")); | 1 |
b12e3b94ebc932d00c40f66206ec68f9 | eabcf2a267b7b236c313503a8147ce64 | 4.8 从栈底到栈顶依次对栈中的每个元素打印 | public class Solution_21
public void printStack(Stack<Integer> stack){
if (stack.isEmpty()) System.out.println("空栈");
while (!stack.isEmpty()){
System.out.println(stack.pop());
}
} | 0 |
fcddb3d806bc0cf737f540c8dac44281 | 86ad5fca942366619bb2fe372bd3a29d | Get last Gearman return code
<p>Returns the last Gearman return code.</p> | public function getReturnCode(); | 1 |
7a04ba12db749cf10dba25a073c165b7 | eb47ec7f6657746779131510e82519dc | Plot a line from this point to that point using standard draw. | public class PostScript extends Output
private static class PostScriptFrame extends Cell.FrameDescription
public void showFrameLine(Point2D from, Point2D to)
{
writer.psLine(from, to, 0);
} | 0 |
f8dee94a725a2e2c2711786fd95aaa03 | d4307349235a3211cfc695ae397dc534 | is ctrl button pressed | public class TextClickedEvent extends EventObject
public boolean isCtrlDown() {
return (event.getModifiers() & CTRL_MASK) != 0;
} | 1 |
52df8ebeed0794d5ab5d0b44b83ef1ca | 722f8ae6124811c856f4f3c0d3f072d1 | Busca todas as candidaturas para uma determinada vaga | namespace ConexaoVagasAPI.Interfaces
List<Candidatura> Listar(); | 0 |
2707a66de7432d4f714f111c84623eea | 02378636a33afe6c67973a41f98ecca5 | detect and correct any skew | def fixSkew( img ):
edges = cv.Canny(img, 50, 200)
skew_angle = cv.HoughLines(edges, 1, np.pi/180, 1)[0][0][1]
if(np.pi/4 < skew_angle and skew_angle < 3*np.pi/4) or \
(5*np.pi/4 < skew_angle and skew_angle < 7*np.pi/4):
skew_angle -= np.pi/2
skew_angle %= 2*np.pi
h,w = img.shape
... | 1 |
9cf52ef51f16aefab281c74c0669478e | 7ab455dc49cd33a98f610ae30ae92f20 | Returns a database row as a tag array. | class PsDb
public function fetch1_array($dbres)
{
return $dbres->fetch1_array();
} | 1 |
b7b97effce7e6b490e1fd3456ea54d27 | 64ed56c29cbc7655e6ee2f7604953f60 | 캐릭터에 데미지를 가하는 함수 | public class Character : MonoBehaviour, ITakeAttack
public void GetDamage(float value,Vector3 HitPosition, bool isWeak = false)
{
HP -= value;
var type = FadeOutText.DamageType.Enemy_Damage;
if (isAligment(aligment.player))
{
type = FadeOutText.DamageType.Player_Damage;
... | 1 |
afc71726a4faaacadb331598c06d805b | ce507a56c005904e96f52238c9d5914c | 获取相册相片Uri | public class CameraUtil
public Uri getGalleryUri(Intent data) {
Uri uri = data.getData();
return uri;
} | 1 |
e0e6f1d240f49dbbc0fbd12eedb6a174 | 68385bdee01e77910f9c026a1087e936 | Get controller URL for cart generation | {
$params = array(
'customer_id' => $this->getCustomer()->getId(),
'address_id' => 'ADDRESSID',
);
return Mage::helper('adminhtml')->getUrl('adminhtml/addnewcard/index', $params);
} | 0 |
c2955db1cd6c6397295b7bc1282996b0 | 4d8e857f913766e489d7e548ba32a1d7 | 当需要一次添修改多个键值对时调用该方法拿到编辑对象,编辑完后记得调用提交commit()或者apply()提交编辑 | abstract void commitEdit() throws Exception; | 0 |
55e672370fad75d8c32f5100e6d92436 | 85e1582ae5fece09ae8a50d6921a36f0 | 查询监理日志信息数据方法 | @Service
public class LogServiceImpl implements LogService
@Override
public List<Log> selectLog(Log log) {
List<Log> list = logMapper.selectLog(log);
return list;
} | 1 |
21efc3b4bd663aacff8f05089869d464 | d608d5126d56539941519945de6eae50 | Take dictionary of list (data) and write it in csv file
the parameter keys can be used to order the column as dict are not ordered or to include only specific keys | def save(filename, dictname):
with open(filename, 'w') as file:
writer = csv.writer(file, delimiter=',')
writer.writerow(dictname.keys())
writer.writerows(zip_longest(*dictname.values())) | 1 |
461e868582db3cacc3c19c40ea55b8a7 | 8c04c5883c92ba8247e5f978ca7a33e3 | Clean cuisine values based on mapping. | data = self.data.copy()
data['Dilution'] = data[dilutions['Axis']].apply(
lambda x: dilutions[x] if x in list(dilutions.keys())[1:] else None)
data['Feeders'] = data[feeders['Axis']].apply(
lambda x: feeders[x] if x in list(feeders.keys())[1:] else None)
data['Rep... | 0 |
a53bfb9c9fb32763f2fb7035a0e8cc58 | 587d7f3f3a5702465fb7e03461af63ad | When a server request is made the clientSocket accepts the request
The ServerRequest() event is raised and the string received is
decoded into the RequestSring
The event can be consumed from another class | public class UnityServerForPython : MonoBehaviour
private void ListenForIncommingRequests()
{
try
{
tcpListener = new TcpListener(IPAddress.Parse("127.0.0.1"), port);
tcpListener = new TcpListener(IPAddress.Parse("0.0.0.0"), port);
tcpListener.Start();
... | 0 |
816b68d3af3920486c591b43464ff35d | fc349c3a96055d30e193110abe923d19 | Sign in with userid & password | class IdClient
public function signIn($username, $password) {
$postbody = IdClientUtil::passwordGrantParams($this->getClientId(),
$this->getClientSecret(),
strval($username), strval($password));
return IdClientUtil::doTokenReq(
$thi... | 1 |
8ad6ed54631093e0178302fd989851f3 | a9285fd8eebb3c717789de066fd5ef2b | ヨミ | if n := len(text) - 3*7; n >= 0 {
if text[n:] == "をやってないよ" {
return Yarinasaiyo
}
}
if n := len(text) - 3*6; n >= 0 {
if text[n:] == "をやってない" || text[n:] == "やってないよ" {
return Yarinasaiyo
}
}
if n := len(text) - 3*5; n >= 0 {
if text[n:] == "やってない" {
return Yarinasaiyo
}
}
return ""
} | 0 |
0204f37f061c1a429c2ef7f314a8a45b | 459740e8954c9efa326941a200050e0c | Change from full screen to normal view on click | namespace StRttmy.UI
public partial class DetailResourceContentForm : Form
private void axWindowsMediaPlayer2_ClickEvent(object sender, AxWMPLib._WMPOCXEvents_ClickEvent e)
{
if (axWindowsMediaPlayer2.fullScreen == true)
{
axWindowsMediaPlayer2.fullScreen = false;
... | 1 |
2098e53d93ed8a9104d81176e3f056e8 | 5e2aa3af7501e7e4cc105f5dd2458c68 | 获取资产巡查列表 | function getList () {
$ajaxhttp.myhttp({
url: apiPrefix + '/v1/ExeAssPatrolRecord/selectList',
method: 'get',
params: {
pageNumber: $scope.paginationConf.currentPage,
... | 1 |
f622546b047be7da40091100aa67afac | 92ff1bdb9974a9a8f603456330286a16 | Registers environment admin notices. | foreach ( $this->admin_notices as $i => $notice ) {
$classes = [
'laborator-notice',
'notice',
'notice-' . $notice['type'],
];
if ( $notice['dismissible'] ) {
$classes[] = 'is-dismissible';
}
?>
<div <?php kalium_class_attr( $classes ); ?>>
<?php echo wpautop( $notice['m... | 0 |
f6f91b9c9291fda4559c84e00f030a5d | bf91f21cac5be3528baf55994a2e8435 | Save C# codes into a file. | public class CodeSaver : ICodeSaver
public void SaveCodeToFile(CompilationUnitSyntax cu, string path)
{
if (cu == null)
{
throw new ArgumentNullException(nameof(cu));
}
if (string.IsNullOrEmpty(path))
{
throw new ArgumentException("Value cannot be null... | 1 |
af290df1892e85cf8722c1f87706e1d8 | 8111f5bee3bbf8ae0e520bea55f33f66 | Gets (as xml) the "consultCallId" attribute | public class DialogInfo/* extends org.zoolu.util.MonitoredObject*/
public String getCallID() { return call_id; } | 0 |
8fe2f5cd2db4e05cd50fa61b4d52d42f | 5c907fe0683e0b2959757df63a1fd7f2 | Shift up gears | {
float now = Time.timeSinceLevelLoad;
if (now < shiftDelay) return;
if (currentGear > 0)
{
currentGear--;
shiftDelay = now + 0.1f;
}
} | 0 |
31efa90465291d0a53b9772c5a106e24 | 34b7ab93b5cf3bde3670a2c7fcea1bd1 | Task to export all project's cases to a file | namespace TestCaseManagerCore.ViewModels
public class TestCasesInitialViewModel : BaseNotifyPropertyChanged
public void ExportTestCases(string fileName, List<TestCase> selectedTestCases)
{
List<TestCaseFull> fullTestCases = this.GetAllFullTestCasesForObservableTestCases(selectedTestCases);
... | 1 |
98358c675ed0d68205f036af05f743fa | 4c30b1ae7d469ef2e7ae7b1aa2091825 | Reset size of current window to automatic (relative) sizing. | class Size:
def min_auto(self) -> 'Size':
self.minimum = 'auto'
return self | 1 |
8682d9a06a97393e9266d9f168841122 | 8080a3c2d93606e473eaea7a37a6a810 | Реализация поведения при команде РАЗГРУПИРОВКИ | public void execute(String option, Scanner scanner,String type) {
System.out.println("Выполняется команда группировки коллекции");
if (coll.getSizeColl()!=0) {
System.out.println("Количество элементов полученных групп элементов коллекции");
coll.grouping();
}
... | 0 |
937b7254a766756121c39e8f1c913a1b | 2812b3e7cc6ee5a3d4fae60d1d213529 | This method sets the start line, start column, end line and end
column for the current element. | {
this.startOffset = startOffset;
this.startLineNumber = startLineNumber;
this.startColumnNumber = startColumnNumber;
} | 0 |
54e45a6bbfd84de9d45fee499590dfe2 | 1f20f1b23302b7cac926ed8d5fc683b3 | 특정 기사의 내용, 구독자 반응 수집 함수 | class Crawling(Els):
def collecting(self):
print('시작')
data = urlopen(self.base_url).read()
soup = BeautifulSoup(data, "html.parser")
total_data = soup.find_all(attrs={'class': 'main_component droppable'})
category = ""
multiple_dic = {}
multiple_dic['crawling'] =... | 1 |
c7183650c63080ad865c9160f686e002 | 359b6d88c110fff551094eec142b2b90 | Returns the form send record field signalement where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. | public class NotificationPersistenceImpl
extends BasePersistenceImpl<Notification>
implements NotificationPersistence
@Override
public Notification fetchByUUID_G(String uuid, long groupId) {
return fetchByUUID_G(uuid, groupId, true);
} | 1 |
063b62fc095b5244c66ac8dd4b6b02c6 | 8fc45dd763e021c5987b419262cc1da5 | Tests formatting a coordinate operation from an EPSG code and parsing it back. | @DependsOn(FormattingTest.class)
public final strictfp class ParserTest
@Test
@Ignore
public void testCoordinateReferenceSystem() throws IOException, ParseException {
parse(new ReferencingParser(), "CoordinateReferenceSystem.txt");
} | 0 |
957d847b125a5664ca6d3ec727f916cc | 6015bb42276c67e88d3990bab751e02b | Sets the bubble border color. | if (this.borderColor != borderColor) {
this.borderColor = borderColor;
if (displayBorder)
postInvalidate();
}
} | 1 |
2a1d0362745990fbba5139f14e63bf53 | bd26a99c8c9409998c17f41bb153326e | Returns whether or not a ray object is reflective | class Ray
getVisibility() {
return this._visibility;
} | 0 |
05b9899e69078bbd6a55664bfa94829c | 76c772fa9c07e6b206d369659b135741 | Test the exit code is 1 (SystemExit). | class TestAddSkillFailsWhenSkillAlreadyExists:
def test_exit_code_equal_to_1(self):
assert self.result.exit_code == 1 | 1 |
97aa1c7cd38cc2bca1665a58de4a3540 | 00619632e5a95714e8b0623a9a02398d | Should return None if there are no Versions in the database. | class TestSKAMaster(object):
def test_GetVersionInfo(self, tango_context):
assert tango_context.device.GetVersionInfo() == [""] | 0 |
23a8612de1eabc90b48c71f2fb058640 | 97be9d60913e374bd1ff2f8362cf63ca | Function renderGrid | {
$this->initializerdc9cf99 && ($this->initializerdc9cf99->__invoke($valueHolderdc9cf99, $this, 'renderGrid', array('gridView' => $gridView, 'template' => $template), $this->initializerdc9cf99) || 1) && $this->valueHolderdc9cf99 = $valueHolderdc9cf99;
return $this->valueHolderdc9cf99->renderGrid($gr... | 1 |
3c6805c7923330ccf726d53ad8e974bd | 214996196003f9d69744d465c1fbda75 | 验证窗帘类设备 | {
checkLogin();
before_api();
checkAuth();
$condition['id'] = I('id');
$classDiscountModel = D('EquipmentMoniter');
$data = $classDiscountModel->where($condition)->select();
foreach ($data as $k => $v) {
$data[$k]['category_name'] = $this->get_cat_... | 0 |
43d1f72a82926fdfac0ecc7cc695aae0 | 707353a5c488134bfd8b9ca333553eee | Set the priority of the current process. | public class Process
public void setPriority(int priority)
{
this.priority = priority;
} | 1 |
75be52650ff77d25fc083eaebb5e490e | ee2a401444dea96ce3abc3c997b2f577 | generate a random cluster structure given number of clusters and list of unique students
possible values of states are 0 -- num_cluster-1 | seed = 123
mat1000x8_uniformRandom = numpy.random.mtrand.RandomState( seed ).uniform(0,1,[1000,8])
maxsOfEachRow_1dim = numpy.max( mat1000x8_uniformRandom , axis=1 )
maxsOfEachRow_2dim = maxsOfEachRow_1dim[:,numpy.newaxis]
boolMat_is_max_of_row = ( mat1000x8_uniformRandom == maxsOfEachRow_2dim )
... | 0 |
d8f167d75817d9185cb0f1c3d4ef1ae6 | 4e26dacc43c5755540c66fecce3e5ced | Print all of the results, sorted by max number of options. | for key in self._keylist:
print("{key:<{length}} : {value:.3f}".format(
key=str(key),
length=len(max(self._keylist, key=len)) + 2,
value=self._result[key])) | 0 |
df85bfd74cce4c19491d5cc69b514366 | ca1def07ed2b610cd7f41176a20a8a69 | Creates a few tables in the ledger created using [.createLedger]. | async initLedger(stub, args) {
console.log('============= START : initLedger ===========')
console.log('============= END : initLedger ===========');
} | 0 |
6a44aab78317a2221e2cc77bd7bbf824 | dc58785045d7d04fa81f6f777ed4b619 | Set the order direction used when ordering <see cref="Ingredients"/>.
<para>
Hook this to <see cref="Button.onClick"/>.
</para> | {
if (_ingredientsDisposition != null && _ingredientsDisposition.Count > 0)
{
levelDisposition = _ingredientsDisposition;
RepositionateIngredients(_ingredientsDisposition);
}
} | 0 |
07479dca9d69bf49308d3763a0e34f7e | 6ac4e601b2d90688b259c50aa1b95c37 | Register custom action to init map plugin | class FWP_Map{
public function __construct() {
add_action( 'plugins_loaded', array( $this, 'register_admin' ) );
add_action( 'init', array( $this, 'verify_config' ) );
} | 1 |
ce341827b84de4fc5ef07d9ceae7d2bc | 6a42dba1796bf66079ee084b038afbf9 | Assign Meta Boxes To Post Types | function site_meta_boxes(){
foreach(installed_custom_post_types() as $custom_post_type){
$custom_post_type->register_metaboxes();
}
} | 1 |
5b7478f92558bc9a235dda27a2a8f719 | 2f377df4a4ad9ffe630d4fc8b9beb924 | process all input: exit when press "ESC". | void processInput(GLFWwindow *window)
{
if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS)
glfwSetWindowShouldClose(window, true);
} | 1 |
0a98b1aa71dede254fad8fcf7b2fd35f | cdb2e000152a32e2f29ee657f149bd85 | Устанавливает набор инструментов, выводимых в каждой строке элемента | class PlotView:
def setLengthItems(self, value):
value = int(value)
if value > 0: self.lengthItems = value | 0 |
6bbb93759520517adce9921c376b58a2 | b682ccbdf6944a4aa087a5d3bf505153 | set group (AJAX CALL) | {
var id = this.options[this.selectedIndex].value;
location.href = location.href + "&group=" + id;
} | 0 |
115ddcbf848767a0fb605de6d164c969 | a068704d6b7b8c53fa333f86d75aaec0 | Receptionne du demande d'entree en section critique de la part du processus metier | void Utility::Enter(Event *e, int capacityToUse)
{
double actualTime = Calendar::instance->getTime();
if(this->canBeSeized(capacityToUse))
{
if(this->isFacility())
{
this->stats.startUsage = actualTime;
this->remainingCap -= capacityToUse;
}
else
{
int usedCap = this->usedCapacity();
if(usedCap... | 1 |
6408cba1ddcb8179148631b7feede09e | 999397c5c33acdc0cd214d0090d06d01 | Creates the matrix using only the principal components chosen from the PCA | public class PCA extends FeatureExtraction
private Matrix getFeature() {
int i, j;
ArrayList<Matrix> input=null;
int row = input.get(0).getRowDimension();
int column = input.size();
Matrix X = new Matrix(row, column);
for (i = 0; i < column; i++) {
X.setMatrix(0, row - 1, i, i, input.get(i).minus(this.me... | 1 |
1cf195cf91b4452ed2ca9da6905213e3 | cc81d0bc87c0ec1f2a2a2e58e6bbc3e4 | 处理片段单击事件。 | var sel = getSelection();
var node = null;
if (sel.toString() != "") {
node = sel.anchorNode ? findElementWithID(sel.anchorNode.parentNode) : null;
} else {
node = findElementWithIDInView()
}
playAudioFragmentID(node ? node.id : null)
} | 0 |
20c773cce61be28b7e7c3eafded0936c | 807ad9cbb0ff974fbc092fba425c3d23 | Obter as turmas de uma disciplina. | Optional<List<Turma>> BuscarPorCursoId(Long id_curso); | 1 |
e7679eb18c459c0033b587300e41ce37 | 4ba42ccef792597f7059ad4d8285a2de | пересчитать сдачу | static $result = [
'amount' => 0,
'note' => [],
'coin' => []
];
static $itteration = 0;
if($itteration++ == 0)
$result['amount'] = $delivery;
if($delivery != 0){
$tmp = [];
foreach($this::MONEY as $money){
... | 1 |
ad2eac2c80c069a5524fd80eaf19bcef | f6966b8b372aa36cabf27c8a00bc360d | Builds a map sector index -> library preparation plate. | class LibraryCreationCyBioOverviewWriter(TxtWriter):
def __get_sector_preparation_plates(self):
for ispp in self.iso.iso_sector_preparation_plates:
self.__sector_prep_plate_map[ispp.sector_index] = ispp.rack | 1 |
e91ee16ac3afb1d7cd6baaf610f0e13b | ec67486b31dbbe533f19c128623938b1 | open spread as well as grasp (returns 1 if success, 0 if failure) | initial_condition = GripperCondition(self.robot.get_gripper_position(0),
self.robot.get_gripper_position(1))
if self.robot.set_gripper_state(arm_index, GripperState.OPEN):
speech_response = Response.open_responses[arm_index]
if (Intera... | 0 |
a6ce696e236e9874c2e2c7708d4db3ab | 57734176c13583ffe84b616f9326699c | POST: Fails/MakeBid | public ActionResult Check(int? id)
{
if (id == null)
{
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
}
Bid bid = db.Bids.Find(id);
if (bid == null)
{
return HttpNotFound();
}... | 0 |
fff5b741957aa9ed5c8b637cb1af8554 | 0729ed1896da728b79f8037613a79dac | 查询所有可看的的系统 | @Service
public class MenuService
public List<AllSystem> getSystems() throws SysException{
List<AllSystem> system = systemDao.findBysystemNameNotNull();
return system;
} | 1 |
b18fb1dd1bb2b39bf1120db91aa6966a | b9aa19a5ed7d66d7458dba916bef8af2 | Displays a list view of Attendance objects | class Attendance_entryController extends Controller
public function index()
{
$attendance_entries = Attendance_entry::orderBy('id', 'desc')->paginate(10);
return view('attendance_entries.index', compact('attendance_entries'));
} | 1 |
19060ebcfd04576f7f0f9ad97bf71e53 | c7608c5c577185dff205542ee92c4f58 | Get http_request and trace data from flask request headers.
Returns:
Tuple[Optional[dict], Optional[str], Optional[str], bool]:
Data related to the current http request, trace_id, span_id and trace_sampled
for the request. All fields will be None if a django request isn't found. | if not callable(tracer):
self.__tracer = tracer
else:
self.__tracer = None
self.__tracer_getter = tracer
self._trace_all_requests = trace_all_requests
self._current_spans = {}
if self._trace_all_requests:
@app.before_request
... | 0 |
541f910e7eb4f5c281bc2d971f73d261 | 57f88c8ea1a2ba2618fffca70c0fea36 | send off current winning prize | void sendPrize(Request request); | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.