query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
deb0840bff8a37afbd9f71e0fcd834b5 | 171b9992380552109a10f55f162e89be | TOGGLE (SHOW OR HIDE) NOTIFICATION WINDOW. | this.setState({
isNotificationDropdownOpen: !this.state.isNotificationDropdownOpen
}, () => {
if (this.state.isNotificationDropdownOpen) {
this.setState({
isNewNotification: false
});
}
});
} | 1 |
2c682c8af82ae1659373d0a8255a2cf6 | fa084ab4359884064a395a55ede385c9 | Updates properties of a component on a digital twin synchronously. | return updateDigitalTwinWithServiceResponseAsync(id, digitalTwinPatch).map(new Func1<ServiceResponseWithHeaders<Void, DigitalTwinUpdateDigitalTwinHeaders>, Void>() {
@Override
public Void call(ServiceResponseWithHeaders<Void, DigitalTwinUpdateDigitalTwinHeaders> response) {
... | 0 |
095e64dee1aeaa17c467068416f78b27 | 58eaf16b50f5208336324e447c8149c9 | Handles the register event. | function handleRegister(e) {
if (inProgress) {
return;
}
if (isIndividual) {
if (!isRegistered) {
app.modal.show('#single-create-modal');
}
} else {
if (isRegistered) {
unregisterTeam();
} else {... | 1 |
b615de631b02f8acf7bceeafd7d6bf9c | 43735eb73d1ba5e392f1dbbf55087ae8 | Duplicate posts in all languages if the translation does not exist | foreach ($source->getTranslationLanguages() as $langcode => $language) {
if ($source->hasTranslation($langcode)) {
parent::index($source->getTranslation($langcode));
}
}
} | 0 |
8c235ad4be43a9cec2bf08b996dc5fec | 21be3941579b8a5b3c53a3ebcf5f68e6 | устанавливает массив препятствий с заданными координатами и просчитывает освещение | {
xOffset = xOff;
zOffset = zOff;
grid = new custom_grid();
grid.cellSize = cellSize;
int[,] obstacle_grid = new int[row_size, col_size];
for (int col = 0; col < col_size; col++)
{
for (int row = 0; row < row_size; row++)
{
... | 0 |
a9accdbc713f3232a0ef1245d06af48e | 508e05e2c2f05fc2f524bed488444e97 | Return the MPI rank of the current node. (not used for SpiNNaker,\
always returns 0 - as this is the minimum rank suggesting the front\
node) | def ompi_local_rank():
return int(os.environ.get('OMPI_COMM_WORLD_LOCAL_RANK') or 0) | 0 |
40e651c375be42fd636b435bdca3c383 | c3e6ced808a4998b268eba9b109a5bee | 버튼을 통한 데이터베이스 초기화 | public class MainActivity extends AppCompatActivity
void onClickReset(View view) {
sqLiteDatabase = db.getWritableDatabase() ;
db.onUpgrade(sqLiteDatabase,1,2);
db.close();
} | 1 |
b26772745f98c60186556b92ea767a27 | b8ab9c00968202b0295fb6d7771d163a | ファイルのクラスを返す | {
$path = realpath($path);
$this->files->requireOnce($path);
foreach (get_declared_classes() as $class) {
$reflection = new ReflectionClass($class);
if ($reflection->getFileName() === $path) {
return $class;
}
}
throw new Ex... | 1 |
97bc32dab2398fd88acd6528e4c02cd9 | a8ba9839c4bb8eda94b7771925b949fb | The name of the task this Studenttask is a member of. | public class Subtask extends BitmovinResponse
public String getName() {
return name;
} | 0 |
3a075fcddfa521fdab056da10a34b907 | afe7d260d55508d7b34bb9f9ed61034c | Converte o nome da loja em uma cor | {
$coul = strtolower($coul);
if($coul == "#000000")
return "black";
if($coul == "#ff0000")
return "red";
if($coul == "#0000ff")
return "blue";
if($coul == "#bf8040")
return "brown";
if($coul == "#00b9f2")
return "cyan";
if($coul == "#404040")
return "darkgray";
if($coul == "#808080")
return "gray"... | 0 |
3839c233deb1801d3097c768ffe813c3 | 785352e50eb27117853acb7b533d7606 | Callable that takes an input tensor and returns the model logits for use with
cleverhans implementation of the Fast Gradient Method. | outputs = self._pretrained_model(inputs, False)
logits, layer_representations = outputs['logits'], outputs['layer_representations']
nth_layer = layer_representations[:, self._layer_num - 1, :]
logits = self.linear_layer(nth_layer)
return {"logits": logits} | 1 |
1b06c78b4b2c0ac9e730c37b5ea31cdf | 4ed3296ecd9209ee55ce28c4f323dc72 | Zda je Flow v postpone módu (mód odložené akce, nutno proti zacyklení) | {
return Helpers.GetSettings().FlowType == (int)FlowType.All || (!taskInstance.UserGroup.IsMember(instance.AuthorUserId) && !taskInstance.UserGroup.IsMember(Helpers.GetCurrentUser().Id));
} | 0 |
74445ff8155f279015b5cc60e359fad8 | db9a52d5f512157e5e60f6498c92ad40 | Open City weather fragment | class CityWeatherFragment : BaseRetrofitFragment()
private fun getCityWeather() {
mCompositeDisposable.add(
CityWeatherClient().getCityWeather(
mArgs.cityId,
{ cityWeather ->
mForecastViewModel.mForecastListLiveData.postValue(cityWeather.forecasts)... | 0 |
6e310258083de2ecf130222a43f7ffba | af6329e8b9c8c9f258df978e0815551b | Visualización de autocorrelación para estacionariedad del Indicador post-dif | def autocorrelation_graph(X):
plt.figure(figsize=(10, 5))
autocorrelation_plot(X)
plt.show() | 1 |
7655b6d196702d00ae3173c693c88887 | 1b59d4a5edb6b4b89e178780e08a0446 | Declares readable date attributes | class Buy extends Model
public function getReadableDateAttribute()
{
return is_null($this->date)? null : Carbon::parse($this->date)->format('d/m/Y | H:i');
} | 1 |
ff26b34fa85defea4c349e9971dd4a29 | 1aafc4f4820bfa6ffa3b6f273cfa8624 | Gets (as xml) the "language_code" element | {
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlString target = null;
target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(LANGUAGE$4);
return target;
}
} | 0 |
1bfefe975b50c9558f8bfc8211f5ccb7 | 5ded1b4332fbc0a0ca9e3ced554bd473 | Lists all VeiculosServico models. | class ServicioController extends Controller
public function actionIndex()
{
$searchModel = new ServicioSearch;
$dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());
return $this->render('index', [
'dataProvider' => $dataProvider,
'searchModel' =>... | 0 |
3c849107cda1cfc2e1435f25f5b72d97 | caf7a14edcd0c353bc7cf6485f2e353c | Check if there is any user agreement | if (user.getProfileDTO() == null) user.setProfileDTO(new ProfileDTO());
if (user.getProfileDTO().isIs_agreement()) {
return true;
} else {
leaveActivityForResult(ChooseLoginActivity.this, TermPolicyActivity.class.toString(), false, false, null, null, REQUEST_CODE);
... | 1 |
959ef5f96d22d52f81f311976b82e8ad | cd5c0d79de78bcbadf8cedcccc128147 | Finish writing a struct. | impl<'a> ser::SerializeSeq for &'a mut FixSerializer
fn end(self) -> Result<(), Self::Error> {
Ok(())
} | 0 |
78b03875bd3e5d79c9f9df5bad9b1472 | 60cfbc9ecd192f5ab02f8a82f18232fc | Removes a piece from the board and returns it | ChessPiece save = pieces[row][col];
pieces[row][col] = null;
Runnable removePiece = new Runnable() {
public void run() {
boardDisplay.displayEmptySquare(squares[row][col], row, col);
}
};
if (SwingUtilities.isEventDispatchThread())
removePiece.run();
else ... | 1 |
9fe3199df6d3b303d8df5caeca3ddeeb | 7a38bea2a11f691eb58caa2e0d34d119 | Método que comprueba si el usuario está apuntado al evento. | class EventServices
public function validateEnrolled($idEvent,$idUser){
$em = $this->controller->getDoctrine()->getManager();
$qb = $em->createQueryBuilder();
try {
$qb->select("en")
->add('from', 'ObjectBundle:Enrolled en')
->innerJoin('en.event','e')
->innerJoin('en.user','u')
->where('e.id = :id... | 1 |
d556e82e5bd9e0e0ed38633b4a9e817c | 3de522fb22d5988669e3e1f7d5340658 | Get a suggested base name for resources related to a given site name | if (bel.getCategory() == SITE_PORT)
return str(site.getName());
auto site_name = str(site.getName());
auto bel_name = str(bel.getName());
return site_name == bel_name ? bel_name + bel_dedup_suffix_ : bel_name;
} | 1 |
a0aa9190137b3da8b11fa97099a475e4 | b10c63922bebe87a3b1cf0a2fb776acf | Rule #106 Uninsured/Underinsured motorist property damage coverage is only available with uninsured motorist bodily injury coverage. | var biCoverage = _.findWhere(lineCoverages, {Code: 'EISPABodilyInjuryCov'});
var umbiCoverage = _.findWhere(lineCoverages, {Code: 'PAUMBICov'});
return{
errorElement: 'PAUMBICov',
errorIdentifier: 'Rule104',
isValid: biCoverage.Value == umbiCoverage.Value
};
} | 0 |
898111f28d19bdd1a06463a1489f952a | 9a76504db2bc5c92f7c67b91df2f8000 | Obtains domain identifier of Ip Device. | public class DeviceInfo
public String getDid() { return this.did; } | 0 |
3d2e098eeacd9eca24fdfdaae4020375 | 9c18aab62ae54e519721778c48947a4c | Called method when the user clicks on the submit button.
At first, all checkboxes are inspected, if they are checked or not. Then the rules will be merged in the database.
They can be merged directly. It is imopossible to add new rules directly in the table. Therefore they must already
be persisted. | {
RulesManager.ExecuteRule(this, "ValidationRules");
if (_isValid)
{
_curtailmentWaiverFeeTier.ToAmount = Convert.ToDecimal(_currencyEditTo.EditValue);
_curtailmentWaiverFeeTier.FromAmount = Convert.ToDecimal(_currencyEditFrom.EditValue);
... | 0 |
09f7785d73f33fff19b83c99ea77df33 | d1a67d2a580aac3f767a815b05b5174d | Zapisuje dane do formatu XML | $xmlhandler = new XMLHandler($this->db, $this->lh);
$dom = $xmlhandler->serializeDocument($document);
$dom->formatOutput = true;
fwrite($handle, $dom->saveXML());
} | 1 |
1db98f18acd4e4986f0554fe610b8b97 | 3eee64c0839a40d2b19892187617ffee | Annotates each frame with 68 facial landmarks | def facemark(gray_img, model):
faces_roi = face_position(gray_img)
landmarks = []
for face in faces_roi:
detector = dlib.get_frontal_face_detector()
rects = detector(gray_img, 1)
landmarks = []
for rect in rects:
landmarks.append(
np.array([[p.x, p... | 1 |
5d07e207db77167280785757aa58a3c7 | 1c45ac85c990e1bdb2451fa59e80e98d | take the genotype from a broad call and convert into an int | int coding = na_value;
if (genotype == 0) {
coding = 2;
} else if (genotype == 3) {
coding = 0;
} else if (genotype == 2) {
coding = 1;
}
return coding;
} | 1 |
480a3d9ed734ea9d5abf524bf4774409 | 551dbb457b492958dacdd37e6046699a | Run raytracer with camera control and no limits on number of frames rendered before quitting. | public class RayCaster
public static void main(String[] args) {
RayTracerViewer.show(getIRayTracerProducer(),
new Point3D(10,0,0),
new Point3D(0,0,0),
new Point3D(0,0,10),
20, 20);
} | 0 |
4971680da16b481f1ed2a36b2b1ccd64 | 9c823d2b57a95598d32cbf5eebde352a | Denne returnerer riktig referanse til lista i Firebase ut i fra verdien til isOnShoppingList
Vi slipper if tester i koden om vi bruker denne | namespace KitchenAid.App.ViewModels
public class ShoppingListViewModel : Observable
public Storage GetShoppingList() => ShoppingLists[0]; | 0 |
a587dcc92646da68e0d87d903b2eb2ad | a125bb7bfc4ac6b2b82d15ba2838eb12 | Check the results from an expected empty result. | testcase = test_utils.create_generic_testcase()
testcase.delete_metadata('predator_result')
actual = cleanup._get_predator_result_item(
testcase, 'suspected_components', default=[])
self.assertListEqual(actual, []) | 1 |
32e36ff22c9d4dffbbc7e2246bd5edb4 | 9f340011f404faf9a4fcc574e972c18c | Gets the minimum time between two requests for caches. | public class ClientConfiguration extends HttpClientConfiguration
public long getCacheManagerTti() {
return cacheManagerTti;
} | 1 |
1576a0a32a5a54c65498cb71097b3926 | 6420b836348ad451ddb1f7416a0f132a | 绘制中间大球 | function drawpoint() {
var num_w=can.width*0.12;
var num_h=num_w/7*10;
var the_radius=Math.min(num_w/7,num_h/10);
var x1=(0.065+0.25+0.05/2)*can.width;
var y1=0.05*can.height+0.3*num_h;
var x2=(0.065+0.25*2+0.05+0.05/2+0.01)*can.width;
var y2=0.05*can.height+0.7*num_h;
var ball1=new ballObj(x1,y1,the_radius,0,0... | 0 |
6c8c3ff3cbe2c2bd836c04680b1a83b0 | 8b25f9676f77db1501cec4de01d69886 | POST: Presences/Ajt | {
try
{
ViewData["PresentId"] = new SelectList(_context.Presents, "Id", "Id");
return View();
}
catch (Exception e)
{
_historyService.LogError(e, HistoryErrorType.UI);
this.AddNotification... | 0 |
b8c4dbb7501492333fe64e15e15499f2 | c6e89c50338e178a19a524b10330e192 | Returns the geographical markup language representation of the geography input. | @EqualsAndHashCode(of = "name", callSuper = true)
@Slf4j
public class RegionModelImpl extends AbstractViewModel implements RegionModel
@Override
public String getXpmMarkup(Localization localization) {
XpmRegionConfig xpmRegionConfig = getXpmRegionConfig();
XpmRegion xpmRegion;
if (this.schem... | 1 |
8688ccc83e59cf6dbf2bb27ba42ff8c5 | 4af2333ff4c9b63dd213c9e777d5810c | 创建SqlConnection连接对象,需要打开 | {
SqlConnectionStringBuilder sqlConnectionStringBuilder = new SqlConnectionStringBuilder
{
DataSource = "DESKTOP-NFO6L7O",
InitialCatalog = "WebApplication",
UserID = "sa",
Password = "cqz1125",
};
Sq... | 1 |
71bce6bcf7f4dc81870d60f0e0248786 | 57294b2a7b128122fe34302745274a04 | help -> about | class Control :
def _about(self) :
showinfo("GrowCut", "Created by Vincent Jeanselme\nvincent.jeanselme@gmail.com") | 1 |
1339796cc46d0a28f0de8930a66857d6 | 14a1e29679312dd7056e9cecc32265b1 | @brief Register TT Global Time FDCAN Callback
To be used instead of the weak HAL_FDCAN_TT_GlobalTimeCallback() predefined callback | {
HAL_StatusTypeDef status = HAL_OK;
if (pCallback == NULL)
{
hfdcan->ErrorCode |= HAL_FDCAN_ERROR_INVALID_CALLBACK;
return HAL_ERROR;
}
if (hfdcan->State == HAL_FDCAN_STATE_READY)
{
hfdcan->TT_ScheduleSyncCallback = pCallback;
}
else
{
hfdcan->ErrorCode |= HAL_FDCAN_ERROR_INVALID_CALL... | 1 |
266674159def1b60f09e750f6866782f | 8c240055b589dc3e952e229dc4ecb8da | 隐藏联盟选择框 | function hide()
{
$('#choose-box-wrapper').css("display","none");
} | 1 |
eb69fb0747d6bdc54ca5e43dcd93bd74 | 7862d20b5321bbc86748fce681651647 | A helper recursive method that figures out the number of possible solutions | def solve(n):
if n == 0:
return 1
total = 0
if n >= 1:
total += solve(n-1)
if n >= 2:
total += solve(n-2)
return total | 1 |
51425a51f26c5b962043c3bd37c6eb57 | 43c59abf7a8f5e8ed9549e5ec0c5781d | Perform a 2D real inverse FFT.
The first three arguments are as per :func:`numpy.fft.irfft2`;
the rest of the arguments are documented
in the :ref:`additional arguments docs<interfaces_additional_args>`. | def irfft2(input, s=None, dim=(-2, -1), norm=None) -> Tensor:
return flow._C.irfft2(input, s, dim, norm) | 1 |
205d717d5fcc77df40643398c6c16d53 | af8f618e0c76c2b6ec1de41b41dcb4b3 | Проверяет существует ли уже таблица с сообщениями | class DatabaseMessagesTestCase(unittest.TestCase):
def test_messages_table_populated(self):
print('(' + self.test_messages_table_populated.__name__ + ')',
self.test_messages_table_populated.__doc__)
test_table_populated(self, MESSAGES_TABLE, INITIAL_MESSAGES_COUNT) | 0 |
ea40f5a64f3554cb4bba8ec4c4e35215 | 5444a93b9f1e234974aa9cbe03d5b135 | 入群检测 | function isGroup(){
$('.friend-li .user-select').each(function(){
var that = $(this),html = '';
var id = $(this).find('.user-id').attr('data-id');
$.ajax({
url:'/groupchart/isinGroup',
type: 'POST',
d... | 1 |
1bfcfda205151738bd62c56165a8ddf8 | 877ccb57a3cb587c279cd02faf023d69 | Initializes the algorithm from public key. | {
this.m_GameKey = publicKey;
this.m_SecretKey = secretKey;
this.m_KeysInitialized = true;
} | 1 |
b3a14bbbd1aa50de5a484ee6b86d2c4d | e985c893b8c466bb51a3d4b050baed65 | 获取生意参谋流量汇总 | try:
page = request.args.get('page', type=int)
page_size = request.args.get('pageSize')
sorter = request.args.get('sorter')
product_sn = request.args.get('productSn')
category = request.args.get('category')
date_start = request.args.get('date_start', type=str)
... | 1 |
2bf1df93899721fc8b41943cbe5660b0 | 9fbe80c6e12692fe50980f886c0e781a | Set trigger mode (AUTO, NORMAL, SINGLE, STOP) | class E5052(GPIBObjectBaseClass):
def __SetTriggerMode__(self, mode):
self.instr.write(':TRIG:MODE %s' % mode)
time.sleep(self.__delay__) | 1 |
9a3ffc3e77d3d8ca2cfda86e2a5415c6 | b6f1bd15c6047c215780f40fce4545d8 | Method called to associate a TemplateAssetsCateg object to this object
through the TemplateAssetsCateg foreign key attribute. | {
if ($criteria === null) {
$criteria = new Criteria();
}
elseif ($criteria instanceof Criteria)
{
$criteria = clone $criteria;
}
$criteria->add(CategoryPeer::SF_ASSET_ID, $this->getId());
return CategoryPeer::doCount($criteria, $distinct, $con);
} | 0 |
7da4c3bd7f6318af2b4d8e42077be539 | 2201e75411e24a80440f2606469eea48 | 设置bean属性值 , 交给子类实现 | public abstract class BaseBeanReflector extends BaseReflector implements BeanReflector
protected abstract void setImpl(Object bean, String propertyName, Object value)
throws Exception; | 1 |
437a0c8677a77bbea41c79302e49786b | e5ac026d8e61d10a5ce1dcb66a2648f0 | 查询输入列表的词的相似度 | res = []
similarity = 1
for term in query_words:
vocab = term[0]
sum = term[1]
for item in vocab:
sigma = 0.00000000000000000000001
if(item[0] in distinct_sample):
index = distinct_sample.index(item[0])
sigma += (TF_sample[index... | 1 |
a53391bb2482316fbb8a92f1cd52e54a | 82e11997acaafdbfc53afa759a9c6f10 | Get degrees (multiple of 90) that output camera image is rotated from "up" relative to screen display | public class SharedCameraActivity extends AppCompatActivity implements GLSurfaceView.Renderer
public int getCameraSensorToDisplayRotation() {
int rotationDegrees = displayRotationHelper.getCameraSensorToDisplayRotation(cameraId);
return rotationDegrees;
} | 1 |
fd59ecf227e28af8b150dbe0b070e556 | 526838ed4c33a72e12743a14d8efc6a4 | 统计填写表格的所有学生(包括班级,人数等) | public List<Student> getAllReportStudent(); | 0 |
6c7dc946c64f9b7e79816d1818158a5b | 09c4905c091aaa50a34859a5b52b8e28 | Returns the price of the pizza in a string with 2 decimal format. | public class Pizza
public String getTotal(){
return "$" + Float.toString(Math.round((calculatePrice() + calculateTax())*100f)/100f);
} | 1 |
4dbb86c26a401abf9550776a787e48f1 | fcc9858c77e464a8201a9ecb7190038c | Refreshes the snapshot and the selected color. | namespace MO.Core.Forms.Controls
public partial class QColorPicker : QControl
public void RefreshColor(){
pnlColor.BackColor = _selectColor;
txtValue.Text = RColor.FormatHex(_selectColor.ToArgb());
} | 1 |
9d58149e63564b50cbd6878face73e83 | 3de079f98d42932d5bea0d0939c82d41 | @brief Check the coordinates of one either x or y from the button. This function
will convert the x or y coordinates from the bit shifted value to the integer
value to be processed by the simulator. | {
if(NumDev != 3)
{
if(Value != 7 && Value != 9)
return ((1 << Value) - 1);
else
return ((1 << (Value - 1)) - 1)|(1 << Value);
}else
{
if(Value != 6 && Value != 8)
return (((1 << Value) - 1) << 1);
else
return (((1 << (Value-1)) - 1) << 1)|(1 << (Value + 1));
}
} | 0 |
0e54d7c2ff01c1dcfdd31f89475f8361 | 8d0b191744a8797d6d9d4a6171dec5ee | 向上查询(轮询方法) | class VertwoController extends BaseController
public function PollingUpshotAction()
{
$driverId = $this->authed->userId;
$fields = [
'qrcode' => '柜组二维码编号不可为空'
];
$request = $this->request->getJsonRawBody(true);
$parameter = $this->getArrPars($fields, $request);
... | 1 |
67c321a838b8a989df8104ae9d811876 | 94249906b6f64cdfaa3fa49d9e0ba152 | 延迟的函数调用被压入一个栈中。当函数返回时, 会按照后进先出的顺序调用被延迟的函数调用。 | var timer = null;
var callStack = [func];
return function back(arg) {
if(timer === null) {
timer = setTimeout(function() {
callStack[callStack.length - 1].call(this, arg);
clearTimeout(timer);
timer = null;
callStack = [func];
}, delay);
} else {
callStack.push(func);
}
}
} | 1 |
5b76efbb43ba6de5647990886446d53d | 0a9653981e17082ccb96cf0b734924a4 | Conceals the value of the cell. | class SafeCell extends Cell
public function __toString()
{
return ' ';
} | 1 |
334b43e333276cf5715c2ef2ca0257b4 | 6cab8e9c3862755871d3f6397a7a28df | A Server for websockets RPCs | class SimulationServer:
def __init__(self):
self.ws_server = WebSocketServer(self.ws_callback, port=settings.WEB_SOCKETS_PORT)
self.sim_pool = sim_pool.SimulatorPool(self)
self.ws_connections = []
self.registration = None | 1 |
13fce886f8ca1e004bbdc1f45b3cc2e9 | 8e48df56cb22076a7737d48a55dc1ecb | Tests that passing an invalid facet ID throws an InvalidArgumentException. | {
$field1 = $this->getMockBuilder(EntityField::class)->getMock();
$field2 = 123;
$fields = [$field1, $field2];
$this->expectException(\InvalidArgumentException::class);
$this->createDescriptor(
[
'fields' => $fields,
]
);
} | 0 |
77b59b2db4bf56187dfdd86007eba945 | 9a0828dbffd0396f444db189766c0911 | Sets the showTotals
Indicates whether the total row is visible or not. This value can be set to show or remove the total row. | class DDM_View_Helper_Listerine extends Zend_View_Helper_Abstract
public function setShowTotalsRow($showTotalsRow) {
$this->showTotalsRow = $showTotalsRow;
return $this;
} | 1 |
f322bc572187da90a4068c6fe2e8cc88 | 90a5727300fc96a4450b546b59de165c | 判断给定元素是否固定或者在一个固定元素中 | function isFixed() {
return position === 'fixed';
} | 0 |
784bf187ec58eb4b423538e60efc5e14 | c9356cf75641b9ebf3fb9f0de511adf0 | <p>Статический метод возвращает список полей с типами.</p> <p>Без параметров</p> <a name="example"></a> | class FieldTypeManager
public static function getTypes()
{
return static::$types;
} | 1 |
f774a8ff9d7c2cb01128e48d6a9efe86 | 0b8e945d45cb754e0be70579c64859d2 | Converts the object to volts. | class PhidgetsVoltage(AnalogFloatSensor):
def read_value(self):
voltage = 0.06 * (self.device.analog_read(self.pin) - 500.)
return voltage | 1 |
007e502e5d8db76cf49aa3e7dcffedd4 | 964440bc44d6aa05904dc39beb0ab4e6 | 通过地址获取别名 | class GoodsController extends AppBaseController
private function getAlia($params) {
if(!$params['keyword'])
return $params;
$key = md5($params['keyword']);
try{
$info = \app\dao\SearchAliaDao::getSlaveInstance()->find($key);
if(!$info || !$info['urls'])
... | 0 |
d88658cd7355b13288f0445f48a3effd | 84e1cbc592682634f7bb567e2d8f9716 | 补充指标为0的数据 -- 根据其之前最后出现的指标进行复制 | write_book = openpyxl.load_workbook(test_last_20_allFeatures_Path)
write_sheet = write_book.active
before_essay_id = 0
for i in range(write_sheet.max_row - 1):
now_essay_id = write_sheet['A' + str(i + 2)].value.strip().split('-')[0]
is_new_essay = now_essay_id != ... | 1 |
cb6c35935e101e00e941b57941659630 | 98796622f8f5fa2053448a7843adae6e | 计算大包装数量 | namespace ERP.BLL.ERP.Packs
public class PacksServices
public int Calculator_InnerTagsNumber(int ProductTagsNumber, int InnerBoxRate)
{
int iMath = 0;
if (InnerBoxRate > 0)
{
iMath = (int)Math.Ceiling((double)ProductTagsNumber / InnerBoxRate);
... | 1 |
a668269657ed8afe1ec3b5b669151767 | da163b4fcf6fe22004624f542c3faf7d | 按charge分开json文件 | headers = {"Content-Type":"application/json"}
data = {"apiAccount": "N4398498",
"apiPlatForm": "01",
"channel": "TDBM000006",
"msgId": self.msgID,
"number": 1,
"productCode": "1001",
"realChannel": "ZSJRH0000... | 0 |
0412f572117b677871cee8d4086b5402 | b183692a62f9eb98b43aa4de94bca6f8 | Takes the puzzle data and sets the window data using it. | self._puzzle = puzzle
self._puzzle_height = puzzle.get_height()
self._puzzle_width = puzzle.get_width()
self._frame = simplegui.create_frame("The Fifteen puzzle",
self._puzzle_width * TILE_SIZE,
sel... | 1 |
6907b83ac6335501860e63fcfa127bd9 | 247242a5eb00b9a84c760ac90d55547a | check the change password form and edit user's password to db | if request.method == "POST":
session['error'] = change_psw(
request.form['username'],
request.form['new_psw'],
request.form['new_psw2']
)
return redirect(url_for("admin")) | 1 |
88b1f58715de078305b47edffc29ca32 | 0d654e8da558a51e354e663633dadde6 | have we got the data needed to display a "submit" button? | const yes = isDefined(setting) ? setting : isPresent(activeDataRows());
return enableControlButton('submission', yes);
} | 1 |
7373ad07f249bff6bf5b520fde8807a1 | 834c82225f9195facfaaf043bd37a696 | Lists all Itemgroup models. | {
$searchModel = new ItemSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
} | 0 |
ca4939d49e5f2ad11fe77807b357911b | b10df4615d15b12df1e0206b867456f0 | Records setting up the {@link ManagedObjectSourceContext}. | public class OfficeFloorNodeImpl implements OfficeFloorNode, ManagedObjectSourceVisitor, TeamVisitor
private OfficeFloorSourceContextImpl createOfficeFloorSourceContext() {
return new OfficeFloorSourceContextImpl(false, this.officeFloorLocation, null, this.properties, this,
this.context);
} | 1 |
dbc1991e686447ec4b0368b38a54fc57 | 28abcd8d567c126ee37761e239608bcd | Comparamos que para cada posicion los objetos, LOS POROS, sean iguales o no | @x.length.times do |k|
@x[k] == other.x[k]
@y[k] == other.y[k]
@valor[k] == other.valor[k]
end
end | 1 |
8cde82d6e2b476dd77c89645c643c74c | 106508669b7dd2d1f82d94772d7c0c54 | Function to set the button used to switch off the automat | void automatSetOnButton(struct sAutomat * const pAutomat, struct sButton * const pButton)
{
assert(NULL != pAutomat);
pAutomat->pOnButton = pButton;
} | 0 |
a0527c6924f4335ca552bd8cef839150 | bdac3298dcb504d55b51601587198779 | check all thread parameter is valid or not. | _c = self._conf
if self.url_check(self._domain) is False:
print ("[SCRAPY_ERR] domain={} is invalid.".format(self._domain))
elif isinstance(_c.get('thread_num'), int) is False or \
_c.get('thread_num') < 1 or _c.get('thread_num') > 30:
print ("[SCRAPY_ERR] thr... | 1 |
5ebbfd6b054ca319fcd8612238265f5a | 34bc6304f3e0735e902e03874592d2ce | 探索原始数据中共现的sub_type写入文件 | type_count_dict={line.strip().split('\x01')[0]:0 for line in open(raw_data_path+'type_id','r').readlines()}
input=open(raw_data_path+'jd_info_test.csv','r')
line=str(input.readline())
counter=0
first_line = True
while line!= None and len(line) > 1:
if first_li... | 1 |
cec2309430df6f086836c98b50f34467 | add3cbbbbcec3cc6616ab90ce1dc7b1e | Метод возвращает имя для отображения во вкладках. В качестве имени
используется название валютной пары | abstract class AbstractCoinRegisterTabFragment : BaseFragment(), View.OnClickListener, MyDatePickerDialog.OnDateSetListener, RateInputDialog.Callback, View.OnFocusChangeListener
abstract fun getCoinLabelName(): String | 1 |
8cadc931ce4b8a75b895f10cbccf23ce | c00e0ee5f965a758c601cd83b6fbd2bc | A timestamp of when the comment was created. The time should be formatted using ISO-8601 | public class CommentImpl extends ModelImpl implements Comment
@Override
public String getCreatedAt() {
return getFieldAsString(Field.CREATED_AT.toString());
} | 0 |
d0139b3197adfea530a8bca66c287c64 | 9afa8232288bbe7d8334d43c223bcd00 | Set emissives that are static, that don't change by some thruster values like thrust output. | LIB_API void TE_Material::set_emission(TE_VEC4 emission){
m_emissive = emission;
} | 1 |
f2445600ca920225b486aa5ab3028602 | 91ae29c06900bdb78488fbd5c7831420 | Blends two audios together. | namespace Extensions public class AudioManager : Singleton<AudioManager>
public void Crossfade(AudioSource aOutgoingSource, AudioSource aIncomingSource, float aDuration) {
FadeOut(aOutgoingSource, aDuration);
FadeIn(aIncomingSource, aDuration);
} | 1 |
c2485720ad9d7ee643e7a244437a36ab | 4a9acaa8099074e5e4317b6728a19b47 | static array stack empty check function | int stackForEmpty(STACKFOR *stack)
{
return (stack->top == NULL);
} | 0 |
7536cd08df4bf66ec3d69432b9a14b4f | 101635b28657c512023e79ded0277d79 | 회원가입 시 입력한 게임 정보를 마이게임으로 등록한다. | int addUserRelGame(GameDTO gameDTO); | 1 |
3302dc76aa80fa53309b77e949eaeab2 | b3b92418b38a6f2e244eb9ce04e2c1f0 | Incremente le chrono chaque 1000ms et envoi le nouveau chrono au component quizz | export class PartiePage
counter(){
this.time=this.currentQuestion.restOfTime==undefined?this.currentQuestion.time*60*1000:this.currentQuestion.restOfTime;
this.currentQuestion.restarting=false;
setTimeout(() => {
if(!this.timer)
this.timer = setInterval(() => {
if(this.time != 0) {... | 1 |
3ccc8cce6e4a8d36db1173c1211ac7ee | 0135efdf678aa06d5b303cdf9c49eaf7 | 验证员工考评编号ID是否存在,如果存在则不合法,不存在则合法,用于增加员工时检查ID是否已经存在 | public int existenceStaffID(String id); | 1 |
fdf2fc8311f16b3f5cea0e9994f27ad4 | 51a6971a76aa9ce2a89b935ab23ef2d8 | Returns the meta object for the attribute '{@link org.eclipse.e4.opensocial.model.Preload#getAuthz <em>Authz</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getPreload_Authz(); | 1 |
3afc73759862bc6100be7ec12425937f | d383ca8744daab139dfdc8b231696801 | Add a command to the Console. By adding a command, the console will direct input of that type of command to the given command for processing | def add_console_command(_command): | 1 |
b25b75a5f69ecb35ce757505ed5d0ef9 | 2a82a82ae881e4950b7334ad1924fbff | Updates the labels to notes. | public class EmployeeEditDialog extends AbstractView implements EditDialog
@Override
public void updateLabels() {
initLabels();
} | 0 |
e8fe88b80a607b6e74b756b39c8dbf53 | 562602da3370e1399f8dda8681c926f7 | Get the given html attribute as an integer, or -1 if not found or not a number. | {
XAttribute attrib = GetAttribute(XElement, attributeName);
if (null == attrib) return -1;
string str = (string)attrib;
if (null == str || str == "") return -1;
int nReturn = 0;
if (int.TryParse(str, out nReturn))
{
return nReturn;
}
... | 1 |
531f554b9c964af0bf3765f9b01d3662 | 602d4dae4abc99baca57b89cb0f62ebf | Get the summoner's rune pages
return list<RunePage> the summoner's rune pages | public function getSummonerRunesPage($id); | 1 |
66c2216a76b367a5476fd972fffed8ec | d03b1566854ca67c7c5563ae195fdebc | Pobieranie danych z listy osob i odpowiednie wyswietlanie ich. | int index=0;
if ((phonebook.isEmpty()) || (counterPersonIndividual()==0)){
System.out.println("\nKsiążka telefoniczna dla osób indywidualnych jest pusta\n");
} else {
System.out.println();
for (UserStructure temp: phonebook) {
if (temp instance... | 1 |
32ad4b9912760d4d458753d6191be4d9 | 048bee88e028f36f95052eb49fd283b5 | Initializes auth state from configuration file.
The file contains a shared secret to use for password decryption. | secrets_path=None):
if encrypt_cost is not None:
if isinstance(encrypt_cost, native_string_types):
encrypt_cost = int(encrypt_cost)
assert encrypt_cost >= 0
self.encrypt_cost = encrypt_cost
if secrets_path is not None:
if s... | 1 |
59b3d77bead78ab158bb2fda51f622f7 | 96e9831ea53e22736c3df76b0e9469d9 | 指定されたdragdropboxに画像を入れる | public class MyDropTarget extends DropTarget{
@Override
public void drop(DropTargetDropEvent e) {
System.out.println("ファイルがドラッグされました");
try {
Transferable t = e.getTransferable();
if (t.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
e.acceptDrop(DnDConstants.ACTION_CO... | 1 |
8f66aaf3c381ada934d59d5179fea3fb | ddb70a185563f3edb07df1a5b59860a8 | Updates ticket count label. | {
if (init)
{
if (listCount != null)
{
listCount.setText(String.valueOf(theCount));
}
}
} | 1 |
eb5bc5ac2b8826455dc1227609d19e01 | abd04da01e40694aed38f509a812936e | Read Only: Contains the URI of the swagger spec associated with this web service. | @JsonDeserialize(builder = SkillManifestEndpoint.Builder.class)
public final class SkillManifestEndpoint
@JsonProperty("uri")
public String getUri() {
return uri;
} | 1 |
4eafc289c844084969685928f1d97b6f | 1557a1724f6d2791d421428148f1faf7 | Returns Volumetric Flow Rate | class Stream:
def gas_volumetric_flowrate(self, units):
conv = uc.UnitConverter()
if self.basis == "gas_volume":
return conv.convert_units(self.flowrate[0], self.flowrate[1], units)
elif self.basis == "std_gas_volume":
T = conv.convert_units(self.temperature[0], self.temp... | 1 |
b6a61d9f78ba2032fcaf46da37ae0991 | 67fa0c939c6501af9cf87c69e5e0d119 | PUT: api/projects/{id} | namespace TripletexAPILibrary.Api
public partial class ProjectApi : IProjectApi
public ApiResponse< ResponseWrapperProject > PutWithHttpInfo (int? id, Project body = null)
{
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling ProjectApi->Put"... | 1 |
e603905948f5d830866cb738bf8f9d58 | bd3358a243ae1a4cf609d6695919c72b | Reads measured immediate value.
Returns:
(str): Measured value | resp = self.handle.ask('Read {}'.format(self.name), verbose=verbose)
if resp is not None:
return float(resp) | 0 |
8d1bba56ee070a3c43e88d9f9e2de788 | 060e7259cddd2fc327afb70bd378cba5 | Sets the "present_weather_sensor_off" element | public void setLeNotPresent(); | 0 |
cda823ec895092ba3e17e609333416af | 735a7f46e6412957b817acffff463a3c | Displays the generic error message for unexpected errors. | public abstract class Main
public static void unexpectedError() {
String str = "Unexpected internal error.\nWoops... Looks like Granny crashed into daddy's car again.";
JOptionPane.showMessageDialog(null, str, "Unexpected error", JOptionPane.ERROR_MESSAGE);
System.exit(1);
} | 1 |
d1f755a77954793b9ebf0c009de04cc8 | adad4cd85a8927464b930b97f7bfa3a8 | Get the overarching partition key for the entire aggregated record.
Returns:
The partition key to use for the aggregated record or None if this record is empty. (str) | class TopicRuleKinesisArgs:
def partition_key(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "partition_key") | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.