query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
8aa5e8a8c5106b49e4d84cc9ca43b25b | f3e570e6a50e7a7fba53449027119940 | Pretty printing of catch parameter declaration. | pytype = _pytype_to_decomposition_fn_pytype(arg["pytype"])
default = _get_default_value(arg)
parameter_name = _rename_python_keyword_parameter_name(arg["name"])
return f"{parameter_name}: {pytype}{default}" | 1 |
5331fc6f6136f507bed1e82224159da2 | 575114e0fda9c8d16102ea0ae5ebbd5d | Gets the monthly repayment by computing the compound interest. | for (int s = 0; s < months; s++) {
principal = principal.multiply(rate.add(new BigDecimal(1)));
}
return principal;
} | 0 |
9aa88a5664f1e6181b2edbfa785dea42 | 70794d46eeeccde05ec2b8c7837230bb | \brief Get the channel offset of the current schedule tsch entry. | {
volatile uint16_t* p16OCCP;
if ( (NULL == pstcOcu)
|| (u8Ch >= MFT_OCU_MAXCH))
{
return 0u ;
}
p16OCCP = (volatile uint16_t*)((volatile uint8_t*)&pstcOcu->OCCP0 + u8Ch*4u);
return (uint16_t)((*p16OCCP) & 0xFFFFu);
} | 0 |
d682a080b15af54277cb1af3fe2a162f | 292442ff81d6f7b250414dd0ef983476 | User's avatar modifier | $variables['classes_array'][] = 'boxed';
$fields = field_info_instances('user', 'user');
$field_id = $fields['field_avatar']['field_id'];
$user = new stdClass();
$user->uid = $variables['reply']->uid;
field_attach_load('user', array($variables['reply']->uid => $user), FIELD_LOAD_CURRENT, array('field_id' =>... | 1 |
c489c7de76aba3c92931d22699ffe819 | c1439562f26a8949c27f345494f5a3ee | The IP address that the flow will be listening on for incoming content. | class FastUdpAppVirtualServer(dict):
def ip(self) -> str:
return pulumi.get(self, "ip") | 1 |
447936afa503700161687fd45454aa19 | 213b135c9f95f7475d3e3e59c4a5c4be | Event handler for entree selection | namespace PointOfSale.CustomizationScreens
public partial class ComboCustomizationScreen : UserControl
private void ChangeEntreeButton_Click(object sender, RoutedEventArgs e)
{
EntreeButtonsAndInformationBorder.Visibility = Visibility.Hidden;
ChooseEntreeBorder.Visibility = Visibilit... | 0 |
72a360262e0df9b211575bdb41723c15 | c2874461a98afc94d979d962d8550bb6 | Calculate matrix exponential for rotation matrix
using Rodrigues’ formula. | temp_w = np.transpose(w) * -1
q = np.transpose(q)
v = np.cross(temp_w, q)
v = np.transpose(v)
temp = np.array([[0, -w[2], w[1], v[0]],
[w[2], 0, -w[0], v[1]],
[-w[1], w[0], 0, v[2]],
[0, 0, 0, 0]])
e = expm(temp*theta)
return e | 1 |
04f5886719aa47b10b1e51ee0db7d311 | 34eb184823e97260f48a371cbed618e1 | Computes the simplex noise value for a corner in a tetrahedron | class SimplexNoise(BaseNoise):
def noise3(self, x, y, z):
s = (x + y + z) * _F3
i = floor(x + s)
j = floor(y + s)
k = floor(z + s)
t = (i + j + k) * _G3
x0 = x - (i - t)
y0 = y - (j - t)
z0 = z - (k - t)
if x0 >= y0:
if y0 >= z0:
i1 = 1; j1 = 0; k1 = 0
i2 = 1; j2 = 1; k2 = 0
elif x0 >= ... | 1 |
3ffa8519e73abcfaaf9524826171791e | 4cb6278a4d096e4bfb10800b1fbdb4d2 | implementation of DE/rand/1/bin for tuning a feedforward network | {
srand(static_cast<unsigned int>(time(0)));
vector<size_t> HiddenLayers;
HiddenLayers.push_back(5);
FFBPNeuralNet NNet(2, HiddenLayers, 1);
double max_error_rate = 0.01;
long unsigned int max_training_sessions = 100000;
double error_rate = 0.0;
long unsigned int num_training_sessions = 0;
do
{
vector<doubl... | 0 |
1254769e29da10eeb4ff0119c9e699c1 | 8c9e7e7ffde94c4dcd716668113cb719 | 初始条件:顺序栈已存在
操作条件:将L置为空表 | Status clearLStack(LinkStack *s)
{
if(isEmptyLStack(s))
return ERROR;
LinkStackPtr p = s->top;
while(p)
{
p->data = 0;
p=p->next;
}
return SUCCESS;
} | 0 |
71e62a02b5e7f45bc1ab63ba65f4cb4d | bdaa413d5a7228fb2c709fba75017615 | 转换为百分比格式 | if (val == 0) {
return 0
}
let str = Number(val * 100).toFixed()
str += '%'
return str
} | 1 |
5ecef29852ae3c9c9b702659342e9b8b | 266f382e946a3a7e3949913f1e0955d8 | returns the value of $stCount | int STget(ST st)
{
return st->N;
} | 0 |
efbc1090a0a544b7f3a394ffa11b4147 | 5a8fcbddec0139423d7af4e7ce26b009 | Clears all batches and adds them to a pool so they can be reused later. | const numBatches = this._batches.length
for (let i = 0; i < numBatches; ++i) this._batchPool.put(this._batches[i])
this._batches.length = 0
this._currentBatch = null
this._currentStyleType = null
this._cacheToken.reset()
} | 1 |
3acb446e1e4a09d57d2001f7297fb87e | 63d9949438d586b7b75ad22c70cce74e | Create scope, collection and obtain collection id | public class RDBMSQueryProcessor implements IQueryProcessor
public IScope doCreateScope(ITopicMap topicMap, Collection<ITopic> themes) throws SQLException {
IScope scope = readScopeByThemes(topicMap, themes);
if (scope != null) {
return scope;
}
PreparedStatement stmt = queryBuilder.getQueryCreateScope();
... | 1 |
703383495f402450a14121aa4d484605 | d7930dde94862784dedba264fd0e810b | Get Transaction details by invoice number | {
if( is_array($transactionId) ) {
$params = $transactionId;
} else {
$params = array();
$params['TRANSACTIONID'] = $transactionId;
}
$params = $this->_checkParams($params, 'TRANSACTIONID');
$client = $this->_prepareHttpClient('GetTransactionDetails');
$client
->setPara... | 0 |
a2fcb7a4c898bc0ee885263d72b4fc0d | 405d162957f994a52e11ad1036fe7fc1 | Tests child subnets are excluded from overlapping validation | four = IPy.IP('192.168.0.0/16')
six = IPy.IP('::c0a8:0/112')
self.assertFalse(four in six)
self.assertFalse(six in four) | 1 |
f260b48a287d1418fffb3d2b850a38a2 | 41f293639c5380c3d06bf2813c65b395 | Returns the near plane value | double ViewDetails::nearPlane() { return hither; } | 1 |
ff92a82a8c5b7d31cc903520b921b4bf | 7b17fb17e8b36ef0cb59addde0421f10 | Read the previous utterance ID but don't read the data.
Returns:
The utterance ID of the utterance that was read. | class TextReader(MarshalByRefObject):
def Peek(self):
pass | 0 |
bdaaf74099f229708d654553d3c4127b | 7aa385d2db76675be6cbc602a2528738 | Returns the meta object for the attribute '{@link assignment1.Course#getRole <em>Role</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getCourse_Role(); | 1 |
b5d0f68019e71905e97f2cf9c2c00744 | 5d0f9957101e7f51bc11c06bfa0922b3 | 屏蔽SIGPIPE信号 | struct sigaction sa;
sigemptyset(&sa.sa_mask);
sa.sa_handler = SIG_IGN;
sa.sa_flags = 0;
sigaction( SIGPIPE, &sa, 0 );
PublishClient client;
if(client.init("127.0.0.1") == false) {
cerr << "connect to icmmsg failed" << endl;
return -1;
}
OutputStream os;
string topic("testTopic");
string ... | 1 |
a87ca81f58ca83147f4b49a079f905e3 | b57bce66271c617ffd8590441b559759 | Initializes the Bucket class | class PandasBucket:
def __init__(self, client: minio.Minio, name: str = "datasets"):
self.client = client
self.name = name
self.create() | 1 |
6d4affa4e39a4e14c8714bd229517710 | f5df60787bd02f4bdc1461a064c575ca | This method performs an asynchronous rendition and calls back the result to the
provided callback object. It uses the provided latch to coordinate the JUnit and
the asynchronous action thread and uses the provided MutableString to send back
any error messages for JUnit reporting.
<P/>
This method blocks until the actio... | @SuppressWarnings("deprecation")
public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
private void performAsyncRendition(final NodeRef nodeToRender, final RenderCallback callback, CountDownLatch latch,
final AsyncResultsHolder failureMessage) throws InterruptedException
{
... | 1 |
c187ef8633b22ca4daf2d82aaed46b3d | 4bf175c7cca8aaeb3b4c4d22a99d4cf0 | 发送TIM通知 | @RequestMapping(value = "/w/tim/noticeManager/sendTIMNotice", method = RequestMethod.POST)
public ResultPoJo<Object> sendTIMNotice(TIMNoticeSendPo po); | 1 |
e249ba08b31d8812b6a2d065f87a5e99 | a560e6d88a5a1830e294dd752a719ddd | Returns the file extension used for persistent XML files | final class XmlDbType implements \AtomicWeb\Universe\Resource\Interfaces\Type
public function getExtension()
{
return "xml";
} | 1 |
9091942d1f1ce16e73986f60352cd44c | ab14bcd7afd935162c3da29675e337b5 | Convert 6-digit hex string to a colour | colour_fromstring(const char *s)
{
const char *errstr;
const char *cp;
int n;
u_char r, g, b;
if (*s == '#' && strlen(s) == 7) {
for (cp = s + 1; isxdigit((u_char) *cp); cp++)
;
if (*cp != '\0')
return (-1);
n = sscanf(s + 1, "%2hhx%2hhx%2hhx", &r, &g, &b);
if (n != 3)
return (-1);
return (c... | 1 |
6205bfc5d8362443b31d940119221e97 | 0d9f3e94b254fe61db7ad5274660b1d7 | Sets the gui line for the specified parameter | public class ServerGUI extends javax.swing.JFrame
public void setParametersFile(String paramName) {
final String pname = paramName;
try {
Runnable doUpdate = new Runnable() {
public void run() {
ParamFileLabel.setText("Parameters File: " + pname);
... | 1 |
eebc4838c9ef29c3f5b598eab6b0c4a6 | 594ae0fef796595e0f9e2e960de48078 | Sets label based on the radio buttons selected | public class AddPartController
@FXML
void RadInHouseOnClick(MouseEvent event) {
if (RadInHouse.isSelected()) {
LabelMachineID.setText("Machine ID");
}
else {
LabelMachineID.setText("Company Name");
}
} | 1 |
e58b39607436646faac13a584900a1d3 | b78f1adc64edc5d4b79468ce501a72d2 | export対象のコレクション選択ラジオボタンの初期化 | namespace KinmuSystem.View
public partial class Update : Page
private void InitSagyoNisshiSagyoCDDropDownList(ref DropDownList sagyocd)
{
try
{
logger.Debug(LOG_START);
sagyocd.DataSource = kojinSettingSagyoCD;
sagyocd.DataTextField = "... | 0 |
9abc08a7e3fc0bf424db0998cf71be11 | e2eb7fb456ad91c0ad21e620ea61c301 | 计算month月day日是当年的第几天 | class MLearning(object):
def day_in_year(month, day, reverse = True):
count = 0
for m in MLearning.Month_To_Nr:
if month[0:3].lower() == m[0]:
if day < 1 or day > m[1]:
raise ValueError('day:%d'%day)
break
else:
... | 1 |
77ec3e2aba7e27ae0caa3d0885dccff2 | a522217ef142077e1999d0f38635a9bd | Asserts the exchange state after a call to `matchOrders()`. | export class MatchOrderTester
private async _assertPostExchangeStateAsync(matchResults: MatchResults): Promise<void> {
const triples = [
[matchResults.orders.leftOrder, matchResults.orders.leftOrderTakerAssetFilledAmount, 'left'],
[matchResults.orders.rightOrder, matchResults.orders.righ... | 1 |
926df1b9e8716d09dfc8cf239bff3cd5 | da8a3ee38132b26a3941d66aadd31e2d | Decrement the wiper setting. For more information see the docstring of inc_wiper function. | bool MCP4551::decWiper() {
Wire.beginTransmission(devAddr);
Wire.write(MCP4551_CMD_DEC);
return (Wire.endTransmission() == 0);
} | 1 |
d01a3c1c973abb911b4cf825a99b3782 | d3bbc40a0d869229a3361c9c89df937b | 获取已选择的歌曲实体集合 | ArrayList<AudioItem> result = new ArrayList<AudioItem>();
for(Integer index : selectedIndex) {
result.add(songList.get(index));
}
return result;
} | 1 |
bbae1175f8ce2a285b838e8cc5ae4fb8 | 6a02ec77d206d8166231e9067247b00b | 拼接 git 命令 | def git_arguments(m) -> str:
return " " + " ".join(m.git_argument_list) | 1 |
810cd40408ded237d67ad9c7faa5d474 | 1fae7c1192e980c2e11ca4913a54e84a | Test simple image list actually returns images | class BasicOperationsImagesRbacTest(rbac_base.BaseV2ImageRbacTest):
def test_list_images(self):
with self.override_role():
self.image_client.list_images()['images'] | 1 |
4540f57dbe7b538db85b1ba1ee162ed3 | 121f679459ece33adcc6cc0ffe1aa560 | Extract all parameters which are not required directly by the method signature and could be used in building a query | @Slf4j
@ImportFrom({JavaFileContext.class, ControllerContext.class})
public class GenerateApiTestClassAction extends BaseGenerateAction
private List<String> getQueryParams(PsiMethod method) {
PsiParameter[] parameters = method.getParameterList().getParameters();
List<String> params = new ArrayList<>(par... | 1 |
bb957a8b766f9e5f299485e3af5b6b9c | 0fe6b4b0df53c66ea55edd775c1fb210 | This method is called, when the hosting application sends new data to DirectOutput.<br />
The IPlugin interface requires the implementation of this method.<br/> | namespace DirectPlugin
[Export(typeof(IDirectPlugin))]
public class DirectOutputPlugin : IDirectPlugin, IDirectPluginFrontend
public void DataReceive(char TableElementTypeChar, int Number, int Value)
{
Pinball.ReceiveData(TableElementTypeChar, Number, Value);
} | 1 |
b33417c20b9b42044cec7516f8b6e6af | 6338d692edabfbcc9dc40c0b1e440c64 | 返回链表⻓度,时间 O(1) | pre = self.head
length = 0
while pre:
length += 1
pre = pre.next
return length | 0 |
4bc4fdcd91005b779a902384cc4d246a | d96adc000640bab2c7295531f2126aec | Click handler for help | class BasePanel(object):
def _on_help(self):
self.ui.handler.show_help(self.ui.info, event.GetEventObject()) | 1 |
700e5ee3fca5bf8426246b4ac0ad6f88 | 8f9a6acec2b5b1b4c6581fb77a3f436d | 转换牌面数字,在上述函数中使用; | int i;
i=cardnum;
if(i>0&&i<11)
{
return i;
}
else if(i>10&&i<14)
{
return 10;
}
else if(i>13&&i<24)
{
return (i-13);
}
else if(i>23&&i<27)
{
return 10;
}
else if(i>26&&i<37)
{
return(i-26);
}
else if(i>36&&i<40)
{
return 10;
}
else if(i>39&&i<50)
{
return (i-39);
}
else if(i>49&&i... | 1 |
b7fea289e7661b7ef09e579c7f9e3bfc | 31a83e0ff1eb0da6098b2dc49bedfb10 | Ініціалізація клієнта. Запуск очікування повідомлень від клієнта в окремому потоці. | Client::Client()
: m_cmd{}
, m_ui{&m_cmd}
, m_status{Status::init}
, m_io_ctx{}
{
std::thread message_handler_t([&]()
{
std::string message = m_inbound.Pop();
}
);
message_handler_t.detach();
auto on_enter = [this]()
{
ParseInput();
m_ui.ClearInput();
};
auto on_success = [this]()
{
m_ui.Print(... | 1 |
b17f04372b364931677723726d13a9e6 | 73631cc6474abc38a4a3842a96ff984b | 输出1联调响应 | void Modbus_Rev::_Send_Modbus_01Function()
{
Modbus_Read Data;
unsigned short u_s,next_u_s,use_u_s;
int Readled,Allled;
QMap<unsigned short,Modbus_bool>::const_iterator it,it1;
Readled = 0;
Allled = 0;
for(it= Modbus_Rev_01.Revdata.constBegin(); it!=Modbus_Rev_01.Revdata.constEnd();++it)
... | 0 |
1c97ed2b0962da4a75be0cea8694d495 | 07f905fe4dbfe94904b257cd00b16963 | Change side of track and sectors. | class TrackwayManagerWidget(PyGlassWidget):
def handleRotationSbx(self):
if not self._lock():
return
selectedTracks = self._trackwayManager.getSelectedTracks()
if not selectedTracks:
self._unlock()
return
if len(selectedTracks) != 1:
self... | 0 |
74514e55a0975e50118fad1ace64070a | def1e9a41dddb271c59d825fa24e1ebb | #Shrink seasonal indexes according to the James-Stein approach | year = 1:days
mat = as.matrix(x)
mod_year = days-length(x)%%days
if(mod_year==max(year)){
mod_year = 0
}
mat = rbind(mat, matrix(NaN, nrow= mod_year, ncol=1) )
YN1 = matrix(data=mat,nrow=days,byrow=FALSE)
Y1 = rowMeans(YN1,na.rm = TRUE)
hs = h.select(year,Y1, method="cv")
s = sm.regression... | 0 |
3d1c4556fd9d5fd43984ddcf925f6d8e | c9e8df3a2a54de7026836fbfb36e8e0b | Setter for <code>NBC_PATIENTS_NBC_PROC_LST.NBC_PATIENTS_N</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.0"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class NbcProcSdlRecord extends TableRecordImpl<NbcProcSdlRecord> implements Record12<Long, Date, Time, String, Stri... | 1 |
fd9963e6b53a637558848646592994e1 | 55e852e86eba3a009ffa8e6546a398ca | Returns a NotConstraint applied to its argument. | public class JcrQueryObjectModelFactory
implements QueryObjectModelFactory, org.modeshape.jcr.api.query.qom.QueryObjectModelFactory
@Override
public Not not( Constraint constraint ) {
JcrConstraint jcrConstraint = CheckArg.getInstanceOf(constraint, JcrConstraint.class, "constraint");
return new ... | 1 |
366fbfcd9fb523b8c115ef610ebc3442 | 5404a5e29f595a9fd874d632c8534d4d | Smarty outputフィルタ( UTF8 -> SJIS ) | class SmartyView extends View
function SJIS_Encoding($value, &$smarty) {
header("Content-Type: text/html; charset=Shift-JIS");
echo mb_convert_encoding($value,"SJIS",'UTF-8');
exit;
} | 1 |
4da5934fb838ceea74440ed0f99b6d58 | b30c827d513d2dda3796ed36978c0390 | 点击确定时的回调,此方法能在初始化对话框定义事件时直接使用选择的日期字符串 | namespace HZH_Controls.Controls
[ToolboxItem(false)]
public partial class UCDateTimeSelectPan : UserControl
private void btnOk_BtnClick(object sender, EventArgs e)
{
if (SelectedTimeEvent != null)
SelectedTimeEvent(m_dt, null);
} | 1 |
19dc48c9b9270ce69d4a30fafe99e8b7 | ebd502a1e65bc3b071674e93e40a0ba1 | Bloquea el picker para que no responda a las acciónes del usuario. | @SuppressLint("Registered")
abstract class LoadingActivity : AppCompatActivity()
private fun AppCompatActivity.blockInput() {
window.setFlags(
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
)
} | 1 |
a1dba615bc49ce72db3aa5fe39323856 | 7b89566c02ed65f89d3bb29dbd92c9c3 | Send app group definitions to Marathon. | class AppControllerClient():
def update(self, apps_to_run):
return self.server.update(apps_to_run, self.secret) | 1 |
4f264a4a93c4f8af05a1c3b2fea8762b | 6c6462e979c19417834cd5e347d499e2 | Pause the <code>{@link org.quartz.JobDetail}</code> with the given key - by pausing all of its current <code>Trigger</code>s. | Collection<String> pauseJobs(GroupMatcher<JobKey> groupMatcher) throws JobPersistenceException; | 0 |
542728342ad7eb4389f5718c51fd66f3 | d782f9539eb9a6f792dbb384832c7f6b | 将一个或多个填充器添加到委托列表中. | namespace PLib.Extensions.Core
public static class DelegateExtensions
public static Delegate Combine(this Delegate me, params Delegate[] delegates)
{
return Delegate.Combine(me, Delegate.Combine(delegates));
} | 1 |
a369b1a953a7d61c20172caa832e4148 | 8d9ea5e2f57ec1cf1261fefa8d905c34 | Find texture coordinates for an object-space point. | export default class MeshStyle extends EventDispatcher
getTexCoords(vertexID, out = null) {
if (this._texture)
return this._texture.getTexCoords(
this._vertexData,
vertexID,
'texCoords',
out
)
else return this._vertexData.getPoint(vertexID, 'texCoords', out)
} | 1 |
2723d4d0235375c787fed91a1f27b8be | 339be7b3a69d59bb499e1cc3f69e7fb1 | ssn1의 정보를 변경하는 setter | public class User
public void setSSN(String SSN) {
this.SSN = SSN;
} | 1 |
b6cebe910f69f22fb204a723c89f380c | 132ec4c2f63c818989913f0d9eb62c41 | The default prompt when EnablePressEnterWhenDonePrompt is enabled is "Press Enter
when done". Use this function to specify a different string to be appended. | public getPrompt(): string { return ""; } | 0 |
5e1f69c7c11d4abd5957e86d8a8c1c9e | d2aba51e4bfba30d31a0ccceb69a89b2 | הפעולה מקבלת תעודת זהות וסיסמא ומחזירה אמת אם המורה קיים במאגר | class classData{
public function teacherExist($teacher,$con){
$exist = false;
$QRY0 = "SELECT * FROM teachers WHERE Name='" . $teacher . "'";
$results = mysqli_query($con,$QRY0);
while($row = mysqli_fetch_array($results)){
$exist=$row['PID'];
}
return $exist;
} | 0 |
47cc27c3dae08ec33e5c0713bdb0f5b3 | 81b8dca4a4800a6bbff2e08ea2e39105 | Update settings to ensure no error on load | function loadSettings() {
if (!localStorage.age) {
localStorage.age = "";
}
if (!localStorage.budget) {
localStorage.budget = "";
}
if (!localStorage.weight) {
localStorage.weight = "";
}
$('#age').val(localStorage.age);
$('#budget').val(localStorage.budget);
... | 1 |
ed35d671b4544f2ee592d4b585084566 | 650f969d155da489cea03e03809cf1ad | Generate methods for {@code reactor}. | public class ReactorExecutor implements Executor
public void execute(Runnable r) {
ExecutorService reactorThreadPool = configuration.getReactorThreadPool();
reactorThreadPool.execute(r);
} | 0 |
da96c77f0504f0a09630210663e815a5 | 0c4d6f71b5c73e0a10fa9dbecece6ed0 | 读取技能表格 | local result = {}
for _,i in pairs(self.reader.skills) do
table.insert(result,globalDataManager:getModel(const.DATA_MANAGER_SKILL,i))
end
return result
end | 1 |
16ce5f4eb8fc6f9f81d3f663ec91a17b | 8a3662ae37a3b402ed0bb8b438f67394 | Calcul du nouveau θ à partir de θ_prec, lors d'une itération de la descente de gradient stochastique | updated_theta = self.theta - np.dot(self.alpha, self.jprime_theta)
delta_theta = np.min(np.abs(updated_theta - self.theta))
self.theta = updated_theta
return delta_theta | 1 |
8110665f12df15f39052f4d432f13e3e | 1dcb9b8b0528b8940d51ff15e2cc2948 | 返回采集到的书名集合 | public class BookController
public List<String> getSheetNames() {
return sheetNames;
} | 0 |
21b8e7dff10866e497d63650ff5ec262 | be8820bc202c75500ec2624f9a6f2f5e | ident_expression : ident | class Pparser:
def p_expr_id(self, p):
p[0] = p[1] | 1 |
5a03d024320123b25b3bc6211776a3ae | dd520d2326915635092d83d9e951db4d | Gets the alerts_trendline of this DashboardStatistics. # noqa: E501 | kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.update_alert_with_http_info(id, body, **kwargs)
else:
(data) = self.update_alert_with_http_info(id, body, **kwargs)
return data | 0 |
ea1675f58f6e743b7e1ee00b0273deb0 | 1f397c06cae7e9d1160feb13a39c4261 | To standard unit of measure | class SummationSensor(Entity):
def unit_of_measurement(self):
return 'kWh' | 1 |
dbaa024bd489df15e882e3e282d06be6 | 5252c136df3983383cafc8571bb19d0b | 搜索指定扩展名的文件A (递归使用) | {
try
{
DirectoryInfo info = new DirectoryInfo(path);
string[] dir = Directory.GetDirectories(path);
FileInfo[] file = info.GetFiles();
if (file.Length != 0 || dir.Length != 0)
{
foreach (... | 1 |
335b48b1cb8167c6911dbd5ee79c3bc9 | d6f6ccaca0bc6a4c03df6b08e4b8ec3c | Stores all column aliases in the query. | class QueryCollection
def alias_query(query_name, alias_name)
@aliases ||= {}
@aliases[alias_name] = query_name
define_query_method(query_name, alias_name)
end | 0 |
2cb969e18212b25ff457f08fb67d9a22 | 7d511854a30556cb77483e946789ee36 | 判定技能按钮是否显示 | local function isShowSkill( )
if m_Root and m_Widget then
if g_data.starting[75] and g_data.starting[75].data then
local playerData = g_PlayerMode.GetData()
local plevel = playerData.level
local showendlevel = tonumber(g_data.starting[75].data or 0)
return pl... | 1 |
e7b14f67dc2fc2bada4a315311a7145c | 6220c5f9fb7698d9a53327e8d5897dcc | Declare specific metaconstraints to use | class Constraint extends MetadataContainer
withEntities(entities) {
assert.EmsPermissionEntities(entities);
this.entities = entities;
return this;
} | 0 |
6e370ac1b0036fdc609dff683390dc25 | 0ac68ce26a47daef5d9ca809ef1e506e | Initialise les parametres et début de la capture de l'accelerometre | class Capteur():
def __init__(self):
self.enableAccel()
self.enableGyro()
self.enableMagnet()
self.enableFilter() | 1 |
5f3d521e594fc53a14822c0f3c2d3ad3 | b82d2c437917496e5b1143c254c4f1df | Vrátí název property pro vlastnost typu Money z daného sloupce. Pokud daný sloupec nemůže být | {
List<string> result = new List<string>();
foreach (Column column in table.Columns.SortIfNecessary())
{
if (!ColumnHelper.IsIgnored(column))
{
string shortcutName = ShortcutColumnNameToMoneyPropertyName(column.Name);
if ((shortcutName != null) && (!result.Contains(shortcutName)))
{
... | 1 |
892b0aa958772e92eefa511c99703c89 | ea75154c60f21683446aa5445a64ac77 | 根据单据类型取单号 | public class CodeRuleUtil
public static String getBillid(int type, String code) {
String billid = "ZD" + code + DateUtil.getCurrentSixDay();
switch (type) {
case 1:
billid = "SZ" + code + DateUtil.getCurrentSixDay();
break;
case 2:
billid = "GZ" + code + DateUtil.getCurrentSixDay();
break;
case 3:... | 1 |
77d68603e36197ed2c344dc11945a1c7 | 3fc14c81ad0dbc8c8b5f73991ab397bd | Method to call GetLIBOR
Meta informations : | class SbifController extends Controller
public function index()
{
$date = \Carbon\Carbon::now();
$sbif = new Sbif();
$sbif->apiKey('7c1e482c477b8af7281ecd334296eeeb427a2642');
echo $sbif->getIndicator(Sbif::IND_EURO, $date)."<br/>";
echo $sbif->getIndicator(Sbif::IND_DOLLAR, ... | 0 |
8885ad43c75d15fdfaaf4580267775f2 | 51c33bcb89cd30fbe3cb3be5a3b941e7 | Removes this node's children with id. | public function removeChildren(array $children = []): self; | 0 |
025d4946cc9af5417e8061797999d524 | daf00b67187a1a44a2fa670a76a8e17f | 处理资料任务开始上传 | public void uploadStart(T fileInfo); | 1 |
cdb6dfc98697af53b57bfd5e5155e93e | bfe197ac370b5eb882cccca442dd88b3 | \brief Called before main () | {
extern void *k_stdout;
kdevice_set_initial_stdout ();
k_memory_init ();
arch_init_interrupts ();
arch_register_interrupt_handler ( INT_MEM_FAULT, k_memory_fault, NULL );
arch_register_interrupt_handler ( INT_UNDEF_FAULT, k_memory_fault, NULL );
k_time_init ();
k_devices_init ();
k_stdout = k_device_open ( K... | 1 |
49b2ee7ed1626ff072c29df303914de4 | 280ae5d404618c2993243a6493937ca0 | ! \ru
Устанавливает режим захвата порта: CM_Exclusive - захват порта после вызова startDriver(),
CM_NonExclusive - захват порта только на время обращения к устройству. | {
HANDLER_ENTER;
ResponseMessage response;
if (ValidArgumentsNumber(__FUNCTION__, numberOfArguments, 2, response.message))
{
#ifdef _WINDOWS
int newMode = IOCTL_WBE_MODE;
int oldMode = IOCTL_WBE_MODE;
if ("WBE_MODE" == arguments[1])
{
newMode = IOCTL_WBE_MODE;... | 0 |
7181d5742166670160bb71ca97405b02 | d6f77429ee85a8c0c461e26a77581c55 | 静态类初始化 | protected static function initStatic() : void
{
static $inited = false;
if (!$inited) {
$inited = true;
static::$config = core\config\Config::get('model');
}
} | 1 |
edea024da04ac7951df5fef35ff2d4c1 | 2a2e5d9316f38992d80cdcba8e96daff | Gives a user a 'nope' gif. | final class FakeBookNode extends Node
private static function nope() {
throw new \Exception('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
} | 0 |
1931a4e353c793c18d3b15e116ad2508 | 56b8c967668b705747ba8b96612ac130 | シーケンスの最初の要素を返す。シーケンスに要素が含まれていない場合は null を返す | public final class Sequence<T> implements Iterable<T>
public Maybe<T> first() {
Iterator<T> iterator = items.iterator();
return Maybe.of(iterator.hasNext() ? iterator.next() : null);
} | 1 |
333783c61d7ae80f625d0b3e95dfbdc2 | 73be11c854e208bd4f265ecfb8c664f2 | 加载省市列表 | public void loadData() {
try {
provinceList= PlaceSaxParseHandler.getProvicneModel(getAssets().open(AppConstants.ASSETS_CITY));
if(provinceList!=null){
queryProvinces();
}
} catch (Exception e) {
LogUtils.e(TAG, Log.getStackTraceStrin... | 1 |
c95579a8c85267b4ba4ed9d06f45a39f | e8c1ba0ecae140fad515132b4628ab50 | Teleporte sur deadLocation de la tombe / Grave | public void moveToGround() {
if (entity.getDirection() == Direction.Down) {
double speed = entity.statValue("MOVEMENT");
HashMap<String, Double> damageMap = new HashMap<>();
damageMap.put("CURRENT_LIFE", -speed);
entity.modifyStats(damageMap);
}
... | 0 |
c85dfc1eb06ac4c2ebf983c292d546b8 | 60a962c2ce6eef590fc7d136c985a010 | catch and remove constant bounded blocks | return {
VariableDeclarator (path) {
const { id, init } = path.node
if (!(t.isLiteral(init) || t.isObjectExpression(init) || t.isFunctionExpression(init))) return
const binding = path.scope.getBinding((id).name)
if (!binding || binding.... | 1 |
756c125af5a4e035affeebc4d0da7d43 | 61c9edb0accff66af23c3495e7579b3c | Generate a set of gaussian ring centers. | seeds = triangular_grid(2 * (radius + spacing), 2 *
(radius + spacing), spacing, True) + center
return crop_circle(radius, seeds, center, radii) | 0 |
cad611e7e3d167a9765c885b2745a692 | bd6936fdaf80834067964d47a087dc6c | Displays gender views and sets up gender picker dialog | class CustomGenderSettingsDialog(HasCGSLog):
def __init__(self, sim_info: SimInfo, on_close: Callable[[], None] = CommonFunctionUtils.noop):
super().__init__()
self._sim_info = sim_info
self._on_close = on_close | 0 |
bb7ead9826f11446f87a7184af86109f | dc86081d470122f52f18be4219354833 | Returns true if the passed node is selected, else false. ... | public class NodeSelectorPanel extends JPanel implements ActionListener
public static boolean isSelected(final String urn) {
return selectNodesMap.containsKey(urn);
} | 1 |
36806f9f4834b5e482ee525c3483ce3c | a7aa5b2065c8b0ea5973fdf1dceb8b49 | Verify only admins can access pairings. | driver.add_accessory(Accessory(driver, "TestAcc"))
handler = hap_handler.HAPServerHandler(driver, "peername")
handler.is_encrypted = True
handler.client_uuid = CLIENT_UUID
assert driver.state.paired is False
driver.pair(CLIENT_UUID_BYTES, PUBLIC_KEY, HAP_PERMISSIONS.ADMIN)
response = hap_han... | 1 |
11a6be359943686cd3356bd398bd433a | ce121356cd75f84fe926594d458b62a1 | Informs the partner that an exception has occured at runtime
(thus the event should be backed out). | public class ExceptionManagerClient extends ModuleClient implements IExceptionManager, Serializable
public final void NotifyException(String WorkflowCode, int WorkflowVersion, String InstanceId, RuntimeObjectType SourceRuntimeObjectType, String SourceElementName, boolean Block, RuntimeObjectAction SourceRuntimeObjectAc... | 1 |
99c8186fcbbd95b8121a640edb25701f | 1a4f9b7e5a177c6f57e2be06d71ba4b6 | 线程中运行的程序,这个程序每隔 1s 判断是否需要停止并打印自己的 ID | void C11Thread::mainLoop()
{
std::cout << threadObj->get_id() <<": C11Thread mainLoop"<<endl;
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
} | 0 |
7513e130957cc17d24084a55304f8042 | 811baf09a3622da4c54a61e064c641b8 | The method checks if an override could be 'applied' to the specified node/attribute | public short canSetAttribute(String attrname,
String attrval); | 1 |
ca61c4640b3e15f4c44ead3e06f1d0a5 | d38926cdee06f2bea12f599d8c748a20 | Test Size model default value and string method | TEST(SizeTest, Test0)
{
Bits<1, signed> sbits1;
ASSERT_EQ(1, sbits1.size());
Bits<4, signed> sbits4;
ASSERT_EQ(4, sbits4.size());
Bits<1> ubits1;
ASSERT_EQ(1, ubits1.size());
Bits<4> ubits4;
ASSERT_EQ(4, ubits4.size());
} | 0 |
cc96ae6d6f89e7c25f16522e8fbb5a84 | 2ca22fe11cff715f0ed911b5e838890e | retorno el primer o ultimo lane si las posiciones exceden el min/max | public class SpawnManager : NetworkBehaviour
private int ChooseFreeLane(bool isBadGuy = false, bool isTruck = false)
{
int laneChoosen = -1;
int minLane = 0;
int maxLane = 4;
do
{
laneChoosen =Random.Range(minLane, maxLane + 1);
} while (_laneChoosen == la... | 0 |
53eac0cc5e11cc1683bcb325acbb491c | 045b1f847368555097f5e97779d5bd2d | apk 下载成功回调 | void onComplete(ApkManager.ApkUpdateStatus status) {
Log.d(sTag, "onComplete");
Log.d(sTag, "Status: " + status);
if (mCallback != null) {
mCallback
.onComplete(status == ApkManager.ApkUpdateStatus.APK_INSTALL_SUCCESS);
}
if (mDownloadRef != 0L) {
mDownloadManager.remove(mDownloadRef);
mDownloa... | 1 |
b52ffeb5e59f42c1d7f4dcb9a3dec361 | ebd9bbbd74947dcd4b61eb7a3cbad096 | Returns the number of coins in money pouch. | namespace VendingMachineEngine
public class Wallet : IWallet
public uint GetCoins(uint nominal)
{
return this._piles[nominal].Count;
} | 1 |
6d9b227f1f926d9a46b54845dc7c5441 | 0196f108ecf1be94e39d6e0351aa57e3 | Function to read the Command complete event
This will read the response for the command send to BT chip
and validate response against response opcode | {
u_int8 para_length;
t_p_pdu p_buffer = 0;
u_int8 size_of_header = SIZE_OF_EVENT_HEADER + SIZE_OF_COMMAND_COMPLETE_HEADER;
struct q_desc *qd = 0;
para_length=1;
qd = BTq_Enqueue(HCI_EVENT_Q, 0, (t_length)(para_length + size_of_header));
if(qd)
{
p_buffer = qd->data;
_In... | 0 |
40a6c9418549d5948fbd8abe0db31606 | ffa53a7644ee6c6172baa253eb2ce9fa | 笛卡尔坐标系反归一化 | polar.y = 90 - polar.y;
polar.z = 90 - polar.z;
var vector = new Vector3(polar.x * Mathf.Sin(polar.z * Mathf.Deg2Rad) * Mathf.Cos(polar.y * Mathf.Deg2Rad),
polar.x * Mathf.Cos(polar.z * Mathf.Deg2Rad),
polar.x * Mathf.Sin(polar.z * Mathf.Deg2Rad) * Mathf.Sin(polar.y * Mathf.Deg2Rad));
return vector;
} | 0 |
8651ad9ffae1e8f5205351cbe2d8e4f0 | fc7c9ec5f6ccd43c524ee96563d7becb | Add listener to Update/Delete Employee Dialog components. | public class Controller implements WindowListener{
private void addListenerToUpdateEmployeeDialog(){
updateEmployeeDialog.saveButton.addActionListener(updateEmployeeDialigListener);
updateEmployeeDialog.cancelButton.addActionListener(updateEmployeeDialigListener);
updateEmployeeDialog.editButton.addActionListener... | 1 |
85215e167f194fbf8ec78ef2b9d385ac | 0c855d2f5da7d67c1db01d364dbb3c68 | Validate only one radio button to be checked. | function validateAtLeastOneChecked(checkboxInputName, validationElement) {
let cbx_group = $(`input:checkbox[name='${checkboxInputName}']`);
if (cbx_group.is(":checked")) {
cbx_group.prop("required", false).each(function() {
this.setCustomValidity("");
});
} else {
cbx_gr... | 0 |
f3767d34f199efa2b129368f4293a6d6 | 87f3b207f4c15a87a3334c874e3d4ff4 | O(n)
Finding the Max element in an Array | def maximumElement(arr,n):
if n<=1:
return arr[0]
else:
max=arr[0]
for i in range(1,n):
if arr[i] > max:
max=arr[i]
return max | 1 |
4bbd7dae075f3f4367a24adf4ca1767f | 11c8467c4788822dc7d5607bb1d26be6 | 表格分页切换 | export default class TicketGroup extends Component
tableChange(pagination) {
const pager = { ...this.state.pagination }
pager.current = pagination.current
this.setState({
pagination: pager,
page: pagination.current
}, () => {
this.fetchListData()
})
} | 1 |
f174716fb24b7f51a2e292ab2e375502 | 3148e46c03e0dc41e42bd69083364e39 | Sync 3 directories with each other. | def sync(ctx):
ctx.forward(keys_sync)
ctx.forward(servers_sync)
ctx.forward(domains_sync)
ctx.forward(dns_sync)
ctx.forward(email_forward)
ctx.forward(email_whitelabel)
ctx.forward(backups_configure) | 0 |
ee03e722aa54478004ca5a9ac53bddad | 2510d62c64671f86d0c34cc9493a2da8 | Send ESC key to stop the motors on exit | {
digitalWrite(MOTOR, LOW);
for(int i=0; i<8; i++)
{
digitalWrite(i, LOW);
}
exit(0);
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.