query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
5944c3eecc10c9461440b4276be8935a | c143fc26ab66da37f9bec1b0c6fff37b | Returns all the public events that are declared or inherited by the current <see cref="Type"/>. | namespace Envision.Blocks.CustomAttributes
[Serializable]
public class GlobalizedObject : ICustomTypeDescriptor
public EventDescriptorCollection GetEvents()
{
return TypeDescriptor.GetEvents(this, true);
} | 1 |
d2114179db9d3d11241db82bc345d843 | 96437e6c01a69bf439e4b46cc5c8e7ce | Changes and returns the archive state of the Chat | public boolean getArchive(); | 0 |
699e764cd17b6a9e1a619d97bb30b01a | 346b72cf37b8ae456c4193cf4dc6041e | 查询指定域名的https证书配置
Please refer to HUAWEI cloud API Explorer for details. | const options = {
method: "DELETE",
url: "/v1/{project_id}/guard/https-cert",
contentType: "application/json",
queryParams: {},
pathParams: {},
headers: {}
};
const localVarHeaderParameter... | 0 |
5304cd1d5fc4e1796fa68385b91197e2 | b729e96e8a3b38584f52603dd7af9591 | @用户时的联想建议 | $suggest = new ActiveDataProvider([
'query' => Suggest::find()->where(['uid' => Yii::$app->user->identity->id]),
'pagination' => ['pageSize' => 5],
'sort' => ['defaultOrder' => [
'id' => SORT_DESC,
]],
]);
return $this->rend... | 1 |
4e0f7cc2dc190be8bcb1468aacb99504 | d635e566bab98bf110e6d41fd60b9720 | Convert HSV to RGB tuples. | def convert_rgb(h):
return list(int(h[i:i+2], 16) for i in (0, 2, 4)) | 0 |
19f50edbf81803e1525c3c73a5839ba0 | 11905704bb8d60c8bb151d3f351d4ee9 | 이름과 전화번호를 받아서 ID가 있는지 확인한다. | String returns = "";
MemberVO vo = null;
String result = "no";
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql = "select * from member where phone = ? and name = ? and del_info = 0";
try {
conn = DBService.getInstance().getConnection();
pstmt = con... | 1 |
8670a28160cacfcc9de0f67774c6b25c | 177d064658f7ad672fb711177088fb99 | Check if the vessel cfr matches with the pattern pCfr. | def is_valid_con(item: str):
return isinstance(item, str) and fullmatch(con_pattern, item) | 0 |
cd850e60c776e779a3a44bfe1fd47658 | 0e87432c47f36fc541bf19ed2069fdc5 | 设置学生选择的课程 | void setCourseChoices(List<Course> course); | 1 |
860e515ae6488f53c0ff0a4a7f5ae52d | 7e7efbe08bb5e4db1f55498cdc036be5 | Set a pane to have a static width, i.e. its width will not
change when the layout is dynamically resized. Only one pane
can be set to have a static width at one time. This state
will be retained even if another child is switched into the
pane. Specify 0 to set a pane back to the default state. Any
state will be lost if... | public C setMinimumWidth ( int minimumWidth ); | 1 |
ce5e1794435d761336b87b2dc84ef1bd | 31298ae32eb0359abbd1597f1824b096 | Gets the project_uuid of this CreateRepoRequest.
指定项目ID,获取方式请参见[获取项目ID](codehub_api_0014.xml)。 | public class CreateDedicatedClusterDCDBInstanceRequest extends AbstractModel{
public Long getProjectId() {
return this.ProjectId;
} | 0 |
7b2d9195d6348ef25482c372b248f506 | 12e1f7b099c587443028c3946af5bcfb | Build account menu | void BobsGame::createAccountMenuRender()
{
GLUtils::drawFilledRect(BobMenu::bgColor->ri(), BobMenu::bgColor->gi(), BobMenu::bgColor->bi(), 0, (float)getWidth(), 0, (float)getHeight(), 1.0f);
BobTexture* t = onlineTexture;
if (createAccountMenu == nullptr)return;
if (t != nullptr)
{
createAccountMenu->setGraphic(... | 1 |
f293af356103f4fcce4d7287dd333529 | 44ae5f4cb9107bba1104dd3436d7df92 | Returns the ammount of specified character in specified array of characters. | {
int frequency = 0;
for (int i = 0; i < input.Length; i++)
{
char c = input[i];
if (c == character)
{
frequency++;
}
}
return frequency;
} | 1 |
e1e5f18f820d8dc366e0bab3f04db668 | 25d3c71cc47febc88b17c53bfadaccc2 | Submits a market order to be executed immediately for fractional shares by specifying the amount that you want to trade.
Good for share fractions up to 6 decimal places. Robinhood does not currently support placing limit, stop, or stop loss orders
for fractional trades. | def order_sell_fractional_by_quantity(symbol, quantity, account_number=None, timeInForce='gfd', priceType='bid_price', extendedHours=False, jsonify=True, market_hours='regular_hours'):
return order(symbol, quantity, "sell", None, None, account_number, timeInForce, extendedHours, jsonify, market_hours) | 1 |
8a5a9f9bb814dd890613b91fa87c7f05 | 7107af801bbfc52efac25201838f8d1b | The before-update version of the state. This can be used to find
differences, if any. | class ChangesMixin(object):
def previous_state(self):
return self._states[0] | 1 |
5961bf92fff24245762c630122aee52d | 1c59e4b941dff20b3b08a0f9e32855fe | Returns the value of the '<em><b>Called Element</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Called Element</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc -->
extendedMetaData="kind='attribute' name='calledElement'" | public String getCalling(); | 0 |
2908731ca2a58a93dca0c9f016d1ddfb | 8c89a723ebbfabdea36174d9dc3351ba | ルーチンを1つ借りる | void lease(); | 1 |
84c68ab601314b21989e07ebfe0fb89a | a474be3988e53f943b143c8fe8c9bfea | Wait for an attribute to become a given value | namespace Propertium
public static class WebElementEx
public static bool WaitUntil<T>(
this T webElement,
CancellationToken cancellationToken,
string attributeName,
string expectedAttributeValue) where T : IWebElement
{
var expected = new Dictionar... | 1 |
47ebd95ce075d2bc9d9b458ccd5d0b81 | 0dd1a916b3c345e4847981376c770b1c | Blackbody as a function of wavelength (Angstroms) and temperature (K). | graph = graphs.FunctionsGraph(x_label="wavelength / nm", y_label="flux / W * sr^-1 * m^-3", title="Black Body Flux")
temps_to_styles_map = {3000.0: "g-",
4000.0: "b-",
5000.0: "r-"}
for temp, style in temps_to_styles_map.items():
planck_function ... | 1 |
1ca20d15984811e86d22688c379a36d6 | cfa0ea2de1e46d01929c208b019a328f | Algorithme : Permet de charger les données dans l'application en allant lire dans les fichiers .csv du dataset | {
int r1;
int r2;
int r3;
int r4;
(r1, r2, r3, r4) = BibliothèqueDataManager.ImporterPersistance(cheminFichier);
ChargerLesDonnées();
return (r1, r2, r3, r4);
} | 1 |
ad2b52d5902031c85c6010b062e4e15f | 5f642dc0276d1cf03aeeab75912f4142 | Callback for when an error occurs in mutation. | export class Logger implements ILogger
public onUnknownMutationType(_mutation: IMutation): void {} | 0 |
25f5bfb5d17cdaccda2c7df1ad2f982b | 4e8dd51ef62e6a8a100ca4699d17e79c | 返回所有KV对的集合视图 | public class TableImpl implements Table
@Override public KeyValueView<Tuple, Tuple> keyValueView() {
return new KeyValueBinaryViewImpl(tbl, schemaReg, tblMgr, null);
} | 1 |
4e69a6a700e00f19cc90e3d5f1fcd299 | ffa4721ac7911bdb29b04db85ef48903 | Get receipt header text. | if ( is_a_firm? )
sprintf(
I18n.t(:firm_receipt_description),
I18n.t('date.month_names')[ Date.today.month ] + ' ' +
Date.today.strftime("%Y")
)
else
if ( specify_neurologic_checkup? )
I18n.t(:alternate_receipt_description)
else
I18n.t(:defau... | 1 |
40e2b70526d23e7d7e5f8731ef7040c1 | 85aa9f342b8bb8b34a27092bf28f5f51 | Calculate the G term in the Cost231-Hata method given the parameters | def get_gss(dict_confusion_matrix):
n = dict_confusion_matrix['a']+dict_confusion_matrix['b']+dict_confusion_matrix['c']+dict_confusion_matrix['d']
ar = (dict_confusion_matrix['a']+dict_confusion_matrix['b'])*(dict_confusion_matrix['a']+dict_confusion_matrix['c'])/n
gss = (dict_confusion_matrix['a']-ar)/(di... | 0 |
4565a80cde998aa9f5301a8e5716be0b | 2b995e08be145e89108969d7fbea150c | Force-to-top mode doesn't support window decoration | class Config(ConfigObject):
def has_window_decoration(self):
return self.window.window_decoration and not self.window.force_to_top | 1 |
b4120fd7e3931755ad2b279fe6f3e600 | b72ced696f681d00d858669496538802 | Perform pre-issue checks on commands from userland and possibly veto them. | abstract class AbstractTokenContract<T : TokenType, U : AbstractToken<T>> : Contract
abstract fun verifyIssue(issueCommand: CommandWithParties<TokenCommand<T>>, inputs: List<U>, outputs: List<U>) | 1 |
5c516e622a42cffbc8419aeada101b3b | 961d033fb7eea5c4337e770c0b97a7b3 | Парсит строковое представление пользователя. | {
var segments = input?.Split(',').Select(p => p.Trim()).ToArray();
if (segments == null || segments.Length != 3)
{
throw new StudentParsingException();
}
var firstName = segments[0];
var surname = segments[1];
v... | 1 |
b7baf84ed2b72b3eda1e06026ec90ead | 0620a8d0a6ece49f476c06e12c09c78d | unicode 转为 ansi | string unicodeToAnsi(const wstring &wstr) {
int length = wstr.length();
if (!length) return(string(""));
uint codePage = CP_ACP;
DWORD flags = 0;
int bufSize = WideCharToMultiByte(codePage, flags, &wstr[0], length, NULL, 0, NULL, NULL);
if (bufSize) {
string str(bufSize, 0);
if (WideCharTo... | 1 |
50d0e9dc94222c14316f96accd6bd126 | ac899a0135da58f822c2221ed1db1c7c | Toggles the stylesheets. | public class ApplicationCommon
public void ApplicationStyleRefresh(){
root.getStylesheets().remove((styleState ? modeEnum.getTheme_light(): modeEnum.getTheme_dark()));
root.getStylesheets().add((styleState ? modeEnum.getTheme_dark() : modeEnum.getTheme_light()));
} | 1 |
70d0994de9d308e6451c797695e951cd | d0fc7f5568c7c5b69053ddd8c70c2028 | Class for horizontal obstacles | class ObstacleH:
def __init__(self, grid):
self.__grid = grid | 1 |
5a9a6b9a7df1fa928c1c0c8fee01f57c | 0119569ed6ef619d16c9c1f903e55e4b | generate node animation -- called by generateSequences | {
int frameTime = GetTicksPerFrame();
IndentWrite("Animation\n", 0, true);
IndentWrite("{\n");
indentLevel++;
IndentWrite("Track (target = %transform)\n");
IndentWrite("{\n");
indentLevel++;
IndentWrite("Time\n");
IndentWrite("{\n");
indentLevel++;
IndentWrite("Key {float {");
int keyCount = (endTime - star... | 1 |
3cb27caa67685b12eef459242b55ab06 | 98bcce53b6b59a26b3b65f2045486438 | Resets key and mouse states to default initial default state | for it in self.key_states.iter_mut() {
let old_state = *it.1;
*it.1 = match old_state {
KeyState::Pressed => KeyState::Down,
KeyState::Released => KeyState::Up,
_ => old_state,
};
}
for it in self.mouse_states.it... | 0 |
9966800d249c9070ff4caf84086cd00d | 0e1ad931e720205f4ddd128768cac8da | 把exception装箱成一个json字符串 | PrintWriter printWriter = null;
try {
response.setContentType("text/html;charset=utf-8");
printWriter = response.getWriter();
JSONObject jsonObject = new JSONObject();
jsonObject.put(RES_RESULT, ERROR);
jsonObject.put(RES_MSG, msg);
jsonObject.put(RES_ES, stackException.getStackTrace());
jsonOb... | 1 |
c822b34153f7aa1bbbe5ade946a5ceb8 | 4d0a95ef385565118195039ae0803c09 | Set ID of the AZ where an instance resides. | class TairInstanceArgs:
def zone_id(self) -> pulumi.Input[str]:
return pulumi.get(self, "zone_id") | 0 |
60cc17f624fd96fb3f2c37333f859f13 | 877fe5747997b3abd3fe22766fdaeb21 | 通过用户uuid获取用户头像 | $urlDomain = config('uapi.api');
if ($uuid <= 0) {
$uuid = self::DEFAULT_UUID;
}
return $urlDomain . '/avatar/' . $uuid;
} | 1 |
3899cf5f4202f7448fb78bd28f2338f6 | 29eed506d0e179d05f2a1cad269c3e91 | 获取自生成userId | namespace ZT.Permission.Service
public class UserService : IUserService
public int GetUserId()
{
var num = 0;
try
{
num = MHSeqNoLogic.GetUserId();
}
catch (Exception ex)
{
}
return num;
} | 1 |
7e8d341dd1e33e07b663d06c2bcf0b53 | 85cafee839c6d5f22b5ac825facb0e51 | Gets rows from the datasource based on the PK_client_access_ticket index. | namespace autotask.CodeGen.DataAccessLayer.SqlClient
public class Client_access_account_configurationRepositoryBase : ICodeGenBaseDataFiller
public static void GetByclient_access_account_configuration_id(string connectionString, int client_access_account_configuration_id, int start, int pagelen, DataSet ds, string tabl... | 0 |
b9f1b7549cf5efff1595d1d3bf7da153 | 2ea8b10bbdc0415c2f83d6140dc31848 | Sets score of player 2 | @Entity
@Table(name = "Game")
public class Game
public void setScore2( String score2 ) {
this.score2 = score2;
} | 1 |
7b2e57b555029fa53c7e0fb1e03f92a7 | 5f3838ca7cd8029b4e2d39bc427d13dd | Returns z-score of an assignment. | def assignment_score(grade_hash, student, assignment_num)
grade_hash[student][assignment_num - 1]
end | 0 |
7b875d90ff5e9770bf3b07704598e645 | e625ccd57c918cb0ac1fdefe899e9d4c | Dataset for vehicle choice model, used to test MNLFullASC. Extracted from IPUMS. | df_freq = fetch_openml(data_id=41214, as_frame=True, parser="pandas").data
df_freq["IDpol"] = df_freq["IDpol"].astype(int)
df_freq.set_index("IDpol", inplace=True)
df_sev = fetch_openml(data_id=41215, as_frame=True, parser="pandas").data
df_sev = df_sev.groupby("IDpol").sum()
df = df_freq.join(d... | 0 |
2155ebc8877670311e029a596cd60422 | d6d7d1a3211c49bf5aadcb23c86530f2 | Increment a shared counter (no synchronization). | @ThreadSafe
class Count
void increment() {
synchronized (this) {
count += (long) 1;
}
} | 0 |
215d19867f71283803cb0a5b0f5b0104 | 8cebccc0c1fbd52490e7a1f331d2771d | Asynchronously returns a number that represents how many entities in repository satisfy a query parameters. | namespace Aurochses.Data
int Count(QueryParameters<TEntity, TType> queryParameters = null); | 0 |
cbb195caa6f48e07abbd9409dd59b70d | 7f22f761e20c44dc46913ada6cf47b1a | 返回missionId值 | {
for (int i = 0; i < GAMEDEFINE.MAX_CHAR_MISSION_NUM; i++)
{
if (m_listMission.m_aMission!= null && m_listMission.m_aMission[i].m_idMission == idMission)
{
return i;
}
}
return MacroDefine.INVALID_ID;
} | 0 |
ab9ac577e68b7a87ee2b09ec27426505 | fe42e61471eacd2b2b8d6b540b86390c | 序号->城市 | $city_arr=[
'1'=>'北京',
'2'=>'上海',
'3'=>'杭州',
'4'=>'成都',
'5'=>'广州',
'6'=>'天津',
'23'=>'深圳',
];
return $city_arr[$city_id];
} | 1 |
1c68de9e5e19982a9c48361445e13b45 | b325c1d02dcbc72b94354ca833eb63e1 | Calculates distance between two points using the spherical law of cosines.
Input is (lat, long) for city one and (lat, long) for city two. | ca_in_radians = [radians(_) for _ in c_a]
cb_in_radians = [radians(_) for _ in c_b]
result = haversine_distances([ca_in_radians, cb_in_radians])
return result[0][1] * 6371000 | 0 |
dc86a7ef0dbd15eb187c2d60fd2415ce | 4a83424a6d1fd55258b2a7b422be9a03 | <para>Actually apply all previous SetPixels changes.</para> | namespace TokyoChokoku.MarkinBox.Sketchbook.iOS
void Apply (); | 1 |
ef0ada09646006cbf819ff35ff519e64 | 480a74f1db02b2ebc667a69d352f7aa5 | remove isolated vertices | isolatedVertices=[]
edgeVertices=[]
for edge in E:
for e in edge:
edgeVertices.append(e)
for vertex in G:
if (vertex not in edgeVertices):
isolatedVertices.append(vertex)
return (isolatedVertices) | 0 |
c7bd0e11fe80a4b36d10c1d82e1cccd2 | 9ecae92f841909c6ebad53704bbdb0f9 | Le asigna al laboratorio un nuevo nombre. | if (!object || !nuevo_nombre) return ERROR;
strcpy(object->name, nuevo_nombre);
return OK;
} | 1 |
95f9d8b97b7d6b72cd57c468a4c7c4be | 63b771a614d9089bed81e4712378fc0d | Return true if use Fixman potential | class Hook:
def IsManEnabled(cls):
return cls._use_man | 0 |
726c09e95896e1914279e844a5d1c607 | 854b6b7cb761d85a99147eec4c897408 | Replace suffixes in a state_dict
Needed when loading DDP or classy vision models | state_dict = t.load(path, map_location=lambda storage, loc: storage)
pattern = re.compile(
r'^(.*denselayer\d+\.(?:norm|relu|conv))\.((?:[12])\.(?:weight|bias|running_mean|running_var))$')
for key in list(state_dict.keys()):
res = pattern.match(key)
if res:
... | 1 |
1d616915e0aedabb803dacd872bcc7e1 | 4d9b80322667cb6d5d3a47a3f97de01c | See: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ | func openWav(filename string) (w *wavFile, err error) {
f, err := os.Open(filename)
if err != nil {
return
}
w = &wavFile{f, 0, 0, 0, 0, false}
err = w.parseChunkId("RIFF")
if err != nil {
return
}
_, err = w.parseInt()
if err != nil {
return
}
err = w.parseChunkId("WAVE")
if err != nil {
return
}
... | 1 |
a1115191b4288fb9206922ef5f3d4308 | 4799f7b7bc2aac82ceec58b1f4cc51c7 | 自影片設定資訊中取得影片格式清單 | function acceptableFormatList() {
return array_merge(acceptableImageList(), acceptableMovieList());
} | 0 |
bbed139965a749b15d3cd6c301acc3a2 | 5f7182fb4ebfdccc5e4d55126e3337fa | Gets the vertical= pixel.
<ul>
<li>ERROR_WIDGET_DISPOSED - if the receiver has been
disposed</li>
<li>ERROR_THREAD_INVALID_ACCESS - if not called from the
thread that created the receiver</li>
</ul> | checkWidget ();
int hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
GtkAdjustment adjustment = new GtkAdjustment ();
OS.memmove (adjustment, hAdjustment);
return (int) adjustment.value;
} | 0 |
e1ac6f1b7091075ba3d80dad75d351eb | 5986eeb042ab2f2deff4864b8ec38857 | gibt dem Mediaserver den Befehl den Kodierungsprozess zu starten | namespace RovioLib
public class RovioController
public string StartRecoding()
{
return rwc.RequestString("rev.cgi?Cmd=nav&action=2");
} | 1 |
1e90aa33a969638840256b36062d208b | aac03e91607ed45373e340c289cba558 | Creates a dump of all evidence in the database that can be downloaded on the client, this is run once per month
by Quartz | last_fmt = "%Y-%m-%dT%H:%M:%S+00:00"
now = datetime.now()
now_str = now.strftime(last_fmt)
last_dump_fn = "lastdumped_v1_1"
lastdump_meta = client.list_objects_v2(Bucket=BUCKET_NAME, Prefix=last_dump_fn)
last = "from_start"
if lastdump_meta["KeyCount"] > 0:
client.download_file(Bucke... | 1 |
76656eca2baf35084ff1311b999f574c | 8630be85575fa90066ebf20c90e9925b | 新增固定比分的赔率 | namespace BCW.PK10
public class PK10
private string UpdateRateDatas(SqlConnection conn, SqlTransaction trans,string openNo,string nums)
{
string cFlag = "";
try
{
string prevNums = GetPrevNum(conn, trans, openNo);
string[] currOpenLists = n... | 0 |
e1824ca79062141102cbd2bf8ee8e634 | 94d28da2b605411147cbd1ec6fd06194 | Update pending count for the inputs of op and enqueue ready ops. | class TelemetrizedRuntimeBase(RuntimeBase):
def _T_pending(self, t : Tensor):
if self.trace:
self.telemetry.trace.record('pending', self.clock, t.id) | 0 |
48884ffa1b5f5141e96fd7f8cabe1b1b | 9ede81a32ce2b3de0a8f6501c8b9d67c | lis中的每个元素是一个概率,排序之后的第一个数字是最好的回复的 id,第二个数字是第二好的回复的 id,
返回排序之后的索引list | num = min([5,len(lis)])
new_list=[]
for i in sorted(lis,reverse=True)[0:num]:
if i[0]>0:
id_type = i[1].split('t')
new_list.append([int(id_type[0]),int(id_type[1])])
return new_list | 0 |
f5555aaac237210658baf5bc9ab0b4cf | 217e442d37e38f8cf7dcd9d750cac71a | Set the protein reference list for this peptide identification | class AbstractRnaQuantification(datamodel.DatamodelObject):
def setReferenceSet(self, referenceSet):
self._referenceSet = referenceSet | 0 |
ab04da140bc783abde1305a46654c321 | 9bd902d0cacdf672cc636933dca4b3bf | Returns the underlying weight function. | class SparseMethod(LeastSquaresMethodImplementation):
def getWeight(self):
return _algo.SparseMethod_getWeight(self) | 1 |
5b076b2f3334e693f308a9f7990789a3 | 59e6c9c7d22c471677918ac1d855a870 | Construct a DER encoding of an ASN.1 entity of given type and payload | {
int length = encodedBytes.Length;
byte[] lengthBytes = EncodeLength(length);
byte[] outputBytes = (new byte[] { ASN1Tag }).Concat(lengthBytes).Concat(encodedBytes).ToArray();
return outputBytes;
} | 1 |
8f7702562285bfc5a718eeb38848c33c | 8f91f465569bf5139e91432eaabf5cdf | 判断给定日期是否为当天,
距离当前时间七天之内的日期,和七天之外的日期
0--当天 1--7天之内的 2--7天之外的 | public class DateHelper
public static boolean getDayDiffFromToday(Date dt, int type) {
Date today = new Date();
today.setHours(23);
today.setMinutes(59);
today.setSeconds(59);
long diff = today.getTime() - dt.getTime();
if (diff < 0)
diff = 0;
long days = diff / (1000 * 60 * 60 * 24);
if (type == 0 &... | 1 |
04c6987872446d0cc52ba583de405688 | 3cfb5a716418fb2e22bb204279e889cc | 将一个整数减1,再与原整数做位与运算,可消去最右边的1 | public class bitoperation
static int removeLowestBit(int x) {
return x & (x - 1);
} | 1 |
f224c5f3745d200535c99023ca3374af | 568b6fd943202acaa09743fe39dc9e6a | Méthode qui permet de créer un listener sur nos radios boutons.
A chaque modification de nos radios bouton la liste des ascenseurs / escalator est mise à jour | self.bulleurUI.buttonDefault.clicked.connect(lambda: self.setDefault(self.bulleurUI))
self.bulleurUI.buttonValidate.clicked.connect(lambda: self.setHour(self.bulleurUI))
self.bulleurUI.validatePeriod.clicked.connect(lambda: self.setAltern(self.bulleurUI))
self.ledUI.buttonDefault.clicked... | 0 |
56a9f5700a621d577e3017beb74bd938 | 42c2fca6d440709927baf5d1117d8a27 | Updates the email field error display. | if(emailInUse){
emailInUse=false;
phoneEmailET.setHint("Phone #");
}
else{
emailInUse=true;
phoneEmailET.setHint("Email @");
}
} | 0 |
0c6046b1b28018bf0bbb2618bb158dba | 05b715b902ca71e623a6bdeeeb25dce3 | 获取指定用户的所有备份信息 | {
DbCommand comm = GenericDataAccess.CreateCommand();
comm.CommandText = "BackupItemTableById_v4";
DbParameter param = comm.CreateParameter();
param.ParameterName = "@UserID";
param.Value = userId;
param.DbType = DbType.Int32;
comm.Parameters.Add(param);
... | 1 |
e3d84f370b3c1557f7af94aeab4a05a8 | 70e3d9d237a0edc1ded29b7463e30084 | 获取当前使用的IdGenerator | class EPPClient
public function getIdGenerator(): IdGeneratorInterface
{
return $this->idGenerator;
} | 1 |
0b2c14c9beabf5636082f6c61ec92fb0 | 75233005f158454438f5dfd5b7c170d1 | Post all locations associated with a given route to the server. | def post_data(points):
cookies, headers = login()
headers['content-type'] = 'application/json'
for point in points:
data = json.dumps(point)
response = requests.post(BASE_URL+"/report", data=data,
cookies=cookies, headers=headers)
time.sleep(1.3)
... | 1 |
7519a3b110403cb1b2ac986b9cc4b4ab | 0959a961943d311d4d14caca9f8b2f44 | 运用 slice存储上一次的结果,又叫 带备忘的自顶向下算法 | res := make([]int, num+1)
res[0] = 0
for i := 1; i <= num; i++ {
if i%2 == 0 {
res[i] = res[i/2]
} else {
res[i] = res[(i-1)/2] + 1
}
}
return res
} | 0 |
6f0a403b44940e94447eec6ffcbc7340 | 8d9a8aefd37dd34f5e0d5a9972df9181 | POST: Assignment11/Create | namespace MVC_Database.Controllers
public class AssignmentController : Controller
[HttpPost]
public IActionResult Create([Bind("CourseID,AssignmentNumber,Title,Description,Credits")] Assignment assignment)
{
if (ModelState.IsValid)
{
_assignmentService.CreateA... | 1 |
4e8bb80a81470169c050524133d9efa6 | ada5db55ee3f909073967d720e65af60 | Returns the meta object for data type '{@link com.example.expensebom02.OfficeLocations <em>office Locations Element Type</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc -->
extendedMetaData="name='officeLocationsElement_._type' baseType='OfficeLocations'" | {
synchronized (monitor())
{
check_orphaned();
com.dynatrace.easytravel.business.webservice.GetLocationsResponseDocument.GetLocationsResponse target = null;
target = (com.dynatrace.easytravel.business.webservice.GetLocationsResponseDocument.GetLocationsResponse)ge... | 0 |
038eb160955f5443c71911afe3bacc3e | 6fb7af6e939f57532aaa3063fc30d5c9 | Put element 'to_add' at the front of the deque pointed to by 'deque_p' | void addToFront(int data, BDeque *d) {
addToIndex(0, data, d);
} | 1 |
a36e46420a515cbf8b0e30aa2991cecc | d3168ad3b914657b609ddf3c621395a6 | 检查数据库上下文是否被初始化。若未被初始化,则抛出InvalidOperationException | namespace Dotmim.Sync
Task<SyncContext> EnsureDatabaseAsync(SyncContext context, MessageEnsureDatabase message); | 0 |
82d3924ab0494cd0d68efe9a2815d941 | ca66d7ea4047877e828292fa3fe13cf7 | 初始化检测类型select组件 | $("#projectype_select").select2({
tags : false,
placeholder : '请选择',
allowClear : true,
});
} | 1 |
d3ec261e3707166293454f72eee33df3 | cfc89e786c4119df39542e2e2ce8b2cb | 获取最新的邀请码 | var cql = "select * from AccessKeys where status = " + "0" +
" and type = " + "\'" + "02" + "\'" + " limit " + "1" + " order by updatedAt asc";
;
console.log("cql: " + cql);
AV.Query.doCloudQuery(cql).then(function(data) {
if(data.results.length !== 0) {
accessKey = JSON.stringify(data.results[0]... | 1 |
fb48a66151d756e1eff1e23eadbcc83e | fd0860e9b904217c3cce62e04e2c4839 | bitwise XOR operation for toggling the YELLOW led | interrupt(TIMER0_A1_VECTOR) TA0_ISR(void){
P1OUT ^= LED;
TA0CTL &= ~TAIFG;
} | 1 |
7e278496f04b3b3e2bc50d12b90a063b | 5e3ce2efcbd00f76d64f750d80497d51 | Displays a single Chowmatistic model. | if request.user.is_anonymous:
return redirect('contour:index')
else:
probabilistic_model = models.ProbabilisticModel.objects.get(pk=pk)
dists_model = models.DistributionModel.objects.filter(
probabilistic_model=probabilistic_model
)
... | 0 |
9426b494bd6d5b040eab99b6ee29cac6 | 5e8a49fce0335118c1a48e409ab00088 | Get an instance of the PDO storage engine | class MariaDbEventStore extends AbstractSqlEventStore
protected function getPdoInstance()
{
return $this->connection;
} | 1 |
8306db7a26bb0cc955bb5624e3244944 | 6dd37949b9125f2273aa14e818604a5b | \brief Setting frequency of SPI's clock to maximun possible. | void spi_high_frequency()
{
SPCR = (0<<SPIE) |
(1<<SPE) |
(0<<DORD) |
(1<<MSTR) |
(0<<CPOL) |
(0<<CPHA) |
(0<<SPR1) |
(0<<SPR0);
SPSR |= (1<<SPI2X);
} | 1 |
b2867fc716342eb93cc3f251b614476c | eec3ef4fb9f39a118350dda9a339901e | 将属性添加到o中 | for(prop in p){
if(o.hasOwnProperty(prop)){
continue;
}
o[prop] = p[prop];
}
return o;
} | 1 |
b4eb42b14b2fa5abaec1f4dc2aeb8e06 | a6b4a9add53fd3dab33b032ad050d1d2 | Generate the random dummy data from uniform distribution | def u_generate(k):
u_names = []
chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789'
for i in range(k):
_str = ''
for _ in range(10):
_str += chars[randint(0, len(chars)-1)]
u_names.append(_str)
gender = ['male','female']
u_genders = []
... | 1 |
147e9e6ec39a052216f96aff66d900bf | 91790825acdc903480a548caf5d5944b | Matrix 4x4 identity | return Matrix4(0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0) | 0 |
d8c09fbfcbc2858b65d8cdcd08a79d68 | 33d35b9d73c07449684191054c7bff7f | Same as {@link ClickHouseClientOption#PRODUCT_REVISION}. | if (value == null) {
throw new NullPointerException();
}
revision_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
} | 0 |
19c17924c82c1f4b285e1fe242f99c7d | c206b01f71f3c641c89ef933b28beb08 | 预设勾选 text | showSelectedState(true);
if (null == mTitleTextList) {
mTitleTextList = new ArrayList<SpinnearModel>();
}
MySpinnerPopMultListArrayAdapter.OnMyMultItemClickListener multItemClickListener = new MySpinnerPopMultListArrayAdapter.OnMyMultItemClickListener() {
@Overrid... | 0 |
a6a720c05995a4d8188202368488535d | 1d7ec85b1bb21e7be406971de3cb141d | 盤面のリスト初期化。16マスのうちランダムな2マスに初期数字を配置する。 | _init_list = []
for _ in range(16):
_init_list.append('')
for _ in range(3):
_init_list = self.product_random_piece(_init_list)
return _init_list | 0 |
6663db6791e8b4980f3db6d9358d7409 | d53f12ac7e4f4f8b5c803c4b21628abf | isEmptyStack:判断栈是否为空 | int ret = -1;
if(NULL != stack){
if(0 == stack->top){
ret = 1;
}
else{
ret = 0;
}
}
return ret;
} | 1 |
dcc57cf0e2672b08186db777f8d36a8c | 27f2b97fcd4c9c5fe53e6ad64619bdc2 | ==============================================================================================================
========== NETWORK ================================================================================
=============================================================================================================... | function Network() {
this.socket;
this.connected = false;
this.disconnect = function() {
this.socket.close();
}
this.send = function(msg) {
}
this.receive = function(e) {
this.processInput(e.data);
}
this.connect = function() {
this.socket = new WebSocket(WEBSOCKET_URL);
this.socket.onopen = function(e... | 1 |
0135c2f33ea93c965c312f38c4e16471 | 35c08f46c8f6d2e6b6a162396a841e74 | Converts a path like [1, 2, 3] to an edge list [ (1, 2), (2, 3) ]. | def loadGraph(edge_file_path: FilePath = 'edges.txt') -> GraphData:
def create_edge_list(raw_data: str) -> list:
def str_splitter(string: str) -> list: return string.split(' ')
def length_checker(l: Sized, length: int = 2) -> bool: return eq(len(l), length)
def str_list_to_int_list(l: list) -> l... | 0 |
b44c284a820d87db15ffa26487f14595 | 608dce871a2abfc7aafd70ffe39e6996 | declaramos el metodo abstracto el cual estara en las subclases pero con diferente comportamiento | public abstract String comunicarse(); | 1 |
d5b6910d14be2aad8921b76e6c9bc4e6 | e906e8ba78ce950ed447bea714fe957e | 获得全服聊天列表 | func Getlist(serverName string, userID int64) ([]byte, error) {
ranzhiServer, ok := RanzhiServer(serverName)
if !ok {
util.LogError().Println("no ranzhi server name")
return nil, util.Errorf("%s\n", "no ranzhi server name")
}
request := []byte(`{"module":"chat","method":"getlist","userID":` + util.Int642String(... | 1 |
038079f94ece8533e47a5e09de778504 | 33073a48036f1de952c247f89efa4fbc | Creates a parser that can auto-complete a command, its options and parameters.
Drastically reduces complexity of implementing `ICommand.autocomplete`.
Note that options are basically skipped if already present and ignored if only body is found. | return CommandParser(
*args,
prog="%s %s" % (os.path.basename(prog_name), subcommand),
description=self.help or None) | 0 |
383c46d44ab00d7316e4b09a8a3f061e | cb9394131529ad0f48c13d1a5fde9bde | This function takes two strings and gives you a string of the unique letters from each string. | if isinstance(union1, str) and isinstance(union2, str):
letters = union1 + union2
len_letters = len(letters)
union = []
for i in range(len_letters):
if letters[i] not in union:
union.append(letters[i])
union.sort()
space = ""
print(... | 1 |
40b773af7d57d785dcda7c3caf520e8a | 418351355b06625ad895a0ce78d7fce7 | Returns the value of the '<em><b>Bonita Model Version</b></em>' attribute.
The default value is <code>"5.0"</code>.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Bonita Model Version</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | String getModelVersion(); | 1 |
c2bc55dbc8c60c3df2b6e5066fdc1185 | 4e1706b0583088330cefb3cb75885559 | Get publication date of latest item in feed. | class Feeder():
def get_modified(self):
while True:
try:
response = self._table.get_item(
Key={
'rssurl': self._feed_url,
'feedid': '0'
}
)
if 'Item' in response:
... | 1 |
aba0965294895800823c8627dbb103ab | c2b490e6db3ffe88cbac020c5780b501 | Prints all elements in two specified arrays (in this programs case, the input arrays) | for(int[] firstNumber : arr) {
for(int [] secondNumber : arr) {
System.out.println(Arrays.toString(firstNumber) + Arrays.toString(secondNumber));
}
}
} | 0 |
52a71c218e56a61c4529b2c6315390b4 | 72c54dd1c1f952060d1ea53f4f2ff4ac | 反回一个不带前缀的表名 | class MY_Model extends CI_Model
function table_name($table_name) {
if (empty($table_name)) {
return;
}
return $this->db->dbprefix.$table_name;
} | 0 |
63f39bcbace23dfef6086770dd6a934c | 1ac36366d8cabadb6dc9868885cef880 | This function turns a given distance in cm into encoder ticks for the
robot drive. | class ElmoUdp(object):
def convert_rad_to_ticks(rad):
return int(rad / ENCODER_TO_TABLE_ANGLE) | 0 |
652ee4a71241348c6b66e529b55ebbf4 | c9212161ff439a00cd40913433c98b23 | Removes any vertex that isn't a part of an edge | Map<Long, Node> newVertices = new HashMap<>();
for (long vert : vertices()) {
Node node = vertices.get(vert);
if (!node.neighbors.isEmpty()) {
newVertices.put(vert, node);
}
}
vertices = newVertices;
} | 1 |
8c0e6edb22155b892ff6cd1feebc78dc | 2946f08b4c8e6a66fde52bbc29958c9b | 共同关注列表 | if request.method == "POST":
loginuserid = cache.get('userid')
if not loginuserid:
return JsonResponse(data={"code": "0", "msg": "fail", "data": {"error": "未检测到用户已登录"}})
user = User.objects.filter(id=loginuserid).first()
lconcern = list(Concern.objects.filter(fans=user).v... | 0 |
adb6cf527818ce3211d4a0d287dc887c | bf8995d0ade49934350f04b03877195f | Получение текущей даты в формате dd.mm.yy | class check
function getDate() {
return $this->date->format('d.m.y');
} | 1 |
bc043a63abcfe59aaf0c564d31798e08 | 96966acf69fab5f1065c9c91b08950fd | This method deserializes the body of the GetMachines operation. | _instance: UpdateMachineRequest,
_reader: BinaryReader
) {
while (_reader.nextField()) {
if (_reader.isEndGroup()) break;
switch (_reader.getFieldNumber()) {
case 1:
_instance.machine = new Machine();
_reader.readMessage(
_instance.machine,
M... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.