query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
1fca5b37efdfdcab123eb3d75fc47b0e | cf5893b788830a1646d53993eca6b70f | GET: tblRequests | {
AppUser user = await _userManager.GetUserAsync(User);
List<RequestForInfo> requests = _context.Requests.Where(r=> r.Requestor == user)
.Include(r=>r.ResponseInfo).ToList();
return View(requests);
} | 1 |
59fe2ad85c75863d5a13c9e32457180e | d76f20034af774728cef4619a0cd7102 | 忽略好友请求结果 | abstract class BotPlugin
open fun onFriendRequest(bot: Bot, event: FriendRequestEvent): Int {
return MESSAGE_IGNORE
} | 1 |
ea81164ddc0acc6dd04a9dbfdd5e6db9 | 212d255da34addcef4f8a4b52a0d90c8 | parse the slot contents for format:
NAMES\n
entity.index.option=my port name\n
set up a state machine for the various portions | while data.find('_99') != -1:
edge = data.find('_99')
data_piece = data[:edge]
data = data[edge+3:]
if self.state == '__GetName__':
self.HandleName(data_piece)
elif self.state == '__Waiting__':
self.GetReady(data... | 1 |
a05a0ff4c8617c2e90618eee26a131bd | fd4adacc36c3fabf9029fcc848a26a74 | Generates n (i.e. TEST_SAMPLE_COUNT) number of test sample. | {
if (outputPath == NULL || filename == NULL || ppsFuncs == NULL || count < 1)
return;
char *file = SL_StringAppend(outputPath, filename, "_Test.c", NULL);
FILE *fp = fopen(file, "w+");
if (fp)
{
char *header = SL_StringAppend("#include \"", filename, ".h\"", NULL);
char *hea... | 1 |
de5fc29a6518d88c0ec4f5e4905acd5a | 24cfb6067ed9ac455509673f1953c8f0 | 设置歌曲名称 | class LyricShowView : View
fun setSongName(songName: String) {
this.list.clear()
list.addAll(LyricUtils.parseLyric(LyricLoaders.loadLyricFile(songName)))
} | 1 |
72e147eaa700ee001e60fb60561239cd | 25e01817f6ea95388800136cfc846964 | 结束一行的写入 | void writeNewLine()
{
WriteText(hFileWriteHandle, nIoResult, "\r\n");
bFirstNumberOnLine = true;
return;
} | 1 |
eab64ad7462b9eb0d5b4266745adac52 | e275c2161d32ff0fe6799f0e78a43fcd | get all previous searches and set it to adapter of autocompletetextview | mSearchHistoryLayout.setVisibility(View.VISIBLE);
mHistoryList = new ArrayList<>(mPresenter.getHistory());
Collections.reverse(mHistoryList);
mHistoryAdapter = new ArrayAdapter<>(getActivity(), R.layout.list_item_history, mHistoryList);
mSearchHistoryListView.setAdapter(mHistoryA... | 1 |
90128b498c9b95dd497efd6ed6762b24 | c8420d1e3a9518043a0626223dfefd99 | 연결리스트 -> python 리스트로 변환 | python_list = []
if self.head is None:
return None
node = self.head
while node:
python_list.append(node.value)
node = node.next
return python_list | 1 |
613b8eeb1093b93cc165bfd9750f7d41 | 1c161bd0574cc646738eb49c44d4d285 | 调用类的静态方法,不管是 public 或者 private 的都可以。 | Class<?> clazz = MethodCallee.class;
Method method = clazz.getDeclaredMethod("packagePrivateMethod", String.class);
method.setAccessible(true);
Object result = method.invoke(clazz.newInstance(), "Invoke");
System.out.println(result);
} | 0 |
b4b98cf2470a1eaa6e2a74ab6391b5ac | 101051fb66914d20d456c221e551e12e | Gets the value of the collMvmnt property. | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SecurityCharacteristics3", propOrder = {
"id",
"pos",
"valtnPric",
"collVal"
})
public class SecurityCharacteristics3
public ActiveCurrencyAndAmount getCollVal() {
return collVal;
} | 0 |
f0699008c7c185f0e521e972c17e363c | 73cf08efab2133f99aeabadc0b9b7fa6 | Finds all the classes of a specific student | public String findClassByStudentId(int studentId); | 0 |
9c9aa48517ddb507dfdd3b261a98555a | 3b05a966b7bc63b53817c78b7701ed07 | get variables by numeric index or by the folder name. | void NcVar::getVar(const vector<size_t>& startp, const vector<size_t>& countp, const vector<ptrdiff_t>& stridep, unsigned short* dataValues) const {
NcType::ncType typeClass(getType().getTypeClass());
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == N... | 0 |
1dbe593d6701a368c6ad46b46e2c2c71 | 30eebd8a8b91eef8ece914802ba47b29 | Method executes during page load for Detailed Summary Page | namespace PL
public partial class tblNDTLVersionsCheckerSmry
public void SummaryPageLoadExit()
{
} | 0 |
2efde48f269ecfd00b3de165c8ecae63 | b3c6efcfcf7f109d670e62cef0aa8e1a | 根据设备id查询线路 | @RestController
@RequestMapping("/lineview")
public class LineViewController
@RequestMapping(value = "/getLineById", method = { RequestMethod.POST, RequestMethod.GET })
public String getLineById(String id) {
return lineViewService.getLineById(id);
} | 1 |
99afbd079d9b547131c243f30d5e5f61 | 4505b211d1a8dab80190090f9721ccf9 | 阻止对话框关闭 | void CUserSnapInfoDlg::OnClose()
{
EndDialog(IDCANCEL);
} | 0 |
b6eb67d2791c1f543ef35afd811b3102 | 09cb895e906691ab3875dd7f44801bab | 复制文件到模版库 | public class ManuFileService
public void copyTemplateToProject(String typeid, String projectid,
String taskId, String newTaskId) throws Exception {
if (taskId == null || "".equals(taskId)) {
throw new Exception("底稿编号不能为空");
}
File file = new File(getProjectDir(projectid).getPath());
if (!file.exists()) {
... | 0 |
ddd96ec0aae8c580189fed80137c888a | 39cd3314d5bf0674f3c86c147567bafe | Marks a message as faulted and moves it the error queue on the bus. | class MessengerBase(object):
def mark_failed(self, dispatch, error_log):
dispatch.error_log = error_log
self._st['failed'].append(dispatch) | 1 |
1edb166bb80c42ce15467b840ff4ccf4 | 3d37dc7dbd5f20f624b8cbd3926b60c2 | Method will increase any incomplete process's turnaround time by one. | void TurnAroundTime(int processes[], int n,int bt[], int wt[], int tat[])
{
int i;
for (i = 0; i < n ; i++)
{
tat[i] = bt[i] + wt[i];
}
} | 0 |
0ec8f15ea8b0e3ce881acb7a7da99cb6 | 4ad44e8ec897232c6bc41bc7c603112c | Returns the meta object for the '{@link Implementation.BookingComponent_BookingHandler#bookingAvailable(java.util.Date, java.util.Date, java.lang.String) <em>Booking Available</em>}' operation.
<!-- begin-user-doc -->
<!-- end-user-doc --> | BookingComponent_BookingHandler createBookingComponent_BookingHandler(); | 0 |
20aaa464f4a87f9228fbf37339ac2113 | 8d714cad8f8bb61839884a92c923e2b8 | @brief Set RC channel selection RUN mode(AUTO/Manual) | {
CCAPM2 = (CCAPM2 & 0xFE) | (run);
return FSC_SUCCESS;
} | 1 |
b956dcdf2f1ee9eef00f92413015dd52 | 7829e48a79254f9e9b5b5344986296aa | 引数に含まれる石と自分が持つ石の差集合を返す | function difference() {
let param = Array.from(arguments);
return param.reduce((prev, cur) => {
return new Set(
[...prev].filter(
x => 'has' in cur ? !cur.has(x) : !cur.includes(x)
)
);
})... | 1 |
209abb90ce7ba32a382dfe82d742ba4f | 5c47f22232f39b73e9ac48c9e57f990d | Devolverá True solo si todos los elementos obtenidos en tirada son iguales | function testJackpot(result) {
return result.every((x) => x === result[0]);
} | 1 |
dd5f1d91946ed27df5a6bbdbd64e0abe | 0ca7093fefc68340e98fec2c86102492 | Sets image uri. | public class ItemPostRecientesCreador
public void setImagenURI(String imagenURI) {
this.imagenURI = imagenURI;
} | 1 |
e565f9c16ae1c299875fee39121eceea | 6ddde65e23de9c914856e9a7e989115b | Add/Remove a reseller child's Email/SMS credits. | class ResellerApi
public function updateChildAccountStatusWithHttpInfo($childIdentifier, $updateChildAccountStatus)
{
$returnType = '';
$request = $this->updateChildAccountStatusRequest($childIdentifier, $updateChildAccountStatus);
try {
$options = $this->createHttpClientOption()... | 0 |
971bbafb7573d0730cb0177d5c50aede | 319897eba655177b4cf9fa5d08aaf5ed | Emulacja zdarzenia związanego z pojedynczym wciśnięciem klawisza | {
BYTE keyState[256];
GetKeyboardState((LPBYTE)&keyState);
if(keyState[key] & 1)
{
keybd_event(key, 0, KEYEVENTF_EXTENDEDKEY, 0);
keybd_event(key, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
}
} | 1 |
bb19df6ecd1c661a6a52298ca5a30ece | a20303c17880a73b88106f7a573c88cc | set of actions the private key of this Certificate Authority can be used for | @CollectionMax(1)
public List<KeyVaultCertificateLifetime> getLifetimeAction() {
if (lifetimeAction == null) {
lifetimeAction = new ArrayList<>();
}
return lifetimeAction;
} | 0 |
c48555aa71db69e0f53bdbde82a8e359 | 9559cd21a9333d9ea2482d0607c10e91 | 指定した勉強会をロックする. | public function lockout($id); | 1 |
0abcc61c7b66c68ad1a7d25a5378dd55 | c04436c84e4e04e3bb416385de9a4c5a | Get all the userExtras. | class Page extends FrontendBaseObject
public function getExtras()
{
return $this->extras;
} | 0 |
4950b8c3440e6bb8bff3e20fb81536e2 | 692f7eb53fe2d24e806431067b0d44f4 | Render traits recursively, output hierarchical/dependent types. | public function getRenderablesRecursively(); | 1 |
106856ab203aa284b462a29349e3cc22 | 927508a043ae6981ec9c82a63e11acea | 从字符输入流中读取一个几何对象 | default Point readPoint(@NotNull Reader reader)
throws GeometryIOException, UnsupportedOperationException {
try {
return (Point) read(reader);
} catch (ClassCastException e) {
throw new GeometryIOException(e);
}
} | 1 |
e5d7d367f4c41a519bac2fab538511e2 | 2a82d09869379e223018936935942940 | 将指定java文件中的类的package值给修改为指定的值 | public class MyClassLoader extends ClassLoader
public static void compiler(String name) throws IOException {
String javaPackageName = name.replace(".",File.separator)+".java";
String javaAbsolutePath = classPath+javaPackageName;
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
... | 0 |
f361917cd099694a925e4dc5a0060aaa | 4f59e1d5c252fe21219e485c21506ea0 | return information about the dictionary, that is stored in the <INFORMATION>-Element of the modul | namespace WPEFramework namespace Plugin
string Dictionary::Information() const
{
return (string());
} | 0 |
576f0c99a1c2b2dce704e998990a5ef3 | a736aa1df3d209efd3c1d4b5730d29a2 | liste des auteurs contenus dans une zone | $listAuteur = "Liste auteur(s)";
$sql = "SELECT
`a`.`id` AS `idAuteur`,
CONCAT(`a`.`nom`, ' ', `a`.`prenom`) AS `nomPrenom`,
count(`m`.`id`) AS `nbMedia`
FROM
`auteur` `a` left join
`auteur_media` `am` ON `a`.`id` = ... | 1 |
f7904cacdcf8ec1d919e73ce112bda0a | f2a2ccd99fc62bdaeda5b095870c6b25 | Check the type of a symbol. Some derivative functions also
provided for convenience: isident, isset | {
DATA_OBJECT_T item;
if( ix_arg_count_chk(env, "lexeme?", EXACTLY, 1) == -1 )
{
return(FALSE);
}
ix_return_unknown(env, 1, &item);
if((typeof(item) == SYMBOL) || (typeof(item) == STRING))
{
return(TRUE);
}
else
{
return(FALSE);
}
} | 1 |
9679b8af4dc7a845cadc7e0f0513c66c | 1cfffbd06613d6bc0383bd4c9b409957 | 获取怪物最大攻击力 | namespace Control
public class Ctrl_HeroProperty : BaseControl
public float GetMaxATK()
{
return PlayerKernalDataProxy.GetInstance().GetMaxATK();
} | 0 |
7bc2333d05e53c605d6cf851d053583d | 97741caa928962fc45756a0be5b366d0 | Executes the passed in retrieval query and, if not null, runs it inside the passed in transaction. Used to read 1 row. | {
return ExecuteFirst<T, K>(null, null, data, queryLambda, whereLambda, withNoLock, tableName, con, transaction);
} | 1 |
cdcdfe6f84f5fc59ee14e2f50bd6db19 | 5fe8fb7c85e604dc0828a19180d69c07 | 获取本地应用数据库名称 | public class AppStorageUtils
public static String getDBRoot(Context context) {
StringBuffer buffer = new StringBuffer();
buffer.append(StorageUtils.storagePath(context));
buffer.append(File.separator);
buffer.append(DB_NAME);
return buffer.toString();
} | 0 |
dac5d9046f25923838a6be03b42ed3bc | 3a2dff475a620e0403187354843a437f | deze functie zorgt ervoor dat er een finishlijn wordt getekend. | def display_finish():
set_port(newline_code)
GPIO.output(pin_on, GPIO.LOW) | 0 |
09972a7bcf31f33eeb79e4a806a2863e | 3699008c26ef5c1ca79b9575b7d3ece1 | 根据分页信息更新页面排布 | function update_page_partition(view_current_page_idx) {
var db_max_page_idx = window.save_data.db_max_page_idx;
var db_total_item_count = window.save_data.db_total_item_count;
var db_return_item_count = window.save_data.db_return_item_count;
var view_max_page_count = window.save_data.view_max_page_count... | 1 |
bbaa19c72fb35a6d8258ae61c3b3fd64 | 0fb4ae823c8b1f58ee024c494c4fc19d | Aktualisiert die Funktionsliste. | public class Castle
public boolean updateFunctions(FunctionType type, int level)
{
boolean delete = _functions.containsKey(type);
ThreadConnection con = null;
FiltredPreparedStatement statement = null;
try
{
con = L2DatabaseFactory.getInstance().getConnection();
if(delete)
{
statement = con.prep... | 1 |
c7b1ab0d1143e79826f6c471e33c8284 | 5bcaae475806f15e0e1a36a07e7bcfe4 | Setter for <code>vcc_service.action.legacy_name</code>. | @javax.annotation.Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.5.1"
},
comments = "This class is generated by jOOQ"
)
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ActionRecord extends org.jooq.impl.TableRecordImpl<jooq.generated.vcc.vcc_service.tables.records.Action... | 0 |
42581aa71a8b3774b0692897aeeed5c1 | 5118f26100a6c83c1f3dd05579584089 | 检查数据传输对象是否合法,不合法时抛出例外 | public class DSPB00MDataContent extends DataContent
@Override
public boolean checkDataObject() {
boolean ret = super.checkDataObject();
if (ret) {
}
return ret;
} | 0 |
fcf2e38b6128f1b659e56d018b7a1acc | 0c526df8be05026c8723bea38a9d922d | Função que verifica se dois racionais são equivalentes | value_self = self.numerator/self.denominator
value_other = other.numerator/other.denominator
if value_self == value_other:
return True
return False | 1 |
765a6a27a0c79c8a92b52b2d9b0d55e8 | eb9cfbbae7714647fe5e7f756b467155 | Method for storing the registration id locally
after the registration process is completed. | new AsyncTask<Context, Void, Void>(){
@Override
protected Void doInBackground(Context... params){
RegId regIdToSend = new RegId();
regIdToSend.setAndroidId(Settings.Secure.getString(params[0].getContentResolver(), Settings.Secure.ANDROID_ID));
... | 0 |
5fbb951c80ef5bffb084f32d3d465d8d | 157896b26485ff68fd6dcc58c258cc74 | Method to Download template for UserToUserMapping. | void downloadTeamTemplate(HttpServletRequest request, HttpServletResponse response); | 0 |
65f45bc4f4c492d74c607dc247e99899 | cf68e7a7305a383cc4df36fc36c86e8a | 更新指定id的指令发送状态为1 | public void updateSendStatueSuccessByMessageId(String messageId); | 1 |
19a9de4c648011d8afe0fc237488b60a | cb938e9c281f79d19f26c040263e0396 | 在会话中设置新数据,并将其设置带有过期时间的临时数据 | class Redis extends RedisOld
public static function setKeyValueWithExpTime($keyData, $value, $expTime = 900){
self::set($keyData, $value);
return self::expire($keyData, $expTime);
} | 1 |
36a78b4a5f530b0ce7e38cec75222a01 | 7179e259d9c2b858bdda957eb637ae16 | Inserts a saved search and displays errors. | class SavedSearchesController
def create
do_new_resource
do_set_attributes(saved_search_params)
@saved_search.projects_populate(current_user)
do_authorize_instance
if @saved_search.save
respond_create_success
else
respond_change_fail
end
end | 1 |
2f4f1cc367852edb57d3299f6b229362 | 39688f32e34c725c3e7117ab2d6fe7ec | 用此判斷item是不是同樣的item並且在same position (用ID判斷) | class ShoeDiffCallback :DiffUtil.ItemCallback<Shoe>(){
override fun areItemsTheSame(oldItem: Shoe, newItem: Shoe): Boolean {
return oldItem.id == newItem.id
} | 1 |
68691b1fb8e3870852bbbfe0dca6eba9 | 6e869ce989c6c9b603f64c704767e88d | Returns the byte count until the next line | int ni = offset;
while (!(b[ni] == '\n' || b[ni] == '\r')) {
ni++;
}
while (b[ni] == '\n' || b[ni] == '\r') {
ni++;
}
return ni++;
} | 1 |
6477656ab8b511afdf74a8d7e16a3b47 | a695d200618e675ea2935dbe04d07ada | 投票開始関数 | public async Task<IActionResult> StartVoting(int PokerRoomId, int PlayerId, int IdTopic,int password)
{
try
{
using (var _context = new PokerPlanningContext())
{
var Topic = new Topic();
Topic = _context.Topi... | 1 |
8db84a9abf9c9b92e8959ff41ad0ce8f | 514453d165211fdc2407a229b6cd93de | 縦に揺れるアニメーション | static void VerticalShakeBack(struct Sprite *sprite)
{
s32 counter = sprite->data[2];
if (counter > 2304)
{
sprite->callback = WaitAnimEnd;
sprite->y2 = 0;
}
else
{
sprite->y2 = Sin((counter + 192) % 256, sprite->data[7]) + sprite->data[7];
}
sprite->data[2] += sp... | 1 |
6f1e3c30ef535c3bb753b10292a713ec | 71eb27f3959643ef3d28090d8f66d69a | A github webhook to receive a project_card event.
When a project card has been moved, update its associated issue's labels. | namespace Octokit.GraphQL
public class Mutation : QueryEntity
public MoveProjectCardPayload MoveProjectCard(MoveProjectCardInput input) => this.CreateMethodCall(x => x.MoveProjectCard(input), Octokit.GraphQL.MoveProjectCardPayload.Create); | 0 |
d407412d014d4c6ec52b995484db3c89 | 13c1bed373fec04ab607db58bfc6ee74 | 숫자문자열을 xx,xxx 같은 형식의 콤마숫자열로 변환 | public class Util
public static String makeStringComma(String string) {
if (string.length() == 0) {
return "";
}
boolean ignoreZero = true;
try {
if (string.indexOf(".") >= 0) {
double value = Double.parseDouble(string);
if (ignoreZ... | 1 |
8950c0065c8cd54209c27bbdd5ac2276 | 059aa952c4ed95d11919ecf5355c9364 | Convert SEF URL segments into query variables | class Router
protected static function parseSEF($sefURL)
{
$sefURL = trim($sefURL, " /");
$sefArr = explode('/', $sefURL);
return $sefArr;
} | 0 |
57729f22f950ac9ccb953721719b2eaa | 1b16745d6441b103613be1effc10a3f4 | THis function will rebalance the tree by performing either right rotation, left-right rotation, left rotation or right left rotation to
correct the left-left case, left right case, right right case or right left case. Once rebalanced for this node. It will recalucate the
balance factors of the nodes below it. | namespace PayrollProject
class AVLTree
private Node Balance_Tree(Node current)
{
int b_factor = Balance_Factor(current);
if (b_factor > 1)
{
if (Balance_Factor(current.left) > 0)
{
current = RotateLL(current);
... | 1 |
50efbc612baa55ca3ed05b1c71d81a01 | c368f15fac828eb7175d7085e5df5672 | 刷新重叠区域时的回调
## 注意 | namespace LTE.WebAPI.Models
public class RefreshAreaCoverDefectLayerModel
public Result refreshOverlappedLayer()
{
return refreshLayer(DefectType.Overlapped);
} | 0 |
74171f20cf95c81c31dc1dc179da5a14 | f20327242f1972d454b2c8282f0ceb1a | http://codeforces.com/problemset/problem/149/A | int main(int argc, const char * argv[]) {
int n;
scanf("%d", &n);
if (n % 2 != 0)
printf("0\n");
else
printf("%d\n", (n-1)/4);
return 0;
} | 1 |
4533744bc9f8fef6d715a81dc07f273b | 9b8e12ed9db071388b09a13d73cffe2a | A fixture for univariate data on the y axis. | def generate_univariate_dataset():
X = np.random.uniform(low=0, high=20, size=(30, ))
Y = np.array([ x + np.random.uniform(low=-2, high=2) for x in X ])
return {'X': X, 'Y': Y} | 1 |
b2154b605798bf4673ec4e14c566d37c | bc25868e21c888c27b34352908a054a7 | Find the hanging chads, ie. the components that no longer have parents | namespace tigl
void CTiglUIDManager::FindRootComponents(void)
{
rootComponent = 0;
rootComponentCnt = 0;
int childCnt = 0;
int maxChildCnt = -1;
for (UIDStoreContainerType::iterator pIter = physicalShapes.begin(); pIter != physicalShapes.end(); ++pIter) {
CTiglAbstractPhysicalComponent* comp... | 1 |
7b76a416ef2a06355c0c5d1c19a36b9c | 253f271ab33b5f9329bd4fb8725b07da | 〈根据人才ID获取推荐职位详情〉 | public String getJobInfo(@PathVariable(value = "employId") Long employId,
@PathVariable(value = "companyId") Long companyId){
HashMap<String,Object> map = new HashMap<>();
HashMap<String,Object> obj = companyProfessionService.getJobInfo(employId);
map.put("return... | 1 |
a3d6591f9e750a78fc67c6177261eef6 | 58a929c58a46158b22e4adbcfdde2de8 | ActivityのonStartでログイン処理を実施するため、ここでは何もしない | class LoginActivity : AppCompatActivity()
public override fun onStart() {
super.onStart()
} | 1 |
04252b5a9a50655cf7a5ae78d8f7f0af | b149e1254c8b1df473d432fe1fd67c6b | 折れ線グラフから表示中の呼吸データを取り除きます | namespace Graph
public class IbikiGraph : MonoBehaviour//, IGraphDataSwitch
void RemoveIbikiDataFromLineGraph()
{
Output_Line.ClearPointValues();
} | 1 |
305a1a3cc827101dcb7ae6db5d80e1a9 | 2635d71157210b9bff6154e099060b42 | #获取FromID消息来源ID | class Weibo
public function getRevFrom() {
return $this->_receive['receiver_id'];
} | 1 |
563ca36148c2c70f8a12e3f0553049e0 | 3ca1ccc483b14b48e4fe7a03975af02b | 返回上传成功文件的七牛云hash值 | public class QiniuUploadNew
public Map<String, Object> upload(String prefix, String qiniuKey, String fileExt){
qiniuKey = StringUtils.isEmpty(prefix) ? String.format("%s.%s", qiniuKey, fileExt)
: String.format("%s/%s.%s", prefix, qiniuKey, fileExt) ;
Map<String, Object> retMap = new HashMap<String, Object>... | 1 |
062f05a5931cf98ab4b1e74ddb8f17e4 | 803bad4bdef64f6a768790285ea78600 | prepareForTheFeature
This method is execute before anyone else method in this Context.
Be careful, you haven't access to context himself.
More over, the behat parameters are not yet instantiated.
For instance, you can make action on Database (clean, trunk, …) | def before_feature(context, feature):
pass | 1 |
b818e52a5c516e9d1af0a3bc605bf22d | 8172ca30d665dc93621ab252032110ce | Valeur de l'attribut - Icône representative | class Main extends TemplateAbstract implements TemplateInterface
final public function getIcon()
{
return $this->_icon;
} | 1 |
93e2b4f2cd4a3fe97867d738c7900dda | 260b4228882aa3bb31281420ad922a54 | Test Session() Class with good input | $username = 'username';
$password = 'Pass1234';
$this->createUser($username, $password);
$login = new Session();
$login->signIn(array(
'username' => $username, 'password' => md5($password)
));
$key = $login->getKey();
$auth = new Session();
... | 1 |
0b802d3d175295b42b3c35b3a6fcd895 | 9e772cd8f88d596e9c8522756ab655c8 | Given a token, return a vector embedding if token is in vocabulary.
If token is not in the vocabulary, then return None. | if token not in self.token_to_embedding_mapping:
random_vector = np.random.uniform(
-1, 1, size=(self.token_embedding_dimension,)
)
self.token_to_embedding_mapping[token] = random_vector
return self.token_to_embedding_mapping[token] | 0 |
57d808a1b419f0852bf7b437cb7f2f3a | 5a1e7cf8d1563cdfd6a62aaeb935b04d | 保存token交易消息 | if not token_addr_from or not token_addr_to or len(token_addr_from) < 42 or len(token_addr_to) < 42:
return
__token_call = self.rpc.call
from_balance = __token_call({"to":contract_addr,"data":_GET_BALANCE + token_addr_from[2:]})
to_balance = __token_call({"to":contract_addr,"... | 1 |
39855c2fe119dbbbff7cc458953d5795 | 55ddb3fbb941faa45c9f0eb4163b6d5d | Verify the Attestation certificates are correctly chained. | class GetCertificateResult:
def verify_chain(self) -> Optional[bool]:
return pulumi.get(self, "verify_chain") | 1 |
492875aec24ec8f85dcf35006b2a3979 | cc0f15796927dbfaf94db7b12d57243f | Calcul le prix du swap de taux | {
return (FromWallet.GetValue() * FromWallet.GetCourse().Value * ToWallet.GetCourse().Nominal) / (ToWallet.GetCourse().Value * FromWallet.GetCourse().Nominal);
} | 1 |
9b8ed61fbc1607287ce92c799cda1dd6 | 09ff564464e493623a72ba1d156eb9f2 | Reply received callback.
This function is called whenever a reply for an asynchronous message sent out
by the asynchronous framework is received.
Notify the fibril which is waiting for this message that it has arrived. | static void
reply_cb(uint8_t cmdId)
{
reply_received = 1;
} | 1 |
66e6d0b52abecdbd7438281e3dd0f53a | 97092d6e504d9279494c361ccb8ac774 | Get all states by code | namespace TradeYourPhone.Core.Services.Implementation
public class QuoteService : IQuoteService
public IEnumerable<State> GetAllStates()
{
return unitOfWork.StateRepository.Get();
} | 0 |
ed042e9fd5a9205f5d7d9184f1719f65 | acc00b5bd153e5367a3c6ea1bd0d8c75 | Pomoćna metoda za zamrzavanje i odmrzavanje gumbova i izbornika. | namespace Sweet_dreams_PI
public partial class frmMain
public void zapSetVisibility(string Poruka, bool Novi, bool Spremi, bool Pregled, bool Filter, bool Uredi, bool Brisi)
{
postaviObavijest(Poruka);
postaviProgres(-1);
btnZapNovi.Enabled = Novi;
btnZapSprem... | 1 |
60031c11976325d5460bf4a4fe466308 | 5d79b268c095a7ae8ddf9e5bef321cec | This test checks that the Dual part of Dual Quaternions is computed correctly
The following test can be found at:
https://www.euclideanspace.com/maths/algebra/realNormedAlgebra/other/dualQuaternion/example/index.htm | TEST(Quarternion, QuarternionMultiplication)
{
Quarternion a(-5.0f, 3.0f, 4.0f, 3.0f);
Quarternion b(4.0f, 3.9f, -1.0f, -3.0f);
Quarternion result(-18.7f,-16.5f, 41.7f, 8.4f);
EXPECT_EQ(result, a * b);
} | 0 |
8f1780408991381b58234e1dde9d9089 | d25b2e6a053c7ea1c140a173a1936216 | 清楚 GPS 位置信息 | public class Print extends CordovaPlugin implements AMapLocationListener{
private void initLocation() {
mLocationManagerProxy = LocationManagerProxy.getInstance(cordova.getActivity());
mLocationManagerProxy.setGpsEnable(false);
} | 0 |
30871c02a13c7e67b18dc9b7fc4e2bff | 69ee269dd7cd27eb1017b2b61c0b5cb7 | 検索された購入日時を取得するメソッド | public class PurchasePageAction extends ActionSupport implements SessionAware{
public String getDeadline() {
return deadline;
} | 0 |
7cdbd92e305ee06855bf211facbbdd92 | f1f28ff18e441750150f182f2bdc7684 | Lista todos los parentescos beneficiarios en el gridview de administración | {
int pagina = 771;
using (TAT001Entities db = new TAT001Entities())
{
string u = User.Identity.Name;
var user = db.USUARIOs.Where(a => a.ID.Equals(u)).FirstOrDefault();
ViewBag.permisos = db.PAGINAVs.Where(a => a.ID.Equals(use... | 0 |
3c0a79ca83cab2b0cb33367da6fa8954 | 40aaf65e92275317f6724a089ea94783 | Returns the meta object for class '{@link cn.edu.pku.sei.ra.wrapping.decorate.DecModel.Get <em>Get</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | GetAccessorDeclaration createGetAccessorDeclaration(); | 0 |
936f98b787d027fb0ab499a58f9d3552 | 45ee8a608259ce9e74587ba52bdc005a | Purpose:climb the ladder and escape
Input:none
Output:none | void launchLift(){
SensorValue[Release] = 1;
wait1Msec(1000);
SensorValue[Release] = 0;
wait1Msec(750);
} | 0 |
7a87d1b883f57a771ebbf38d021dac41 | f8a36b79f0492ed12c7863feeab40e24 | 计算一个big5编码的字符串的长度 | let _len: number = 0;
for (let i: number = 0; i < name.length; i++) {
_len += name.charCodeAt(i) > 255 ? 3 : 1;
}
return _len;
} | 0 |
99ee6800208e466426c73e048b2b0b8b | 60250d72287d8f3d3b093298cde49533 | Test that the length default is 30 | def test_default_str_length():
s = str(c)
n_lines = len(s.splitlines())
assert_equal(n_lines, 6) | 0 |
f417f4f770f277ecf0abbbd0731face2 | 942aabb627cb920a0b7777b9020e113c | Actualiza la informacion de los filtros recogida de la interaccion con el usuario. | if (update.id === "Filter1"){
if (update.param === "type" || update.param === "rolloff") {
this.filter2[update.param] = update.value;
}
else {
this.filter2[update.param].value = update.value;
}
}
else if(update.id ==... | 1 |
303f56be5d430364d2acd7768a2aaa8f | ba3f09cdbed7ef6603ead4523643e184 | 修改基站页面 | public String modifyBanding(HttpServletRequest request, HttpServletResponse response) throws IOException, NullPointerException {
User user = (User) request.getSession().getAttribute("user");
request.setAttribute("user", user);
List<Object> objectList = objectService.queryAllObjectByUserId(us... | 1 |
58b2f0b5d0391ee13925c8332bae4acc | 0d7a8257bbda55852651646d112dee95 | Loads thumbnails from a package unless they're already cached in that package's thumbnail map | void FGridItemThumbnail::UpdateThumbnail()
{
if (LevelModel->IsAlwaysLoaded() ||
LevelModel->IsPersistent())
{
return;
}
if (!LevelModel->IsVisible())
{
TSet<FName> ObjectFullNames;
ObjectFullNames.Add(LevelModel->GetAssetName());
FThumbnailMap ThumbnailMap;
if (ThumbnailTools::ConditionallyLoadThumbn... | 1 |
153f4fa951b13fa7c0e961f7cc62a094 | 38536e000f358d6a2f9074e99bdbfce5 | Print error file if it exists. | void StarFileFits::printerror(int status) {
if (status) {
fits_report_error(stderr, status);
exit(status);
}
return;
} | 0 |
2c23e1eb40cb760d80cb42e63b1780e9 | 3f17ba96eb09ca8b9f22a3882d268286 | Возвращает типизованное значение результата
из стандартного сообщения ответа. | boolean success = response.getBoolean(SUCCESS);
int code = response.getInt(CODE);
String message = response.getString(MESSAGE);
Object result = response.get(RESULT);
long timestamp = response.getLong(TIMESTAMP);
return new StandardResult(success, new Errno(code, message),... | 1 |
f99eaf3c0a161ae0a6fee1a9c017ef11 | a6fadbad3ed4a1193d46ac91aa4851dd | Given the current set of params, setup the interpolator. | class InertialLiftForceHelper(object):
def _setup_interpolants(self):
nhH,nhW = 1.0/self._a-1.0,self._ar/self._a-1.0
bbox = [-nhW,nhW,-nhH,nhH]
self._Cr_RBS = RBS(self._rs,self._zs,self._aR_data[2,:,:], bbox=bbox)
self._Cz_RBS = RBS(self._rs,self._zs,self._aR_data[3,:,:], bbox=bbox)
... | 1 |
41f20517091843d37f97430b3214d7c2 | af69968bdafdeaf1e785aacd7c617606 | Restart all job that have the {@link BatchStatus#FAILED}. | if queue is None:
raise ValueError("Please specify queue")
q = Queue(
queue,
connection=Redis(
host=REDIS_HOST, port=REDIS_PORT, password=REDIS_PASSWORD, db=REDIS_DB
),
)
r = FailedJobRegistry(queue=q)
for job_id in r.get_job_ids():
job = q.fetch_j... | 0 |
7ca76331d503843f00c3714cdba9af0b | 7629562c6ef574c05123a7e8dc937d99 | Generate key which contains a pair of private and public key using 2048
bytes. | class RSAEncryption:
def generate_key(self):
public_key, private_key = rsa.newkeys(2048)
with open(self._public_key_url, "wb") as f:
f.write(public_key.save_pkcs1())
with open(self._private_key_url, "wb") as f:
f.write(private_key.save_pkcs1()) | 1 |
ed5c2fa32f832ef9354d07882e49e827 | 50add1dac1a4eca63c2a5f7d38f8090f | get all the connectors attached to our current grid. | public NetworkConnector[] getConnectors(); | 1 |
fafded6af0217357b9a863a572e546ef | b112bf683f76856a4b0d82ea10f6d7ba | Method to navigate to the Multiplication portion of the revision application | public class titlepage extends javax.swing.JFrame
private void multiplicationbuttonlinkActionPerformed(java.awt.event.ActionEvent evt) {
new multiplypage().setVisible(true);
this.setVisible(false);
} | 1 |
80f2c7a68ee6f4b39d610753453147f0 | 8b697f5b9a807640808179ca821d6ae2 | 获取无形资产摊销方法 | public class ContractRestoreDeductEntity implements java.io.Serializable{
public Integer getRwzt() {
return this.rwzt;
} | 0 |
0e5f670c3e13c402cdc085a708c8af2a | aed5524238da4ea806b39cc0bc8e7250 | Unlock the mutex that prevents the sysdb registration happenning in two
threads at the same time. | static void DalSps_BamUnlock
(
DAL_sps_BamDevType *pBam
)
{
DalSpsSys_MutexRelease(&pBam->mutex);
} | 1 |
7efd25f01a256efbb82aba1a8e675e15 | 4e31f3a690b1ecfa7489b38bd8404656 | 创建tb_questionnaire数据层接口。 | namespace TewayMall.DALFactory
public sealed class DataAccess
public static TewayMall.IDAL.Itb_evaluate Createtb_evaluate()
{
string ClassNamespace = AssemblyPath + ".tb_evaluate";
object objType = CreateObject(AssemblyPath, ClassNamespace);
return (TewayMall.IDAL.Itb_eva... | 0 |
02afa06679021742e14a05aee9152251 | 364b09fe788ed573a3576fb36ad9adab | Merges a given hash into this object, converting all keys to symbols. | symbolized_keys = {}
attributes.each do |k, v|
symbolized_keys[k.to_sym] = v
end
@attributes.update(symbolized_keys)
end | 1 |
0f2bd30465591f08069e31306f2c779f | 0070bbc27ef351a92662a3d99f687256 | Devuelve el TS actual en formato ISO | def tsGen():
return datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%f")[:-4]+'Z' | 1 |
e0a2c84164d2e286399df7dadafe4f7c | 1ed4028a378b09d3fa55e1ce60269038 | Get the URL of the renku instance. | class RepoUrl:
def get_instance_url(self) -> str:
scheme = self.scheme or "http"
return f"{scheme}://{self.hostname}" | 1 |
fb78978feeec756fc6faeae8de153779 | 6be748f60116458f0aaf2689b44a3956 | If Player has a note (real text, not just color), display note icon on the left side of the button | {
if (hasNote)
{
this.Image = GlobalSettings.Images.financeIcon.ToBitmap();
this.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
} else
{
this.Image = null;
this.TextAlign = System.Drawing.Co... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.