query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
34860e3f19496afb9fbe0fea41790c73 | 2b5fa83f3580f2eaab05f5c3f279a284 | 查询一级类目总条数 | @SelectProvider(type = CategoryBuilder.class,method = "count")
int count(Category param); | 1 |
19507dfa0127cc57ab0a151d1ffb5c51 | 00ef1a2f6c97c7df9f160bf7e748f754 | Selected pieces are drawn above the others so that they don't fall behind the other pieces while being rotated | {
float offset = 0.01f;
int n = 0;
foreach (PieceControl piece in this.active_pieces)
{
if (piece == null)
{
continue;
}
piece.GetComponent<Renderer>().material.renderQueue = this.GetDrawPriorityPiece(n);
off... | 1 |
bb1478965ea01dec4fe6dbdad1f1cf47 | f923346cc8a7755d029b6ca2e5e7cd6f | Given a server, return its datastore based on its first disk. | disk = rdisk.replace("r", "")
lines = subprocess.check_output("df").split("\n")
lines = [line.split(None, 8) for line in lines if line.startswith(disk)]
lines.sort(key=operator.itemgetter(0))
mount = lines[0][8]
return mount | 1 |
8497cbce9955b237c65c76ca32e17011 | ca3f51ede14c20fa4903b8845b6ab594 | Acción que se encarga de la edición de partes. | class PartsController extends Controller
public function getEdit($id)
{
$programs = Program::all();
$part = Part::find($id);
return view('admin.parts.edit', compact('programs', 'part'));
} | 1 |
60fee1bc601a709b6564df8709d6aa44 | 0215f2b0bac3f0a47d5731a7d8f42417 | 引数に指定されたアノテーションを除いたアノテーション定義の文字列表現を返します。 | public static partial class types2_package
private static @string stripAnnotations(@string s) {
bytes.Buffer b = default;
foreach (var (_, r) in s) {
if (r != instanceMarker && !('₀' <= r && r < '₀' + 10)) {
b.WriteRune(r);
}
} if (b.Len() < len(s)) {
return b.Strin... | 1 |
3369ac708bca422b8bdf929c7fc1006d | a2259e8eda010a99cb756460be383fc3 | Writes the test case pure text log to the log folder of the test run | error_details_file = "{logs_dir}/{suite}-{lang}-errors.log".format(
logs_dir=self.logs_dir, suite=suite_short_name, lang=self.language)
with open(error_details_file, "w") as error_log:
error_log.writelines((
self.ERR_TEMPLATE.format(flavour="ERROR", test_id=test.id(), error=err)
for ... | 1 |
46517d9c22a03b384b1be046dfbf3c8f | f706e1f24e026c135961b3f0e7f8f0be | Returns the compartment of the species. | int Species::getType()const {
return envo_.getType();
} | 0 |
a4c984bf4d4e722b6d2e3394cbc40726 | 1b337ffc3e696bd3a14c2d9772583439 | Create a popup to ask the user if he is really sure to do an action | appdata = ad;
Evas_Object *pop = NULL;
pop = elm_popup_add(ad->win_main);
evas_object_size_hint_weight_set(pop, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
Evas_Object *btn_yes = elm_button_add(pop);
elm_object_text_set(btn_yes, dgettext(PACKAGE, "YES_ANSWER"));
evas_object_smart_callback_add(btn_yes, "clicked", _info... | 1 |
f27837084feead7849cdd1cbe0751831 | d07b05d46f33bb391e116eaa436bc4d8 | В зависимости от окружения выводим либо рабочие скрипты, либо уже собранные | function websolve_scripts() {
if ( WP_ENV === 'development' ) {
$assets = array(
'css' => '/dist/css/main.css',
'js' => '/dist/js/main.js',
);
} else {
$assets = array(
'css' => '/build/css/main.min.css',
'js' => '/build/js/main.min.js',
);
}
if( !is_admin()){
wp_deregister_script('jquery');
... | 1 |
c2942d333561711a5ac74c3d50a5b5e0 | 924332e2313d97cfc7f1fe0504ef0c42 | Add n to the graph (with no initial edges) if it is not already
present. | class TopoGraph:
def add_node(self, p):
if p not in self._L:
self._L[p] = {} | 1 |
dcf14baee68cf80685fd589b3a89f28e | 8d5576acf2d0f3ddcdaf6d6d503228dd | WHEN: the request method is not GET | public void testAcceptance_10()
throws Exception {
final String request = "Delete /method.php HTTP/1.0\r\n"
+ "Host: vHa\r\n"
+ "\r\n";
final String response = AbstractStageRequestTest.sendRequest("127.0.0.1:18185", request);
Assert.assertTrue(resp... | 1 |
f47ba8b866226fce00947e79c22527ed | dfaefb490806843aaa97aa87e972cbb9 | 글 하나를 조회한다 | export class BoardsService
async onePosts(postId: number): Promise<any> {
const onepost = await this.boardsRepository.findOne({
where: {
id: postId,
},
relations: ['userId'],
});
const result = {
id: postId,
userId: onepost.userId.id,
user: {
nickname: one... | 1 |
a45e703336276c717c52a4fd5d290e45 | 49eb17e5c6f95e1f7c9b186fe369939d | Calculate the Accumulation Distribution Line and Chaikin Oscillator.
Keyword arguments:
df -- DataFrame with High, Low, Close and Volume values
cols -- Dictionary with column names that are not default (default:empty)
Use the default names 'High'/'Low'/'Close'/'Volume' as keys
Output:
chaikin -- DataFrame with column '... | fast = fun_ema(df['close'], s)
slow = fun_ema(df['close'], l)
df['Fast'] = fast
df['Slow'] = slow
df['DIF'] = df['Fast'] - df['Slow']
df['DEA'] = fun_ema(df['DIF'], M)
df['MACD'] = 2 * (df['DIF'] - df['DEA'])
return df | 0 |
4c6f2218df7558d0a116799f9a00e328 | bb00f94442aa0f0b0f1b26f6160a5082 | Se generará un vecino a traves del metodo 2-Opt y si es mejor,
quedara como nueva solucion. | public class Grafo
public static void busquedaLocal() {
for(Integer k = 0; k < populationHijosElegidos.size(); k++) {
Individuo original = new Individuo();
original = populationHijosElegidos.get(k);
Integer i2 = 0;
Integer j2 = 0;
Integer nuevo1 = 0;
for(Integer i = 0; i < original.list.size(); i++)... | 0 |
d46561ea824b26efb7ed53062b7d8f3a | 2ecba3c95ec3e434bc41bbc7e5461032 | Carga la vista para el reporte de servicios por paciente | @Results(value = {
@Result(javaType = Reportes.class),
@Result(property = "codregpen", column = "codregpen"),
@Result(property = "desregpen", column = "desregpen")
})
List<Reportes> regpenservidor(); | 0 |
334a98a775685bb342c0f1a9e1ac9fe4 | 55d97e605a8b6db786879a5860078d51 | Parse $str as an integer and err out if there's any problem with it. | class AssignPoint
def str2int(str)
Integer(str)
str.to_i
rescue ArgumentError
0
end | 0 |
1a282db90168bca76840652116599cd5 | a48625473d5bb1936054dc8778f19804 | Gets a human readable version of a given Delivery State value. | {
switch(input)
{
case "1": return "Draft";
case "2": return "Moderation pending";
case "3": return "Rejected";
case "4": return "Ready";
case "5": return "Test run";
case "6": return "Working";
case "7": return "Paused";
case "8": return "Stopped";
case "9": return "Complete... | 1 |
9fc3070adfaa682bf51c110fd7c06bd0 | 90288f8e22521ec0926ea03985be9955 | Override this method if the component needs to make any changes
before it can close. | public class FastTreeItem extends UIObject implements HasHTML, HasFastTreeItems
protected void afterClose() {
} | 0 |
9dc543222312bf19c6de78cc4e1357cc | 4f1a6cbcb1316d25687b00ba1c7131ac | List the scenarios in this project. | class Params(object):
def get_scenarios(self):
scenarios = self.root.children[0].children_names
return scenarios | 1 |
5a1063cd3780699392cabd522e5affe1 | bf2e895a244f1bad0542e4c6ce7fdcb6 | Converts a UTF-8 string into BIFF8 Unicode string data (16-bit string length)
Writes the string using uncompressed notation, no rich text, no Asian phonetics
If mbstring extension is not available, ASCII is assumed, and compressed notation is used
although this will give wrong results for non-ASCII strings
see OpenOffi... | function util_fixutf8($s) {
if ($s === NULL)
return NULL;
if (!is_string($s))
$s = strval($s);
$Sx = strlen($s);
$Sp = 0;
while (true) {
if ($Sp >= $Sx)
return $s;
$c = ord(($ch = $s[$Sp++]));
if ($c < 0x80)
continue;
if ($c < 0xC2 || $c >= 0xF4) {
break;
} elseif ($c < 0xE0) {
$wc = ($c ... | 0 |
6d680c95051538174b65477f1d65ad73 | 1013298cd1f3e2acf1f05b660cfb7db5 | Expects no args | def test_no_args0001(jrnl):
out, err, rv = run_j(jrnl, [])
assert rv == 0
assert out.strip() == err.strip() == b"" | 1 |
dad53624c4731dc2c6d52ad8ab154fc6 | 34cfd7934199eaced068fe1dcecd987b | Transition buttons to human game. | public class TetrisWindow extends JFrame
public void setAgent()
{
playerButton.setText("Human");
trainButton.setEnabled(true);
numTrain.setEditable(true);
gamePanel.removeListeners();
} | 1 |
db3f3fdeda75f3b7031dbb56007209de | fcdb739f399e9867fa0dcb1354eb17ee | 服务器下发斗翼幻化结果 | function SpiritsController:OnAddWuHunResult(msg)
if msg.result == 1 then
SpiritsModel:ActiveWuhun(msg.wuhunId)
else
end
end | 1 |
c2bc7f762df162b870c0a6b51099565a | bd0d12318cfa78116d1de61e62723e3b | Calculate at which point in the loading bar a section transitions to the next | {
int positions[TOTAL_RECT];
int position = 0;
float minPercent = sectionValues[0];
int minPos = 0;
positions[position++] = minPos;
for (int i = 0; i < TOTAL_RECT; i++)
{
if (sectionValues[i] < minPercent)
{
clearPositions(positions, position);
minPercent = sectionValues[i];
minPos = i;
position... | 0 |
6be9560a5312398accb865dd469a1100 | 3abee0e5f60c9aa327f9d4d5595b893d | 用来设置请求路径;
值是一个字符串数组;
可以设置多个路径共同访问对应方法; | class AuthMiddleware
public function setPath($path)
{
$this->options["path"] = $path;
return $this;
} | 0 |
a64f32d822d0c75dbae99c7130730b9e | 2ad738ae52991925e698d366d75522e0 | Indicates whether the object can be replicated via the getUpdated() and getDeleted() calls (true) or not
(false). | public abstract class InnectisOwnedObject extends IdpWorldRegion
public boolean getUpdated() {
return updated;
} | 0 |
16996de1e36a19c1fadc22bfbb2cf039 | da25f93bd396f395940c0dea84618d52 | 禁用二代身份证读卡扫描输入 | public class FloatingPersonActivity extends PermanentActivity implements View.OnClickListener
private void onReadIDCard() {
Reader.initSerialPort();
Reader.getIdcard(mHandler, ReadOnceDone);
mButtonCaiJiShenFenZheng.setEnabled(false);
mBitmapPhoto = null;
} | 1 |
42775fded6e93ef915dec028a8dd21ff | 479d63dd40b457060fa6ae066d7ba7c9 | We need to load installed providers from the
system classpath (typically the <code>lib/ext</code>
directory in in the Java installation directory)
in the privileged mode in order to
be able read corresponding jar files even if
file read capability is restricted (like the
applet context case). | public class PlatformContext implements com.sun.jbi.platform.PlatformContext
@Override
public ClassLoader getSystemClassLoader()
throws SecurityException {
return this.getClass().getClassLoader().getParent();
} | 0 |
75f184e78d93bade3db889295a771deb | 4101df892413ea9b975826802bceecbf | 统计用户在银联成功购买的订单数 | @Service("ordSV")
public class OrdSVImpl implements OrdSV
@Override
public int countOrdJoinOrdPayWx(Map<String, Object> params) {
return ordDAO.count("countOrdJoinOrdPayWx", params);
} | 0 |
07b6f347c660b9bf1bfe463f42ef7b0c | 6e3cb905a18b817c2744c82c3726cca2 | 現在選択中テンプレートの前のテンプレートを選択する | function select_prev() {
if(typeof($(".select").attr("class")) == 'undefined'){
$("#projcontent ul li").last().addClass("select");
refresh_img($(".select a").attr('title'));
}else{
if(typeof($(".select").prev().attr("class")) != 'undefined'){
var act=$(".select");
$(".select").prev().addClass("select");
... | 1 |
a4d281a32ec6e2444378ac2e7b47efac | af488d3a3c43b32ce378bc32e5df98df | Create the dictianary represantation of block
Returns:
dict: Data of Block | class BlockUser(BaseBlock):
def to_dict(self):
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(
map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x,... | 1 |
5a6f82fd29706c6bcbde924573c346ba | ab2292c70393c404d4ea0fe3138f691c | Add User Data to Firestore Database | firebase.database().ref('users/' + userId).set({
username: name,
email: email,
profile_picture : imageUrl
})
} | 0 |
cdc789b390f1f71741753fec4f8ef698 | 4ed7c2c568cd4aa3782175e87b3b7e41 | Validates the HP. You can add other validation checks here. | {
if (amount > 500M)
{
throw new Exception("Amount cannot exceed $500.");
}
} | 0 |
0fe04ba5b40b0536cdba42c61fb4d27b | 3ebed3190680e8ca620e74bd11135d33 | 当曲线数据点发生变化时触发此事件
该事件用来重绘曲线 | {
AddCurveData( key, values, false );
if (values?.Length > 0)
{
AddCurveTime( values.Length );
}
Invalidate( );
} | 1 |
dcdb07667868e21778bf7271a1dfcf26 | e29849978ab7396a41d39c8321d3fa7a | 获取拥有的私盘数量 | function BagHandler:getOwnNum( ... )
return self._ownNum
end | 1 |
752c4b03892fcc6448e7508bc15aff21 | 10dd98c6b34beb0ff35ca458a89258bc | 根据卖家ID查询账号 | @Repository
public class DepositAccountDao extends SqlSessionDaoSupport{
public DepositAccount findBySellerId(Long sellerId) {
return getSqlSession().selectOne("DepositAccount.findBySellerId", ImmutableMap.of("sellerId", sellerId));
} | 1 |
b01476f159a5dd899f53951d7531bd53 | 8184b6eceafaffc2eebecb1cc5e78d8f | Overloads the ** operator for dual numbers | class DualQuaternion:
def __imul__(self, other):
return self.__mul__(other) | 0 |
21e3ccbc76d365d7e5d69daf0e89a0ba | 6eb357417147364dd98acabc12f02403 | Creates an array and copies the contents of the rope into it.
Runs in O(N). | export class RingBuffer<T>
public toArray(): T[] {
return this.buffer.slice(this.pos).concat(this.buffer.slice(0, this.pos));
} | 1 |
4f7b7857560c828b2e9e7a2d898b5e31 | bf324df5d70ded722ae7d0182aaa51b7 | 解析GUID | StringTokenizer st = new StringTokenizer(objectGUID, "-");
String[] s = new String[st.countTokens()];
for (int i = 0; st.hasMoreTokens(); i++) {
s[i] = st.nextToken();
}
String delimiter = "\\";
StringBuilder sb = new StringBuilder();
sb.append(delimit... | 1 |
0e54086a636b4c63de1a6a262d8bcbac | 6513fe032ef38bacaab9d7fbd2c7b0ad | Check the prerequisites for data registration, such as checking the link source / destination data or already creating the link. | public async checkPrerequisite(): Promise<CommandResult> {
return new CommandResult();
} | 0 |
43b558dc2072adefbb1e3c487b31ba62 | 6f62903604cf81be859235ebf151ebca | Returns the lowest slot that the node has information about in its ledger.
This value may increase over time if the node is configured to purge older ledger data | public int getLowBound(); | 1 |
98c19c009225aeed42896d87630f9447 | ff83c3f7900adb110160e1785ee634f0 | Adds a "locate me" button to the toolbar | public class BankReconPostScreen extends Screen
public void addToolbarButtons(ToolScreen toolScreen)
{
new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, MenuConstants.POST, MenuConstants.POST, MenuCon... | 0 |
07c576421d143972a2860af433121031 | 41afaa213599009bb8eaa6ac86974bee | Setter for {@code moves.type_id}. | @Generated (
value = {
"http://www.jooq.org",
"jOOQ version:3.6.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings ({"all", "unchecked", "rawtypes"})
public class MovesRecord extends UpdatableRecordImpl<MovesRecord> implements
Record15<... | 0 |
3e23837b68b60a43ae9fff4e9f6a7afb | e05fc05d471fd4bba83661c8e5325701 | returning new virtual table object for Many type | {
lua_State* state;
Data_Get_Struct(rb_iv_get(self, "@state"), lua_State, state);
rlua_push_var(state, object);
if(lua_getmetatable(state, -1)) {
VALUE ref = rlua_makeref(state);
lua_pop(state, 2);
return rb_funcall(cLuaTable, rb_in... | 0 |
33d4c2e3ca4e646947fb507fb44607b6 | 2addd4dc94b7916dbacc3ab3a67142f1 | Computes S, the premaster-secret. | randfunc = self._key._randfunc
if self._saltLen == None:
sLen = mhash.digest_size
else:
sLen = self._saltLen
if self._mgfunc:
mgf = self._mgfunc
else:
mgf = lambda x,y: MGF1(x,y,mhash)
modBits = Crypto.Util.number.size(sel... | 1 |
76201f6a8a2067335d7955a9033048dd | 07a63a3277ba2a508bd34a18a0740daf | 判断是否为旋转子串 | {
if(input.length != rotatedString.length)
return false;
int marker_end = 0;
int marker_begin = 0;
for(int i = 0; i<input.length; i++)
{
if(rotatedString[i] == input[0])
{
marker_end = i;
for(int j = i; j<rot... | 1 |
c6b833492e2fb5d14c9d53d97a3b118b | a8ac6ab39a688a60bf37f48e2be605f0 | Transf�rer un fichier Excel vers une liste | def list2Xlsx(listXlsx,nomFichierXlsx,paraGen):
racineChemin = ouSuisJe()
racineCheminSRep = racineChemin + paraGen["cheminData"] + "/"
nomXlsxComplet = racineCheminSRep + nomFichierXlsx
import openpyxl
wb = openpyxl.load_workbook(nomXlsxComplet,data_only=True)
ws = wb.active
nbreLignes = le... | 0 |
80f159c0aca81a2189c2e9edac6b4b05 | 9fcb81b011b0ac082402ed5eafe3189b | If an empty filepath is passed, we should raise
an InvalidArgumentException. | class FolderTest extends FilesystemTestCase
public function testPathException(): void
{
$this->expectException(InvalidArgumentException::class);
$filesystem = $this->getFilesystem();
$filesystem->folder('');
} | 1 |
6a85371114af2e38edfcc61904eb0358 | 7ebf21b41a36478bfbc02ec2da70dd4e | 根据用户ID和分类ID获取当前用户某一分类下的所有文章 | namespace BlogSystem.Core.Controllers
[ApiController]
[Route("api/article")]
public class ArticleController : ControllerBase
[HttpGet("list/{userId}/{categoryId}")]
public async Task<IActionResult> GetArticlesByCategoryId(Guid userId, Guid categoryId)
{
var list = await _articleS... | 1 |
2452b20e1b8b6214916fba8c2749a607 | 7e43772fe278a0ca82b4811995fce2cc | Perform iterative Depth-First Search | class DepthFirstSearchSolver():
def dfs_visit_nr(self, pos):
from ch07.list_stack import Stack
stack = Stack()
self.viewer.color_cell(pos, 'blue')
stack.push(pos)
while not stack.is_empty():
cell = stack.pop()
self.master.update()
if self.refre... | 1 |
8f355c90fd92be0a1510a4ba8b3659d1 | aefb7339c57fd7d014e129e17bb03b64 | Return the filterrad setting. | class AppParameter
def get_filtering_radius
result = send(FILTERING_RADIUS_FIELD)
result.presence || 7
end | 1 |
74d912b90a4b5ecf42f18ded68c29e6e | 77693a0416564d2a18f2158814918f58 | parse and output a uint16 value | {
uint16_t res = load_16_le(*p);
*p += 2;
fprintf(fp, format, res);
} | 1 |
03c997f88e4b5791ebeda4e76e7eb69a | 67fdc89c40789e74be73c58b45cd0888 | Reads and discards the given number of bytes from the input stream,
of the stream was reached.
If there was a problem reading from the stream. | long remaining = n;
int nr;
if (n <= 0) {
return 0;
}
int size = (int)Math.min(MAX_SKIP_BUFFER_SIZE, remaining);
byte[] skipBuffer = new byte[size];
while (remaining > 0) {
nr = read(skipBuffer, 0, (int)Math.min(size, remaining));
... | 1 |
08a94558a9739ac046b5d660cedf1da6 | 684e57b53bbcf89085b7466016b7f67e | 返回0表示不能進行常數折疊,返回1表示能進行int常數折疊,返回2表示能進行float常數折疊 | void translator::constant_folding(vector<postfix_elem>& postfix_tmp)
{
cout << "Postfix notation before optimize:" << endl;
for(int i = 0; i < (int)postfix_tmp.size(); i++)
{
cout << postfix_tmp[i] << " ";
}
cout << endl;
deque<postfix_elem> optimize_deque;
bool is_changed = true;
... | 0 |
4be149930fc9be9ea5d5603c50c7b7a7 | fefc7e340b127510d005e86699eeffd2 | @brief requests to send the SBC/AAC data to BT stack.
0 = success
!0 = failure
This API is used for send the SBC/AAC data to bt stack. | bt_app_id_type app_id,
uint16 min_frame_size,
uint16 max_frame_size,
uint8* req_dst_ptr,
uint16* req_len_ptr,
const char* srv_name_ptr )
{
#ifdef FEATURE_BT_EXTPF_SAP
#error code not ... | 0 |
53c7a8d7a414637771d744ab9eec96cc | 30db5b640e9a2786ae9f225500e1fabf | 運用ログ一覧取得したデータをテンプレートに設定する | for (var log in logs) {
html += '<tr>';
html += '<td class="left-align">' + logs[log]['id'] + '</td>';
html += '<td class="center">' + logs[log]['data'] + '</td>';
html += '<td class="center">' + logs[log]['datetime'] + '</td>';
html += '<td class="right-align">';
html += '<a class="btn red" o... | 1 |
adc2d7718db737e7de8f7f501cbf7b11 | 073b38fd0395cd69f4d51eef09518771 | オフスクリーンをそのままフロントにコピーする (描画システムのデバッグ用) | {
#if !BUG1967
if (texture == null)
{
throw new ArgumentNullException("texture");
}
if (! texture.IsRenderable)
{
throw new ArgumentException("Texture is not renderable.", "texture");
}
#endif
Fra... | 1 |
287cc1ad2705e4c6b58c89bc0837f35a | 23fe156833496b177354984bf44d8248 | Returns the meta object for the containment reference '{@link org.xtext.example.symboleo.symboleo.Obligation#getAntecedent <em>Antecedent</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | public java.lang.String getFttcfab_ant(); | 0 |
06053cf883f146a8ff713e8b400ee77c | e2d266bad2d0d20d14bb742e80cf3db2 | create a named type | static void typeDef() {
typedef int Integer;
typedef const char *String;
} | 1 |
da4b3110040e128a3396883af6408472 | 0aaf2c0656d76a0c47501ff5f8d06a6b | Returns the gateway hub address. | GatewayAddress getAddress(); | 1 |
a97f490846e40ca9d8e68169f9e2e027 | b8d9844248db7ecb872d450639e78724 | Goes to proper fragment after config changes or start fragment at 1st launch or from notification | class MainActivity : AppCompatActivity()
private fun configureFragment() {
when (supportFragmentManager.findFragmentById(R.id.main_frame_id)) {
null -> replaceFragment(MainFragment.getFragment())
is MainFragment -> replaceFragment(MainFragment.getFragment())
is ResultFragment... | 1 |
598476a172173e1723de9128aced13c4 | fa2ffc9d99108844c877f4f6f540f442 | Retorna el descuento en el carrito de una session | class AcceptanceTester extends \Codeception\Actor
public function getDiscountFromCart()
{
$I = $this;
$cartPage = new cartPage($I);
return $cartPage->getDiscount();
} | 1 |
63fd893ccbb43f7a3b424aef63f50166 | 05efd985ecef635e7952e06199852b97 | \brief Device enumeration step 5
Requests the USB device descriptor.
This setup request can be aborted
because the control endpoint size is unknown. | static void uhc_enumeration_step5(void)
{
usb_setup_req_t req;
req.bmRequestType = USB_REQ_RECIP_DEVICE|USB_REQ_TYPE_STANDARD|USB_REQ_DIR_IN;
req.bRequest = USB_REQ_GET_DESCRIPTOR;
req.wValue = (USB_DT_DEVICE << 8);
req.wIndex = 0;
req.wLength = offsetof(uhc_device_t, dev_desc.bMaxPacketSize0)
+ sizeof(uhc_dev... | 1 |
a7660906e5f54d40a170f1711e857476 | 55ffc9151463ab96668c562b7468f3e9 | Adds CWebKit class to the class list | namespace Unity.GraphToolsFoundation.Editor
class BlackboardField : BlackboardElement
protected override void PostBuildUI()
{
base.PostBuildUI();
AddToClassList(ussClassName);
} | 0 |
09480f97d93db0a776370de23445797d | 51acbf6de6d3aba0f48444a25e8696ec | Returns the global force vector | {
if (!_enabled)
return gf.resize(0);
const unsigned NGC = num_generalized_coordinates(DynamicBody::eSpatial);
gf.resize(NGC);
Vector3d f = _forcecom.get_force();
Vector3d t = _forcecom.get_torque();
gf[0] = f[0];
gf[1] = f[1];
gf[2] = f[2];
gf[3] = t[0];
gf[4] = t[1];
gf[5] = t[2];
return g... | 1 |
a473d55674745b09ad60eb4f883cfa20 | 49427c28fe3e89e9286298408c7a3918 | 验证花卉编号是否存在 | Integer selectVarietyExist(String pinzhongid); | 1 |
e4cef4398a5c403a1447bb8ca6e4f8d8 | 8858091754b2b33837bef99fbd4b3a60 | Get all (recursive) of the directories within a given directory. | function globRecursive($directory, &$directories = array())
{
foreach (glob($directory, GLOB_ONLYDIR) as $folder) {
$directories[] = "{$folder}";
globRecursive("{$folder}/*", $directories);
}
return $directories;
} | 1 |
15713feab55e9695d6019e7f63c2c3b8 | 015df80dc73c346c7e19d13381b20ec6 | 根据多个学校ID删除数据 | @Override
@Transactional(rollbackFor = Exception.class)
public void deleteBatchIds(List<String> stringIds) throws Exception {
collegeMapper.deleteBatchIds(stringIds);
} | 1 |
8795ff35838487f1269fc09431658d5d | b79e706003ce43de6b2380b1d2ba9daa | Get totalPrix | float prix = 0;
for (int i = 0; i < lignes.size(); i++) {
Payable ligne = this.lignes.get(i);
prix += ligne.getPrix();
}
return prix;
} | 1 |
fd34a8de993e3fa598e1720d2b2900e0 | 8c3cf7e19cce0b8610a4aad7b81b68f9 | replace all Zeros after Point in Double Values | {
Char[] charArrVal = val.ToCharArray();
bool removeFlag = true;
while (removeFlag)
{
if (charArrVal.Length > 1 && charArrVal[0] == '0' && charArrVal[1] != '.')
{
val = val.Substring(1);
charA... | 0 |
5d8599484630ef8cee572fa18e4c01a2 | f287c209a6fd2d0a6279a6fbd68bf10b | Add Market Order | return _post('createMarketOrder', {side: side,
type: type,
quantity: quantity,
limit: limit,
trading_pair: trading_pair,
transaction_password: tpass,
secret_code:secret_code
});
} | 1 |
199e0c3a5798647dc8186bf5c8d09c27 | aa3b4af81c0304a7d89aedba08b7e3ed | WTL_RSRV_PS 총 갯수를 조회한다. | IDataSet responseData = new DataSet();
IRecordSet rs = dbSelect("DSCHMGMT001.dSearchPopSchMgmtBrwsCnt", requestData.getFieldMap(), onlineCtx);
responseData.putRecordSet("COUNT", rs);
return responseData;
} | 0 |
2b65651ab9755fbaff000a5dd875e382 | ec3f7bf9a21e2ebea75873a141a68298 | Asynchronously registers the device for native notifications. | namespace SharpDX.XACT3
public partial class AudioEngine
public void RegisterNotification(NotificationType notificationType)
{
var notificationDescription = VerifyRegister(notificationType, typeof(AudioEngine), callback ?? (callback = OnNotificationDelegate));
notificationDescription... | 0 |
bf4a078ed35280d1987e4e069fded7cc | a6e85e872cef53217d801c90f9a2e22b | 获取中国农历节日字符串。 | {
$l = array();
$key = $this->month . '-' . $this->day;
if (!empty(LunarUtil::$FESTIVAL[$key])) {
$l[] = LunarUtil::$FESTIVAL[$key];
}
if (abs($this->month) === 12 && $this->day >= 29 && $this->year != $this->next(1)->getYear()) {
$l[] = '除夕';
}
return $l;
} | 1 |
f19e1e7f61bc52e53529f21598114edb | f2732c4699d110ef776e36fa7ee220b8 | Returns maximum number of matchings from LEFTSET to RIGHTSET. Recursively calls Bipartite matching function. | int maxMatch(){
vector<int> assign(M, -1);
int count = 0;
for(int u = 0; u < N; u++){
vector<bool> visited(M, false);
if(bipartiteMatch(u, visited, assign)) count++;
}
return count;
} | 1 |
43a651b99c546f02034019dc165c8dc9 | bb9cd846cf3d9fed49bbe00d967e567d | 计算促销规则 | class b2c_cart_postfilter_promotion implements b2c_interface_cart_postfilter
private function _init_rules($aData) {
if ($this->_rules) {
return true;
}
$sales_rule_order_model = $this->o_sales_order;
$current_member = kernel::single("b2c_cart_objects")->get_current_member();
... | 1 |
993c8ec127b39d6318b88af7b34e2c37 | 18364db3d7c5254863467b6a111448e1 | Functie care citeste continutul fisierului al carui nume il primeste ca parametru si il afiseaza pe ecran | ifstream fileToRead(readFileName);
if (fileToRead.is_open()) {
string line = "";
while (!fileToRead.eof()) {
getline(fileToRead, line);
cout << line << "\n";
}
}
else {
cout << "\n" << readFileName << " not found!\n";
}
fileToRead.close();
... | 1 |
8bd4ad8144680e5c8f886f5bdff03960 | 2b3a517b46d091042c06e38e4bcbf6f8 | Control /RS signal. | void LCD_SetRS_COMMAND(void) {
GPIO_ResetBits(LCD_CTRL_GPIO_PORT, LCD_CTRL_RS_PIN);
} | 1 |
69824e7be2cc33d4cf4d80b41f5e8346 | ee0df0bb179e44da36f0cd8f85a0b6d8 | Dibuja en pantalla de forma dinamica todas las posibles respuestas | for x in range(partida.modo):
for y in range(partida.modo):
if partida.tablero_juego[x][y] == '0':
pass
elif '*' in partida.tablero_juego[x][y]:
temp = tablero.fuente.render(partida.tablero_juego[x][y][1], True, partida.color)
pos_matri... | 1 |
3f7d8e4b16e4ec1534cde2220684d05d | 341430bbdcae5437101f8d1b084fb0fb | # compresses -log10(p_value) so that very significant p-values (mlog10(pvalue) >= threshold) are constrained | adjust_pvalue<-function(pvalue)
{
chisq <- qchisq(1-pvalue,1)
lambda=median(chisq)/qchisq(0.5,1)
chisq=chisq/lambda
pvalue=pchisq( chisq, 1, lower.tail = F)
return(pvalue)
} | 0 |
428b706af39d6ffde6274d1f599fc228 | 16b0db9168a06bccfcf26c859afa1263 | @brief Reads interrupt flag regester on VCNL. | int flashReadFlagRegister(void){
return 0;
} | 0 |
69891ebb4e2e361c1ea1da75f1b26518 | 7c345f5d7fa2aaf4ed4e6ea648b371cb | 获取thrift rpc客户端。 | class Manager extends \bma\thrift\ThriftObject
public function getClient($name) {
$client = \bma\objpool\Manager::getObject('thrift', $name);
if ($client)
return $client;
$connConf = $this->getConf($name);
if ($connConf) {
return $this->open($name, $connConf);
... | 1 |
641b88dcce204a70f6cd7f58731dfdd3 | aca7a927a23465376986113c3d0bde8d | isInDeletion checks if the subscription needs to be deleted. | {
if (!$end = $this->getEndDate()) {
return false;
}
$end->setTime(0, 0, 0);
$subcriptions = $this->getCustomer()->getSubscriptions();
return !!(new Collection($subcriptions))->first(function (QuerySubscription $item) use ($end) {
if ($item->getId() ==... | 1 |
30d511f8ce78d282aea47d843b7a6999 | 05f3c4f6e5fbf7d4ff2cb29c2e79fec7 | mở cửa sổ trắc nghiệm ôn tập | {
paneldonthuoc.Visible = false;
panelnoisoi.Visible = false;
panelxetnghiem.Visible = false;
panelxquang.Visible = false;
panelsieuam.Visible = true;
panellamsang.Visible = false;
panellichsukham.Visible = false;
} | 0 |
56888c8a12fd3e9f9841230fbb7df0cf | c71ac6c47e2ffcd14123eff093effb19 | 将文件最后修改时间作为最后加载时间 | public class LLimitDiskCache extends LBaseDiskCache
private void hitFile(String key) {
File f = new File(PATH + super.getFileName(key) + ".jpg");
if (f.exists()) {
long currentTime = System.currentTimeMillis();
f.setLastModified(currentTime);
synchronized (useDate) {
useDate.put(key, currentTime);
}... | 1 |
c5fd731acf21b1f15c3f7faeadb572f3 | 2cb5b42d4cf70d1fefd3c8cdadca5ba9 | Processes form-submitted addresses for inclusion in
the recipient list | public abstract class WebMailControls extends FlowPanel
protected abstract void handleAddresses (List<EmailContact> addresses); | 1 |
6d2719ae8d98937ff7dfc38967314eed | ea82edc3e7c287404a96a946be6a538d | Reads eight-bytes signed integer from the current stream using big endian bytes order
and advances the stream position by eight bytes | public static class BinaryReaderExtensionMethods
public static Int32 ReadInt32BigEndian(this BinaryReader reader)
{
if (reader is null)
throw new ArgumentNullException(nameof(reader));
var bytes = ReadBytes(reader, 4);
return IbmConverter.ToInt32(bytes);
} | 0 |
b7c01ca14fb4b91b1cbfacaa36fcaf21 | 86f69ea14b90be8b918115896a218ab0 | Salva os dados do usuário no armazenamento do servidor | public class Preferencias
public void salvarDados(String identificadorUsuario, String nomeUsuario,String storageIdUsuario, String fotoUsuario, String sexoUsuario){
editor.putString(CHAVE_IDENTIFICADOR,identificadorUsuario);
editor.putString(CHAVE_NOME,nomeUsuario);
editor.putString(CHAVE_ENDERE... | 0 |
d3d4d26818b9b4b9a481194767d11c26 | 6aed80b93a97ac2f5cf394f911c8bf4c | Setter for <code>appcenter_mall_data.t_mall_floorproducts.FloorId</code>. 楼层ID | public class TgDosMerchDO{
public void setMallId(Long mallId){
this.mallId = mallId;
} | 0 |
46669dcc71dac91c55c46ec8ec4236df | b92ea7ddd9942345969ce863751704f6 | Constructs a Band from a dict.
Returns:
Band: The Band deserialized from the JSON dict. | key = '_Beta__p'
if key in jsonObject:
p = int(jsonObject[key])
key = '_Beta__q'
if key in jsonObject:
q = int(jsonObject[key])
key = '_Beta__l'
if key in jsonObject:
l = float(jsonObject[key])
key = '_Beta__width'
if ke... | 0 |
576f0f351bfa6bb250558954a46240e2 | d248fddf5a65a4eac71a026076af6b0f | Extension method to convert TeraJoule to ZettaElectronvolt | namespace Qkmaxware.Units.Energy public static class JouleToElectronvoltConversionsConversions
public static Quantity<double, ExaElectronvolt> ToExaElectronvolt<T>(this BaseQuantity<T, ZettaJoule> val) where T:IConvertible {
return new Quantity<double, ExaElectronvolt>(
Convert.ToDouble(val.Value) *... | 0 |
4a778acb9cd04c38c13690f41cbefdb0 | ea71c71907353c96282a172c2a71d15e | 获取ts参数 | namespace ControlSystemDesign.ControlModel.ModernControl
class StatementSpace : ControlModel
public override double GetTs()
{
return Ts;
} | 1 |
93e36f1b86c8d70a7c5d65710152b960 | ea70ce0fd601432742a4947085b9daf1 | Accumulate odom and boundary data over time | current_odom_time = rospy.get_time()
global current_odom_t, current_odom_r, last_odom_time
if last_odom_time == 0:
last_odom_time = current_odom_time
else:
time_delta = current_odom_time - last_odom_time
linear = data.twist.twist.linear
angular = data.twist.twist.angular
... | 1 |
b4bf9c8158867f83232ca01745ec8f47 | 83dfd10b87ebf36a8f2744975e5fcd7f | Cette méthode permet d'annuler l'opération complexe courante,
en annulant chacune des opérations simples qui la composent. | public void annuler(); | 1 |
3c1496b55321330ea1d9ab7c9d339d51 | a4b24505e5afe30495bc481498e93c8d | Get the unit should review today for a user | namespace MemorizeHelper.API.Controllers
[Authorize]
[Route("api/[controller]")]
[ApiController]
public class MemorizeUnitController : ControllerBase
[AllowAnonymous]
[HttpGet("GetReviewTaskToday")]
public async Task<IActionResult> GetReviewTaskToday([FromQuery] MemorizeUnitParams memori... | 1 |
d7907666621ccb94193b5bcb5ef2edb3 | 7ea62063d38e12e9b8fce754b680d49d | 全データをテーブルで表示 | function show(data) {
$(function() {
$('#table').empty();
$('#iimg').empty();
for (var i = 0; i < data.length; i++) {
var no = i+1;
var favorite = data[i].favorite;
if (favorite == '0') {
var favo = 1;
var favoword = '登録';
var color = 'btn-primary'
} else if (favorite == ... | 1 |
155036b203308298f20b6ad271f33667 | 4cfecd3f2129b3281b85eba82c9723d9 | Description:
- Builds a feed forward network with relu units. | def create_fc_net(inputs):
x = tf.layers.dense(inputs=inputs,
units=512,
activation=tf.nn.relu)
outputs = tf.layers.dense(inputs=x,
units=256,
activation=tf.nn.relu)
return outputs | 1 |
87da6e9511f074fbea321f2120dfdf1c | ad4fbb9d7da3fe7fecb8a848e4697821 | liste des créneaux horaires d'un médecin | {
$planning = Planning::where('medecin_id', Auth::user()->medecins[0]->id)->get();
$days = ['Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi','Dimanche'];
return view('planning.index',compact('days','planning'));
} | 1 |
1c1a701e7fe3c6c3138cd3ba2af8c570 | 4cd27bbb1954c43c83053a12d04aff40 | -> return the current log file (i.e log file of the day)
-> create one if it does not exist | class MyDailyLog:
def getLogFile(self):
self.rightNow = datetime.datetime.now()
return self.getLogDir() + "/%s.txt" % (self.rightNow.day) | 0 |
4c00bf02967e2262e17fafa09ec37b72 | e06e08252968b59e7d6162715a267389 | \brief Méthode servant à ajouter un processus dans une file de l'ordonnanceur | public class Processus{
public static void addToFree(Processus p){
free.add(p);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.