query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
cad590cc51b3b73b932ad18257a38256 | 253c56abce72bcd96b1236b86ba07d02 | Returns a new object of class '<em>Message Significance Category</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType addNewMessageDestination(); | 0 |
29a342a871cde07ad3bdd6601e9f12d9 | 89626ad00f1c5da421f4852dc7b8d4a7 | Récupère tous les sous-thèmes à partir du numéro de thème | class CategoryController extends Controller
public function getAllSubcategoriesThirdAction($id = 0)
{
if (!$id){
$id = $this->container->request->getId();
}
$category = $this->container->categoryRepository->getOneWhere('id', $id);
$subCategories = $this->container->catego... | 1 |
f322d6987a56e3e4ce95ca93280b0a9b | 294db4d543b9f653a01645d092241935 | 删除举报内容 | $return['success'] = true;
$dataId = I('post.dataId');
$userId = $this->userId;
$category = I('post.category');
$content = I('post.content', '', 'trim');
$options = I('post.options', '6');
$return['status'] = 10;
$return['message'] = '操作失败';
$retur... | 0 |
b1c44074827799588ad2e440178404b4 | 24de9f77184e432cf18a212702ed42d2 | 在当前节点的爷爷节点添加颜色的属性。 | List<GraphConnection> listConnection = new ArrayList<GraphConnection>();
listConnection = myGraph.getConnections();
for(GraphConnection connection : listConnection) {
if(connection.getDestination().equals(node)) {
connection.getSource().setBackgroundColor(ColorConstants.green);
colorAscendants(connecti... | 0 |
3a2b3b4a001b36738035783ae00c89d5 | 254b3315246683bfe9d639cc82479edf | Gets the room configuration. | public IActionResult GetRoomAttributes()
{
List<PlatformConfigurationDTO> response = service.GetRoomAttributes();
if (response != null)
{
return new ObjectResult(response);
}
else return new BadRequestObjectResult("There aren't ... | 1 |
5ea093015e6b84217213279bac03a862 | 83a3167040a9140e2b55a5b425d793fe | Returns the value of the '<em><b>Can Deploy</b></em>' attribute.
<!-- begin-user-doc -->
<!-- end-user-doc --> | boolean getCanDelete(); | 0 |
676e87d56b6a3ff0e2481c6f7eae353b | 92fa577d13b5bcefaf11d1eae4c4135b | Список желаний с сортировкой. | {
$result = array();
$product = $this->db->get('product')->result_array();
foreach ($product as $row) {
$result[] = array(
'title' => $row['title'],
'wish_num' => $this->total_wished($row['product_id']),
'id' => $row['product_id']
... | 1 |
8ac052f157f253f63e65915bd24dbcf8 | b8dd14d2a3f8bbf6818bdfbb0a9eebea | Função que altera qualquer informação relativa a um edifício | namespace WebCC.FunctionMethodDB
public class OperationBuildingData : IData
public override int Modify(Object obj)
{
try
{
Building_table stu = obj as Building_table;
var user = (from e in db.Building_table
where e.IDBuildin... | 1 |
e0cda34fb2c8b3ba083f5247ab211a2a | d93f216a956a022e31b6623d08e7b15f | 获取渠道用户id | namespace ZentCloud.BLLJIMP
public class BLLDistribution : BLL
public string GetChannelUserId(UserInfo userInfo)
{
var channelUserInfo = bllUser.Get<UserInfo>(string.Format("MgrUserId='{0}'", userInfo.UserID));
if (channelUserInfo != null)
{
return channel... | 1 |
ec8b750c27afe89db70756a0bafc0b2f | a0689628eeb13aa0dd07083305c150ff | Butona tıklandığında girişin yapılıp yapılamayacağı işlemine ait kod bloğu verilmiştir. | function butonGoster(kontrol) {
var x = document.getElementById("start-button");
console.log(kontrol)
if(kontrol == 1)
x.style.display = "inline-block";
else
x.style.display = "none";
} | 0 |
dc9fc4de23efa8aece0d39fc2f5043ee | 24c194e6804e21f3705d538445b09fa0 | main generator of python text (recursive), returns a string | result = self.visit_node( node )
if isinstance( result, types.GeneratorType ):
result = "\n".join( result )
return result | 1 |
d81b0d493106ebe87c984457139f23cd | 3278082dca1cddf898546e7d367ab627 | 增加其他所得 | $aryOtherIncomes = array();
foreach($otherIncomes as $key=>$value){
if(!empty($value["id"])){
$otherIncomesModel = GuideOtherIncomes::find($value["id"]);
if(!empty($value["income"])){
$otherIncomesModel->income = $value["income"];
... | 1 |
0cfee571169d30356d9fe22b5acbfd7a | 1f1454953a28b9cba3d271f20d877e51 | 用户点击定制新闻的箭头按钮的监听函数 | public class CommunityFragment extends BaseFragment implements View.OnClickListener, AdapterView.OnItemClickListener
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
if (i != 0) {
News news = list.get(i - 1);
id = news.getNid();
ur... | 0 |
6adc84feb59e747cf2477ff1d02a4e07 | 660f3846cd9e42bd405aeb9e223e399f | Unifies the receiver with another value.
First dereferences both the receiver and the other. If both dereferenced
values are variables, unifies them with the other being bound to the
receiver. If one of them is a variable, it gets bound to the other value.
If none of them is a variable, they are checked for equality wi... | var t = this.apply(type1),
u = this.apply(type2);
if (t instanceof Tyvar && u instanceof Tyvar
&& t.equals(u)) {
return this;
}
else if (t instanceof Tyvar
&& u.getTyvars().every(tyvar => !tyvar.equals(t))) {
return this.extend(... | 1 |
ad9bdf2c6a1bac7e1218cad1188f633b | 280840da1bdb8ec95d95f410a9acba0d | Получить ссылку на следующий процесс | export class NewralNode extends Node
public Next():NewralNode{
var success:()=>boolean =
Array.from(this.$next.keys()).find(
$o=>$o()
);
var result = this.$next.get(success);
return result;
} | 1 |
e246206196d5ee2bb4edf430268297eb | 23ffbc71f0c69b95099cb0617a346e57 | This iterator provides range query support. | class rawstoken(rawsqueryable):
def tokens(self, range=None, include_self=False, reverse=False, until_token=None):
count = 0
itertoken = self if include_self else (self.prev if reverse else self.next)
while itertoken and (range is None or range > count) and (itertoken is not until_token):
... | 1 |
519e5a6d97aabd456ed9170d04455868 | 738a0ef81d8314f4ff8c511e29028bad | Setting lots of player preferences that will be accessed by many scripts later | public class playerrpref : MonoBehaviour
void Start () {
} | 0 |
df948dd76ce575eb8b994bba48967ef2 | 96472ae0a612406716dee78d30b31aaa | 通过EditText状态修改Button状态 | val btn = this
et.addTextChangedListener(object : DefaultTextWatcher() {
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
btn.isEnabled = method()
}
})
} | 1 |
13fa68913596cb992684bf378a85cd0a | fba20edd96767f00a1335940fc7662b8 | check that func accepts input as expected | class TestTaskOne(TestCase):
def call_func_and_assert(self, input: list, expected: int):
actual = sum_of_squares_of_odd_numbers(input)
self.assertEqual(actual, expected, "Actual: %d, Expected: %d" % (actual, expected)) | 0 |
73459121137034778cc815303bcc428e | 03db8210d8ab6730bcb041b00f912af6 | If received data, the In-Situ update is invoked. | uint8_t usbDataIn (USBD_HandleTypeDef* device, uint8_t epnum) {
((tHidData*)device->pClassData)->mBusy = false;
gApp->getLcd()->debug (LCD_COLOR_YELLOW, "usbDataIn");
return USBD_OK;
} | 0 |
8a176f2f1c41924f84d0bdcc9536989c | 1ae5bcc46a07274874c31f8bb74ce76c | Test the function that checks if a user has team-level
permissions to edit the given Existing Data. | class UserPermissionsTestCase(TestCase):
def test_user_permissions(self):
url = reverse("user-perms")
get_resp = self.create_get_request(url)
self.assertEqual(get_resp.data, [])
post_data = {
"user": self.user.id,
"team": self.team.id,
"permission": "read_obj"
}
post_resp = self.create_post_request... | 0 |
2c28590d36467eecd019d4812ff38561 | 8b66cb8271b946334ef86e298eeec7bc | Combine both text and content-based queries.
https://freesound.org/docs/api/resources_apiv2.html#combined-search | export class SearchService
public searchMulti(baseUrl: string, query: string): Observable<SearchMultiResponse> {
return this.http.get(`${baseUrl}${this.searchUrl}${this.multiUrl}?api_key=${this.apiKey}&${query}`)
.map(response => response.json());
} | 1 |
cb6293b263c8d3ff4c94a064fe9a2bf7 | 9d3c78a87532d6e35035e8de4f98d5d3 | 创建索引, 默认1个分片, 0个副本 | public class Dsl
public static void createIndex() throws UnknownHostException {
Settings settings = Settings.builder().put("cluster.name", "elasticsearch").put("client.transport.sniff", true)
.build();
@SuppressWarnings({ "resource" })
TransportClient client = new PreBuiltTransportClient(settings)
.addTra... | 0 |
5cd0f72db991c9b66930557c81428cad | 8e896298ab0eff0e196756753dc8ca62 | função do p5 que é accionada ao soltar o clique do mouse | function doubleClicked() {
if (mouseInCanvas() && modo == 0 && modoDesenho == 0) {
drawing = false;
pol.drawing = false;
pol.vertices.splice(pol.vertices.length - 1, 1);
}
} | 0 |
63df819eaebab162119442e5f6f0a1bc | 4587b1723a113a7f4829bd28ef56b6bf | Navigates to the relevant form, depending on what button has been previously pressed. | namespace AutoCenterApp
public partial class SharpAutoForm : Form
private void _formButtonsEventHandler(object sender, EventArgs e)
{
Button AutoFormButton = sender as Button;
switch (AutoFormButton.Tag.ToString())
{
case "calculate":
i... | 0 |
515f55931c17b669f9c3e43c9c76489e | d4855213c3ef2aa2bdf5753bbf95d468 | Sets the scan cache size of the BigTable instance. | GlobalSecurityConfigurationBuilder securityCacheSize(int securityCacheSize); | 0 |
723c1630383d05cad88bc15c59cac565 | 0edcafe36de41c660a63cae1f505fc1a | 推送三诺平台血糖数据到蒲公英 | @POST("api/Nbcei.Plugin.HealthCheck.Api.Impl/v1/HeartRateRecord/SendWeCardioData")
Call<ResultEntityDto> postSendWeCardioData(@Body SendWeCardioDataDto sendWeCardioDataDto); | 0 |
4186e7010ef24e3b9ca894e9fc236285 | 07637c6afc4462c795c2542baa9648bd | Returns rect with added Y. | {
return new Rectangle((int)xPos, (int)yPos + height - 10, width, 10);
} | 1 |
c866a67242151ab105d11a78edecc1d4 | f01f82eb49c9dcdcdc9c27ff1f098dcc | 检查是否需要刷新 临时npc消息阅读情况 | {
Debug.Log($"刷新npc");
CS_NPC.DataEntry dataEntry = DBManager.Instance.m_kNPC.GetEntryPtr(_NpcID);
BaseData npc = ModelManager._instance.Load(dataEntry._ModelID);
if(dataEntry._ModelType != 0)
{
BaseData build = ModelManager._instance.GetModleByType((ModelCType)d... | 0 |
48cae771544cd9e1809083e93a9f47cf | 2626d666f5ae96bf4838476e7609408a | Constructor - Build a list of available avatar files | class UserService extends Service
public function getAvailableAvatars(){
return new Response($this->doRequest(new Request(
'GET', '/GetAvailableAvatars')));
} | 0 |
7983534a814de04dd8c7978fa6dcf662 | d3eed357160ec7af3f83d4c2eac2bf63 | Enter a parse tree produced by {@link MvsjclParser#dcbBftek}. | void exitDcbEropt(MvsjclParser.DcbEroptContext ctx); | 0 |
4072346c047dee143fc5d219106b2265 | 639c33dde4a2f64d7132ab41e4c42c91 | 设置留学生标志 | public class AttendanceInfo implements Serializable
public void setLateSign(Boolean lateSign) {
this.lateSign = lateSign;
} | 0 |
276f9360da381931b5534c7829819ee6 | 1e465f711e244e11db3c359bc781c99e | See if a zone transfer is allowed | return (self.isCommissioned()
and self.couldTransfer(data, origin, destination)
and (origin is destination
or (origin.canTransferOut(data)
and destination.canTransferIn(data))
or origin.canExchange(data, destinati... | 1 |
a243e05d7b87a8cdcb2a7a65bcd4a211 | e4fa6567d81b901e87f5280cdd26411b | Show the form for creating a new nivelAcesso. | class NivelController extends Controller
public function create()
{
return view('adminlte::nivel.create');
} | 1 |
55b694947120e562e92542b0583ce966 | adfc697d34de878cf795228059f64c5c | لود کردن صفحه بندی و محصولات جستجو شده با اجکس | class Products extends CI_Controller
function index() {
$category_id = $this->uri->segment(3, 0);
$data['all_items'] = $this->product->get_items_list();
$data['category_name'] = $this->product->get_category_name($category_id);
$data['items_by_category'] = $this->product->divide_into_category($category_i... | 0 |
b62ad747f84d470a4a865895f5274cf9 | 87c3054b01ce15541134bfae43f7940c | ===================================================================== CD = | class Z80(object):
def OPCode_CD(self):
addr = self._mem.rw(self._PC.value)
self._PC.value += 2
self.__PUSH(self._PC.value)
self._PC.value = addr
self._m = 3 | 1 |
45670b854210f0887f032eea02ff5d66 | cec7e767fd8e5161c941127bdd803408 | Nothing to cancel in single-part uploads. | bool RemoteCancelling::remoteCancel(CountedPointer<FileTransfer::Sender::StateMachine> stateMachine)
{
return false;
} | 1 |
3491f587b6cfd0c97ca5ae24c6908ac8 | b4fc5770a322d206a889f6d21dc417c6 | Set the format of the source of data
Note : By default the source is typed on xml. | public function setFormat( $value ); | 1 |
6fc2951bf3fba40b22b374edbb87fcdf | f8c32b815a6b064a478fb4f0119255f6 | Looks up the hostname on the remote server | String hostname()
throws RemoteException; | 1 |
6f560907fd5db2814daf7518ecb7a766 | ee2c133c8a19fe46c5dad75fc7afa90b | 添加一个指定多少px大小的文字 | export default class RollLable extends cc.Component
addText(text: String): void {
var prefix = "";
var suffix = this.space;
if (this._strings.length === 0) {
this.label.node.x = this.mask.node.width;
this.label.string = prefix + text + suffix;
this._d1 = this.... | 0 |
83f022d8570d760c16989aed30ec80d4 | 9108d3d37d16c7898e58ab8186d425ea | Returns the quotient of this fraction and m | long numerator = (m * n) % PROBLEM_DIVIDE_NUM;
return numerator/ getGCD(m, n);
} | 0 |
40723c15bbd454fae1234161ae956259 | 1a54ea0b07a3f48327d9e6f33139d597 | Busca espacios en desocupados y devuelve una coordenada aleatoria | class Room:
def getEmptyLocation(self):
while(True):
p = Point(randint(0,Game.SIZE-1), randint(0,Game.SIZE-1))
if self.grid[p.x][p.y] == None:
return p | 1 |
5b416a6b1cca42228c51052ac1496863 | 3cf0ad2c1dcdc8a26d71a257b93b7596 | Asserts that the input <see cref="string"/> instance must be whitespace. | public static void ThrowArgumentExceptionForIsNotNullOrWhiteSpace(string? text, string name)
{
[MethodImpl(MethodImplOptions.NoInlining)]
static Exception GetException(string? text, string name)
{
if (text is null)
... | 0 |
22df1af36d19fe367216c6c80a452304 | 50ed232ed3f0e6f8b46dff26c34b1528 | 弹出生成展期合同窗口 | function extensionContractAddDiv(){
var hiddenUnitId = $("#hiddenUnitId").val();
var conCustomerId = $("#conCustomerId").val();
if(hiddenUnitId == undefined || hiddenUnitId == "" || hiddenUnitId == "0"){
myAlert("请先选择单元");
return false;
}
if(conCustomerId == undefined || conCustomerId == "" || conCustomerId =... | 1 |
edb941a43aecb82771c05a4250cc54aa | 9235148d2b5a28dfac9e4ac06df640e7 | Get the MP3 preset used by the recorder | public short getPreset()
throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
short[] value = new short[1];
checkStatus(getParameter(PARAM_PRESET, value));
return value[0];
} | 1 |
be4d2a24ea91025fceb3d956328c18f4 | bd48301c9b671f745ba5fd3626bc8edf | Changes working directory to given directory | try {
client.changeWorkingDirectory(path)
} catch (e: IOException) {
e.printStackTrace()
}
} | 1 |
2f5e1fadd45268dde39ff19a162b46ef | 767dbfe6394be99ca0954dd144dfb2af | Determine the minimum intensity between pairs of point coordinates and
write them in a matrix. | void
IM_TYPE::Extrema()
{
IM_TYPE out(Xdim, Ydim, Zdim);
for (int z = 0; z < Zdim; z++)
for (int y = 1; y < Ydim - 1; y++)
for (int x = 1; x < Xdim - 1; x++)
{
PIXEL pixel = Data3D[z][y][x];
if ((pixel > Data3D[z][y - 1][x - 1])
&& (pixel > Data3D[z][y - 1][x]) &&... | 0 |
e0ea5151d4e16690f6db10b73e7ffc34 | 9ce37ce64e8bbb2cee10e8105e33a164 | Constructor that takes all members as input | Animal::Animal(int inputAge, double inputCost, int inputNumberOfBabies, double inputBaseFoodCost, double inputPayoff)
{
setAge(inputAge);
setCost(inputCost);
setNumberOfBabies(inputNumberOfBabies);
setBaseFoodCost(inputBaseFoodCost);
setPayoff(inputPayoff);
} | 1 |
0889e78816e35839d67e4017b6821340 | 1542069df2edf8ee90cb407208e95152 | Updates buses | void qtractorBusForm::updateBus (void)
{
if (updateBus(m_pBus)) {
++m_iDirtyTotal;
refreshBuses();
}
setBus(m_pBus);
} | 1 |
7301444fc88f5dc63da4eea1f1cfe207 | 606fcb8366ebf7b7a1f98369f15da987 | 初始化Node类 | class Node:
def __init__(self, value, subClassOf, parentOf, depth):
self.value = value
self.subClassOf = subClassOf
self.parentOf = parentOf
self.depth = depth | 1 |
586b83bda10161e6a4d4319a63b9f4d6 | 3106fbc995b8d47439b6c1dbba6a8de2 | Returns the start nanos value for the entry. | long getStartedAtNanos(); | 1 |
83232d63936fe40b658d078c8354925f | 6bec2847d895df942d6369ff3eaff88f | A simple OverrideModel stub. | {
$parent = parent::replaceNamespace($stub, $name);
$model = str_replace('/', '\\', $this->guessClassName('model'));
$modelName = $this->getClassName($model);
$stub = str_replace(
'DummyModelClass', $model, $stub
);
$stub = str_replace(
'DummyM... | 1 |
4ae8b177340273a47f1e3f7acc003495 | 8300ea179d981396b5742e868e9752f2 | initiate the environment variables from .env file to the class attributes | debug_flag()
self.email = os.getenv("EMAIL")
self.env = os.getenv("ENV")
self.group = os.getenv("PROJECT")
self.region = os.getenv("REGION")
self.repo = os.getenv("GIT_REPO")
self.runway_dir = os.getenv("RUNWAY_DIR")
self.artifact_path = os.getenv("ARTIFAC... | 1 |
b197efc4c1e35bebba769a2a9871ca06 | fc91bfcf9c1a63f9fc3effd78025283f | Calculates the maximum prefix length of an address type | global inp_yaml
global extension_list
if 64 in inp_yaml['supported_xlen'] and 'S' not in extension_list and 'U' in extension_list:
return 8589934592
elif 64 in inp_yaml['supported_xlen'] and 'U' in extension_list and 'S' in extension_list:
return 42949672960
else:
return 0 | 0 |
f009990ea4487d69ae57cfc390d2bcc5 | c9a4f296911dc233b8b96aed1d4a86e6 | show the options of the atm
specifically, all input buttons & their labels AND output labels | public class Frame extends JFrame
public void showMoneyOptions() {
if (page == 4) {
listModel.removeAllElements();
if(dispenser.getInvTen() > 0){
listModel.addElement("10");
}
if(dispenser.getInvTwenty() > 0){
listModel.addElement(... | 0 |
acdcde48cc0dab0ee910ea8163b2557b | f0c0525a71fa759e1251625f3e7ce431 | 停用手机号 | {
$result = new M3Result();
$res = DB::table('user')->where('id','=',$id)->update(['is_usable'=>0]);
if(!$res)
{
$result->code = -15;
$result->msg = "停用用户失败!";
}
return $result->toJson();
} | 0 |
1da0f949d4bf62adc38b993271dd74f6 | 7f61448ad6da3ef0f9cb03f40c5be655 | If program reaches here, all test passed. | cases like (1) | 0 |
973479dd2762612c54d70b65cbf47feb | bd2a34596535733cea63d7f532958192 | Loads a serialized .p file that represents a generate ngram list and returns the list. | if k3.fileexist(fname) > 0:
pkl_file = open(fname, 'rb')
pn = Pickle.load(pkl_file)
pkl_file.close()
return pn
else:
return [] | 1 |
fb8564449a3cbb4334c728ca97b37309 | ab65e297a999c027885c8a09f0c582e1 | Is the payment refunded? | public function isRefund(): bool; | 1 |
ad304263090e4dcb0c906890b97acfc2 | 04b4c9b6bd225df4b1c4dc9f79822c83 | @brief assign absolute file path to a string, sanitizing input | clean_path(char* buf, size_t bufsize, const char* path)
{
if ((!path) || (path[0] == '\0'))
{
errno = EINVAL;
return -1;
}
if (path[0] != '/')
{
char cwd[get_cwd(NULL, 0) + 1];
{
int tmp = get_cwd(cwd, sizeof(cwd));
if (tmp < 0)
... | 1 |
f326468969bbab4dd527fcf7f1690460 | f15191cab4e71af779436ca8aad14a27 | 根据商品名称查找商品(可以尝试下模糊查询) | List<Goods> selectGoodsByNameExact(String nameExact); | 0 |
1956916306759bd16e8f30c33828299e | 4b4ab0783d9deeb66d18887137813b35 | Method invoked to re-analyze data model and show data in Pivot Table.
Data analysis is perfomed in a separated thread, in order to avoid to block application usage. | public final class PivotTable extends JPanel implements DataController,DraggableButtonListener
public final void compileDataInThread() {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
Toolkit.getDefau... | 1 |
72e2672f0e914c5be85daf113236d87f | b4dd6ee0c8257e0885c223acc26d11a0 | Test setup for the Apple SDK targets that are used in tests. | def setup_test_env():
setup_test_env_base()
sys.path.insert(0, os.path.join(APP_DIR, 'components', 'third_party'))
sys.path.insert(0, APP_DIR)
from support import gae_sdk_utils
gae_sdk_dir = gae_sdk_utils.find_gae_sdk()
if not gae_sdk_dir:
raise Exception('Unable to find gae sdk path, aborting test.')
... | 0 |
3e414616f0471cc5b9d093ce2e850d2b | 57ee975b3843b8c197a0e37db1c478dd | collection of API calls for node instances | function WebAPIs() {} | 0 |
79248bb2aa3da98dc40baae664732474 | 5d243b228f73acf37f75e8a9338b869a | Print summary information for the dataframe from specified year. | def get_season_by_year_df(year):
df = get_season_df()
return df[df.year == year] | 0 |
3f4696c081b213baad0a5e79872aeae8 | ea6e4af986728c38588fe65614b67ac1 | Setter for <code>appcenter_mall_data.t_mall_managers.PasswordSalt</code>. 密码加盐 | @Table(name = "sys_user")
public class User
public void setMallPassword(String mallPassword) {
this.mallPassword = mallPassword;
} | 0 |
64427270f4896181d35c39ac17b1f0fd | 0ca9a2f42f0b521f7f556b38e35b3c28 | spyce.serveApp() -- Serve an app with a given template.
Registers an express middleware function. | function serveInfernoApp(args, cb) {
webpackServer(args, createServeInfernoAppConfig(args), cb)
} | 0 |
3bc712405a1ae800563e8e4c0d006027 | 33d857fd2c854b822f71afa424fb0198 | Return `obj` if it is of `expected` type, or else raise a descriptive TypeError. | class Melora::DicePool
def validate_type(obj_name, obj, expected_type)
if expected_type.is_a? Array
valid_types = expected_type.join '|'
valid = expected_type.include? obj.class
else
valid_types = expected_type
valid = obj.class == expected_type
end
raise(TypeError, "#{obj_name} ... | 1 |
0c306e360e7f5b5b32c0bf24e94e7442 | 7e5ef31e634dba215ab9c95c9e456fe7 | Unsets the "errorString" element | public class EdxlDeMessageResponseTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.uicds.haveService.EdxlDeMessageResponseType
public void unsetErrorString()
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(ERRORST... | 1 |
04b6467f79c5fab9e8cf3858f448cdae | b84295fdc3b503222b220c1f2d3010aa | This API is used to renew a monthly subscribed TCMG instance for a month without changing the instance edition. It doesn't apply to running instances. | public class BccClient extends AbstractBceClient
public ChangeToPrepaidResponse changeToPrepaid(ChangeToPrepaidRequest request) {
checkNotNull(request, REQUEST_NULL_ERROR_MESSAGE);
checkStringNotEmpty(request.getInstanceId(),
checkEmptyExceptionMessageFormat(INSTANCEID_MESSAGE_KEY));
... | 0 |
65f831fae5e901c340414df5ef8ccec8 | 69661469b4ccc43c4f51221f93e22834 | O(n log n): Finds convex polygon of intersecting half planes. | namespace utils
std::vector<Point> ConvexHull::getConvexHull() {
std::vector<Point> hull;
if (intersectionPoints_.size() < 3u) {
return {};
}
bool areCollinear = true;
while (areCollinear) {
for (size_t i = 0u; i < intersectionPoints_.size() - 2u; ++i) {
if (orientation(intersectionPoints_[i], i... | 1 |
4ad1f1be35c92a26f8e0b7ef6e3839d2 | d7042524494eeb2a5e7a1b0a7fe92641 | mostra tela de configurações | class Configuracao(QDialog):
def __init__(self):
super(Configuracao, self).__init__()
self.configure = loadUi('view/configuracao.ui') | 1 |
fd21428645f6c3b6cd9c3140ce4998fa | 7e2f5038fb473129ffe37415817625bc | console.debug(aMsg); | function pl(msg){
console.log('DEBUG->'+msg);
} | 0 |
224b9e4b6e38ba50c347938895e86e62 | a5185bcf729493e60010702948911a4c | Le but de cette fonction est de sauvegarder les resultats dans les fichier de text,
un fichier par ville | {
using (StreamWriter output = new StreamWriter(fileName))
{
output.WriteLine(obj.GetValue());
LSCollection citiesCollection = cities.GetCollectionValue();
for (int i = 0; i < nbCities; i++)
output.Write(citiesCollection.Get(i) + " ");
... | 0 |
e43f1b81753b2df5f572ac2e5e046204 | 1016950f0d2437ef1165ca64eda7e630 | Makes one move in the game | public class GameState
public void makeMove(Move move) {
this.moves.push(move);
this.board[move.row][move.col] = currentIndex;
this.currentIndex = currentIndex == 1 ? 2 : 1;
} | 1 |
22ac25275060f621ff95574940dd7720 | b8d29990e3027693512a2c94581eec2e | Returns the marketplace app type (string value) | public class ApiInfo
public String getAppType() {
return appType;
} | 1 |
3d07e306188d711b27637d46ac2500f4 | fa0c51e2ee318811dc896c651010bf5d | This function remove translation and rotation velocity at center of mass | {
VuMatrix matModel = VuDynamicsUtil::toVuMatrix(worldTrans);
matModel.translateLocal(-mpRigidBodyComponent->getCenterOfMass());
mpTransformComponent->setWorldTransform(matModel, false);
mpAttachComponent->update(mpTransformComponent->getWorldTransform());
} | 0 |
1a6b2ed1d3eeca8e19081f913530938a | 67d9d316ef8dc92d5bd7d7663491d30d | 支付成功,更新UI | fun pay_done(amount: String) {
val mDialogView = LayoutInflater.from(this).inflate(R.layout.pay_success, null)
val mBuilder = AlertDialog.Builder(this)
.setView(mDialogView)
val mAlertDialog = mBuilder.show()
mDialogView.paysuccess.text = amount
mDialogView.pay_ba... | 1 |
ae8d02844df04ec8b5bae5ada1f124d5 | efad58b7daec9cb20e140a29803e74c9 | Curiosity module that just takes random actions. | class RandomAgent(BaseAgent):
def __init__(self, action_space=None):
super(RandomAgent, self).__init__()
self.action_space = action_space | 1 |
9e84c94a94ef7770edb3da25ad575605 | 29fdb66cf64443c9afb90b9f228e190d | 判断是否更换默认设备 | let _this = this;
if (e.detail.value) {
this.data.isDefault = 1
} else {
this.data.isDefault = 0
}
console.log('switch1 发生 change 事件,携带值为', e.detail.value)
} | 1 |
2711d7d8a45799a250d82ffdf375bd17 | f50a86fefb038cc4dd4c4a83f977c06f | Determines if the MTBTypesKey has been initialized.
<br>
It is useful to determine if a field is null on purpose or just because it has not been initialized. | public class SampleAssocDTO extends TableDTO
// extends+
// extends-
public boolean isMTBTypesKeyModified() {
return MTBTypesKey_is_modified;
} | 0 |
783de7d78f2ee069fd15212af5d0b146 | 18051baf3a1dd28b84ad316bcdd26e24 | calculates current frequency. | class Calculator():
def calculate_freq(self):
self.spectrum = np.fft.rfft(self.samples)
self.freq = (np.abs(self.spectrum).argmax()) * FREQ_STEP | 1 |
e288523f8fa631929d7415fad34536d5 | 7e7098a130feb3347a71b7415e231b13 | 启动本Activity的方法,供AccountInfo调用 | if (mView instanceof FirstActivity) {
mView.startLoginActivity();
mView.finish();
} else {
((LoginActivity) mView).initData(account);
}
} | 0 |
49b8d071d89f8ddab8e13b80939537a8 | cec2957ef354fa7bf4d36944f40c83fb | Checks if the order state is the last. | class OrdersHelper extends Helper
public function isTheLast($state)
{
$ordEnt = new Orders;
$ordEnt->setOrderState($state);
return $ordEnt->isTheLastState();
} | 1 |
7636d236f100027e8e7848343fcff0d5 | 485f92ea5f84dd685ca159d754035451 | Injects the naming directory. | class Provider extends GenericStackable implements ProviderInterface
public function injectNamingDirectory(NamingDirectoryInterface $namingDirectory)
{
$this->namingDirectory = $namingDirectory;
} | 1 |
c4b56f7604b8f56ddde4200b3d1e5340 | 0e0321ed67d4a389a7992121120dfa2b | Sorts locations by size, optionally prioritizing locations from certain
datasets first. | {
usort($locations, function ($locationA, $locationB) {
$hierarchyA = explode('/', $locationA->getFile());
$hierarchyB = explode('/', $locationB->getFile());
while (! empty($hierarchyA) || ! empty($hierarchyB)) {
if (count($hierarchyA) === 1 && count($hier... | 0 |
cfa6bd68014da12c7ff7173e8b62ef1c | 8482898ff1636b12f9524470986187d1 | Removing employee by card number | {
$id = $request->input('id');
$card = EmployeeCard::where('id',$id)->delete();
return response($card);
} | 0 |
293eb1b2362228c79513bb4806ee9464 | e45c6e892a7a5d580c63ac2b84442ef4 | Getter for <code>sys.statements_with_errors_or_warnings.errors</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.7.3"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class StatementsWithErrorsOrWarningsRecord extends TableRecordImpl<StatementsWithErrorsOrWarningsRecord> implements Record10<String, Str... | 0 |
e2c61d74460da72b3c143b8ee2347493 | c71bab52c4a834aa4dca477424ba87fe | Reads from the "words.txt" file in the same directory.
Splits up all the words into separate lists based on
their first letter. | if (filename == null || words == null) {
System.out.println("filename is null or words is null");
return false;
}
Scanner scanner;
try {
File file = new File("resource" + separator + "txt" + separator + filename);
if (file.exists()) {
... | 0 |
2b1a4941bd75b91cd5e85212a69b27ba | 86b8f9d15cc503f46b49030254a8ac99 | 关闭播放列表 | clearPlayList({commit}){
commit('changePlaying',false)
commit('changePlayList',[])
commit('changeCurrentIndex',-1)
} | 1 |
1dc3221cd4775b3b2258e4a67b7f1120 | fa4580f9e7802f96a164ad83bb176faa | Função que cria as condições para a função draw funcionar. | function RetornoLimites() {
if(x < 36){
x = 36;
}
if(y >563){
y = 563;
}
if(x > 565){
x = 565;
}
if(y < 36){
y = 36;
}
} | 1 |
55e5ea8fddd54dccbad8f7e984ba6b79 | 92fefa4a51fb52dd9dd377be7b7f6c59 | Функция, обновляющаяя приоритеты выбраного множества SetElem | void UpdatePriorities(set<SetElem>& s) {
set<SetElem> save;
for (auto i:s) {
save.insert(SetElem(i.id));
}
s = save;
} | 0 |
5f4027e17b6487554b687f2107b3c1ac | 43cb83c75dafa38b24ae0067bd1d1e03 | 由于用户登录时,User的数据就存在session中了,所以不用写查询语句,直接转发页面就好 | @Controller
@RequestMapping("/user/")
public class UserController extends BaseController
@GetMapping("index")
public String index(HttpServletRequest request,Map<String,Object> map) {
User user = (User) request.getSession().getAttribute("userSession");
map.put("userEntity",user);
return "user... | 1 |
5f14b2c2b8f4344276ea2391586c44d3 | 183b3012bc7b2e01ed36b0b68cccb61c | Returns all the interface widgets. | public function getAllWidget(); | 1 |
638b5425e155456c395893c7ab114620 | aa5798678831b116a756ca4b902e94df | Test toggling visibility of an invalid tab | $root = $this->categories('root');
$category1 = $this->categories('cat1');
$this->assertTrue( $category1->isVisible() );
$root->deactivate();
$category1->refresh();
$this->assertFalse( $category1->isVisible() );
} | 0 |
19305729e93776d4070eb0ee0f2a1b4d | 085fba1fee9e608232f2ab0088adc120 | returns the root of the character LL | class Trie
get root() {
return this[root];
} | 0 |
2526e2306f59069776c79332eecb7a95 | 48b43658200d9b54fbe77a8fa4954846 | LookupType 8: Reverse Chaining Contextual Single Substitution Subtable | (0x81AD <= val && val <= 0x81B7 ||
0x81C0 <= val && val <= 0x81C7 ||
0x81CF <= val && val <= 0x81D9 ||
0x81E9 <= val && val <= 0x81EF ||
0x81F8 <= val && val <= 0x81FB ||
0x8240 <= val && val <= 0x824E ||
0x8259 <= val && val <= 0x825F ||
0x827A <= val && val <= 0x8280 ||
0x8... | 0 |
7ed5c4be56554d8aa4b33a72cdcd4b71 | 76516e52b5930adc84bf4d9c30855649 | 获得分配物理机的状态情况 | public List<MachineStatus> getMachineStatusList(); | 1 |
982e90fe4682a47cd4e313e0309c63e8 | 22a9ca8cec6385f6ecdb644388d6b44e | 获取文件所在目录的SplFileInfo对象 | {
$file = self::dirReplace($file);
$dir = array();
$dir['filename'] = basename($file);
$dir['pathname'] = realpath($file);
$dir['owner'] = fileowner($file);
$dir['perms'] = fileperms($file);
$dir['inode'] = fileinode($file);
$dir['group'] = filegroup($... | 0 |
5c109daac276666dd33ab0c561c453fa | 617aa9de1e526ba734f7b0f4acdf67bf | Loads all values for the plan from the database with the plan name and session
information given in constructor. | public void loadFromDB(String date); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.