query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
8b3534856b8f899bba2fcd15158bfff9 | 454039d8e96ef40060e0e430289d80cd | Pushes an integer value of given size on top of the stack and increases the
stack pointer by the size of the pushed value
[E_INVALID_STACK_OP] | constexpr uint32_t INT_OFFSET = 1;
IntType type = static_cast<IntType>(flag);
IntVal srcIntVal;
UVMDataSize dataSize = UVMDataSize::BYTE;
switch (type) {
case IntType::I8:
srcIntVal.I8 = vm->MMU.InstrBuffer[INT_OFFSET];
break;
case IntType::I16:
srcIntVal.I16 =
... | 1 |
d4131208acccfebdc7b5caa2e0ce9879 | a1275b1aa931acfc57196697010d7fed | Gets the race ability modifiers. | class Race(object):
# Mods returned in order: attack, defense, recruitment, spy, sentry
def __init__(self, r):
stats = set_race(r)
self.race = r
self.attack_mod = stats[0]
self.defense_mod = stats[1]
self.recruitment_mod = stats[2]
self.spy_mod = stats[3]
sel... | 1 |
86088d8e90c9cbcf3072adc2bc001417 | 7ce17b4f5ab4bb7b7660ceec6f181401 | 测试沿着L逆时针旋转90° | class CubeTestCase(unittest.TestCase):
def test_l_anticlockwise(self):
self.skipTest('跳过test_l_anticlockwise')
test_cube = np.array(
[
[[['orange', 'green', 'yellow'],
['white', 'orange'],
['white', 'blue', 'orange']],
[[... | 1 |
ad46843d6274fb113d7ae9d2344963af | d33e056973bf04e7c7de900bd299f8d8 | 检查美国玩家的太空竞赛是否领先 | public void checkAndRestCompetitionData(KRole role); | 0 |
8835c82762e7c75f52c29dfa750727a1 | 91654bdffd8e9a987032338be687fc0b | функция проверки все ли значения введены | function isEmpty(firstName, lastName, tel) {
if (firstName == '' || lastName == '' || tel == '') {
alert('Заполните все поля!')
return false
} else return true
} | 1 |
2be1a7657ca48ad3e1bfa9f2243ea54b | 0380bbb0eb000bb136fe0d2a5d7afe35 | 根据接口编码查找接口 | Map<String , Object> paramMap = new HashMap<String , Object>();
paramMap.put("interfaceCode", interfaceCode);
return super.getBy(paramMap);
} | 1 |
1165c0ffb77aa6276239ef06c1b2570e | ec2e096c1c50b9540f8461ce3bdfe1d7 | Returns the last row in the result set | class Model extends DB implements \Iterator
public function end()
{
return end($this->rows);
} | 1 |
70c33a764892c94a987645c382bf9744 | 3392cc1a0ddbea3816db7b35a51f03d0 | 航班时间转化为分钟 | def transtime(time):
return 60 * int(time[:2]) + int(time[2:]) | 1 |
f24d199e0a0d076606f679a53bf8d88b | 3c14c40b8182a740c456ee37754761db | Checks all evaluation functions before a document change is applied | {
if (_obj.DeadlineInDays.HasValue && _obj.DeadlineInDays < 1)
e.AddError(DocumentKinds.Resources.IncorrectDeadline);
if (_obj.DeadlineInHours.HasValue && _obj.DeadlineInHours < 1)
e.AddError(DocumentKinds.Resources.IncorrectDeadline);
if (_obj.NumberingType != NumberingType.Numera... | 1 |
a82d5c8cd4db21b7cb785c4a14135ab2 | 2be17d4552d459c4688ae49baaaca2c5 | Calculates the light vector that starts from a given point, and points to the light source
This function is not part of TKITraceable because they are the same for all objects | CVector3d COmniLightSource::GetDirectionFromPoint(CVector3d const& point)const
{
return GetPositionInWorldSpace() - point;
} | 1 |
9c28ce16deb0fba6022d82de8eba05ee | 888fbc67a296f96e0c2af7d97caa5bf9 | function to get filename as change_capture_weekoftheyear_yyyymmdd.csv | def get_destination_filepath(year):
return 'data_pulled/'+str(year)+'.csv' | 0 |
6db463922635378bdac17a7e4b017f6d | 92bd849ad2704fdb2bbc82cdf246b2d3 | Gets the current settings from the settings box | class Csviwer(Qw.QMainWindow):
def get_setting(self):
return (self.ui.cmb_cmap.currentText(), self.ui.dsb_alpha.value(), self.ui.spb_bins.value(), self.ui.dsb_alpha.value(),self.ui.dsb_markerSize.value() ) | 1 |
b55f4624fd78f997585cfa835f38e76d | 0075cf9b40a32e9d2be100a6a5adb3c5 | Write out a c-style (null-terminated) string. | static char *wbuf_write_str0(struct wbuf *buf, char const *str)
{
return wbuf_write(buf, str, strlen(str) + 1);
} | 1 |
7d2b3add6aeb7e725f4cc8aa78605ca4 | 9fed0897e5986e116b5dbc760b21f350 | 실시간 공지 종료일시를 할당한다. | public class TaskProfile
public void setEndNotification(Long ts) {
this.endNotification = ts;
} | 1 |
4be9e4c506ce070a6fa7b33a921aedac | 974229e202cefa2f6c95f79864fe8cae | 获取物体的当前大小,通过BoxCollider | public class ResizeBoxCollier : MonoBehaviour
void Update () {
Vector3 objectSize = gameObject.GetComponent<RectTransform>().sizeDelta;
BoxCollider collider = GetComponent<BoxCollider>();
collider.size = objectSize;
} | 0 |
0076a229b79ddc5c0f4b4e4ca4f79dd8 | be3ecd49ac1be218ec67c14c2e5d9d76 | Handles the AfterShown event of the modalPanelManager1 control. | {
ipbScreenShot.Image = (p_modMod == null) ? null : p_modMod.Screenshot;
flbInfo.Text = (p_modMod == null) ? null : p_modMod.Description;
HidePanels();
} | 0 |
072913600b0b0e6e8cbdb2bae53c10bc | ec67871e2faafa9ad3df897f9f4c812d | Defines the cycle phase, when in global mode. Defaults to zero. | public class HEC_Torus extends HEC_Creator
public HEC_Torus setTorusPhase(final double p) {
torusphase = p;
return this;
} | 1 |
7d771e3242dad04c9c964dccbd5d5a5d | f476873565d647fe8fbc9d1c2c698862 | Paso de relajacion | function comportamientoPasos(paso){
if(paso == 4){
paso_anterior = 3;
paso_siguiente = 1;
$('#paso_anterior').html('Volver al paso 3');
$('#paso_siguiente').html('ir al paso 1');
$('.container_pasos_img').slideToggle('slow');
$('#img_pasos').attr('src', 'img/paso4.png');
$('.container_pasos_img')... | 0 |
7ee0824e5d6de44bfab1e356fb28dce5 | ff9d44e128355498c85abce8cb4daedc | 根据genreId查询总和表 | int findTotalCount(int cid,String rname); | 0 |
815ba9a4ed6d72d83ff91fc614b637b6 | 08eda97d0918efb226d1292951764bba | Get the number of documents that have been processed at least once. | public final class ProcessWithDocAiPipeline extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.contentwarehouse.v1.ProcessWithDocAiPipeline)
ProcessWithDocAiPipelineOrBuilder
public int getDocumentsCount() {
return documents_.size();
} | 1 |
493c131cff648c5e1bf3cd1f2522b2f8 | 010b6fb526174e4b7dc677cbfb10cb1a | Update network parameters using given batch of experience tuples (using DQN) | class DQNModel(Model):
def update(self, batch):
self.logger.debug('Updating DQN model..')
float_terminals = batch['terminals'].astype(float)
y = self.get_target_values(batch['next_states'])
q_targets = batch['rewards'] + (1. - float_terminals) \
* s... | 1 |
fd997e309288635cae75039aa2977da9 | 3a1186823a153449c485da51fbf8c05f | Set triangle coords in BufferGeometry arrays | let arrayArgs = [];
switch (objectType) {
case 's': {
let x1 = x;
let x2 = x + width;
let y1 = y;
let y2 = y + height;
arrayArgs = [x1, y1, x2, y1, x1, y2, x1, y2, x2, y1, x2, y2];
count = 6;
}
break;
case 't': {
let x1 = x;
let x2 = x + width/2;
let x3 = x + width;
let y1 = y;
... | 1 |
8755dd0f75b57881c8a62a978edd6eb0 | 7f549f61dbf47dcf4bcef1ecd5823f59 | Returns the current active SFX Service. | public static class ServiceLocator
public static SFXService GetSFXService()
{
return _sfxService;
} | 1 |
f1ea787df7266684c2f36580ab6e9a30 | 7182eac5e20b6b66054d7ca69f973843 | Sets the indoor map ID to allow the point to test against routes indoors. | public class MapDescription
public void setMapId(Integer mapId)
{
_mapId=mapId;
} | 1 |
dd119ec42e3e3dbe19d7468392df8725 | d218896927562dceabc4697aa7d286b7 | 계좌 목록 출력하기 | System.out.println("-------");
System.out.println("계좌목록: ");
System.out.println("-------");
for (int i = 0; i < accountArray.length; i++) {
Account20 a = accountArray[i];
if (a != null) {
System.out.print(a.getAno() + " ");
System.out.print(a.getOwner() + " ");
System.out.print(a.getBalance() ... | 1 |
0ed01957312b1f1260188afb9ace5774 | d56d465c526a06387250315b92f4d3ce | 自分と敵との間に壁が存在しているか | for (int yIndex = 0; yIndex < getYLength() - 1; yIndex++) {
int notExistsCount = 0;
for (int xIndex = 0; xIndex < getXLength(); xIndex++) {
if (tateWall[yIndex][xIndex] == Wall.SPACE) {
notExistsCount = 0;
break;
} else if (tateWall[yIndex][xIndex] == Wall.NOT_EXISTS) {
notExistsC... | 0 |
5b7dbbf07e589e4e4d49bfdbbae97ac6 | 021c999add532d58c9642deb54da858d | Zpracuje odstranění štítku dokumentu. | namespace WebService.Controllers
public class DocumentsController : ApiController
[HttpPost]
public void Delete([FromBody]Guid id)
{
var sessionContext = SessionHelper.GetSessionContext();
DoAction(() =>
{
DocumentService.Delete(sessionContext, id)... | 0 |
a3a0137034748f37d8cd49a6a4741bf5 | a58d2ef491ab198b40de784769f2dc7c | Function to merge grid values and to push values to the left | for x in range(0, 4):
for y in range(0,4):
lastGrid[x][y] = grid[x][y] | 0 |
0122c9a9838113a932aafe62fee697c7 | a6ce9f5f72e8c49caef6b0936a2de9eb | Tests that the name of the endpoint is correct (logging purposes) | public void canCreateEndpointWithName() {
EndpointContract endpoint;
endpoint = new EndpointContract("TestEndpoint");
assertEquals("TestEndpoint", endpoint.getName());
} | 1 |
92224d15b7dda977eb744c7c496357c6 | 2e6ee998bb1e4f2de0837793e51f0fa0 | Check if the device is tablet in landscape mode | if (context != null) {
return context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
}
return false;
} | 0 |
c75f09defcf798fb53a6f11200413c80 | ba2ac869cf659c87e988f8dc622ae35c | !
Renames a class. | (IWbemServices * pProv, IWbemClassObject *pimcoClass, CString *pcsNewName,
BOOL bDeleteOriginal)
{
IWbemClassObject *pimcoClone = NULL;
IWbemClassObject *pErrorObject = NULL;
SCODE sc;
sc = pimcoClass -> Clone(&pimcoClone);
if (sc != S_OK)
{
CString csUserMsg =
_T("An error occured renaming a class: ");
c... | 1 |
c2640c22ea245bdb84d2556395f46204 | b112fa48d6bf8045b11f740cc2f49b6d | Enable smartcommits on new repos. | mock_repo = Mock()
mock_repo.enabled = False
repository.enable_repo(mock_repo, True)
self.assertTrue(mock_repo.enabled)
mock_repo.put.assert_called_once_with()
mock_repo.create_webhooks.assert_called_once_with() | 0 |
bd1f1ad9765805803ecc1ffc15884c1d | 35b788548e22fa854cdc526eb52387c1 | Initialize Mgrt client | class Client
def initialize(options = {mothership: 'https://api.qmachine.org'})
@ms = options[:mothership]
return
end | 0 |
3817b8914de048db2985e63fc4abbb0f | 0a50d1a3526dc9646155f49f8eb13bb6 | Determines whether the trajectory segments are drawn as an emissive or
diffuse color | public abstract IColor getEmissiveComponent(); | 0 |
2edd7c89ad0ef8789f6235ef8ba7d1e4 | bf6dba671e12a8c9b5326e404a6b6a00 | Resolve resourceName string as
"js/jquery/flot/jquery.flot.js" or "png/logo.png"
to JS or PNG value | if (!entry) {
return "";
}
let locale = vm && vm.Locale ? vm.Locale : DefaultLocale;
let localeResource = RESOURCES[locale];
let entries = entry.split("\\");
let type = entries[0];
let key = entries[1];
if (localeResource && localeResource[type]) {
let value = localeResource[type][key];
if (value) { retur... | 0 |
4266b6f9b6a1a3be88d25e99bbf848ca | 301574901597663b5947b0435a096922 | To switch between student and teacher form | if (showEditForm) {
showInsertForm = false;
showHideInsertForm();
$('#editStudentForm').show();
}
else
$('#editStudentForm').hide();
} | 0 |
3573765247fe4e893998cbb27164487c | f4802f5c3589ba366261111c733d7835 | This method is used to get the value of a primitive
double variable from the ParameterList | TypeMismatchException {
Object obj = getParameterObj(variableName);
String varType = obj.getClass().getName();
Double doubleObj = null;
if (varType.equals("java.lang.Double"))
doubleObj = (Double) obj;
else
throw new TypeMismatchException("double", variableName);
return doubl... | 1 |
c9e7f210e27f7e35f6715c4ac0e489e1 | 34cefdd28699e439c673f44585758d26 | 切换建筑物楼层 | {
if ('' == floorEditId)
{
floorEditId = uuid();
}
else
{
top.closeTab(floorEditId);
}
var buildingId = $(target).parent().find("[name='buildingId']").val();
var buildingName = $(target).parent().find("[name='buildingName']").val();
top.openTab("楼层编辑", floorEditId, "h... | 1 |
079a35c69f113ca8d544e35d18358190 | c7237d2666cb1354ec0de62a14f443a1 | Writes list of search results as JSON nested array. | JSONObject jsPlayerObj = new JSONObject();
jsPlayerObj.put("count", count);
JSONArray jsPlayers = new JSONArray();
jsPlayerObj.put("items", jsPlayers);
playerSearchResults.forEach((player) -> {
JSONObject jsPlayer = new JSONObject();
PlayerCareerStats stats = new PlayerCareerStats(player);
try {
... | 1 |
0a71a1e5bf66c52875962ea330ee0131 | bbeae2eec6baf6123bb6a32389dedc7e | {{{ proto bool ZipArchive::getExternalAttributesIndex(int index, int &opsys, int &attr [, int flags])
Get external attributes for file in zip, using its index | public final class ZipFileEntry
public int getExternalAttributes() {
return externalAttributes;
} | 0 |
2bfeb6086b6bb07074497c13c939eb84 | 8886f9dc2559ce6287934f6b61c63a78 | 某产品的流水明细 | def stock_trace_list(request,product_id):
trace_list=BillBase.objects.filter(billdetailbase__product__id=product_id).select_subclasses()
return render(request,'stockmanage/stocktrace_list.html',
{'trace_list':trace_list}) | 1 |
a71e8000f11fe3185c2cf392a00ef00a | 8fa8211e82f8e2fb89b0fc69a43e2ffc | Offsets the region relative to the current region. Generally the region's size should be the entire size of the texture in | {
#if DEBUG
if (_beginCalled == 0)
{
throw new InvalidOperationException(Resources.GOR2D_ERR_BEGIN_NOT_CALLED);
}
#endif
if (region.IsEmpty)
{
return this;
}
ref Gorgon2DVertex v0 = ref _primitive... | 0 |
8ed5f5c2b67deeb5756699f0ff20c014 | 19fe8f77f4ad171f1384b67afe081ad7 | 构造函数,设置标签名称 | function NoticeLayer:ctor()
self._strName = "NoticeLayer"
end | 1 |
31cbc647e3fa149f1fd79f7a5861e64f | f5388254d2ac20717d48954a83cb2289 | 获取链接文档内容并保存 | def get_content(url_buf):
each_title = ""
each_url = ""
splits_num = len(url_buf.split(" "))
if (splits_num > 3):
each_title = url_buf.split(" ")[0] + url_buf.split(" ")[-2]
else:
each_title = url_buf.split(" ")[0] + url_buf.split(" ")[1]
each_title = re.sub(r'[\|\/... | 1 |
29cce314f67c147958167a04a7ef7506 | 903b00607a80a642469004ccd113deb4 | Returns cached plaid token. | CachedToken getToken(); | 1 |
56f12a267778f631b6e7ab0723d04caa | 656265d09021283aaeff40c2c354d34c | Get a ConvertDirectoryIterator | class ConverterProvider implements IteratorAggregate
public function getIterator() {
if (!$this->classes_loaded)
$this->initialize();
return new \ArrayIterator($this->providers);
} | 0 |
e573bf367f5c443484769dd07a24dfa7 | 8b360baab0ccf0c87741986390550141 | Checks if a relationship is deletable | @SuppressWarnings("serial")
public class RecursiveRelationship extends AbstractRelationship
@Override
public boolean isDeletable() {
return table.isDeletable();
} | 1 |
1bf956aff24f820f66c5d58855eff3c2 | 6772ad8b3ed6bda5165eaae93b1884b0 | Get Location time/date, latitude, longitude, altitude, accuracy and provider as strings
Will provide information in the following order:
Date (UTC), Date (human-readable), provider, latitude (degrees), longitude (degrees),
altitude (meters), accuracy (meters), description
Items are separated using ITEM_SEP which has be... | StringBuffer locString = new StringBuffer();
locString.append( location.getLatitude()).append( "," );
locString.append( location.getLongitude()).append( "," );
locString.append( location.getProvider()).append( "," );
locString.append( location.getTime()).append( "," );
lo... | 0 |
1a846dd3830888dcdc1dc62ce2ae45f0 | 1c8e9fbe5580a181ef38697d114703b3 | Check only hh:mm:ss | public class Regex
public static boolean checkTime(String time) {
return time.matches("[0-2]\\d:[0-5]\\d:[0-5]\\d");
} | 1 |
a8d22c2d99699afbdacc120a1dec630d | 994e711ed238276ee13f6a50b60de52f | Returns a score from 0-10 based on the aspect ratio of the bounding box
Optimally a bounding box would have a 1:2 aspect ratio | class StopSignDetector():
def aspectratio(self,cnt):
x,y,w,h = cv2.boundingRect(cnt)
return float(w)/h | 0 |
eabfb327f4e2937ea0cb85bf412890bb | 25ce24a6e52e32b434def06ffff1c69d | Creates clones of the given network.
The clones share all weights and gradWeights with the original network.
Accumulating of the gradients sums the gradients properly.
The clone also allows parameters for which gradients are never computed
to be shared. Such parameters must be returns by the parametersNoGrad
method, wh... | layers, max_col_norm=None,
loss_based_pooling=False,
pooling_loss=None,
learning_rate=0.01,
momentum=None,
rmsprop=True,
adadelta=False,
center_grads=False,
rho=0.96,
epsilon=1e-8,
use_nes... | 0 |
e32aaa0b20cc458a7ff2b2657c3df976 | c423594c12174e4ccdb5c6dbb23a816c | delete either message or folder, based on where we are | Message::~Message()
{
this->remove_from_folders();
} | 0 |
bdecf3c3120d44c5fc33b87e11453cf8 | 694653b8fd3b6507887e4310616260a9 | The ZeroMQ context object. | super().__init__()
socket_type = zmq.PAIR
self._zmq_context = SerializingContext()
self._zmq_socket = self._zmq_context.socket(socket_type) | 1 |
95c21112f931a9683fcb528ab3d281e4 | 799dac60312431c05af2094a023aa31a | 商机转移 | $map['source_id'] = empty(I('promote_id')) ? ['neq','0'] : I('promote_id');
$map['type'] = 2;
$map['promote_id'] = PID;
$end_time = strtotime(I('timeend'));
$start_time = strtotime(I('timestart'));
if(!empty($end_time) && !empty($start_time)){
$map['create_tim... | 1 |
9da6857e0a5f31febcdb5a316ea26743 | f034394735764fc35199008b1a51f5bd | y=ax+b에 a와 b 값을 대입하여 결과를 출력하는 함수 | plt.scatter(xValue, yValue)
x_line = np.linspace(xValue.min(), xValue.max(), 100)
global y_pred
y_pred = b[0] * np.square(x_line) + b[1] * x_line + b[2]
plt.plot(x_line, y_pred, color = "r")
y_pred = b[0] * np.square(xValue) + b[1] * xValue + b[2]
plt.xlabel('x')
plt.ylabel('y')
... | 0 |
f29ab6b65b44cdd26468752e8f1857b1 | db2f09c697476d5e56f085e9363c3780 | Map hash type to salt prefix. | def hash_type(hashval):
return _HASH_TYPE_MAP.get(len(hashval), None) | 0 |
b22f0e2514f137f9ca47e2206ed27e1a | 65e7cacb0b867f2626bdbd96d69aad0b | a.k.a. Grouping | class Chart(object):
def group(self):
self.layout['barmode'] = 'group'
return self | 1 |
aad44739370078fb2d04a710d2d1d7f8 | 114f207e40c50bf2bd45386c6f5f09bb | Gets an HTML string containing a nice representation of the rider's destination list. | {
return this.DestinationFrom + " - " + this.DestinationTo;
} | 0 |
cd380fb6c5cef924a27af62899885bf8 | 1fb5104a30d28eecf860a3bbcb8e11e7 | centering absolutely positioned element horizontally | function centerElemV(elem) {
var elemH = $(elem).height();
$(elem).css('margin-top', (winH-elemH)/2);
} | 0 |
d387da0acfb30a7f3ca0f17b53520b59 | bbd83ce2f5b4ceca2d1ce5e72586e4c5 | Compare function to sort in descending order by bandwidth. | public class FlowBeanSorted implements WritableComparable<FlowBeanSorted>
@Override
public int compareTo(FlowBeanSorted o) {
if (this.sumFlow > o.getSumFlow())
return -1;
else if (this.sumFlow < o.getSumFlow())
return 1;
else
return 0;
} | 0 |
aba627c68d56ff24239f2599ed196249 | 452afc05d44ac53cd8476fa630549c79 | Sets +value+ as a revision property named +name+ for +uri+ at +rev+.
Both URLs and paths are avaiable as +uri+. | class Context
def revprop_del(name, uri, rev, force=false)
Client.revprop_set(name, nil, uri, rev, force, self)
end | 0 |
15264ed1f791b09d3b0aa315f5527a4d | b4e90f6e170398d5846389e08345ca8d | 生成baidu渠道配置参数信息 | $label = '';
if (stristr ( $this->getInput('adsList'), 'BaiduChannel' )) {
$label = 'BaiduChannel';
} elseif (stristr ( $this->getInput('adsList'), 'JinliChannel' )) {
$label = 'JinliChannel';
} elseif (stristr ( $this->getInput('adsList'), 'MeizuChannel' )) {
$label = 'MeizuChannel';
}
if (! $labe... | 1 |
5eb063203a871b33803cd0ec5866f38d | cce81ac479b0954132a0c88a9e0c3e4c | Чтение регистра из стандартной области памяти приёмопередатчика | unsigned int Read_Register_BIP8(unsigned int reg_addr)
{
CL331H_I2C_Init();
unsigned char BIP8 = 0;
TxAddr[0] = reg_addr >> 8;
TxAddr[1] = reg_addr & 0xFF;
UCB0CTLW1 = UCASTP_1;
UCB0TBCNT = 0x0002;
UCB0CTL1 &= ~UCSWRST;
UCB0CTL1 |= UCTXSTT + UCTR;
while(!(UCB0IFG & UCTXIFG0));
UCB0TXBUF = TxAddr[0];
... | 1 |
b9759c3d385dbb85ca29fd761ff113f8 | 7a9e13c9c17c3f8f0a284a399fa7c521 | Download and return parsed metadata | print('Downloading {}...'.format(url))
sys.stdout.flush()
contents = dl_file(url)
print('Parsing XML...')
sys.stdout.flush()
root = etree.fromstring(contents)
return get_xml_data({}, root, root.tag) | 1 |
832bb764cbd932eb428d8bdceac560b1 | 29dbfee510ce9ebb3c1d108d0b9d2de9 | Indicate if events are being pumped (by a call to runEventPump). | u8
mac_event_pending(void)
{
return (event_queue.head != event_queue.tail);
} | 0 |
8f02a6035f67dfbf0010d13342a056b2 | 77e2698d9f07c9b384dc728411d138d0 | <summary>Returns the DOM node that represents the background layer.</summary> | public Node backgroundLayer(); | 1 |
9a3ca4d7be1ac12bd0a7ecffd50603f8 | d9aeb32ad7f3265f87811e4b0674ea35 | Главная страница доступна любому пользователю | namespace ApplicationSite.Controllers
public class HomeController : Controller
[AllowAnonymous]
public ActionResult Index()
{
return View();
} | 1 |
d7cbe9eff0da4a24d1cccb3fa5cb6af8 | d7c483049f6c27504fd33fab4bec9009 | It runs the search from node s to node t. | bool visited[V];
memset(visited, 0, sizeof(visited));
queue <int> q;
q.push(s);
visited[s] = true;
parent[s] = -1;
while (!q.empty())
{
int u = q.front();
q.pop();
for (int v=0; v<V; v++)
{
if (visited[v]==false && rGraph[u][v] > 0)
... | 1 |
db49985f3c80c3885de0297f2ff4b132 | c9145ccdb69c3a5257a015971b8ca043 | Verifica si hay incapacidades | class CtrlConsultarOrdenes extends Controller{
function consultarIncapacidad(){
$queryconsultarIncapacidad=$this->mdlOrdenes->consultarIncapacidad(base64_decode($_POST["idAtencion"]));
echo json_encode($queryconsultarIncapacidad);
} | 1 |
0fd33c465f7f38a456454c5587dd365f | 516ef8daaeed3b2e544a61a8636d7353 | Prints on the screen the style for writing on this window,
foreground colour, background colour, and font style. | public void printFormatted(); | 0 |
8f9d6b02eabdea8a687c4c508050f638 | c42e699f9179a8a3ac077ed11372a75c | Executes a login operation with the specified username and password. You usually want to invoke
this inside of an api_server() context. | def login_server(server, username, password):
server.login(username, password)
return server | 1 |
3b99c87f50f9601a0238f70f52cf9bbc | 92ee4d145ac3df4bd3efcf14b1d24fc4 | Create an expression node for a 64-bit integer constant | def p_exp_iconst(p):
p[0] = ConstantNode(p[1]) | 0 |
68d37d95342ed55e8a0052a1b7978a6d | d3835cb7ccdb18555c31c6368537db4a | This function renders all the assets currently have, and categorized by
asset type. | {
$assets = Asset::all();
$content = $this->buildView($assets);
return response()->json(['content' => $content], 200);
} | 0 |
1834c8158a2a78b5d2ad650608a0197c | 6362b5f5e93adaa83693277aa375df20 | Compte le nombre d'individus par espèce dans une grille simplifiée (celle qui est sauvegardée puis analysée après simulation) | int s=0;
int l=0;
for(int i=0;i<height_;++i){
for(int j=0;j<width_;++j){
if (grille_[i][j].p_bact() != nullptr){
if (grille_[i][j].p_bact()->type()=='S'){
s+=1;
}
else if (grille_[i][j].p_bact()->type()=='L'){
l+=1;
}
}
}
}
if(s==0){
... | 1 |
a4c81906b06058abf316fcc66c5a1b64 | c55f65ec18926e0a4ebbeb891706d780 | Refreshes the selection of site | public partial class CMSModules_SmartSearch_SearchIndex_Sites : GlobalAdminPage, IPostBackEventHandler
protected void usSites_OnSelectionChanged(object sender, EventArgs e)
{
SaveIndexes();
} | 0 |
f7b8480b0119d38a93ac7be59d3d83d5 | 0cc4bb485dae221f9efcbdbc72f07fad | 获取省份下的城市数量 | {
if (provinceId < 1)
{
return Json(new { Status = false, Msg = "不明白查找哪个省份" }, JsonRequestBehavior.AllowGet);
}
var manager = new PeccancyQueryConfigManager();
var count = manager.GetPeccancyCityConfigCountByPrvinceId(provinceId);
... | 1 |
e5eb4c2c1f48917daac11207c11bcc83 | 0b159a284eb1d2c27041c80e13e5361a | Get collection of Group instances sorted by their weight | public class Application
public LinkedHashSet<StudyGroup> getSortedCollection() {
return collection.stream().sorted(Comparator.comparing(StudyGroup::getName)).collect(Collectors.toCollection(LinkedHashSet::new));
} | 0 |
b1d16277673b26bcb30190c069f9a763 | 0752d95bfbf162187fd2545fce69c538 | By default those errors contain an `X-Cascade` header set to `pass`,
which allows nesting and stacking of routes
(see Grape::Router for more
information). To prevent # this behavior, and not add the `X-Cascade`
header, one can set the `:cascade` option to `false`. | options[:methods] = SERIALIZE_METHOD_DEFAULTS unless options.has_key?(:methods)
options[:except] = SERIALIZE_EXCLUDE_DEFAULTS unless options.has_key?(:except)
super(options)
end | 0 |
bef2681b01e89ee151f4a81b23faaedc | 380f973f07e721c51a62e2cba6a47807 | Mixin to set both access and refresh token to cookie securly.
アクセス・リフレッシュトークン共にクッキーに安全に保存します | function setOauthTokenCookie(oAuth2AccessToken) {
setCookie("login_time", new Date().getTime(), 180);
setCookie("access_token", oAuth2AccessToken.access_token, 180);
setCookie("token_type", oAuth2AccessToken.token_type, 180);
setCookie("refresh_token", oAuth2AccessToken.refresh_token, 180);
setCooki... | 1 |
710b003fd71f30c8468b8a96d642af0c | f688688b3f82042b525109a9195608b6 | 根据用户名和日期查找日记 | public ApiResult readRecord(TextRecordDto textRecordDto, String token) throws Exception {
List<TextRecordEntity> recordEntities = textRecordManager.selectTextByDayUsrCharList(textRecordDto);
if(recordEntities==null){
throw new Exception("查询数据库失败");
}else if(recordEntities.isEmpty... | 1 |
36110cc563a67796af2dcd56cd344e46 | e95a87616e46e3371eac1ff2bb99c6fc | 使用HttpClient将字符数据post到url上 | public class HttpClientUtil
public static String sendPost(String url) {
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httppost = new HttpPost(url);
CloseableHttpResponse response = null;
try {
response = httpclient.execute(httppost);
} catch (... | 0 |
1c22f22594de9abd55e96447588f7381 | 16566e692e5f0a7278cd710977b02d6f | Jump back a character. | void backchar()
{
currentline--;
} | 0 |
d09e3bf9a3fbbadb46087aa9bd5bdb99 | 129acde3bf020abdf8d01e5daf3a1f65 | Before we do anything complicated, check whether we even need to update our position to start with. | void VEBasicCamera::Update()
{
if( myPositionDirty )
{
UpdatePosition();
}
else if( myRotationDirty )
{
UpdateRotation();
}
} | 1 |
1d4d2680da81ce18dd20c1923079ec0b | e89b8b094150ce2d5b4810b643c52f95 | Play the animation while we're waiting. | class PlayerRig(types.BL_ArmatureObject):
def playWait(self):
self.keepLayer1()
self.playAction(
'link_idle1', 1, 59,
1, 1,
5, LOOP) | 1 |
f9663f5cd84fcdcabd1bbe83b1d6453e | 58807c61462aa527be4ed55dd030d9b2 | Creates augmented Sigma points for the predicion steps | void UKF::PredictSigmaPoints(const MatrixXd Xsig_aug, const double delta_t) {
for (int i = 0; i < Xsig_aug.cols(); i++) {
double p_x = Xsig_aug(0,i);
double p_y = Xsig_aug(1,i);
double v = Xsig_aug(2,i);
double yaw = Xsig_aug(3,i);
double yawd = Xsig_aug(4,i);
double nu_a = Xsig_aug(5,i);
... | 0 |
46e1f95c82c78ab7832ff8e7ea0becb9 | e106a2b93f79a440575135e51582d223 | Crea una instancia de linea de factura | this.esNuevaLinea = true;
this.lineaActual = new LineaDeFactura();
this.lineaActual.setFactura(facturaActual);
this.datosFacturacion = cargarDatosFacturacion();
this.tipoIVA = datosFacturacion.getTipoIVAPorDefecto();
this.lineaActual.setTipoIva(tipoIVA);
this.line... | 1 |
c7fe5cf5f04977d463e4985f9a918180 | 05c6bae6b6bd470a12716d7550fef08c | functia afla lungimea unei liste dublu inlantuite 0.5p | Graph aux = g;
int count = 0;
while (!isEmpty(aux)) {
halfEdgeVertex* auxArc = aux->adjList;
while (!isEmptyArc(auxArc)) {
++count;
auxArc = auxArc->next;
}
aux = aux->next;
}
return count/2;
} | 0 |
ce6b1b21c1cd82e0830217a77a8498f2 | cc45beff25a65b94191deaf2e70dd6ec | 功能说明:
函数delTimer用于移除一个注册的定时器,移除后的定时器不再执行。只执行1次的定时器在执行回调后自动移除,不必要使用delTimer移除。如果delTimer函数使用一个无效的id(例如已经移除),将会产生错误。
到KBEngine.addTimer参考定时器的一个使用例子。
参数: | {
__SOFTTimerOBJ *head = __stimerobj_head;
__SOFTTimerOBJ *pre = __stimerobj_head;
if (__stimerobj_head == NULL) {
return -1;
} else if (__stimerobj_head->ID == pobj->ID) {
__stimerobj_head = __stimerobj_head->next;
return 0;
} else {
pre = head;
head = head->next;
}
while (head != NULL)
{
if (hea... | 1 |
2d1612e39164ae08d34f75d924f60b54 | ff5bd4f017d6b8f15d69a4031f6fdb1c | Returns true if all the transaction's signatures exists. This method does not verify
the signatures. | {
for(const CMNengineEntry& v : entries)
{
for(const CTxDSIn& s : v.sev)
{
if(!s.fHasSig)
{
return false;
}
}
}
return true;
} | 1 |
2f01cd3744ac490f2eb9e9b858d38653 | 8c894eae79bd1b3f8186266128924832 | List of backup path. e.g. `["/home", "/var"]`. | public class CreateClusterBackupStrategyBody
public String getBasePath() {
return basePath;
} | 0 |
d879d5fcca24c5615f1c3966b8f21ec5 | 3a70e4bb4e527ef6fb1a75cacd616abd | 从QUESTION对象中提取USER放到User仓储中 | if (us == null || us.isEmpty()){
return new SmartList<>();
}
Set<String> ids = us.stream().map(it->it.getId()).collect(Collectors.toSet());
MultipleAccessKey key = new MultipleAccessKey();
key.put(FaultAnswer.QUESTION_PROPERTY, ids.toArray(new String[ids.size()]));
SmartList<FaultAnswer> loadedObjs = use... | 0 |
2e19fde13deac41186db89c7faeee65c | c995824599069e5406e755449a74ddae | Test whether two strings are identical after trimming, lowercasing. | def _trim(s):
return re.sub("\\s+", " ", s.strip())
return case.assertEqual(_trim(first), _trim(second), msg) | 0 |
1df8b056b7b35cd9582d73ad59806fab | 697da01e619cd9921f70cd92483ff4b9 | 读取jpg数据解析放进rgb结构体里面 | unsigned char* ReadJpeg(const char* path, int* width, int* height) {
FILE *file = fopen(path, "rb");
if (file == NULL) {
return NULL;
}
struct jpeg_decompress_struct info;
struct my_error_mgr my_err;
info.err = jpeg_std_error(&my_err.pub);
my_err.pub.error_exit = my_error_exit;
if (setjmp(my_err.setjmp_buffer... | 0 |
93859ce7f0eaa673ec0a7d0eec7e8b76 | c944fa68ff16b8dca8ea1864f1d601ec | Locks the door | def lock_door():
GPIO.output(DOORPIN, GPIO.DOWN) | 1 |
36f303a953412c48222f9770107fac65 | f481c11503ee665f810414268e997677 | Resets a behaviour to its initial state. | namespace Zelda.Entities.Behaviours
void Reset(); | 1 |
fcbb01cbd49ea48555dc80b25925a383 | d582c67431b2397a4bfa3374de6882a5 | 获取某状态的所有ECS实例集合 | class ECSHandler(object):
def get_instances(self, page=1, page_size=10):
request = DescribeInstancesRequest.DescribeInstancesRequest()
request.set_accept_format("json")
request.set_PageSize(page_size)
request.set_PageNumber(page)
try:
response_string = self.clt.do_act... | 0 |
5d53c28a483dbe8691037b45cb00063f | 5c318f7992475eae7cb826f2f37cacae | 是否显示输入验证码的付款界面 | public class Order extends DynamicField implements java.io.Serializable,PayEnable
@NotDbField
public boolean getIsCod(){
if("cod".equals(this.getPayment_type())){
return true;
}
return false;
} | 0 |
54f26b72a08c25d82ba465730fa0a27c | 116918b48353f63fa69b4beab06ecea8 | 打印日期: yyyy-MM-dd HH:mm:ss | public void formatDateTime() {
DateTime dt = new DateTime(2017, 12, 27, 14, 0, 8, 333);
logger.info(dt.toString("yyyyMMdd HH:mm:ss"));
logger.info(dt.toString("yyyy-MM-dd HH:mm:ss EE"));
} | 1 |
d52fe6759712c1689c6259e00ae272b0 | d04467095ec6de13f359850e3cbddaff | <pre>
Process a workload SSO AuthNRequest. If the user is already authenticated
an appropriate authn response will be generated to the workload SSO. If not,
an appropriate authn request will be generated to either cloudera-sso or
to one of the customer defined identity providers.
</pre> | @Nonnull final AuthenticationContext authenticationContext) {
final RequestedAuthnContext requestedCtx = authnRequest.getRequestedAuthnContext();
if (requestedCtx == null) {
log.debug("{} AuthnRequest did not contain a RequestedAuthnContext, nothing to do", getLogPrefix());
... | 0 |
ff033e226690aaf3d9b4eb4e9ad1344e | baec4a5f0e85090afb3b4ac982952ff0 | Функция определяет находся ли одна точка севернее другой | {
return (line.a * p1.x + line.b * p1.y + line.c) *
(line.a * p2.x + line.b * p2.y + line.c) >
0;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.